Browse Source

修复测试bug

master
ljlong_2630 9 months ago
parent
commit
f83f1ed35a
  1. 2
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  2. 10
      src/views/eam/device/deviceinspectionjob/index.vue
  3. 11
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  4. 43
      src/views/eam/device/devicemaintainjob/index.vue
  5. 40
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  6. 2
      src/views/eam/device/devicemaintenancejob/index.vue
  7. 14
      src/views/eam/mold/moldinspectionjob/index.vue
  8. 20
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  9. 57
      src/views/eam/mold/moldmaintainjob/index.vue
  10. 21
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts
  11. 2
      src/views/eam/mold/moldmaintenancejob/index.vue

2
src/views/eam/device/deviceSpotInspectionRecordMain/index.vue

@ -453,7 +453,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1:data.describes1,
itemNumbers:data.itemNumbers, itemNumbers:data.itemNumbers,
maintenances:data.maintenances.join(','), maintenances:data.maintenances?.join(','),
workOut:data.workOut, workOut:data.workOut,
} }
console.log(data1) console.log(data1)

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

@ -504,11 +504,11 @@ function detailOnChange(field, cur, item) {
if (field == 'status') { if (field == 'status') {
if (cur == '1') { if (cur == '1') {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceInspectionDetailRules.uncompleted = [required] DeviceInspectionDetailRules.uncompleted = [{ required: true }]
} else { } else {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted; DeviceInspectionDetailRules.uncompleted = [{ required: false }]
} }
} }
} }
@ -517,16 +517,16 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
if (row == undefined || row == null) { 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.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted; DeviceInspectionDetailRules.uncompleted = [{ required: false }]
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else { } else {
if (row.status == '1') { if (row.status == '1') {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceInspectionDetailRules.uncompleted = [required] DeviceInspectionDetailRules.uncompleted = [{ required: true }]
} else { } else {
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' DeviceInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceInspectionDetailRules.uncompleted; DeviceInspectionDetailRules.uncompleted = [{ required: false }]
} }
} }

11
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -60,6 +60,7 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '厂区编号', label: '厂区编号',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: '150', width: '150',
}, },
@ -93,6 +94,15 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
} }
}, },
{
label: '厂区',
field: 'factoryAreaNumber1',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: true
},
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -220,6 +230,7 @@ export const DeviceMaintainOrderDetailRules = reactive({
chargePeoples: [required], chargePeoples: [required],
completionTime: [required], completionTime: [required],
engineer: [required], engineer: [required],
uncompleted: [required],
}) })
export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([

43
src/views/eam/device/devicemaintainjob/index.vue

@ -452,16 +452,22 @@ const detailValidate = (data) => {
} }
} }
// //
const detailSubmitForm= async (formType,data,getList,formRef,tableList) => { const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
try { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
maintenanceNumber:data.maintenanceNumber, number:data.number,
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1: data.describes1,
itemNumbers:data.itemNumbers, peoples: data.peoples,
maintenances:data.maintenances.join(','), status: data.status,
itemNumbers: data.itemNumbers,
estimatedMinutes: data.estimatedMinutes,
actualMinutes: data.actualMinutes,
chargePeoples:data.chargePeoples?.join(','),
workOut:data.workOut, workOut:data.workOut,
engineer: data.engineer,
completionTime: data.completionTime,
} }
console.log(data1) console.log(data1)
if (formType === 'create') { if (formType === 'create') {
@ -473,7 +479,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
} }
formRef.dialogVisible = false formRef.dialogVisible = false
// //
await getList() await formRef.getList1
detailRef.value.tableObject.tableList.forEach(item=>{ detailRef.value.tableObject.tableList.forEach(item=>{
if (item.itemNumbers?.length>0) { if (item.itemNumbers?.length>0) {
let str = '' let str = ''
@ -485,7 +491,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
}) })
} finally { } finally {
formRef.formLoading = false detailRef.formLoading = false
} }
} }
@ -513,13 +519,32 @@ function detailOnChange(field, cur, item) {
if (field == 'status') { if (field == 'status') {
if (cur == '1') { if (cur == '1') {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceMaintainOrderDetailRules.uncompleted = [required] DeviceMaintainOrderDetailRules.uncompleted = [{ required: true }]
} else {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
DeviceMaintainOrderDetailRules.uncompleted= [{ required: false }]
}
}
}
const openFormCallBack = (type, row, masterParmas, callback) => {
if (row == undefined || row == null) {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
DeviceMaintainOrderDetailRules.uncompleted = [{ required: false }]
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else {
if (row.status == '1') {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceMaintainOrderDetailRules.uncompleted = [{ required: true }]
} else { } else {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceMaintainOrderDetailRules.uncompleted; DeviceMaintainOrderDetailRules.uncompleted = [{ required: false }]
} }
} }
callback()
} }
</script> </script>

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

@ -88,6 +88,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '厂区编号', label: '厂区编号',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: '150', width: '150',
}, },
@ -119,10 +120,23 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
} }
}, },
{
label: '厂区编号',
field: 'factoryAreaNumber1',
sort: 'custom',
isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{ {
label: '维修人', label: '维修人',
field: 'maintenance', field: 'maintenance',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: '150', width: '150',
}, },
@ -143,6 +157,18 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
} }
}, },
{
label: '维修人',
field: 'maintenance1',
sort: 'custom',
isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{ {
label: '类型', label: '类型',
field: 'type', field: 'type',
@ -315,7 +341,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '维修人', label: '维修人',
field: 'maintenances', field: 'maintenance',
sort: 'custom', sort: 'custom',
isDetail: false, isDetail: false,
api: () => userListAll, api: () => userListAll,
@ -347,18 +373,6 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '维修人',
field: 'maintenances1',
sort: 'custom',
isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{ {
label: '备件', label: '备件',
field: 'itemNumbers1', field: 'itemNumbers1',

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

@ -517,7 +517,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1:data.describes1,
itemNumbers:data.itemNumbers, itemNumbers:data.itemNumbers,
maintenances:data.maintenances.join(','), maintenances:data.maintenances?.join(','),
workOut:data.workOut, workOut:data.workOut,
} }
console.log(data1) console.log(data1)

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

@ -86,6 +86,8 @@ import * as MoldInspectionMainApi from '@/api/eam/mold/moldInspectionMain'
import * as MoldInspectionDetailApi from '@/api/eam/mold/moldInspectionDetail' import * as MoldInspectionDetailApi from '@/api/eam/mold/moldInspectionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -232,7 +234,11 @@ const formsSuccess = async (formType, data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() 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, 'basicMoldInspectionMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicMoldInspectionMain')
} }
@ -461,7 +467,7 @@ function detailOnChange(field, cur, item) {
if (field == 'status') { if (field == 'status') {
if (cur == '1') { if (cur == '1') {
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
MoldInspectionDetailRules.uncompleted = [required] MoldInspectionDetailRules.uncompleted = [{ required: true }]
} else { } else {
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
@ -474,12 +480,12 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
if (row == undefined || row == null) { if (row == undefined || row == null) {
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete MoldInspectionDetailRules.uncompleted; MoldInspectionDetailRules.uncompleted = [{ required: false }]
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0' MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else { } else {
if (row.status == '1') { if (row.status == '1') {
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
MoldInspectionDetailRules.uncompleted = [required] MoldInspectionDetailRules.uncompleted = [{ required: true }]
} else { } else {
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' MoldInspectionDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''

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

@ -119,6 +119,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '厂区', label: '厂区',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
sort: 'custom', sort: 'custom',
isDetail: false,
isSearch: false, isSearch: false,
table: { table: {
width: '150', width: '150',
@ -151,10 +152,20 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
} }
}, },
{
label: '厂区',
field: 'factoryAreaNumber1',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: true
},
{ {
label: '维修人', label: '维修人',
field: 'maintenance', field: 'maintenance',
sort: 'custom', sort: 'custom',
isDetail: false,
isSearch: false, isSearch: false,
table: { table: {
width: '150', width: '150',
@ -187,6 +198,15 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
} }
}, },
{
label: '维修人',
field: 'maintenance1',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: true
},
// { // {
// label: '维修人联系电话', // label: '维修人联系电话',
// field: 'maintenancePhone', // field: 'maintenancePhone',

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

@ -108,6 +108,8 @@ import * as MoldMaintainOrderMainApi from '@/api/eam/mold/moldMaintainOrderMain'
import * as MoldMaintainOrderDetailApi from '@/api/eam/mold/moldMaintainOrderDetail' import * as MoldMaintainOrderDetailApi from '@/api/eam/mold/moldMaintainOrderDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'MoldMaintainOrderMain' }) defineOptions({ name: 'MoldMaintainOrderMain' })
const message = useMessage() // const message = useMessage() //
@ -288,7 +290,9 @@ const openForm = (type: string, row?: any) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = async (row: any, titleName: any, titleValue: any) => {
const factoryList = await selectAllFactoryArea()
row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name
detailRef.value.openDetail(row, titleName, titleValue,'MoldMaintainOrderMain') detailRef.value.openDetail(row, titleName, titleValue,'MoldMaintainOrderMain')
} }
@ -392,7 +396,7 @@ const submitForm = async (formType, data) => {
describes: item.describes, describes: item.describes,
describes1: item.describes1, describes1: item.describes1,
itemNumbers: item.itemNumbers1, itemNumbers: item.itemNumbers1,
maintenances: item.maintenances.join(','), maintenances: item.maintenances?.join(','),
workOut: item.workOut, workOut: item.workOut,
} }
}) // }) //
@ -451,16 +455,22 @@ const detailValidate = (data) => {
} }
} }
// //
const detailSubmitForm= async (formType,data,getList,formRef,tableList) => { const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
try { try {
let data1 = { let data1 = {
id:data.id, id:data.id,
number:data.number, number:data.number,
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1: data.describes1,
itemNumbers:data.itemNumbers, peoples: data.peoples,
maintenances:data.maintenances.join(','), status: data.status,
workOut:data.workOut, itemNumbers: data.itemNumbers,
estimatedMinutes: data.estimatedMinutes,
actualMinutes: data.actualMinutes,
chargePeoples:data.chargePeoples?.join(','),
workOut: data.workOut,
engineer: data.engineer,
completionTime: data.completionTime,
} }
console.log(data1) console.log(data1)
if (formType === 'create') { if (formType === 'create') {
@ -472,7 +482,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
} }
formRef.dialogVisible = false formRef.dialogVisible = false
// //
await getList() await formRef.getList1
detailRef.value.tableObject.tableList.forEach(item=>{ detailRef.value.tableObject.tableList.forEach(item=>{
if (item.itemNumbers?.length>0) { if (item.itemNumbers?.length>0) {
let str = '' let str = ''
@ -484,7 +494,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
}) })
} finally { } finally {
formRef.formLoading = false detailRef.formLoading = false
} }
} }
@ -506,16 +516,35 @@ function buttonControllFunction(row, val) {
function detailOnChange(field, cur, item) { function detailOnChange(field, cur, item) {
if (field == 'status') { if (field == 'status') {
if (cur == '1') { if (cur == '1') {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
DeviceMaintainOrderDetailRules.uncompleted = [required] MoldMaintainOrderDetailRules.uncompleted = [{ required: true }]
} else { } else {
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
DeviceMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = '' MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
delete DeviceMaintainOrderDetailRules.uncompleted; MoldMaintainOrderDetailRules.uncompleted = [{ required: false }]
} }
} }
} }
const openFormCallBack = (type, row, masterParmas, callback) => {
if (row == undefined || row == null) {
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
MoldMaintainOrderDetailRules.uncompleted = [{ required: false }]
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'status').value = '0'
} else {
if (row.status == '1') {
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = false
MoldMaintainOrderDetailRules.uncompleted = [{ required: true }]
} else {
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.disabled = true
MoldMaintainOrderDetail.allSchemas.formSchema.find(item => item.field == 'uncompleted').componentProps.value = ''
MoldMaintainOrderDetailRules.uncompleted = [{ required: false }]
}
}
callback()
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

21
src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

@ -52,6 +52,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '厂区编号', label: '厂区编号',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: '150', width: '150',
}, },
@ -85,6 +86,15 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
} }
}, },
{
label: '厂区',
field: 'factoryAreaNumber1',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: true
},
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -267,7 +277,8 @@ export const MoldMaintainOrderDetailRules = reactive({
actualMinutes: [required], actualMinutes: [required],
chargePeoples: [required], chargePeoples: [required],
completionTime: [required], completionTime: [required],
engineer: [required] engineer: [required],
uncompleted: [required]
}) })
export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -429,8 +440,8 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
// tableData.value.itemNumbers1 = value.map(item => item.itemNumber) // tableData.value.itemNumbers1 = value.map(item => item.itemNumber)
}, },
searchCondition: [{ searchCondition: [{
key: 'moldNumber', key: 'deviceNumber',
value: 'moldNumber', value: 'deviceNumber',
message: '请选择设备模具编号!', message: '请选择设备模具编号!',
isMainValue: true isMainValue: true
}] }]
@ -446,8 +457,8 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法 searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'moldNumber', key: 'deviceNumber',
value: 'moldNumber', value: 'deviceNumber',
message: '请选择设备模具编号!', message: '请选择设备模具编号!',
isMainValue: true isMainValue: true
}] }]

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

@ -526,7 +526,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
describes:data.describes, describes:data.describes,
describes1:data.describes1, describes1:data.describes1,
itemNumbers:data.itemNumbers, itemNumbers:data.itemNumbers,
maintenances:data.maintenances.join(','), maintenances:data.maintenances?.join(','),
workOut:data.workOut, workOut:data.workOut,
} }
console.log(data1) console.log(data1)

Loading…
Cancel
Save