diff --git a/src/api/eam/basic/location/index.ts b/src/api/eam/basic/location/index.ts index 8a4682f..973c1a4 100644 --- a/src/api/eam/basic/location/index.ts +++ b/src/api/eam/basic/location/index.ts @@ -56,7 +56,15 @@ export const getLocationNoPage = async (params) => { // 查询库位列表 export const selectPageByConditions = async (params) => { - return await request.get({ url: `/eam/location/selectPageByConditions`, params }) + + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/location/selectPageByConditionsSenior', data }) + } else { + return await request.get({ url: `/eam/location/selectPageByConditions`, params }) + + } } // 不在台账中的库位 diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index d4654fe..534fd89 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -456,7 +456,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel emit('success', formType.value, data) } finally { - // formLoading.value = false + formLoading.value = false } } } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 54d3980..3f774fd 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -40,7 +40,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: '/redirect/:path(.*)', - name: 'Redirect', + name: 'Redirect1', component: () => import('@/views/redirect/redirect.vue'), meta: {} } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index e198991..e4bda70 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -313,5 +313,7 @@ export enum DICT_TYPE { ITEM_OUT_IN_TYPE = 'item_out_in_type',//备件出入库类型 PUSH_STATUS = 'push_status',//推送状态 MOLD_TIME_SYNC_STATUS = 'mold_time_sync_status',//模具时间同步状态 + PURCHASE_WAY = 'purchase_way',//模具时间同步状态 + } diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index 6e24154..942a1e3 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -4,6 +4,10 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const ItemRules = reactive({ + number: [ + { required: true, message: '请输入备件编号', trigger: 'blur' }, + { max: 20, message: '不得超过20个字符', trigger: 'blur' } + ], name: [ { required: true, message: '请输入备件名称', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } @@ -26,7 +30,7 @@ export const Item = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, - isForm: false, + isForm: true, table: { width: 180, fixed: 'left' @@ -138,6 +142,27 @@ export const Item = useCrudSchemas(reactive([ type: 'Select' } }, + { + label: '采购方式', + field: 'purchaseWay', + sort: 'custom', + dictType: DICT_TYPE.PURCHASE_WAY, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + isSearch: true, + table: { + width: 110, + }, + }, { label: '单价', field: 'singlePrice', diff --git a/src/views/eam/basic/location/location.data.ts b/src/views/eam/basic/location/location.data.ts index 4834ec0..d4dba5d 100644 --- a/src/views/eam/basic/location/location.data.ts +++ b/src/views/eam/basic/location/location.data.ts @@ -38,6 +38,12 @@ export const Location = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + }, { label: '库区编号', field: 'areaNumber', diff --git a/src/views/eam/device/deviceRepair/deviceRepair.data.ts b/src/views/eam/device/deviceRepair/deviceRepair.data.ts index 1dc71e9..2ac0294 100644 --- a/src/views/eam/device/deviceRepair/deviceRepair.data.ts +++ b/src/views/eam/device/deviceRepair/deviceRepair.data.ts @@ -17,6 +17,7 @@ export const DeviceRepairRules = reactive({ number: [required], deviceNumber: [required], factoryAreaNumber: [required], + upload: [required], declarer: [required], faultType: [required], type: [required], diff --git a/src/views/eam/item/itemInLocation/itemInLocation.data.ts b/src/views/eam/item/itemInLocation/itemInLocation.data.ts index 26c0112..88c235f 100644 --- a/src/views/eam/item/itemInLocation/itemInLocation.data.ts +++ b/src/views/eam/item/itemInLocation/itemInLocation.data.ts @@ -16,45 +16,30 @@ export const ItemInLocation = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, - table: { - width: 150 - }, }, { label: '备件编号', field: 'itemNumber', sort: 'custom', isSearch: true, - table: { - width: 150 - }, }, { label: '备件名称', field: 'name', sort: 'custom', isSearch: true, - table: { - width: 180, - }, }, { label: '库位编号', field: 'locationNumber', sort: 'custom', isSearch: true, - table: { - width: 150 - }, }, { label: '规格型号', field: 'specifications', sort: 'custom', isTable: true, - table: { - width: 150 - }, }, { label: '类型', @@ -63,9 +48,6 @@ export const ItemInLocation = useCrudSchemas(reactive([ isSearch: false, dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, dictClass: 'string', - table: { - width: 150 - }, form: { component: 'Select' }, @@ -75,9 +57,6 @@ export const ItemInLocation = useCrudSchemas(reactive([ field: 'qty', sort: 'custom', isSearch: false, - table: { - width: 150 - }, }, { label: '创建人', @@ -87,9 +66,6 @@ export const ItemInLocation = useCrudSchemas(reactive([ formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return userListAll.find((account) => account.id == cellValue)?.nickname }, - table: { - width: 150 - }, }, { label: '创建时间', @@ -97,9 +73,6 @@ export const ItemInLocation = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: true, - table: { - width: 150 - }, search: { component: 'DatePicker', componentProps: { @@ -115,7 +88,6 @@ export const ItemInLocation = useCrudSchemas(reactive([ field: 'action', isForm: false, table: { - width: 150, fixed: 'right' } } diff --git a/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts b/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts index 6002795..7245632 100644 --- a/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts +++ b/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts @@ -39,12 +39,14 @@ export const ItemLocationReplace = useCrudSchemas(reactive([ value:'TRUE', message: '是否可用', isMainValue: false - },{ - key:'qty', - value:'0', - message: '库存数量', - isMainValue: false - },] + }, + // { + // key:'qty', + // value:'0', + // message: '库存数量', + // isMainValue: false + // }, + ] } }, }, diff --git a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts index c15a94f..68f40e4 100644 --- a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts +++ b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts @@ -14,27 +14,18 @@ export const ItemOutLocation = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, - table: { - width: 180, - }, }, { label: '备件名称', field: 'name', sort: 'custom', isSearch: true, - table: { - width: 180, - }, }, { label: '库位编号', field: 'locationNumber', sort: 'custom', isSearch: true, - table: { - width: 180, - }, }, { label: '类型', @@ -46,18 +37,12 @@ export const ItemOutLocation = useCrudSchemas(reactive([ form: { component: 'Select' }, - table: { - width: 180, - }, }, { label: '数量', field: 'qty', sort: 'custom', isSearch: false, - table: { - width: 180, - }, }, { @@ -66,9 +51,6 @@ export const ItemOutLocation = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isTable: true, - table: { - width: 180, - }, isForm: false }, { @@ -76,7 +58,6 @@ export const ItemOutLocation = useCrudSchemas(reactive([ field: 'action', isForm: false, table: { - width: 150, fixed: 'right' } }