diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 45da9ea..5318529 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -451,7 +451,7 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { console.log(val) - console.log(row) + console.log('buttonTableClickRow',row) if (val == 'edit') { // 编辑 openForm('update', row) @@ -491,8 +491,18 @@ const openForm = async (type: string, row?: number) => { } } } - - formRef.value.open(type, row, masterParmas.value) + //打开弹窗 + let callbackTriggered = false; + // 触发openFormCallBack,传递一个回调函数(此处为了修改翻译list信息添加) + 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) => { @@ -516,7 +526,8 @@ const emit = defineEmits([ 'tableFormButton', 'openImage', 'detailSubmitForm', - 'detailOnChange' + 'detailOnChange', + 'openFormCallBack', ]) /** 删除按钮操作 */ const handleDelete = async (id: number) => { diff --git a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts index f1311f9..c950c8e 100644 --- a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts +++ b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts @@ -11,7 +11,7 @@ export const DeviceMaintainPlanRules = reactive({ export const DeviceMaintainPlan = useCrudSchemas(reactive([ { - label: '编号唯一标识', + label: '保养计划编号', field: 'number', sort: 'custom', isSearch: true, diff --git a/src/views/eam/device/deviceRepair/index.vue b/src/views/eam/device/deviceRepair/index.vue index 5ec5f88..3d850a0 100644 --- a/src/views/eam/device/deviceRepair/index.vue +++ b/src/views/eam/device/deviceRepair/index.vue @@ -202,9 +202,11 @@ const formsSuccess = async (formType, data) => { if (data.activeTime == 0) data.activeTime = null; if (data.expireTime == 0) data.expireTime = null; data.result = 'PENDING'; - data.filePathList = data.upload.map((item: any) => { - return item.url - }) + if (data.upload != null && data.upload != "") { + data.filePathList = data?.upload?.map((item: any) => { + return item.url + }) + } if (formType === 'create') { await DeviceRepairApi.createDeviceRepair(data) message.success(t('common.createSuccess')) diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts index e328c92..07d1a8f 100644 --- a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts +++ b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts @@ -1,7 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { selectAllFactoryArea } from '@/api/system/dept' -import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' +import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' import { useUserStore } from '@/store/modules/user' import { selecUserByType } from '@/api/system/dept' import { ItemSearchTable } from '../../basic/item/item.data' @@ -10,15 +10,14 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import * as UserApi from '@/api/system/user' // 邮箱账号的列表 const factoryList = await selectAllFactoryArea() -const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) -const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) +const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) +const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const userListAll = await UserApi.getSimpleUserList() -const moldListNoPage = await MoldAccountsApi.getMoldAccountsAllNoPage({}) -const moldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD') -const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) +const deviceListNoPage = await DeviceAccountsApi.getDeviceAccountsAllNoPage({}) +const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'DEVICE') +const deviceDeviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) // 表单校验 export const DeviceSpotInspectionRecordMainRules = reactive({ - number: [required], deviceNumber: [required], status: [required], type: [required], @@ -34,6 +33,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive MoldAccountsApi.getMoldAccountsNoPage({ + api: () => DeviceAccountsApi.getDeviceAccountsNoPage({ isSearch: false }), formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return moldListNoPage.find((account) => account.number == cellValue)?.name + return deviceListNoPage.find((account) => account.number == cellValue)?.name }, form: { component: 'Select', componentProps: { - options: moldList, + options: deviceList, optionsAlias: { labelField: 'name', valueField: 'number' @@ -112,13 +112,13 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive { - return deviceMoldTypeList.find((account) => account.value == cellValue)?.label + return deviceDeviceTypeList.find((account) => account.value == cellValue)?.label }, isSearch: true, search: { component: 'Select', componentProps: { - options: moldTypeList, + options: deviceTypeList, optionsAlias: { labelField: 'label', valueField: 'value' @@ -128,7 +128,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive @@ -178,9 +179,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ - hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') - }), // 新增 + // defaultButtons.defaultAddBtn({ + // hide: !userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') + // }), // 新增 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -190,8 +191,12 @@ const HeadButttondata = [ const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 - DeviceSpotInspectionRecordMain.allSchemas.formSchema[3].value = 'DEVICE' - DeviceSpotInspectionRecordMain.allSchemas.formSchema[0].componentProps.disabled = false + DeviceSpotInspectionRecordMain.allSchemas.formSchema.find(item => { + return item.field == 'type' + }).value = 'DEVICE' + DeviceSpotInspectionRecordMain.allSchemas.formSchema.find(item => { + return item.field == 'deviceNumber' + }).componentProps.disabled = false openForm('create') } else if (val == 'import') { // 导入 @@ -257,11 +262,15 @@ const onChange = (field, cur, item) => { } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - DeviceSpotInspectionRecordMain.allSchemas.formSchema[0].componentProps.disabled = false + DeviceSpotInspectionRecordMain.allSchemas.formSchema.find(item => { + return item.field == 'type' + }).value = 'DEVICE' if (val == 'edit') { // 编辑 openForm('update', row) - DeviceSpotInspectionRecordMain.allSchemas.formSchema[0].componentProps.disabled = true + DeviceSpotInspectionRecordMain.allSchemas.formSchema.find(item => { + return item.field == 'number' + }).componentProps.disabled = true } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -473,6 +482,14 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => { } } +const buttonControllFunction = (row, val) => { + if (val == 'add') { + return false + } else { + return true + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts b/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts index c9c6d4b..1ac8928 100644 --- a/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts +++ b/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts @@ -6,11 +6,17 @@ import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMai import { dateFormatter } from '@/utils/formatTime' import { ItemSearchTable } from '../../basic/item/item.data' import * as ItemApi from '@/api/eam/basic/item' -import { validateHanset, validateNumDot, validateEmail } from '@/utils/validator' +import { validateHanset, validateNumDot, validateNum, validateEmail } from '@/utils/validator' import * as UserApi from '@/api/system/user' +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() const userListAll = await UserApi.getSimpleUserList() const factoryList = await selectAllFactoryArea() +const factoryListSelf = factoryList.filter(item => item.id == userStore.userSelfInfo.dept.parentId) const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) +const deviceListAll = await DeviceAccountsApi.getDeviceAccountsAllNoPage({}) +const deviceListByFactory = deviceListAll.filter(item => item.factoryAreaNumber == userStore.userSelfInfo.dept.parentId) +// const deviceListByFactoryAndStatus = deviceListByFactory.filter(item => item.status == '0') const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const dutyUserList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: undefined }) const repairList = await DeviceMaintenanceMainApi.getDeviceMainTempList('DEVICE') @@ -24,6 +30,7 @@ export const DeviceInspectionMainRules = reactive({ required, ], describes: [ + { max: 200, message: '不得超过200个字符', trigger: 'blur' }, ], maintenancePhone: [ { validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'} @@ -87,7 +94,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ }, api: () => deviceList, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return deviceList.find((account) => account.number == cellValue)?.name + return deviceListAll.find((account) => account.number == cellValue)?.name }, search: { show: true, @@ -116,6 +123,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ field: 'factoryAreaNumber', sort: 'custom', isSearch: false, + isDetail: false, table: { width: '150', }, @@ -152,6 +160,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ field: 'maintenance', sort: 'custom', isSearch: false, + isDetail: false, table: { width: '150', }, @@ -162,26 +171,44 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ search: { show: true, component: 'Select', - api: () => userList, + api: () => userListAll, componentProps: { optionsAlias: { - labelField: 'name', + labelField: 'nickname', valueField: 'id' } } }, form: { component: 'Select', - api: () => userList, + api: () => userListAll, componentProps: { disabled: true, optionsAlias: { - labelField: 'name', + labelField: 'nickname', valueField: 'id' }, placeholder: "请选择检修人" }, - } + }, + }, + { + label: '厂区', + field: 'factoryAreaNumber1', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: true + }, + { + label: '检修人', + field: 'maintenance1', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: true }, { label: '检修人联系电话', @@ -255,7 +282,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ // }, { label: '描述', - field: 'describe', + field: 'describes', sort: 'custom', isSearch: false, table: { @@ -283,6 +310,13 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([ // 表单校验 export const DeviceInspectionDetailRules = reactive({ + chargePeoples:[ + required, + ], + estimatedMinutes:[ + required, + { validator:validateNum, message: '请输入数字格式', trigger: 'blur'} + ], number: [required], estimatedMinutes: [required], maintenance: [required], diff --git a/src/views/eam/device/deviceinspectionjob/index.vue b/src/views/eam/device/deviceinspectionjob/index.vue index 650edf3..1ea94d0 100644 --- a/src/views/eam/device/deviceinspectionjob/index.vue +++ b/src/views/eam/device/deviceinspectionjob/index.vue @@ -70,6 +70,7 @@ :detailValidate="detailValidate" @detailSubmitForm="detailSubmitForm" :isSearchTableItem="true" + @openFormCallBack="openFormCallBack" /> @@ -84,6 +85,9 @@ import * as DeviceInspectionMainApi from '@/api/eam/device/deviceInspectionMain' import * as DeviceInspectionDetailApi from '@/api/eam/device/deviceInspectionDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { useUserStore } from '@/store/modules/user' +import { selectAllFactoryArea } from '@/api/system/dept' +import * as UserApi from '@/api/system/user' +import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' @@ -159,8 +163,12 @@ const HeadButttondata = [ // 头部按钮事件 const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 - DeviceInspectionMain.allSchemas.formSchema[4].value = 'PROCCED'; - DeviceInspectionMain.allSchemas.formSchema[5].value = 'DEVICE'; + DeviceInspectionMain.allSchemas.formSchema.find(item => { + return item.field == 'status' + }).value = 'PROCCED' + DeviceInspectionMain.allSchemas.formSchema.find(item => { + return item.field == 'type' + }).value = 'DEVICE' openForm('create') } else if (val == 'import') { // 导入 handleImport() @@ -198,7 +206,16 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() -const openForm = (type: string, row?: any) => { +const openForm = async (type: string, row?: any) => { + const deviceListAll = await DeviceAccountsApi.getDeviceAccountsAllNoPage({}) + const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) + if (type == 'update') { + DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = true + DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = deviceListAll + } else { + DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = false + DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = deviceList + } tableData.value = [] // 重置明细数据 basicFormRef.value.open(type, row) } @@ -229,7 +246,11 @@ const formsSuccess = async (formType, data) => { /** 详情操作 */ const detailRef = ref() -const openDetail = (row: any, titleName: any, titleValue: any) => { +const openDetail = async (row: any, titleName: any, titleValue: any) => { + const factoryList = await selectAllFactoryArea() + const userListAll = await UserApi.getSimpleUserList() + row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name + row.maintenance1 = userListAll.find((account) => account.id == row.maintenance)?.nickname detailRef.value.openDetail(row, titleName, titleValue, 'basicDeviceInspectionMain') } @@ -297,13 +318,14 @@ function handleFinishOrder(row) { const onChange = (field, cur, item) => { // 当有效天数 和 生效时间 发生变化 if (field == 'deviceNumber') { - basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) - basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) + basicFormRef.value.formRef.formModel.factoryAreaNumber = String(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) + basicFormRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) basicFormRef.value.formRef.formModel.maintenanceNumber = '' } else if (field == 'maintenanceNumber') { basicFormRef.value.formRef.formModel.deviceNumber = item.componentProps.options.find(element => element.number == cur).deviceNumber - basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) - basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) + basicFormRef.value.formRef.formModel.factoryAreaNumber = String(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) + basicFormRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) + // basicFormRef.value.formRef.formModel.maintenancePhone = String(userStore?.getUser?.mobile) } } diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index 9f3a3f9..7647e95 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -2,7 +2,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { selectAllFactoryArea } from '@/api/system/dept' import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' import { useUserStore } from '@/store/modules/user' -import { selecUserByType } from '@/api/system/dept' import { ItemSearchTable } from '../../basic/item/item.data' import * as ItemApi from '@/api/eam/basic/item' import * as UserApi from '@/api/system/user' @@ -10,7 +9,6 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' const userStore = useUserStore() const factoryList = await selectAllFactoryArea() const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) -const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) const userListAll = await UserApi.getSimpleUserList() const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD') const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) @@ -24,7 +22,10 @@ export const DeviceMaintenanceMainRules = reactive({ type: [required], classes: [required], faultType: [required], - describes : [required], + describes : [ + required, + { max: 200, message: '不得超过200个字符', trigger: 'blur' }, + ], }) export const DeviceMaintenanceMain = useCrudSchemas(reactive([ @@ -292,24 +293,25 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ label: '维修人', field: 'maintenances', sort: 'custom', - api: () => userList, + isDetail: false, + api: () => userListAll, formatter: (_: Recordable, __: TableColumn, cellValue) => { - return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') + return userListAll.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') }, tableForm: { type: 'Select', - initOptions: userList, + initOptions: userListAll, multiple:true, collapseTags:true, collapseTagsTooltip:true, optionsAlias: { - labelField: 'name', + labelField: 'nickname', valueField: 'id' } }, form:{ component: 'Select', - api: () => userList, + // api: () => userListAll, componentProps: { multiple:true, collapseTags:true, @@ -321,6 +323,15 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ } } }, + { + label: '维修人', + field: 'maintenances1', + sort: 'custom', + isDetail: true, + table: { + width: 150 + } + }, { label: '备件', field: 'itemNumbers1', diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index e1ea247..8d71cf2 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -82,7 +82,8 @@ @detailOpenForm="detailOpenForm" :detailValidate="detailValidate" @detailSubmitForm="detailSubmitForm" - :isSearchTableItem="true" + :isSearchTableItem="true" + @openFormCallBack="openFormCallBack" /> @@ -118,6 +119,7 @@ import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMai import * as DeviceMaintenanceDetailApi from '@/api/eam/device/deviceMaintenanceDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { useUserStore } from '@/store/modules/user' +import { selecUserByType } from '@/api/system/dept' defineOptions({ name: 'DeviceMaintenanceMain' }) const message = useMessage() // 消息弹窗 @@ -133,6 +135,7 @@ const showView = ref(false) const viewTitle = ref('图片预览') const urls = ref([]) const viewKey = ref(0) +const operatRecord = ref() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val @@ -307,6 +310,7 @@ const openForm = (type: string, row?: any) => { /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { + operatRecord.value = row; detailRef.value.openDetail(row, titleName, titleValue,'DeviceMaintenanceMain') } @@ -499,6 +503,39 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => { } } +const openFormCallBack = (type, row, masterParmas,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(); + }); + } + }) + } + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/mold/moldinspectionjob/index.vue b/src/views/eam/mold/moldinspectionjob/index.vue index fd8b2a0..c007b16 100644 --- a/src/views/eam/mold/moldinspectionjob/index.vue +++ b/src/views/eam/mold/moldinspectionjob/index.vue @@ -159,7 +159,9 @@ const HeadButttondata = [ // 头部按钮事件 const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 - MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED'; + debugger + // MoldInspectionMain.allSchemas.formSchema[4].value = 'PROCCED'; + MoldInspectionMain.allSchemas.formSchema.find((item) => item.field == 'status').value = 'PROCCED'; MoldInspectionMain.allSchemas.formSchema[5].value = 'DEVICE'; openForm('create') } else if (val == 'import') { // 导入