From 974924b1e822cea6a55e1ffda8ea15a7c9fc0cce Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 2 Apr 2024 19:12:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E9=85=8D=E6=94=B6=E8=B4=A7=E5=AD=90?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E8=AE=B0=E5=BD=95=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productreceiptDetailb/index.ts | 51 ++++++ .../productreceiptJobMain/index.vue | 139 ++++++++-------- .../productreceiptAssembleJobMain/index.vue | 157 +++++++++--------- .../productreceiptAssembleJobMain.data.ts | 20 +-- .../index.vue | 8 +- .../productreceiptAssembleRecordMain.data.ts | 115 ++++++++++++- 6 files changed, 330 insertions(+), 160 deletions(-) create mode 100644 src/api/wms/productreceiptDetailb/index.ts diff --git a/src/api/wms/productreceiptDetailb/index.ts b/src/api/wms/productreceiptDetailb/index.ts new file mode 100644 index 000000000..15cfc9319 --- /dev/null +++ b/src/api/wms/productreceiptDetailb/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface ProductreceiptDetailbVO { + id: number + packingNumber: string + batch: string + masterId: number + number: string + itemCode: string + itemName: string + outsideItemCode: string + outsideProduceDate: string + outsideSerialNumber: string + remark: string +} + +// 查询制品收货记录子列表 +export const getProductreceiptDetailbPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-detailb/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-detailb/page`, params }) + } +} + +// 查询制品收货记录子详情 +export const getProductreceiptDetailb = async (id: number) => { + return await request.get({ url: `/wms/productreceipt-detailb/get?id=` + id }) +} + +// 新增制品收货记录子 +export const createProductreceiptDetailb = async (data: ProductreceiptDetailbVO) => { + return await request.post({ url: `/wms/productreceipt-detailb/create`, data }) +} + +// 修改制品收货记录子 +export const updateProductreceiptDetailb = async (data: ProductreceiptDetailbVO) => { + return await request.put({ url: `/wms/productreceipt-detailb/update`, data }) +} + +// 删除制品收货记录子 +export const deleteProductreceiptDetailb = async (id: number) => { + return await request.delete({ url: `/wms/productreceipt-detailb/delete?id=` + id }) +} + +// 导出制品收货记录子 Excel +export const exportProductreceiptDetailb = async (params) => { + return await request.download({ url: `/wms/productreceipt-detailb/export-excel`, params }) +} diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index e536108bd..8cfb2f239 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -172,83 +172,86 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 let aaa = { - "id": "1809190001478278226", - "requestNumber": "REC4620231212-0011", - "productionPlanNumber": "WP20231212-0002", - "workShopCode": "work2", - "team": "7", - "shift": "8", - "details": null, - "requestTime": 1702376849000, - "requestDueTime": null, - "status": "2", - "expiredTime": null, - "updateTime": 1702376904000, - "updater": "超级管理员", - "jobStageStatus": null, - "priority": null, - "priorityIncrement": null, - "departmentCode": "103", - "acceptUserId": "1", - "acceptTime": 1702376913000, - "completeUserId": "1", - "completeTime": 1702377036000, - "toWarehouseCode": null, - "toAreaCodes": "", - "fromAreaTypes": "WIP", - "toAreaTypes": "WIP", - "number": "JOB2120231212-0001", - "businessType": "ProductReceipt", - "remark": null, - "createTime": 1702376904000, - "creator": "超级管理员", - "autoComplete": "FALSE", - "allowModifyLocation": "FALSE", - "allowModifyQty": "TRUE", - "allowBiggerQty": "TRUE", - "allowSmallerQty": "TRUE", - "allowModifyInventoryStatus": "TRUE", - "allowContinuousScanning": "TRUE", - "allowPartialComplete": "TRUE", - "allowModifyBatch": "FALSE", - "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", - "concurrencyStamp": null, + "id": 8, + "requestNumber": "REQ1120240401-0001", + "productionPlanNumber": "WP20240401-0001", + "workShopCode": "work1", + "team": "T01", + "shift": "bc002", + "details": null, + "requestTime": 1711952813000, + "requestDueTime": null, + "status": "2", + "expiredTime": null, + "updateTime": 1711952823000, + "updater": "超级管理员", + "jobStageStatus": null, + "priority": null, + "priorityIncrement": null, + "departmentCode": "100", + "acceptUserId": "1", + "acceptTime": 1711952975000, + "completeUserId": null, + "completeTime": null, + "toWarehouseCode": null, + "toAreaCodes": "", + "fromAreaTypes": "WIP", + "toAreaTypes": "WIP", + "number": "JOB2120240401-0001", + "businessType": "ProductReceipt", + "remark": null, + "createTime": 1711952823000, + "creator": "超级管理员", + "autoComplete": "FALSE", + "allowModifyLocation": "FALSE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + "inInventoryStatuses": "OK", + "outInventoryStatuses": "OK", + "concurrencyStamp": 2, + "type": "assemble", subList: [ - { - "id": "1809190000003953999", - "productionLineCode": "line4", - "workStationCode": "station4", + { + "id": 8, + "productionLineCode": "work1-line1", + "workStationCode": "station1", "processCode": null, - "packingNumber": "PN-00113", + "packingNumber": "PN0401-000072", "containerNumber": null, - "batch": "20231212", - "produceDate": null, - "expireDate": null, + "batch": "20240401", + "produceDate": 1711987200000, + "expireDate": 1712073600000, "inventoryStatus": "OK", + "toLocationCode": "901", "woNumber": null, "woLine": null, - "packQty": 8, - "packUnit": "BOX", - "itemCode": "item01", - "itemName": "物料01", - "itemDesc1": "", - "itemDesc2": "", - "projectCode": "xm01", - "qty": 2, + "packQty": 5, + "packUnit": "Box-05", + "itemCode": "399.960-12", + "itemName": "远光内侧反射镜(镀铝)右灯", + "itemDesc1": null, + "itemDesc2": null, + "projectCode": null, + "qty": 5, "uom": "EA", - "number": "JOB2120231212-0001", + "number": "JOB2120240401-0001", "remark": null, - "createTime": 1702376904000, - "creator": "1", + "createTime": 1711952823000, + "creator": "超级管理员", "toOwnerCode": null, - handleQty: 10, - toPackingNumber: '12', - toContainerNumber: '001', - toBatch: '21', - toInventoryStatus: 'OK', - toLocationCode: 'H03', + "updateTime": 1711952823000, + "updater": "超级管理员", + handleQty: 5, + toPackingNumber: "PN0401-000072", + toContainerNumber: null, + toBatch: '20240401', + toInventoryStatus: 'OK' } ] } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue index 60a4a75ba..1ce595bdc 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue @@ -171,83 +171,86 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 let aaa = { - "id": "1809190001478278226", - "requestNumber": "REC4620231212-0011", - "productionPlanNumber": "WP20231212-0002", - "workShopCode": "work2", - "team": "7", - "shift": "8", - "details": null, - "requestTime": 1702376849000, - "requestDueTime": null, - "status": "2", - "expiredTime": null, - "updateTime": 1702376904000, - "updater": "超级管理员", - "jobStageStatus": null, - "priority": null, - "priorityIncrement": null, - "departmentCode": "103", - "acceptUserId": "1", - "acceptTime": 1702376913000, - "completeUserId": "1", - "completeTime": 1702377036000, - "toWarehouseCode": null, - "toAreaCodes": "", - "fromAreaTypes": "WIP", - "toAreaTypes": "WIP", - "number": "JOB2120231212-0001", - "businessType": "ProductReceipt", - "remark": null, - "createTime": 1702376904000, - "creator": "超级管理员", - "autoComplete": "FALSE", - "allowModifyLocation": "FALSE", - "allowModifyQty": "TRUE", - "allowBiggerQty": "TRUE", - "allowSmallerQty": "TRUE", - "allowModifyInventoryStatus": "TRUE", - "allowContinuousScanning": "TRUE", - "allowPartialComplete": "TRUE", - "allowModifyBatch": "FALSE", - "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", - "concurrencyStamp": null, - subList: [ - { - "id": "1809190000003953999", - "productionLineCode": "line4", - "workStationCode": "station4", - "processCode": null, - "packingNumber": "PN-00113", - "containerNumber": null, - "batch": "20231212", - "produceDate": null, - "expireDate": null, - "inventoryStatus": "OK", - "woNumber": null, - "woLine": null, - "packQty": 8, - "packUnit": "BOX", - "itemCode": "item01", - "itemName": "物料01", - "itemDesc1": "", - "itemDesc2": "", - "projectCode": "xm01", - "qty": 2, - "uom": "EA", - "number": "JOB2120231212-0001", - "remark": null, - "createTime": 1702376904000, - "creator": "1", - "toOwnerCode": null, - handleQty: 10, - toPackingNumber: '12', - toContainerNumber: '001', - toBatch: '21', - toInventoryStatus: 'OK', - toLocationCode: 'H03', + "id": 8, + "requestNumber": "REQ1120240401-0001", + "productionPlanNumber": "WP20240401-0001", + "workShopCode": "work1", + "team": "T01", + "shift": "bc002", + "details": null, + "requestTime": 1711952813000, + "requestDueTime": null, + "status": "2", + "expiredTime": null, + "updateTime": 1711952823000, + "updater": "超级管理员", + "jobStageStatus": null, + "priority": null, + "priorityIncrement": null, + "departmentCode": "100", + "acceptUserId": "1", + "acceptTime": 1711952975000, + "completeUserId": null, + "completeTime": null, + "toWarehouseCode": null, + "toAreaCodes": "", + "fromAreaTypes": "WIP", + "toAreaTypes": "WIP", + "number": "JOB2120240401-0001", + "businessType": "ProductReceipt", + "remark": null, + "createTime": 1711952823000, + "creator": "超级管理员", + "autoComplete": "FALSE", + "allowModifyLocation": "FALSE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + "inInventoryStatuses": "OK", + "outInventoryStatuses": "OK", + "concurrencyStamp": 2, + "type": "assemble", + "subList": [ + { + "id": 8, + "productionLineCode": "work1-line1", + "workStationCode": "station1", + "processCode": null, + "packingNumber": "PN0401-000072", + "containerNumber": null, + "batch": "20240401", + "produceDate": 1711987200000, + "expireDate": 1712073600000, + "inventoryStatus": "OK", + "toLocationCode": "901", + "woNumber": null, + "woLine": null, + "packQty": 5, + "packUnit": "Box-05", + "itemCode": "399.960-12", + "itemName": "远光内侧反射镜(镀铝)右灯", + "itemDesc1": null, + "itemDesc2": null, + "projectCode": null, + "qty": 5, + "uom": "EA", + "number": "JOB2120240401-0001", + "remark": null, + "createTime": 1711952823000, + "creator": "超级管理员", + "toOwnerCode": null, + "updateTime": 1711952823000, + "updater": "超级管理员", + handleQty: 5, + toPackingNumber: "PN0401-000072", + toContainerNumber: null, + toBatch: '20240401', + toInventoryStatus: 'OK' } ] } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts index e71496ba3..2e0f56b99 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts @@ -536,16 +536,16 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ } } }, - // { - // label: '操作', - // field: 'action', - // isDetail: false, - // isForm: false, - // table: { - // width: 120, - // fixed: 'right' - // }, - // } + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 120, + fixed: 'right' + }, + } ])) //表单校验 diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index f0b49ad0f..35c8b1956 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -70,7 +70,7 @@ max-height="450px" > import download from '@/utils/download' -import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, BackflushRecordDetailb } from './productreceiptAssembleRecordMain.data' +import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, ProductreceiptDetailb } from './productreceiptAssembleRecordMain.data' import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain' import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb' +import * as ProductreceiptDetailbApi from '@/api/wms/productreceiptDetailb' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' // 装配收货记录主 @@ -118,7 +118,7 @@ const buttondataTable = ref([{ const DialogTitle = ref('Bom信息') const bomModelVisible = ref(false) const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ - getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage + getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage }) const { getList:getDetailListBom } = detatableMethodsBom diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts index 17a217872..0de0fb58e 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts @@ -956,4 +956,117 @@ export const BackflushRecordDetailbRules = reactive({ creator: [ { required: true, message: '请输入创建者', trigger: 'blur' } ], -}) \ No newline at end of file +}) + +// 表单校验 +export const ProductreceiptDetailbRules = reactive({ + masterId: [required], +}) + +export const ProductreceiptDetailb = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + }, + { + label: '外部零件号', + field: 'outsideItemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '外部生产日期', + field: 'outsideProduceDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '外部流水号', + field: 'outsideSerialNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))