|
@@ -153,6 +153,7 @@ import htmlToPdf from '@/unit/htmlToPdf.js';
|
|
|
const { cashStatus } = require('@common/dict/couindex');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
|
|
|
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
|
|
|
export default {
|
|
|
name: 'cashing_info',
|
|
|
props: {},
|
|
@@ -171,9 +172,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapCashing(['fromFetch']),
|
|
|
+ ...coupons(['fetch']),
|
|
|
async search() {
|
|
|
let res = await this.fromFetch(this.id);
|
|
|
if (this.$checkRes(res)) {
|
|
|
+ this.searchOther(res.data);
|
|
|
this.$set(this, `form`, res.data);
|
|
|
}
|
|
|
},
|
|
@@ -192,6 +195,13 @@ export default {
|
|
|
const r = cashStatus.find((f) => f.value === i);
|
|
|
if (r) return r.label;
|
|
|
},
|
|
|
+ // 查询创新券
|
|
|
+ async searchOther(data) {
|
|
|
+ let res = await this.fetch(data.coupons_id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ data.coupons_id = res.data.name;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查看凭证
|
|
|
view() {
|
|
|
this.dialog = true;
|