|
@@ -506,7 +506,6 @@
|
|
|
},
|
|
|
// 添加粮价设置
|
|
|
newSetPrice() {
|
|
|
- this.isCountShow = false
|
|
|
let _newObj = {
|
|
|
index: 0,
|
|
|
checkList: [],
|
|
@@ -541,7 +540,7 @@
|
|
|
this.priceList.push(_newObj)
|
|
|
},
|
|
|
// 删除价格组
|
|
|
- delSetPrice(item, index) {
|
|
|
+ delSetPrice(item, index) {debugger
|
|
|
let that = this
|
|
|
this.checkList1 = []
|
|
|
this.checkList2 = []
|
|
@@ -570,6 +569,7 @@
|
|
|
});
|
|
|
} else {
|
|
|
that.priceList.splice(index, 1)
|
|
|
+ that.baseInfoForm.details.split(index,1)
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|
|
@@ -631,13 +631,11 @@
|
|
|
if (typeof(_pointVal1) == "string") _pointVal1 = _pointVal1.length
|
|
|
let _tobeVal1 = _val1 % point
|
|
|
if (type == "waterBase") {
|
|
|
-
|
|
|
if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum && _tobeVal1 == 0) {
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
if (type == "deductWeight") {
|
|
|
-
|
|
|
if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
|
|
|
return false
|
|
|
}
|
|
@@ -752,7 +750,7 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
- getEditChecList(){
|
|
|
+ getEditCheckList(){
|
|
|
let _data = this.baseInfoForm.details
|
|
|
let _list = []
|
|
|
for(let k = 0;k<_data.length;k++){
|
|
@@ -783,7 +781,7 @@
|
|
|
}
|
|
|
break;
|
|
|
case "编辑":
|
|
|
- this.getEditChecList()
|
|
|
+ this.getEditCheckList()
|
|
|
isValidate = this.validate()
|
|
|
if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
@@ -791,7 +789,7 @@
|
|
|
})
|
|
|
}
|
|
|
case "审核中":
|
|
|
- this.getEditChecList()
|
|
|
+ this.getEditCheckList()
|
|
|
isValidate = this.validate()
|
|
|
if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
@@ -801,6 +799,7 @@
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
+ //审核
|
|
|
that.audit(this.baseInfoForm,true,2)
|
|
|
})
|
|
|
})
|
|
@@ -871,7 +870,7 @@
|
|
|
this.tableData = _list
|
|
|
},
|
|
|
// 获取分界价格数据,构造分界价格区间数据
|
|
|
- getSplitPrice() {debugger
|
|
|
+ getSplitPrice() {
|
|
|
let _priceList = this.priceList
|
|
|
for (let i = 0; i < _priceList.length; i++) {
|
|
|
for (let k = 0; k < _priceList[i].checkList.length; k++) {
|
|
@@ -948,7 +947,7 @@
|
|
|
return _leftTotalPrice + _rightTotalPrice
|
|
|
},
|
|
|
// 计算价格
|
|
|
- calculatePrice(_waterMin) {debugger
|
|
|
+ calculatePrice(_waterMin) {
|
|
|
let prcieList = []
|
|
|
let totalPrice = []
|
|
|
let _price = 0
|
|
@@ -966,8 +965,8 @@
|
|
|
prcieList.push(this.keepTwoDecimal(_price))
|
|
|
} else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
|
|
|
// 当前区间段价格+其他区间段价格
|
|
|
- let _otherPice = this.getOtherPrice(_list, _list[k], "leftBasic")
|
|
|
- let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
|
|
|
+ // let _otherPice = this.getOtherPrice(_list, _list[k], "leftBasic")
|
|
|
+ // let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
|
|
|
prcieList.push(basePrice + _price1)
|
|
|
|
|
|
}
|
|
@@ -985,8 +984,8 @@
|
|
|
prcieList.push(this.keepTwoDecimal(_price))
|
|
|
} else if (_waterMin > _list[k].priceStart && _waterMin <= _list[k].priceEnd) {
|
|
|
// 当前段价格+其他段价格
|
|
|
- let _otherPice2 = this.getOtherPrice(_list, _list[k], "rightBasic")
|
|
|
- let _price2 = (_waterMin - _list[k].priceEnd) / 0.5 * _list[k].betweenPrice + _otherPice2;
|
|
|
+ // let _otherPice2 = this.getOtherPrice(_list, _list[k], "rightBasic")
|
|
|
+ // let _price2 = (_waterMin - _list[k].priceEnd) / 0.5 * _list[k].betweenPrice + _otherPice2;
|
|
|
prcieList.push(basePrice - _price2)
|
|
|
}
|
|
|
}
|