|
|
@@ -114,11 +114,11 @@
|
|
|
<el-input v-model="form.zfiAmount" style="width: 200px" @input="getBigSmall" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <!-- <el-col :span="8">
|
|
|
<el-form-item label="收款账号" prop="zfiCollectionAccount" v-if="zfpcrLoanType != '0'">
|
|
|
<el-input v-model="form.zfiCollectionAccount" style="width: 200px" />
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
@@ -128,6 +128,51 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
+ <!-- 发票附件 -->
|
|
|
+ <el-divider content-position="left">发票附件</el-divider>
|
|
|
+ <el-table :data="invoiceFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 合同附件 -->
|
|
|
+ <el-divider content-position="left">合同附件</el-divider>
|
|
|
+ <el-table :data="contractFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 其他附件 -->
|
|
|
+ <el-divider content-position="left">其他附件</el-divider>
|
|
|
+ <el-table :data="otherFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<div class="footer" style="float: right;
|
|
|
margin-bottom:2px;">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
@@ -200,7 +245,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {listSupplierCreditLine,getCreditDetail,getAccountsCollection,getSupplierAvailableBalance,updateCredit} from "@/api/service/credit/credit";
|
|
|
+import {listSupplierCreditLine,getCreditDetail,getAccountsCollection,getSupplierAvailableBalance,updateCredit,getFile} from "@/api/service/credit/credit";
|
|
|
import {accAdd} from "@/utils/calculation";
|
|
|
export default {
|
|
|
name: "addCredit",
|
|
|
@@ -310,7 +355,13 @@ export default {
|
|
|
//产品编号
|
|
|
zfpId:"",
|
|
|
//利率
|
|
|
- zfpcrRate:''
|
|
|
+ zfpcrRate:'',
|
|
|
+ //合同附件
|
|
|
+ contractFileList:[],
|
|
|
+ //发票附件
|
|
|
+ invoiceFileList:[],
|
|
|
+ //其他文件
|
|
|
+ otherFileList:[]
|
|
|
};
|
|
|
},
|
|
|
watch:{
|
|
|
@@ -325,6 +376,8 @@ export default {
|
|
|
if(response.data.payList){
|
|
|
this.ticketList = response.data.payList.records;
|
|
|
this.getReTotal(this.ticketList);
|
|
|
+ //附件
|
|
|
+ this.getFile(this.ticketList);
|
|
|
}
|
|
|
|
|
|
})
|
|
|
@@ -404,6 +457,23 @@ export default {
|
|
|
});
|
|
|
//合计
|
|
|
this.getReTotal(this.ticketList);
|
|
|
+ //附件
|
|
|
+ this.getFile(this.ticketList);
|
|
|
+ },
|
|
|
+ //获取附件信息
|
|
|
+ getFile(datas){
|
|
|
+ var queryParamsFile = {};
|
|
|
+ queryParamsFile.ticketList = datas;
|
|
|
+ getFile(queryParamsFile).then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //获取发票文件
|
|
|
+ this.invoiceFileList = response.data.invoiceFileList;
|
|
|
+ //获取合同文件
|
|
|
+ this.contractFileList = response.data.contractFileList;
|
|
|
+ //获取其他文件
|
|
|
+ this.otherFileList = response.data.otherFileList;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
/* 多选框跨页 */
|
|
|
rowkey(row) {
|
|
|
@@ -442,6 +512,8 @@ export default {
|
|
|
//合计
|
|
|
this.getReTotal(this.chooseTicket);
|
|
|
this.ticketList = this.chooseTicket;
|
|
|
+ //附件
|
|
|
+ this.getFile(this.ticketList);
|
|
|
//开立方赋值
|
|
|
this.$set(this.form, "openName",this.chooseTicket[0].payName);
|
|
|
this.open = false;
|
|
|
@@ -461,9 +533,9 @@ export default {
|
|
|
this.checkTotalAmt = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
|
|
|
}
|
|
|
//签发金额
|
|
|
- this.$set(this.form, "zfiAmount",this.checkTotalAmt);
|
|
|
+ // this.$set(this.form, "zfiAmount",this.checkTotalAmt);
|
|
|
//签发金额大写
|
|
|
- this.issuedAmount = this.smallToBig(this.checkTotalAmt);
|
|
|
+ //this.issuedAmount = this.smallToBig(this.checkTotalAmt);
|
|
|
this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
|
|
|
this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
|
|
|
},
|
|
|
@@ -485,6 +557,7 @@ export default {
|
|
|
if(this.$refs.tablePay){
|
|
|
this.$refs.tablePay.clearSelection();
|
|
|
}
|
|
|
+ this.getFile(this.ticketList);
|
|
|
},
|
|
|
/* 删除按钮 */
|
|
|
handleDelete(index, rows) {
|
|
|
@@ -644,7 +717,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
//放款方式==指定供应商时收款账号必输
|
|
|
- if("1"== this.zfpcrLoanType){
|
|
|
+ /* if("1"== this.zfpcrLoanType){
|
|
|
if(!this.form.zfiCollectionAccount){
|
|
|
this.$message({
|
|
|
message: '请输入收款账号',
|
|
|
@@ -652,7 +725,7 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- }
|
|
|
+ } */
|
|
|
if(parseFloat(this.form.zfiAmount) > parseFloat(this.availableAmt)){
|
|
|
this.$message({
|
|
|
message: '签发金额不可大于可用金额',
|
|
|
@@ -660,7 +733,7 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- if(parseFloat(this.form.zfiAmount) > parseFloat(this.checkTotalAmt)){
|
|
|
+ if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
|
|
|
this.$message({
|
|
|
message: '签发金额不可大于合计金额',
|
|
|
type: 'warning'
|
|
|
@@ -669,41 +742,92 @@ export default {
|
|
|
}
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "Loading",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
- })
|
|
|
- //应收账款
|
|
|
- this.form.ticketList = this.ticketList;
|
|
|
- //产品是否可拆分
|
|
|
- this.form.zfpSplit = this.zfpSplit;
|
|
|
- //放款方式
|
|
|
- this.form.zfpcrLoanType = this.zfpcrLoanType;
|
|
|
- //融信类型
|
|
|
- this.form.type = "2";
|
|
|
- //利率
|
|
|
- this.form.zfsqRate = this.zfsqRate;
|
|
|
- //产品
|
|
|
- this.form.zfpId = this.zfpId;
|
|
|
- //可用额度
|
|
|
- this.form.availableAmt = this.availableAmt;
|
|
|
- //合计金额
|
|
|
- this.form.checkTotalAmt = this.checkTotalAmt;
|
|
|
- //利率
|
|
|
- this.form.zfiRate = this.zfpcrRate;
|
|
|
- updateCredit(this.form).then(response => {
|
|
|
- loading.close();
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
- this.$router.go(-1);
|
|
|
- }).catch((response)=>{
|
|
|
- loading.close();
|
|
|
- });
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ background: 'rgba(0, 0, 0,0)'
|
|
|
+ });
|
|
|
+ //签发金额小于合计金额
|
|
|
+ if((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))){
|
|
|
+ var _this = this;
|
|
|
+ this.$confirm('签发金额小于应付金额合计,是否确认提交', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ //应收账款
|
|
|
+ _this.form.ticketList = _this.ticketList;
|
|
|
+ //产品是否可拆分
|
|
|
+ _this.form.zfpSplit = _this.zfpSplit;
|
|
|
+ //放款方式
|
|
|
+ _this.form.zfpcrLoanType = _this.zfpcrLoanType;
|
|
|
+ //融信类型
|
|
|
+ _this.form.type = "2";
|
|
|
+ //利率
|
|
|
+ _this.form.zfsqRate = _this.zfsqRate;
|
|
|
+ //产品
|
|
|
+ _this.form.zfpId = _this.zfpId;
|
|
|
+ //可用额度
|
|
|
+ _this.form.availableAmt = _this.availableAmt;
|
|
|
+ //合计金额
|
|
|
+ _this.form.checkTotalAmt = _this.moneyDelete(_this.checkTotalAmt);
|
|
|
+ //利率
|
|
|
+ _this.form.zfiRate = _this.zfpcrRate;
|
|
|
+ updateCredit(_this.form).then(response => {
|
|
|
+ loading.close();
|
|
|
+ _this.msgSuccess("修改成功");
|
|
|
+ _this.$store.dispatch("tagsView/delView", _this.$route);
|
|
|
+ _this.$router.go(-1);
|
|
|
+ }).catch((response)=>{
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }).catch((e) => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ //应收账款
|
|
|
+ this.form.ticketList = this.ticketList;
|
|
|
+ //产品是否可拆分
|
|
|
+ this.form.zfpSplit = this.zfpSplit;
|
|
|
+ //放款方式
|
|
|
+ this.form.zfpcrLoanType = this.zfpcrLoanType;
|
|
|
+ //融信类型
|
|
|
+ this.form.type = "2";
|
|
|
+ //利率
|
|
|
+ this.form.zfsqRate = this.zfsqRate;
|
|
|
+ //产品
|
|
|
+ this.form.zfpId = this.zfpId;
|
|
|
+ //可用额度
|
|
|
+ this.form.availableAmt = this.availableAmt;
|
|
|
+ //合计金额
|
|
|
+ this.form.checkTotalAmt = this.moneyDelete(this.checkTotalAmt);
|
|
|
+ //利率
|
|
|
+ this.form.zfiRate = this.zfpcrRate;
|
|
|
+ updateCredit(this.form).then(response => {
|
|
|
+ loading.close();
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ }).catch((response)=>{
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //金额去掉千分位
|
|
|
+ moneyDelete(num){
|
|
|
+ if(num &&num != undefined && num != null){
|
|
|
+ let _num = num;
|
|
|
+ _num = _num.toString();
|
|
|
+ _num = _num.replace(/,/gi,'');
|
|
|
+ return _num;
|
|
|
+ }else{
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
};
|