Commit 1cb3d990 authored by Marcus's avatar Marcus

Merge remote-tracking branch 'origin/dev' into dev

parents c9e3a22a 0cbf8310
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num"> <el-table-column :label="$t('箱数')" align="center" prop="num">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <el-link type="primary" @click.native="showWarehouseLogs(scope.row)">
{{scope.row.num}} {{scope.row.num}}
</div> </el-link>
<div style="color:blue;fontWeight:bold;"> <div style="color:blue;fontWeight:bold;">
{{ scope.row.multiSpecification === true ? '(多规格)' : ''}} {{ scope.row.multiSpecification === true ? '(多规格)' : ''}}
</div> </div>
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<batchTally v-if="dialogConfig.dialogVisible" v-bind="$attrs" @closeDialog="closeDialog" :type="dialogConfig.type" :tallyRows="tallyRows" :shipmentObj="shipmentObj" /> <batchTally v-if="dialogConfig.dialogVisible" v-bind="$attrs" @closeDialog="closeDialog" :type="dialogConfig.type" :tallyRows="tallyRows" :shipmentObj="shipmentObj" />
</el-dialog> </el-dialog>
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
</div> </div>
</template> </template>
...@@ -100,18 +101,23 @@ ...@@ -100,18 +101,23 @@
import batchTally from "./batchTally.vue"; import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea"; import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils"; import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail";
import { getOrder } from "@/api/ecw/order";
export default { export default {
name: "tally", name: "tally",
inheritAttrs: false, inheritAttrs: false,
components: { components: {
batchTally, batchTally,
WarehouseDetail,
}, },
props: { props: {
shipmentObj: Object, shipmentObj: Object,
}, },
data() { data() {
return { return {
showWarehouseInItemId: null,
order: null,
tallyList: [], tallyList: [],
// 理货数据 // 理货数据
tallyRows: [], tallyRows: [],
...@@ -245,6 +251,13 @@ export default { ...@@ -245,6 +251,13 @@ export default {
}); });
}); });
}, },
// 显示入仓记录
showWarehouseLogs(row) {
getOrder(row.orderId).then((response) => {
this.order = response.data;
this.showWarehouseInItemId = row.orderItemId;
});
},
}, },
computed: { computed: {
/* 获取仓库 */ /* 获取仓库 */
......
<template>
<!-- 订单获取入仓记录 -->
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="1000px" append-to-body>
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('快递单号')" prop="expressNo" />
<el-table-column :label="$t('入仓时间')" prop="inTime">
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { getOrder, getOrderWarehouseIn } from "@/api/ecw/order";
import { DICT_TYPE } from "@/utils/dict";
import { parseTime } from "@/utils/ruoyi";
export default {
filters: { parseTime },
props: {
order: Object, // order 和 orderId 二选一
orderId: Number,
orderItemId: Number,
},
data() {
return {
orderDetail: null,
warehouseList: null,
};
},
computed: {
info() {
return this.orderDetail || this.order;
},
orderItem() {
if (!this.info) return null;
return this.info.orderItemVOList.find(
(item) => item.orderItemId == this.orderItemId
);
},
warehouseItem() {
if (!this.warehouseList) return [];
return (
this.warehouseList.find(
(item) => item.orderItemId == this.orderItemId
) || []
);
},
title() {
if (!this.orderItem) return "-";
return this.$l(this.orderItem, "prodTitle") + " - " + this.$t("入仓记录");
},
},
created() {
this.show = true;
if (!this.order && this.orderId) {
getOrder(this.orderId).then((res) => {
this.orderDetail = res.data;
});
}
this.getOrderWarehouseIn();
},
methods: {
closeDialog() {
this.show = false;
this.$emit("close");
},
getOrderWarehouseIn() {
getOrderWarehouseIn(this.info.orderId).then((res) => {
this.warehouseList = res.data;
});
},
},
};
</script>
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<el-table-column :label="$t('金额')" align="center" prop="fromFee"> <el-table-column :label="$t('金额')" align="center" prop="fromFee">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.fromFee}} <span>{{scope.row.fromFee}}
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.fromCurrency" />
<!-- {{ scope.row.fromCurrency | currencyDataFilter(currencyDictDatas) }} --> <!-- {{ scope.row.fromCurrency | currencyDataFilter(currencyDictDatas) }} -->
{{currencyName(scope.row.fromCurrency)}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('兑换货币类型')" align="center" prop="toCurrency"> <el-table-column :label="$t('兑换货币类型')" align="center" prop="toCurrency">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.toCurrency" />
<!-- <span>{{ scope.row.toCurrency | currencyDataFilter(currencyDictDatas) }}</span> --> <!-- <span>{{ scope.row.toCurrency | currencyDataFilter(currencyDictDatas) }}</span> -->
{{currencyName(scope.row.toCurrency)}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -83,11 +83,10 @@ ...@@ -83,11 +83,10 @@
<el-input v-model="form.fromFee" :placeholder="$t('请输入金额')"/> <el-input v-model="form.fromFee" :placeholder="$t('请输入金额')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('货币类型')" prop="fromCurrency"> <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-select v-model="form.fromCurrency" clearable> <el-option v-for="item in currencyList" :key="item.id"
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)" :key="parseInt(dict.value)" :label="$l(item, 'title')" :value="item.id"/>
:label="$l(dict, 'label')" :value="parseInt(dict.value)"/> </el-select>
</el-select> -->
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换金额')" prop="toFee"> <el-form-item :label="$t('兑换金额')" prop="toFee">
<el-input v-model="form.toFee" :placeholder="$t('请输入兑换金额')"/> <el-input v-model="form.toFee" :placeholder="$t('请输入兑换金额')"/>
...@@ -97,8 +96,8 @@ ...@@ -97,8 +96,8 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item :label="$t('兑换货币类型')" prop="toCurrency"> <el-form-item :label="$t('兑换货币类型')" prop="toCurrency">
<el-select v-model="form.toCurrency" clearable> <el-select v-model="form.toCurrency" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)" :key="parseInt(dict.value)" <el-option v-for="item in currencyList" :key="item.id"
:label="dict.label" :value="parseInt(dict.value)"/> :label="$l(item, 'title')" :value="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="开始时间(尼日利亚)" prop="nrlyStartTime"> <el-form-item label="开始时间(尼日利亚)" prop="nrlyStartTime">
...@@ -148,7 +147,8 @@ ...@@ -148,7 +147,8 @@
import {CommonStatusEnum} from "@/utils/constants"; import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user"; import {changeUserStatus} from "@/api/system/user";
import {DICT_TYPE, getDictDatas, getDictData} from "@/utils/dict"; import {DICT_TYPE, getDictDatas, getDictData} from "@/utils/dict";
import { getCurrencyList } from "@/api/ecw/currency";
import {arrryToKeyedObjectBy} from '@/utils/index'
export default { export default {
name: "CurrencyEcash", name: "CurrencyEcash",
components: {}, components: {},
...@@ -202,12 +202,27 @@ ...@@ -202,12 +202,27 @@
// 表单校验 // 表单校验
rules: {}, rules: {},
/* statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), */ /* statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), */
/* currencyDictDatas: getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE), */
/* ecashDatas: getDictDatas(DICT_TYPE.ECASH_INIT), */ /* 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() { created() {
this.getList(); this.getList();
getCurrencyList().then(res => {
this.currencyList = res.data
})
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
......
...@@ -136,7 +136,6 @@ ...@@ -136,7 +136,6 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="币种" align="center"> <!-- <el-table-column label="币种" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="scope.row.currencyId" />
</template> </template>
</el-table-column> --> </el-table-column> -->
<!-- <el-table-column label="汇率" align="center" prop="totalAmount" /> --> <!-- <el-table-column label="汇率" align="center" prop="totalAmount" /> -->
......
...@@ -14,7 +14,6 @@ ...@@ -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-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"> <el-input style="width: 300px;" v-model="specialNeedsList[index].transFee">
<div style="width: 100px;" slot="append" > <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-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-option v-for="item in JSON.parse(currency)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> </el-select>
......
...@@ -123,7 +123,8 @@ ...@@ -123,7 +123,8 @@
<div> <div>
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="FeeDetails.feeType" /> <dict-tag :type="DICT_TYPE.FEE_TYPE" :value="FeeDetails.feeType" />
{{FeeDetails.applicationFee}} {{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> <dict-tag :value="FeeDetails.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-tag>
【{{FeeDetails.remarks}}】 【{{FeeDetails.remarks}}】
</div> </div>
...@@ -163,10 +164,14 @@ import { ...@@ -163,10 +164,14 @@ import {
getOrderPage, getOrderPage,
getWarehouseUpdateApprovalInfo getWarehouseUpdateApprovalInfo
} from '@/api/ecw/order' } from '@/api/ecw/order'
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
import {getSupplierPage} from "@/api/ecw/supplier"; import {getSupplierPage} from "@/api/ecw/supplier";
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
import { getCurrencyList } from "@/api/ecw/currency";
import {arrryToKeyedObjectBy} from '@/utils/index'
export default { export default {
components: {Template}, components: {Template},
props:{ props:{
...@@ -195,7 +200,22 @@ export default { ...@@ -195,7 +200,22 @@ export default {
prodName: '' 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() { created() {
getCurrencyList().then(res => {
this.currencyList = res.data
})
getChannelList().then(r => this.channelList = r.data); getChannelList().then(r => this.channelList = r.data);
warehouseAreaPositionList().then(r => this.warehouseList = r.data) warehouseAreaPositionList().then(r => this.warehouseList = r.data)
if(this.type === 2){ if(this.type === 2){
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
<el-select :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.applicationFeeCurrency"> <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-option v-for="item in JSON.parse(currencys)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> </el-select>
<!-- <dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('付款类型')"> <el-table-column :label="$t('付款类型')">
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</template> </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/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> <el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
</template> </template>
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
<!-- 明佣或者明佣+暗佣才显示 --> <!-- 明佣或者明佣+暗佣才显示 -->
<el-form-item label="明佣佣金" v-if="form.commissionType == 1 || form.commissionType == 3"> <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] }} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item> </el-form-item>
<!-- 明佣+暗佣才显示 --> <!-- 明佣+暗佣才显示 -->
<el-form-item label="暗佣佣金" v-if="form.commissionType == 3" prop="shadeCommissionAmount" :rules="{type: 'number', max: originPrice.toNumber(), message: '暗佣设置错误', trigger: 'blur'}"> <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] }} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item> </el-form-item>
...@@ -180,17 +180,18 @@ export default { ...@@ -180,17 +180,18 @@ export default {
// 原价 // 原价
originPrice(){ originPrice(){
if(!this.form.orgFreight) return 0 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(){ costPrice(){
if(!this.originPrice) return 0 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(){ salePrice(){
if(!this.originPrice) return 0 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