diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js index c6c3874..df87e9c 100644 --- a/src/api/ecss/ecss.js +++ b/src/api/ecss/ecss.js @@ -48,6 +48,8 @@ export const searchCoDelPalletData= data => createAPI(`/ecss/coDel/searchCoDelPa export const searchCoDelPalletDataNew= data => createAPI(`/ecss/coDel/searchCoDelPalletDataNew`,'post',data) +export const selectBoxList = data => createAPI(`/ecss/coDel/selectBoxList`,'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) diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue index 0c9568b..a45295c 100644 --- a/src/views/modules/ecss/codelnotify.vue +++ b/src/views/modules/ecss/codelnotify.vue @@ -57,20 +57,6 @@ {{'导入'}} {{'导出'}} - {{'导出发票'}} @@ -172,40 +158,11 @@ - - - - - - - - - - - - - - {{ scope.row[item.columnProp] }} - - - - - + + { - //区分请求成功和失败的状况 - if (data && data.code == 0) { - this.dataList3 = data.rows - - } else { - this.dataList3 = []; - } - }); + // 刷新装箱明细组件 + if (this.$refs.packingDetailTab) { + this.$refs.packingDetailTab.refresh(); + } } }, tabClick (tab, event) { diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index 7b5c650..9a5ff42 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -135,17 +135,7 @@ - - - - - - - - - - - + @@ -153,7 +143,6 @@ {{'一键装箱'}} {{'导入装箱单'}} {{'栈板维护'}} - {{'导出模版'}} - - 修改 删除 @@ -194,103 +181,14 @@ - - - - 修改 - - - - - {{ scope.row[item.columnProp] }} - - - - - + + - - - - - - - - - - - - - - - - {{'新增箱'}} - - - - - - - - - 修改 - 删除 - - - - - {{ scope.row[item.columnProp] }} - - - - - - 关闭 - - - @@ -388,64 +286,6 @@ - - - - - 复制 - 删除 - - - - - - - - - - - - {{scope.row.qty}} - - - - - {{scope.row.nocartons}} - - - - 保存 关闭 @@ -503,7 +343,7 @@ - 是否显示零数箱 + 是否显示零数箱 @@ -514,42 +354,53 @@ - + + + 栈板维护 + + + 栈板维护功能说明: + • 系统会自动加载当前BU下的所有栈板 + • 栈板高度单位为米(M),请输入准确数值 + • 只有托数大于0的栈板记录才会被保存 + + + + - - 栈板记录: - 添加行 - - - - 选择 - - + - - - + + + 栈板高度(M) - - - + - + + + 托数 + - 删除 + - 暂无栈板记录,请点击"添加行"按钮添加 + 正在加载栈板记录... + + + + + + 提示:托数大于0的记录才会被保存。 @@ -657,14 +508,15 @@ import Chooselist from '@/views/modules/common/Chooselist_eam' import {} from "@/api/sysLanguage.js" import palletUploadExcel from "./pallet_upload_excel.vue"; + import PackingDetailTab from "./components/PackingDetailTab.vue"; import { searchEcssCoDelNotifyHeaderForCK, searchEcssCoDelNotifyDetail, confirmEcssDel, updateEcssDel, cancerConfirmEcssDel, - searchCoDelPalletData, searchCoDelPalletDataNew, + searchEcssCoDelPalletHeaderData, searchEcssCoDelPalletDetailData, savePalletHeader, @@ -685,11 +537,11 @@ components:{ palletUploadExcel, Chooselist, + PackingDetailTab, }, data() { return { multipleSelection: [], - oneOrAll:'1', palletFlag:false, palletList:[], palletData:{}, @@ -733,13 +585,10 @@ oneClickPackingModelData:{ boxRemnant: false, }, - // 一键装箱栈板记录 - oneClickPalletRecords: [], - currentOneClickPalletIndex: -1, // 当前选择栈板的行索引 + // 栈板维护相关 palletMaintenanceModelFlag: false, palletMaintenanceRecords: [], - currentPalletMaintenanceIndex: -1, // 当前选择栈板的行索引 palletModelFlag:false, palletModelData:{ addFlag:0, @@ -1479,24 +1328,6 @@ fixed: '', columnWidth: 100 }, - // { - // userId: this.$store.state.user.name, - // functionId: 801002, - // serialNumber: '801002Table2ErpDelItemNo', - // tableId: "801002Table2", - // tableName: "关务系统发货通知单明细", - // columnProp: "erpDelItemNo", - // headerAlign: "center", - // align: "right", - // columnLabel: "ERP发货单行号", - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // columnWidth: 60 - // }, { userId: this.$store.state.user.name, functionId: 801002, @@ -1535,42 +1366,6 @@ fixed: '', columnWidth: 40 }, - { - userId: this.$store.state.user.name, - functionId: 801002, - serialNumber: '801002Table3PalletRemark', - tableId: "801002Table3", - tableName: "装箱明细", - columnProp: "palletRemark", - headerAlign: "center", - align: "left", - columnLabel: "栈板码", - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 60 - }, - { - userId: this.$store.state.user.name, - functionId: 801002, - serialNumber: '801002Table3PalletQty', - tableId: "801002Table3", - tableName: "装箱明细", - columnProp: "palletQty", - 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, @@ -1625,24 +1420,6 @@ fixed: '', columnWidth: 50 }, - { - userId: this.$store.state.user.name, - functionId: 801002, - serialNumber: '801002Table3BoxQty', - tableId: "801002Table3", - tableName: "装箱明细", - columnProp: "boxQty", - 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, @@ -1661,115 +1438,8 @@ fixed: '', columnWidth: 50 }, - { - userId: this.$store.state.user.name, - functionId: 801002, - serialNumber: '801002Table3Length', - tableId: "801002Table3", - 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: '801002Table3Width', - tableId: "801002Table3", - 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: '801002Table3Height', - tableId: "801002Table3", - 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: '801002Table3Volume', - tableId: "801002Table3", - tableName: "装箱明细", - columnProp: "volume", - 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: '801002TableGrossWeight', - tableId: "801002Table3", - 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: '801002TableNetWeight', - tableId: "801002Table3", - tableName: "装箱明细", - columnProp: "netWeight", - headerAlign: "center", - align: "right", - columnLabel: "净重", - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 50 - }, ], + columnList4:[ { userId: this.$store.state.user.name, @@ -1879,42 +1549,6 @@ 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:[ { @@ -2128,15 +1762,10 @@ }); } if(this.activeName==='pallet'){ - searchCoDelPalletDataNew(this.currentRow).then(({data}) => { - //区分请求成功和失败的状况 - if (data && data.code == 0) { - this.dataList3 = data.rows - - } else { - this.dataList3 = []; - } - }); + // 刷新装箱明细组件 + if (this.$refs.packingDetailTab) { + this.$refs.packingDetailTab.refresh(); + } } if(this.activeName==='box'){ searchEcssCoDelPalletHeaderData(this.currentRow).then(({data}) => { @@ -2156,12 +1785,6 @@ }, confirmDo(){ - /* if (!this.confirmModel.notifyDate) { - this.$alert('请选择预计发货日期!', '错误', { - confirmButtonText: '确定' - }) - return false - } */ confirmEcssDel(this.confirmModel).then(({data}) => { if (data && data.code === 0) { this.searchTable() @@ -2251,24 +1874,12 @@ }) }, upLoadPallet(){ - /* if(this.dataList3.length>0){ - this.$alert('已经有明细无法再次导入请去手工装箱全部删除!', '错误', { - confirmButtonText: '确定' - }) - return false - } */ if(this.currentRow.site===''||this.currentRow.site==null){ this.$alert('请先选择发货通知单!', '错误', { confirmButtonText: '确定' }) return false } - /*if(this.currentRow.walMartOrderFlag==='Y'){ - this.$alert('沃尔玛订单暂时无法导入装箱清单!', '错误', { - confirmButtonText: '确定' - }) - return false - }*/ let inData={ site:this.currentRow.site, buNo:this.currentRow.buNo, @@ -2353,7 +1964,6 @@ this.palletModelFlag=true }, newPalletModel(){ - this.oneOrAll=1; if(this.currentRow.site===''||this.currentRow.site==null){ this.$alert('请先选择发货通知单!', '错误', { confirmButtonText: '确定' @@ -2408,19 +2018,7 @@ this.$refs.partTableRef.toggleRowSelection(row,true); }); }, - // 装箱复制明细行 - copyColumn(row){ - let copyrow = JSON.parse(JSON.stringify(row)); - copyrow.qty=0; - copyrow.nocartons=0; - copyrow.newRow=1; - this.dataList8.push(copyrow); - this.toggleSelection(this.dataList8) - }, - deleteColumn(index){ - this.dataList8.splice(index,1); - this.toggleSelection(this.dataList8) - }, + savePalletHeader(){ if (this.palletModelData.addFlag===0 && this.multipleSelection.length===0) { this.$alert('请选择装箱物料!', '错误', { @@ -2570,53 +2168,17 @@ } }) }, - 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: '确定' - }) - } - }) - }) - }, + oneClickPacking(){ - this.oneOrAll = 2; if(this.currentRow.site===''||this.currentRow.site==null){ this.$alert('请先选择发货通知单!', '错误', { confirmButtonText: '确定' }) return false } - /* if(this.dataList4.length>0){ - this.$alert('已存在装箱数据,不可一键装箱!', '错误', { - confirmButtonText: '确定' - }) - return false - } */ this.oneClickPackingModelData={ boxRemnant: false, } - // 重置栈板记录并默认添加一行 - this.oneClickPalletRecords = [] - this.oneClickPalletRecords.push({ - pallet: '', - palletQty: '', - height: '' - }) this.oneClickPackingModelFlag=true }, saveOneClickPacking(){ @@ -2625,9 +2187,7 @@ buNo: this.currentRow.buNo, delNo: this.currentRow.delNo, boxRemnant: this.oneClickPackingModelData.boxRemnant, - palletRecords: JSON.stringify(this.oneClickPalletRecords) } - saveOneClickPacking(saveData).then(({data}) => { if (data && data.code === 0) { this.refreshCurrentTabTable() @@ -2646,24 +2206,6 @@ }) }, - // 一键装箱栈板记录相关方法 - addOneClickPalletRecord() { - this.oneClickPalletRecords.push({ - pallet: '', - palletQty: '', - height: '' - }) - }, - - removeOneClickPalletRecord(index) { - this.oneClickPalletRecords.splice(index, 1) - }, - - selectOneClickPallet(index) { - this.currentOneClickPalletIndex = index - this.palletFlag = true - }, - openPalletDialog () { //请求 this.searchPalletList(); @@ -2673,7 +2215,7 @@ this.palletFlag = false }, searchPalletList () { - this.palletData.buNo = (this.oneOrAll===2 || this.oneOrAll===3)?this.currentRow.buNo:this.palletModelData.buNo + this.palletData.buNo = this.palletModelData.buNo searchPalletList(this.palletData).then(({data}) => { if (data && data.code === 0){ this.palletList = data.rows; @@ -2681,77 +2223,75 @@ }) }, palletRowDblclick (row) { - if (this.oneOrAll===2) { - // 一键装箱栈板选择 - if (this.currentOneClickPalletIndex >= 0) { - this.oneClickPalletRecords[this.currentOneClickPalletIndex].pallet = row.palletNo - } - } else if (this.oneOrAll===3) { - // 栈板维护栈板选择 - if (this.currentPalletMaintenanceIndex >= 0) { - this.palletMaintenanceRecords[this.currentPalletMaintenanceIndex].pallet = row.palletNo - } - } else { - this.palletModelData.pallet = row.palletNo - } + this.palletModelData.pallet = row.palletNo this.palletFlag = false }, // 栈板维护相关方法 palletMaintenance() { - this.oneOrAll = 3; if(this.currentRow.site===''||this.currentRow.site==null){ this.$alert('请先选择发货通知单!', '错误', { confirmButtonText: '确定' }) return false } - - // 重置栈板记录并默认添加一行 + // 重置栈板记录 this.palletMaintenanceRecords = [] - this.palletMaintenanceRecords.push({ - pallet: '', - palletQty: '', - height: '' - }) + // 默认根据buNo获取全部栈板 + this.loadAllPalletsForMaintenance() this.palletMaintenanceModelFlag = true }, - addPalletMaintenanceRecord() { - this.palletMaintenanceRecords.push({ - pallet: '', - palletQty: '', - height: '' + // 根据buNo加载全部栈板用于维护 + loadAllPalletsForMaintenance() { + let searchData = { + palletType: '', // 不限制栈板类型,获取全部 + buNo: this.currentRow.buNo + } + searchPalletList(searchData).then(({data}) => { + if (data.code === 0) { + const pallets = data.rows || [] + // 为每个栈板创建一条记录 + this.palletMaintenanceRecords = pallets.map(pallet => ({ + pallet: pallet.palletNo, + palletQty: '', // 默认为空,用户需要输入 + height: '' // 使用栈板的默认高度 + })) + } + }).catch(error => { + console.error('加载栈板列表失败:', error) + // 如果加载失败,至少添加一行空记录 + this.palletMaintenanceRecords = [{ + pallet: '', + palletQty: '', + height: '' + }] }) }, - removePalletMaintenanceRecord(index) { - this.palletMaintenanceRecords.splice(index, 1) - }, - - selectPalletMaintenance(index) { - this.currentPalletMaintenanceIndex = index - this.palletFlag = true - }, - savePalletMaintenance() { - // 验证栈板记录 - for (let i = 0; i < this.palletMaintenanceRecords.length; i++) { - const record = this.palletMaintenanceRecords[i] + // 过滤出托数大于0的栈板记录 + const validPalletRecords = this.palletMaintenanceRecords.filter(record => { + return record.palletQty && parseFloat(record.palletQty) > 0 + }) + + if (validPalletRecords.length === 0) { + this.$alert('请至少输入一条有效的栈板记录!', '错误', { + confirmButtonText: '确定' + }) + return false + } + // 验证有效的栈板记录 + for (let i = 0; i < validPalletRecords.length; i++) { + const record = validPalletRecords[i] if (!record.pallet) { - this.$alert(`第${i + 1}行栈板不能为空!`, '错误', { - confirmButtonText: '确定' - }) - return false - } - if (!record.palletQty || record.palletQty <= 0) { - this.$alert(`第${i + 1}行托数必须大于0!`, '错误', { + this.$alert(`栈板不能为空!`, '错误', { confirmButtonText: '确定' }) return false } if (!record.height || record.height <= 0) { - this.$alert(`第${i + 1}行栈板高度必须大于0!`, '错误', { + this.$alert(`栈板高度必须大于0!`, '错误', { confirmButtonText: '确定' }) return false @@ -2763,7 +2303,7 @@ site: this.currentRow.site, buNo: this.currentRow.buNo, delNo: this.currentRow.delNo, - palletRecords: JSON.stringify(this.palletMaintenanceRecords), + palletRecords: JSON.stringify(validPalletRecords), } // 使用相同的API,但传递maintenanceOnly标识 @@ -2784,6 +2324,10 @@ } }) }, + + + + }, activated() { this.searchTable() @@ -2800,4 +2344,44 @@ font-size: 12px; height: 24px; } + +/* 对话框标题样式 */ +.dialog-title { + display: flex; + align-items: center; + font-size: 16px; + font-weight: 500; +} + +.dialog-title .el-icon-question:hover { + color: #66b1ff; + transform: scale(1.1); + transition: all 0.3s ease; +} + +/* 表格头部提示图标样式 */ +/deep/ .el-table th .el-icon-question:hover { + color: #409EFF; + transform: scale(1.1); + transition: all 0.2s ease; +} + +/* 提示框内容样式 */ +/deep/ .el-tooltip__popper { + max-width: 300px; +} + +/deep/ .el-tooltip__popper .el-tooltip__content { + line-height: 1.6; +} + +/deep/ .el-tooltip__popper .el-tooltip__content div { + margin-bottom: 4px; +} + +/deep/ .el-tooltip__popper .el-tooltip__content div:first-child { + font-weight: bold; + margin-bottom: 8px; + color: #409EFF; +} diff --git a/src/views/modules/ecss/components/PackingDetailTab.vue b/src/views/modules/ecss/components/PackingDetailTab.vue new file mode 100644 index 0000000..4addb84 --- /dev/null +++ b/src/views/modules/ecss/components/PackingDetailTab.vue @@ -0,0 +1,512 @@ + + + + + + + + + 正在加载明细数据... + + + + + + + + + + {{ formatDetailValue(scope.row[item.columnProp], item.columnProp) }} + + + + + + + + + + + + 暂无明细数据 + 该栈板下暂时没有装箱明细信息 + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + diff --git a/src/views/modules/ecss/createDeclaration.vue b/src/views/modules/ecss/createDeclaration.vue index b47a707..f6d6dbd 100644 --- a/src/views/modules/ecss/createDeclaration.vue +++ b/src/views/modules/ecss/createDeclaration.vue @@ -132,30 +132,11 @@ - - - - {{ scope.row[item.columnProp] }} - - - - - + + @@ -497,6 +478,7 @@
暂无明细数据