Ver código fonte

供应商申请提示

xuefy 3 anos atrás
pai
commit
f684cfc9dd

+ 11 - 0
front-vue/src/api/service/credit/approvalRelatedCredit.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+
+//获取审批流是否开启
+export function isOpenApproval(data) {
+  return request({
+    url: '/sc-service/approvalRelatedCredit/isOpenApproval',
+    method: 'put',
+    data: data
+  })
+}

+ 66 - 6
front-vue/src/views/service/credit/creditApply.vue

@@ -261,6 +261,7 @@
 </template>
 <script>
 import {getAccountsCollection,addCredit,getFile} from "@/api/service/credit/credit";
+import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
 import {accAdd} from "@/utils/calculation";
 import {getToken} from "@/utils/auth";
 import AddBill from "@/views/service/bill/addBill";
@@ -655,9 +656,38 @@ export default {
                             _this.form.checkTotalAmt = _this.moneyDelete(_this.checkTotalAmt);
                             addCredit(_this.form).then(response => {
                                 loading.close();
-                                _this.msgSuccess("新增成功");
-                                _this.$store.dispatch("tagsView/delView", _this.$route);
-                                _this.$router.go(-1);
+                                //判断是否开启内部审批
+                                var params = {};
+                                params.menuId = "1000000007";
+                                isOpenApproval(params).then((response) => {
+                                    var result = response.data.isOpen;
+                                    //开启内部审批
+                                    if(result == true){
+                                        _this.msgSuccess("融信资料已提交企业内部审核");
+                                        _this.$store.dispatch("tagsView/delView", _this.$route);
+                                        _this.$router.go(-1);
+                                    }else{
+                                        //没有开启内部审批
+                                        //判断有没有开启平台审批
+                                        var platParam = {};
+                                        platParam.menuId = "1000000004";
+                                        isOpenApproval(platParam).then((response) => {
+                                            var platResult = response.data.isOpen;
+                                            //开启平台审批
+                                            if(platResult){
+                                                _this.msgSuccess("融信资料已提交平台审核,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,将在2小时内完成,请留意站内信息");
+                                                _this.$store.dispatch("tagsView/delView", _this.$route);
+                                                _this.$router.go(-1);
+                                            }else{
+                                                //未开启平台审批
+                                                _this.msgSuccess("融资资料已提交,待:"+_this.form.openName+"确权;确权结果请留意待办事项与站内消息");
+                                                _this.$store.dispatch("tagsView/delView",_this.$route);
+                                                _this.$router.go(-1);
+                                            }
+                                        });
+                                    }
+                    
+                                })
                             }).catch((response)=>{
                                   loading.close();
                             });
@@ -673,9 +703,39 @@ export default {
                     this.form.checkTotalAmt = this.moneyDelete(this.checkTotalAmt);
                     addCredit(this.form).then(response => {
                         loading.close();
-                        this.msgSuccess("新增成功");
-                        this.$store.dispatch("tagsView/delView", this.$route);
-                        this.$router.go(-1);
+                        //判断是否开启内部审批
+                        var params = {};
+                        params.menuId = "1000000007";
+                        isOpenApproval(params).then((response) => {
+                            var result = response.data.isOpen;
+                            //开启内部审批
+                            if(result == true){
+                                this.msgSuccess("融信资料已提交企业内部审核");
+                                this.$store.dispatch("tagsView/delView", this.$route);
+                                this.$router.go(-1);
+                            }else{
+                                //没有开启内部审批
+                                //判断有没有开启平台审批
+                                var platParam = {};
+                                platParam.menuId = "1000000004";
+                                isOpenApproval(platParam).then((response) => {
+                                    var platResult = response.data.isOpen;
+                                    //开启平台审批
+                                    if(platResult){
+                                        this.msgSuccess("融信资料已提交平台审核,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,将在2小时内完成,请留意站内信息");
+                                        this.$store.dispatch("tagsView/delView", this.$route);
+                                        this.$router.go(-1);
+                                    }else{
+                                        //未开启平台审批
+                                        this.msgSuccess("融资资料已提交,待:"+this.form.openName+"确权;确权结果请留意待办事项与站内消息");
+                                        this.$store.dispatch("tagsView/delView", this.$route);
+                                        this.$router.go(-1);
+                                    }
+                                });
+                            }
+             
+                        })
+                        
                     }).catch((response)=>{
                     loading.close();
                     });