|
|
@ -171,8 +171,8 @@ import { |
|
|
|
PurchasereceiptRequestDetailPackingNumber |
|
|
|
} from './purchasereceiptRequestMain.data' |
|
|
|
import { |
|
|
|
SupplierdeliverRequestPackage |
|
|
|
} from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' |
|
|
|
PurchasereceiptRequestPackage |
|
|
|
} from '@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data' |
|
|
|
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain' |
|
|
@ -188,6 +188,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
import { getReportUrl } from '@/utils/systemParam' |
|
|
|
import { dateFormatter2 } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
|
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 协定品收货申请 |
|
|
|
defineOptions({ name: 'ToolPurchasereceiptRequestMain' }) |
|
|
@ -559,7 +560,7 @@ const labelPrint = async (row) => { |
|
|
|
const { getList:getListPrint } = tableMethods |
|
|
|
await getListPrint() |
|
|
|
tableObject.loading = false |
|
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
|
const tableColumns = PurchasereceiptRequestPackage.allSchemas.tableFormColumns |
|
|
|
tableColumns.forEach((item) => { |
|
|
|
item.width = item.table?.width |
|
|
|
}) |
|
|
@ -580,14 +581,44 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
return |
|
|
|
} |
|
|
|
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) |
|
|
|
|
|
|
|
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { |
|
|
|
let array = []//存储可采购数据 |
|
|
|
let array1 = []//存储可制造数据 |
|
|
|
let packingNumbers = [] |
|
|
|
val.forEach((item,index) => { |
|
|
|
packingNumbers.push(item.number) |
|
|
|
|
|
|
|
if (item.itemType == '可采购') { |
|
|
|
array.push(item) |
|
|
|
} |
|
|
|
if (item.itemType == '可制造') { |
|
|
|
array1.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (array.length>0) { |
|
|
|
await PackageApi.getPrintingLableId({packingNumbers:array.map(item1=>item1.number)}).then(res => { |
|
|
|
console.log(res) |
|
|
|
window.open(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken()+'&id=' + res) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
message.error('创建标签失败') |
|
|
|
}) |
|
|
|
} |
|
|
|
if (array1.length > 0) { |
|
|
|
await PackageApi.batchPrintingLable(array1.map(item1=>item1.number).join(',')).then(res => { |
|
|
|
console.log(res) |
|
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
message.error('创建标签失败') |
|
|
|
}) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
message.error('创建标签失败') |
|
|
|
}) |
|
|
|
} |
|
|
|
// await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { |
|
|
|
// console.log(res) |
|
|
|
// window.open(src.value + '&asn_number=' + res) |
|
|
|
// }).catch(err => { |
|
|
|
// console.log(err) |
|
|
|
// message.error('创建标签失败') |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
const updateTableData = (tableList)=>{ |
|
|
|