songguoqiang 7 months ago
parent
commit
5f3c095c10
  1. 44
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  2. 74
      src/views/eam/basic/deviceMaintenance/index.vue
  3. 62
      src/views/eam/basic/moldMaintenance/index.vue
  4. 44
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  5. 28
      src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts
  6. 28
      src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts

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

@ -129,28 +129,28 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ // {
label: '涂装保养周期-月份', // label: '涂装保养周期-月份',
field: 'executionCycleMonth', // field: 'executionCycleMonth',
dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH, // dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH,
dictClass: 'string', // dictClass: 'string',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ // {
label: '涂装保养周期-星期', // label: '涂装保养周期-星期',
field: 'executionCycleWeek', // field: 'executionCycleWeek',
dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK, // dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK,
dictClass: 'string', // dictClass: 'string',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ {
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',

74
src/views/eam/basic/deviceMaintenance/index.vue

@ -110,40 +110,40 @@ const updateFormValue = reactive({
const openDataOld = ref() const openDataOld = ref()
const openDataNew = ref() const openDataNew = ref()
const operatType = ref('') const operatType = ref('')
const tzDeptId = ref() // const tzDeptId = ref()
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
if(formField == 'deviceNumber' && val[0].factoryAreaNumber == tzDeptId.value){ // if(formField == 'deviceNumber' && val[0].factoryAreaNumber == tzDeptId.value){
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycle' // return item.field == 'executionCycle'
}).componentProps.disabled = true // }).componentProps.disabled = true
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleMonth' // return item.field == 'executionCycleMonth'
}).componentProps.disabled = false // }).componentProps.disabled = false
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleWeek' // return item.field == 'executionCycleWeek'
}).componentProps.disabled = false // }).componentProps.disabled = false
}else{ // }else{
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycle' // return item.field == 'executionCycle'
}).componentProps.disabled = false // }).componentProps.disabled = false
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleMonth' // return item.field == 'executionCycleMonth'
}).componentProps.disabled = true // }).componentProps.disabled = true
DeviceMaintenance.allSchemas.formSchema.find(item=>{ // DeviceMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleWeek' // return item.field == 'executionCycleWeek'
}).componentProps.disabled = true // }).componentProps.disabled = true
} // }
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['executionCycle'] = null setV['executionCycle'] = null
setV['executionCycleMonth'] = null // setV['executionCycleMonth'] = null
setV['executionCycleWeek'] = null // setV['executionCycleWeek'] = null
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
// //
@ -212,13 +212,13 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
openDataOld.value = row openDataOld.value = row
updateFormValue.remark = '' updateFormValue.remark = ''
DeptApi.getSimpleDeptList().then(res=>{ // DeptApi.getSimpleDeptList().then(res=>{
res.forEach(item=>{ // res.forEach(item=>{
if(item.busiType == 'TZ'){ // if(item.busiType == 'TZ'){
tzDeptId.value = item.id // tzDeptId.value = item.id
} // }
}) // })
}) // })
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

62
src/views/eam/basic/moldMaintenance/index.vue

@ -111,33 +111,33 @@ const operatType = ref('')
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
if(formField == 'deviceNumber' && val[0].factoryAreaNumber == tzDeptId.value){ // if(formField == 'deviceNumber' && val[0].factoryAreaNumber == tzDeptId.value){
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycle' // return item.field == 'executionCycle'
}).componentProps.disabled = true // }).componentProps.disabled = true
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleMonth' // return item.field == 'executionCycleMonth'
}).componentProps.disabled = false // }).componentProps.disabled = false
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleWeek' // return item.field == 'executionCycleWeek'
}).componentProps.disabled = false // }).componentProps.disabled = false
}else{ // }else{
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycle' // return item.field == 'executionCycle'
}).componentProps.disabled = false // }).componentProps.disabled = false
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleMonth' // return item.field == 'executionCycleMonth'
}).componentProps.disabled = true // }).componentProps.disabled = true
MoldMaintenance.allSchemas.formSchema.find(item=>{ // MoldMaintenance.allSchemas.formSchema.find(item=>{
return item.field == 'executionCycleWeek' // return item.field == 'executionCycleWeek'
}).componentProps.disabled = true // }).componentProps.disabled = true
} // }
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['executionCycle'] = null setV['executionCycle'] = null
setV['executionCycleMonth'] = null // setV['executionCycleMonth'] = null
setV['executionCycleWeek'] = null // setV['executionCycleWeek'] = null
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
@ -205,17 +205,17 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const tzDeptId = ref() // const tzDeptId = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
openDataOld.value = row openDataOld.value = row
updateFormValue.remark = '' updateFormValue.remark = ''
DeptApi.getSimpleDeptList().then(res=>{ // DeptApi.getSimpleDeptList().then(res=>{
res.forEach(item=>{ // res.forEach(item=>{
if(item.busiType == 'TZ'){ // if(item.busiType == 'TZ'){
tzDeptId.value = item.id // tzDeptId.value = item.id
} // }
}) // })
}) // })
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

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

@ -127,28 +127,28 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ // {
label: '涂装保养周期-月份', // label: '涂装保养周期-月份',
field: 'executionCycleMonth', // field: 'executionCycleMonth',
dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH, // dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH,
dictClass: 'string', // dictClass: 'string',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ // {
label: '涂装保养周期-星期', // label: '涂装保养周期-星期',
field: 'executionCycleWeek', // field: 'executionCycleWeek',
dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK, // dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK,
dictClass: 'string', // dictClass: 'string',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ {
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',

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

@ -41,20 +41,20 @@ export const DeviceMaintainPlan = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE, dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE,
dictClass: 'string', dictClass: 'string',
}, },
{ // {
label: '涂装保养周期-月', // label: '涂装保养周期-月',
field: 'cycleMonth', // field: 'cycleMonth',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH, // dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH,
dictClass: 'string', // dictClass: 'string',
}, // },
{ // {
label: '涂装保养周期-周', // label: '涂装保养周期-周',
field: 'cycleWeek', // field: 'cycleWeek',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK, // dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK,
dictClass: 'string', // dictClass: 'string',
}, // },
// { // {
// label: '次数', // label: '次数',
// field: 'times', // field: 'times',

28
src/views/eam/mold/moldMaintainPlan/moldMaintainPlan.data.ts

@ -42,20 +42,20 @@ export const MoldMaintainPlan = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE, dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE,
dictClass: 'string', dictClass: 'string',
}, },
{ // {
label: '涂装保养周期-月', // label: '涂装保养周期-月',
field: 'cycleMonth', // field: 'cycleMonth',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH, // dictType: DICT_TYPE.SPECIAL_CYCLE_MONTH,
dictClass: 'string', // dictClass: 'string',
}, // },
{ // {
label: '涂装保养周期-周', // label: '涂装保养周期-周',
field: 'cycleWeek', // field: 'cycleWeek',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK, // dictType: DICT_TYPE.SPECIAL_CYCLE_WEEK,
dictClass: 'string', // dictClass: 'string',
}, // },
// { // {
// label: '次数', // label: '次数',
// field: 'times', // field: 'times',

Loading…
Cancel
Save