From 068282c67af9e6e9389f4d5ca56884324dae3ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 3 Jan 2024 10:04:17 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factoryModeling/workstation/index.vue | 1 + .../workstation/workstation.data.ts | 16 +- .../issue/issueRequestMain/index.vue | 36 +- .../issueRequestMain/issueRequestMain.data.ts | 341 ++++++++++-------- .../productionreturnRequestMain/index.vue | 32 +- .../productionreturnRequestMain.data.ts | 7 +- .../productionreturnRequestMainNo/index.vue | 32 +- .../productdismantleRequestMain.data.ts | 3 + .../productionplan/productionMain/index.vue | 5 + .../productionMain/productionMain.data.ts | 4 +- .../productreceiptRequestMain/index.vue | 38 +- .../productreceiptRequestMain.data.ts | 110 +++--- 12 files changed, 359 insertions(+), 266 deletions(-) diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue index 967d527a1..12a4aaf70 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue @@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +// 工位 defineOptions({ name: 'Workstation' }) const message = useMessage() // 消息弹窗 diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index a85277616..978c21778 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -145,6 +145,14 @@ export const Workstation = useCrudSchemas(reactive([ searchCondition: [{ key: 'available', value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'type', + value: 'FG', + action: '==', + isSearch: true, isMainValue: false }] } @@ -285,7 +293,13 @@ export const WorkstationRules = reactive({ productionLineCode: [ { required: true, message: '请输入生产线代码', trigger: 'change' } ], - available: [ + available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], + rawLocationCode: [ + { required: true, message: '请选择原料库位', trigger: 'change' } + ], + fgLocationCode: [ + { required: true, message: '请选择成品库位', trigger: 'change' } + ], }) \ No newline at end of file diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 954a1856c..7f78e65c2 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -108,6 +108,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else { const setV = {} setV[formField] = val[0][searchField] + if (formField == 'fromWarehouseCode') { + setV['fromWarehouseCode'] = val[0]['code'] + setV['toWarehouseCode'] = val[0]['code'] + } formRef.setValues(setV) } }) @@ -314,22 +318,22 @@ const handleDeleteTable = (item, index) => { const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 // 判断子表中,是否有不同的生产线和工位 - if (tableData.value.length > 0) { - let productionLineCode = tableData.value[0].productionLineCode - let workStationCode = tableData.value[0].workStationCode - for(var i=0;i 0) { + // let productionLineCode = tableData.value[0].productionLineCode + // let workStationCode = tableData.value[0].workStationCode + // for(var i=0;i([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, { label: '车间代码', field: 'workshopCode', @@ -80,39 +94,54 @@ export const IssueRequestMain = useCrudSchemas(reactive([ } }, { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - isForm: false - }, - { - label: '从库位类型范围', - field: 'fromLocationTypes', - // dictType: DICT_TYPE.LOCATION_TYPE, - // dictClass: 'string', - isSearch: true, - isTable: true, sort: 'custom', table: { - width: 150 + width: 180 }, - isForm: false + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, }, { - label: '从库区代码范围', - field: 'fromAreaCodes', + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, sort: 'custom', table: { - width: 150 + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style:{width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } }, - isForm: false }, { - label: '到仓库代码', - field: 'toWarehouseCode', + label: '从库位类型范围', + field: 'fromLocationTypes', + // dictType: DICT_TYPE.LOCATION_TYPE, + // dictClass: 'string', + isSearch: true, + isTable: true, sort: 'custom', table: { width: 150 @@ -132,8 +161,8 @@ export const IssueRequestMain = useCrudSchemas(reactive([ isForm: false }, { - label: '到库区代码范围', - field: 'toAreaCodes', + label: '从库区代码范围', + field: 'fromAreaCodes', sort: 'custom', table: { width: 150 @@ -141,111 +170,65 @@ export const IssueRequestMain = useCrudSchemas(reactive([ isForm: false }, { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 150, - fixed: 'left' - }, - isForm: false, - isSearch: true, - }, - { - label: '业务类型', - field: 'businessType', + label: '到库区代码范围', + field: 'toAreaCodes', sort: 'custom', table: { width: 150 }, - form: { - value: 'Issue', - componentProps: { - disabled: true - } - }, isForm: false }, { - label: '备注', - field: 'remark', + label: '从仓库代码', + field: 'fromWarehouseCode', sort: 'custom', table: { width: 150 }, - isTable: false, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, form: { - component: 'DatePicker', + // labelMessage: '信息提示说明!!!', componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '仓库信息', // 查询弹窗标题 + searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } - }, - isForm: false, + } }, { - label: '创建者', - field: 'creator', + label: '到仓库代码', + field: 'toWarehouseCode', sort: 'custom', table: { width: 150 }, - isForm: false, - }, - { - label: '申请时间', - field: 'requestTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, form: { - component: 'DatePicker', componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + disabled: true } - }, - isForm: false, + } }, { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '业务类型', + field: 'businessType', sort: 'custom', table: { - width: 180 + width: 150 }, form: { - component: 'DatePicker', + value: 'Issue', componentProps: { - style:{width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + disabled: true } }, + isForm: false }, { label: '部门', @@ -254,42 +237,22 @@ export const IssueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - form: { - value: userDept.name, - componentProps: { - disabled: true - } - } - }, - { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, isForm: false, + // form: { + // value: userDept.name, + // componentProps: { + // disabled: true + // } + // } }, { - label: '最后更新者', - field: 'updater', + label: '备注', + field: 'remark', sort: 'custom', table: { width: 150 }, - isForm: false, + isTable: false, }, { label: '使用在途库', @@ -391,52 +354,116 @@ export const IssueRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, { label: '操作', field: 'action', isDetail: false, isForm: false, table: { - width: 300, + width: 200, fixed: 'right' }, } ])) export const IssueRequestMainRules = reactive({ - // workshopCode: [ - // { required: true, message: '请选择车间代码', trigger: 'change' } - // ], - fromWarehouseCode: [ - { required: true, message: '请输入从仓库代码', trigger: 'blur' } + workshopCode: [ + { required: true, message: '请选择车间代码', trigger: 'change' } ], - fromLocationTypes: [ - { required: true, message: '请选择从库位类型范围', trigger: 'change' } - ], - toWarehouseCode: [ - { required: true, message: '请输入到仓库代码', trigger: 'blur' } - ], - toLocationTypes: [ - { required: true, message: '请选择到库位类型范围', trigger: 'change' } - ], - departmentCode: [ - { required: true, message: '请输入部门', trigger: 'blur' } - ], - autoCommit: [ - { required: true, message: '请选择是否自动提交', trigger: 'change' } - ], - autoAgree: [ - { required: true, message: '请选择是否自动通过', trigger: 'change' } - ], - autoExecute: [ - { required: true, message: '请选择是否自动执行', trigger: 'change' } - ], - directCreateRecord: [ - { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } + dueTime: [ + { required: true, message: '请选择截止时间', trigger: 'change' } ], + + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // toWarehouseCode: [ + // { required: true, message: '请输入到仓库代码', trigger: 'blur' } + // ], + // toLocationTypes: [ + // { required: true, message: '请选择到库位类型范围', trigger: 'change' } + // ], + // departmentCode: [ + // { required: true, message: '请输入部门', trigger: 'blur' } + // ], + // autoCommit: [ + // { required: true, message: '请选择是否自动提交', trigger: 'change' } + // ], + // autoAgree: [ + // { required: true, message: '请选择是否自动通过', trigger: 'change' } + // ], + // autoExecute: [ + // { required: true, message: '请选择是否自动执行', trigger: 'change' } + // ], + // directCreateRecord: [ + // { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + // ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], }) /** diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 4c1426c07..aab0303db 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -287,15 +287,23 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'cjbq') { // 创建标签 - detatableData.params = { - masterId:row.id - } - await getDetailList() // 判断 是否已创建标签 - if (detatableData.tableList[0].packingNumber) { + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number + }).then(res => { + if (res) { + if (res.list.length > 0) isCreateLabel = true + } + }) + if (isCreateLabel) { message.warning('已创建过标签!!!') return } + detatableData.params = { + masterId:row.id + } + await getDetailList() // 打开创建标签页面 // dialogVisible.value = true formLabelRef.value.open('create', row) @@ -349,16 +357,16 @@ const buttonTableClick = async (val, row) => { }) } else if (val == 'mainHandle') { // 处理 - await ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage({ - masterId: row.id + // 判断 是否已创建标签 + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number }).then(res => { - if (res.list) { - if (res.list[0].packingNumber) { - isCreateLabel.value = true - } + if (res) { + if (res.list.length > 0) isCreateLabel = true } }) - if (!isCreateLabel.value) { + if (!isCreateLabel) { message.warning('请先创建标签') return } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 6d6f5cbb8..0a89586e8 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -31,6 +31,8 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData =data?.list[0]||{} + console.log(34, requestsettingData) + // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -625,13 +627,13 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive { console.log(err) }) } else if (val == 'cjbq') { // 创建标签 - detatableData.params = { - masterId:row.id - } - await getDetailList() // 判断 是否已创建标签 - if (detatableData.tableList[0].packingNumber) { + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number + }).then(res => { + if (res) { + if (res.list.length > 0) isCreateLabel = true + } + }) + if (isCreateLabel) { message.warning('已创建过标签!!!') return } + detatableData.params = { + masterId:row.id + } + await getDetailList() // 打开创建标签页面 // dialogVisible.value = true formLabelRef.value.open('create', row) @@ -356,16 +364,16 @@ const buttonTableClick = async (val, row) => { }) } else if (val == 'mainHandle') { // 处理 - await ProductionreturnRequestDetailNoApi.getProductionreturnRequestDetailPage({ - masterId: row.id + // 判断 是否已创建标签 + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number }).then(res => { - if (res.list) { - if (res.list[0].packingNumber) { - isCreateLabel.value = true - } + if (res) { + if (res.list.length > 0) isCreateLabel = true } }) - if (!isCreateLabel.value) { + if (!isCreateLabel) { message.warning('请先创建标签') return } diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index 92be1b24a..e114b857b 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -424,6 +424,9 @@ export const ProductdismantleRequestMainRules = reactive({ // fromAreaCodes: [ // { required: true, message: '请选择从库区代码范围', trigger: 'change' } // ], + dueTime: [ + { required: true, message: '请选择截止时间', trigger: 'change' } + ], workshopCode: [ { required: true, message: '请选择车间', trigger: 'change' } ], diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index fae51f46b..212d2af93 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -338,6 +338,11 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { + if(tableData.value.find(item => (item.planQty <= 0))) { + message.warning('数量必须大于0') + formRef.value.formLoading = false + return + } try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index 4164d9122..993b7005b 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -665,13 +665,13 @@ export const ProductionDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6 } }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6 }, }, diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index f66e27a5e..4a264b745 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -311,15 +311,24 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'cjbq') { // 创建标签 - detatableData.params = { - masterId:row.id - } - await getDetailList() + // 判断 是否已创建标签 - if (detatableData.tableList[0].packingNumber) { + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number + }).then(res => { + if (res) { + if (res.list.length > 0) isCreateLabel = true + } + }) + if (isCreateLabel) { message.warning('已创建过标签!!!') return } + detatableData.params = { + masterId:row.id + } + await getDetailList() // 打开创建标签页面 // dialogVisible.value = true formLabelRef.value.open('create', row) @@ -372,16 +381,16 @@ const buttonTableClick = async (val, row) => { }) } else if (val == 'mainHandle') { // 处理 - await ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage({ - masterId: row.id + // 判断 是否已创建标签 + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number }).then(res => { - if (res.list) { - if (res.list[0].packingNumber) { - isCreateLabel.value = true - } + if (res) { + if (res.list.length > 0) isCreateLabel = true } }) - if (!isCreateLabel.value) { + if (!isCreateLabel) { message.warning('请先创建标签') return } @@ -463,6 +472,11 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + if(data.subList.find(item => (item.qty <= 0))) { + message.warning('数量必须大于0') + formRef.value.formLoading = false + return + } try { if (formType === 'create') { await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 4de3fb594..67dbf484b 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -605,50 +605,6 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive isTableForm: false, isForm: false }, - { - label: '生产日期', - field: 'produceDate', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isTableForm: false, - isForm: false - }, - { - label: '过期日期', - field: 'expireDate', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isTableForm: false, - isForm: false - }, { label: '库存状态', field: 'inventoryStatus', @@ -884,13 +840,13 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6 }, }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6 } }, @@ -908,6 +864,56 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive type: 'Select' } }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDateTime', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDateTime', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, { label: '备注', field: 'remark', @@ -1003,12 +1009,12 @@ export const ProductreceiptRequestDetailRules = reactive({ // packingNumber: [ // { required: true, message: '请输入包装号', trigger: 'change' } // ], - // produceDate: [ - // { required: true, message: '请选择生产日期', trigger: 'change' } - // ], - // expireDate: [ - // { required: true, message: '请选择过期日期', trigger: 'change' } - // ], + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], // inventoryStatus: [ // { required: true, message: '请选择库存状态', trigger: 'change' } // ],