Browse Source

维修工单问题修复

master
ljlong_2630 9 months ago
parent
commit
5c3bb8f22b
  1. 4
      src/components/BasicForm/src/BasicForm.vue
  2. 1
      src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts
  3. 3
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  4. 64
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  5. 6
      src/views/eam/device/devicemaintenancejob/index.vue

4
src/components/BasicForm/src/BasicForm.vue

@ -372,11 +372,11 @@ const open = async (type: string, row?: any, masterParmas?: any) => {
if (masterParmas) {
if (!row) {
row = {
maintenanceNumber: masterParmas.maintenanceNumber,
number: masterParmas.number,
}
}
}
if (row?.id || row?.maintenanceNumber) {
if (row?.id || row?.number) {
formLoading.value = true
try {
nextTick(() => {

1
src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts

@ -7,7 +7,6 @@ export const DeviceMaintainPlanRules = reactive({
name: [required],
maintenanceType: [required],
type: [required],
concurrencyStamp: [required],
})
export const DeviceMaintainPlan = useCrudSchemas(reactive<CrudSchema[]>([

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

@ -26,8 +26,7 @@ export const DeviceInspectionMainRules = reactive({
describes: [
],
maintenancePhone: [
{ max: 11, message: '不得超过11个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入数字格式', trigger: 'blur'}
{ validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'}
],
status: [required],
type: [required],

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

@ -5,11 +5,13 @@ 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'
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)
// 表单校验
@ -123,13 +125,17 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: '150',
},
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
},
form: {
component: 'Select',
api: () => userList,
api: () => userListAll,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
labelField: 'nickname',
valueField: 'id'
},
placeholder: "请先选择设备"
@ -206,6 +212,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'Input',
componentProps: {
type: 'textarea',
}
},
},
@ -222,6 +231,18 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
]))
export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '维修编号',
field: 'number',
sort: 'custom',
isSearch: false,
form: {
component: 'Input',
componentProps: {
disabled: true
}
},
},
{
label: '故障描述',
field: 'describes',
@ -229,6 +250,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
},
isSearch: false,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
}
},
},
{
label: '故障真因',
@ -237,6 +265,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
},
isSearch: false,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
}
},
},
{
label: '解决措施',
@ -245,6 +280,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
},
isSearch: false,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
}
},
},
{
label: '维修人',
@ -346,9 +388,17 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
]))
// 表单校验
export const DeviceMaintenanceDetailRules = reactive({
describes: [required],
describes1: [required],
workOut: [required],
maintenance: [required],
itemNumbers: [required],
describes: [
required,
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
describes1: [
required,
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
workOut: [
required,
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
maintenances: [required],
})

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

@ -55,12 +55,13 @@
:tableData="tableData"
:apiUpdate="DeviceMaintenanceMainApi.updateDeviceMaintenanceMain"
:apiCreate="DeviceMaintenanceMainApi.createDeviceMaintenanceMain"
:isBusiness="true"
:isBusiness="false"
@onChange="onChange"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@success="submitForm"
:isSearchTableItem="true"
/>
@ -365,6 +366,7 @@ const searchFormClick = (searchData) => {
//
function acceptOrder(row) {
DeviceMaintenanceMainApi.orderStepChange(row)
getList()
}
//
function turnOrder() {}
@ -464,7 +466,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
try {
let data1 = {
id:data.id,
maintenanceNumber:data.maintenanceNumber,
number:data.number,
describes:data.describes,
describes1:data.describes1,
itemNumbers:data.itemNumbers,

Loading…
Cancel
Save