diff --git a/src/option/distribution/distrilbutionBillLading.js b/src/option/distribution/distrilbutionBillLading.js index 90ade6f7..9174f05d 100644 --- a/src/option/distribution/distrilbutionBillLading.js +++ b/src/option/distribution/distrilbutionBillLading.js @@ -1190,7 +1190,7 @@ export default { }, { - prop: 'notification', + prop: 'notificationName', label: '通知状态', width: '150', }, diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index c85b6cee..17a1843c 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -44,7 +44,7 @@ <span>装车时间:{{deliverydata.loadingTime}} </span> </el-col> </el-row> - <el-divider>配载情况</el-divider> + <el-divider>配送情况</el-divider> <el-row :gutter="24" class="rows"> <el-col :xl="5" :lg="7" :md="8" :sm="24"> <span>配送客户:{{deliverydata.customersNumber}} </span> @@ -411,6 +411,12 @@ export default { label: "配送库存品数", prop: "reservationStockListNum", search: true, + width:"110px" + }, + { + label: "计划件数", + prop: "reservationNum", + search: true, width:"100px" }, { @@ -421,7 +427,7 @@ export default { }, { label: "是否加急", - prop: "businessDepartment", + prop: "isUrgent", search: true, width:"100px" }, diff --git a/src/views/distribution/inventory/distrilbutionBillLading.vue b/src/views/distribution/inventory/distrilbutionBillLading.vue index a8eb7caf..72429dc9 100644 --- a/src/views/distribution/inventory/distrilbutionBillLading.vue +++ b/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 = {}) { diff --git a/src/views/distribution/reservation/reservationFrom.vue b/src/views/distribution/reservation/reservationFrom.vue index 3d078027..37c624f8 100644 --- a/src/views/distribution/reservation/reservationFrom.vue +++ b/src/views/distribution/reservation/reservationFrom.vue @@ -916,7 +916,7 @@ this.page.total = data.total; this.stockArticleInfo = data.records; this.loading = false; - this.selectionClear(); + // this.selectionClear(); }); }, searchStockList() { @@ -958,15 +958,16 @@ this.packageList.forEach(list => { console.log("##########",item); console.log("list------------>",list); - //TODO 这里订单选择包件遵循的规则应该是这个预约所选择是包件不管包件状态,其他的已预约包件不能被选取 if (item.id === list.stockArticleId && list.orderPackageFreezeStatus !== '20') { item.reservationNum += list.quantity; a.push(list); } }); - console.log("a------------>",a); - item.packageList = a; + // console.log("a------------>",a); + // item.packageList = a; + item.packageListInfo = a; + return item }); }else { this.orderData.forEach(item => { @@ -979,7 +980,9 @@ a.push(list); } }); - item.packageList = a; + item.packageListInfo = a; + // item.packageList = a; + return item }); } console.log("this.orderData------------>",this.orderData); @@ -1020,6 +1023,7 @@ this.form.stockArticleIds = orderIds.toString(); this.form.inventoryIds = inventoryIds.toString(); this.form.inventoryList = inventoryList; + console.log("-------------->",this.orderData); this.form.stockArticleList = this.orderData; this.deliveryWayData.forEach(item => { if (this.form.deliveryWay === item.dictValue) { @@ -1038,7 +1042,12 @@ }); this.form.serveType = this.serveType.join(','); //服务号 - + this.orderData.forEach(item=>{ + console.log("-------------->item",item); + if (!item.packageListInfo){ + item.packageListInfo = item.packageList; + } + }) // this.form.stockArticleList = this.packageList; console.log('>>>>>>>>', this.form); if (this.reservationId) { @@ -1125,13 +1134,14 @@ this.orderList = a; }, selectionPackageChange(list) { + console.log("-----------<>",list); if (this.reservationId){ - console.log("-----------<>",list); this.packageList = list; }else { //新增 let a = []; list.forEach(item=>{ + console.log("--------------->",item); if (item.orderPackageReservationStatus === '10' || item.orderPackageReservationStatusName === '未预约'){ a.push(item); } @@ -1262,7 +1272,6 @@ // }) console.log(">>>>>>>>",reservation); this.orderData = reservation.stockArticleList; - this.inventoryData = reservation.inventoryList; this.inventoryData.forEach(item => { item.applyNum = item.quantityStock - item.quantityOccupied; diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index 12a78c0d..2a314a06 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -117,7 +117,6 @@ :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" - :disabled="isDisable" > </el-option> <!-- {{this.forkliftData}}--> @@ -132,7 +131,6 @@ :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" - :disabled="isDisable" > </el-option> </el-select> @@ -145,7 +143,6 @@ v-for="item in loadAndUnloadData" :label="item.dictKey" :value="item.dictKey" - :disabled="isDisable" > <span>{{ item.dictValue }}</span> </el-checkbox> @@ -155,7 +152,7 @@ <el-col :span="6"> <el-form-item label="配送类型:" prop="goodsAreaId"> <el-radio-group v-model="stockUpForm.deliveryType"> - <el-radio :label="'1'" :value="'1'">商配  </el-radio> + <el-radio :label="'10'" :value="'10'">商配  </el-radio> </el-radio-group> </el-form-item> </el-col> @@ -169,7 +166,6 @@ :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" - :disabled="isDisable" > </el-option> </el-select> @@ -177,7 +173,7 @@ </el-col> <el-col :span="6"> <el-form-item label="备货时间:" prop="goodsShelfId"> - <el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" :disabled="isDisable"> + <el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间"> </el-date-picker> </el-form-item> </el-col> @@ -886,33 +882,35 @@ this.loading = true; this.obj = row; console.log("++++++++++++",this.obj); - if (this.deliveryListId){ //编辑 let params={}; console.log("^^^^^^^^",row); this.query.stockArticleId = row.id; - //TODO 这里还需要对包件的状态进行过滤 this.query.id = 1; - // this.query.typeService = 1; - // this.query.genre = '1'; - getPackageList(Object.assign(params,this.query)).then(res=>{ - console.log(res.data.data); - let data =res.data.data; - this.packageData =data.records; - let packageInfo =row.parcelListVOS - console.log("packageInfo",packageInfo); - this.packageData.forEach((item,index)=>{ - packageInfo.forEach(p=>{ + //这里订单的对象中应该存在三个数组,一个数组是该订单下的所有包件细信息 + //一个数组是该订单被选择使用的包件信息 + //还有一个就是正在操作的包件信息 + let packageInfo = row.parcelListVOS + if (row.packageList){ + let packageListInfo = row.packageList; + packageInfo.forEach((item,index)=>{ + packageListInfo.forEach(p=>{ if (item.id===p.id){ - this.selectionList.push(item); this.$nextTick( ()=> { this.$refs.packageList.toggleRowSelection(this.packageData[index],true); }) } }) }) - this.selectionClear(); - }) + }else { + //新增订单,默认全选 + packageInfo.forEach((item,index)=>{ + this.$nextTick( ()=> { + this.$refs.packageList.toggleRowSelection(this.packageData[index],true); + }) + }) + } + this.packageData =row.parcelListVOS; }else { //新增 //默认打开包件信息,包件列表处于全选状态 @@ -949,7 +947,7 @@ console.log("___________",this.obj); this.orderData.forEach(item=>{ if (item.id===this.obj.id){ - item.packageList = this.selectionList; + item.packageListInfo = this.selectionList; } }) console.log( "**********",this.orderData); @@ -992,18 +990,30 @@ this.stockListShow = false; }, onSubmitOrder() { - console.log('>>>>>>>>>>>>', this.selectionList); - this.orderData.forEach(item => { - item.reservationNum = 0; - this.selectionList.forEach((list, index) => { - if (item.id === list.stockArticleId) { - item.reservationNum += list.quantity; - } - }); - item.packageList = this.selectionList; - }); + console.log('>>>>>>>>>>>>', this.stockArticleList); + console.log('>>>>>>>>orderData', this.orderData); + if (this.orderData){ + let a = this.orderData; + this.stockArticleList.forEach(item=>{ + a.forEach(order=>{ + console.log("order----------------->",order); + if (item.id === order.id){ + item.packageListInfo = order.packageList; + } + }) + }) + } + // this.orderData.forEach(item => { + // item.reservationNum = 0; + // this.stockArticleList.forEach((list, index) => { + // if (item.id === list.id) { + // list = item; + // } + // }); + // }); + this.orderData = this.stockArticleList; console.log('+++++++++++++++', this.orderData); - this.isaddvalue = false; + this.orderShow = false; }, /** * 订单提交 @@ -1173,7 +1183,8 @@ if (this.waixieForm.driverName) { tripartite.driverName = this.waixieForm.driverName; } - if (this.waixieForm.deiverPhone) { + console.log("-------------->",this.waixieForm); + if (this.waixieForm.driverPhone) { tripartite.driverPhone = this.waixieForm.driverPhone; } if (this.waixieForm.vehicleNum) { @@ -1184,7 +1195,7 @@ } if (this.waixieForm.tripartiteSource) { this.tripartiteSourceData.forEach(item => { - if (params.tripartiteSource === item.dictValue) { + if (this.waixieForm.tripartiteSource === item.dictValue) { tripartite.distributionCompanyId = item.dictKey; tripartite.distributionCompany = item.dictValue; } @@ -1365,7 +1376,7 @@ } this.aaa = true; this.bbb = false; - this.stockUpForm.deliveryType="1"; + this.stockUpForm.deliveryType="10"; this.stockUpForm.deliveryWay="10"; this.loadAndUnload = ["1","2"]; this.stockUpForm.otherFee = 0; @@ -1386,7 +1397,7 @@ } this.aaa = false; this.bbb = true; - this.stockUpForm.deliveryType="1"; + this.stockUpForm.deliveryType="10"; this.stockUpForm.deliveryWay="10"; this.loadAndUnload = ["1","2"]; this.stockUpForm.otherFee = 0; @@ -1402,14 +1413,22 @@ selectStockArticleAndParcel(Object.assign(params,this.query)).then(res=>{ console.log(res.data.data); const data = res.data.data; - data.forEach(item => { - item.reservationNum = item.handQuantity; + data.forEach(item => { + if (this.orderData){ + this.orderData.forEach(a=>{ + if (item.id === a.id){ + item.packageList = a.packageList; + } + }) + } + // item.reservationNum = item.handQuantity; }); this.page.total = data.total; this.stockArticleInfo = data; this.loading = false; this.query={}; // this.selectionClear(); + if (this.deliveryListId) { //编辑 console.log("---->", this.stockArticleInfo); @@ -1449,14 +1468,9 @@ this.selectionList = []; this.stockListShow = true; }, - onSubmitOrder() { - this.orderData=this.stockArticleList; - this.orderShow = false; - }, selectionClear() { this.selectionList = []; this.query={}; - // this.$refs.table.clearSelection(); }, async onLoad(page, params = {}) { console.log("》》》》》》》》》》》》》》》",this.deliveryListId); @@ -1465,7 +1479,7 @@ let data = res.data.data; Object.assign(this.stockUpForm,data.reservationInfo) Object.assign(this.stockUpForm,data.stockupInfo) - this.stockUpForm.deliveryType = '1'; + this.stockUpForm.deliveryType = '10'; this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay; this.serveType = data.reservationInfo.serveType.split(","); if (data.stockupInfo){ @@ -1477,6 +1491,12 @@ this.stockUpForm.outboundDate = data.stockupInfo.outboundDate; this.stockUpForm.remarks = data.stockupInfo.remarks; this.stockUpForm.taskTime = data.taskTime; + data.stockArticleList.forEach(item=>{ + if (item.packageList){ + item.packageList = item.packageList; + item.packageListInfo = item.packageList; + } + }) this.orderData = data.stockArticleList; if (data.teamResponsibility){ this.loadAndUnload =data.teamResponsibility.split(","); @@ -1537,7 +1557,7 @@ }) this.isDisable=true; }else { - this.stockUpForm.deliveryType="1"; + this.stockUpForm.deliveryType="10"; this.stockUpForm.deliveryWay="10"; this.loadAndUnload = ["1","2"]; this.stockUpForm.otherFee = 0; diff --git a/vite.config.js b/vite.config.js index 0bc800de..0b508ab5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,7 +12,7 @@ export default ({ mode, command }) => { port: 2888, proxy: { '/api': { - target: 'http://192.168.10.75:8777', + target: 'http://192.168.10.33:13000', //target: 'http://test3.javablade.com', changeOrigin: true, rewrite: path => path.replace(/^\/api/, ''),