guhongwei 4 năm trước cách đây
mục cha
commit
be3fdebcf4

+ 10 - 0
src/views/adminCenter/company/declare/cashing_info.vue

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