Commit 139f623e authored by Marcus's avatar Marcus

Merge remote-tracking branch 'origin/dev1.6' into dev1.6

parents eef7bc32 35d96a0c
......@@ -100,7 +100,7 @@
>{{ $t('添加未收客户款项') }}</el-button
>
</el-col>
<el-table v-loading="loadings" :data="list" border>
<el-table v-loading="loadings" :data="list" border :key="isUpdate">
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" />
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('品名')" align="center" prop="title">
......@@ -130,7 +130,7 @@
</el-table-column>
<el-table-column :label="$t('税率%')" align="center" prop="totalAmount">
<template slot-scope="scope">
<el-input v-model="scope.row.taxPoint" @input="changeTaxRate(scope.row,scope.$index)"></el-input>
<el-input type="text" v-model="scope.row.taxPoint" @input="changeTaxRate(scope.row,scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('不含税金额')" align="center" prop="totalAmount">
......@@ -636,13 +636,13 @@
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<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" /> -->
</template>
</el-table-column>
</el-table>
<el-form-item :label="$t('总金额')">
{{ selectListRow.totalAmount }}{{getCurrencyLabel(selectListRow.currencyId)}}
{{ selectListRow.taxAmount }}{{getCurrencyLabel(selectListRow.currencyId)}}
</el-form-item>
<el-form-item :label="$t('优惠金额')">
<el-input v-model="discountForm.discountTotal" type="number" min="0" :max="selectListRow.totalAmount" @input="checkDiscount" style="width: 300px" ></el-input>
......@@ -653,7 +653,7 @@
<el-input v-model="discountForm.discountRemark" type="textarea" style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="$t('优惠后')">
{{ (selectListRow.totalAmount - (discountForm.discountTotal || 0)).toFixed(2)}}
{{ (selectListRow.taxAmount - (discountForm.discountTotal || 0)).toFixed(2)}}
{{getCurrencyLabel(selectListRow.currencyId)}}
</el-form-item>
<el-form-item v-if="opnotice" :label="$t('操作人')">
......@@ -743,7 +743,8 @@ export default {
flag: false,
warehouseList:[],
selectedUsers:[],
dialogVisible:false
dialogVisible:false,
isUpdate:false
};
},
async created() {
......@@ -758,7 +759,7 @@ export default {
await getFirstReceivableListByOrderId({id:that.$route.query.orderId}).then(response => {
this.list = [...response.data]
this.list.map(v=>{
if(v.taxPoint==0){
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
......@@ -779,7 +780,7 @@ export default {
await getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.list.map(v=>{
if(v.taxPoint==0){
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
......@@ -822,7 +823,7 @@ export default {
getReceivableInfoByIds({ id: this.receiptId }).then(res => {
this.list = [{...res.data}]
this.list.map(v=>{
if(v.taxPoint==0){
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
......@@ -966,9 +967,17 @@ export default {
row.taxPoint = 0
this.$modal.msgError(this.$t('输入税率格式不对'));
}
row.taxAmount = row.totalAmount*(1+row.taxPoint/100).toFixed(2)
if(row.taxPoint){
var amout = NP.times(NP.divide(row.taxPoint,100), row.totalAmount)
row.taxAmount = NP.plus(row.totalAmount,amout)
}else{
row.taxAmount = row.totalAmount
}
this.list[index] = {...row}
this.$set(this,'list',this.list)
let dataArrTemp = JSON.stringify(this.list);
this.list= JSON.parse(dataArrTemp);
this.calculation()
},
calculation() {
const copyList = this.form.receiptAccountList
......@@ -977,7 +986,7 @@ export default {
var dollarList = this.list.filter(v => v.currencyId === item.id)
if(dollarList.length>0){
let dollar,discountDollar
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.totalAmount || 0), 0)
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.taxAmount || 0), 0)
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
var t = copyList.find(v => v.currencyId == item.id)
this.form.receiptAccountList.push(
......@@ -1233,6 +1242,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.multipleSelection = this.list
this.open = true;
},
hiddenDialog() {
......@@ -1343,8 +1353,33 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val;
},
removedup(arr, batch) {
if (!Array.isArray(arr)) {
return arr;
}
if (arr.length == 0) {
return [];
}
let obj = {};
let uniqueArr = arr.reduce(function (total, item) {
obj[item[batch]] ? '' : (obj[item[batch]] = true && total.push(item));
return total;
}, []);
return uniqueArr;
},
saveSelectList() {
this.multipleSelection.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
if(this.list.length>0){
this.list = this.list.concat(this.multipleSelection)
this.list = this.removedup(this.list,'id')
}else{
this.list = this.multipleSelection
}
this.open = false;
this.calculation()
},
......
......@@ -218,8 +218,8 @@
<el-card class="card">
<div slot="header" class="card-title">{{ $t('银行收款明细') }}</div>
<div>
<el-button type="primary" plain size="mini" @click="batchVerification" v-hasPermi="['ecw:payment:detail:batchWriteOff']" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" plain size="mini" @click="handleAddReceiptItem" v-hasPermi="['ecw:payment:detail:addBank']" style="padding: 10px; margin-bottom: 10px">{{ $t('添加收款明细') }}</el-button>
<el-button type="primary" v-if="form.state!=7&&form.state!=0" plain size="mini" @click="batchVerification" v-hasPermi="['ecw:payment:detail:batchWriteOff']" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" v-if="form.state!=7&&form.state!=0" plain size="mini" @click="handleAddReceiptItem" v-hasPermi="['ecw:payment:detail:addBank']" style="padding: 10px; margin-bottom: 10px">{{ $t('添加收款明细') }}</el-button>
</div>
<el-table ref="multipleTable" :data="detailed" border row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :reserve-selection="true"> </el-table-column>
......@@ -312,8 +312,9 @@
</el-descriptions>
</el-card>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
<el-button v-if="form.state!=7" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button v-if="form.state==7||form.state==0" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
<el-button v-else type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
</div>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="50%" append-to-body>
......
......@@ -97,7 +97,7 @@
:type="DICT_TYPE.ECW_RECEIPT_STATE"
:value="scope.row.state"
/>
<span v-if="scope.row.state==1 || scope.row.state ==3 || scope.row.state==8" :title="scope.row.remark"><i class="el-icon-question"></i></span>
<span v-if="scope.row.remark&&(scope.row.state==1 || scope.row.state ==3 || scope.row.state==8)" :title="scope.row.remark"><i class="el-icon-question"></i></span>
</template>
</el-table-column>
<el-table-column :label="$t('是否开票')" align="center">
......
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