|
@@ -163,7 +163,7 @@
|
|
|
:clearable="true" :remote="true" :buttonIf="false"
|
|
|
:forParameter="{ key: 'id', label: 'code', value: 'code' }"
|
|
|
@remoteMethod="bcurrencyGetExratefun('D')" @corpChange="corpChange($event, 'curCode', row, 'D')"
|
|
|
- @corpFocus="bcurrencyGetExratefun('D')">
|
|
|
+ @corpFocus="bcurrencyGetExratefun('D')" :disabled="row.whetherForceCurNo == 1">
|
|
|
</search-query>
|
|
|
<span v-else>{{ row.curCode }}</span>
|
|
|
</template>
|
|
@@ -180,6 +180,16 @@
|
|
|
:precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
|
|
|
<span v-else>{{ row.quantity }}</span>
|
|
|
</template>
|
|
|
+ <template slot="taxRate" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
|
|
|
+ placeholder="请输入"></el-input-number>
|
|
|
+ <span v-else>{{ row.taxRate }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="surchargeRate" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
|
|
|
+ :precision="3" placeholder="请输入"></el-input-number>
|
|
|
+ <span v-else>{{ row.surchargeRate }}</span>
|
|
|
+ </template>
|
|
|
<template slot="remarks" slot-scope="{ row }">
|
|
|
<el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
|
|
|
<span v-else>{{ row.remarks }}</span>
|
|
@@ -294,7 +304,7 @@
|
|
|
:clearable="true" :remote="true" :buttonIf="false"
|
|
|
:forParameter="{ key: 'id', label: 'code', value: 'code' }"
|
|
|
@remoteMethod="bcurrencyGetExratefun('C')" @corpChange="corpChange($event, 'curCode', row, 'C')"
|
|
|
- @corpFocus="bcurrencyGetExratefun('C')">
|
|
|
+ @corpFocus="bcurrencyGetExratefun('C')" :disabled="row.whetherForceCurNo == 1">
|
|
|
</search-query>
|
|
|
<span v-else>{{ row.curCode }}</span>
|
|
|
</template>
|
|
@@ -311,6 +321,16 @@
|
|
|
:precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
|
|
|
<span v-else>{{ row.quantity }}</span>
|
|
|
</template>
|
|
|
+ <template slot="taxRate" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
|
|
|
+ placeholder="请输入"></el-input-number>
|
|
|
+ <span v-else>{{ row.taxRate }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="surchargeRate" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
|
|
|
+ :precision="3" placeholder="请输入"></el-input-number>
|
|
|
+ <span v-else>{{ row.surchargeRate }}</span>
|
|
|
+ </template>
|
|
|
<template slot="remarks" slot-scope="{ row }">
|
|
|
<el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
|
|
|
<span v-else>{{ row.remarks }}</span>
|
|
@@ -585,7 +605,8 @@ import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
import {
|
|
|
feecenterTemplateImport,
|
|
|
listFeeCountByCorp,
|
|
|
- losbfeestemplateGetListTemplate
|
|
|
+ losbfeestemplateGetListTemplate,
|
|
|
+ accountsReceivable
|
|
|
} from "@/api/iosBasicData/bills";
|
|
|
import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
|
|
|
import { popupReminder, requiredMessage } from "@/util/messageReminder";
|
|
@@ -599,6 +620,7 @@ import { regularBurdenfloating } from "@/util/regularJudgment";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
+import { similarValues } from "@/util/verifyData";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
|
components: { reportContainer, SearchQuery, reportformsList, dicSelect },
|
|
@@ -756,6 +778,12 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "发票号",
|
|
|
+ prop: "invoiceNo",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "发票申请金额",
|
|
|
prop: "appliedInvoiceAmount",
|
|
|
width: "120",
|
|
@@ -989,6 +1017,22 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "增值税率",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: "120",
|
|
|
+ hide: true,
|
|
|
+ showColumn: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "附加费率",
|
|
|
+ prop: "surchargeRate",
|
|
|
+ width: "120",
|
|
|
+ hide: true,
|
|
|
+ showColumn: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "CNY(含税)",
|
|
|
prop: "rmbAmount",
|
|
|
width: "100",
|
|
@@ -1026,6 +1070,12 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "发票号",
|
|
|
+ prop: "invoiceNo",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "发票申请金额",
|
|
|
prop: "appliedInvoiceAmount",
|
|
|
width: "120",
|
|
@@ -1148,6 +1198,22 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "增值税率",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: "120",
|
|
|
+ hide: true,
|
|
|
+ showColumn: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "附加费率",
|
|
|
+ prop: "surchargeRate",
|
|
|
+ width: "120",
|
|
|
+ hide: true,
|
|
|
+ showColumn: false,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "CNY(含税)",
|
|
|
prop: "rmbAmount",
|
|
|
width: "100",
|
|
@@ -1185,6 +1251,12 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "发票号",
|
|
|
+ prop: "invoiceNo",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "发票申请金额",
|
|
|
prop: "appliedInvoiceAmount",
|
|
|
width: "120",
|
|
@@ -1405,9 +1477,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
- isProcurement({ "param": "business" }).then(res => {
|
|
|
- this.business = res.data.data
|
|
|
- })
|
|
|
+
|
|
|
isProcurement({ "param": "if.station" }).then(res => {
|
|
|
console.log(res)
|
|
|
if (res.data.data == 1) {
|
|
@@ -1430,6 +1500,24 @@ export default {
|
|
|
|
|
|
this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
|
|
|
this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
|
|
|
+ isProcurement({ "param": "business" }).then(res => {
|
|
|
+ this.business = res.data.data
|
|
|
+ if (res.data.data == 1) {
|
|
|
+ this.optionD.column.forEach(item => {
|
|
|
+ if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
|
|
|
+ item.hide = false
|
|
|
+ item.showColumn = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.optionC.column.forEach(item => {
|
|
|
+ if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
|
|
|
+ item.hide = false
|
|
|
+ item.showColumn = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
// 导入弹窗的表格
|
|
|
this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
|
|
|
this.getBcorpsListfun() // 获取客户数据
|
|
@@ -1782,6 +1870,14 @@ export default {
|
|
|
obj.corpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpCnName
|
|
|
obj.corpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpEnName
|
|
|
obj.shortName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].shortName
|
|
|
+ obj.dc = "D"
|
|
|
+ if (this.business == 1) {
|
|
|
+ accountsReceivable({ corpId: this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId }).then(res => {
|
|
|
+ this.$set(obj, 'amountLimit', res.data.data.amountLimit)
|
|
|
+ this.$set(obj, 'noAmount', res.data.data.amount)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
// // 费用简称
|
|
|
// obj.feeId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeId
|
|
|
// obj.feeCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCnName
|
|
@@ -1816,6 +1912,7 @@ export default {
|
|
|
obj.corpId = this.assemblyForm.corpId
|
|
|
obj.corpCnName = this.assemblyForm.corpCnName
|
|
|
obj.corpEnName = this.assemblyForm.corpEnName
|
|
|
+ obj.dc = "D"
|
|
|
//
|
|
|
// 预付/到付
|
|
|
obj.paymode = this.assemblyForm.mpaymode
|
|
@@ -1868,6 +1965,7 @@ export default {
|
|
|
obj.corpCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpCnName
|
|
|
obj.corpEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpEnName
|
|
|
obj.shortName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].shortName
|
|
|
+ obj.dc = "C"
|
|
|
// // 费用简称
|
|
|
// obj.feeId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeId
|
|
|
// obj.feeCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCnName
|
|
@@ -1904,6 +2002,7 @@ export default {
|
|
|
// obj.corpEnName = this.assemblyForm.corpEnName
|
|
|
// 预付/到付
|
|
|
obj.paymode = this.assemblyForm.mpaymode
|
|
|
+ obj.dc = "C"
|
|
|
// getBcorpsDetail(this.assemblyForm.corpId).then(res => {
|
|
|
// obj.shortName = res.data.data.shortName
|
|
|
// this.assemblyForm.feeCenterListC.push(obj)
|
|
@@ -2179,6 +2278,13 @@ export default {
|
|
|
this.$set(row, 'corpCnName', item.cnName)
|
|
|
this.$set(row, 'corpEnName', item.enName)
|
|
|
this.$set(row, 'corpId', item.id)
|
|
|
+ if (dc == 'D' && this.business == 1) {
|
|
|
+ accountsReceivable({ corpId: item.id }).then(res => {
|
|
|
+ this.$set(row, 'amountLimit', res.data.data.amountLimit)
|
|
|
+ this.$set(row, 'noAmount', res.data.data.amount)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
} else if (name == 'feeCnName') {
|
|
@@ -2207,6 +2313,9 @@ export default {
|
|
|
this.$set(row, 'feeEnName', '')
|
|
|
this.$set(row, 'feeId', '')
|
|
|
this.$set(row, 'feeCode', '')
|
|
|
+ if (this.business == 1) {
|
|
|
+ this.$set(row, 'whetherForceCurNo', '')
|
|
|
+ }
|
|
|
// 核算要素
|
|
|
this.$set(row, 'elementsId', '')
|
|
|
this.$set(row, 'elementsCnName', '')
|
|
@@ -2226,6 +2335,9 @@ export default {
|
|
|
this.$set(row, 'feeEnName', '')
|
|
|
this.$set(row, 'feeId', '')
|
|
|
this.$set(row, 'feeCode', '')
|
|
|
+ if (this.business == 1) {
|
|
|
+ this.$set(row, 'whetherForceCurNo', '')
|
|
|
+ }
|
|
|
// 核算要素
|
|
|
this.$set(row, 'elementsId', '')
|
|
|
this.$set(row, 'elementsCnName', '')
|
|
@@ -2238,6 +2350,10 @@ export default {
|
|
|
this.$set(row, 'feeEnName', item.enName)
|
|
|
this.$set(row, 'feeId', item.id)
|
|
|
this.$set(row, 'feeCode', item.code)
|
|
|
+ if (this.business == 1) {
|
|
|
+ this.$set(row, 'whetherForceCurNo', item.whetherForceCurNo)
|
|
|
+ }
|
|
|
+
|
|
|
// 选择费用简称带出核算要素
|
|
|
this.$set(row, 'elementsId', item.accElementId)
|
|
|
this.$set(row, 'elementsCnName', item.accElementName)
|
|
@@ -2412,6 +2528,31 @@ export default {
|
|
|
if (!row.curCode) {
|
|
|
return;
|
|
|
}
|
|
|
+ if (row.amountLimit && row.noAmount && row.amount) {
|
|
|
+ if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
|
|
|
+ this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
|
|
|
+ delete row.amountLimit
|
|
|
+ delete row.noAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
|
|
|
+ let ywfSumD = 0
|
|
|
+ let ywfSumC = 0
|
|
|
+ for (let item of this.assemblyForm.feeCenterListD) {
|
|
|
+ if (item.feeCode == 'YWF') {
|
|
|
+ ywfSumD += Number(item.amount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let item of this.assemblyForm.feeCenterListC) {
|
|
|
+ if (item.feeCode == 'YWF') {
|
|
|
+ ywfSumC += Number(item.amount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
|
|
|
+ this.$set(row, 'price', 0)
|
|
|
+ return this.$message.error('应付的业务费不能超过应收业务费的80%');
|
|
|
+ }
|
|
|
+ }
|
|
|
if (row.curCode == 'CNY') {
|
|
|
this.$set(row, 'rmbAmount', row.amount.toFixed(2))
|
|
|
this.$set(row, 'usdAmount', '')
|
|
@@ -2444,10 +2585,37 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.$set(row, 'amount', price * qty)
|
|
|
+ this.$set(row, 'amount', price * qty)
|
|
|
+
|
|
|
// 判断是否有币种
|
|
|
if (!row.curCode) {
|
|
|
return;
|
|
|
}
|
|
|
+ if (row.amountLimit && row.noAmount && row.amount) {
|
|
|
+ if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
|
|
|
+ this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
|
|
|
+ delete row.amountLimit
|
|
|
+ delete row.noAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
|
|
|
+ let ywfSumD = 0
|
|
|
+ let ywfSumC = 0
|
|
|
+ for (let item of this.assemblyForm.feeCenterListD) {
|
|
|
+ if (item.feeCode == 'YWF') {
|
|
|
+ ywfSumD += Number(item.amount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let item of this.assemblyForm.feeCenterListC) {
|
|
|
+ if (item.feeCode == 'YWF') {
|
|
|
+ ywfSumC += Number(item.amount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
|
|
|
+ this.$set(row, 'quantity', 1)
|
|
|
+ return this.$message.error('应付的业务费不能超过应收业务费的80%');
|
|
|
+ }
|
|
|
+ }
|
|
|
if (row.curCode == 'CNY') {
|
|
|
this.$set(row, 'rmbAmount', row.amount.toFixed(2))
|
|
|
this.$set(row, 'usdAmount', '')
|
|
@@ -2479,9 +2647,16 @@ export default {
|
|
|
},
|
|
|
// 获取费用数据
|
|
|
bfeesListfun(cnName) {
|
|
|
- bfeesList(1, 10, { cnName, status: 0 }).then(res => {
|
|
|
- this.feeCnNameData = res.data.data.records
|
|
|
- })
|
|
|
+ if (this.business == 1) {
|
|
|
+ bfeesList(1, 10, { cnName, status: 0, feesTypeCode: 'HYCK' }).then(res => {
|
|
|
+ this.feeCnNameData = res.data.data.records
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ bfeesList(1, 10, { cnName, status: 0 }).then(res => {
|
|
|
+ this.feeCnNameData = res.data.data.records
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
// 获取费用信息 核算要素信息
|
|
|
getBaccelementsListfun(cnName) {
|
|
@@ -2633,6 +2808,15 @@ export default {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ let similarDataD = similarValues(this.assemblyForm.feeCenterListD, 'feeCnName', 'curCode')
|
|
|
+ if (similarDataD) {
|
|
|
+ return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
|
|
|
+ }
|
|
|
+ let similarDataC = similarValues(this.assemblyForm.feeCenterListC, 'feeCnName', 'curCode')
|
|
|
+ if (similarDataC) {
|
|
|
+ return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
|
|
|
+ }
|
|
|
// 判断必填项
|
|
|
let sum = '请输入'
|
|
|
// for (let item of this.assemblyForm.feeCenterListD) {
|
|
@@ -3082,6 +3266,20 @@ export default {
|
|
|
async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
this[option] = this[optionBack];
|
|
|
const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (this.business == 1) {
|
|
|
+ this.optionD.column.forEach(item => {
|
|
|
+ if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
|
|
|
+ item.hide = false
|
|
|
+ item.showColumn = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.optionC.column.forEach(item => {
|
|
|
+ if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
|
|
|
+ item.hide = false
|
|
|
+ item.showColumn = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if (inSave) {
|
|
|
this.$message.success("重置成功");
|
|
|
this.$refs[ref].$refs.dialogColumn.columnBox = false;
|