Browse Source

修改自提操作编辑提货单

fix_bug_pro20231227
caoyizhong 2 years ago
parent
commit
d518f251c0
  1. 2
      src/option/distribution/distrilbutionBillLading.js
  2. 78
      src/views/distribution/inventory/distrilbutionBillLading.vue

2
src/option/distribution/distrilbutionBillLading.js

@ -1190,7 +1190,7 @@ export default {
},
{
prop: 'notification',
prop: 'notificationName',
label: '通知状态',
width: '150',
},

78
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -198,7 +198,7 @@
<el-form-item label="物品明细" prop="certificateType">
<el-tabs type="border-card" style="width: 100%">
<el-tab-pane label="定制品">
<el-button type="primary" link icon="el-icon-view" @click="handleAddOrder"> </el-button>
<el-button type="primary" link icon="el-icon-view" @click="handleAddOrder" v-if="orderAdd"> </el-button>
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="dataList"
@ -459,12 +459,14 @@ export default {
box: false,
//
search: true,
orderAdd: false,
//
loading: false,
//
view: false,
//
query: {},
queryOrder: {},
dataOrder: [],
//
page: {
@ -861,7 +863,7 @@ export default {
// sortable: true,
// },
{
prop: 'notification',
prop: 'notificationName',
label: '通知状态',
type: 3,
values: '',
@ -1137,23 +1139,25 @@ export default {
selectsc(index, row) {
console.log(index, row);
if(row.prop ==='freezeStatusName'){
this.query['freezeStatus'] = index;
this.queryOrder['freezeStatus'] = index;
}else if(row.prop ==='completeSetName'){
this.query['completeSet'] = index;
this.queryOrder['completeSet'] = index;
}else if(row.prop ==='reservationStatusName'){
this.query['reservationStatus'] = index;
this.queryOrder['reservationStatus'] = index;
}else if(row.prop ==='groundingStatusName'){
this.query['groundingStatus'] = index;
this.queryOrder['groundingStatus'] = index;
}else if(row.prop ==='stockupStatusName'){
this.query['stockupStatus'] = index;
this.queryOrder['stockupStatus'] = index;
}else if(row.prop ==='orderStatusName'){
this.query['orderStatus'] = index;
this.queryOrder['orderStatus'] = index;
}else if(row.prop ==='notificationName'){
this.queryOrder['notification'] = index;
}else if(row.prop ==='typeName'){
this.query['typeService'] = index;
this.queryOrder['typeService'] = index;
}else{
this.query[row.prop] = index;
this.queryOrder[row.prop] = index;
}
this.onLoad(this.page);
this.onLoadOrder(this.pageOrder);
},
timesc(index, row) {
console.log(index, row);
@ -1164,20 +1168,21 @@ export default {
if (!index){
delete this.query[row.prop]
}
this.onLoad(this.page);
this.onLoadOrder(this.pageOrder);
},
inputsc(index, row) {
console.log(index, row);
this.query[row.prop] = index;
this.onLoad(this.page);
this.onLoadOrder(this.pageOrder);
},
//
getDetailOen(){
this.orderAdd = true;
getDetail(this.$route.query.id).then(res =>{
// console.log("",res.data.data);
let s = res.data.data;
this.form = s;
let f =[];
let f =[];
s.chargeList.forEach(c =>{
let a = this.clientType.find( i =>c.cost == i.dictKey );
@ -1264,9 +1269,17 @@ export default {
callFordeliveryOrder(){
let st = false;
let sts = false;
let ad = false;
let consigneePerson = '';
let consigneeMobile = '';
this.selectionList.some( i =>{
if(this.dataList.length > 0){
let w = this.dataList.find(c => c.consigneeMobile == i.consigneeMobile && c.consigneePerson == i.consigneePerson);
if(!w){
ad = true;
}
}
if(i.reservationStatusName === "已预约"){ st = true; this.$message.warning(i.orderCode+"已预约,请勿重复预约!!!"); }
if(!consigneePerson && !consigneeMobile){
consigneeMobile = i.consigneeMobile;
@ -1275,6 +1288,11 @@ export default {
if(consigneeMobile != i.consigneeMobile && consigneePerson != i.consigneePerson ){ sts = true; }
}
})
//
// if(ad){
// this.$message.warning("");
// return ;
// }
if(st){
return ;
}
@ -1430,7 +1448,7 @@ export default {
checkcColumnList(prop,columnList){
for(var a = 0; a < columnList.length; a++){
if(columnList[a].prop===prop){
console.log("1111111111111",columnList[a]);
// console.log("1111111111111",columnList[a]);
return columnList[a];
}
}
@ -1516,7 +1534,7 @@ export default {
if(this.dataList.length === 0 && this.data.length === 0 ){
this.$message.warning("请填写需要自提的物品!!");
}
if(this.dataList.length > 0){
if(this.orderAdd && this.dataList.length > 0){
let a = this.dataList.map(i =>i.id);
console.log("aaaaa",a);
this.form.stockArticleId = this.form.stockArticleId != null ? this.form.stockArticleId+a.join(',') : a.join(',');
@ -1579,6 +1597,7 @@ export default {
up.certificateType = this.form.certificateType;
up.totalCost = this.form.totalCost;
up.mark = mark;
up.stockArticleList = this.dataList;
console.log("修改提交数据》》》",up);
@ -1660,7 +1679,8 @@ export default {
}
params.genre = 1;
params.typeService = 3;
getListOne(page.currentPage, page.pageSize, Object.assign(params)).then(res => {
params.reservation = '30';
getListOne(page.currentPage, page.pageSize, Object.assign(params,this.queryOrder)).then(res => {
const data = res.data.data;
console.log(">>>>>>>",data.records);
this.pageOrder.total = data.total;
@ -1674,7 +1694,7 @@ export default {
const nuMap = {
'-1': "0"
};
i.notification = notificationMap[i.notification] || notificationMap.default;
i.notificationName = notificationMap[i.notification] || notificationMap.default;
i.handQuantity = nuMap[i.handQuantity] || i.handQuantity;
i.sortingQuantity = nuMap[i.sortingQuantity] || i.sortingQuantity;
i.deliveryQuantity = nuMap[i.deliveryQuantity] || i.deliveryQuantity;
@ -1784,18 +1804,16 @@ export default {
},
onLoad (page, params = {}) {
// this.loading = true;
// params.id = this.$route.query.id;
// getListOne(page.currentPage, page.pageSize, params).then(res => {
// const data = res.data.data;
// console.log(">>>>>>>>>===",data);
//
//
//
//
// this.loading = false;
// this.selectionClear();
// });
this.loading = true;
params.id = this.$route.query.id;
this.orderAdd = false;
getListOne(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
console.log("订单详细>>>>>>>>>===",data);
this.dataList = data.records;
this.loading = false;
this.selectionClear();
});
} ,
//
onLoadList (page, params = {}) {

Loading…
Cancel
Save