|
|
@@ -284,6 +284,9 @@ import {getToken} from "@/utils/auth";
|
|
|
import AddBill from "@/views/service/bill/addBill";
|
|
|
import EditBill from "@/views/service/bill/editBill";
|
|
|
import DetailBill from "@/views/service/credit/billDetail";
|
|
|
+import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
|
|
|
+import {listCompanyHandler} from "@/api/common/companyHandler";
|
|
|
+import Cookies from 'js-cookie'
|
|
|
export default {
|
|
|
name: "financeOpen",
|
|
|
components: {AddBill,EditBill,DetailBill},
|
|
|
@@ -861,10 +864,64 @@ export default {
|
|
|
//合计金额
|
|
|
_this.form.checkTotalAmt = _this.moneyDelete(_this.checkTotalAmt);
|
|
|
addCredit(_this.form).then(response => {
|
|
|
+ //获取融信编号
|
|
|
+ var zfiId = response.data.zfiId;
|
|
|
loading.close();
|
|
|
- _this.msgSuccess("新增成功");
|
|
|
- _this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
- _this.$router.go(-1);
|
|
|
+ //查询当前用户是否为经办人
|
|
|
+ listCompanyHandler().then((response) => {
|
|
|
+ if(false == response.data){
|
|
|
+ //当前用户不是经办人,返回到列表页
|
|
|
+ _this.msgSuccess("融信资料已提交企业内部审批");
|
|
|
+ _this.$store.dispatch(
|
|
|
+ "tagsView/delView",
|
|
|
+ _this.$route
|
|
|
+ );
|
|
|
+ _this.$router.go(-1);
|
|
|
+ }else{
|
|
|
+ //当前用户是经办人,判断有无融信开立融信的内部审批
|
|
|
+ //查询有无融信开立内部审批
|
|
|
+ var confirmParam = {};
|
|
|
+ confirmParam.menuId = "1000000001";
|
|
|
+ isOpenApproval(confirmParam).then((response) => {
|
|
|
+ var result = response.data.isOpen;
|
|
|
+ //有融信开立内部审批
|
|
|
+ if(true == result){
|
|
|
+ _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.$store.dispatch(
|
|
|
+ "tagsView/delView",
|
|
|
+ _this.$route
|
|
|
+ );
|
|
|
+ _this.$router.go(-1);
|
|
|
+ //跳转盖章页面
|
|
|
+ Cookies.set("/credit/creditSeal/"+zfiId + "/", _this.$route.fullPath)
|
|
|
+ _this.$router.push({ path: "/credit/creditSeal/"+zfiId + "/" });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
}).catch((response)=>{
|
|
|
loading.close();
|
|
|
});
|
|
|
@@ -892,9 +949,63 @@ 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 zfiId = response.data.zfiId;
|
|
|
+ //查询当前用户是否为经办人
|
|
|
+ listCompanyHandler().then((response) => {
|
|
|
+ if(false == response.data){
|
|
|
+ //当前用户不是经办人,返回到列表页
|
|
|
+ this.msgSuccess("融信资料已提交企业内部审批");
|
|
|
+ this.$store.dispatch(
|
|
|
+ "tagsView/delView",
|
|
|
+ this.$route
|
|
|
+ );
|
|
|
+ this.$router.go(-1);
|
|
|
+ }else{
|
|
|
+ //当前用户是经办人,判断有无融信开立融信的内部审批
|
|
|
+ //查询有无融信开立内部审批
|
|
|
+ var confirmParam = {};
|
|
|
+ confirmParam.menuId = "1000000001";
|
|
|
+ isOpenApproval(confirmParam).then((response) => {
|
|
|
+ var result = response.data.isOpen;
|
|
|
+ //有融信开立内部审批
|
|
|
+ if(true == result){
|
|
|
+ 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.$store.dispatch(
|
|
|
+ "tagsView/delView",
|
|
|
+ this.$route
|
|
|
+ );
|
|
|
+ this.$router.go(-1);
|
|
|
+ //跳转盖章页面
|
|
|
+ Cookies.set("/credit/creditSeal/"+zfiId + "/", this.$route.fullPath)
|
|
|
+ this.$router.push({ path: "/credit/creditSeal/"+zfiId + "/" });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
}).catch((response)=>{
|
|
|
loading.close();
|
|
|
});
|