Commit d746090f authored by dragondean@qq.com's avatar dragondean@qq.com
parents 9aa58e78 8f5e0d2e
......@@ -26,7 +26,7 @@
</el-form-item>
<el-form-item label="" label-width="0px" prop="priceUnit">
<el-select v-model="costObj.priceUnit" :placeholder="$t('请选择单位')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
<el-option v-for="type in this.currencyList" :key="type.id" :label="$l(type, 'title')" :value="type.id"></el-option>
</el-select>
</el-form-item>
</el-row>
......@@ -47,6 +47,7 @@
import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils";
import { getCurrencyList } from "@/api/ecw/currency";
export default {
name: "costForm",
......@@ -57,6 +58,7 @@ export default {
costObj: {},
// 供应商
allSupplier: [],
currencyList: [],
rules: {
opStepType: [{ required: true, message: this.$t("操作步骤不能为空"), trigger: "change" }],
......@@ -75,6 +77,9 @@ export default {
});
const { costDetail } = this.$attrs;
this.costObj = { ...costDetail };
getCurrencyList().then((res) => {
this.currencyList = res.data ?? [];
});
},
methods: {
submit() {
......
......@@ -214,7 +214,7 @@ import editForm from "./editForm.vue";
import ladingBill from "./ladingBill/index.vue";
export default {
name: "indexSea",
name: "EcwBoxIndexsea",
components: {
costForm,
regError,
......
......@@ -320,7 +320,7 @@ import editForm from './editSeaAirForm.vue'
import ladingBill from "./ladingBill/index.vue";
export default {
name: 'box',
name: 'EcwBoxIndexseaair',
components: {
costForm,
regError,
......
......@@ -86,10 +86,7 @@
<el-table-column :label="$t('赔付金额')" align="center" prop="handleAt" width="180">
<template slot-scope="scope">
{{ scope.row.status === 3 ? scope.row.indemnity : '/'}}
<dict-tag
v-if="scope.row.status === 3"
:value="scope.row.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-tag>
<span v-if="scope.row.status === 3">{{getCurrencyLabel(scope.row.currencyUnit)}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
......@@ -180,13 +177,9 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<dict-selector
defaultable
style="width: 110px"
:placeholder="$t('请选择货币单位')"
slot="append"
v-model="form.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-selector>
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')" required>
......@@ -246,7 +239,7 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')+':'">
<span>{{form.indemnity||0}}</span>
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="form.currencyUnit"></dict-tag>
<span>{{getCurrencyLabel(form.currencyUnit)}}</span>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')+':'">
<span>{{parseTime(form.handleAt)}}</span>
......@@ -280,13 +273,9 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<dict-selector
defaultable
style="width: 110px"
:placeholder="$t('请选择货币单位')"
slot="append"
v-model="form.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-selector>
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')" required>
......@@ -309,6 +298,8 @@ import DictSelector from '@/components/DictSelector'
import { DICT_TYPE, getDictDataLabel, getDictDatas } from '@/utils/dict'
import { getBillNoSearch, getOrderNoSearch } from '@/api/ecw/order'
import customerSelect from '@/views/ecw/customer/customerSelect'
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "CustomerComplaint",
/**
......@@ -375,11 +366,17 @@ export default {
},
billList: [],
orderList: []
orderList: [],
params: {
page: 1,
rows: 20,
},
currencyList:[]
};
},
created() {
this.getList();
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
......@@ -391,7 +388,11 @@ export default {
}
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getOrderList(key){
getOrderNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
......
......@@ -372,6 +372,7 @@
<div v-if="scope.row.collectionAmount[0]">{{ $t('美元') }}: {{ scope.row.collectionAmount[0].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div>
</div>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
......@@ -857,12 +858,13 @@ export default {
row.collectionCurrencyId = val
if (val == row.currencyId) row.collectionRate = 1
else {
if (row.currencyId == 1 && val == 3) row.collectionRate = this.UStoRMB()
if (row.currencyId == 1 && val == 2) row.collectionRate = this.UStoNAN()
if (row.currencyId == 3 && val == 1) row.collectionRate = this.RMBtoUS()
if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN()
if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
// if (row.currencyId == 1 && val == 3) row.collectionRate = this.UStoRMB()
// if (row.currencyId == 1 && val == 2) row.collectionRate = this.UStoNAN()
// if (row.currencyId == 3 && val == 1) row.collectionRate = this.RMBtoUS()
// if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN()
// if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
// if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
row.collectionRate = NP.divide(this.currencyList.find(v => v.id === row.currencyId).huilv, this.currencyList.find(v => v.id === val).huilv).toFixed(6)
}
this.rateChange(row, index)
......@@ -887,8 +889,9 @@ export default {
const nairaList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 2)
const naira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = [dollar, rmb, naira]
const faList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 6)
const fa = faList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = [dollar, rmb, naira,fa]
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
}, 100)
},
......@@ -1091,16 +1094,25 @@ export default {
} else {
this.$modal.msgSuccess(this.$t('新增成功'));
}
// getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => {
// this.$set(this.list, this.selectListIndex, {...res.data})
// this.cancelDiscount()
// this.calculation()
// })
getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.cancelDiscount()
this.calculation()
})
// if(this.id>0){
// getInvoicingItem({ id: this.id }).then(res => {
// this.list = [...res.data]
// this.cancelDiscount()
// this.calculation()
// })
// }else{
setTimeout(()=>{
getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => {
this.$set(this.list, this.selectListIndex, {...res.data})
this.cancelDiscount()
this.calculation()
})
},1000)
// }
})
},
getList() {
......
......@@ -141,7 +141,7 @@
<el-table-column :label="$t('金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="创建时间" align="center" prop="channelName" />
......@@ -227,6 +227,7 @@ import { DICT_TYPE } from "@/utils/dict";
import { getTradeCityList } from "@/api/ecw/region";
import { getPayableList, deletePayable, updatePayable } from "@/api/ecw/financial"
import { getSupplierPage } from "@/api/ecw/supplier";
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "Payable",
......@@ -252,6 +253,7 @@ export default {
rows: 20,
},
allSupplier: [],
currencyList:[]
};
},
computed: {
......@@ -264,6 +266,7 @@ export default {
},
created() {
let that = this;
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList()
......@@ -286,6 +289,11 @@ export default {
this.loading = false;
});
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......
......@@ -41,13 +41,13 @@
<el-table-column :label="$t('单价金额')" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
< {{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('优惠金额')" align="center">
......@@ -75,7 +75,7 @@
</el-select> -->
</el-descriptions-item>
<el-descriptions-item :label="$t('核销基准币种')">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{getCurrencyLabel(showCurrencyId)}}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -118,7 +118,7 @@
<el-table :data="form.receiptAccountList" border>
<el-table-column :label="$t('应收币种')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<!-- <el-table-column label="应收金额" align="center" prop="receivableAmount" /> -->
......@@ -130,20 +130,20 @@
</el-table-column>
<el-table-column align="center" width="220">
<template #header>
{{ $t('核销基准币种') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />{{ $t('汇率') }}
{{ $t('核销基准币种') }}{{getCurrencyLabel(showCurrencyId)}}{{ $t('汇率') }}
</template>
<template slot-scope="scope">
<template v-if="scope.row.type !== 'total'">
<span>{{ scope.row.writeOffRate }}</span>
</template>
<template v-else>
{{ $t('应收总金额') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('应收总金额') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
</template>
</el-table-column>
<el-table-column align="center" prop="writeOffAmount">
<template #header>
{{ $t('核销基准金额') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('核销基准金额') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('期望收款账户')" align="center">
......@@ -205,7 +205,7 @@
<el-card class="card">
<div slot="header" class="card-title">{{ $t('银行收款明细') }}</div>
<div>
<el-button type="primary" plain size="mini" @click="batchVerification" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" plain size="mini" @click="batchVerification" v-hasPermi="['ecw:verification:update']" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" plain size="mini" @click="handleAddReceiptItem" style="padding: 10px; margin-bottom: 10px">{{ $t('添加收款明细') }}</el-button>
</div>
<el-table ref="multipleTable" :data="detailed" border row-key="id" @selection-change="handleSelectionChange">
......@@ -215,7 +215,7 @@
<el-table-column :label="$t('实收金额')" align="center" prop="amount" />
<el-table-column :label="$t('实收币种')" align="center" prop="marks">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="rate" />
......@@ -240,8 +240,8 @@
<template slot-scope="scope">
<el-button v-if="scope.row.status == 0" type="text" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button type="text" @click="detailClick(scope.row)">{{ $t('详情') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="verificationClick(scope.row)">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="verificationCancelClick(scope.row)">{{ $t('反核销') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="verificationClick(scope.row)" v-hasPermi="['ecw:verification:update']">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="verificationCancelClick(scope.row)" v-hasPermi="['ecw:verification:update']">{{ $t('反核销') }}</el-button>
<el-button v-if="scope.row.status == 0" type="text" @click="editClick(scope.row)">{{ $t('编辑') }}</el-button>
</template>
</el-table-column>
......@@ -258,19 +258,19 @@
</template>
<div v-else>
<div v-for="(amount, currency) in writeOffTotal" :key="currency">
{{amount}}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="currency" />
{{amount}}{{getCurrencyLabel(currency)}}
</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('核销基准金额') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('核销基准金额') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
{{ writeOffAmount}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('已核销比例') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('已核销比例') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
{{ WriteOffProportion }}%
</el-descriptions-item>
......@@ -278,7 +278,7 @@
</el-card>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="toEdit">{{ $t('编辑') }}</el-button>
<el-button type="primary" @click="verificationAll">{{ $t('全部核销') }}</el-button>
<el-button type="primary" @click="verificationAll" v-hasPermi="['ecw:verification:update']">{{ $t('全部核销') }}</el-button>
</div>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="40%" append-to-body>
<div style="padding: 0 24px">
......@@ -290,7 +290,7 @@
</template>
<div v-else>
<div v-for="(amount, currency) in surplusData" :key="currency">
<span v-if="amount"> {{amount}}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="currency" /></span>
<span v-if="amount"> {{amount}}{{getCurrencyLabel(currency)}}</span>
</div>
</div>
......@@ -355,7 +355,7 @@
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('汇率不能为空') }"
>
<template slot="label">
{{ $t('汇率') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('汇率') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
<el-input v-if="!isView" v-model="addForm.rate" style="width: 220px"></el-input>
<span v-else>{{ addForm.rate}}</span>
......@@ -364,7 +364,7 @@
v-if="showCurrencyId != addForm.currencyId"
>
<template slot="label">
{{ $t('金额') }}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
{{ $t('金额') }}{{getCurrencyLabel(showCurrencyId)}}
</template>
<span>{{ addForm.writeOffAmount?parseFloat(addForm.writeOffAmount).toFixed(6):'' }}</span>
</el-form-item>
......@@ -709,12 +709,13 @@ export default {
if(val === this.showCurrencyId) {
rate = 1
} else {
if (this.showCurrencyId === 1 && val === 3) rate = this.RMBtoUS()
else if (this.showCurrencyId === 1 && val === 2) rate = this.NANtoUS()
else if (this.showCurrencyId === 3 && val === 1) rate = this.UStoRMB()
else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB()
else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN()
else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN()
// if (this.showCurrencyId === 1 && val === 3) rate = this.RMBtoUS()
// else if (this.showCurrencyId === 1 && val === 2) rate = this.NANtoUS()
// else if (this.showCurrencyId === 3 && val === 1) rate = this.UStoRMB()
// else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB()
// else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN()
// else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN()
rate = NP.divide(this.currencyList.find(v => v.id === this.showCurrencyId).huilv, this.currencyList.find(v => v.id === val).huilv).toFixed(6)
}
this.$set(this.addForm, 'rate', rate)
},
......
......@@ -200,6 +200,7 @@
size="mini"
type="text"
@click="toprint(scope.row.id)"
v-hasPermi="['ecw:verification:create']"
>{{ $t('打印') }}</el-button
>
<el-button
......
......@@ -261,7 +261,7 @@
<el-option :disabled="dict.value=='pending'" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template>
</el-select>
</el-form-item>
</el-row>
......@@ -313,8 +313,8 @@
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</el-row>
......@@ -504,7 +504,7 @@
}
this.handlerParams.files = Array.isArray(this.handlerParams.fileList) ? this.handlerParams.fileList.join(',') : this.handlerParams.fileList
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功'));
this.$redirect('/order/pending?id=' + this.orderData.orderId)
......
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