|
|
@ -82,13 +82,29 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-for="(item1, index) in headers" :key="index" :label="item1" width="130"> |
|
|
|
<template v-slot="{ row }"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
v-model="row.Item[item1]" |
|
|
|
v-model="scope.row.Item[item1]" |
|
|
|
:disabled="item.title === '修改' && formData['AP_CustDemandVerHead-Status'] === '1'" |
|
|
|
clearable /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" width="100px"> |
|
|
|
<template #header> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
class="search-button-style" |
|
|
|
style="margin-left: 0;" |
|
|
|
@click="handleAddValst()" |
|
|
|
>新增</el-button> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
@click="handleDeleteValst(scope.$index)" |
|
|
|
>删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -124,7 +140,9 @@ export default { |
|
|
|
isShowDialog: '', |
|
|
|
importSuccess: false, |
|
|
|
headers: [], |
|
|
|
formData: {}, |
|
|
|
formData: { |
|
|
|
"AP_CustDemandVerHead-CustomerItem": [] |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
'AP_CustDemandVerHead-CustomerId': [ |
|
|
|
{ required: true, message: '此项不能为空', trigger: 'blur' } |
|
|
@ -140,6 +158,9 @@ export default { |
|
|
|
addUrl: '/admin/ap/custdemandverhead/insertone', // 新增、复制 |
|
|
|
updateUrl: '/admin/ap/custdemandverhead/updateone', // 修改 |
|
|
|
}, |
|
|
|
defaultItem:{ |
|
|
|
AriId:undefined |
|
|
|
}, |
|
|
|
getCreateModeArray: [], // 获取关联模型数据 |
|
|
|
} |
|
|
|
}, |
|
|
@ -154,6 +175,16 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 新增属性 */ |
|
|
|
handleAddValst() { |
|
|
|
this.formData['AP_CustDemandVerHead-CustomerItem'].push({ |
|
|
|
Item: JSON.parse(JSON.stringify(this.defaultItem)) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 删除属性 */ |
|
|
|
handleDeleteValst(index) { |
|
|
|
this.formData['AP_CustDemandVerHead-CustomerItem'].splice(index, 1) |
|
|
|
}, |
|
|
|
// 获取关联模型数据 |
|
|
|
getCreateModeData() { |
|
|
|
get(`/admin/ap/custdemandmodel/selectlist`).then(res => { |
|
|
@ -176,6 +207,9 @@ export default { |
|
|
|
this.formData = formNewData |
|
|
|
if (formNewData['AP_CustDemandVerHead-CustomerItem'].length > 0) { |
|
|
|
this.headers = (formNewData['AP_CustDemandVerHead-CustomerItem'][0].SortKeys) |
|
|
|
this.headers.forEach(e=>{ |
|
|
|
this.defaultItem[e]=undefined |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
@ -188,6 +222,9 @@ export default { |
|
|
|
this.formData = formNewData |
|
|
|
if (formNewData['AP_CustDemandVerHead-CustomerItem'].length > 0) { |
|
|
|
this.headers = (formNewData['AP_CustDemandVerHead-CustomerItem'][0].SortKeys) |
|
|
|
this.headers.forEach(e=>{ |
|
|
|
this.defaultItem[e]=undefined |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|