Commit fccdf694 authored by dragondean@qq.com's avatar dragondean@qq.com

修复订单佣金申请不能输入小数点,订单列表未入仓不显示合拆单等

parent f35394d3
......@@ -15,8 +15,8 @@
<el-table-column :label="$t('金额')" align="center" prop="fromFee">
<template slot-scope="scope">
<span>{{scope.row.fromFee}}
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.fromCurrency" />
<!-- {{ scope.row.fromCurrency | currencyDataFilter(currencyDictDatas) }} -->
{{currencyName(scope.row.fromCurrency)}}
</span>
</template>
</el-table-column>
......@@ -29,8 +29,8 @@
</el-table-column>
<el-table-column :label="$t('兑换货币类型')" align="center" prop="toCurrency">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.toCurrency" />
<!-- <span>{{ scope.row.toCurrency | currencyDataFilter(currencyDictDatas) }}</span> -->
{{currencyName(scope.row.toCurrency)}}
</template>
</el-table-column>
</el-table>
......@@ -83,11 +83,10 @@
<el-input v-model="form.fromFee" :placeholder="$t('请输入金额')"/>
</el-form-item>
<el-form-item :label="$t('货币类型')" prop="fromCurrency">
<dict-selector :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="form.fromCurrency" />
<!-- <el-select v-model="form.fromCurrency" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)" :key="parseInt(dict.value)"
:label="$l(dict, 'label')" :value="parseInt(dict.value)"/>
</el-select> -->
<el-select v-model="form.fromCurrency" clearable>
<el-option v-for="item in currencyList" :key="item.id"
:label="$l(item, 'title')" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('兑换金额')" prop="toFee">
<el-input v-model="form.toFee" :placeholder="$t('请输入兑换金额')"/>
......@@ -97,8 +96,8 @@
<!-- </el-form-item>-->
<el-form-item :label="$t('兑换货币类型')" prop="toCurrency">
<el-select v-model="form.toCurrency" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)" :key="parseInt(dict.value)"
:label="dict.label" :value="parseInt(dict.value)"/>
<el-option v-for="item in currencyList" :key="item.id"
:label="$l(item, 'title')" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item label="开始时间(尼日利亚)" prop="nrlyStartTime">
......@@ -148,7 +147,8 @@
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
import {DICT_TYPE, getDictDatas, getDictData} from "@/utils/dict";
import { getCurrencyList } from "@/api/ecw/currency";
import {arrryToKeyedObjectBy} from '@/utils/index'
export default {
name: "CurrencyEcash",
components: {},
......@@ -202,12 +202,27 @@
// 表单校验
rules: {},
/* statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), */
/* currencyDictDatas: getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE), */
/* ecashDatas: getDictDatas(DICT_TYPE.ECASH_INIT), */
currencyList: []
};
},
computed:{
currencyMap(){
return arrryToKeyedObjectBy(this.currencyList, 'id')
},
currencyName(){
return id => {
let obj = this.currencyMap[id]
if(obj) return this.$l(obj, 'title')
return this.$t('未知')
}
}
},
created() {
this.getList();
getCurrencyList().then(res => {
this.currencyList = res.data
})
},
methods: {
/** 查询列表 */
......
......@@ -136,7 +136,6 @@
</el-table-column>
<!-- <el-table-column label="币种" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.currencyId" />
</template>
</el-table-column> -->
<!-- <el-table-column label="汇率" align="center" prop="totalAmount" /> -->
......
......@@ -14,7 +14,6 @@
<el-form-item v-for="(item,index) in this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS)" v-if="advanceType.indexOf(item.value) > -1" :key="item.value" :label="item.label + '预计金额'">
<el-input style="width: 300px;" v-model="specialNeedsList[index].transFee">
<div style="width: 100px;" slot="append" >
<!-- <dict-selector v-model="specialNeedsList[index].transCurrency" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" ></dict-selector> -->
<el-select v-model="specialNeedsList[index].transCurrency">
<el-option v-for="item in JSON.parse(currency)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
......
......@@ -123,7 +123,8 @@
<div>
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="FeeDetails.feeType" />
{{FeeDetails.applicationFee}}
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="FeeDetails.applicationFeeCurrency" />
<!-- <dict-tag :type="DICT_TYPE.COMMISSION_ CURRENCY_TYPE" :value="FeeDetails.applicationFeeCurrency" />, -->
{{currencyName(FeeDetails.applicationFeeCurrency)}}
<dict-tag :value="FeeDetails.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-tag>
【{{FeeDetails.remarks}}】
</div>
......@@ -163,10 +164,14 @@ import {
getOrderPage,
getWarehouseUpdateApprovalInfo
} from '@/api/ecw/order'
import { getChannelList } from '@/api/ecw/channel';
import Template from "@/views/cms/template";
import {getSupplierPage} from "@/api/ecw/supplier";
import { DICT_TYPE } from "@/utils/dict";
import { getCurrencyList } from "@/api/ecw/currency";
import {arrryToKeyedObjectBy} from '@/utils/index'
export default {
components: {Template},
props:{
......@@ -195,7 +200,22 @@ export default {
prodName: ''
}
},
computed:{
currencyMap(){
return arrryToKeyedObjectBy(this.currencyList, 'id')
},
currencyName(){
return id => {
let obj = this.currencyMap[id]
if(obj) return this.$l(obj, 'title')
return this.$t('未知')
}
}
},
created() {
getCurrencyList().then(res => {
this.currencyList = res.data
})
getChannelList().then(r => this.channelList = r.data);
warehouseAreaPositionList().then(r => this.warehouseList = r.data)
if(this.type === 2){
......
......@@ -31,7 +31,6 @@
<el-select :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.applicationFeeCurrency">
<el-option v-for="item in JSON.parse(currencys)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
<!-- <dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('付款类型')">
......
......@@ -238,7 +238,7 @@
</template>
<!-- 合单,拆单 -->
<template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState && scope.row.status">
<template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState && scope.row.status > 3">
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
</template>
......
......@@ -44,13 +44,13 @@
<!-- 明佣或者明佣+暗佣才显示 -->
<el-form-item label="明佣佣金" v-if="form.commissionType == 1 || form.commissionType == 3">
<el-input v-model.number="form.lightCommissionAmount" placeholder="" class="w-100"></el-input>
<el-input v-model="form.lightCommissionAmount" type="number" placeholder="" class="w-100"></el-input>
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
<!-- 明佣+暗佣才显示 -->
<el-form-item label="暗佣佣金" v-if="form.commissionType == 3" prop="shadeCommissionAmount" :rules="{type: 'number', max: originPrice.toNumber(), message: '暗佣设置错误', trigger: 'blur'}">
<el-input v-model.number="form.shadeCommissionAmount" placeholder="" class="w-100"></el-input>
<el-input v-model="form.shadeCommissionAmount" placeholder="" type="number" class="w-100"></el-input>
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
......@@ -180,17 +180,18 @@ export default {
// 原价
originPrice(){
if(!this.form.orgFreight) return 0
return Decimal(this.form.orgFreight).minus(this.form.orgLightCommissionAmount || 0)
return Decimal(this.form.orgFreight).minus(parseFloat(this.form.orgLightCommissionAmount) || 0)
},
// 成本价
costPrice(){
if(!this.originPrice) return 0
return Decimal(this.originPrice).minus(this.form.shadeCommissionAmount || 0)
return Decimal(this.originPrice).minus(parseFloat(this.form.shadeCommissionAmount) || 0)
},
// 销售价
salePrice(){
if(!this.originPrice) return 0
return Decimal(this.originPrice).plus(this.form.lightCommissionAmount || 0)
return Decimal(this.originPrice).plus(parseFloat(this.form.lightCommissionAmount) || 0)
}
},
......
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