Browse Source

批量打印

hella_online_20240821
wangyufei 3 months ago
parent
commit
950c500f04
  1. 94
      src/views/wms/inventoryManage/package/index.vue

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

@ -193,26 +193,26 @@ const handleSelectionPoint = async ()=>{
text: 'loading...', text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
// InventoryinitRecordDetailApi.printLabelBatchByIdSelection(rows.join(",")).then(res => { PackageApi.batchPrintingLable(rows.join(",")).then(res => {
// console.log('res',res); console.log('批量打印res',res);
// getLoading?.close() getLoading?.close()
// if(res.zzLabel){ if(res.zzLabel){
// // //
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res.zzLabel) window.open(src.value+'&asn_number='+res.zzLabel)
// } }
// if (res.cgLabel) { if (res.cgLabel) {
// // //
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res.cgLabel) window.open(src.value+'&asn_number='+res.cgLabel)
// } }
// if(!res.cgLabel&&!res.zzLabel){ if(!res.cgLabel&&!res.zzLabel){
// message.warning('线!') message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
// } }
// }).catch(err => { }).catch(err => {
// console.log(err) console.log(err)
// getLoading?.close() getLoading?.close()
// }) })
} }
@ -359,28 +359,46 @@ const formsSuccess = async (formType,data) => {
const labelType = ref('') // const labelType = ref('') //
const handlePoint = async (row) => { const handlePoint = async (row) => {
console.log(row.packingNumber,445555555555555); console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).then(res => { PackageApi.batchPrintingLable(row.number).then(res => {
console.log(777,res); console.log('批量打印res',res);
if (res.productionLineCode != null) { if(res.zzLabel){
labelType.value = 'zz' //
} else { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
labelType.value = 'cg' window.open(src.value+'&asn_number='+res.zzLabel)
}
if (res.cgLabel) {
//
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
} }
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 => { }).catch(err => {
console.log(err) console.log(err)
}) })
// 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 (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)
// })
} }
/** 导入 */ /** 导入 */

Loading…
Cancel
Save