|
|
@@ -1,103 +1,10 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form ref="form" :model="form" :rules="rules" :inline="true" style="margin-top: 20px" label-width="auto" >
|
|
|
- <el-divider content-position="left">补充资料</el-divider>
|
|
|
- <el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="融信编号" prop="zfiNumber">
|
|
|
- <el-input v-model="form.zfiNumber" style="width: 200px" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="创建时间" prop="createTime">
|
|
|
- <el-date-picker disabled size="small" style="width: 200px" v-model="form.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="创建人" prop="createName">
|
|
|
- <el-input v-model="form.createName" style="width: 200px" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="开立方" prop="openName">
|
|
|
- <el-input v-model="form.openName" style="width: 200px" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="接收方" prop="zfiSupplierId">
|
|
|
- <el-select
|
|
|
- style="width: 200px"
|
|
|
- v-model="form.zfiSupplierId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- remote
|
|
|
- disabled
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in supplierList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="签发有效期" prop="zfiEffectiveDate">
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="form.zfiEffectiveDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择签发有效期"
|
|
|
- disabled>
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="承诺还款日" prop="zfiExpireDate">
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="form.zfiExpireDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择承诺还款日"
|
|
|
- disabled>
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="授信额度" prop="zfiCoreQuotaId">
|
|
|
- <el-select
|
|
|
- style="width: 200px"
|
|
|
- v-model="form.zfiCoreQuotaId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- remote
|
|
|
- disabled
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in creditLineList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <span>可用额度:</span>
|
|
|
- <span>{{availableAmt}}</span>
|
|
|
- <br>
|
|
|
- <span>有效期:</span>
|
|
|
- <span>{{validityDate}}</span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-divider content-position="left" >应收账款</el-divider>
|
|
|
+ <el-divider content-position="left">签收</el-divider>
|
|
|
<el-form-item style="margin-left: 100px">
|
|
|
- <el-button size="mini" type="primary" @click="openTicket">选择</el-button>
|
|
|
- <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
|
|
|
+ <el-button size="mini" type="primary" :disabled="isClick" @click="openTicket">选择</el-button>
|
|
|
+ <el-button size="mini" @click="deleteTicekt" :disabled="isClick" >清空全部</el-button>
|
|
|
<el-form-item label="合计金额:">
|
|
|
<span>{{checkTotalAmt}}</span>
|
|
|
</el-form-item>
|
|
|
@@ -117,6 +24,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ :disabled="isClick"
|
|
|
@click="handleDelete(scope.$index, ticketList)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
@@ -186,7 +94,8 @@
|
|
|
</el-table>
|
|
|
<div class="footer" style="float: right;
|
|
|
margin-bottom:2px;">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button type="info" @click="submitForm('01')">拒签</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm('00')">签收</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
<!-- 应收账款信息 -->
|
|
|
@@ -247,8 +156,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {getCreditDetail,getReceiverList,listCreditLine,getAvailableBalance,getAccountsCollection,updateCredit,getFile} from "@/api/service/credit/credit";
|
|
|
-import {addInfor} from "@/api/service/credit/creditHandle";
|
|
|
+import {getCreditDetail,getAvailableBalance,getAccountsCollection,getFile} from "@/api/service/credit/credit";
|
|
|
+import {signFor,getContractFile} from "@/api/service/credit/creditHandle";
|
|
|
import {accAdd} from "@/utils/calculation";
|
|
|
export default {
|
|
|
name: "addCredit",
|
|
|
@@ -317,7 +226,12 @@ export default {
|
|
|
//开立方编号
|
|
|
zfiCoreId:"",
|
|
|
//接收方
|
|
|
- zfiSupplierId:""
|
|
|
+ zfiSupplierId:"" ,
|
|
|
+ //融信类型
|
|
|
+ zfiCreateType:"",
|
|
|
+ //控制按钮是否可点击
|
|
|
+ isClick:true
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
watch:{
|
|
|
@@ -327,14 +241,22 @@ export default {
|
|
|
const zfiId = this.$route.params && this.$route.params.zfiId;
|
|
|
getCreditDetail(zfiId).then((response) => {
|
|
|
if(response.data){
|
|
|
- //接收方编号
|
|
|
- this.supplierForm.zfiSupplierId = response.data.financeInf.zfiSupplierId;
|
|
|
- getReceiverList(this.supplierForm).then((response) => {
|
|
|
- this.supplierList = response.data.records.map(item => {
|
|
|
- return { value: item.scyId, label: item.scyName};
|
|
|
- });
|
|
|
- });
|
|
|
- this.listCreditLine(response.data);
|
|
|
+ //签发金额
|
|
|
+ this.form= response.data.financeInf;
|
|
|
+ //签发金额大写
|
|
|
+ this.issuedAmount = this.smallToBig(this.form.zfiAmount);
|
|
|
+ //开立方编号
|
|
|
+ this.zfiCoreId = response.data.financeInf.zfiCoreId;
|
|
|
+ //接收方
|
|
|
+ this.zfiSupplierId = response.data.financeInf.zfiSupplierId;
|
|
|
+ //类型
|
|
|
+ this.zfiCreateType = response.data.financeInf.zfiCreateType;
|
|
|
+ //核心
|
|
|
+ if( this.zfiCreateType == "1"){
|
|
|
+ this.isClick = false;
|
|
|
+ }else{
|
|
|
+ this.isClick = true;
|
|
|
+ }
|
|
|
}
|
|
|
if(response.data.payList){
|
|
|
this.ticketList = response.data.payList.records;
|
|
|
@@ -355,16 +277,6 @@ export default {
|
|
|
rowkeyCustomer(row) {
|
|
|
return row.cciId;
|
|
|
},
|
|
|
- //重新合计
|
|
|
- getReTotal(chooseTicket){
|
|
|
- //合计
|
|
|
- this.checkTotalAmt = "0.00";
|
|
|
- for(var i = 0; i < chooseTicket.length;i++){
|
|
|
- this.checkTotalAmt = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
|
|
|
- }
|
|
|
- this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
|
|
|
- this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
|
|
|
- },
|
|
|
//获取附件信息
|
|
|
getFile(datas){
|
|
|
var queryParamsFile = {};
|
|
|
@@ -394,26 +306,6 @@ export default {
|
|
|
this.open = true;
|
|
|
this.payTitle = "应收账款";
|
|
|
},
|
|
|
- //核心授信额度
|
|
|
- listCreditLine(data){
|
|
|
- this.creditParams.zfpcrId = data.financeInf.zfiCoreQuotaId;
|
|
|
- listCreditLine(this.creditParams).then((response) => {
|
|
|
- this.creditLineList = response.data.map(item => {
|
|
|
- return { value: item.zfpcrId, label: item.zfpName,zfpcrDateType:item.zfpcrDateType,zfpcrEndDate:item.zfpcrEndDate,zfpcrLoanType:item.zfpcrLoanType,zfpSplit:item.zfpSplit,zfpId:item.zfpId,zfpcrRate:item.zfpcrRate};
|
|
|
- });
|
|
|
- this.form = data.financeInf;
|
|
|
- //开立方
|
|
|
- this.form.openName = data.openName;
|
|
|
- //创建人
|
|
|
- this.form.createName = data.createName;
|
|
|
- //签发金额大写
|
|
|
- this.issuedAmount = this.smallToBig(this.form.zfiAmount);
|
|
|
- //开立方编号
|
|
|
- this.zfiCoreId = data.financeInf.zfiCoreId;
|
|
|
- //接收方
|
|
|
- this.zfiSupplierId = data.financeInf.zfiSupplierId;
|
|
|
- });
|
|
|
- },
|
|
|
//应收账款查询列表
|
|
|
getAccountsCollection() {
|
|
|
//开立方为应收企业的
|
|
|
@@ -499,10 +391,10 @@ export default {
|
|
|
},
|
|
|
//取消选择按钮
|
|
|
cancelTicket(){
|
|
|
- this.ticketList = [];
|
|
|
+ /* this.ticketList = [];
|
|
|
if(this.$refs.tablePay){
|
|
|
this.$refs.tablePay.clearSelection();
|
|
|
- }
|
|
|
+ } */
|
|
|
this.open = false;
|
|
|
},
|
|
|
/** 清空选择信息 */
|
|
|
@@ -666,22 +558,26 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//修改
|
|
|
- submitForm(){
|
|
|
+ submitForm(param){
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
- if(this.ticketList.length < 1){
|
|
|
+ //通过
|
|
|
+ if(param == "00"){
|
|
|
+ if(this.ticketList.length < 1){
|
|
|
+ this.$message({
|
|
|
+ message: '请选择应收账款',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
|
|
|
this.$message({
|
|
|
- message: '请选择应收账款',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
|
|
|
- this.$message({
|
|
|
- message: '签发金额不可大于合计金额',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
+ message: '签发金额不可大于合计金额',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (valid) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -698,9 +594,10 @@ export default {
|
|
|
}).then(function() {
|
|
|
//应收账款
|
|
|
_this.form.ticketList = _this.ticketList;
|
|
|
- addInfor(_this.form).then(response => {
|
|
|
+ _this.form.flag = param;
|
|
|
+ signFor(_this.form).then(response => {
|
|
|
loading.close();
|
|
|
- _this.msgSuccess("补充资料成功");
|
|
|
+ _this.msgSuccess("签收成功");
|
|
|
_this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
_this.$router.go(-1);
|
|
|
}).catch((response)=>{
|
|
|
@@ -713,9 +610,10 @@ export default {
|
|
|
}else{
|
|
|
//应收账款
|
|
|
this.form.ticketList = this.ticketList;
|
|
|
- addInfor(this.form).then(response => {
|
|
|
+ this.form.flag = param;
|
|
|
+ signFor(this.form).then(response => {
|
|
|
loading.close();
|
|
|
- this.msgSuccess("补充资料成功");
|
|
|
+ this.msgSuccess("签收成功");
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
this.$router.go(-1);
|
|
|
}).catch((response)=>{
|
|
|
@@ -735,8 +633,16 @@ export default {
|
|
|
}else{
|
|
|
return num;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ },
|
|
|
+ //获取合同文件
|
|
|
+ getContractFile(){
|
|
|
+ var fileForm = {};
|
|
|
+ getContractFile().then(response => {
|
|
|
+
|
|
|
+ }).catch((response)=>{
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|