|
@@ -30,7 +30,7 @@
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -42,8 +42,9 @@
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
- <el-table v-loading="loading" :data="taskList">
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="taskList">
|
|
|
+ <el-table-column label="序号" type="index" width="50" />
|
|
|
<el-table-column label="代金券名称" align="center" prop="discountInfo.name" />
|
|
|
<el-table-column label="姓名" align="center" prop="user.name" />
|
|
|
<el-table-column label="手机号" align="center" prop="user.phone" />
|
|
@@ -56,6 +57,11 @@
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="handleVerification(scope)">核销</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
@@ -66,10 +72,10 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script>
|
|
|
- import { recordList } from "@/api/goods/voucher/index";
|
|
|
-
|
|
|
+ import { recordList, verificationVoucher } from "@/api/goods/voucher/index";
|
|
|
+
|
|
|
export default {
|
|
|
name: "voucher",
|
|
|
dicts: ['receive_tags', 'voucher_category', 'voucher_status', 'community'],
|
|
@@ -109,7 +115,7 @@
|
|
|
if (dict) e.discountInfo.categoryText = dict.label;
|
|
|
const dictstatus = this.dict.type.voucher_status.find(j => j.value == e.status)
|
|
|
if (dictstatus) e.statusText = dictstatus.label;
|
|
|
-
|
|
|
+
|
|
|
return e;
|
|
|
});
|
|
|
this.total = response.total;
|
|
@@ -132,7 +138,17 @@
|
|
|
...this.queryParams
|
|
|
}, `${new Date().getTime()}.xlsx`)
|
|
|
},
|
|
|
+ /** 核销按钮操作 */
|
|
|
+ handleVerification(scope) {
|
|
|
+ console.log("scope.row", scope.row);
|
|
|
+ this.$modal.confirm(`是否确认核销序号为 ${ scope.$index} 的代金券?`).then(function() {
|
|
|
+ console.log("scope.row.recordId", scope.row.recordId);
|
|
|
+ return verificationVoucher(scope.row);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("核销成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-
|