|
@ -71,7 +71,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain"; |
|
|
import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain"; |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
// 包装信息 |
|
|
defineOptions({ name: 'package' }) |
|
|
defineOptions({ name: 'package' }) |
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
@ -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).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) |
|
|
|
|
|
// }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
/** 导入 */ |
|
|