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. 27
      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. 76
      src/views/eam/device/devicemaintenancejob/index.vue
  20. 24
      src/views/eam/item/adjustRecord/adjustRecord.data.ts
  21. 64
      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. 516
      src/views/eam/item/itemAccounts/index.vue
  25. 6
      src/views/eam/item/itemApplyMain/index.vue
  26. 214
      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. 28
      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
engineer: 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 = () => {
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 })
return request.download({ url: '/eam/device-inspection-job-main/get-import-template' })
}

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

@ -71,11 +71,3 @@ export const orderTurnTo = async (data: DeviceMaintenanceMainVO) => {
export const getDeviceMainTempList = async (type: String) => {
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) => {
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})
}

27
src/components/Detail/src/Detail.vue

@ -283,11 +283,6 @@ const props = defineProps({
required: false,
default: undefined
},
openFormCallBack: {
type: Function,
required: false,
default: undefined
},
})
const isShowDrawer = 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, () => {
formRef.value.open(type, row, masterParmas.value)
})
} else {
formRef.value.open(type, row, masterParmas.value);
}
//
let callbackTriggered = false;
// openFormCallBacklist
emit('openFormCallBack', type, row, masterParmas.value, () => {
callbackTriggered = true; //
});
nextTick(() => { // 使nextTick
if (!callbackTriggered) { // openFormCallBack
formRef.value.open(type, row, masterParmas.value);
}
});
}
// form
const submitForm = async (formType, data) => {
data.masterId = masterParmas.value.masterId
try {
const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return
emit('detailSubmitForm', formType, data, getList, formRef.value)
} finally {
// formRef.value.formLoading = false
@ -531,6 +527,7 @@ const emit = defineEmits([
'openImage',
'detailSubmitForm',
'detailOnChange',
'openFormCallBack',
])
/** 删除按钮操作 */
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,{
label: '检修',
name: 'mainInspectionOrder',
name: 'maintenanceOrder',
hide: false,
type: 'primary',
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: '操作',
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: '操作',
field: 'action',

11
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<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{
label: '描述',
field: 'describes',

11
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<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{
label: '描述',
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: '描述',

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: '操作',
field: 'action',

11
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<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{
label: '备注',
field: 'remark',

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

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

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

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

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

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

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

@ -70,8 +70,7 @@
:detailValidate="detailValidate"
@detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true"
:openFormCallBack="openFormCallBack"
@detailOnChange="detailOnChange"
@openFormCallBack="openFormCallBack"
/>
<!-- 导入 -->
@ -189,7 +188,7 @@ const butttondata = (row) => {
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), //
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)) }), //
]
}
@ -198,8 +197,8 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'mainInspectionOrder') { //
openDetail(row, '代码', row.number)
} else if (val == 'maintenanceOrder') { //
handleMaintenanceOrder(row)
} else if (val == 'finishOrder') { //
handleFinishOrder(row)
}
@ -313,32 +312,6 @@ function handleMaintenanceOrder(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) => {
// return true;
return true;
let tag = false;
// if (data.qty <= 0) {
// message.warning('0')
// tag = false;
// return tag;
// } else {
// tag = true;
// return tag;
// }
let req = DeviceInspectionDetailRules.uncompleted?.find(item => {
return item.required == true
})
if (req !== undefined) {
tag = false
message.warning('需填入未完成原因')
if (data.qty <= 0) {
message.warning('数量必须大于0')
tag = false;
return tag;
} else {
tag = true
tag = true;
return tag;
}
return tag
}
//
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => {
@ -414,14 +377,12 @@ const detailSubmitForm = async (formType, data, getList, formRef, tableList) =>
try {
let data1 = {
id: data.id,
number: data.number,
masterId: data.masterId,
number: data.maintenanceNumber,
siteId: data.siteId,
available: data.available,
concurrencyStamp: data.concurrencyStamp,
name: data.name,
peoples: data.peoples,
status: data.status,
estimatedMinutes: data.estimatedMinutes,
actualMinutes: data.actualMinutes,
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 () => {
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: '操作',
field: 'action',
@ -320,7 +296,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
api: () => userListAll,
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: {
type: 'Select',
@ -352,9 +328,6 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenances1',
sort: 'custom',
isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: {
width: 150
}

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

@ -83,7 +83,7 @@
:detailValidate="detailValidate"
@detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true"
:openFormCallBack="openFormCallBack"
@openFormCallBack="openFormCallBack"
/>
<!-- 导入 -->
@ -291,12 +291,8 @@ const buttonTableClick = async (val, row) => {
handleDelete(row.id)
} else if (val == 'acceptOrder') {
acceptOrder(row)
} else if (val == 'repair') {
openDetail(row, '代码', row.number)
} else if (val == 'turnOrder') {
openForm('turnOrder', row)
} else if (val == 'finish') {
finishOrder(row)
} else if (val == 'picture') {
showView.value = true
urls.value = row.filePathList
@ -379,19 +375,7 @@ function acceptOrder(row) {
//
function turnOrder() {}
//
function finishOrder(row) {
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 finishOrder() {}
//
function verifyOrder() {}
//
@ -520,33 +504,35 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
}
const openFormCallBack = (type, row, masterParmas,callback) => {
if (operatRecord.value.type == 'TECH') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'TECH', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
} else if (operatRecord.value.type == 'DEVICE') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
} else if (operatRecord.value.type == 'MOLD') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
if (type === 'create') {
if (operatRecord.value.type == 'TECH') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'TECH', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
} else if (operatRecord.value.type == 'DEVICE') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
} else if (operatRecord.value.type == 'MOLD') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }).then(response => {
item.componentProps.options = response
callback();
});
}
})
}
}
}

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

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

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

@ -63,16 +63,16 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
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'
}
}
]))
//表单校验
@ -164,17 +164,17 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
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<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
min: 0,
precision: 2
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
min: 0,
precision: 2
}
},
{
@ -205,18 +205,18 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
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
}
},

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

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

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

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

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

@ -4,29 +4,16 @@
<Search :schema="ItemAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemAccounts.allSchemas"
/>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="ItemAccounts.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
@ -39,289 +26,282 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ItemAccountsRules"
:formAllSchemas="ItemAccounts.allSchemas"
:apiUpdate="ItemAccountsApi.updateItemAccounts"
:apiCreate="ItemAccountsApi.createItemAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<BasicForm ref="basicFormRef" @success="formsSuccess" :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" />
<!-- 详情 -->
<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>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemAccounts,ItemAccountsRules } from './itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'ItemAccounts' })
import download from '@/utils/download'
import { ItemAccounts, ItemAccountsRules } from './itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'ItemAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const locationNumber = ref()
const wantId1 = ref()
routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const locationNumber = ref()
const wantId1 = ref()
routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
const { tableObject, tableMethods } = useTable({
getListApi: ItemAccountsApi.getItemAccountsPage //
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemAccountsApi.getItemAccountsPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemAccounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemAccounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemAccounts:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'eam:itemAccounts:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'eam:itemAccounts:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'eam:itemAccounts:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:itemAccounts:update'}), //
defaultButtons.replaceLocation(null), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'replaceLocation') {
openItem(row.locationNumber,row.id)
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'eam:itemAccounts:update' }), //
defaultButtons.replaceLocation(null), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:itemAccounts:delete' }), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'replaceLocation') {
openItem(row.locationNumber, row.id)
}
}
}
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number: String,wantId: number) => {
locationNumber.value = number
wantId1.value= wantId
searchTableRef.value.open(
'选择备件',
Item.allSchemas,
getDeviceItemList,
null,
Item.allSchemas.searchSchema,
true,
null,
null,
null,
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({
id: wantId1.value,
locationNumber: locationNumber.value,
itemNumber: element.number,
}))
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
message.success(t('更换成功'))
//
getList()
})
}
const getItemWithOutBind = async () => {
try {
const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema,
available:"TRUE"
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number : String, wantId : number) => {
locationNumber.value = number
wantId1.value = wantId
searchTableRef.value.open(
'选择备件',
Item.allSchemas,
getDeviceItemList,
null,
Item.allSchemas.searchSchema,
true,
null,
null,
null,
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({
id: wantId1.value,
locationNumber: locationNumber.value,
itemNumber: element.number,
}))
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
message.success(t('更换成功'))
//
getList()
})
if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema);
// const filteredList = res.list.filter(item => {
// return !response.list?.some(element => {
// return item.number === element.itemNumber
// });
// });
// console.log('filteredList',filteredList);
const filteredList = res.list
return filteredList //
}
return [] //
} catch (error) {
console.error(error)
throw error //
}
}
// getListApi getItemWithOutBind
const getDeviceItemList = async () => {
tableObject.loading = true
try {
const res = await getItemWithOutBind()
let result = {
list: res,
total: res.length
const getItemWithOutBind = async () => {
try {
const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema,
available: "TRUE"
})
if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema);
// const filteredList = res.list.filter(item => {
// return !response.list?.some(element => {
// return item.number === element.itemNumber
// });
// });
// console.log('filteredList',filteredList);
const filteredList = res.list
return filteredList //
}
return [] //
} catch (error) {
console.error(error)
throw error //
}
return result
} catch (error) {
console.error(error)
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemAccounts.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
// getListApi getItemWithOutBind
const getDeviceItemList = async () => {
tableObject.loading = true
try {
const res = await getItemWithOutBind()
let result = {
list: res,
total: res.length
}
return result
} catch (error) {
console.error(error)
} finally {
tableObject.loading = false
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ItemAccountsApi.createItemAccounts(data)
message.success(t('common.createSuccess'))
} else {
await ItemAccountsApi.updateItemAccounts(data)
message.success(t('common.updateSuccess'))
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type : string, row ?: any) => {
basicFormRef.value.open(type, row)
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemAccounts')
}
// form
const formsSuccess = async (formType, data) => {
var isHave = ItemAccounts.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
}
}
if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null;
if (formType === 'create') {
await ItemAccountsApi.createItemAccounts(data)
message.success(t('common.createSuccess'))
} else {
await ItemAccountsApi.updateItemAccounts(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemAccountsApi.deleteItemAccounts(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemAccounts')
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ItemAccountsApi.exportItemAccounts(tableObject.params)
download.excel(data, '备件台账.xlsx')
} catch {
} finally {
exportLoading.value = false
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await ItemAccountsApi.deleteItemAccounts(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备件台账导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ItemAccountsApi.exportItemAccounts(tableObject.params)
download.excel(data, '备件台账.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备件台账导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ItemAccountsApi.importTemplate()
})
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ItemAccountsApi.importTemplate()
})
</script>

6
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'))

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

@ -21,7 +21,7 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
},
{
{
label: '申领人',
field: 'applyName',
sort: 'custom',
@ -111,135 +111,135 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
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
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
},
{
label: '申领数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
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
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
},
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: '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: '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',

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

@ -159,6 +159,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
debugger
// MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED';
MoldInspectionMain.allSchemas.formSchema[5].value = 'DEVICE';
@ -339,16 +340,16 @@ const detailOpenForm = (type, row) => {
// /
const detailValidate = (data) => {
// return true;
return true;
let tag = false;
// if (data.qty <= 0) {
// message.warning('0')
// tag = false;
// return tag;
// } else {
// tag = true;
// return tag;
// }
if (data.qty <= 0) {
message.warning('数量必须大于0')
tag = false;
return tag;
} else {
tag = true;
return tag;
}
}
//
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 { ItemSearchTable } from '../../basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
import { validateHanset, validateNumDot, validateNum, validateEmail } from '@/utils/validator'
const userStore = useUserStore()
const factoryList = await selectAllFactoryArea()
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 dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: undefined })
const engineerList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 2})
@ -20,20 +17,12 @@ const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD')
// 表单校验
export const MoldInspectionMainRules = reactive({
number: [required],
deviceNumber: [
required,
],
factoryAreaNumber: [
required,
],
describes: [
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
maintenancePhone: [
{ validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'}
],
// maintenanceNumber: [required],
moldNumber: [required],
factoryAreaNumber: [required],
status: [required],
type: [required],
concurrencyStamp: [required],
faultType: [required],
})
@ -91,7 +80,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
},
api: () => moldList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return moldListAll.find((account) => account.number == cellValue)?.name
return moldList.find((account) => account.number == cellValue)?.name
},
search: {
show: true,
@ -282,24 +271,13 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
]))
// 表单校验
export const MoldInspectionDetailRules = reactive({
chargePeoples:[
required,
],
estimatedMinutes:[
required,
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
],
number: [required],
actualMinutes: [
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
],
estimatedMinutes: [required],
maintenance: [required],
})
export const MoldInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '检修编号',

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

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

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

@ -55,14 +55,13 @@
:tableData="tableData"
:apiUpdate="MoldMaintenanceMainApi.updateMoldMaintenanceMain"
:apiCreate="MoldMaintenanceMainApi.createMoldMaintenanceMain"
:isBusiness="false"
:isBusiness="true"
@onChange="onChange"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@success="submitForm"
:isSearchTableItem="true"
:isSearchTableItem="true"
/>
<!-- 详情 -->
@ -290,11 +289,7 @@ const buttonTableClick = async (val, row) => {
acceptOrder(row)
} else if (val == 'turnOrder') {
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
urls.value = row.filePathList
viewKey.value += 1
@ -374,19 +369,7 @@ function acceptOrder(row) {
//
function turnOrder() {}
//
function finishOrder(row) {
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 finishOrder() {}
//
function verifyOrder() {}
//
@ -481,8 +464,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
try {
let data1 = {
id:data.id,
number: data.number,
masterId: data.id,
maintenanceNumber:data.maintenanceNumber,
describes:data.describes,
describes1:data.describes1,
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 factoryList = await selectAllFactoryArea()
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({
number: [required],
@ -86,9 +86,6 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
width: '150',
},
api: () => factoryList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return factoryList.find((account) => account.id == cellValue)?.name
},
search: {
show: true,
component: 'Select',
@ -109,7 +106,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
placeholder: "请先选择设备"
placeholder: "请先选择模具"
},
}
},
@ -192,33 +189,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
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