From 6eaf8bcc8a4c1c3b964fab83d5df9ebd8f075f7c Mon Sep 17 00:00:00 2001 From: liuyp Date: Sat, 27 Jul 2024 11:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=8C=85=E8=AF=A6=E6=83=85=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E7=BB=84=E4=BB=B6=E5=BD=A2=E5=BC=8F=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emis/emisTmsSiteBatch/packItemDetail.vue | 210 ++++++++++++++++++ .../emis/emisTmsSiteBatch/packListView.vue | 72 +++--- 2 files changed, 249 insertions(+), 33 deletions(-) create mode 100644 src/views/emis/emisTmsSiteBatch/packItemDetail.vue diff --git a/src/views/emis/emisTmsSiteBatch/packItemDetail.vue b/src/views/emis/emisTmsSiteBatch/packItemDetail.vue new file mode 100644 index 00000000..c5fa4f91 --- /dev/null +++ b/src/views/emis/emisTmsSiteBatch/packItemDetail.vue @@ -0,0 +1,210 @@ + + + + + + diff --git a/src/views/emis/emisTmsSiteBatch/packListView.vue b/src/views/emis/emisTmsSiteBatch/packListView.vue index fa4948b1..ae793fce 100644 --- a/src/views/emis/emisTmsSiteBatch/packListView.vue +++ b/src/views/emis/emisTmsSiteBatch/packListView.vue @@ -16,11 +16,12 @@ :row-class-name="disabledRow" :showCustomizeTpl="false" > - + @@ -148,9 +150,11 @@ import { listEmisTmsPackDtl, delEmisTmsPackDtl, addEmisTmsPackDtl } from "@/api/ import { parseTime, dateToStr } from "@/utils/custom"; import { formatSearchStr } from '@/utils/index' import { PageSizes } from "pdf-lib"; +import PackItemDetail from '@/views/emis/emisTmsSiteBatch/packItemDetail'; export default { name: "PackListView", + components: { PackItemDetail }, props:{ propParams: {}, propType: "", @@ -176,7 +180,7 @@ export default { showType: "pack", // 合包明细 - emisTmsDonePackList:{}, + emisTmsDonePackList:[], currentExpandedRow: null, @@ -268,34 +272,35 @@ export default { }, // 打开表格扩展 expandChange(row, expandedRows){ - if(expandedRows.length==0){// 没有扩展的行 - this.currentExpandedRow = null; - return; - } - if(this.currentExpandedRow && expandedRows.length == 1 && expandedRows[0].packNo == this.currentExpandedRow.packNo){// 已经查询过了 - return; - } - this.loading = true; - this.currentExpandedRow = row; - this.emisTmsDonePackList=[]; - listEmisTmsPackDtl({packNo: row.packNo}).then(resList => { - if(!resList || resList.code != 200){ - this.$message.error(resList && resList.msg || "未知错误"); - return; - } - for(let p = 0; p < resList.rows.length;p++){ - this.emisTmsDonePackList.push(resList.rows[p].waybillDetail); - } - this.doneTotal = resList.total; - this.loading = false; - }); - if(expandedRows.length > 1){ - for(let i = 0; i < expandedRows.length; i++){ - if(row.packNo != expandedRows[i].packNo){ - this.$refs.table.$refs.table.$refs.elTable.toggleRowExpansion(expandedRows[i], false); - } - } - } + // if(expandedRows.length==0){// 没有扩展的行 + // this.currentExpandedRow = null; + // return; + // } + // if(this.currentExpandedRow && expandedRows.length == 1 && expandedRows[0].packNo == this.currentExpandedRow.packNo){// 已经查询过了 + // return; + // } + // this.loading = true; + // this.currentExpandedRow = row; + // this.emisTmsDonePackList=[]; + // listEmisTmsPackDtl({packNo: row.packNo}).then(resList => { + // if(!resList || resList.code != 200){ + // this.$message.error(resList && resList.msg || "未知错误"); + // return; + // } + // for(let p = 0; p < resList.rows.length;p++){ + // resList.rows[p].waybillDetail.billCodeL = resList.rows[p].billCode; + // this.emisTmsDonePackList.push(resList.rows[p].waybillDetail); + // } + // this.doneTotal = resList.total; + // this.loading = false; + // }); + // if(expandedRows.length > 1){ + // for(let i = 0; i < expandedRows.length; i++){ + // if(row.packNo != expandedRows[i].packNo){ + // this.$refs.table.$refs.table.$refs.elTable.toggleRowExpansion(expandedRows[i], false); + // } + // } + // } }, // 查询合包明细表 @@ -315,6 +320,7 @@ export default { this.emisTmsDonePackList = []; for(let p = 0; p < resList.rows.length;p++){ let obj = {...resList.rows[p].waybillDetail}; + obj.billCodeL = resList.rows[p].billCode; obj.packNo = resList.rows[p].packNo; this.emisTmsDonePackList.push(obj); }