diff --git a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts index d248ef8..f234cde 100644 --- a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts +++ b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts @@ -174,6 +174,16 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/inspection/inspection.data.ts b/src/views/eam/basic/inspection/inspection.data.ts index 6407f86..bc98bd3 100644 --- a/src/views/eam/basic/inspection/inspection.data.ts +++ b/src/views/eam/basic/inspection/inspection.data.ts @@ -144,6 +144,16 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index ef3723c..de8f673 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const ItemRules = reactive({ @@ -243,6 +244,16 @@ export const Item = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '描述', field: 'describes', diff --git a/src/views/eam/basic/location/location.data.ts b/src/views/eam/basic/location/location.data.ts index d6259df..2131184 100644 --- a/src/views/eam/basic/location/location.data.ts +++ b/src/views/eam/basic/location/location.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' import * as LocationAreaApi from '@/api/eam/basic/locationArea' import { LocationArea } from '../locationArea/locationArea.data' @@ -121,6 +122,16 @@ export const Location = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '描述', field: 'description', diff --git a/src/views/eam/basic/locationArea/locationArea.data.ts b/src/views/eam/basic/locationArea/locationArea.data.ts index 043b8aa..bd9f236 100644 --- a/src/views/eam/basic/locationArea/locationArea.data.ts +++ b/src/views/eam/basic/locationArea/locationArea.data.ts @@ -68,6 +68,16 @@ export const LocationArea = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '描述', diff --git a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts index 007d025..89fc56e 100644 --- a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts +++ b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts @@ -147,6 +147,16 @@ export const MoldMaintenance = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/supplier/supplier.data.ts b/src/views/eam/basic/supplier/supplier.data.ts index d06aec8..a59fa8a 100644 --- a/src/views/eam/basic/supplier/supplier.data.ts +++ b/src/views/eam/basic/supplier/supplier.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' import {validateHanset,validateFax,validatePostCode,validateYS} from '@/utils/validator' // 表单校验 @@ -77,6 +78,16 @@ export const Supplier = useCrudSchemas(reactive([ } } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, { label: '备注', field: 'remark', diff --git a/src/views/eam/item/adjustRecord/adjustRecord.data.ts b/src/views/eam/item/adjustRecord/adjustRecord.data.ts index fff1ebf..af5e7b2 100644 --- a/src/views/eam/item/adjustRecord/adjustRecord.data.ts +++ b/src/views/eam/item/adjustRecord/adjustRecord.data.ts @@ -107,6 +107,18 @@ export const AdjustRecordDetail = useCrudSchemas(reactive([ table: { width: 180, }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, { label: '盘点数量', @@ -117,6 +129,18 @@ export const AdjustRecordDetail = useCrudSchemas(reactive([ table: { width: 180, }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, { label: '操作', diff --git a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts index c83aa89..0160659 100644 --- a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts +++ b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts @@ -63,16 +63,16 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ disabled: true } }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 200, - fixed: 'right' - } - } + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } ])) //表单校验 @@ -152,8 +152,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ disabled: false } }, - - + + { label: '设备/模具编号', field: 'deviceNumber', @@ -164,17 +164,17 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ searchListPlaceholder: '请选择单号', searchField: 'number', searchTitle: '单号信息', - searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 - searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: "TRUE", isMainValue: false }, { - key: 'type', - value: "type", - isMainValue: true - } + key: 'type', + value: "type", + isMainValue: true + } ] }, }, @@ -188,14 +188,14 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 1, - precision: 6 + min: 0, + precision: 2 } }, tableForm: { type: 'InputNumber', - min: 1, - precision: 6 + min: 0, + precision: 2 } }, { @@ -205,21 +205,21 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ table: { width: 150 }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - } - }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 - } + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, - - + + { label: '是否可用', field: 'available', @@ -236,8 +236,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ disabled: true } }, - - + + { label: '是否以旧换新', field: 'isRadeIn', diff --git a/src/views/eam/item/countRecord/countRecord.data.ts b/src/views/eam/item/countRecord/countRecord.data.ts index 9b5297a..d534c5e 100644 --- a/src/views/eam/item/countRecord/countRecord.data.ts +++ b/src/views/eam/item/countRecord/countRecord.data.ts @@ -147,6 +147,18 @@ export const CountRecordDetail = useCrudSchemas(reactive([ table: { width: 180, }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, { label: '盘点数量', @@ -157,6 +169,18 @@ export const CountRecordDetail = useCrudSchemas(reactive([ table: { width: 180, }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, { label: '操作', diff --git a/src/views/eam/item/countadjustWork/countadjustWork.data.ts b/src/views/eam/item/countadjustWork/countadjustWork.data.ts index 89aa3cb..2453aa3 100644 --- a/src/views/eam/item/countadjustWork/countadjustWork.data.ts +++ b/src/views/eam/item/countadjustWork/countadjustWork.data.ts @@ -118,6 +118,18 @@ export const CountJobDetail = useCrudSchemas(reactive([ table: { width: 180, }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } }, { label: '操作', diff --git a/src/views/eam/item/itemAccounts/index.vue b/src/views/eam/item/itemAccounts/index.vue index a1669bc..6c9ae75 100644 --- a/src/views/eam/item/itemAccounts/index.vue +++ b/src/views/eam/item/itemAccounts/index.vue @@ -4,29 +4,16 @@ - - + + - + }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" + v-model:sort="tableObject.sort"> diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue index 28798d6..2d7bd1a 100644 --- a/src/views/eam/item/itemApplyMain/index.vue +++ b/src/views/eam/item/itemApplyMain/index.vue @@ -261,6 +261,12 @@ const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { + for (let item of tableData.value) { + if (item.qty > item.currentQty) { + message.error('要货计划数量不得大于订单数量-已计划数量') + return false; + } + } if (formType === 'create') { await ItemApplyMainApi.createItemApplyMain(data) message.success(t('common.createSuccess')) diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts index f4cb95b..848de51 100644 --- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts +++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts @@ -21,7 +21,7 @@ export const ItemApplyMain = useCrudSchemas(reactive([ fixed: 'left' }, }, - { + { label: '申领人', field: 'applyName', sort: 'custom', @@ -111,135 +111,135 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ isInpuFocusShow: true, searchListPlaceholder: '请选择备件编号', searchField: 'number', - searchTitle: '库区信息', + searchTitle: '备件信息', searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', isMainValue: false - } + }, ] }, }, - { - label: '类型', - field: 'type', - sort: 'custom', - dictType: DICT_TYPE.DEVICE_MOLD_TYPE, - dictClass: 'string', - isSearch: true, - isTable: true, - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: false + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: false + } + }, + + + { + label: '设备/模具编号', + field: 'deviceNumber', + sort: 'custom', + isSearch: true, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择单号', + searchField: 'number', + searchTitle: '单号信息', + searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: "TRUE", + isMainValue: false + }, { + key: 'type', + value: "type", + isMainValue: true } + ] }, - - - { - label: '设备/模具编号', - field: 'deviceNumber', - sort: 'custom', - isSearch: true, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择单号', - searchField: 'number', - searchTitle: '单号信息', - searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 - searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: "TRUE", - isMainValue: false - }, { - key: 'type', - value: "type", - isMainValue: true - } - ] - }, + }, + { + label: '申领数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 }, - { - label: '申领数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - } - }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 } }, - { - label: '库存数量', - field: 'currentQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - } - }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 - } + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } + }, + { + label: '库存数量', + field: 'currentQty', + sort: 'custom', + table: { + width: 150 }, - - - { - label: '是否可用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 } }, - - - { - label: '是否以旧换新', - field: 'isRadeIn', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - } + tableForm: { + type: 'InputNumber', + min: 0, + precision: 2 + } + }, + + + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 }, + tableForm: { + type: 'Select', + disabled: true + } + }, + + + { + label: '是否以旧换新', + field: 'isRadeIn', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, { label: '备注', field: 'remark',