|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-container>
|
|
|
- <el-container>
|
|
|
+ <el-container
|
|
|
+ v-loading.fullscreen.lock="fullscreenLoading">
|
|
|
<el-aside
|
|
|
style="
|
|
|
background-color: white;
|
|
@@ -175,7 +176,7 @@
|
|
|
<div v-if="active == 1">
|
|
|
<el-divider content-position="left">发票列表</el-divider>
|
|
|
<el-form ref="invoice" label-width="auto" :inline="true">
|
|
|
- <el-form-item label="合计:">{{ allAmount() }}</el-form-item>
|
|
|
+ <el-form-item label="合计:">{{ handleInput(allAmount()) }}</el-form-item>
|
|
|
<el-form-item label="大写:">{{ smallToBig(allAmount()) }}</el-form-item>
|
|
|
<el-form-item style="float: right"
|
|
|
><el-button type="primary" @click="delInvoice"
|
|
@@ -509,7 +510,6 @@
|
|
|
>上一步</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="next()" v-if="active != 4"
|
|
|
- v-loading.fullscreen.lock="fullscreenLoading"
|
|
|
>下一步</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="submit()" v-if="active == 4"
|
|
@@ -540,7 +540,7 @@ import { amtformat } from "@/utils/amtCommon"
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
export default {
|
|
|
- name: "BillEdit",
|
|
|
+ name: "billEdit",
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
@@ -657,7 +657,6 @@ export default {
|
|
|
const zbiId = this.$route.params && this.$route.params.zbiId;
|
|
|
this.fullscreenLoading = true
|
|
|
getOwnCompany().then((response) => {
|
|
|
- console.log(response);
|
|
|
this.company = response.data;
|
|
|
});
|
|
|
this.getCompanyRel()
|
|
@@ -671,7 +670,6 @@ export default {
|
|
|
//查询往来账款详情
|
|
|
getDetail(zbiId){
|
|
|
getBill(zbiId).then((response) => {
|
|
|
- console.log(response);
|
|
|
this.form = response.data;
|
|
|
if(this.form.zbiPayerId == this.company.scyId){
|
|
|
this.type = "00"
|
|
@@ -683,7 +681,6 @@ export default {
|
|
|
},
|
|
|
//切换账款类型
|
|
|
changePayer(val){
|
|
|
- console.log(val);
|
|
|
if(val == '00'){
|
|
|
this.form.zbiPayerId = this.company.scyId
|
|
|
this.form.zbiPayeeId = null
|
|
@@ -696,7 +693,6 @@ export default {
|
|
|
getCompanyRel(val){
|
|
|
this.queryParams.companyName = val
|
|
|
companyRelList(this.queryParams).then((response) => {
|
|
|
- console.log(response);
|
|
|
this.companyRelList = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -741,7 +737,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- this.invoice = response[0] ? response[0] : {};
|
|
|
+ this.invoice = this.fileList[0] ? this.fileList[0] : {};
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
|
this.fullscreenLoading = false
|
|
@@ -773,12 +769,11 @@ export default {
|
|
|
httpRequest(param) {
|
|
|
this.fullscreenLoading = true
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
- console.log(param);
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
fd.append("file", fileObj); // 文件对象
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
getInvoiceText(fd).then((response) => {
|
|
|
- response.url = response.url + "/" + getToken()
|
|
|
+ response.data.url = response.data.url + "/" + getToken()
|
|
|
this.fileList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
@@ -801,13 +796,12 @@ export default {
|
|
|
httpRequestContract(param) {
|
|
|
this.fullscreenLoading = true
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
- console.log(param);
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
fd.append("file", fileObj); // 文件对象
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "0"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
|
- response.url = response.url + "/" + getToken()
|
|
|
+ response.data.url = response.data.url + "/" + getToken()
|
|
|
this.contractList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
@@ -818,13 +812,12 @@ export default {
|
|
|
httpRequestLogistics(param) {
|
|
|
this.fullscreenLoading = true
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
- console.log(param);
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
fd.append("file", fileObj); // 文件对象
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "1"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
|
- response.url = response.url + "/" + getToken()
|
|
|
+ response.data.url = response.data.url + "/" + getToken()
|
|
|
this.logisticsList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
@@ -835,13 +828,12 @@ export default {
|
|
|
httpRequestOther(param) {
|
|
|
this.fullscreenLoading = true
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
|
- console.log(param);
|
|
|
let fd = new FormData(); // FormData 对象
|
|
|
fd.append("file", fileObj); // 文件对象
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "2"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
|
- response.url = response.url + "/" + getToken()
|
|
|
+ response.data.url = response.data.url + "/" + getToken()
|
|
|
this.otherList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
@@ -850,7 +842,6 @@ export default {
|
|
|
},
|
|
|
//删除图片
|
|
|
beforeRemove(file, fileList) {
|
|
|
- console.log(file)
|
|
|
let a = true;
|
|
|
if (file && file.status==="success") {
|
|
|
a = this.$confirm(`确定移除 ${ file.name }?`);
|
|
@@ -859,7 +850,6 @@ export default {
|
|
|
},
|
|
|
//删除合同附件
|
|
|
handleRemove(file, fileList) {
|
|
|
- console.log(fileList);
|
|
|
if(this.active == 2){
|
|
|
if (this.contractList) {
|
|
|
this.contractList = this.contractList.filter((item) =>{
|
|
@@ -870,7 +860,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- // console.log(this.contractList);
|
|
|
} else if(this.active == 3) {
|
|
|
if (this.logisticsList) {
|
|
|
this.logisticsList = this.logisticsList.filter((item) =>{
|
|
@@ -904,7 +893,6 @@ export default {
|
|
|
},
|
|
|
//查看图片
|
|
|
invoicePictureCardPreview(file) {
|
|
|
- console.log(file)
|
|
|
this.invoiceImageUrl = file.url;
|
|
|
this.invoiceVisible = true;
|
|
|
},
|
|
@@ -926,12 +914,10 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- console.log(this.fileList);
|
|
|
},
|
|
|
//删除发票
|
|
|
delInvoice(row){
|
|
|
var self = this
|
|
|
- console.log(this.ids)
|
|
|
const ziiIds = row.ziiId || this.ids;
|
|
|
this.$confirm("是否确认删除此数据项?", "警告", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -1042,10 +1028,14 @@ export default {
|
|
|
},
|
|
|
// 结束
|
|
|
submit() {
|
|
|
+ this.fullscreenLoading = true
|
|
|
commitBill(this.form.zbiId).then((response) => {
|
|
|
+ this.fullscreenLoading = false
|
|
|
this.msgSuccess("保存成功");
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
this.$router.go(-1);
|
|
|
+ }).catch(() => {
|
|
|
+ this.fullscreenLoading = false
|
|
|
});
|
|
|
},
|
|
|
//校验结果字典
|