guhongwei 4 éve
szülő
commit
3c30264db6

+ 7 - 1
src/router/index.js

@@ -360,9 +360,15 @@ const web = [
       {
         path: '/adminCenter/company/policyApply/order',
         name: 'company_policyApply_order',
-        meta: { title: '创新券订单' },
+        meta: { title: '服务订单信息管理' },
         component: () => import('../views/adminCenter/company/policy_apply/order_apply.vue'),
       },
+      {
+        path: '/adminCenter/company/policyApply/orderInfo',
+        name: 'company_policyApply_orderInfo',
+        meta: { title: '服务订单结果' },
+        component: () => import('../views/adminCenter/company/policy_apply/order_info.vue'),
+      },
 
       // 中介机构
       {

+ 2 - 2
src/views/adminCenter/company/coupons/detail.vue

@@ -88,11 +88,11 @@ export default {
         if (valid) {
           let data = this.form;
           data.status = '0';
-          data.type = '创新券';
+          data.user_id = this.user.id;
           let res = await this.create(data);
           if (this.$checkRes(res)) {
             this.$message({
-              message: '创新券政策服务申报成功,请耐心等待结果',
+              message: '创新券申领成功,请耐心等待结果',
               type: 'success',
             });
             this.back();

+ 1 - 0
src/views/adminCenter/company/policy_apply/index.vue

@@ -56,6 +56,7 @@ export default {
   methods: {
     ...policyApply(['query', 'update']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
       const res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);

+ 32 - 1
src/views/adminCenter/company/policy_apply/order_apply.vue

@@ -176,4 +176,35 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 0;
+    }
+    .down {
+      .text {
+        border-bottom: 1px dashed #333;
+      }
+      /deep/.el-form-item {
+        padding: 20px 10px;
+        margin: 0;
+      }
+      /deep/.el-input__inner {
+        border: 1px solid #333;
+      }
+      .formBtn {
+        text-align: center;
+        padding: 15px 0;
+      }
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 88 - 0
src/views/adminCenter/company/policy_apply/order_info.vue

@@ -0,0 +1,88 @@
+<template>
+  <div id="order_info">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: policyOrder } = createNamespacedHelpers('policyOrder');
+export default {
+  name: 'order_info',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [],
+      fields: [
+        { label: '订单号', prop: 'no', filter: 'input' },
+        { label: '订单名称', prop: 'name', filter: 'input' },
+        { label: '服务类型', prop: 'policy_user_type' },
+        { label: '所属单位', prop: 'mechanism_person' },
+        { label: '购买单位', prop: 'user_name' },
+        { label: '订单总金额', prop: 'money' },
+        { label: '创新券抵扣金额', prop: 'allowance' },
+        { label: '应收金额', prop: 'total' },
+        { label: '提交时间', prop: 'meta.updateAt', format: (i) => moment(i).format('YYYY-MM-DD HH:mm:ss') },
+        {
+          label: '信息状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '待确认' : item === '1' ? '订单已确认' : item === '2' ? '订单已取消' : '未识别';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    console.log(this.user);
+    this.search();
+  },
+  methods: {
+    ...policyOrder(['query', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>