|
|
@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
tableData.value.push(tfk) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
if (formField == 'supplierCode') { |
|
|
|
if (formField == 'modelShow') { |
|
|
|
setV['modelShow'] = val.map(item=>item.model).join(',') |
|
|
|
} |
|
|
|
|
|
|
|
if (formField == 'supplierCode') { |
|
|
|
setV['supplierCode'] = val[0].code |
|
|
|
setV['supplierName'] = val[0].name |
|
|
|
console.log(ModelDeliTime.allSchemas.formSchema) |
|
|
|
const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) |
|
|
|
ModelDeliTime.allSchemas.formSchema.forEach(item => { |
|
|
|
if(item.field == 'modelShow'){ |
|
|
|
item.componentProps.options = options.map(item=> { |
|
|
|
return { |
|
|
|
label: item, |
|
|
|
value:item |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) |
|
|
|
// ModelDeliTime.allSchemas.formSchema.forEach(item => { |
|
|
|
// if(item.field == 'modelShow'){ |
|
|
|
// item.componentProps.options = options.map(item=> { |
|
|
|
// return { |
|
|
|
// label: item, |
|
|
|
// value:item |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => { |
|
|
|
if (data.masterId) { |
|
|
|
data.id = data.masterId |
|
|
|
} |
|
|
|
data.model =data.modelShow.join(',') |
|
|
|
data.model =data.modelShow |
|
|
|
// data.model =data.modelShow.join(',') |
|
|
|
data.yearAndMonth =data.yearAndMonthShow.join(',') |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
data.subList.forEach((item) => { |
|
|
@ -265,7 +269,7 @@ const HeadButttondata = [ |
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
getModelCode() |
|
|
|
// getModelCode() |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
handleImport() |
|
|
|