From cfb19a6d3f14ebb06b3588e8db94837d069edb59 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 29 Apr 2024 10:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptRequestMain/index.vue | 44 ++++++------------- .../index.vue | 44 ++++++------------- 2 files changed, 26 insertions(+), 62 deletions(-) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 45913aa6a..1c32efa9a 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -680,42 +680,24 @@ const handlePoint = async (row) => { const searchTableRef = ref() // const labelPrint = async (row) => { - console.log("------------",row); tableObject.loading = true - const subTableDFata = await PackageApi.getLabel(row.masterId) - tableObject.loading = false - const tableObject1 = { - // 当前页 - currentPage: 1, - // 导出加载中 - exportLoading: false, - // 加载中 - loading: false, - // 页数 - pageSize: subTableDFata.length, - params:null, - // 排序 - sort: { - order: '', // 排序规则 - prop: '' // 排序字段 - }, - // 总条数 - total: subTableDFata.length, - // 表格数据 - tableList: subTableDFata, - currentRow:null - } - console.log("标签打印",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas) + const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number} + const {tableObject:tableObjectPrint ,tableMethods} = useTable({ + defaultParams, + getListApi: PackageApi.getLabelDetailPage // 分页接口 + }) + // 获得表格的各种操作 + const { getList:getListPrint } = tableMethods + getListPrint() + tableObject.loading = false const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns - tableColumns.forEach((item) => { item.width = item.table?.width || 150 }) - searchTableRef.value.openData("标签信息",tableObject1,{tableColumns},true) - - // window.open(src.value + '&asn_number=' + row.asnNumber) + searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) } + // 批量打印--预生产收货 const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => { console.log('批量打印',val) @@ -733,10 +715,10 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r console.log(res) if (labelType.value == 'cg') { const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) - window.open(src.value+'&request_number='+res) + window.open(src.value+'&asn_number='+res) } else { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) - window.open(src.value+'&request_number='+res) + window.open(src.value+'&asn_number='+res) } }).catch(err => { console.log(err) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 743c1eccd..e0ede38f8 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -674,42 +674,24 @@ const handlePoint = async (row) => { } } const searchTableRef = ref() +// const labelPrint = async (row) => { - console.log("------------",row); tableObject.loading = true - const subTableDFata = await PackageApi.getLabel(row.masterId) - tableObject.loading = false - const tableObject1 = { - // 当前页 - currentPage: 1, - // 导出加载中 - exportLoading: false, - // 加载中 - loading: false, - // 页数 - pageSize: subTableDFata.length, - params:null, - // 排序 - sort: { - order: '', // 排序规则 - prop: '' // 排序字段 - }, - // 总条数 - total: subTableDFata.length, - // 表格数据 - tableList: subTableDFata, - currentRow:null - } - console.log("标签打印",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas) + const defaultParams = {'moduleName':'productreceipt_assemble','recordNumber':row.number} + const {tableObject:tableObjectPrint ,tableMethods} = useTable({ + defaultParams, + getListApi: PackageApi.getLabelDetailPage // 分页接口 + }) + // 获得表格的各种操作 + const { getList:getListPrint } = tableMethods + getListPrint() + tableObject.loading = false const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns - tableColumns.forEach((item) => { item.width = item.table?.width || 150 }) - searchTableRef.value.openData("采购收货记录单号",tableObject1,{tableColumns},true) - - // window.open(src.value + '&asn_number=' + row.asnNumber) + searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) } @@ -733,10 +715,10 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r console.log(res) if (labelType.value == 'cg') { const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) - window.open(src.value+'&request_number='+res) + window.open(src.value+'&asn_number='+res) } else { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) - window.open(src.value+'&request_number='+res) + window.open(src.value+'&asn_number='+res) } }).catch(err => { console.log(err)