|
|
@@ -149,8 +149,9 @@
|
|
|
</el-table>
|
|
|
<div class="footer" style="float: right;
|
|
|
margin-bottom:2px;">
|
|
|
- <!-- <el-button type="info" @click="submitForm('01')">拒签</el-button> -->
|
|
|
- <el-button type="primary" @click="submitForm('00')">签收</el-button>
|
|
|
+ <el-button type="info" @click="submitForm('01')">拒签</el-button>
|
|
|
+ <el-button type="primary" @click="sign()" v-if="!isHas">签收</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm('00')" v-if="isHas">内部审批</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
<!-- 应收账款信息 -->
|
|
|
@@ -227,6 +228,9 @@ import {signFor} from "@/api/service/credit/creditHandle";
|
|
|
import {accAdd} from "@/utils/calculation";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
import AddBill from "@/views/service/bill/addBill";
|
|
|
+import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
|
|
|
+import {listCompanyHandler} from "@/api/common/companyHandler";
|
|
|
+import Cookies from 'js-cookie'
|
|
|
export default {
|
|
|
name: "addCredit",
|
|
|
components: {AddBill},
|
|
|
@@ -322,7 +326,13 @@ export default {
|
|
|
//接收方账户
|
|
|
receiverAccount:"",
|
|
|
//起止日期
|
|
|
- stopDate:""
|
|
|
+ stopDate:"",
|
|
|
+ //控制签收,内部审批按钮展示
|
|
|
+ isHas:true,
|
|
|
+ //融资企业审批状态
|
|
|
+ zfiSupplierStatus:"",
|
|
|
+ //融信编号
|
|
|
+ zfiId:"",
|
|
|
|
|
|
};
|
|
|
},
|
|
|
@@ -331,6 +341,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
const zfiId = this.$route.params && this.$route.params.zfiId;
|
|
|
+ this.zfiId = zfiId;
|
|
|
getCreditDetail(zfiId).then((response) => {
|
|
|
if(response.data){
|
|
|
//签发金额
|
|
|
@@ -343,6 +354,8 @@ export default {
|
|
|
this.zfiSupplierId = response.data.financeInf.zfiSupplierId;
|
|
|
//类型
|
|
|
this.zfiCreateType = response.data.financeInf.zfiCreateType;
|
|
|
+ //融资方审批状态
|
|
|
+ this.zfiSupplierStatus = response.data.financeInf.zfiSupplierStatus;
|
|
|
//核心
|
|
|
if( this.zfiCreateType == "1"){
|
|
|
this.isClick = false;
|
|
|
@@ -367,8 +380,10 @@ export default {
|
|
|
//附件
|
|
|
this.getFile(this.ticketList);
|
|
|
}
|
|
|
-
|
|
|
+ //查询有无签收内部审批
|
|
|
+ this.isOpenApproval();
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 取消按钮
|
|
|
@@ -720,10 +735,17 @@ export default {
|
|
|
_this.form.ticketList = _this.ticketList;
|
|
|
_this.form.flag = param;
|
|
|
signFor(_this.form).then(response => {
|
|
|
- loading.close();
|
|
|
- _this.msgSuccess("签收成功");
|
|
|
- _this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
- _this.$router.go(-1);
|
|
|
+ loading.close();
|
|
|
+ //通过
|
|
|
+ if("00" == param){
|
|
|
+ _this.msgSuccess("融信资料已提交企业内部审核");
|
|
|
+ _this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
+ _this.$router.go(-1);
|
|
|
+ }else if ("01" == param){//拒绝
|
|
|
+ _this.msgSuccess("拒绝后,该笔融信业务将作废");
|
|
|
+ _this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
+ _this.$router.go(-1);
|
|
|
+ }
|
|
|
}).catch((response)=>{
|
|
|
loading.close();
|
|
|
});
|
|
|
@@ -736,10 +758,17 @@ export default {
|
|
|
this.form.ticketList = this.ticketList;
|
|
|
this.form.flag = param;
|
|
|
signFor(this.form).then(response => {
|
|
|
- loading.close();
|
|
|
- this.msgSuccess("签收成功");
|
|
|
- this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
- this.$router.go(-1);
|
|
|
+ loading.close();
|
|
|
+ //通过
|
|
|
+ if("00" == param){
|
|
|
+ this.msgSuccess("融信资料已提交企业内部审核");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ }else if ("01" == param){//拒绝
|
|
|
+ this.msgSuccess("拒绝后,该笔融信业务将作废");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ }
|
|
|
}).catch((response)=>{
|
|
|
loading.close();
|
|
|
});
|
|
|
@@ -836,6 +865,51 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
self.openAddBill = false
|
|
|
+ },
|
|
|
+ //查询有无签收内部审批
|
|
|
+ isOpenApproval(){
|
|
|
+ var confirmParam = {};
|
|
|
+ confirmParam.menuId = "1000000005";
|
|
|
+ isOpenApproval(confirmParam).then((response) => {
|
|
|
+ var result = response.data.isOpen;
|
|
|
+ //有签收内部审批
|
|
|
+ if(true == result){
|
|
|
+ //获取融资方审批状态(拒绝或者状态为空时显示通过按钮)
|
|
|
+ if(this.zfiSupplierStatus == "02" || this.zfiSupplierStatus == "" || this.zfiSupplierStatus == "null" || this.zfiSupplierStatus == null ){
|
|
|
+ this.isHas = true;
|
|
|
+ }else{
|
|
|
+ this.isHas = false;
|
|
|
+ }
|
|
|
+ }else{//无签收内部审批,显示签收按钮
|
|
|
+ this.isHas = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //签收
|
|
|
+ sign(){
|
|
|
+ if(this.zfiSupplierStatus != "01"){
|
|
|
+ this.$message({
|
|
|
+ message: "请内部审核通过后,再融信签收",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ //查询当前用户是否为经办人
|
|
|
+ listCompanyHandler().then((response) => {
|
|
|
+ //先判断核心企业确权审批是否通过
|
|
|
+ if(false == response.data){
|
|
|
+ this.$message({
|
|
|
+ message: "此操作需经办人权限,请确认您是否是经办人",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ Cookies.set("/credit/creditSeal/"+this.zfiId + "/", this.$route.fullPath)
|
|
|
+ this.$router.push({ path: "/credit/creditSeal/"+this.zfiId + "/" });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
};
|