|
@@ -732,10 +732,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
//批量加价
|
|
//批量加价
|
|
|
batchAddPriceFun(){
|
|
batchAddPriceFun(){
|
|
|
|
|
+ if(this.batchAddPrice=='') return;
|
|
|
this.dataList.form.type = 'addPrice'
|
|
this.dataList.form.type = 'addPrice'
|
|
|
let data = this.$refs['xCrud'].table.data;
|
|
let data = this.$refs['xCrud'].table.data;
|
|
|
data.forEach((ele)=>{
|
|
data.forEach((ele)=>{
|
|
|
- ele.addPrice = Number(this.batchAddPrice) + Number(ele.addPrice)
|
|
|
|
|
|
|
+ let batchAddPrice = (Number(this.batchAddPrice) + Number(ele.addPrice)).toFixed(2)
|
|
|
|
|
+ ele.addPrice = batchAddPrice
|
|
|
this.initData.push({id:ele.id,addPrice:ele.addPrice})
|
|
this.initData.push({id:ele.id,addPrice:ele.addPrice})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -745,6 +747,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
//批量改价
|
|
//批量改价
|
|
|
batchAlterFun(){
|
|
batchAlterFun(){
|
|
|
|
|
+ if(this.batchAlter=='') return;
|
|
|
this.dataList.form.type = 'addPrice'
|
|
this.dataList.form.type = 'addPrice'
|
|
|
// batchAlter
|
|
// batchAlter
|
|
|
let data = this.$refs['xCrud'].table.data;
|
|
let data = this.$refs['xCrud'].table.data;
|
|
@@ -756,6 +759,8 @@ export default {
|
|
|
// console.log(this.$refs['xCrud'].table.data,'1111');
|
|
// console.log(this.$refs['xCrud'].table.data,'1111');
|
|
|
},
|
|
},
|
|
|
changeAllSort(e){
|
|
changeAllSort(e){
|
|
|
|
|
+ this.batchAlter='';
|
|
|
|
|
+ this.batchAddPrice='';
|
|
|
this.dialogFormVisible = true;
|
|
this.dialogFormVisible = true;
|
|
|
|
|
|
|
|
},
|
|
},
|