guhongwei 4 jaren geleden
bovenliggende
commit
f7e85fa2a4

+ 3 - 5
src/views/adminCenter/company/cognizance/detail.vue

@@ -14,8 +14,8 @@
                 </el-form-item>
               </el-col>
               <one :form="form"></one>
-              <two :form="form" v-if="status == '1' || status == '-3' || status == '3'"></two>
-              <thr :form="form" v-if="status == '3'"></thr>
+              <two :form="form"></two>
+              <thr :form="form" v-if="status == '1'"></thr>
               <el-col :span="24" class="formBtn">
                 <el-button type="danger" size="mini" @click="back">取消申请</el-button>
                 <el-button type="primary" size="mini" @click="onSubmit('form')">提交申请</el-button>
@@ -163,9 +163,7 @@ export default {
     searchStatus(data) {
       if (data == '0') return '0';
       else if (data == '-1') return '0';
-      else if (data == '1') return '2';
-      else if (data == '-3') return '2';
-      else if (data == '3') return '3';
+      else if (data == '1') return '1';
     },
     // 返回
     back() {

+ 5 - 9
src/views/adminCenter/company/cognizance/index.vue

@@ -15,10 +15,10 @@
 </template>
 
 <script>
+const { ticketType } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
-
 export default {
   name: 'index',
   props: {},
@@ -36,7 +36,7 @@ export default {
           label: '编辑申请',
           method: 'edit',
           display: (item) => {
-            return item.status == '-1' || item.status == '1' || item.status == '-3' || item.status == '3';
+            return item.status == '-1' || item.status == '1';
           },
         },
       ],
@@ -47,13 +47,9 @@ export default {
           label: '申领状态',
           prop: 'status',
           format: (i) => {
-            if (i == '0') return '资质审查中';
-            else if (i == '1') return '企业准备订单';
-            else if (i == '-1') return '资质审查失败';
-            else if (i == '2') return '信息资料审查中';
-            else if (i == '3') return '企业订单入库';
-            else if (i == '-3') return '信息资料审查失败';
-            else if (i == '4') return '高企申报成功';
+            const r = ticketType.find((f) => f.value === i);
+            if (r) return r.label;
+            return '未知状态';
           },
         },
       ],

+ 5 - 9
src/views/adminCenter/company/cognizance/info.vue

@@ -72,10 +72,10 @@
 </template>
 
 <script>
+const { ticketType } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
-
 export default {
   name: 'info',
   props: {},
@@ -98,7 +98,7 @@ export default {
       if (this.$checkRes(res)) {
         this.$set(this, `data`, res.data);
       }
-      res = await this.record({ ticket_id: this.id, status: this.status });
+      res = await this.record({ ticket_id: this.id });
       if (this.$checkRes(res)) {
         this.$set(this, `descList`, res.data);
       }
@@ -122,13 +122,9 @@ export default {
       return this.imgList.includes(suffix);
     },
     getStatus(i) {
-      if (i == '0') return '资质审查中';
-      else if (i == '1') return '企业准备订单';
-      else if (i == '-1') return '资质审查失败';
-      else if (i == '2') return '信息资料审查中';
-      else if (i == '3') return '企业订单入库';
-      else if (i == '-3') return '信息资料审查失败';
-      else if (i == '4') return '高企申报成功';
+      const r = ticketType.find((f) => f.value === i);
+      console.log(r);
+      if (r) return r.label;
     },
   },
   computed: {

+ 7 - 7
src/views/adminCenter/inter/ticket/detail.vue

@@ -39,7 +39,7 @@
                   </el-col>
                 </el-col>
               </el-col>
-              <el-col :span="24" class="text" v-if="dataStatus == '3'">
+              <el-col :span="24" class="text" v-if="dataStatus == '1'">
                 <el-col :span="2" class="left"> 合同上传</el-col>
                 <el-col :span="20" class="right">
                   <e-upload
@@ -52,16 +52,16 @@
                   ></e-upload>
                 </el-col>
               </el-col>
-              <el-col :span="24" class="text" v-if="dataStatus == '2'">
+              <el-col :span="24" class="text" v-if="dataStatus == '0'">
                 <el-col :span="2" class="left"> 信息资料审核:</el-col>
                 <el-col :span="20" class="right">
                   <el-radio-group v-model="form.status">
-                    <el-radio label="3">通过</el-radio>
-                    <el-radio label="-3">拒绝</el-radio>
+                    <el-radio label="1">通过</el-radio>
+                    <el-radio label="-1">拒绝</el-radio>
                   </el-radio-group>
                 </el-col>
               </el-col>
-              <el-col :span="24" class="text" v-if="dataStatus == '2'">
+              <el-col :span="24" class="text" v-if="dataStatus == '0'">
                 <el-col :span="2" class="left"> 审核意见:</el-col>
                 <el-col :span="22" class="right">
                   <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
@@ -69,7 +69,7 @@
               </el-col>
               <el-col :span="24" class="formBtn">
                 <el-button type="danger" size="mini" @click="back">取消申请</el-button>
-                <el-button type="primary" size="mini" @click="onSubmit('form')" v-if="dataStatus == '2'">提交保存</el-button>
+                <el-button type="primary" size="mini" @click="onSubmit('form')" v-if="dataStatus == '0'">提交保存</el-button>
                 <el-button type="primary" size="mini" @click="toSave('form')" v-else>保存合同</el-button>
               </el-col>
             </el-form>
@@ -125,7 +125,7 @@ export default {
     },
     async toSave() {
       let data = this.form;
-      data.status = '3';
+      data.status = '1';
       const res = await this.update(data);
       if (this.$checkRes(res, '上传成功', res.errmsg || '上传失败')) {
         this.back();

+ 2 - 9
src/views/adminCenter/inter/ticket/flow.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+const { ticketType } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
@@ -24,15 +25,7 @@ export default {
   data: function () {
     return {
       list: [],
-      status: [
-        { value: '0', label: '申请' },
-        { value: '1', label: '资质审核成功' },
-        { value: '-1', label: '资质审查失败' },
-        { value: '2', label: '企业填写资料完成,信息资料审查中' },
-        { value: '3', label: '中介机构审核成功' },
-        { value: '-3', label: '信息资料审查失败' },
-        { value: '4', label: '高企申报成功' },
-      ],
+      status: ticketType,
     };
   },
   created() {

+ 3 - 1
src/views/adminCenter/inter/ticket/index.vue

@@ -44,7 +44,9 @@ export default {
       ],
     };
   },
-  created() {},
+  created() {
+    console.log(this.user);
+  },
   methods: {
     ...ticket(['query', 'delete']),
     async search({ skip = 0, limit = 10, ...info } = {}) {

+ 5 - 5
src/views/adminCenter/ticket/detail.vue

@@ -39,7 +39,7 @@
                   </el-col>
                 </el-col>
               </el-col>
-              <el-col :span="24" class="text">
+              <el-col :span="24" class="text" v-if="dataStatus == '1'">
                 <el-col :span="2" class="left"> 合同:</el-col>
                 <el-col :span="20" class="right">
                   <el-col :span="4" v-for="(i, index) in form.contract" :key="`medium_material-${index}`">
@@ -48,7 +48,7 @@
                   </el-col>
                 </el-col>
               </el-col>
-              <el-col :span="24" class="text" v-if="dataStatus == '0'">
+              <!-- <el-col :span="24" class="text" v-if="dataStatus == '0'">
                 <el-col :span="2" class="left"> 资质审核:</el-col>
                 <el-col :span="20" class="right">
                   <el-radio-group v-model="form.status">
@@ -62,11 +62,11 @@
                 <el-col :span="22" class="right">
                   <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
                 </el-col>
-              </el-col>
+              </el-col> -->
               <el-col :span="24" class="formBtn">
                 <el-button type="danger" size="mini" @click="back">取消保存</el-button>
                 <el-button type="primary" size="mini" v-if="dataStatus === '0'" @click="onSubmit()">提交保存</el-button>
-                <el-button type="primary" size="mini" v-if="dataStatus === '3'" @click="toStatus('4')">高企认证确认</el-button>
+                <el-button type="primary" size="mini" v-if="dataStatus === '1'" @click="toStatus('2')">高企申报确认</el-button>
               </el-col>
             </el-form>
           </el-col>
@@ -126,7 +126,7 @@ export default {
       let data = this.form;
       data.status = status;
       const res = await this.status(data);
-      if (this.$checkRes(res, '高企认证成功', res.errmsg || '高企认证失败')) {
+      if (this.$checkRes(res, '高企申报成功', res.errmsg || '高企申报失败')) {
         this.back();
       }
     },

+ 2 - 10
src/views/adminCenter/ticket/flow.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+const { ticketType } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
@@ -24,16 +25,7 @@ export default {
   data: function () {
     return {
       list: [],
-      status: [
-        { value: '0', label: '申请' },
-        { value: '1', label: '资质审核成功' },
-        { value: '-1', label: '资质审查失败' },
-        { value: '2', label: '企业填写资料完成,信息资料审查中' },
-        { value: '3', label: '中介机构审核成功' },
-        { value: '-3', label: '信息资料审查失败' },
-        { value: '4', label: '高企认证成功' },
-        { value: '5', label: '创新券成功发放' },
-      ],
+      status: ticketType,
     };
   },
   created() {

+ 2 - 2
src/views/service/ticket.vue

@@ -43,7 +43,6 @@
                     </el-form-item>
                   </el-col>
                 </el-row>
-
                 <el-col :span="24" class="formBtn">
                   <el-button type="danger" size="mini" @click="back">取消申请</el-button>
                   <el-button type="primary" size="mini" @click="onSubmit('form')">提交申请</el-button>
@@ -89,7 +88,7 @@ export default {
     onSubmit(formName) {
       this.$refs[formName].validate(async (valid) => {
         if (valid) {
-          const obj = { user_id: this.user._id };
+          const obj = { user_id: this.user._id, mechanism_id: this.form.mechanism_id };
           const material = this.resetData();
           const medium_material = this.resetDataMM();
           if (material.length < 3) {
@@ -98,6 +97,7 @@ export default {
           }
           obj.material = material;
           obj.medium_material = medium_material;
+          console.log(obj);
           let res = await this.create(obj);
           if (this.$checkRes(res)) {
             this.$message({