Browse Source

关务问题8.21

java8
han\hanst 5 months ago
parent
commit
efd1658f21
  1. 6
      src/api/ecss/ecss.js
  2. 7
      src/views/modules/ecss/codelnotify.vue
  3. 277
      src/views/modules/ecss/codelnotifyConfirm.vue
  4. 331
      src/views/modules/ecss/components/PackingDetailTab.vue
  5. 3
      src/views/modules/ecss/createDeclaration.vue

6
src/api/ecss/ecss.js

@ -98,6 +98,12 @@ export const saveEcssTemplateData = data => createAPI(`/ecss/coDel/saveEcssTempl
export const deleteEcssTemplate= data => createAPI(`/ecss/coDel/deleteEcssTemplate`,'post',data) export const deleteEcssTemplate= data => createAPI(`/ecss/coDel/deleteEcssTemplate`,'post',data)
// 装箱明细相关API
export const updateBoxInfo = data => createAPI(`/ecss/coDel/updateBoxInfo`,'post',data)
export const deleteBoxInfo = data => createAPI(`/ecss/coDel/deleteBoxInfo`,'post',data)
export const updateDetailInfo = data => createAPI(`/ecss/coDel/updateDetailInfo`,'post',data)
export const deleteDetailInfo = data => createAPI(`/ecss/coDel/deleteDetailInfo`,'post',data)
export const searchTemplateList = data => createAPI(`/select/ecssMapper/searchTemplateList/list`,'post',data) export const searchTemplateList = data => createAPI(`/select/ecssMapper/searchTemplateList/list`,'post',data)
export const searchWalMartOrderData = data => createAPI(`/ecss/coDel/searchWalMartOrderData`,'post',data) export const searchWalMartOrderData = data => createAPI(`/ecss/coDel/searchWalMartOrderData`,'post',data)

7
src/views/modules/ecss/codelnotify.vue

@ -177,7 +177,8 @@
<packing-detail-tab <packing-detail-tab
ref="packingDetailTab" ref="packingDetailTab"
:current-row="currentRow" :current-row="currentRow"
:height="height">
:height="height"
:show-actions="false">
</packing-detail-tab> </packing-detail-tab>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="相关文档" name="codelnotifyDocument"> <el-tab-pane label="相关文档" name="codelnotifyDocument">
@ -1001,10 +1002,10 @@
serialNumber: '801001Table1ErpDelNo', serialNumber: '801001Table1ErpDelNo',
tableId: "801001Table1", tableId: "801001Table1",
tableName: "关务系统发货通知单", tableName: "关务系统发货通知单",
columnProp: "erpDelNo",
columnProp: "walMartOrderFlag",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "ERP发货单号",
columnLabel: "沃尔玛订单",
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,

277
src/views/modules/ecss/codelnotifyConfirm.vue

@ -161,6 +161,7 @@
<el-tab-pane label="手工装箱" name="box"> <el-tab-pane label="手工装箱" name="box">
<el-button @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button> <el-button @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button>
<el-button @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button> <el-button @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button>
<el-button @click="newPalletModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'装箱'}}</el-button>
<el-button @click="palletMaintenance()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'栈板维护'}}</el-button> <el-button @click="palletMaintenance()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'栈板维护'}}</el-button>
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导出模版'}}</el-button> <el-button @click="exportExcel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导出模版'}}</el-button>
<el-table ref="detailTable" <el-table ref="detailTable"
@ -203,7 +204,8 @@
<packing-detail-tab <packing-detail-tab
ref="packingDetailTab" ref="packingDetailTab"
:current-row="currentRow" :current-row="currentRow"
:height="height">
:height="height"
:show-actions="true">
</packing-detail-tab> </packing-detail-tab>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -275,41 +277,7 @@
<el-button type="primary" @click="updateModelFlag=false">关闭</el-button> <el-button type="primary" @click="updateModelFlag=false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog title="装箱" :close-on-click-modal="false" v-drag :visible.sync="palletModelFlag" width="600px">
<el-form label-position="top" style="margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item :label="''" >
<template #label>
<span slot="label" style="" class="big-label">
<a href="#" @click="palletFlag=true">栈板</a>
</span>
</template>
<el-input v-model="palletModelData.pallet" disabled ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'栈板编号'" >
<el-input v-model="palletModelData.palletRemark" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'栈板高度(M)'" >
<el-input v-model="palletModelData.height" type="number" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'数量'" >
<el-input v-model="palletModelData.palletQty" type="number" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="savePalletHeader()">保存</el-button>
<el-button type="primary" @click="palletModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="维护箱" :close-on-click-modal="false" v-drag :visible.sync="boxModelFlag" width="500px"> <el-dialog title="维护箱" :close-on-click-modal="false" v-drag :visible.sync="boxModelFlag" width="500px">
<el-form label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
@ -357,6 +325,85 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- 装箱新增/修改栈板 -->
<el-dialog
:title="palletModelData.addFlag===1 ? '修改栈板' : '手工装箱'"
:close-on-click-modal="false"
v-drag
:visible.sync="palletModelFlag"
width="780px"
class="pallet-dialog">
<!-- 区域 1箱信息 -->
<div class="section section-header">
<h4 class="section-title">箱信息</h4>
<el-divider></el-divider>
<el-form label-position="top" class="box-info-form">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="毛重">
<el-input v-model="palletModelData.grossWeight" type="number" placeholder="请输入毛重"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="净重">
<el-input v-model="palletModelData.netWeight" type="number" placeholder="请输入净重"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="箱数">
<el-input v-model="palletModelData.boxQty" type="number" placeholder="请输入箱数"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 区域 2箱明细 -->
<div class="section section-detail">
<h4 class="section-title">箱明细</h4>
<el-divider></el-divider>
<div class="table-wrapper">
<el-table
ref="partTableRef"
:data="dataList8"
height="100%"
stripe
border
class="zxClass"
style="width: 100%;">
<el-table-column prop="pn" label="PN" min-width="120"></el-table-column>
<el-table-column prop="partDescription" label="Description" min-width="220"></el-table-column>
<el-table-column prop="qty" label="原数量" align="right" width="70"></el-table-column>
<el-table-column prop="surplusQty" label="可装箱数量" align="right" width="80"></el-table-column>
<el-table-column label="装箱数量" align="center" width="80">
<template slot-scope="scope">
<el-input v-model.number="scope.row.useQty" type="number" :min="0" :max="999999" size="mini"></el-input>
</template>
</el-table-column>
<el-table-column label="Rolls" align="center" width="80">
<template slot-scope="scope">
<el-input v-model.number="scope.row.rolls" type="number" :min="0" :max="999999" size="mini"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="70">
<template slot-scope="scope">
<a type="text" size="small" @click="fillUseQty(scope.row)">全数装箱</a>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 底部操作按钮 -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="savePalletHeader(0)">保存</el-button>
<el-button type="primary" @click="savePalletHeader(1)">保存并关闭</el-button>
<el-button @click="palletModelFlag=false">关闭</el-button>
</div>
</el-dialog>
<el-dialog title="一键装箱" :close-on-click-modal="false" v-drag :visible.sync="oneClickPackingModelFlag" width="170px"> <el-dialog title="一键装箱" :close-on-click-modal="false" v-drag :visible.sync="oneClickPackingModelFlag" width="170px">
<el-form label-position="top" style="margin-left: 7px;margin-top: 10px;"> <el-form label-position="top" style="margin-left: 7px;margin-top: 10px;">
<el-row :gutter="20"> <el-row :gutter="20">
@ -620,7 +667,7 @@
length:'', length:'',
width:'', width:'',
height:'', height:'',
volume:'',
boxQty:'',
grossWeight:'', grossWeight:'',
netWeight:'', netWeight:'',
palletRemark:'', palletRemark:'',
@ -865,10 +912,10 @@
serialNumber: '801002Table1ErpDelNo', serialNumber: '801002Table1ErpDelNo',
tableId: "801002Table1", tableId: "801002Table1",
tableName: "关务系统发货通知单", tableName: "关务系统发货通知单",
columnProp: "erpDelNo",
columnProp: "walMartOrderFlag",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "ERP发货单号",
columnLabel: "沃尔玛订单",
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -1651,17 +1698,7 @@
this.height = (window.innerHeight - 260)/2; this.height = (window.innerHeight - 260)/2;
}) })
}, },
watch: {
dataList8: {
handler() {
this.$nextTick(() => {
if(this.currentRow.buNo==='03-RFID' && this.currentRow.walMartOrderFlag==='Y') {
this.toggleSelection(this.dataList8)
}
})
},
}
},
methods: { methods: {
isPnDataIncomplete(row) { isPnDataIncomplete(row) {
const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== ''; const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== '';
@ -2028,113 +2065,81 @@
site:this.currentRow.site, site:this.currentRow.site,
buNo:this.currentRow.buNo, buNo:this.currentRow.buNo,
delNo:this.currentRow.delNo, delNo:this.currentRow.delNo,
seqNo:'',
palletNo:'',
palletQty:'',
length:'',
width:'',
height:'',
volume:'',
grossWeight:'', grossWeight:'',
netWeight:'', netWeight:'',
pallet:'',
palletRemark:'',
boxQty:'',
} }
searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => { searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
if (data && data.code == 0) { if (data && data.code == 0) {
this.dataList8 = data.rows this.dataList8 = data.rows
this.dataList8.forEach(o => {
if (!o.nocartons) {
o.nativeNocartons = Math.ceil(o.qty/(o.rollqty*o.boxrolls));
o.nocartons = Math.ceil(o.qty/(o.rollqty*o.boxrolls));
} else {
o.nativeNocartons = o.nocartons;
}
if (this.notifyDetailMap.has(o.pn)) {
this.notifyDetailMap.get(o.pn).qty=parseInt(this.notifyDetailMap.get(o.pn).qty)+parseInt(o.qty);
} else {
this.notifyDetailMap.set(o.pn, JSON.parse(JSON.stringify(o)));
}
});
this.dataList8 = this.dataList8.filter(o => parseInt(o.nocartons)>0);
} else { } else {
this.dataList8 = []; this.dataList8 = [];
} }
}); });
this.palletModelFlag=true this.palletModelFlag=true
}, },
handleSelectionChange(val) {
this.multipleSelection = val;
},
toggleSelection(rows) {
rows.forEach(row => {
this.$refs.partTableRef.toggleRowSelection(row,true);
});
fillUseQty(row) {
row.useQty = row.surplusQty || 0;
}, },
savePalletHeader(type) {
// useQty > 0
const selectedRows = this.dataList8.filter(item => item.useQty && item.useQty > 0);
savePalletHeader(){
if (this.palletModelData.addFlag===0 && this.multipleSelection.length===0) {
this.$alert('请选择装箱物料!', '错误', {
if (this.palletModelData.addFlag === 0 && selectedRows.length === 0) {
this.$alert('请至少输入一行装箱数量!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
})
return false
}
if(this.palletModelData.palletQty===''||this.palletModelData.palletQty==null){
this.$alert('请输入数量!', '错误', {
confirmButtonText: '确定'
})
return false
}
let qtyNoMatch = false;
let pn='';
if (this.currentRow.buNo==='03-RFID' && this.currentRow.walMartOrderFlag==='Y') {
let mulMap = new Map();
this.multipleSelection.forEach(o => {
o.nocartons = Math.ceil(o.qty/(o.rollqty*o.boxrolls));
if (mulMap.has(o.pn)) {
mulMap.get(o.pn).qty=parseInt(mulMap.get(o.pn).qty)+parseInt(o.qty);
} else {
mulMap.set(o.pn, JSON.parse(JSON.stringify(o)));
}
});
mulMap.forEach((value, key) => {
if (parseInt(this.notifyDetailMap.get(key).qty)!==parseInt(value.qty)) {
qtyNoMatch = true;
pn = pn+(pn?',':'')+value.pn;
}
})
} else {
this.multipleSelection.forEach(o => {
o.qty = o.nocartons*o.rollqty*o.boxrolls;
o.nocartons = o.nativeNocartons - o.nocartons;
}); });
return false;
} }
if (qtyNoMatch) {
this.$alert('PN['+pn+']原始数量和输入总数不相等!', '错误', {
// (item.qty)
const invalidRow = selectedRows.find(item => item.useQty > item.surplusQty);
if (invalidRow) {
this.$alert(`PN ${invalidRow.pn} 的装箱数量不能大于可装箱数量(${invalidRow.surplusQty})!`, '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
})
return false
});
return false;
} }
this.palletModelData.walMartOrderFlag = this.currentRow.walMartOrderFlag; this.palletModelData.walMartOrderFlag = this.currentRow.walMartOrderFlag;
this.palletModelData.notifyDetailList = this.multipleSelection;
savePalletHeader(this.palletModelData).then(({data}) => {
this.palletModelData.notifyDetailList = selectedRows;
savePalletHeader(this.palletModelData).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.palletModelFlag=false;
if (type===0) {
this.palletModelData={
addFlag:0,
site:this.currentRow.site,
buNo:this.currentRow.buNo,
delNo:this.currentRow.delNo,
grossWeight:'',
netWeight:'',
boxQty:'',
}
searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
if (data && data.code == 0) {
this.dataList8 = data.rows
} else {
this.dataList8 = [];
}
});
} else {
this.refreshCurrentTabTable()
this.palletModelFlag=false;
}
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
duration: 1500,
onClose: () => {}
})
duration: 1500
});
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
})
});
} }
})
});
}, },
deletePallet(row){ deletePallet(row){
this.$confirm('确认删除此明细?', '提示').then(() => { this.$confirm('确认删除此明细?', '提示').then(() => {
deletePalletHeader(row).then(({data}) => { deletePalletHeader(row).then(({data}) => {
@ -2473,4 +2478,20 @@
margin-bottom: 8px; margin-bottom: 8px;
color: #409EFF; color: #409EFF;
} }
.pallet-dialog .section {
margin: 10px 7px;
}
.section-title {
font-size: 14px;
font-weight: bold;
color: #333;
margin-bottom: 8px;
}
.table-wrapper {
height: 300px; /* 让表格部分固定高度并滚动 */
overflow-y: auto;
}
</style> </style>

331
src/views/modules/ecss/components/PackingDetailTab.vue

@ -45,6 +45,19 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 明细操作列 -->
<el-table-column
label="操作"
width="120"
align="center"
fixed="right"
v-if="showActions">
<template slot-scope="scope">
<a type="text" size="small" @click="handleEditDetail(scope.row, props.row)">修改</a>
<a type="text" size="small" @click="handleDeleteDetail(scope.row, props.row)">删除</a>
</template>
</el-table-column>
</el-table> </el-table>
<!-- 空数据状态 --> <!-- 空数据状态 -->
@ -72,12 +85,92 @@
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 主表格操作列 -->
<el-table-column
label="操作"
width="120"
align="center"
fixed="right"
v-if="showActions">
<template slot-scope="scope">
<a type="text" size="small" @click="handleEditBox(scope.row)">修改</a>
<a type="text" size="small" @click="handleDeleteBox(scope.row)">删除</a>
</template>
</el-table-column>
</el-table> </el-table>
<!-- 修改箱信息弹窗 -->
<el-dialog
title="修改箱信息"
:visible.sync="editBoxDialogVisible"
width="200px"
:close-on-click-modal="false">
<el-form :model="editBoxForm" ref="editBoxForm" label-position="top" label-width="100px">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="箱数" prop="box_qty">
<el-input v-model="editBoxForm.box_qty" :min="1" :precision="0" style="width: 100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="毛重" prop="grossWeight">
<el-input v-model="editBoxForm.grossWeight" :min="0" :precision="2" style="width: 100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="净重" prop="netWeight">
<el-input v-model="editBoxForm.netWeight" :min="0" :precision="2" style="width: 100%"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editBoxDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitEditBox" >确定</el-button>
</div>
</el-dialog>
<!-- 修改明细弹窗 -->
<el-dialog
title="修改明细信息"
:visible.sync="editDetailDialogVisible"
width="400px"
:close-on-click-modal="false">
<el-form :model="editDetailForm" ref="editDetailForm" label-position="top" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="PO" prop="poNo">
<el-input v-model="editDetailForm.poNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="PN" prop="pn">
<el-input v-model="editDetailForm.pn" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" prop="qty">
<el-input v-model="editDetailForm.qty" style="width: 100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="Rolls" prop="rolls">
<el-input v-model="editDetailForm.rolls" style="width: 100%"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editDetailDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitEditDetail" >确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { selectBoxList, searchCoDelPalletDataNew } from "@/api/ecss/ecss.js"
import { selectBoxList, searchCoDelPalletDataNew, updateBoxInfo, deleteBoxInfo, updateDetailInfo, deleteDetailInfo } from "@/api/ecss/ecss.js"
export default { export default {
name: "PackingDetailTab", name: "PackingDetailTab",
@ -89,6 +182,10 @@ export default {
height: { height: {
type: Number, type: Number,
default: 200 default: 200
},
showActions: {
type: Boolean,
default: true
} }
}, },
data() { data() {
@ -96,6 +193,31 @@ export default {
dataListBoxes: [], // dataListBoxes: [], //
expandedBoxRows: [], // expandedBoxRows: [], //
dataListLoading: false, dataListLoading: false,
//
editBoxDialogVisible: false,
editBoxForm: {
item_no: '',
box_qty: 1,
grossWeight: 0,
netWeight: 0
},
editBoxSubmitting: false,
currentEditBox: null,
//
editDetailDialogVisible: false,
editDetailForm: {
itemNo: '',
poNo: '',
pn: '',
qty: 1,
rolls: 0
},
editDetailSubmitting: false,
currentEditDetail: null,
currentEditBoxForDetail: null,
// //
columnList3: [ columnList3: [
{ {
@ -295,7 +417,8 @@ export default {
this.dataListBoxes = data.rows.map(row => ({ this.dataListBoxes = data.rows.map(row => ({
...row, ...row,
palletDetails: [], // palletDetails: [], //
loading: false //
loading: false, //
hadDetails: false //
})) }))
} else { } else {
this.dataListBoxes = []; this.dataListBoxes = [];
@ -352,12 +475,25 @@ export default {
if (data && data.code == 0) { if (data && data.code == 0) {
// //
this.$set(boxRow, 'palletDetails', data.rows); this.$set(boxRow, 'palletDetails', data.rows);
// box
if (data.rows.length === 0 && boxRow.hadDetails) {
//
setTimeout(() => {
this.loadBoxList();
}, 500);
}
//
this.$set(boxRow, 'hadDetails', data.rows.length > 0);
} else { } else {
this.$set(boxRow, 'palletDetails', []); this.$set(boxRow, 'palletDetails', []);
this.$set(boxRow, 'hadDetails', false);
} }
}).catch(error => { }).catch(error => {
console.error('加载栈板明细数据失败:', error); console.error('加载栈板明细数据失败:', error);
this.$set(boxRow, 'palletDetails', []); this.$set(boxRow, 'palletDetails', []);
this.$set(boxRow, 'hadDetails', false);
}).finally(() => { }).finally(() => {
// //
this.$set(boxRow, 'loading', false); this.$set(boxRow, 'loading', false);
@ -397,6 +533,197 @@ export default {
// //
refresh() { refresh() {
this.loadBoxList(); this.loadBoxList();
},
/*
* 删除逻辑说明
* 1. 删除明细时
* - 先删除明细数据
* - 检查该明细所属的box是否还有其他明细
* - 如果没有明细了自动删除对应的box
*
* 2. 删除box时
* - 先检查是否有明细数据
* - 如果有明细提示用户并同时删除所有明细和box
* - 如果没有明细直接删除box
*/
//
handleEditBox(boxRow) {
this.currentEditBox = boxRow;
this.editBoxForm.item_no = boxRow.item_no;
this.editBoxForm.box_qty = boxRow.box_qty;
this.editBoxForm.grossWeight = boxRow.grossWeight;
this.editBoxForm.netWeight = boxRow.netWeight;
this.editBoxDialogVisible = true;
},
//
handleDeleteBox(boxRow) {
// box
this.deleteBoxWithDetails(boxRow);
},
//
deleteBoxWithDetails(boxRow) {
this.$confirm(`确定要删除序号为 ${boxRow.item_no} 的箱信息吗?删除后无法恢复!`, '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
const deleteParams = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
item_no: boxRow.item_no,
palletRemark: boxRow.palletRemark
};
deleteBoxInfo(deleteParams).then(({data}) => {
if (data && data.code === 0) {
this.loadBoxList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
});
},
//
handleEditDetail(detailRow, boxRow) {
this.currentEditDetail = detailRow;
this.currentEditBoxForDetail = boxRow;
this.editDetailForm.itemNo = detailRow.itemNo;
this.editDetailForm.poNo = detailRow.poNo;
this.editDetailForm.pn = detailRow.pn;
this.editDetailForm.qty = detailRow.qty;
this.editDetailForm.rolls = detailRow.rolls;
this.editDetailDialogVisible = true;
},
//
submitEditBox() {
this.$refs.editBoxForm.validate(valid => {
if (valid) {
this.editBoxSubmitting = true;
//
const updateParams = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
item_no: this.currentEditBox.item_no,
palletRemark: this.currentEditBox.palletRemark,
box_qty: this.editBoxForm.box_qty,
grossWeight: this.editBoxForm.grossWeight,
netWeight: this.editBoxForm.netWeight,
updateBy: this.$store.state.user.name
};
updateBoxInfo(updateParams).then(({ data }) => {
if (data && data.code === 0) {
this.editBoxDialogVisible = false;
this.loadBoxList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
});
}
});
},
//
submitEditDetail() {
this.$refs.editDetailForm.validate(valid => {
if (valid) {
this.editDetailSubmitting = true;
//
const updateParams = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
seqNo: this.currentEditDetail.seqNo,
itemNo: this.currentEditDetail.itemNo,
notifyDetailItemNo: this.currentEditDetail.notifyDetailItemNo,
poNo: this.editDetailForm.poNo,
pn: this.editDetailForm.pn,
qty: this.editDetailForm.qty,
oldQty: this.currentEditDetail.qty,
rolls: this.editDetailForm.rolls,
updateBy: this.$store.state.user.name
};
updateDetailInfo(updateParams).then(({ data }) => {
if (data && data.code === 0) {
this.editDetailDialogVisible = false;
this.loadBoxList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
});
}
});
},
//
handleDeleteDetail(detailRow, boxRow) {
this.$confirm(`确定要删除这个明细信息吗?删除后无法恢复!`, '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
const deleteParams = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
seqNo: detailRow.seqNo,
itemNo: detailRow.itemNo,
notifyDetailItemNo: detailRow.notifyDetailItemNo,
partNo: detailRow.part_no,
qty: detailRow.qty
};
deleteDetailInfo(deleteParams).then(({data}) => {
if (data && data.code === 0) {
this.loadBoxList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
});
} }
} }
} }

3
src/views/modules/ecss/createDeclaration.vue

@ -135,7 +135,8 @@
<packing-detail-tab <packing-detail-tab
ref="packingDetailTab" ref="packingDetailTab"
:current-row="currentRow" :current-row="currentRow"
:height="height">
:height="height"
:show-actions="false">
</packing-detail-tab> </packing-detail-tab>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>

Loading…
Cancel
Save