zhang_li 8 months ago
parent
commit
8879c0ffe5
  1. 4
      src/views/eam/mold/moldmaintenancejob/index.vue
  2. 34
      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) =>{ 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) => { MoldMaintenanceDetail.allSchemas.tableFormColumns.map((item) => {
// if(purchaseReceiptRecordNumberRef.value == ''){ // if(purchaseReceiptRecordNumberRef.value == ''){
// if (item.field == 'itemCode') { // if (item.field == 'itemCode') {

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

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

Loading…
Cancel
Save