Commit 987860b6 authored by dragondean@qq.com's avatar dragondean@qq.com

查看空运价格详情显示渠道和商品清关费

parent c159671d
<template> <template>
<div> <div>
<template v-if="!readonly">
<el-row type="flex" align="align" :gutter="10" > <el-row type="flex" align="align" :gutter="10" >
<el-col :span="6">空运订单重量上限(kg)</el-col> <el-col :span="6">空运订单重量上限(kg)</el-col>
<el-col :span="6" ><el-input v-model="value1.airWeightLimit"></el-input></el-col> <el-col :span="6" ><el-input v-model="value1.airWeightLimit"></el-input></el-col>
...@@ -8,12 +9,13 @@ ...@@ -8,12 +9,13 @@
</el-col> </el-col>
</el-row> </el-row>
<h1>空运清关费</h1> <h1>空运清关费</h1>
</template>
<div v-for="(item ,index) in value1[keyArr]"> <div v-for="(item ,index) in value1[keyArr]">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4"> <el-col :span="4">
第{{index + 1 }}阶梯定价方案: 第{{index + 1 }}阶梯定价方案:
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6" v-if="!readonly">
<el-button type="primary" @click="addInterval" v-if="index === 0" > <el-button type="primary" @click="addInterval" v-if="index === 0" >
添加区间 添加区间
</el-button> </el-button>
...@@ -54,6 +56,7 @@ import {getCurrencyPage} from "@/api/ecw/currency"; ...@@ -54,6 +56,7 @@ import {getCurrencyPage} from "@/api/ecw/currency";
import CurrencySelect from "@/views/ecw/channel/componrnts/currency-select.vue"; import CurrencySelect from "@/views/ecw/channel/componrnts/currency-select.vue";
import {getUnitList} from "@/api/ecw/unit"; import {getUnitList} from "@/api/ecw/unit";
import WeightSelect from "@/views/ecw/channel/componrnts/weight-select.vue"; import WeightSelect from "@/views/ecw/channel/componrnts/weight-select.vue";
import Template from "@/views/cms/template/index.vue";
export default { export default {
props:{ props:{
value:{ value:{
...@@ -63,10 +66,11 @@ export default { ...@@ -63,10 +66,11 @@ export default {
keyArr:{ keyArr:{
type:String, type:String,
default:'channelPriceStepClearanceList' default:'channelPriceStepClearanceList'
} },
readonly: Boolean
}, },
name: "packaging-type", name: "packaging-type",
components: {WeightSelect, CurrencySelect}, components: {Template, WeightSelect, CurrencySelect},
created() { created() {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
......
...@@ -60,6 +60,9 @@ ...@@ -60,6 +60,9 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item v-if="channel" :label="$t('出货渠道')">
{{$l(channel, 'name')}}
</el-form-item>
<!--有路线则不显示路线选择器--> <!--有路线则不显示路线选择器-->
<routers-selector v-else v-model="selectedRoutes" :option="routerOption" :type="type" /> <routers-selector v-else v-model="selectedRoutes" :option="routerOption" :type="type" />
...@@ -202,7 +205,9 @@ ...@@ -202,7 +205,9 @@
<el-date-picker v-model="form.validateEndDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.validateEndDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<!--编辑的时候右侧显示快捷设置,查看的时候空运显示商品清关费-->
<el-col :span="12" v-if="!readonly">
<h2>{{$t('快捷设置')}}</h2> <h2>{{$t('快捷设置')}}</h2>
<div class="flex items-center"> <div class="flex items-center">
{{$t('批量加价')}}+ {{$t('批量加价')}}+
...@@ -222,6 +227,15 @@ ...@@ -222,6 +227,15 @@
<el-button @click="quickSet" type="primary" :disabled="!quickForm.plus && !quickForm.minus">{{$t('确定')}}</el-button> <el-button @click="quickSet" type="primary" :disabled="!quickForm.plus && !quickForm.minus">{{$t('确定')}}</el-button>
</div> </div>
</el-col> </el-col>
<el-col :span="12" v-else-if="readonly && type === 'air'">
<!--商品清关费-->
<h2>商品清关费价格</h2>
<packaging-type v-if="product && product.priceStepClearanceList && product.priceStepClearanceList.length"
:value="product" key-arr="priceStepClearanceList" readonly/>
<div v-else>
未设置清关费
</div>
</el-col>
</el-row> </el-row>
</el-card> </el-card>
...@@ -363,8 +377,10 @@ import Inputor from '@/components/Inputor' ...@@ -363,8 +377,10 @@ import Inputor from '@/components/Inputor'
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import {openedRouterList} from '@/api/ecw/warehouse' import {openedRouterList} from '@/api/ecw/warehouse'
import Decimal from "decimal.js"; import Decimal from "decimal.js";
import {getChannel} from "@/api/ecw/channel";
import PackagingType from "@/views/ecw/channel/componrnts/packaging-type.vue";
export default { export default {
components: { RoutersSelector, ProductSelector, Selector, Inputor }, components: {PackagingType, RoutersSelector, ProductSelector, Selector, Inputor },
filters: {parseTime}, filters: {parseTime},
data() { data() {
return { return {
...@@ -399,7 +415,9 @@ export default { ...@@ -399,7 +415,9 @@ export default {
showLogsDialog: false, // 显示价格日志弹层 showLogsDialog: false, // 显示价格日志弹层
logs: [], logs: [],
// 批量加价/减价 // 批量加价/减价
quickForm:{} // 快速加价/减价表单 quickForm:{}, // 快速加价/减价表单
// 渠道信息
channel: null
} }
}, },
computed: { computed: {
...@@ -555,6 +573,12 @@ export default { ...@@ -555,6 +573,12 @@ export default {
if(this.$route.query.action == 'update'){ if(this.$route.query.action == 'update'){
let res = await getProductPrice(this.$route.query.id) let res = await getProductPrice(this.$route.query.id)
this.$set(this, 'form', res.data) this.$set(this, 'form', res.data)
// 显示渠道
if(this.readonly && this.form.shippingChannelId){
getChannel(this.form.shippingChannelId).then(res => {
this.channel = res.data
})
}
if(this.form.needPay){ if(this.form.needPay){
this.needPay = true this.needPay = true
} }
......
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