|
@@ -27,8 +27,14 @@
|
27
|
27
|
</div>
|
28
|
28
|
</el-col>
|
29
|
29
|
</el-row>
|
30
|
|
- <el-button type="danger" style="margin:20px auto 0 auto;display:block" round>立即核销</el-button>
|
31
|
|
-
|
|
30
|
+ <el-button type="danger" @click="showVerifyDialog = true" style="margin:20px auto 0 auto;display:block" round>立即核销</el-button>
|
|
31
|
+ <el-dialog title="核销数据" :visible.sync="showVerifyDialog">
|
|
32
|
+ <el-form>
|
|
33
|
+ <el-form-item label="扫描二维码数据">
|
|
34
|
+ <el-input v-model="verifyId" @keyup.enter.native="verifyEnter" placeholder="请用扫码枪扫描二维码"></el-input>
|
|
35
|
+ </el-form-item>
|
|
36
|
+ </el-form>
|
|
37
|
+ </el-dialog>
|
32
|
38
|
</el-tab-pane>
|
33
|
39
|
<el-tab-pane label="手机号核销">
|
34
|
40
|
<el-row>
|
|
@@ -81,6 +87,8 @@ export default {
|
81
|
87
|
status: ""
|
82
|
88
|
},
|
83
|
89
|
verifyPhone: "",
|
|
90
|
+ verifyId: "",
|
|
91
|
+ showVerifyDialog: false,
|
84
|
92
|
list: [],
|
85
|
93
|
pageNavi: {
|
86
|
94
|
current: 1,
|
|
@@ -91,7 +99,7 @@ export default {
|
91
|
99
|
},
|
92
|
100
|
computed: {},
|
93
|
101
|
methods: {
|
94
|
|
- ...mapExchangeActions(["getExchanges"]),
|
|
102
|
+ ...mapExchangeActions(["getExchanges", "verifyById"]),
|
95
|
103
|
getList() {
|
96
|
104
|
const pageNumber = this.pageNavi.current || 1;
|
97
|
105
|
const pageSize = this.pageNavi.size;
|
|
@@ -114,7 +122,23 @@ export default {
|
114
|
122
|
addGoods() {
|
115
|
123
|
this.$router.push({ name: "goods.edit" });
|
116
|
124
|
},
|
|
125
|
+ verifyEnter() {
|
|
126
|
+ this.verifyById({
|
|
127
|
+ id: this.verifyId
|
|
128
|
+ })
|
|
129
|
+ .then(res => {
|
|
130
|
+ this.$notify.info("核销成功");
|
|
131
|
+ this.showVerifyDialog = false;
|
|
132
|
+ })
|
|
133
|
+ .catch(err => {
|
|
134
|
+ this.$notify.error(err.msg || err.message);
|
|
135
|
+ });
|
|
136
|
+ },
|
117
|
137
|
verifyTel() {
|
|
138
|
+ if(this.verifyPhone === ""){
|
|
139
|
+ this.$notify.error("请输入手机号");
|
|
140
|
+ return;
|
|
141
|
+ }
|
118
|
142
|
this.$router.push({
|
119
|
143
|
name: "verify.list",
|
120
|
144
|
params: { tel: this.verifyPhone }
|