|
|
@ -193,26 +193,26 @@ const handleSelectionPoint = async ()=>{ |
|
|
|
text: 'loading...', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
// InventoryinitRecordDetailApi.printLabelBatchByIdSelection(rows.join(",")).then(res => { |
|
|
|
// console.log('批量打印res',res); |
|
|
|
// getLoading?.close() |
|
|
|
// if(res.zzLabel){ |
|
|
|
// //制造标签 |
|
|
|
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
|
// 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('包装不存在,无法打印或者是线边物料数据不生成包装!') |
|
|
|
// } |
|
|
|
// }).catch(err => { |
|
|
|
// console.log(err) |
|
|
|
// getLoading?.close() |
|
|
|
// }) |
|
|
|
PackageApi.batchPrintingLable(rows.join(",")).then(res => { |
|
|
|
console.log('批量打印res',res); |
|
|
|
getLoading?.close() |
|
|
|
if(res.zzLabel){ |
|
|
|
//制造标签 |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
|
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('包装不存在,无法打印或者是线边物料数据不生成包装!') |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
getLoading?.close() |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -359,28 +359,46 @@ const formsSuccess = async (formType,data) => { |
|
|
|
const labelType = ref('') // 标签类别 采购还是制造等 |
|
|
|
const handlePoint = async (row) => { |
|
|
|
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(row.number).then(res => { |
|
|
|
console.log('批量打印res',res); |
|
|
|
if(res.zzLabel){ |
|
|
|
//制造标签 |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|
|
|
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 => { |
|
|
|
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) |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|