|
|
@@ -56,7 +56,8 @@
|
|
|
<span>{{ $t("sea118n.debit") }}</span>
|
|
|
</div>
|
|
|
<el-button v-if="isFeeEditD" type="danger" plain size="small"
|
|
|
- :disabled="!selectionDList.length || disabled" @click="batchDelete('D')"> {{ $t("btn118n.deleted") }}
|
|
|
+ :disabled="!selectionDList.length || disabled" @click="batchDelete('D')"> {{
|
|
|
+ $t("btn118n.deleted") }}
|
|
|
</el-button>
|
|
|
<!-- <el-button v-if="isFeeEditD" type="success" plain size="small"
|
|
|
:disabled="!selectionDList.length || disabled || pleasereviewType"
|
|
|
@@ -66,19 +67,21 @@
|
|
|
:disabled="!selectionDList.length || disabled || pleasereviewType"
|
|
|
@click="RevokingBillsfun('D')">撤销账单
|
|
|
</el-button> -->
|
|
|
- <el-button type="primary" plain size="small" @click="printingCostsfun('D')">{{ $t("btn118n.printBill") }}</el-button>
|
|
|
+ <el-button type="primary" plain size="small" @click="printingCostsfun('D')">{{
|
|
|
+ $t("btn118n.printBill") }}</el-button>
|
|
|
<el-button v-if="isFeeEditD" type="success" plain size="small"
|
|
|
- :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
|
|
|
- @click="templateClick('D')">{{$t("btn118n.debitTemplate") }}</el-button>
|
|
|
+ :disabled="!this.assemblyForm.id || disabled || pleasereviewType" @click="templateClick('D')">{{
|
|
|
+ $t("btn118n.debitTemplate") }}</el-button>
|
|
|
<el-button v-if="isFeeEditD" type="info" plain size="small" :disabled="disabled"
|
|
|
@click="feecenterSubmitListfun">{{ $t("btn118n.save") }}</el-button>
|
|
|
<el-button v-if="isFeeEditD" type="info" plain size="small" :disabled="disabled"
|
|
|
@click="feecenterEditfun('D')">{{ $t("btn118n.edit") }}
|
|
|
</el-button>
|
|
|
<el-button v-if="isFeeEditC" type="primary" plain size="small"
|
|
|
- :disabled="disabled || pleasereviewType" @click="copyfun('D')">{{ $t("btn118n.toCredit")}}</el-button>
|
|
|
- <el-button v-if="isFeeEditD" type="primary" plain size="small"
|
|
|
- @click="allClick('发票申请', 'D')">{{$t("btn118n.applyInvoice") }}</el-button>
|
|
|
+ :disabled="disabled || pleasereviewType" @click="copyfun('D')">{{
|
|
|
+ $t("btn118n.toCredit") }}</el-button>
|
|
|
+ <el-button v-if="isFeeEditD" type="primary" plain size="small" @click="allClick('发票申请', 'D')">{{
|
|
|
+ $t("btn118n.applyInvoice") }}</el-button>
|
|
|
<el-button type="primary" plain size="small" :disabled="disabled || selectionDList.length == 0"
|
|
|
@click="allClick('D费用申请')">{{ $t("btn118n.applyFee") }}</el-button>
|
|
|
<el-button type="danger" plain size="small" :disabled="disabled || selectionDList.length == 0"
|
|
|
@@ -110,7 +113,7 @@
|
|
|
<template slot="corpCnName" slot-scope="{ row,index }">
|
|
|
<dic-select v-if="row.edit" :key="updateSearchKey" v-model="row.shortName" placeholder="结算单位"
|
|
|
label="shortName" res="records" :slotRight="true" rightLabel="code"
|
|
|
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType?row.corpType:null)"
|
|
|
+ :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType ? row.corpType : null)"
|
|
|
:filterable="true" :remote="true" dataName="shortName"
|
|
|
@selectChange="rowDicChange('shortName', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.shortName }}</span>
|
|
|
@@ -182,14 +185,19 @@
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.edit" v-model="row.price" size="small" :controls="false" :precision="3"
|
|
|
- placeholder="请输入" @blur="priceinputfun($event, row)"></el-input-number>
|
|
|
+ placeholder="请输入" @change="calculateTotal(row)"></el-input-number>
|
|
|
<span v-else>{{ row.price }}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
|
|
|
- :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
|
|
|
+ :precision="3" placeholder="请输入" @change="calculateTotal(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="请输入" @change="calculateTotal(row)" style="width: 100%;"></el-input-number>
|
|
|
+ <span v-else>{{ row.taxRate }}</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>
|
|
|
@@ -215,7 +223,9 @@
|
|
|
<span>{{ $t("sea118n.credit") }}</span>
|
|
|
</div>
|
|
|
<el-button v-if="isFeeEditC" type="danger" plain size="small"
|
|
|
- :disabled="!selectionCList.length || disabled" @click="batchDelete('C')">{{$t("btn118n.deleted") }}
|
|
|
+ :disabled="!selectionCList.length || disabled" @click="batchDelete('C')">{{
|
|
|
+ $t("btn118n.deleted")
|
|
|
+ }}
|
|
|
</el-button>
|
|
|
<!-- <el-button v-if="isFeeEditC" type="primary" plain size="small"
|
|
|
:disabled="!selectionCList.length || disabled || pleasereviewType"
|
|
|
@@ -225,10 +235,11 @@
|
|
|
:disabled="!selectionCList.length || disabled || pleasereviewType"
|
|
|
@click="RevokingBillsfun('C')">撤销账单
|
|
|
</el-button> -->
|
|
|
- <el-button type="primary" plain size="small" @click="printingCostsfun('C')">{{$t("btn118n.printBill") }}</el-button>
|
|
|
+ <el-button type="primary" plain size="small" @click="printingCostsfun('C')">{{
|
|
|
+ $t("btn118n.printBill") }}</el-button>
|
|
|
<el-button v-if="isFeeEditC" type="success" plain size="small"
|
|
|
- :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
|
|
|
- @click="templateClick('C')">{{ $t("btn118n.creditTemplate") }}
|
|
|
+ :disabled="!this.assemblyForm.id || disabled || pleasereviewType" @click="templateClick('C')">{{
|
|
|
+ $t("btn118n.creditTemplate") }}
|
|
|
</el-button>
|
|
|
<el-button v-if="isFeeEditC" type="info" plain size="small" :disabled="disabled"
|
|
|
@click="feecenterSubmitListfun">{{ $t("btn118n.save") }}
|
|
|
@@ -240,7 +251,7 @@
|
|
|
:disabled="disabled || pleasereviewType" @click="copyfun('C')">{{ $t("btn118n.toDebit") }}
|
|
|
</el-button>
|
|
|
<el-button type="info" plain size="small" @click="allClick('付费申请', 'C')">
|
|
|
- {{ $t("btn118n.applyPay")}}
|
|
|
+ {{ $t("btn118n.applyPay") }}
|
|
|
</el-button>
|
|
|
<el-button type="primary" plain size="small" :disabled="disabled || selectionCList.length == 0"
|
|
|
@click="allClick('C费用申请')">{{ $t("btn118n.applyFee") }}</el-button>
|
|
|
@@ -286,7 +297,7 @@
|
|
|
<template slot="corpCnName" slot-scope="{ row,index }">
|
|
|
<dic-select v-if="row.edit" :key="updateSearchKey" v-model="row.shortName" placeholder="结算单位"
|
|
|
label="shortName" res="records" :slotRight="true" rightLabel="code"
|
|
|
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType?row.corpType:null)"
|
|
|
+ :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType ? row.corpType : null)"
|
|
|
:filterable="true" :remote="true" dataName="shortName"
|
|
|
@selectChange="rowDicChange('shortNameC', $event, row)"></dic-select>
|
|
|
<span v-else>{{ row.shortName }}</span>
|
|
|
@@ -340,14 +351,19 @@
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.edit" v-model="row.price" size="small" :controls="false" :precision="2"
|
|
|
- placeholder="请输入" @blur="priceinputfun($event, row)"></el-input-number>
|
|
|
+ placeholder="请输入" @change="calculateTotal(row)"></el-input-number>
|
|
|
<span v-else>{{ row.price }}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
|
|
|
- :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
|
|
|
+ :precision="3" placeholder="请输入" @change="calculateTotal(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="请输入" @change="calculateTotal(row)" style="width: 100%;"></el-input-number>
|
|
|
+ <span v-else>{{ row.taxRate }}</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>
|
|
|
@@ -1064,12 +1080,12 @@ export default {
|
|
|
width: "55",
|
|
|
headerslot: true,
|
|
|
},
|
|
|
-/* {
|
|
|
- label: "账单",
|
|
|
- prop: "accStatus",
|
|
|
- width: "60",
|
|
|
- overHidden: true,
|
|
|
- },*/
|
|
|
+ /* {
|
|
|
+ label: "账单",
|
|
|
+ prop: "accStatus",
|
|
|
+ width: "60",
|
|
|
+ overHidden: true,
|
|
|
+ },*/
|
|
|
{
|
|
|
label: this.$t("sea118n.feeStatus"),
|
|
|
prop: 'auditStatus',
|
|
|
@@ -1145,12 +1161,24 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "税率",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: this.$t("sea118n.quantity"),
|
|
|
prop: "quantity",
|
|
|
width: "80",
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "税额",
|
|
|
+ prop: "amountTax",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: this.$t("sea118n.localCurrency"),
|
|
|
prop: "rmbAmount",
|
|
|
width: "80",
|
|
|
@@ -1254,12 +1282,12 @@ export default {
|
|
|
width: "55",
|
|
|
headerslot: true,
|
|
|
},
|
|
|
-/* {
|
|
|
- label: "账单",
|
|
|
- prop: "accStatus",
|
|
|
- width: "60",
|
|
|
- overHidden: true,
|
|
|
- },*/
|
|
|
+ /* {
|
|
|
+ label: "账单",
|
|
|
+ prop: "accStatus",
|
|
|
+ width: "60",
|
|
|
+ overHidden: true,
|
|
|
+ },*/
|
|
|
{
|
|
|
label: this.$t("sea118n.feeStatus"),
|
|
|
prop: 'auditStatus',
|
|
|
@@ -1329,12 +1357,24 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "税率",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: this.$t("sea118n.quantity"),
|
|
|
prop: "quantity",
|
|
|
width: "80",
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "税额",
|
|
|
+ prop: "amountTax",
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: this.$t("sea118n.localCurrency"),
|
|
|
prop: "rmbAmount",
|
|
|
width: "80",
|
|
|
@@ -1605,8 +1645,8 @@ export default {
|
|
|
this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
|
|
|
console.log("roleName", this.roleName)
|
|
|
this.isAdmin = this.roleName.indexOf('admin') >= 0;
|
|
|
- this.isFeeViewD = this.isAdmin || this.roleName.indexOf('应收查看') >= 0|| this.roleName.indexOf('国外费用') >= 0;
|
|
|
- this.isFeeViewC = this.isAdmin || this.roleName.indexOf('应付查看') >= 0|| this.roleName.indexOf('国外费用') >= 0;
|
|
|
+ this.isFeeViewD = this.isAdmin || this.roleName.indexOf('应收查看') >= 0 || this.roleName.indexOf('国外费用') >= 0;
|
|
|
+ this.isFeeViewC = this.isAdmin || this.roleName.indexOf('应付查看') >= 0 || this.roleName.indexOf('国外费用') >= 0;
|
|
|
this.isFeeView = this.isAdmin || this.isFeeViewD || this.isFeeViewC;
|
|
|
this.isFeeEditD = this.isAdmin || this.isFeeViewD && this.roleName.indexOf('应收修改') >= 0;
|
|
|
this.isFeeEditC = this.isAdmin || this.isFeeViewC && this.roleName.indexOf('应付修改') >= 0;
|
|
|
@@ -2096,7 +2136,7 @@ export default {
|
|
|
if (this.assemblyForm.feeCenterListD.length != 0) {
|
|
|
obj.branchId = this.assemblyForm.branchId
|
|
|
obj.branchName = this.assemblyForm.branchName
|
|
|
- obj.corpType=this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpType
|
|
|
+ obj.corpType = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpType
|
|
|
// 结算单位
|
|
|
obj.corpId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1]
|
|
|
.corpId
|
|
|
@@ -2206,7 +2246,7 @@ export default {
|
|
|
if (this.assemblyForm.feeCenterListC.length != 0) {
|
|
|
obj.branchId = this.assemblyForm.branchId
|
|
|
obj.branchName = this.assemblyForm.branchName
|
|
|
- obj.corpType=this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpType
|
|
|
+ obj.corpType = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpType
|
|
|
// 结算单位
|
|
|
obj.corpId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1]
|
|
|
.corpId
|
|
|
@@ -2726,19 +2766,20 @@ export default {
|
|
|
}
|
|
|
this.$set(row, 'curCode', item.code)
|
|
|
this.$set(row, 'exrate', this.getExchangeRate(item.code, dc, 1))
|
|
|
- this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity ? row
|
|
|
- .quantity : 0))
|
|
|
- if (row.curCode == this.getLocalCurrency()) {
|
|
|
- this.$set(row, 'rmbAmount', row.amount.toFixed(2))
|
|
|
- this.$set(row, 'usdAmount', '')
|
|
|
- this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
|
|
|
- this.$set(row, 'usdAmountNet', '')
|
|
|
- } else {
|
|
|
- this.$set(row, 'usdAmount', row.amount.toFixed(2))
|
|
|
- this.$set(row, 'rmbAmount', '')
|
|
|
- this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
|
|
|
- this.$set(row, 'rmbAmountNet', '')
|
|
|
- }
|
|
|
+ // this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity ? row
|
|
|
+ // .quantity : 0))
|
|
|
+ // if (row.curCode == this.getLocalCurrency()) {
|
|
|
+ // this.$set(row, 'rmbAmount', row.amount.toFixed(2))
|
|
|
+ // this.$set(row, 'usdAmount', '')
|
|
|
+ // this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
|
|
|
+ // this.$set(row, 'usdAmountNet', '')
|
|
|
+ // } else {
|
|
|
+ // this.$set(row, 'usdAmount', row.amount.toFixed(2))
|
|
|
+ // this.$set(row, 'rmbAmount', '')
|
|
|
+ // this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
|
|
|
+ // this.$set(row, 'rmbAmountNet', '')
|
|
|
+ // }
|
|
|
+ this.calculateTotal(row)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -2746,6 +2787,27 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ calculateTotal(row) {
|
|
|
+ this.$set(row, 'amountTax', Number(Number(row.price ? row.price : 0) * (Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0)).toFixed(2))
|
|
|
+ this.$set(row, 'amount', Number(row.price ? row.price : 0) * (1 + Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0))
|
|
|
+ // 判断是否有币种
|
|
|
+ if (!row.curCode) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // this.$set(row, 'amountTax', Number(row.price ? row.price : 0) * (Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0))
|
|
|
+ // this.$set(row, 'amount', Number(row.price ? row.price : 0) * (1 + Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0))
|
|
|
+ if (row.curCode == this.getLocalCurrency()) {
|
|
|
+ this.$set(row, 'rmbAmount', row.amount.toFixed(2))
|
|
|
+ this.$set(row, 'usdAmount', '')
|
|
|
+ this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
|
|
|
+ this.$set(row, 'usdAmountNet', '')
|
|
|
+ } else {
|
|
|
+ this.$set(row, 'usdAmount', row.amount.toFixed(2))
|
|
|
+ this.$set(row, 'rmbAmount', '')
|
|
|
+ this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
|
|
|
+ this.$set(row, 'rmbAmountNet', '')
|
|
|
+ }
|
|
|
+ },
|
|
|
// 单价
|
|
|
priceinputfun(value, row) {
|
|
|
let price = Number(row.price ? row.price : 0), qty = Number(row.quantity ? row.quantity : 0)
|