|
@@ -29,6 +29,9 @@
|
|
|
<el-option v-for="item in item.dicData" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</span>
|
|
|
+ <selectComponent v-else-if="item.prop === 'corps'" v-model="form[item.prop]"
|
|
|
+ :configuration="configuration" style="width: 100%"/>
|
|
|
+ <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled?item.disabled:false"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -98,6 +101,13 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ configuration: {
|
|
|
+ multipleChoices: true,
|
|
|
+ multiple: true,
|
|
|
+ collapseTags: false,
|
|
|
+ placeholder: '请点击右边按钮选择',
|
|
|
+ dicData: []
|
|
|
+ },
|
|
|
form: {},
|
|
|
disabled: false,
|
|
|
customerContact: customerContact,
|
|
@@ -183,6 +193,7 @@ export default {
|
|
|
//多选
|
|
|
label: '代理商',
|
|
|
prop: 'corps',
|
|
|
+ span: 16,
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -190,6 +201,15 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ type: 'textarea',
|
|
|
+ span: 24,
|
|
|
+ prop: "remarks",
|
|
|
+ mock: {
|
|
|
+ type: 'county'
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -200,6 +220,10 @@ export default {
|
|
|
if (this.$route.query.id) {
|
|
|
detail(JSON.parse(this.$route.query.id)).then(res =>{
|
|
|
this.form = res.data.data
|
|
|
+ if (this.form.corpNameList) {
|
|
|
+ this.configuration.dicData = this.form.corpNameList
|
|
|
+ }
|
|
|
+ this.form.corps = this.form.corps.split(',')
|
|
|
if (res.data.data.specialItemList) this.contactsData = res.data.data.specialItemList
|
|
|
if (res.data.data.presentItemList) this.contactsDataBuyFree = res.data.data.presentItemList
|
|
|
delete this.form.specialItemList
|
|
@@ -316,6 +340,7 @@ export default {
|
|
|
console.log(this.form)
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.form.corps = this.form.corps.join(',')
|
|
|
this.form.specialItemList = this.contactsData
|
|
|
this.form.presentItemList = this.contactsDataBuyFree
|
|
|
typeSave(this.form).then(res=>{
|
|
@@ -391,4 +416,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+::v-deep .el-form-item {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-form-item__content{
|
|
|
+ line-height: 32px;
|
|
|
+}
|
|
|
</style>
|