Browse Source

包装信息、翻包追溯记录打印标签

master_hella_20240701
zhaoyiran 6 months ago
parent
commit
9f2edc6903
  1. 36
      src/views/wms/inventoryManage/package/index.vue
  2. 27
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue

36
src/views/wms/inventoryManage/package/index.vue

@ -254,17 +254,43 @@ const formsSuccess = async (formType,data) => {
getList()
}
//
// const handlePoint = async (row) => {
// console.log(row,66666666666);
//
// //
// if (row.asnNumber !== null && row.asnNumber !== '') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+row.id)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+row.id)
// }
// }
const labelType = ref('') //
const handlePoint = async (row) => {
console.log(row,66666666666);
console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).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 (row.asnNumber !== null && row.asnNumber !== '') {
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+row.id)
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='+row.id)
window.open(src.value+'&asn_number='+resLable)
}
})
}).catch(err => {
console.log(err)
})
}
/** 导入 */

27
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue

@ -88,32 +88,37 @@ const buttonTableClick = async (val, row) => {
handlePoint(row)
}
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const labelType = ref('') //
//
const handlePoint = async (row) => {
//
let labelType = ''
await PackageApi.getPackagePage({
requestNumber: row.number
}).then((res) => {
if(res.list.length > 0) {
if (res.list[0].productionLineCode != null) {
labelType = 'zz'
labelType.value = 'zz'
} else {
labelType = 'cg'
labelType.value = 'cg'
}
}
}).catch(err => {
console.log(err)
})
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
PackageApi.batchPrintingLable(res.list.map(item1=>item1.number).join(',')).then((resLable) =>{
console.log(159,resLable )
//
if (labelType == 'cg') {
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+row.number)
window.open(src.value+'&asn_number='+resLable)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+row.number)
window.open(src.value+'&asn_number='+resLable)
}
})
}
}).catch(err => {
console.log(err)
})
}
//
const buttonBaseClick = (val, item) => {

Loading…
Cancel
Save