zhang_li 8 months ago
parent
commit
8879c0ffe5
  1. 4
      src/views/eam/mold/moldmaintenancejob/index.vue
  2. 48
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

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

@ -595,8 +595,8 @@ const submitForm = async (formType, data) => {
}
}
const detailOpenForm = (type, row) =>{
console.log("type",type);
console.log("row",row);
row.maintenances = row.maintenances.split(',').map(item=>Number(item))
MoldMaintenanceDetail.allSchemas.tableFormColumns.map((item) => {
// if(purchaseReceiptRecordNumberRef.value == ''){
// if (item.field == 'itemCode') {

48
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -313,32 +313,39 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '维修人',
field: 'maintenances',
sort: 'custom',
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue) => {
const cellValueList = cellValue ? cellValue.split(',') : [];
return userListAll
.filter(item => cellValueList.includes(item.id.toString()))
.map(item => item.nickname)
.join(',');
},
isDetail: false,
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
// let cellValueList = []
// if (Array.isArray(cellValue)) {
// cellValueList = cellValue
// } else {
// cellValueList = cellValue ? cellValue.split(',') : [];
// }
// // const cellValueList = cellValue ? cellValue.split(',') : [];
// return userListAll
// .filter(item => cellValueList.includes(item.id.toString()))
// .map(item => item.nickname)
// .join(',');
// },
isTable:false,
tableForm: {
type: 'Select',
initOptions: userListAll,
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
form:{
form: {
component: 'Select',
api: () => userListAll,
// api: () => dutyUserList,
componentProps: {
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
@ -346,6 +353,15 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '维修人',
field: 'maintenancesName',
sort: 'custom',
isForm:false,
isDetail:true,
isTable:true,
isTableForm:false
},
{
label: '备件',
field: 'itemNumbers1',

Loading…
Cancel
Save