From 962222e84bbd36f623bfa0096849f99e554250d8 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Fri, 8 Nov 2024 09:21:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7bug=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=92=8C=E4=BC=98=E5=8C=96=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 +- .../eam/item/applicationRecordMain/index.ts | 6 + src/utils/disposition/defaultButtons.ts | 13 +++ .../deviceMaintainOrderMain.data.ts | 2 +- .../eam/device/devicemaintainjob/index.vue | 103 ++++++++++++++++- .../applicationRecordMain.data.ts | 58 +++++++++- .../eam/item/applicationRecord/index.vue | 24 ++++ .../item/itemAccounts/itemAccounts.data.ts | 27 ++++- src/views/eam/item/itemApplyMain/index.vue | 14 ++- .../item/itemApplyMain/itemApplyMain.data.ts | 91 ++++++++++++++- .../itemInLocation/itemInLocation.data.ts | 47 ++++++++ .../itemOutLocation/itemOutLocation.data.ts | 41 ++++++- src/views/eam/mold/moldmaintainjob/index.vue | 107 +++++++++++++++++- .../moldMaintainOrderMain.data.ts | 11 +- 14 files changed, 529 insertions(+), 23 deletions(-) diff --git a/.env.development b/.env.development index ee1bd4e..d2e0d50 100644 --- a/.env.development +++ b/.env.development @@ -4,11 +4,11 @@ NODE_ENV=development VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://192.168.0.159:12080' +VITE_BASE_URL='http://192.168.0.229:12081' # VITE_BASE_URL='http://192.168.0.165:12080' # 上传路径 -VITE_UPLOAD_URL='http://192.168.0.159:12080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://192.168.0.229:12081/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api @@ -32,7 +32,7 @@ VITE_SOURCEMAP=false VITE_OUT_DIR=dist # 自定义接口路径 -VITE_INTERFACE_URL='http://192.168.0.159:12080/magic/web/index.html' +VITE_INTERFACE_URL='http://192.168.0.229:12081/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://192.168.0.159:12080' \ No newline at end of file +VITE_JMREPORT_BASE_URL='http://192.168.0.229:12081' \ No newline at end of file diff --git a/src/api/eam/item/applicationRecordMain/index.ts b/src/api/eam/item/applicationRecordMain/index.ts index 207b15a..6a14f19 100644 --- a/src/api/eam/item/applicationRecordMain/index.ts +++ b/src/api/eam/item/applicationRecordMain/index.ts @@ -65,3 +65,9 @@ export const exportApplicationRecordMain = async (params) => { export const importTemplate = () => { return request.download({ url: '/eam/item-apply-request-main/get-import-template' }) } + + +// 关闭工单 +export const updateRequestStatus = async (number) => { + return await request.get({ url: `/eam/item-apply-request-main/updateRequestStatus?number=` + number }) +} \ No newline at end of file diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 0f2543c..70e22f3 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1026,6 +1026,19 @@ export function pictureBtn(option:any) { }) } +// 主列表-完成 +export function uploadImgsBtn(option:any) { + return __defaultBtnOption(option,{ + label: '上传图片', + name: 'uploadImgs', + hide: false, + type: 'success', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-二维码 export function selectQrCodeBatchBtn(option:any) { return __defaultBtnOption(option,{ diff --git a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts index e904e46..baadb2b 100644 --- a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts +++ b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts @@ -251,7 +251,7 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ field: 'action', isForm: false, table: { - width: 200, + width: 260, fixed: 'right' }, isDetail: false, diff --git a/src/views/eam/device/devicemaintainjob/index.vue b/src/views/eam/device/devicemaintainjob/index.vue index cc0e8d5..8d6c50a 100644 --- a/src/views/eam/device/devicemaintainjob/index.vue +++ b/src/views/eam/device/devicemaintainjob/index.vue @@ -124,6 +124,32 @@ + + + + + + + 提交 + + + + + + + diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts index 4a9d03d..c37454e 100644 --- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts +++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts @@ -65,6 +65,27 @@ export const ItemApplyMain = useCrudSchemas(reactive([ field: 'name', sort: 'custom', }, + + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isTable: true, + table: { + width: 180, + }, + 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: '操作', @@ -156,6 +177,15 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ } } }, + { + label: '备件名称', + field: 'name', + sort: 'custom', + isTable: true, + table: { + width: 150 + }, + }, { label: '类型', field: 'type', @@ -172,6 +202,15 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ disabled: false } }, + { + label: '规格型号', + field: 'specifications', + sort: 'custom', + isTable: true, + table: { + width: 150 + }, + }, { label: '设备/模具编号', field: 'deviceNumber', @@ -237,7 +276,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ } }, { - label: '库存数量', + label: '(库内或库外)库存数量', field: 'currentQty', sort: 'custom', table: { @@ -256,7 +295,55 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ type: 'InputNumber', min: 0, precision: 2 - } + }, + }, + { + label: '库存总数', + field: 'totalStockQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 0, + precision: 2 + }, + isTable:false, + }, + { + label: '已申请库存数量', + field: 'requestQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 0, + precision: 2 + }, + isTable:false, + }, + { + label: '可申请库存数量', + field: 'availableQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 0, + precision: 2 + }, + isTable:false, }, // { // label: '是否账内库', diff --git a/src/views/eam/item/itemInLocation/itemInLocation.data.ts b/src/views/eam/item/itemInLocation/itemInLocation.data.ts index 72d5de9..7fc89a5 100644 --- a/src/views/eam/item/itemInLocation/itemInLocation.data.ts +++ b/src/views/eam/item/itemInLocation/itemInLocation.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import * as UserApi from '@/api/system/user' +const userListAll = await UserApi.getSimpleUserList() // 表单校验 export const ItemInLocationRules = reactive({ @@ -13,18 +15,45 @@ 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: '类型', @@ -33,6 +62,9 @@ export const ItemInLocation = useCrudSchemas(reactive([ isSearch: false, dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, dictClass: 'string', + table: { + width: 150 + }, form: { component: 'Select' }, @@ -42,6 +74,21 @@ export const ItemInLocation = useCrudSchemas(reactive([ field: 'qty', sort: 'custom', isSearch: false, + table: { + width: 150 + }, + }, + { + label: '创建人', + field: 'creator', + sort: 'custom', + isTable: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userListAll.find((account) => account.id == cellValue)?.nickname + }, + table: { + width: 150 + }, }, { label: '操作', diff --git a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts index 605687a..8c24ae1 100644 --- a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts +++ b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const ItemOutLocationRules = reactive({ @@ -13,18 +14,36 @@ 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: 'itemNumber', + label: '出库编号', + field: 'number', sort: 'custom', isSearch: true, + table: { + width: 180, + }, }, { label: '库位编号', field: 'locationNumber', sort: 'custom', isSearch: true, + table: { + width: 180, + }, }, { label: '类型', @@ -36,12 +55,30 @@ export const ItemOutLocation = useCrudSchemas(reactive([ form: { component: 'Select' }, + table: { + width: 180, + }, }, { label: '数量', field: 'qty', sort: 'custom', isSearch: false, + table: { + width: 180, + }, + }, + + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isTable: true, + table: { + width: 180, + }, + isForm: false }, { label: '操作', diff --git a/src/views/eam/mold/moldmaintainjob/index.vue b/src/views/eam/mold/moldmaintainjob/index.vue index 13d8ba9..1d0249f 100644 --- a/src/views/eam/mold/moldmaintainjob/index.vue +++ b/src/views/eam/mold/moldmaintainjob/index.vue @@ -125,6 +125,33 @@ + + + + + + + 提交 + + + + + + +