diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index c8bb65119..dc47bf030 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -107,8 +107,9 @@ export const getLabel = async (id: number) => { } // 打印标签获取包装列表 -export const getLabelDetailPage = async (moduleType:string,number: string,) => { - return await request.get({ url: `/wms/package/getLabelDetailPage?moduleName=` + moduleType+ `&recordNumber=`+number}) + +export const getLabelDetailPage = async (params) => { + return await request.get({ url: `/wms/package/getLabelDetailPage`,params}) } // 根据库存余额获取包装信息进行打印标签 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index ddd5f8b86..142997274 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -786,46 +786,29 @@ const submitFormLabel = async (formType, data) => { const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) +getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage // 分页接口 // 标签打印 const searchTableRef = ref() const labelPrint = async (row) => { - console.log("------------",row); tableObject.loading = true - const subTableDFata = await PackageApi.getLabelDetailPage('supplier',row.number) - 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':'supplier','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)