From c9f8111fde6bfde49b1e59a7b8a0045a5ec6a82f Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 24 May 2024 11:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=86=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerreturnRequestMain/index.vue | 53 ++++++++++++------- .../inventorychangeRecordMain.data.ts | 26 +++++++++ .../inventorychangeRequestMain.data.ts | 26 +++++++++ 3 files changed, 87 insertions(+), 18 deletions(-) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index ee33f9cee..388c2682b 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -292,7 +292,18 @@ const butttondata = (row,$index) => { defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:customerreturn-request-main:agree'}), // 审批通过 defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:customerreturn-request-main:handle'}), // 处理 defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:customerreturn-request-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerreturn-request-main:delete'}), // 删除 + { + label: '生成标签', + name: 'ssbq', + hide: isShowMainButton(row, ['3']), + type: 'primary', + icon: '', + color: '', + hasPermi: '', + link: true // 文本展现按钮 + }, + defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','6']) }), // 标签打印 + // defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerreturn-request-main:delete'}), // 删除 ] } @@ -406,27 +417,33 @@ 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()) - +const labelType = ref('') // 标签类别 采购还是制造等 // 标签打印 const showLabelRef = ref() const labelPrint = async (row) => { - tableObject.loading = true - 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 + console.log(row.packingNumber,445555555555555); + PackageApi.getBalanceToPackage(row.packingNumber).then(res => { + console.log(777,res); + if (res.productionLineCode != null) { + labelType.value = 'zz' + } else { + labelType.value = 'cg' + } + PackageApi.batchPrintingLable((res.number)).then((resLable) =>{ + console.log(159,resLable ) + // 判断是采购还是制造 + if (labelType.value == 'cg') { + const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) + console.log(159,resLable ) + window.open(src.value+'&asn_number='+resLable) + } else { + const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) + window.open(src.value+'&asn_number='+resLable) + } + }) + }).catch(err => { + console.log(err) }) - showLabelRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) } /** 添加/修改操作 */ diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts index a17f9797c..bcb4a54d9 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts @@ -613,6 +613,32 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive width: 150 }, }, + { + label: '是否冻结', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + table: { + width: 120 + }, + tableForm: { + type: 'Switch', + default: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + form: { + component: 'Switch', + value: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, // { // label: '代码', // field: 'code', diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts index 197dc1854..d9bb40b13 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts @@ -839,6 +839,32 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive