Browse Source

新一版本

master
parent
commit
f78b71403b
  1. 1
      src/api/eam/device/deviceInspectionDetail/index.ts
  2. 8
      src/api/eam/device/deviceInspectionMain/index.ts
  3. 8
      src/api/eam/device/deviceMaintenanceMain/index.ts
  4. 6
      src/api/eam/mold/moldMaintenanceMain/index.ts
  5. 23
      src/components/Detail/src/Detail.vue
  6. 4
      src/utils/disposition/defaultButtons.ts
  7. 10
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  8. 10
      src/views/eam/basic/inspection/inspection.data.ts
  9. 11
      src/views/eam/basic/item/item.data.ts
  10. 11
      src/views/eam/basic/location/location.data.ts
  11. 10
      src/views/eam/basic/locationArea/locationArea.data.ts
  12. 10
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  13. 11
      src/views/eam/basic/supplier/supplier.data.ts
  14. 1
      src/views/eam/device/deviceAccounts/index.vue
  15. 11
      src/views/eam/device/deviceRepair/index.vue
  16. 15
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  17. 98
      src/views/eam/device/deviceinspectionjob/index.vue
  18. 29
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  19. 22
      src/views/eam/device/devicemaintenancejob/index.vue
  20. 24
      src/views/eam/item/adjustRecord/adjustRecord.data.ts
  21. 16
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  22. 24
      src/views/eam/item/countRecord/countRecord.data.ts
  23. 12
      src/views/eam/item/countadjustWork/countadjustWork.data.ts
  24. 40
      src/views/eam/item/itemAccounts/index.vue
  25. 6
      src/views/eam/item/itemApplyMain/index.vue
  26. 20
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  27. 19
      src/views/eam/mold/moldinspectionjob/index.vue
  28. 34
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  29. 2
      src/views/eam/mold/moldmaintainjob/index.vue
  30. 24
      src/views/eam/mold/moldmaintenancejob/index.vue
  31. 35
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

1
src/api/eam/device/deviceInspectionDetail/index.ts

@ -14,7 +14,6 @@ export interface DeviceInspectionDetailVO {
completionTime: Date completionTime: Date
engineer: string engineer: string
uncompleted: string uncompleted: string
status: string
} }
// 查询检修工单子列表 // 查询检修工单子列表

8
src/api/eam/device/deviceInspectionMain/index.ts

@ -54,11 +54,5 @@ export const exportDeviceInspectionMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: `/eam/device-inspection-job-main/get-import-template` }) return request.download({ url: '/eam/device-inspection-job-main/get-import-template' })
}
// 检修完成
export const finishInspection = (id: number) => {
return request.get({ url: `/eam/device-inspection-job-main/onClick?id=` + id })
} }

8
src/api/eam/device/deviceMaintenanceMain/index.ts

@ -71,11 +71,3 @@ export const orderTurnTo = async (data: DeviceMaintenanceMainVO) => {
export const getDeviceMainTempList = async (type: String) => { export const getDeviceMainTempList = async (type: String) => {
return await request.get({ url: `/eam/device-maintenance-job-main/getList?type=` + type }) return await request.get({ url: `/eam/device-maintenance-job-main/getList?type=` + type })
} }
// 完成维修工单
export const finishOrder = async (params) => {
return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params})
}

6
src/api/eam/mold/moldMaintenanceMain/index.ts

@ -72,9 +72,3 @@ export const orderTurnTo = async (data: MoldMaintenanceMainVO) => {
export const getMoldMainTempList = async (type: String) => { export const getMoldMainTempList = async (type: String) => {
return await request.get({ url: `/eam/device-maintenance-job-main/getList?type=` + type }) return await request.get({ url: `/eam/device-maintenance-job-main/getList?type=` + type })
} }
// 完成维修工单
export const finishOrder = async (params) => {
return await request.get({ url: `/eam/device-maintenance-job-main/orderClick`, params})
}

23
src/components/Detail/src/Detail.vue

@ -283,11 +283,6 @@ const props = defineProps({
required: false, required: false,
default: undefined default: undefined
}, },
openFormCallBack: {
type: Function,
required: false,
default: undefined
},
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
@ -496,21 +491,22 @@ const openForm = async (type: string, row?: number) => {
} }
} }
} }
if (await props.openFormCallBack) { //
props.openFormCallBack(type, row, masterParmas.value, () => { let callbackTriggered = false;
formRef.value.open(type, row, masterParmas.value) // openFormCallBacklist
}) emit('openFormCallBack', type, row, masterParmas.value, () => {
} else { callbackTriggered = true; //
});
nextTick(() => { // 使nextTick
if (!callbackTriggered) { // openFormCallBack
formRef.value.open(type, row, masterParmas.value); formRef.value.open(type, row, masterParmas.value);
} }
});
} }
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.masterId = masterParmas.value.masterId
try { try {
const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return
emit('detailSubmitForm', formType, data, getList, formRef.value) emit('detailSubmitForm', formType, data, getList, formRef.value)
} finally { } finally {
// formRef.value.formLoading = false // formRef.value.formLoading = false
@ -531,6 +527,7 @@ const emit = defineEmits([
'openImage', 'openImage',
'detailSubmitForm', 'detailSubmitForm',
'detailOnChange', 'detailOnChange',
'openFormCallBack',
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {

4
src/utils/disposition/defaultButtons.ts

@ -961,10 +961,10 @@ export function verifyOrderBtn(option:any) {
} }
// 主列表-检修 // 主列表-检修
export function mainInspectionOrderBtn(option:any) { export function maintenanceOrderBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: '检修', label: '检修',
name: 'mainInspectionOrder', name: 'maintenanceOrder',
hide: false, hide: false,
type: 'primary', type: 'primary',
color: '', color: '',

10
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -174,6 +174,16 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

10
src/views/eam/basic/inspection/inspection.data.ts

@ -144,6 +144,16 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

11
src/views/eam/basic/item/item.data.ts

@ -1,4 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const ItemRules = reactive({ export const ItemRules = reactive({
@ -243,6 +244,16 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '描述', label: '描述',
field: 'describes', field: 'describes',

11
src/views/eam/basic/location/location.data.ts

@ -1,4 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as LocationAreaApi from '@/api/eam/basic/locationArea' import * as LocationAreaApi from '@/api/eam/basic/locationArea'
import { LocationArea } from '../locationArea/locationArea.data' import { LocationArea } from '../locationArea/locationArea.data'
@ -121,6 +122,16 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '描述', label: '描述',
field: 'description', field: 'description',

10
src/views/eam/basic/locationArea/locationArea.data.ts

@ -68,6 +68,16 @@ export const LocationArea = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '描述', label: '描述',

10
src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts

@ -147,6 +147,16 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

11
src/views/eam/basic/supplier/supplier.data.ts

@ -1,4 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {validateHanset,validateFax,validatePostCode,validateYS} from '@/utils/validator' import {validateHanset,validateFax,validatePostCode,validateYS} from '@/utils/validator'
// 表单校验 // 表单校验
@ -77,6 +78,16 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

1
src/views/eam/device/deviceAccounts/index.vue

@ -228,6 +228,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'selectItem') { } else if (val == 'selectItem') {
openItem(row.number) openItem(row.number)
} else if (val == 'qrCode') { } else if (val == 'qrCode') {
debugger
window.open(src.value + "&number='" + row.number + "'") window.open(src.value + "&number='" + row.number + "'")
} else { } else {
// //

11
src/views/eam/device/deviceRepair/index.vue

@ -295,12 +295,11 @@ function handleBackout(row) {
} }
const onChange = (field, cur, item) => { const onChange = (field, cur, item) => {
if (field == 'factoryAreaNumber') { // if (field == 'factoryAreaNumber') {
//
DeviceRepair.allSchemas.formSchema.find(item => { // //
return item.field == 'deviceNumber' // DeviceRepair.allSchemas.formSchema
}).value = null // }
}
} }

15
src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts

@ -318,9 +318,7 @@ export const DeviceInspectionDetailRules = reactive({
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'} { validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
], ],
number: [required], number: [required],
actualMinutes: [ estimatedMinutes: [required],
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
],
maintenance: [required], maintenance: [required],
}) })
@ -479,15 +477,12 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '未完成原因', label: '未完成原因',
field: 'uncompleted', field: 'uncompleted',
sort: 'custom', sort: 'custom',
table: {
width: '150',
},
isSearch: false, isSearch: false,
isForm: true,
isTable: true, isTable: true,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
disabled: true,
}
}
}, },
{ {
label: '备件', label: '备件',

98
src/views/eam/device/deviceinspectionjob/index.vue

@ -70,8 +70,7 @@
:detailValidate="detailValidate" :detailValidate="detailValidate"
@detailSubmitForm="detailSubmitForm" @detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
:openFormCallBack="openFormCallBack" @openFormCallBack="openFormCallBack"
@detailOnChange="detailOnChange"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -189,7 +188,7 @@ const butttondata = (row) => {
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), //
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn(null), //
defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.maintenanceOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
] ]
} }
@ -198,8 +197,8 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'mainInspectionOrder') { // } else if (val == 'maintenanceOrder') { //
openDetail(row, '代码', row.number) handleMaintenanceOrder(row)
} else if (val == 'finishOrder') { // } else if (val == 'finishOrder') { //
handleFinishOrder(row) handleFinishOrder(row)
} }
@ -313,32 +312,6 @@ function handleMaintenanceOrder(row) {
} }
function handleFinishOrder(row) { function handleFinishOrder(row) {
let param = {
masterId : row.id
}
DeviceInspectionDetailApi.getDeviceInspectionDetailPage(param
).then(response => {
if (response != null) {
if (response.list.length == 0) {
message.error(t('请先填写并完成检修明细内容!'))
} else {
let unFinishedList = response.list.filters(item => {
return item.status == 0
})
if (unFinishedList != null && unFinishedList.length > 0) {
message.error(t('请先完成各检修明细内容!'))
return
} else {
DeviceInspectionMainApi.finishInspection(row.id).then(res => {
message.success(t('common.finishSuccess'))
getList()
})
}
}
} else {
message.error(t('common.finishFail'))
}
})
} }
@ -387,26 +360,16 @@ const detailOpenForm = (type, row) => {
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
// return true; return true;
let tag = false; let tag = false;
// if (data.qty <= 0) { if (data.qty <= 0) {
// message.warning('0') message.warning('数量必须大于0')
// tag = false; tag = false;
// return tag; return tag;
// } else {
// tag = true;
// return tag;
// }
let req = DeviceInspectionDetailRules.uncompleted?.find(item => {
return item.required == true
})
if (req !== undefined) {
tag = false
message.warning('需填入未完成原因')
} else { } else {
tag = true tag = true;
return tag;
} }
return tag
} }
// //
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => { const detailSubmitForm = async (formType, data, getList, formRef, tableList) => {
@ -414,14 +377,12 @@ const detailSubmitForm = async (formType, data, getList, formRef, tableList) =>
try { try {
let data1 = { let data1 = {
id: data.id, id: data.id,
number: data.number, number: data.maintenanceNumber,
masterId: data.masterId,
siteId: data.siteId, siteId: data.siteId,
available: data.available, available: data.available,
concurrencyStamp: data.concurrencyStamp, concurrencyStamp: data.concurrencyStamp,
name: data.name, name: data.name,
peoples: data.peoples, peoples: data.peoples,
status: data.status,
estimatedMinutes: data.estimatedMinutes, estimatedMinutes: data.estimatedMinutes,
actualMinutes: data.actualMinutes, actualMinutes: data.actualMinutes,
chargePeoples: data.chargePeoples.join(','), chargePeoples: data.chargePeoples.join(','),
@ -497,41 +458,6 @@ const submitForm = async (formType, data) => {
} }
} }
function detailOnChange(field, cur, item) {
if (field == 'status') {
if (cur == '1') {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceInspectionDetailRules.uncompleted = [required]
} else {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted;
}
}
}
const openFormCallBack = (type, row, masterParmas, callback) => {
if (row == undefined || row == null) {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted;
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else {
if (row.status == '1') {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceInspectionDetailRules.uncompleted = [required]
} else {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted;
}
}
callback()
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

29
src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts

@ -219,30 +219,6 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{
label: '是否完成',
field: 'status',
sort: 'custom',
table: {
width: '150',
},
isSearch: false,
isTable: true,
dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS,
dictClass: 'string',
form: {
component: 'Select',
componentProps: {
disabled: false,
}
},
tableForm: {
type: 'Select',
componentProps: {
disabled: false,
}
},
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -320,7 +296,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
api: () => userListAll, api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue) => { formatter: (_: Recordable, __: TableColumn, cellValue) => {
return userListAll.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.nickname)?.join(',') return userListAll.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',')
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
@ -352,9 +328,6 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenances1', field: 'maintenances1',
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: { table: {
width: 150 width: 150
} }

22
src/views/eam/device/devicemaintenancejob/index.vue

@ -83,7 +83,7 @@
:detailValidate="detailValidate" :detailValidate="detailValidate"
@detailSubmitForm="detailSubmitForm" @detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
:openFormCallBack="openFormCallBack" @openFormCallBack="openFormCallBack"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -291,12 +291,8 @@ const buttonTableClick = async (val, row) => {
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'acceptOrder') { } else if (val == 'acceptOrder') {
acceptOrder(row) acceptOrder(row)
} else if (val == 'repair') {
openDetail(row, '代码', row.number)
} else if (val == 'turnOrder') { } else if (val == 'turnOrder') {
openForm('turnOrder', row) openForm('turnOrder', row)
} else if (val == 'finish') {
finishOrder(row)
} else if (val == 'picture') { } else if (val == 'picture') {
showView.value = true showView.value = true
urls.value = row.filePathList urls.value = row.filePathList
@ -379,19 +375,7 @@ function acceptOrder(row) {
// //
function turnOrder() {} function turnOrder() {}
// //
function finishOrder(row) { function finishOrder() {}
let param = {
id: row.id,
number: row.number,
status: row.status,
result: 'COMPLETED',
requestNumber: row.requestNumber,
}
DeviceMaintenanceMainApi.finishOrder(param).then(res => {
getList()
message.success('操作成功')
})
}
// //
function verifyOrder() {} function verifyOrder() {}
// //
@ -520,6 +504,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
} }
const openFormCallBack = (type, row, masterParmas,callback) => { const openFormCallBack = (type, row, masterParmas,callback) => {
if (type === 'create') {
if (operatRecord.value.type == 'TECH') { if (operatRecord.value.type == 'TECH') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => { DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') { if (item.field == 'maintenances') {
@ -549,6 +534,7 @@ const openFormCallBack = (type, row, masterParmas,callback) => {
}) })
} }
} }
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

24
src/views/eam/item/adjustRecord/adjustRecord.data.ts

@ -107,6 +107,18 @@ export const AdjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2
}
}, },
{ {
label: '盘点数量', label: '盘点数量',
@ -117,6 +129,18 @@ export const AdjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2
}
}, },
{ {
label: '操作', label: '操作',

16
src/views/eam/item/applicationRecord/applicationRecordMain.data.ts

@ -188,14 +188,14 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
{ {
@ -208,14 +208,14 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },

24
src/views/eam/item/countRecord/countRecord.data.ts

@ -147,6 +147,18 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2
}
}, },
{ {
label: '盘点数量', label: '盘点数量',
@ -157,6 +169,18 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2
}
}, },
{ {
label: '操作', label: '操作',

12
src/views/eam/item/countadjustWork/countadjustWork.data.ts

@ -118,6 +118,18 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180, width: 180,
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2
}
}, },
{ {
label: '操作', label: '操作',

40
src/views/eam/item/itemAccounts/index.vue

@ -5,28 +5,15 @@
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="ItemAccounts.allSchemas" />
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemAccounts.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}"> <template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
@ -39,16 +26,9 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef" @success="formsSuccess" :rules="ItemAccountsRules"
ref="basicFormRef" :formAllSchemas="ItemAccounts.allSchemas" :apiUpdate="ItemAccountsApi.updateItemAccounts"
@success="formsSuccess" :apiCreate="ItemAccountsApi.createItemAccounts" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
:rules="ItemAccountsRules"
:formAllSchemas="ItemAccounts.allSchemas"
:apiUpdate="ItemAccountsApi.updateItemAccounts"
:apiCreate="ItemAccountsApi.createItemAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
@ -56,7 +36,8 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/item-accounts/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -323,5 +304,4 @@ onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await ItemAccountsApi.importTemplate() importTemplateData.templateUrl = await ItemAccountsApi.importTemplate()
}) })
</script> </script>

6
src/views/eam/item/itemApplyMain/index.vue

@ -261,6 +261,12 @@
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
try { try {
for (let item of tableData.value) {
if (item.qty > item.currentQty) {
message.error('要货计划数量不得大于订单数量-已计划数量')
return false;
}
}
if (formType === 'create') { if (formType === 'create') {
await ItemApplyMainApi.createItemApplyMain(data) await ItemApplyMainApi.createItemApplyMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

20
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -111,14 +111,14 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', searchListPlaceholder: '请选择备件编号',
searchField: 'number', searchField: 'number',
searchTitle: '库区信息', searchTitle: '备件信息',
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
} },
] ]
}, },
}, },
@ -174,14 +174,14 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
{ {
@ -194,14 +194,14 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 2
} }
}, },

19
src/views/eam/mold/moldinspectionjob/index.vue

@ -159,6 +159,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
debugger
// MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED'; // MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED'; MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema[5].value = 'DEVICE'; MoldInspectionMain.allSchemas.formSchema[5].value = 'DEVICE';
@ -339,16 +340,16 @@ const detailOpenForm = (type, row) => {
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
// return true; return true;
let tag = false; let tag = false;
// if (data.qty <= 0) { if (data.qty <= 0) {
// message.warning('0') message.warning('数量必须大于0')
// tag = false; tag = false;
// return tag; return tag;
// } else { } else {
// tag = true; tag = true;
// return tag; return tag;
// } }
} }
// //
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => { const detailSubmitForm = async (formType, data, getList, formRef, tableList) => {

34
src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts

@ -7,12 +7,9 @@ import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { ItemSearchTable } from '../../basic/item/item.data' import { ItemSearchTable } from '../../basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
import { validateHanset, validateNumDot, validateNum, validateEmail } from '@/utils/validator'
const userStore = useUserStore() const userStore = useUserStore()
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const moldListAll = await MoldAccountsApi.getMoldAccountsAllNoPage({})
const moldListByFactory = moldListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId)
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined }) const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined })
const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 2}) const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 2})
@ -20,20 +17,12 @@ const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD')
// 表单校验 // 表单校验
export const MoldInspectionMainRules = reactive({ export const MoldInspectionMainRules = reactive({
number: [required], number: [required],
deviceNumber: [ // maintenanceNumber: [required],
required, moldNumber: [required],
], factoryAreaNumber: [required],
factoryAreaNumber: [
required,
],
describes: [
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
maintenancePhone: [
{ validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'}
],
status: [required], status: [required],
type: [required], type: [required],
concurrencyStamp: [required],
faultType: [required], faultType: [required],
}) })
@ -91,7 +80,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
api: () => moldList, api: () => moldList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return moldListAll.find((account) => account.number == cellValue)?.name return moldList.find((account) => account.number == cellValue)?.name
}, },
search: { search: {
show: true, show: true,
@ -282,24 +271,13 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
])) ]))
// 表单校验 // 表单校验
export const MoldInspectionDetailRules = reactive({ export const MoldInspectionDetailRules = reactive({
chargePeoples:[
required,
],
estimatedMinutes:[
required,
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
],
number: [required], number: [required],
actualMinutes: [ estimatedMinutes: [required],
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
],
maintenance: [required], maintenance: [required],
}) })
export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '检修编号', label: '检修编号',

2
src/views/eam/mold/moldmaintainjob/index.vue

@ -452,7 +452,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
try { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
number:data.number, maintenanceNumber:data.maintenanceNumber,
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1:data.describes1,
itemNumbers:data.itemNumbers, itemNumbers:data.itemNumbers,

24
src/views/eam/mold/moldmaintenancejob/index.vue

@ -55,13 +55,12 @@
:tableData="tableData" :tableData="tableData"
:apiUpdate="MoldMaintenanceMainApi.updateMoldMaintenanceMain" :apiUpdate="MoldMaintenanceMainApi.updateMoldMaintenanceMain"
:apiCreate="MoldMaintenanceMainApi.createMoldMaintenanceMain" :apiCreate="MoldMaintenanceMainApi.createMoldMaintenanceMain"
:isBusiness="false" :isBusiness="true"
@onChange="onChange" @onChange="onChange"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@success="submitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
/> />
@ -290,10 +289,6 @@ const buttonTableClick = async (val, row) => {
acceptOrder(row) acceptOrder(row)
} else if (val == 'turnOrder') { } else if (val == 'turnOrder') {
openForm('turnOrder', row) openForm('turnOrder', row)
} else if (val == 'finishOrder') {
finishOrder(row)
} else if (val == 'repair') {
openDetail(row, '代码', row.code)
}else if (val == 'picture') { }else if (val == 'picture') {
showView.value = true showView.value = true
urls.value = row.filePathList urls.value = row.filePathList
@ -374,19 +369,7 @@ function acceptOrder(row) {
// //
function turnOrder() {} function turnOrder() {}
// //
function finishOrder(row) { function finishOrder() {}
let param = {
id: row.id,
number: row.number,
status: row.status,
result: 'COMPLETED',
requestNumber: row.requestNumber,
}
MoldMaintenanceMainApi.finishOrder(param).then(res => {
getList()
message.success('操作成功')
})
}
// //
function verifyOrder() {} function verifyOrder() {}
// //
@ -481,8 +464,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
try { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
number: data.number, maintenanceNumber:data.maintenanceNumber,
masterId: data.id,
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1:data.describes1,
itemNumbers:data.itemNumbers, itemNumbers:data.itemNumbers,

35
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -8,7 +8,7 @@ import * as ItemApi from '@/api/eam/basic/item'
const userStore = useUserStore() const userStore = useUserStore()
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
// 表单校验 // 表单校验
export const MoldMaintenanceMainRules = reactive({ export const MoldMaintenanceMainRules = reactive({
number: [required], number: [required],
@ -86,9 +86,6 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
width: '150', width: '150',
}, },
api: () => factoryList, api: () => factoryList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return factoryList.find((account) => account.id == cellValue)?.name
},
search: { search: {
show: true, show: true,
component: 'Select', component: 'Select',
@ -109,7 +106,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
placeholder: "请先选择设备" placeholder: "请先选择模具"
}, },
} }
}, },
@ -192,33 +189,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'Input', component: 'Input',
componentProps:{
type:'textarea'
}
},
},
{
label: '是否完成',
field: 'status',
sort: 'custom',
table: {
width: '150',
},
isSearch: false,
isTable: true,
dictType: DICT_TYPE.WEI_XIU_ORDER_STATUS,
dictClass: 'string',
form: {
component: 'Select',
componentProps: {
disabled: false,
}
},
tableForm: {
type: 'Select',
componentProps: {
disabled: false,
}
}, },
}, },
{ {

Loading…
Cancel
Save