|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
- <el-form ref="form" :model="form" label-width="140px">
|
|
|
|
|
|
|
+ <el-form validate-on-rule-change :rules="rules" ref="form" :model="form" label-width="140px">
|
|
|
<el-button v-if="form.id" size="mini" type="text" @click="handleShare" icon="el-icon-coin"
|
|
<el-button v-if="form.id" size="mini" type="text" @click="handleShare" icon="el-icon-coin"
|
|
|
v-hasPermi="['hisStore:collection:WxaCodeCollectionUnLimit']">分享
|
|
v-hasPermi="['hisStore:collection:WxaCodeCollectionUnLimit']">分享
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -15,8 +15,9 @@
|
|
|
<span style="font-size: 15px;font-weight: bold; margin-left: 31px">{{ answer.title }}</span>
|
|
<span style="font-size: 15px;font-weight: bold; margin-left: 31px">{{ answer.title }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin-left: 31px;">
|
|
<div style="margin-left: 31px;">
|
|
|
- <el-checkbox-group :disabled="form.answers[index].flag" v-model="form.answers[index].value" size="mini" >
|
|
|
|
|
- <el-checkbox v-for="dict in answer.options" :label="dict.value" >{{ dict.name }}</el-checkbox>
|
|
|
|
|
|
|
+ <el-checkbox-group v-model="form.answers[index].value"
|
|
|
|
|
+ size="mini">
|
|
|
|
|
+ <el-checkbox v-for="dict in answer.options" :label="dict.value">{{ dict.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
<!-- <el-radio-group :disabled="form.answers[index].flag" v-model="form.answers[index].value">
|
|
<!-- <el-radio-group :disabled="form.answers[index].flag" v-model="form.answers[index].value">
|
|
|
<el-radio v-for="dict in answer.options" :label="dict.value">{{ dict.name }}</el-radio>
|
|
<el-radio v-for="dict in answer.options" :label="dict.value">{{ dict.name }}</el-radio>
|
|
@@ -24,7 +25,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <el-form-item label="是否关联套餐包" prop="isPackage">
|
|
|
|
|
|
|
+ <el-form-item v-if="form.questionId" label="是否关联套餐包" prop="isPackage">
|
|
|
<el-radio-group v-model="form.isPackage">
|
|
<el-radio-group v-model="form.isPackage">
|
|
|
<el-radio :label="0">否</el-radio>
|
|
<el-radio :label="0">否</el-radio>
|
|
|
<el-radio :label="1">是</el-radio>
|
|
<el-radio :label="1">是</el-radio>
|
|
@@ -42,7 +43,8 @@
|
|
|
<el-radio :label="2">物流代收</el-radio>
|
|
<el-radio :label="2">物流代收</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="form.packageId && form.payType == 2 && form.isPackage && form.isPackage == 1" label="物流代收金额" prop="amount">
|
|
|
|
|
|
|
+ <el-form-item v-if="form.packageId && form.payType == 2 && form.isPackage && form.isPackage == 1"
|
|
|
|
|
+ label="预付金额" prop="amount">
|
|
|
<el-input v-model="form.amount" placeholder="请输入物流代收金额" type="number" />
|
|
<el-input v-model="form.amount" placeholder="请输入物流代收金额" type="number" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -85,6 +87,24 @@ export default {
|
|
|
name: null,
|
|
name: null,
|
|
|
},
|
|
},
|
|
|
codeImage: null,
|
|
codeImage: null,
|
|
|
|
|
+
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ questionId: [
|
|
|
|
|
+ { required: true, message: '请选择信息模板', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ packageId: [
|
|
|
|
|
+ { required: true, message: '请选择套餐包', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ isPackage: [
|
|
|
|
|
+ { required: true, message: '请选择是否关联套餐包', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ payType: [
|
|
|
|
|
+ { required: true, message: '请选择支付类型', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ amount: [
|
|
|
|
|
+ { required: true, message: '请填写物流代收金额', trigger: 'blur' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -135,7 +155,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.userId = userId;
|
|
this.userId = userId;
|
|
|
getInfo(queryParams).then(res => {
|
|
getInfo(queryParams).then(res => {
|
|
|
- this.form = res.data;
|
|
|
|
|
|
|
+ if (res.data.id) {
|
|
|
|
|
+ this.form = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form = {
|
|
|
|
|
+ answers: []
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
//选择问答模板
|
|
//选择问答模板
|
|
@@ -168,6 +194,7 @@ export default {
|
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.$parent.$parent.closeCollection();
|
|
this.$parent.$parent.closeCollection();
|
|
|
|
|
+ this.$refs[form].resetFields();
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -175,8 +202,10 @@ export default {
|
|
|
this.msgSuccess("添加成功");
|
|
this.msgSuccess("添加成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.$parent.$parent.closeCollection();
|
|
this.$parent.$parent.closeCollection();
|
|
|
|
|
+ this.$refs[form].resetFields();
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ // this.resetForm("form");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|