From 331399a77ab8faea8ab48439063aac3de6888658 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 5 Aug 2024 14:54:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=9C=E5=A9=B7=E7=8E=B0=E5=9C=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9A=E6=89=93=E5=8D=B0=E6=A0=87=E7=AD=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E6=9C=AC=E5=9C=B0=E7=89=A9=E6=96=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchTable/src/SearchTable.vue | 12 ++++-- .../purchasereceiptRequestMain/index.vue | 42 ++++++++++++++++++- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 64e3f6b7e..38336acc4 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -93,7 +93,7 @@ const tableObjectRef = ref() const getPage: any = ref() const searchSchema = ref() const tableColumns = ref() -const formFieldRef = ref() +const formFieldRef = ref('') const searchFieldRef = ref() const typeRef = ref() const rowRef = ref() @@ -102,6 +102,10 @@ const searchConditionRef = ref() const searchTableSelectionsList = ref() //表格弹窗回显的列表 const searchQuery = ref(false) const hiddenFilterBtn = ref(false) +const updateData = (list:any)=>{ + tableObjectRef.value.tableList = list + searchTableRef.value.clearSelection() +} const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => { dialogWidth.value = '80%' multipleBol.value = multiple @@ -110,10 +114,10 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any defaultButtons.defaultWhenPageBtn(null), // 选择当页 defaultButtons.defaultUnselectPageBtn(null), // 反选当页 // defaultButtons.defaultDeselectAllBtn(null), // 取消全选 - defaultButtons.defaultFilterBtn(null) // 筛选 + // defaultButtons.defaultFilterBtn(null) // 筛选 ] : [ - defaultButtons.defaultFilterBtn(null) // 筛选 + // defaultButtons.defaultFilterBtn(null) // 筛选 ] dialogTitle.value = t(`ts.${titleName}`).replace('ts.', '') tableObjectRef.value = tableObject @@ -238,7 +242,7 @@ const buttonBaseClick = (val, item) => { } -defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // 提供 open 方法,用于打开弹窗 +defineExpose({ open,openData,updateData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // 提供 open 方法,用于打开弹窗 // Table 组件 ref const searchTableRef = ref() diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index d34af2d33..d6396821a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -128,7 +128,23 @@ :isShowFooterButtton="false" /> - + + + { + printItemCode.value = printItemCode.value.trim() + if(printItemCode.value == ''){ + searchTableRef.value.updateData(printTableList.value) + }else{ + console.log(printItemCode.value) + let printItemCodes = printItemCode.value.split(',') + console.log(printItemCodes) + let itemCodesList = printTableList.value.filter(item=>!!printItemCodes.find(item1=>item['itemCode']==item1)) + searchTableRef.value.updateData(itemCodesList) + } + +} +const resetPrint = ()=>{ + printItemCode.value = '' + searchPrint() +} const labelPrint = async (row) => { tableObject.loading = true const defaultParams = {'moduleName':'purchasereceipt_request','recordNumber':row.asnNumber} @@ -488,12 +525,13 @@ const labelPrint = async (row) => { // 获得表格的各种操作 const { getList:getListPrint } = tableMethods - getListPrint() + await getListPrint() tableObject.loading = false const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns tableColumns.forEach((item) => { item.width = item.table?.width }) + printTableList.value = JSON.parse(JSON.stringify(tableObjectPrint.tableList)) searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) }