|
|
@@ -66,13 +66,20 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="应付方" prop="zbiPayerId">
|
|
|
+ <el-input
|
|
|
+ v-model="form.payerName"
|
|
|
+ maxlength="20"
|
|
|
+ style="width: 300px"
|
|
|
+ :disabled="true"
|
|
|
+ v-if="company.scyId != form.zbiPayerId && company.scyId != form.zbiPayeeId"
|
|
|
+ />
|
|
|
<el-select style="width: 300px" v-model="form.zbiPayerId" :disabled="true" filterable remote
|
|
|
- v-if="type == '00'">
|
|
|
+ v-if="type == '00' && company.scyId == form.zbiPayerId || type == '00' && company.scyId == form.zbiPayeeId">
|
|
|
<el-option :label="company.scyName" :value="company.scyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-select style="width: 300px" v-model="form.zbiPayerId" filterable clearable remote
|
|
|
- v-if="type == '01'">
|
|
|
+ <el-select style="width: 300px" v-model="form.zbiPayerId" filterable clearable remote
|
|
|
+ v-if="type == '01' && company.scyId == form.zbiPayerId || type == '01' && company.scyId == form.zbiPayeeId">
|
|
|
<el-option v-for="(item,index) in companyRelList" :key="index" :label="item.launchScyId == company.scyId ? item.receiveScyName : item.launchScyName" :value="item.launchScyId == company.scyId ? item.receiveScyId : item.launchScyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -107,27 +114,42 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="应收方" prop="zbiPayeeId">
|
|
|
+ <el-input
|
|
|
+ v-model="form.payeeName"
|
|
|
+ maxlength="20"
|
|
|
+ style="width: 300px"
|
|
|
+ :disabled="true"
|
|
|
+ v-if="company.scyId != form.zbiPayerId && company.scyId != form.zbiPayeeId"
|
|
|
+ />
|
|
|
<el-select style="width: 300px" v-model="form.zbiPayeeId" :disabled="true" filterable remote
|
|
|
- v-if="type == '01'">
|
|
|
+ v-if="type == '01' && company.scyId == form.zbiPayerId || type == '01' && company.scyId == form.zbiPayeeId">
|
|
|
<el-option :label="company.scyName" :value="company.scyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-select style="width: 300px" v-model="form.zbiPayeeId" filterable clearable remote
|
|
|
- v-if="type == '00'">
|
|
|
+ <el-select style="width: 300px" v-model="form.zbiPayeeId" filterable clearable remote
|
|
|
+ v-if="type == '00' && company.scyId == form.zbiPayerId || type == '00' && company.scyId == form.zbiPayeeId">
|
|
|
<el-option v-for="(item,index) in companyRelList" :key="index" :label="item.launchScyId == company.scyId ? item.receiveScyName : item.launchScyName" :value="item.launchScyId == company.scyId ? item.receiveScyId : item.launchScyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="金额" prop="zbiAmount">
|
|
|
+ <el-form-item label="金额">
|
|
|
<el-input
|
|
|
+ :disabled="true"
|
|
|
v-model="form.zbiAmount"
|
|
|
- placeholder="请输入金额"
|
|
|
maxlength="20"
|
|
|
style="width: 300px"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="金额大写">
|
|
|
+ <el-input
|
|
|
+ :disabled="true"
|
|
|
+ :value="smallToBig(form.zbiAmount)"
|
|
|
+ style="width: 300px"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="合同编号" prop="zbiContractNo">
|
|
|
<el-input
|
|
|
v-model="form.zbiContractNo"
|
|
|
@@ -272,7 +294,7 @@
|
|
|
drag
|
|
|
ref="upload"
|
|
|
:file-list="fileList"
|
|
|
- :auto-upload="false"
|
|
|
+ :auto-upload="true"
|
|
|
:http-request="httpRequest"
|
|
|
:before-remove="beforeRemove"
|
|
|
:on-remove="invoiceRemove"
|
|
|
@@ -290,9 +312,9 @@
|
|
|
严禁上传包含色情、暴力、反动等相关违法信息的文件。
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
- <el-button type="primary" @click="submitUpload()"
|
|
|
+ <!-- <el-button type="primary" @click="submitUpload()"
|
|
|
>点击上传</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button type="primary" @click="toCheck()"
|
|
|
>完成去验真</el-button
|
|
|
>
|
|
|
@@ -321,7 +343,7 @@
|
|
|
<el-main style="height: 550px; border: groove">
|
|
|
<el-checkbox-group
|
|
|
v-model="checkedInvoice"
|
|
|
- @change="handleCheckedInvoiceChange"
|
|
|
+ @change="handleInvoiceSelectionChange"
|
|
|
>
|
|
|
<el-checkbox
|
|
|
v-for="(item, index) in fileList"
|
|
|
@@ -341,25 +363,33 @@
|
|
|
class="el-icon-error"
|
|
|
style="color: red"
|
|
|
v-if="item.ziiCheckStt == '2' || item.ziiCheckStt == '3'"
|
|
|
- ></i
|
|
|
- ></el-checkbox>
|
|
|
+ >{{checkSttFormat(item)}}</i
|
|
|
+ >
|
|
|
+ </el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-main>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="toCheckAgian()"
|
|
|
- style="float: right"
|
|
|
- >重新验真</el-button
|
|
|
- >
|
|
|
+ <div style="text-align:center;margin-top:20px">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="delInvoice"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="toCheckAgian()"
|
|
|
+ >重新验真</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-aside>
|
|
|
<el-container>
|
|
|
- <el-header height="270px">
|
|
|
+ <el-header height="300px">
|
|
|
<el-image
|
|
|
style="width: 650px; height: 267px"
|
|
|
:src="invoice.url"
|
|
|
fit="scale-down"
|
|
|
@click="invoicePictureCardPreview(invoice)"
|
|
|
></el-image>
|
|
|
+ <p v-if="invoice.zbiName" style="text-align:center;color:red">发票重复,已存在名称为“{{invoice.zbiName}}”的往来账款中!</p>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
<el-form
|
|
|
@@ -431,15 +461,15 @@
|
|
|
<div v-if="active == 2">
|
|
|
<el-divider content-position="left">合同附件</el-divider>
|
|
|
<el-form ref="contract" label-width="auto" :inline="true">
|
|
|
- <el-form-item style="float: right"
|
|
|
+ <!-- <el-form-item style="float: right"
|
|
|
><el-button type="primary" @click="submitUploadContract()"
|
|
|
>上传</el-button
|
|
|
></el-form-item
|
|
|
- >
|
|
|
+ > -->
|
|
|
</el-form>
|
|
|
<el-upload
|
|
|
:file-list="contractList"
|
|
|
- :auto-upload="false"
|
|
|
+ :auto-upload="true"
|
|
|
:http-request="httpRequestContract"
|
|
|
action=""
|
|
|
ref="contractUpload"
|
|
|
@@ -454,15 +484,15 @@
|
|
|
<div v-if="active == 3">
|
|
|
<el-divider content-position="left">物流附件</el-divider>
|
|
|
<el-form ref="logistics" label-width="auto" :inline="true">
|
|
|
- <el-form-item style="float: right"
|
|
|
+ <!-- <el-form-item style="float: right"
|
|
|
><el-button type="primary" @click="submitUploadLogistics()"
|
|
|
>上传</el-button
|
|
|
></el-form-item
|
|
|
- >
|
|
|
+ > -->
|
|
|
</el-form>
|
|
|
<el-upload
|
|
|
:file-list="logisticsList"
|
|
|
- :auto-upload="false"
|
|
|
+ :auto-upload="true"
|
|
|
:http-request="httpRequestLogistics"
|
|
|
action=""
|
|
|
ref="logisticsUpload"
|
|
|
@@ -477,15 +507,15 @@
|
|
|
<div v-if="active == 4">
|
|
|
<el-divider content-position="left">其他附件</el-divider>
|
|
|
<el-form ref="other" label-width="auto" :inline="true">
|
|
|
- <el-form-item style="float: right"
|
|
|
+ <!-- <el-form-item style="float: right"
|
|
|
><el-button type="primary" @click="submitUploadOther()"
|
|
|
>上传</el-button
|
|
|
></el-form-item
|
|
|
- >
|
|
|
+ > -->
|
|
|
</el-form>
|
|
|
<el-upload
|
|
|
:file-list="otherList"
|
|
|
- :auto-upload="false"
|
|
|
+ :auto-upload="true"
|
|
|
:http-request="httpRequestOther"
|
|
|
action=""
|
|
|
ref="otherUpload"
|
|
|
@@ -530,7 +560,8 @@ import {
|
|
|
uploadBillFile,
|
|
|
getFile,
|
|
|
delFile,
|
|
|
- commitBill
|
|
|
+ commitBill,
|
|
|
+ getAmount
|
|
|
} from "@/api/service/bill/bill";
|
|
|
import {
|
|
|
getOwnCompany,
|
|
|
@@ -734,6 +765,7 @@ export default {
|
|
|
this.fileList.forEach((file) => {
|
|
|
if (element.ziiId == file.ziiId) {
|
|
|
file.ziiCheckStt = element.ziiCheckStt;
|
|
|
+ file.zbiName = element.zbiName;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -753,6 +785,7 @@ export default {
|
|
|
this.fileList.forEach((file) => {
|
|
|
if (element.ziiId == file.ziiId) {
|
|
|
file.ziiCheckStt = element.ziiCheckStt;
|
|
|
+ file.zbiName = element.zbiName;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -919,19 +952,21 @@ export default {
|
|
|
delInvoice(row){
|
|
|
var self = this
|
|
|
const ziiIds = row.ziiId || this.ids;
|
|
|
- this.$confirm("是否确认删除此数据项?", "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(function() {
|
|
|
- self.fullscreenLoading = true;
|
|
|
- return delInvoice(ziiIds);
|
|
|
+ if(ziiIds && ziiIds.length != 0){
|
|
|
+ this.$confirm("是否确认删除此数据项?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.getInvoiceList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- });
|
|
|
+ .then(function() {
|
|
|
+ self.fullscreenLoading = true
|
|
|
+ return delInvoice(ziiIds);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getInvoiceList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
//确认发票
|
|
|
submitCheck() {
|
|
|
@@ -970,17 +1005,25 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} else if(this.active == 1) {
|
|
|
- //查询合同
|
|
|
- getFile("0",this.form.zbiId).then((response) => {
|
|
|
- response.data.forEach(element => {
|
|
|
- element.url = element.url + "/" + getToken()
|
|
|
- });
|
|
|
- this.contractList = response.data;
|
|
|
- this.fullscreenLoading = false
|
|
|
+ var self = this
|
|
|
+ let fd = new FormData(); // FormData 对象
|
|
|
+ fd.append("zbiId", self.form.zbiId); // 文件对象
|
|
|
+ //计算账款金额
|
|
|
+ getAmount(fd).then((response) => {
|
|
|
+ //查询合同
|
|
|
+ getFile("0",self.form.zbiId).then((response) => {
|
|
|
+ response.data.forEach(element => {
|
|
|
+ element.url = element.url + "/" + getToken()
|
|
|
+ });
|
|
|
+ self.contractList = response.data;
|
|
|
+ self.fullscreenLoading = false
|
|
|
+ self.active++;
|
|
|
+ }).catch(() => {
|
|
|
+ self.fullscreenLoading = false
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
- this.fullscreenLoading = false
|
|
|
+ self.fullscreenLoading = false
|
|
|
})
|
|
|
- this.active++;
|
|
|
} else if(this.active == 2) {
|
|
|
//查询物流
|
|
|
getFile("1",this.form.zbiId).then((response) => {
|
|
|
@@ -1010,13 +1053,15 @@ export default {
|
|
|
this.active++;
|
|
|
}
|
|
|
},
|
|
|
- //查询合同
|
|
|
+ //查询发票
|
|
|
getInvoiceList(){
|
|
|
getInvoice(this.form.zbiId).then((response) => {
|
|
|
response.data.forEach(element => {
|
|
|
element.url = element.url + "/" + getToken()
|
|
|
});
|
|
|
this.fileList = response.data;
|
|
|
+ this.invoice = this.fileList[0] ? this.fileList[0] : {};
|
|
|
+ this.ids = []
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
|
this.fullscreenLoading = false
|