diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js index c7a0c9c..a195844 100644 --- a/src/api/ecss/ecss.js +++ b/src/api/ecss/ecss.js @@ -42,3 +42,9 @@ export const deleteHsCode= data => createAPI(`/ecss/coDel/deleteHsCode`,'post',d export const searchCoDelPalletData= data => createAPI(`/ecss/coDel/searchCoDelPalletData`,'post',data) export const saveCoDelPalletDataByExcel= data => createAPI(`/ecss/coDel/saveCoDelPalletDataByExcel`,'post',data) +export const searchEcssCoDelPalletHeaderData= data => createAPI(`/ecss/coDel/searchEcssCoDelPalletHeaderData`,'post',data) +export const searchEcssCoDelPalletDetailData= data => createAPI(`/ecss/coDel/searchEcssCoDelPalletDetailData`,'post',data) +export const savePalletHeader = data => createAPI(`/ecss/coDel/savePalletHeader`,'post',data) +export const deletePalletHeader = data => createAPI(`/ecss/coDel/deletePalletHeader`,'post',data) +export const savePalletDetail = data => createAPI(`/ecss/coDel/savePalletDetail`,'post',data) +export const deletePalletDetail = data => createAPI(`/ecss/coDel/deletePalletDetail`,'post',data) diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index b322119..68bfc32 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -132,7 +132,7 @@ - + {{'导入装箱单'}} + + {{'创建栈板'}} + + + + + + + + + + + + + + + + + + + + + + + + + {{'新增箱'}} + + + + + + + + + + + + + + + 关闭 + + + @@ -200,10 +299,94 @@ 保存 - 关闭 + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 - @@ -219,6 +402,12 @@ confirmEcssDel, cancerConfirmEcssDel, searchCoDelPalletData, + searchEcssCoDelPalletHeaderData, + searchEcssCoDelPalletDetailData, + savePalletHeader, + deletePalletHeader, + savePalletDetail, + deletePalletDetail, }from "@/api/ecss/ecss.js" import {getAllBuList}from '@/api/factory/site.js' export default { @@ -236,7 +425,16 @@ dataList:[], dataList2:[], dataList3:[], + dataList4:[], + dataList5:[], + boxDetailData:{ + site:'', + buNo:'', + delNo:'', + seqNo:'', + }, dataListLoading: false, + boxDetailModelFlag: false, searchData: { page: 1, limit: 100, @@ -248,6 +446,39 @@ endDate:'', username:this.$store.state.user.name, }, + palletModelFlag:false, + palletModelData:{ + addFlag:0, + site:'', + buNo:'', + delNo:'', + seqNo:'', + palletNo:'', + palletQty:'', + length:'', + width:'', + height:'', + volume:'', + grossWeight:'', + netWeight:'', + palletRemark:'', + + }, + boxModelFlag:false, + boxModelData:{ + addFlag:0, + site:'', + buNo:'', + delNo:'', + seqNo:'', + itemNo:'', + partNo:'', + qty:'', + poNo:'', + boxQty:'', + rolls:'', + + }, buttons:{ search:'查询', }, @@ -1207,6 +1438,226 @@ columnWidth: 50 }, ], + columnList4:[ + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4SeqNo', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "seqNo", + headerAlign: "center", + align: "right", + columnLabel: "序号", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 40 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4PalletRemark', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "palletRemark", + headerAlign: "center", + align: "left", + columnLabel: "栈板码", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4PalletQty', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "palletQty", + headerAlign: "center", + align: "right", + columnLabel: "数量", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4Length', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "length", + headerAlign: "center", + align: "right", + columnLabel: "长(M)", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4Width', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "width", + headerAlign: "center", + align: "right", + columnLabel: "宽(M)", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4Height', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "height", + headerAlign: "center", + align: "right", + columnLabel: "高(M)", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4GrossWeight', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "grossWeight", + headerAlign: "center", + align: "right", + columnLabel: "毛重", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table4NetWeight', + tableId: "801002Table4", + tableName: "装箱栈板主表", + columnProp: "netWeight", + headerAlign: "center", + align: "right", + columnLabel: "净重", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 50 + }, + ], + columnList5:[ + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table5PartNo', + tableId: "801002Table5", + tableName: "栈板装箱明细", + columnProp: "partNo", + headerAlign: "center", + align: "left", + columnLabel: "物料编码", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table5Qty', + tableId: "801002Table5", + tableName: "栈板装箱明细", + columnProp: "qty", + headerAlign: "center", + align: "right", + columnLabel: "数量", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table5BoxQty', + tableId: "801002Table5", + tableName: "栈板装箱明细", + columnProp: "boxQty", + headerAlign: "center", + align: "right", + columnLabel: "箱数", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70 + }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table5Rolls', + tableId: "801002Table5", + tableName: "栈板装箱明细", + columnProp: "rolls", + headerAlign: "center", + align: "right", + columnLabel: "Rolls", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70 + }, + ], currentRow:{}, } }, @@ -1255,7 +1706,7 @@ }, refreshCurrentTabTable(){ if(this.currentRow===''||this.currentRow===null){ - this.currentRow={site:'',delNo:''} + this.currentRow={site:'',delNo:'',notifyStatus:''} } if(this.activeName==='detail'){ searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => { @@ -1279,6 +1730,17 @@ } }); } + if(this.activeName==='box'){ + searchEcssCoDelPalletHeaderData(this.currentRow).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code == 0) { + this.dataList4 = data.rows + + } else { + this.dataList4 = []; + } + }); + } }, tabClick (tab, event) { // 刷新列表数据 @@ -1337,6 +1799,12 @@ this.confirmModelFlag=true }, upLoadPallet(){ + if(this.dataList3.length>0){ + this.$alert('已经有明细无法再次导入请去手工装箱全部删除!', '错误', { + confirmButtonText: '确定' + }) + return false + } if(this.currentRow.site===''||this.currentRow.site==null){ this.$alert('请先选择发货通知单!', '错误', { confirmButtonText: '确定' @@ -1362,6 +1830,182 @@ searchPalletTable(){ this.refreshCurrentTabTable(); }, + boxDetailModel(row){ + this.boxDetailData=row + searchEcssCoDelPalletDetailData(row).then(({data}) => { + if (data.code === 0) { + this.dataList5 = data.rows + } + }) + this.boxDetailModelFlag=true + }, + updatePalletModel(row){ + this.palletModelData=JSON.parse(JSON.stringify(row)) + this.palletModelData.addFlag=1 + this.palletModelFlag=true + }, + newPalletModel(){ + if(this.currentRow.site===''||this.currentRow.site==null){ + this.$alert('请先选择发货通知单!', '错误', { + confirmButtonText: '确定' + }) + return false + } + this.palletModelData={ + addFlag:0, + site:this.currentRow.site, + buNo:this.currentRow.buNo, + delNo:this.currentRow.delNo, + seqNo:'', + palletNo:'', + palletQty:'', + length:'', + width:'', + height:'', + volume:'', + grossWeight:'', + netWeight:'', + palletRemark:'', + } + this.palletModelFlag=true + }, + savePalletHeader(){ + if(this.palletModelData.palletQty===''||this.palletModelData.palletQty==null){ + this.$alert('请输入数量!', '错误', { + confirmButtonText: '确定' + }) + return false + } + if(this.palletModelData.grossWeight===''||this.palletModelData.grossWeight==null){ + this.$alert('请输入毛重!', '错误', { + confirmButtonText: '确定' + }) + return false + } + if(this.palletModelData.netWeight===''||this.palletModelData.netWeight==null){ + this.$alert('请输入净重!', '错误', { + confirmButtonText: '确定' + }) + return false + } + savePalletHeader(this.palletModelData).then(({data}) => { + if (data && data.code === 0) { + this.refreshCurrentTabTable() + this.palletModelFlag=false; + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + + }, + deletePallet(row){ + this.$confirm('确认删除此明细?', '提示').then(() => { + deletePalletHeader(row).then(({data}) => { + if (data && data.code === 0) { + this.refreshCurrentTabTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + + updateBoxModel(row){ + this.boxModelData=JSON.parse(JSON.stringify(row)) + this.boxModelData.addFlag=1 + this.boxModelFlag=true + }, + newBoxModel(){ + this.boxModelData={ + addFlag:0, + site:this.boxDetailData.site, + buNo:this.boxDetailData.buNo, + delNo:this.boxDetailData.delNo, + seqNo:this.boxDetailData.seqNo, + itemNo:'', + partNo:'', + qty:'', + poNo:'', + boxQty:'', + rolls:'', + } + this.boxModelFlag=true + }, + saveBoxHeader(){ + if(this.boxModelData.partNo===''||this.boxModelData.partNo==null){ + this.$alert('请输入物料!', '错误', { + confirmButtonText: '确定' + }) + return false + } + if(this.boxModelData.qty<=0||this.boxModelData.qty==null){ + this.$alert('请输入数量!', '错误', { + confirmButtonText: '确定' + }) + return false + } + + savePalletDetail(this.boxModelData).then(({data}) => { + if (data && data.code === 0) { + searchEcssCoDelPalletDetailData(this.boxDetailData).then(({data}) => { + if (data.code === 0) { + this.dataList5 = data.rows + } + }) + this.boxModelFlag=false; + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + + }, + deleteBox(row){ + this.$confirm('确认删除此明细?', '提示').then(() => { + deletePalletDetail(row).then(({data}) => { + if (data && data.code === 0) { + searchEcssCoDelPalletDetailData(this.boxDetailData).then(({data}) => { + if (data.code === 0) { + this.dataList5 = data.rows + } + }) + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + } }, created() { this.getBu ()