Commit e4fc9352 authored by youjie's avatar youjie

自发优惠券

parent b5280d61
...@@ -20,7 +20,14 @@ ...@@ -20,7 +20,14 @@
prop="ID" prop="ID"
label="ID" width="100"> label="ID" width="100">
</el-table-column> </el-table-column>
 
<el-table-column
prop=""
label="用户">
<template slot-scope="scope">
{{ scope.row.CustomerName }}-{{ scope.row.ContactNumber }}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="TriggerTypeStr" prop="TriggerTypeStr"
label="触发事件"> label="触发事件">
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
v-loading="loading" v-loading="loading"
row-key="ID" row-key="CustomerAccountId"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
...@@ -267,12 +267,27 @@ ...@@ -267,12 +267,27 @@
SelfMotionType: data.SelfMotionType SelfMotionType: data.SelfMotionType
} }
this.UserList = data.UserList this.UserList = data.UserList
this.Storage = data.UserList
for(let i = 0;i<data.UserList.length;i++){
this.UserList[i].CustomerAccountId = data.UserList[i].UserId
this.Storage[i].CustomerAccountId = data.UserList[i].UserId
}
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
toggleSelection(rows,ignoreSelectable) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row,undefined,ignoreSelectable);
});
} else {
// this.$refs.multipleTable.clearSelection();
}
this.$forceUpdate()
},
handleClose(rows) { handleClose(rows) {
if (rows) { if (rows) {
rows.forEach(row => { rows.forEach(row => {
...@@ -299,6 +314,7 @@ ...@@ -299,6 +314,7 @@
this.$emit("close"); this.$emit("close");
}, },
gettRepositoryList(ID){ gettRepositoryList(ID){
return
this.apipost("/api/Coupon/GettRepositoryList",{'ID':ID} , res => { this.apipost("/api/Coupon/GettRepositoryList",{'ID':ID} , res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.msg = res.data.data this.msg = res.data.data
...@@ -308,7 +324,7 @@ ...@@ -308,7 +324,7 @@
if(res.data.data.UserList){ if(res.data.data.UserList){
this.UserList= res.data.data.UserList this.UserList= res.data.data.UserList
for(let i = 0;i<this.UserList.length;i++){ for(let i = 0;i<this.UserList.length;i++){
this.UserList[i].Id = this.UserList[i].UserId this.UserList[i].CustomerAccountId = this.UserList[i].UserId
} }
} }
} else { } else {
...@@ -357,12 +373,18 @@ ...@@ -357,12 +373,18 @@
}) })
}, },
choice(){ choice(){
this.category = true;
this.options2.forEach(x=>{ this.options2.forEach(x=>{
if(x.ID == this.msg.DiscountCouponId){ if(x.ID == this.msg.DiscountCouponId){
this.msg_t.SmallShopId = x.SmallShopId this.msg_t.SmallShopId = x.SmallShopId
} }
}) })
this.category = true; setTimeout(()=>{
// for(let i =0;i<this.Storage.length;i++){
// this.handleClose([this.Storage[i]])
// }
this.toggleSelection(this.Storage,true)
},500)
// this.msg_t.pageIndex =1 // this.msg_t.pageIndex =1
// this.getList() // this.getList()
}, },
...@@ -394,7 +416,8 @@ ...@@ -394,7 +416,8 @@
let UList =[]; let UList =[];
if(this.UserList&&this.UserList.length>0&&this.IsAll!=0){ if(this.UserList&&this.UserList.length>0&&this.IsAll!=0){
for(let i= 0;i<this.UserList.length;i++){ for(let i= 0;i<this.UserList.length;i++){
UList.push({'UserId':this.UserList[i].customerAccountId}) UList.push({'UserId':this.UserList[i].CustomerAccountId
})
} }
console.log(UList,';-----') console.log(UList,';-----')
this.msg.UserList= UList this.msg.UserList= UList
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment