|
@@ -276,6 +276,7 @@
|
|
|
switch (this.$route.query.type) {
|
|
|
case "新增":
|
|
|
this.submitName = "提交"
|
|
|
+ this.isCountShow = true
|
|
|
this.baseInfoForm = {
|
|
|
warehouseId: '',
|
|
|
warehouseName: '',
|
|
@@ -504,6 +505,7 @@
|
|
|
},
|
|
|
// 添加粮价设置
|
|
|
newSetPrice() {
|
|
|
+ this.isCountShow = false
|
|
|
let _newObj = {
|
|
|
index: 0,
|
|
|
checkList: [],
|
|
@@ -749,6 +751,17 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
+ getEditChecList(){
|
|
|
+ let _data = this.baseInfoForm.details
|
|
|
+ let _list = []
|
|
|
+ for(let k = 0;k<_data.length;k++){
|
|
|
+ let _list1 = []
|
|
|
+ _list1 = _data[k].level.split(',')
|
|
|
+ _list = _list.concat(_list1)
|
|
|
+ }
|
|
|
+ this.checkList = [...new Set(_list)];
|
|
|
+ console.log(this.checkList)
|
|
|
+ },
|
|
|
// 提交
|
|
|
submit() {
|
|
|
this.makeTableList()
|
|
@@ -769,6 +782,7 @@
|
|
|
}
|
|
|
break;
|
|
|
case "编辑":
|
|
|
+ this.getEditChecList()
|
|
|
isValidate = this.validate()
|
|
|
if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
@@ -776,6 +790,7 @@
|
|
|
})
|
|
|
}
|
|
|
case "审核中":
|
|
|
+ this.getEditChecList()
|
|
|
isValidate = this.validate()
|
|
|
if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
@@ -938,8 +953,7 @@
|
|
|
let _price = 0
|
|
|
for (let i = 0; i < this.splitPriceList.length; i++) {
|
|
|
let _list = this.splitPriceList[i].priceList
|
|
|
- let basePrice = parseFloat(this.splitPriceList[i].basicUnitPrice) * parseFloat(this.baseInfoForm
|
|
|
- .waterBase) * 0.01
|
|
|
+ let basePrice = parseFloat(this.splitPriceList[i].basicUnitPrice)
|
|
|
for (let k = 0; k < _list.length; k++) {
|
|
|
//基准左边
|
|
|
if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {
|