|
@@ -11,13 +11,13 @@
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
|
:visible.sync="open"
|
|
|
- width="700px"
|
|
|
+ width="750px"
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
@close="cancel"
|
|
|
>
|
|
|
<div class="dialog">
|
|
|
- <el-form :model="form" ref="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form :model="form" ref="form" :rules="rules" label-width="100px">
|
|
|
<el-form-item label="使用剧目" prop="usePerform" required>
|
|
|
<el-select v-model="form.usePerform" @change="performChange" placeholder="请选择使用剧目">
|
|
|
<el-option
|
|
@@ -75,7 +75,7 @@
|
|
|
placeholder="请输入关键词进行查询"
|
|
|
:remote-method="getOptions"
|
|
|
:loading="isLoading"
|
|
|
- style="width: 100%;"
|
|
|
+ style="width: 80%;margin-right: 5px;"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
@@ -84,6 +84,8 @@
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
+ <el-button v-if="form.useUserId.length == 0" type="primary" @click="allUser">全选</el-button>
|
|
|
+ <el-button v-else @click="cancelSelected">取消选择</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发放渠道" prop="channelType" key="channelType" required>
|
|
|
<el-select v-model="form.channelType" :disabled ="isDisabled" placeholder="请选择发放渠道">
|
|
@@ -249,7 +251,7 @@ export default {
|
|
|
if (obj){
|
|
|
this.title = "编辑优惠券";
|
|
|
this.$nextTick(() => {
|
|
|
- // console.log(obj,'4444');
|
|
|
+ console.log(obj,'4444');
|
|
|
// if(obj.useUserId) {
|
|
|
// this.rowId = obj.useUserId.split(",");
|
|
|
// } else {
|
|
@@ -292,6 +294,7 @@ export default {
|
|
|
this.$set(this.form, 'channelType', 2);
|
|
|
this.$set(this.form, 'useType', 2);
|
|
|
this.$set(this.form, 'useDay', '24');
|
|
|
+ this.$set(this.form, 'useUserId', []);
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs["form"].clearValidate();
|
|
@@ -351,6 +354,18 @@ export default {
|
|
|
})
|
|
|
},1000)
|
|
|
},
|
|
|
+ // 全选 分销商
|
|
|
+ allUser(){
|
|
|
+ if(this.options.length != 0){
|
|
|
+ let ids = this.options.map(ele => ele.id)|| [];
|
|
|
+ console.log(ids,'ids');
|
|
|
+ this.$set(this.form, 'useUserId', ids);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 取消全选 分销商
|
|
|
+ cancelSelected() {
|
|
|
+ this.$set(this.form, 'useUserId', []);
|
|
|
+ },
|
|
|
// 使用对象切换
|
|
|
handleChange(val) {
|
|
|
if(val == 2) {
|