Browse Source

新增预约单批量修改客户功能

dev-xx
马远东 12 months ago
parent
commit
bb624e2f45
  1. 8
      src/api/distribution/distributionStockArticle.js
  2. 69
      src/views/distribution/reservation/reservationAddFrom.vue

8
src/api/distribution/distributionStockArticle.js

@ -172,7 +172,15 @@ export const updateClient = row => {
data: row,
});
};
// 批量修改客户
export const $_updateBatchClient = data => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/updateBatchClient',
method: 'post',
data,
});
};
/**
* 订单添加增值服务
* @param row

69
src/views/distribution/reservation/reservationAddFrom.vue

@ -231,6 +231,11 @@
width="90%"
:model="addvalue"
>
<el-button
type="primary"
@click="Batchmodifycustomers"
>批量修改客户
</el-button>
<tablecmt
ref="orderTableNode"
:columnList="stockArtcolumnList"
@ -483,6 +488,7 @@ import {
selectUpdateAvailableStockArticle,
getZeroOrderDetail,
updateClient,
$_updateBatchClient,
} from '@/api/distribution/distributionStockArticle';
import { getDetailDelivery } from '@/api/distribution/distributionDelivery';
import { getInventoryList, selectInventoryDetail } from '@/api/distribution/distributionStockList';
@ -2145,6 +2151,31 @@ export default {
this.loading = false;
}
},
//
Batchmodifycustomers(){
if(!this.orderList.length){
ElMessage({
message: '请勾选要批量修改的数据',
type: 'warning',
})
return;
}
let State= this.orderList.every(item=>item.mallName==this.orderList[0].mallName)
if(!State){
ElMessage({
message: '请勾选商场名称一样的单子',
type: 'warning',
})
return
}
// this.orderList
this.clientData={}
this.clientData.mallName= this.orderList[0].mallName
this.dialogVisible=true
},
handleCheckedCitiesChange(value) {
if (value) {
this.form.addvalueType = value;
@ -2258,12 +2289,50 @@ export default {
this.isrReservationEntry = false;
},
submitClient() {
if(this.orderList.length){
let data={
entityList:[]
}
this.orderList.forEach(item=>{
item.customerName = this.clientData.customerName;//
item.customerTelephone=this.clientData.customerTelephone;//
item.customerAddress=this.clientData.customerAddress;//
data['entityList'].push(item)
})
this.loading=true
this.dialogVisible = false;//
$_updateBatchClient(data).then(res=>{
console.log(res,'修改成功');
if(res.data.code == 200){
ElMessage({
message: res.data.msg,
type: 'success',
})
this.onLoadOrder(this.page);
this.orderList=[]
}
}).catch(()=>{
this.loading=false
}).finally(()=>{
})
}else{
this.loading=true
this.dialogVisible = false;//
console.log('this.client===============>', this.clientData);
updateClient(this.clientData).then(res => {
console.log('res>>>>>>>>>>>', res.data.data);
this.onLoadOrder(this.page);
this.dialogVisible = false;
}).catch(()=>{
this.loading=false
}).finally(()=>{
});
}
},
//

Loading…
Cancel
Save