Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into intex

intex_online20241228
宋国强 2 months ago
parent
commit
4442233198
  1. 2
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
  2. 1
      src/views/wms/inventoryManage/balance/balance.data.ts
  3. 11
      src/views/wms/inventoryManage/package/index.vue
  4. 59
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  5. 17
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  6. 12
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  7. 20
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  8. 65
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  9. 13
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  10. 71
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  11. 13
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  12. 52
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue
  13. 49
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue

2
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

@ -175,7 +175,7 @@ routeName.value = route.name
const tableColumns = ref(CustomerStatementMain.allSchemas.tableColumns) const tableColumns = ref(CustomerStatementMain.allSchemas.tableColumns)
const apiPage = ref(CustomerStatementDetailApi.getCustomerStatementDetailPage) const apiPage = ref(CustomerStatementDetailApi.getCustomerStatementDetailPage)
const DetailAllSchemas = ref(CustomerStatementShareReconciliation.allSchemas) const DetailAllSchemas = ref(CustomerStatementDetail.allSchemas)
const tabsExtend = ref(false) const tabsExtend = ref(false)
const tableObjectExtend = ref() const tableObjectExtend = ref()

1
src/views/wms/inventoryManage/balance/balance.data.ts

@ -74,6 +74,7 @@ export const Balance = useCrudSchemas(
label: '供应商批次', label: '供应商批次',
field: 'altBatch', field: 'altBatch',
sort: 'custom', sort: 'custom',
isTable: false,
table: { table: {
width: 150 width: 150
}, },

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

@ -369,8 +369,15 @@ const handlePoint = async (row) => {
} }
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)
PackageApi.getPrintingLableId({packingNumbers:[row.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(!res.cgLabel&&!res.zzLabel){ if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!') message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')

59
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -135,7 +135,7 @@ const tableColumns = ref([...ProductionreturnRequestMain.allSchemas.tableColumns
// //
const detailListTableColumns =cloneDeep(ProductionreturnRequestDetailLabel.allSchemas) const detailListTableColumns =cloneDeep(ProductionreturnRequestDetailLabel.allSchemas)
const detailListTableColumnsRules =cloneDeep(ProductionreturnRequestDetailLabel) const detailListTableColumnsRules =cloneDeep(ProductionreturnRequestDetailLabelRules)
const isCreateLabel = ref(false) const isCreateLabel = ref(false)
const formLabelRef = ref() const formLabelRef = ref()
const labelType = ref('') // const labelType = ref('') //
@ -704,20 +704,51 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { let array1 = []//
console.log(res) let packingNumbers = []
if (labelType.value == 'cg') { val.forEach((item,index) => {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) packingNumbers.push(item.number)
window.open(src.value+'&asn_number='+res)
} else { if (item.itemType == '可采购') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) array.push(item)
window.open(src.value+'&asn_number='+res) }
} if (item.itemType == '可制造') {
}).catch(err => { array1.push(item)
console.log(err) }
message.error('创建标签失败')
}) })
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)
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
// await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
// console.log(res)
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// }
// }).catch(err => {
// console.log(err)
// message.error('')
// })
} }
// //

17
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -1478,6 +1478,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}, },
tableForm: { tableForm: {
disabled: true, disabled: true,
type: 'FormDate',
format: 'YYYYMMDD',
valueFormat: 'YYYYMMDD', valueFormat: 'YYYYMMDD',
}, },
form: { form: {
@ -1670,7 +1672,11 @@ export const ProductionreturnRequestDetailLabelRules = reactive({
], ],
productionLineCodePackage: [ productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' } { required: true, message: '请选择生产线', trigger: 'change' }
] ],
batch: [
{ required: true, message: '请输入批次', trigger: ['blur', 'change'] }
],
}) })
@ -1724,6 +1730,13 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
width: 150, width: 150,
}, },
}, },
{
label: '物料类型',
field: 'itemType',
sort: 'custom',
tableForm: {
disabled: true
}
},
])) ]))

12
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -255,6 +255,12 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if (fromInventoryStatus.value) { if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [ item.tableForm.searchCondition = [
{ {
key:'fromWarehouseCode',
value:'fromWarehouseCode',
message: '请选择从仓库代码!',
isMainValue: true
},
{
key: 'businessType', key: 'businessType',
value: businessType.value , value: businessType.value ,
isMainValue: false isMainValue: false
@ -268,6 +274,12 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
] ]
} else if (fromInventoryStatus.value == null) { } else if (fromInventoryStatus.value == null) {
item.tableForm.searchCondition = [ item.tableForm.searchCondition = [
{
key:'fromWarehouseCode',
value:'fromWarehouseCode',
message: '请选择从仓库代码!',
isMainValue: true
},
{ {
key: 'businessType', key: 'businessType',
value: businessType.value , value: businessType.value ,

20
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -527,6 +527,16 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: BalancePopWindow.allSchemas, searchAllSchemas: BalancePopWindow.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance, searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key:'fromWarehouseCode',
value:'fromWarehouseCode',
message: '请选择从仓库代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -537,6 +547,16 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: BalancePopWindow.allSchemas, searchAllSchemas: BalancePopWindow.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance, searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key:'fromWarehouseCode',
value:'fromWarehouseCode',
message: '请选择从仓库代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
} }
} }
}, },

65
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -195,6 +195,7 @@ import * as ConfigApi from '@/api/infra/config'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import {exportProductreceiptRequestMainPredict} from "@/api/wms/productreceiptRequestMain"; import {exportProductreceiptRequestMainPredict} from "@/api/wms/productreceiptRequestMain";
import * as ItemPackageApi from "@/api/wms/itempackage"; import * as ItemPackageApi from "@/api/wms/itempackage";
import * as ruleApi from '@/api/wms/rule/index'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
// //
@ -481,6 +482,7 @@ const butttondata = (row, $index) => {
] ]
} }
let toManagementPrecision = ref('')
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { if (val == 'mainClose') {
@ -622,6 +624,19 @@ const buttonTableClick = async (val, row) => {
return return
} }
}) })
ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
locationCode: item.toLocationCode
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
})
if ( toManagementPrecision.value == 'BY_BATCH') {
// row['fromBatchFormItemType'] = 'FormDate'
row['disabled_batch'] = false
} else {
// row['fromBatchFormItemType'] = ''
row['disabled_batch'] = true
}
}) })
} else if (val == 'mainHandle') { } else if (val == 'mainHandle') {
// //
@ -959,22 +974,52 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
let array1 = []//
let packingNumbers = []
val.forEach((item,index) => {
packingNumbers.push(item.number)
await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(',')) if (item.itemType == '可采购') {
.then((res) => { 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) console.log(res)
if (labelType.value == 'cg') { window.open(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken()+'&id=' + res)
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) }).catch(err => {
window.open(src.value + '&asn_number=' + res) console.log(err)
} else { message.error('创建标签失败')
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res)
}
}) })
.catch((err) => { }
if (array1.length > 0) {
await PackageApi.batchPrintingLable(array1.map(item1=>item1.number).join(',')).then(res => {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res)
}).catch(err => {
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
}) })
}
// await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(','))
// .then((res) => {
// console.log(res)
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value + '&asn_number=' + res)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value + '&asn_number=' + res)
// }
// })
// .catch((err) => {
// console.log(err)
// message.error('')
// })
} }
const getDefaultWorkshopCode = async () => { const getDefaultWorkshopCode = async () => {
const data = await ConfigApi.getConfigPage({ const data = await ConfigApi.getConfigPage({

13
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1727,8 +1727,12 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled: true disabled: true,
} type: 'FormDate',
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
},
}, },
{ {
label: '数量', label: '数量',
@ -2131,6 +2135,9 @@ export const ProductreceiptRequestLabelRules = reactive({
], ],
productionLineCodePackage: [ productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' } { required: true, message: '请选择生产线', trigger: 'change' }
] ],
batch: [
{ required: true, message: '请选择批次', trigger: ['change','blur'] }
],
}) })

71
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -155,6 +155,7 @@ import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config' import * as ConfigApi from '@/api/infra/config'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as ruleApi from '@/api/wms/rule/index'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
// //
@ -381,6 +382,7 @@ const butttondata = (row,$index) => {
// - // -
const toManagementPrecision = ref('')
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
@ -505,6 +507,19 @@ const buttonTableClick = async (val, row) => {
return return
} }
}) })
ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
locationCode: item.toLocationCode
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
if ( toManagementPrecision.value == 'BY_BATCH') {
// row['fromBatchFormItemType'] = 'FormDate'
item['disabled_batch'] = true
} else if(toManagementPrecision.value == 'BY_QUANTITY') {
// row['fromBatchFormItemType'] = ''
item['disabled_batch'] = false
}
})
}) })
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
@ -818,20 +833,50 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { let array1 = []//
console.log(res) let packingNumbers = []
if (labelType.value == 'cg') { val.forEach((item,index) => {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) packingNumbers.push(item.number)
window.open(src.value+'&asn_number='+res)
} else { if (item.itemType == '可采购') {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) array.push(item)
window.open(src.value+'&asn_number='+res) }
} if (item.itemType == '可制造') {
}).catch(err => { array1.push(item)
console.log(err) }
message.error('创建标签失败')
}) })
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 => {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
// await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
// console.log(res)
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// }
// }).catch(err => {
// console.log(err)
// message.error('')
// })
} }
const getDefaultWorkshopCode = async () => { const getDefaultWorkshopCode = async () => {
const data = await ConfigApi.getConfigPage({ const data = await ConfigApi.getConfigPage({

13
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -1732,8 +1732,12 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled:true disabled: true,
} type:'FormDate',
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
},
}, },
{ {
label: '数量', label: '数量',
@ -2090,6 +2094,9 @@ export const ProductreceiptRequestLabelRules = reactive({
], ],
productionLineCodePackage: [ productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' } { required: true, message: '请选择生产线', trigger: 'change' }
] ],
batch: [
{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }
],
}) })

52
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue

@ -168,11 +168,11 @@ import {
PurchasereceiptRequestDetail, PurchasereceiptRequestDetail,
PurchasereceiptRequestDetailRules, PurchasereceiptRequestDetailRules,
PurchasereceiptRequestDetailLabel, PurchasereceiptRequestDetailLabel,
PurchasereceiptRequestDetailPackingNumber PurchasereceiptRequestDetailPackingNumber,
} from './purchasereceiptRequestMain.data' } from './purchasereceiptRequestMain.data'
import { import {
SupplierdeliverRequestPackage PurchasereceiptRequestPackage
} from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' } from '@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data'
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain' import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
@ -559,7 +559,7 @@ const labelPrint = async (row) => {
const { getList:getListPrint } = tableMethods const { getList:getListPrint } = tableMethods
await getListPrint() await getListPrint()
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = PurchasereceiptRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width item.width = item.table?.width
}) })
@ -580,14 +580,44 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { 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) console.log(res)
window.open(src.value + '&asn_number=' + res) window.open(src.value + '&asn_number=' + res)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
message.error('创建标签失败') 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)=>{ const updateTableData = (tableList)=>{

49
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue

@ -171,8 +171,8 @@ import {
PurchasereceiptRequestDetailPackingNumber PurchasereceiptRequestDetailPackingNumber
} from './purchasereceiptRequestMain.data' } from './purchasereceiptRequestMain.data'
import { import {
SupplierdeliverRequestPackage PurchasereceiptRequestPackage
} from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' } from '@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data'
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain' import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
@ -188,6 +188,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { dateFormatter2 } from '@/utils/formatTime' import { dateFormatter2 } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'ToolPurchasereceiptRequestMain' }) defineOptions({ name: 'ToolPurchasereceiptRequestMain' })
@ -559,7 +560,7 @@ const labelPrint = async (row) => {
const { getList:getListPrint } = tableMethods const { getList:getListPrint } = tableMethods
await getListPrint() await getListPrint()
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = PurchasereceiptRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width item.width = item.table?.width
}) })
@ -580,14 +581,44 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { 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) console.log(res)
window.open(src.value + '&asn_number=' + res) window.open(src.value + '&asn_number=' + res)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
message.error('创建标签失败') 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)=>{ const updateTableData = (tableList)=>{

Loading…
Cancel
Save