Commit 7b53d2ce authored by 我在何方's avatar 我在何方

新增收款单税率更新

parent 89f6c4fb
...@@ -128,9 +128,9 @@ ...@@ -128,9 +128,9 @@
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> --> <!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('税率')" align="center" prop="totalAmount"> <el-table-column :label="$t('税率%')" align="center" prop="totalAmount">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span> <el-input v-model="scope.row.taxPoint" @input="changeTaxRate(scope.row,scope.$index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('不含税金额')" align="center" prop="totalAmount"> <el-table-column :label="$t('不含税金额')" align="center" prop="totalAmount">
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span> <span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('含税金额')" align="center" prop="totalAmount"> <el-table-column :label="$t('含税金额')" align="center" prop="taxAmount">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span> <span>{{ scope.row.taxAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> --> <!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template> </template>
...@@ -422,21 +422,6 @@ ...@@ -422,21 +422,6 @@
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
<!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> --> <!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> -->
</div> </div>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('拆单申请正在审核中,你确定取消拆单申请吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因:')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
:visible.sync="open" :visible.sync="open"
:title="$t('添加未收客户款项')" :title="$t('添加未收客户款项')"
...@@ -772,6 +757,11 @@ export default { ...@@ -772,6 +757,11 @@ export default {
if (that.$route.query.orderId) { if (that.$route.query.orderId) {
await getFirstReceivableListByOrderId({id:that.$route.query.orderId}).then(response => { await getFirstReceivableListByOrderId({id:that.$route.query.orderId}).then(response => {
this.list = [...response.data] this.list = [...response.data]
this.list.map(v=>{
if(v.taxPoint==0){
v.taxAmount = v.totalAmount
}
})
getOrder(that.$route.query.orderId).then(response => { getOrder(that.$route.query.orderId).then(response => {
// console.log(response.data) // console.log(response.data)
if(response.data.customerId) this.$set(this.form,'customerId',response.data.customerId) if(response.data.customerId) this.$set(this.form,'customerId',response.data.customerId)
...@@ -788,6 +778,11 @@ export default { ...@@ -788,6 +778,11 @@ export default {
}) })
await getInvoicingItem({ id: this.id }).then(res => { await getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data] this.list = [...res.data]
this.list.map(v=>{
if(v.taxPoint==0){
v.taxAmount = v.totalAmount
}
})
}) })
getReceiptAccountList({ id: this.id }).then(res => { getReceiptAccountList({ id: this.id }).then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
...@@ -826,6 +821,11 @@ export default { ...@@ -826,6 +821,11 @@ export default {
this.receiptId = this.$route.query.receiptId; this.receiptId = this.$route.query.receiptId;
getReceivableInfoByIds({ id: this.receiptId }).then(res => { getReceivableInfoByIds({ id: this.receiptId }).then(res => {
this.list = [{...res.data}] this.list = [{...res.data}]
this.list.map(v=>{
if(v.taxPoint==0){
v.taxAmount = v.totalAmount
}
})
this.calculation() this.calculation()
getOrder(res.data.orderId).then(response => { getOrder(res.data.orderId).then(response => {
...@@ -959,6 +959,17 @@ export default { ...@@ -959,6 +959,17 @@ export default {
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList]) this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
}, 100) }, 100)
}, },
//明细改变税率
changeTaxRate(row,index){
var regs=/^\d+$/;
if(row.taxPoint&&!regs.test(row.taxPoint)){
row.taxPoint = 0
this.$modal.msgError(this.$t('输入税率格式不对'));
}
row.taxAmount = row.totalAmount*(1+row.taxPoint/100).toFixed(2)
this.list[index] = {...row}
this.$set(this,'list',this.list)
},
calculation() { calculation() {
const copyList = this.form.receiptAccountList const copyList = this.form.receiptAccountList
this.form.receiptAccountList = [] this.form.receiptAccountList = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment