|
|
@ -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) |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|