|
|
@@ -469,6 +469,9 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="发票汇率" prop="exrate">
|
|
|
+ <span slot="label">
|
|
|
+ <span style="color: #1e9fff" @click="allCLick('发票汇率')">发票汇率</span>
|
|
|
+ </span>
|
|
|
<el-input
|
|
|
style="width: 100%;"
|
|
|
v-model="form.exrate"
|
|
|
@@ -605,9 +608,6 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="税率(%)" prop="taxRate">
|
|
|
- <span slot="label">
|
|
|
- <span style="color: #1e9fff" @click="allCLick('税率')">税率(%)</span>
|
|
|
- </span>
|
|
|
<el-input
|
|
|
style="width: 100%;"
|
|
|
v-model="form.taxRate"
|
|
|
@@ -701,7 +701,9 @@
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
<div style="display: flex;">
|
|
|
- <el-button size="small" type="success" :disabled="statusType" :loading="saveLoading" @click="SelectedRows">确认选定行</el-button>
|
|
|
+ <el-button size="small" type="success" :disabled="statusType || generateStatus" :loading="saveLoading" @click="SelectedRows"
|
|
|
+ >确认选定行</el-button
|
|
|
+ >
|
|
|
<span style="font-size: 18px;font-weight: 600;margin-left: 50px;">
|
|
|
<span style="color: #67C23A;margin-right: 10px;"> CNY:¥{{ amountSubSum }}元 </span>
|
|
|
<span style="color: #E6A23C;"> USD:${{ amountSubUsdSum }}元 </span>
|
|
|
@@ -897,6 +899,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ generateStatus: false,
|
|
|
activeName: "1",
|
|
|
amountSubSum: 0,
|
|
|
amountDSubSum: 0,
|
|
|
@@ -1063,19 +1066,19 @@ export default {
|
|
|
// 获取当前登录人个人信息
|
|
|
this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
|
|
|
if (!this.form.id) {
|
|
|
- bcurexrateList({
|
|
|
- current: 1,
|
|
|
- size: 35,
|
|
|
- type: "月汇率",
|
|
|
- code: "USD",
|
|
|
- exrateYear: getYearDate()
|
|
|
- }).then(res => {
|
|
|
- for (let item of res.data.data.records) {
|
|
|
- if (item.exrateMonth == getMonthDate()) {
|
|
|
- this.$set(this.form, "exrate", item.exrateReceipts);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ // bcurexrateList({
|
|
|
+ // current: 1,
|
|
|
+ // size: 35,
|
|
|
+ // type: "月汇率",
|
|
|
+ // code: "USD",
|
|
|
+ // exrateYear: getYearDate()
|
|
|
+ // }).then(res => {
|
|
|
+ // for (let item of res.data.data.records) {
|
|
|
+ // if (item.exrateMonth == getMonthDate()) {
|
|
|
+ // this.$set(this.form, "exrate", item.exrateReceipts);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
// getRateList({ current: 1, size: 30 }).then(res => {
|
|
|
// for (let item of res.data.data.records) {
|
|
|
// if (item.code == "USD") {
|
|
|
@@ -1083,18 +1086,17 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
// })
|
|
|
-
|
|
|
getParamService({ paramKey: "taxRate" }).then(res => {
|
|
|
this.paramForm = res.data.data;
|
|
|
if (!this.form.id) {
|
|
|
- this.$set(this.form, "taxRate", res.data.data ? res.data.data.paramValue : 0);
|
|
|
+ this.$set(this.form, "exrate", res.data.data ? res.data.data.paramValue : 0);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
allCLick(name) {
|
|
|
- if (name == "税率") {
|
|
|
+ if (name == "发票汇率") {
|
|
|
this.$confirm("是否确认修改业务参数配置?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
@@ -1102,7 +1104,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
let obj = {
|
|
|
...this.paramForm,
|
|
|
- paramValue: this.form.taxRate
|
|
|
+ paramValue: this.form.exrate
|
|
|
};
|
|
|
updateParamService(obj);
|
|
|
});
|
|
|
@@ -1581,11 +1583,13 @@ export default {
|
|
|
editCustomer(type) {
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (!valid) return;
|
|
|
- if (!this.form.id) {
|
|
|
- // 是否选择从表数据
|
|
|
- if (this.addData.length == 0) {
|
|
|
- this.$message.warning("请选择结算数据");
|
|
|
- return;
|
|
|
+ if (!this.generateStatus) {
|
|
|
+ if (!this.form.id) {
|
|
|
+ // 是否选择从表数据
|
|
|
+ if (this.addData.length == 0) {
|
|
|
+ this.$message.warning("请选择结算数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.form.type = "销项";
|
|
|
@@ -1657,6 +1661,20 @@ export default {
|
|
|
this.saveLoading = false;
|
|
|
});
|
|
|
} else {
|
|
|
+ if (this.generateStatus) {
|
|
|
+ this.form.finInvoicesItemsList = this.tableData.map((item, index) => {
|
|
|
+ if (item.currentCurCode == "CNY") {
|
|
|
+ item.currentAmount = item.currentAmountCNY;
|
|
|
+ } else {
|
|
|
+ item.currentAmount = item.currentAmountUSD;
|
|
|
+ }
|
|
|
+ if (!this.form.id) {
|
|
|
+ delete item.billDate;
|
|
|
+ delete item.accountDc;
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ }
|
|
|
this.fininvoicesSubmitfun(this.form, type);
|
|
|
}
|
|
|
});
|
|
|
@@ -1924,6 +1942,7 @@ export default {
|
|
|
this.pageLoading = true;
|
|
|
fininvoicesGenerateFinInvoices({ billId })
|
|
|
.then(res => {
|
|
|
+ this.generateStatus = true;
|
|
|
this.form = res.data.data;
|
|
|
this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.split(",") : []; // 业务类型转换成数组显示
|
|
|
this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.split(",") : [];
|