Commit d35a0ca8 authored by 黄奎's avatar 黄奎

yemian

parent 85a77aaf
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.CustomerName" label="客户名称" /> <q-input @input="resetSearch" clearable filled v-model="msg.CustomerName" label="客户名称" />
</div> </div>
<div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.ExchangeCode" label="兑换码" />
</div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" option-value="Id" option-label="Name" clearable filled <q-select @input="resetSearch" option-value="Id" option-label="Name" clearable filled
v-model="msg.ExchangeStatus" :options="StatusList" emit-value map-options label="状态" /> v-model="msg.ExchangeStatus" :options="StatusList" emit-value map-options label="状态" />
...@@ -35,8 +38,9 @@ ...@@ -35,8 +38,9 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td> <q-td>
<q-btn v-if="props.row.ExchangeStatus==1" flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="兑换" <q-btn v-if="props.row.ExchangeStatus==1" flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="兑换"
@click="exchangeKudo(props.row)" /> @click="exchangeKudo(props.row)" />
<q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="详情" <q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400" label="详情"
@click="goToDetail(props.row)" /> @click="goToDetail(props.row)" />
</q-td> </q-td>
...@@ -121,6 +125,7 @@ ...@@ -121,6 +125,7 @@
TaskName: "", //任务 TaskName: "", //任务
CustomerName: "", //客户名称 CustomerName: "", //客户名称
ExchangeStatus: "", //领取状态 ExchangeStatus: "", //领取状态
ExchangeCode: "", //兑换码
}, },
StatusList: [{ StatusList: [{
Id: 1, Id: 1,
...@@ -149,24 +154,20 @@ ...@@ -149,24 +154,20 @@
CustomerId: item.CustomerId, CustomerId: item.CustomerId,
ExchangeCode: item.ExchangeCode ExchangeCode: item.ExchangeCode
}; };
saveExchangeKudo(postMsg).then(res => { var that = this;
if (res.Code == 1) { this.$confirm('是否要兑换此奖品?', '提示', {
this.$q.notify({ confirmButtonText: '确定',
icon: "iconfont icon-chenggong", cancelButtonText: '取消',
color: "accent", type: 'warning'
timeout: 2000, }).then(() => {
message: "兑换成功!", saveExchangeKudo(postMsg).then(res => {
position: "top", if (res.Code == 1) {
}); that.$message.success("兑换成功!")
this.getList(); that.getList();
} else { } else {
this.$q.notify({ that.$message.error("兑换失败!");
type: "negative", }
message: "兑换失败!", })
position: "top",
timeout: 2000,
});
}
}) })
}, },
goToDetail(item) { goToDetail(item) {
......
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