|
@@ -271,7 +271,8 @@
|
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
|
:http-request="httpRequest"
|
|
:http-request="httpRequest"
|
|
|
- :before-remove="invoiceRemove"
|
|
|
|
|
|
|
+ :before-remove="beforeRemove"
|
|
|
|
|
+ :on-remove="invoiceRemove"
|
|
|
action=""
|
|
action=""
|
|
|
multiple
|
|
multiple
|
|
|
>
|
|
>
|
|
@@ -368,14 +369,12 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiNo"
|
|
v-model="invoice.ziiNo"
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
- show-word-limit
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="发票号码:">
|
|
<el-form-item label="发票号码:">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiNumber"
|
|
v-model="invoice.ziiNumber"
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
- show-word-limit
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="开票日期:">
|
|
<el-form-item label="开票日期:">
|
|
@@ -391,28 +390,24 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiPurchaserNo"
|
|
v-model="invoice.ziiPurchaserNo"
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
- show-word-limit
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="销货纳税人编号:">
|
|
<el-form-item label="销货纳税人编号:">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiSellerNo"
|
|
v-model="invoice.ziiSellerNo"
|
|
|
maxlength="20"
|
|
maxlength="20"
|
|
|
- show-word-limit
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="发票金额:">
|
|
<el-form-item label="发票金额:">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiTotalAmount"
|
|
v-model="invoice.ziiTotalAmount"
|
|
|
- maxlength="20"
|
|
|
|
|
- show-word-limit
|
|
|
|
|
|
|
+ maxlength="16"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="税价金额:">
|
|
<el-form-item label="税价金额:">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="invoice.ziiAmount"
|
|
v-model="invoice.ziiAmount"
|
|
|
- maxlength="20"
|
|
|
|
|
- show-word-limit
|
|
|
|
|
|
|
+ maxlength="16"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -447,7 +442,8 @@
|
|
|
ref="contractUpload"
|
|
ref="contractUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
- :before-remove="handleRemove">
|
|
|
|
|
|
|
+ :before-remove="beforeRemove"
|
|
|
|
|
+ :on-remove="handleRemove">
|
|
|
<i class="el-icon-plus"></i>
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</div>
|
|
</div>
|
|
@@ -469,7 +465,8 @@
|
|
|
ref="logisticsUpload"
|
|
ref="logisticsUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
- :before-remove="handleRemove">
|
|
|
|
|
|
|
+ :before-remove="beforeRemove"
|
|
|
|
|
+ :on-remove="handleRemove">
|
|
|
<i class="el-icon-plus"></i>
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</div>
|
|
</div>
|
|
@@ -491,7 +488,8 @@
|
|
|
ref="otherUpload"
|
|
ref="otherUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
- :before-remove="handleRemove">
|
|
|
|
|
|
|
+ :before-remove="beforeRemove"
|
|
|
|
|
+ :on-remove="handleRemove">
|
|
|
<i class="el-icon-plus"></i>
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</div>
|
|
</div>
|
|
@@ -537,6 +535,7 @@ import {
|
|
|
companyRelList
|
|
companyRelList
|
|
|
} from "@/api/common/company";
|
|
} from "@/api/common/company";
|
|
|
import { amtformat } from "@/utils/amtCommon"
|
|
import { amtformat } from "@/utils/amtCommon"
|
|
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "BillEdit",
|
|
name: "BillEdit",
|
|
@@ -672,6 +671,11 @@ export default {
|
|
|
getBill(zbiId).then((response) => {
|
|
getBill(zbiId).then((response) => {
|
|
|
console.log(response);
|
|
console.log(response);
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
|
|
+ if(this.form.zbiPayerId == this.company.scyId){
|
|
|
|
|
+ this.type = "00"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.type = "01"
|
|
|
|
|
+ }
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -772,6 +776,7 @@ export default {
|
|
|
fd.append("file", fileObj); // 文件对象
|
|
fd.append("file", fileObj); // 文件对象
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
getInvoiceText(fd).then((response) => {
|
|
getInvoiceText(fd).then((response) => {
|
|
|
|
|
+ response.url = response.url + "/" + getToken()
|
|
|
this.fileList.push(response.data);
|
|
this.fileList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -800,6 +805,7 @@ export default {
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "0"); //文件类型
|
|
fd.append("type", "0"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
uploadBillFile(fd).then((response) => {
|
|
|
|
|
+ response.url = response.url + "/" + getToken()
|
|
|
this.contractList.push(response.data);
|
|
this.contractList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -816,6 +822,7 @@ export default {
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "1"); //文件类型
|
|
fd.append("type", "1"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
uploadBillFile(fd).then((response) => {
|
|
|
|
|
+ response.url = response.url + "/" + getToken()
|
|
|
this.logisticsList.push(response.data);
|
|
this.logisticsList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -832,12 +839,22 @@ export default {
|
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
fd.append("zbiId", this.form.zbiId); //文件类型
|
|
|
fd.append("type", "2"); //文件类型
|
|
fd.append("type", "2"); //文件类型
|
|
|
uploadBillFile(fd).then((response) => {
|
|
uploadBillFile(fd).then((response) => {
|
|
|
|
|
+ response.url = response.url + "/" + getToken()
|
|
|
this.otherList.push(response.data);
|
|
this.otherList.push(response.data);
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ //删除图片
|
|
|
|
|
+ beforeRemove(file, fileList) {
|
|
|
|
|
+ console.log(file)
|
|
|
|
|
+ let a = true;
|
|
|
|
|
+ if (file && file.status==="success") {
|
|
|
|
|
+ a = this.$confirm(`确定移除 ${ file.name }?`);
|
|
|
|
|
+ }
|
|
|
|
|
+ return a;
|
|
|
|
|
+ },
|
|
|
//删除合同附件
|
|
//删除合同附件
|
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
|
console.log(fileList);
|
|
console.log(fileList);
|
|
@@ -876,22 +893,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
//删除附件
|
|
//删除附件
|
|
|
delFile(row){
|
|
delFile(row){
|
|
|
- var self = this
|
|
|
|
|
- console.log(this.ids)
|
|
|
|
|
|
|
+ var self = this;
|
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|
|
|
- this.$confirm("是否确认删除此数据项?", "警告", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
|
|
+ self.fullscreenLoading = true;
|
|
|
|
|
+ delFile(ids).then(function() {
|
|
|
|
|
+ self.fullscreenLoading = false;
|
|
|
})
|
|
})
|
|
|
- .then(function() {
|
|
|
|
|
- self.fullscreenLoading = true;
|
|
|
|
|
- return delFile(ids);
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.getInvoiceList();
|
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
|
- });
|
|
|
|
|
},
|
|
},
|
|
|
//查看图片
|
|
//查看图片
|
|
|
invoicePictureCardPreview(file) {
|
|
invoicePictureCardPreview(file) {
|
|
@@ -901,13 +908,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
//删除发票
|
|
//删除发票
|
|
|
invoiceRemove(file, fileList) {
|
|
invoiceRemove(file, fileList) {
|
|
|
- console.log(fileList);
|
|
|
|
|
- if (this.fileList) {
|
|
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ if (file && file.status==="success") {
|
|
|
this.fileList = this.fileList.filter((item) =>{
|
|
this.fileList = this.fileList.filter((item) =>{
|
|
|
if(item.uid !== file.uid){
|
|
if(item.uid !== file.uid){
|
|
|
return item
|
|
return item
|
|
|
}else{
|
|
}else{
|
|
|
- this.delInvoice(item)
|
|
|
|
|
|
|
+ self.fullscreenLoading = true;
|
|
|
|
|
+ delInvoice(item.ziiId).then(function() {
|
|
|
|
|
+ self.fullscreenLoading = false;
|
|
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ self.fullscreenLoading = false
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -971,6 +984,9 @@ export default {
|
|
|
} else if(this.active == 1) {
|
|
} else if(this.active == 1) {
|
|
|
//查询合同
|
|
//查询合同
|
|
|
getFile("0",this.form.zbiId).then((response) => {
|
|
getFile("0",this.form.zbiId).then((response) => {
|
|
|
|
|
+ response.data.forEach(element => {
|
|
|
|
|
+ element.url = element.url + "/" + getToken()
|
|
|
|
|
+ });
|
|
|
this.contractList = response.data;
|
|
this.contractList = response.data;
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -980,6 +996,9 @@ export default {
|
|
|
} else if(this.active == 2) {
|
|
} else if(this.active == 2) {
|
|
|
//查询物流
|
|
//查询物流
|
|
|
getFile("1",this.form.zbiId).then((response) => {
|
|
getFile("1",this.form.zbiId).then((response) => {
|
|
|
|
|
+ response.data.forEach(element => {
|
|
|
|
|
+ element.url = element.url + "/" + getToken()
|
|
|
|
|
+ });
|
|
|
this.logisticsList = response.data;
|
|
this.logisticsList = response.data;
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -989,6 +1008,9 @@ export default {
|
|
|
} else if(this.active == 3) {
|
|
} else if(this.active == 3) {
|
|
|
//查询其他附件
|
|
//查询其他附件
|
|
|
getFile("2",this.form.zbiId).then((response) => {
|
|
getFile("2",this.form.zbiId).then((response) => {
|
|
|
|
|
+ response.data.forEach(element => {
|
|
|
|
|
+ element.url = element.url + "/" + getToken()
|
|
|
|
|
+ });
|
|
|
this.otherList = response.data;
|
|
this.otherList = response.data;
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -1003,7 +1025,9 @@ export default {
|
|
|
//查询合同
|
|
//查询合同
|
|
|
getInvoiceList(){
|
|
getInvoiceList(){
|
|
|
getInvoice(this.form.zbiId).then((response) => {
|
|
getInvoice(this.form.zbiId).then((response) => {
|
|
|
- console.log(response);
|
|
|
|
|
|
|
+ response.data.forEach(element => {
|
|
|
|
|
+ element.url = element.url + "/" + getToken()
|
|
|
|
|
+ });
|
|
|
this.fileList = response.data;
|
|
this.fileList = response.data;
|
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|