diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index 720dda51..3655d9aa 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -128,8 +128,10 @@ - - 导出 + + 导出 - 批量查看二维码 - + 批量查看二维码 批量查看二维码 - 批量签收 - 批量签收 定时任务补偿--> - 批量签收 审 核 - 驳回 - + 驳回 + @@ -912,16 +929,10 @@ - - - -
- 请联系司机进行滞留扫描操作 - -
- -
+ + @@ -1007,20 +1016,19 @@ export default { data() { return { ViRejectselect: [ - { - value: true, - label: '是', - }, - { - value: false, - label: '否', - }, - - ], - dialogViReject:false,//驳回弹窗 - RejectRow:{},//驳回点击当前单子 - yesOrNo:false, - accessControl:'', + { + value: true, + label: '是', + }, + { + value: false, + label: '否', + }, + ], + dialogViReject: false, //驳回弹窗 + RejectRow: {}, //驳回点击当前单子 + yesOrNo: false, + accessControl: '', html: '', reservationActiveName: 'reservationPackage', checkloading: false, //复核签收加载 @@ -1844,15 +1852,15 @@ export default { head: false, }, { - label: '物料名称', - prop: 'materialName', - type: 2, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, + label: '物料名称', + prop: 'materialName', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'trainNumber', label: '入库车次', @@ -3926,11 +3934,11 @@ export default { this.setTableHeight(); }, created() { -const $useStore = useStore(); -if($useStore.getters && $useStore.getters.permission){ - this.accessControl = $useStore.getters.permission.Batch_signing;//批量签收权限 - console.log(this.accessControl,'accessControl按钮权限'); -} + const $useStore = useStore(); + if ($useStore.getters && $useStore.getters.permission) { + this.accessControl = $useStore.getters.permission.Batch_signing; //批量签收权限 + console.log(this.accessControl, 'accessControl按钮权限'); + } // this.onLoad(); // //查询字典 @@ -3966,18 +3974,18 @@ if($useStore.getters && $useStore.getters.permission){ loadingAbnormalPackageListDetail(scope.signId) .then(res => { console.log(res, '异常审核查询'); - res.data.data.forEach(res=>{ - if(res.isAbnormalSigning==1){ - res.isAbnormalSigning='否' - }else{ - res.isAbnormalSigning='是' + res.data.data.forEach(res => { + if (res.isAbnormalSigning == 1) { + res.isAbnormalSigning = '否'; + } else { + res.isAbnormalSigning = '是'; } - if(res.isAbnormalLoading==1){ - res.isAbnormalLoading='否' - }else{ - res.isAbnormalLoading='是' + if (res.isAbnormalLoading == 1) { + res.isAbnormalLoading = '否'; + } else { + res.isAbnormalLoading = '是'; } - }) + }); this.AbnormalReviewData = res.data.data; }) .catch(res => { @@ -3987,25 +3995,25 @@ if($useStore.getters && $useStore.getters.permission){ this.AbnormalReviewloading = false; //关闭加载 }); }, - RejectFn(row){ + RejectFn(row) { console.log(row); - this.RejectRow=row; - this.dialogViReject=true; + this.RejectRow = row; + this.dialogViReject = true; }, // 确定驳回 - ViReject(){ - let data={ - ids:this.RejectRow.id, - yesOrNo:this.yesOrNo, - } - this.AbnormalReviewloading =true; //开启加载 - this.dialogViReject=false; - $_loadingAbnormalPackageListTurnDown(data).then(res=>{ - if(res.data.code ==200){ - console.log(res,'驳回成功返回值'); - this.viewAbnormalLoading(this.toexamineID); //驳回完成更新数据 - } - }) + ViReject() { + let data = { + ids: this.RejectRow.id, + yesOrNo: this.yesOrNo, + }; + this.AbnormalReviewloading = true; //开启加载 + this.dialogViReject = false; + $_loadingAbnormalPackageListTurnDown(data).then(res => { + if (res.data.code == 200) { + console.log(res, '驳回成功返回值'); + this.viewAbnormalLoading(this.toexamineID); //驳回完成更新数据 + } + }); }, //审批异常装车包件 auditing(row) { @@ -4065,8 +4073,6 @@ if($useStore.getters && $useStore.getters.permission){ .finally(() => { this.AbnormalReviewloading = false; //关闭加载 }); - - }, // 关闭异常审核 Abnormalshutdown() { @@ -4431,9 +4437,18 @@ if($useStore.getters && $useStore.getters.permission){ if (code !== 200) return; - // this.orderPackageCode = res.data - console.log(res.data); - this.html = this.getHtmls(data.dataList, data.templateHtml); + for (let i = 0; i < data.moldList.length; i++) { + const element = data.moldList[i]; + this.html += element; + } + + // const { code, data } = res.data; + + // if (code !== 200) return; + + // // this.orderPackageCode = res.data + // console.log(res.data); + // this.html = this.getHtmls(data.dataList, data.templateHtml); this.isShowPrint = true; } catch (error) { @@ -4443,18 +4458,18 @@ if($useStore.getters && $useStore.getters.permission){ } }, // 批量查看二维码 - async ViewQRcodes(){ - if(!this.selectionList.length){ + async ViewQRcodes() { + if (!this.selectionList.length) { ElMessage({ message: `请勾选要查看二维码的数据`, type: 'warning', }); - return + return; } try { this.loadingObj.pageLoading = true; let qr = { - ids: this.selectionList.map(res=>res.id).join(','), + ids: this.selectionList.map(res => res.id).join(','), }; this.html = ''; const res = await showOrderPackgeCode(qr); @@ -4463,9 +4478,18 @@ if($useStore.getters && $useStore.getters.permission){ if (code !== 200) return; - // this.orderPackageCode = res.data - console.log(res.data); - this.html = this.getHtmls(data.dataList, data.templateHtml); + for (let i = 0; i < data.moldList.length; i++) { + const element = data.moldList[i]; + this.html += element; + } + + // const { code, data } = res.data; + + // if (code !== 200) return; + + // // this.orderPackageCode = res.data + // console.log(res.data); + // this.html = this.getHtmls(data.dataList, data.templateHtml); this.isShowPrint = true; } catch (error) { @@ -4503,40 +4527,32 @@ if($useStore.getters && $useStore.getters.permission){ } }, cancelReservationPackage(row) { - - ElMessageBox.confirm( - '是否确认取消?', - '提示', - { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - } - ) - .then(() => { - console.log('row', row); - console.log('deliveryId', this.deliveryId); - console.log('reservationId', this.wid); - let data = { - deliveryId: this.deliveryId, - reservationId: this.wid, - type: 1, - packageIds: row.id, - }; - this.loading=true - cancelReservationPackage(data).then(res => { - if (res.data.code === 200) { - - this.$message.success(res.data.msg); - this.getWrapdetails(this.page); - } - }).catch(()=>{ - this.loading=false + ElMessageBox.confirm('是否确认取消?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + console.log('row', row); + console.log('deliveryId', this.deliveryId); + console.log('reservationId', this.wid); + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + type: 1, + packageIds: row.id, + }; + this.loading = true; + cancelReservationPackage(data) + .then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.getWrapdetails(this.page); + } + }) + .catch(() => { + this.loading = false; + }); }); - }) - - - }, ViewingTrajectories(val) { this.$router.push({ @@ -4564,81 +4580,74 @@ if($useStore.getters && $useStore.getters.permission){ this.getReservationInventoryPackageListInfo(this.page); } }) - .catch(res => { this.loading = false;}) - + .catch(res => { + this.loading = false; + }); }) .catch(() => {}); }, signingReservationPackage(row) { - ElMessageBox.confirm( - '是否确认签收?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - } - ) - .then(() => { - this.loading=true - console.log('row', row); - console.log('wid', this.wid); - console.log('deliveryId', this.deliveryId); - let data = { - deliveryId: this.deliveryId, - reservationId: this.wid, - barcodes: row.orderPackageCode, - }; - //包件签收 - deliverySign(data).then(res => { - console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); - if (res.data.code === 200) { - - this.$message.success(res.data.msg); - this.getWrapdetails(this.page); - } - }).catch(res=>{ - this.loading=false - }) - }) + ElMessageBox.confirm('是否确认签收?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + this.loading = true; + console.log('row', row); + console.log('wid', this.wid); + console.log('deliveryId', this.deliveryId); + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + barcodes: row.orderPackageCode, + }; + //包件签收 + deliverySign(data) + .then(res => { + console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.getWrapdetails(this.page); + } + }) + .catch(res => { + this.loading = false; + }); + }); }, // 滞留 - retention(row){ - ElMessageBox.confirm( - '是否确认滞留操作?', - '提示', - { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - } - ) - .then(() => { - let data={ - barcode:row.orderPackageCode, - deliveryId:this.deliverydata.id, - retentionType:'1', - } - this.loading=true - $_retentionScan(data).then(res=>{ - console.log(res,'res'); - if(res.data.code ==200){ - ElMessage({ - message: '滞留成功', - type: 'success', - }) - this.getWrapdetails(this.wpage); - } - }).catch(()=>{ - this.loading=false + retention(row) { + ElMessageBox.confirm('是否确认滞留操作?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', }) - }) - .catch(() => {}) - - + .then(() => { + let data = { + barcode: row.orderPackageCode, + deliveryId: this.deliverydata.id, + retentionType: '1', + }; + this.loading = true; + $_retentionScan(data) + .then(res => { + console.log(res, 'res'); + if (res.data.code == 200) { + ElMessage({ + message: '滞留成功', + type: 'success', + }); + this.getWrapdetails(this.wpage); + } + }) + .catch(() => { + this.loading = false; + }); + }) + .catch(() => {}); }, // 包件批量签收 - Batchpackages(){ + Batchpackages() { if (!this.selectionList.length) { ElMessage({ message: '请勾选需要批量签收的数据', @@ -4646,57 +4655,52 @@ if($useStore.getters && $useStore.getters.permission){ }); return; } - const allSigned = this.selectionList.every( - item => item.orderPackageStatus == '70' - ); - if(allSigned){ + const allSigned = this.selectionList.every(item => item.orderPackageStatus == '70'); + if (allSigned) { ElMessage({ message: '勾选的数据都是已签收的', type: 'warning', }); - return - }else{ - let state=false - this.selectionList.forEach(item=>{ - if(item.orderPackageStatus ==70){ + return; + } else { + let state = false; + this.selectionList.forEach(item => { + if (item.orderPackageStatus == 70) { ElMessage({ message: `${item.orderCode}已签收,请取消勾选!`, type: 'warning', - }); - state=true + }); + state = true; } - }) - if(state){ - return + }); + if (state) { + return; } } - ElMessageBox.confirm( - '是否进行批量签收?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - } - ) - .then(() => { - this.loading=true - let data = { - deliveryId: this.deliveryId, - reservationId: this.wid, - barcodes: this.selectionList.map(item => item.orderPackageCode).join(','), - }; - //包件签收 - deliverySign(data).then(res => { - console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); - if (res.data.code === 200) { - this.$message.success(res.data.msg); - this.getWrapdetails(this.page); - } - }).catch(res=>{ - this.loading=false - }) - }) + ElMessageBox.confirm('是否进行批量签收?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + this.loading = true; + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + barcodes: this.selectionList.map(item => item.orderPackageCode).join(','), + }; + //包件签收 + deliverySign(data) + .then(res => { + console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.getWrapdetails(this.page); + } + }) + .catch(res => { + this.loading = false; + }); + }); }, signingReservationInventoryPackage(row) { console.log('row', row); @@ -4751,16 +4755,16 @@ if($useStore.getters && $useStore.getters.permission){ }); return; } - let temp = {}; - temp= this.LessThantruckloadListData.every(item=>item.signingStatusName == '待签收') - console.log(temp,'temp'); - if(!temp){ - ElMessage({ + let temp = {}; + temp = this.LessThantruckloadListData.every(item => item.signingStatusName == '待签收'); + console.log(temp, 'temp'); + if (!temp) { + ElMessage({ message: `签收状态要都满足条件为‘待签收’才可以批量签收`, type: 'warning', }); return; - } + } this.$confirm('是否进行批量签收?') .then(() => { this.loading = true; //开启加载 @@ -4840,8 +4844,8 @@ if($useStore.getters && $useStore.getters.permission){ .catch(() => {}); }, // 零担批量取消 - Ldcancellation(){ - if(!this.selectionList.length){ + Ldcancellation() { + if (!this.selectionList.length) { ElMessage({ message: '请勾选要批量取消的数据', type: 'warning', @@ -4851,38 +4855,35 @@ if($useStore.getters && $useStore.getters.permission){ this.$confirm('是否进行批量计划取消?') .then(() => { - let data={ - reservationId:this.wid, - deliveryId:this.deliveryId, - zeroPackageIds:this.selectionList.map(item => item.id).join(','), - } - console.log(data,'发送的参数'); - this.loading = true; //开启加载 - $_cancelZeroPackage(data).then(res=>{ - console.log(res,'返回成功'); - if (res.data.code === 200) { + let data = { + reservationId: this.wid, + deliveryId: this.deliveryId, + zeroPackageIds: this.selectionList.map(item => item.id).join(','), + }; + console.log(data, '发送的参数'); + this.loading = true; //开启加载 + $_cancelZeroPackage(data) + .then(res => { + console.log(res, '返回成功'); + if (res.data.code === 200) { this.$message.success(res.data.msg); this.truckload(this.page); this.selectionList = []; //清空选择 } - }).catch((res)=>{ - console.log(res,'erro'); - }).finally(()=>{ - - this.loading = false; - }) - }) - .catch(() => { - + }) + .catch(res => { + console.log(res, 'erro'); + }) + .finally(() => { + this.loading = false; + }); }) - - - + .catch(() => {}); }, // 批量签收 Batchsigning() { console.log(this.selectionList, 'this.selectionList'); - if(!this.selectionList.length){ + if (!this.selectionList.length) { ElMessage({ message: '请勾选需要签收的数据', type: 'warning', @@ -4890,57 +4891,57 @@ if($useStore.getters && $useStore.getters.permission){ return; } - this.$confirm('是否确认进行批量签收?') - .then(() => { + this.$confirm('是否确认进行批量签收?').then(() => { let data = { - deliveryId: this.deliveryId, - reservationId: this.wid, - barcodes: this.selectionList.map(item => item.stockPackageCode).join(','), - }; - this.loading = true; + deliveryId: this.deliveryId, + reservationId: this.wid, + barcodes: this.selectionList.map(item => item.stockPackageCode).join(','), + }; + this.loading = true; deliveryInventorySign(data) - .then(res => { - console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); - if (res.data.code === 200) { - this.$message.success(res.data.msg); - // this.getWrapdetails(this.page); - this.getReservationInventoryPackageListInfo(this.page); - } - this.selectionList = []; //清空选择 - this.loading = false; - }) - .catch(res => { - this.selectionList = []; //清空选择 - this.loading = false; - }); - }) + .then(res => { + console.log('res>>>>>>>>>>>>>>>>>>>>>>>', res); + if (res.data.code === 200) { + this.$message.success(res.data.msg); + // this.getWrapdetails(this.page); + this.getReservationInventoryPackageListInfo(this.page); + } + this.selectionList = []; //清空选择 + this.loading = false; + }) + .catch(res => { + this.selectionList = []; //清空选择 + this.loading = false; + }); + }); }, // 包件批量查看二维码 - async QRcodes(){ - if(!this.selectionList.length){ + async QRcodes() { + if (!this.selectionList.length) { ElMessage({ message: `请勾选要查看二维码的数据`, type: 'warning', }); - return + return; } try { - this.loading= true; - + this.loading = true; + let qr = { - ids: this.selectionList.map(res=>res.id).join(','), + ids: this.selectionList.map(res => res.id).join(','), }; this.html = ''; const res = await showOrderPackgeCode(qr); const { code, data } = res.data; - this.loading = false; + if (code !== 200) return; - // this.orderPackageCode = res.data - console.log(res.data); - this.html = this.getHtmls(data.dataList, data.templateHtml); + for (let i = 0; i < data.moldList.length; i++) { + const element = data.moldList[i]; + this.html += element; + } this.isShowPrint = true; } catch (error) { @@ -5110,14 +5111,14 @@ if($useStore.getters && $useStore.getters.permission){ // 复核签收确认弹窗 submitForm() { // 取消上门照片规则 - if(this.$route.query.state){ + if (this.$route.query.state) { if (!this.DoorstepPhoto.length) { - ElMessage({ - message: '至少上传一张上门照片', - type: 'warning', - }); - return; - } + ElMessage({ + message: '至少上传一张上门照片', + type: 'warning', + }); + return; + } } if (!this.StackingPhoto.length) { @@ -5407,7 +5408,7 @@ if($useStore.getters && $useStore.getters.permission){ this.view = true; this.box = true; this.wid = row.id; - this.reservationActiveName ='reservationPackage' + this.reservationActiveName = 'reservationPackage'; this.getWrapdetails(this.wpage); await this.$nextTick(); @@ -5741,10 +5742,10 @@ if($useStore.getters && $useStore.getters.permission){ this.loading = true; //开启加载 console.log(this.Routid, this.Routid, '存储的ID=====================WDWADAWD'); console.log('data>>>>>>>>', this.deliverydata); - if(this.deliverydata.retention){ + if (this.deliverydata.retention) { // 滞留跳转进来的 this.deliveryId = this.deliverydata.deliveryId; //存储ID - }else{ + } else { // 商配进来的 this.deliveryId = this.deliverydata.id; //存储ID } diff --git a/src/views/distribution/inventory/distributionStockArticleDetails.vue b/src/views/distribution/inventory/distributionStockArticleDetails.vue index 4a57d395..8d0d3722 100644 --- a/src/views/distribution/inventory/distributionStockArticleDetails.vue +++ b/src/views/distribution/inventory/distributionStockArticleDetails.vue @@ -136,42 +136,44 @@ @selection="selectionChange" >