diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index 4de2d428a..a69fd81c7 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -100,7 +100,10 @@ export const createPackageLabel = async (data: PackageVO) => { export const batchPrintingLable = async (data: any) => { return await request.post({ url: `/wms/package/batchPrintingLable`, data }) } - +// 获取标签信息 +export const getPrintingLableId = async (data: any) => { + return await request.put({ url: `/wms/package/getLablesByPackingNumber`, data }) +} // 批量打印标签 export const batchPrintingLableGet = async (params: any) => { return await request.get({ url: `/wms/package/batchPrintingBalanceLable`, params }) diff --git a/src/api/wms/unplannedreceiptRequestDetail/index.ts b/src/api/wms/unplannedreceiptRequestDetail/index.ts index f9268afab..99ab181a3 100644 --- a/src/api/wms/unplannedreceiptRequestDetail/index.ts +++ b/src/api/wms/unplannedreceiptRequestDetail/index.ts @@ -118,3 +118,9 @@ export const importTemplate = () => { export const updateDetailPackingNumber = async (id: number, number) => { return await request.put({ url: '/wms/unplannedreceipt-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number }) } + +// 创建包装信息后更新子表数据packingNumber +export const getDetailList = async (masterId: number) => { + return await request.get({ url: '/wms/unplannedreceipt-request-detail/listForLables?masterId=' + masterId }) +} + diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 64fa7a581..5cdbd0bf8 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1103,6 +1103,19 @@ export function mainListPointBtn(option: any) { hasPermi: '' }) } + +// 主列表-创建标签 +export function mainListCreatePointBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.创建标签`).replace('ts.', ''), + name: 'createPoint', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} export function mainListPrintInspectionBtn(option: any) { return __defaultBtnOption(option, { label: t(`ts.打印检验指引单`).replace('ts.', ''), diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue index fb2dde87c..4f4f26c84 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue @@ -175,7 +175,7 @@ routeName.value = route.name const tableColumns = ref(CustomerStatementMain.allSchemas.tableColumns) const apiPage = ref(CustomerStatementDetailApi.getCustomerStatementDetailPage) -const DetailAllSchemas = ref(CustomerStatementShareReconciliation.allSchemas) +const DetailAllSchemas = ref(CustomerStatementDetail.allSchemas) const tabsExtend = ref(false) const tableObjectExtend = ref() diff --git a/src/views/wms/inventoryManage/balance/balance.data.ts b/src/views/wms/inventoryManage/balance/balance.data.ts index c8586bf85..0966dc3d6 100644 --- a/src/views/wms/inventoryManage/balance/balance.data.ts +++ b/src/views/wms/inventoryManage/balance/balance.data.ts @@ -74,6 +74,7 @@ export const Balance = useCrudSchemas( label: '供应商批次', field: 'altBatch', sort: 'custom', + isTable: false, table: { width: 150 }, diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index b5e377e42..6b4fb2ca1 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -298,7 +298,7 @@ const butttondata = (row) => { // float: 'right', // hasPermi: '' // }, - defaultButtons.mainListPointBtn({hide: isShowPointBtn(row)} ) // 标签打印 + defaultButtons.mainListCreatePointBtn({hide: isShowPointBtn(row)} ) // 标签打印 // defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), // 删除   ] @@ -319,7 +319,7 @@ const buttonTableClick = async (val, row) => { ';U' + row.uom alert(aaa) - } else if (val == 'point') { + } else if (val == 'createPoint') { // 标签打印 handlePoint(row) } diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index d0bc30b50..4499c4263 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -369,8 +369,15 @@ const handlePoint = async (row) => { } if (res.cgLabel) { //采购标签 - const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) - window.open(src.value+'&asn_number='+res.cgLabel) + // const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) + // 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){ message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!') diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index d16b26a6e..18c4a5a4c 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -926,7 +926,19 @@ const tableFormSelectOnBlur = (field, val, row, index) => { const BASE_URL = getJmreportBaseUrl() const src = ref(BASE_URL + '/jmreport/view/936912164754612224?token=' + getAccessToken()) const labelPrint = async (row) => { - window.open(src.value + '&request_number=' + row.number) + await UnplannedreceiptRequestDetailApi.getDetailList(row.masterId).then((res) => { + if (res.length > 0) { + const itemType = res.some(item=>item.itemType == '可采购') + const itemType1 = res.some(item => item.itemType == '可制造') + if (itemType) { + window.open(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken()+'&request_number=' + row.number) + } + if (itemType1) { + window.open(src.value + '&request_number=' + row.number) + } + } + }) + // window.open(src.value + '&request_number=' + row.number) } /** 初始化 **/ diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 1549da33a..7ab6a4c2d 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -135,7 +135,7 @@ const tableColumns = ref([...ProductionreturnRequestMain.allSchemas.tableColumns //创建标签 const detailListTableColumns =cloneDeep(ProductionreturnRequestDetailLabel.allSchemas) -const detailListTableColumnsRules =cloneDeep(ProductionreturnRequestDetailLabel) +const detailListTableColumnsRules =cloneDeep(ProductionreturnRequestDetailLabelRules) const isCreateLabel = ref(false) const formLabelRef = ref() const labelType = ref('') // 标签类别 采购还是制造等 @@ -704,20 +704,51 @@ 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 => { - 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('创建标签失败') + 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) + 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('创建标签失败') + // }) } // 获取部门 用于详情 部门回显 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 3e2a1d128..fed75d689 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -1478,6 +1478,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive { if (fromInventoryStatus.value) { item.tableForm.searchCondition = [ { + key:'fromWarehouseCode', + value:'fromWarehouseCode', + message: '请选择从仓库代码!', + isMainValue: true + }, + { key: 'businessType', value: businessType.value , isMainValue: false @@ -268,6 +274,12 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { ] } else if (fromInventoryStatus.value == null) { item.tableForm.searchCondition = [ + { + key:'fromWarehouseCode', + value:'fromWarehouseCode', + message: '请选择从仓库代码!', + isMainValue: true + }, { key: 'businessType', value: businessType.value , diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 4845b1325..ec54143ec 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -527,6 +527,16 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchTitle: '库存余额信息', searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, + searchCondition: [{ + key:'fromWarehouseCode', + value:'fromWarehouseCode', + message: '请选择从仓库代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], }, form: { // labelMessage: '信息提示说明!!!', @@ -537,6 +547,16 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchTitle: '库存余额信息', searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, + searchCondition: [{ + key:'fromWarehouseCode', + value:'fromWarehouseCode', + message: '请选择从仓库代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], } } }, diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index 76e26ea30..e6408c0b3 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -149,6 +149,10 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + },{ + key: 'type', + value: 'predict', + isMainValue: false },{ key: 'workshopCode', value: 'workshop', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 7b43f9b8d..303c4db48 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -148,6 +148,10 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + },{ + key: 'type', + value: 'assemble', + isMainValue: false },{ key: 'workshopCode', value: 'workshop', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 038f9da7e..b298c5ab3 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/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 {exportProductreceiptRequestMainPredict} from "@/api/wms/productreceiptRequestMain"; import * as ItemPackageApi from "@/api/wms/itempackage"; +import * as ruleApi from '@/api/wms/rule/index' const { loadStart, loadDone } = usePageLoading() // 制品收货申请 // 预生产收货申请 @@ -481,6 +482,7 @@ const butttondata = (row, $index) => { ] } +let toManagementPrecision = ref('') // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { @@ -622,6 +624,19 @@ const buttonTableClick = async (val, row) => { 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') { // 处理 @@ -959,22 +974,52 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ 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) - 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) - } + window.open(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken()+'&id=' + res) + }).catch(err => { + console.log(err) + message.error('创建标签失败') }) - .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) 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 data = await ConfigApi.getConfigPage({ diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index d55e555f8..4c5369f59 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -1727,8 +1727,12 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive( width: 150 }, tableForm: { - disabled: true - } + disabled: true, + type: 'FormDate', + placeholder: '请选择从批次', + valueFormat: 'YYYYMMDD', + format: 'YYYYMMDD', + }, }, { label: '数量', @@ -2131,6 +2135,9 @@ export const ProductreceiptRequestLabelRules = reactive({ ], productionLineCodePackage: [ { required: true, message: '请选择生产线', trigger: 'change' } - ] + ], + batch: [ + { required: true, message: '请选择批次', trigger: ['change','blur'] } + ], }) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 14b85858c..76245e6a2 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/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 ConfigApi from '@/api/infra/config' import { usePageLoading } from '@/hooks/web/usePageLoading' +import * as ruleApi from '@/api/wms/rule/index' const { loadStart, loadDone } = usePageLoading() // 装配收货申请 // 号口品收货申请 @@ -381,6 +382,7 @@ const butttondata = (row,$index) => { // 列表-操作按钮事件 +const toManagementPrecision = ref('') const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 await message.confirm('确认要关闭吗?') @@ -505,6 +507,19 @@ const buttonTableClick = async (val, row) => { 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') { // 处理 @@ -818,20 +833,50 @@ 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 => { - 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('创建标签失败') +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 => { + 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 data = await ConfigApi.getConfigPage({ diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 71beecd5b..9a7df4d64 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -1732,8 +1732,12 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive( width: 150 }, tableForm: { - disabled:true - } + disabled: true, + type:'FormDate', + placeholder: '请选择从批次', + valueFormat: 'YYYYMMDD', + format: 'YYYYMMDD', + }, }, { label: '数量', @@ -2090,6 +2094,9 @@ export const ProductreceiptRequestLabelRules = reactive({ ], productionLineCodePackage: [ { required: true, message: '请选择生产线', trigger: 'change' } - ] + ], + batch: [ + { required: true, message: '请选择批次', trigger: ['change', 'blur'] } + ], }) diff --git a/src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue index 79e315e6a..adb90a59b 100644 --- a/src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue @@ -168,11 +168,11 @@ import { PurchasereceiptRequestDetail, PurchasereceiptRequestDetailRules, PurchasereceiptRequestDetailLabel, - PurchasereceiptRequestDetailPackingNumber - } from './purchasereceiptRequestMain.data' - import { - SupplierdeliverRequestPackage -} from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' + PurchasereceiptRequestDetailPackingNumber, +} from './purchasereceiptRequestMain.data' + import { + 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' @@ -559,7 +559,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 +580,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)=>{ diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 3275b32c4..b8829a5e9 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -168,7 +168,8 @@ import { PurchasereceiptRequestDetail, PurchasereceiptRequestDetailRules, PurchasereceiptRequestDetailLabel, - PurchasereceiptRequestDetailPackingNumber + PurchasereceiptRequestDetailPackingNumber, + PurchasereceiptRequestPackage } from './purchasereceiptRequestMain.data' import { SupplierdeliverRequestPackage @@ -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,37 @@ 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('创建标签失败') + }) + } } const updateTableData = (tableList)=>{ diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index 976764562..d80ef2409 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -2555,3 +2555,79 @@ export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive([ + + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + }, + tableForm: { + disabled: true + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + tableForm: { + type: 'FormDate', + format: 'YYYYMMDD', + valueFormat: 'YYYYMMDD', + } + }, + { + label: '包装号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + }, + tableForm: { + disabled: true + } + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + tableForm: { + disabled: true + } + }, + { + label: '标包数量', + field: 'packQty', + sort: 'custom', + tableForm: { + disabled: true + } + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select' + }, + table: { + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + tableForm: { + disabled: true + } + }, +])) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index bfc4ff495..ad3c3c283 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -1824,18 +1824,18 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive { 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)=>{ diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts index f45712f5e..13675b376 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts @@ -736,7 +736,28 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ // width: 150 // }, // }, + { + label: '索赔总额', + field: 'claimAmount', + sort: 'custom', + table: { + width: 180 + }, + isTable:true, + isDetail: true, + isTableForm: false, + isForm: true, + isSearch:false, + sortTableDefault: 12, + form: { + component: 'InputNumber', + componentProps: { + precision: 5, + disabled: true, + } + }, + }, { label: '采购审批时间', field: 'procurementCreateTime', @@ -1297,12 +1318,26 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive { item.value = defaultSupplierCode.value item.componentProps.isSearchList = true item.componentProps.disabled = false + claimDetailsList.value = []; + claimDetails(item.value); } // 订单类型 if (item.field == 'orderType') {