Commit 2713e0f4 authored by 邓春圆's avatar 邓春圆

阶梯定价,总量单位和币种统一

parent a3a387e7
<template>
<div style="width: 100%;min-width: 100px">
<el-select v-model="val">
<el-select @change="(e) =>{$emit('change', e)}" :disabled="disabled" v-model="val">
<el-option :value="item.id" :label="$l(item, 'title') + item.fuhao" v-for="(item) in options"></el-option>
</el-select>
</div>
......@@ -10,6 +10,10 @@
export default {
name: "currency-select",
props:{
disabled:{
type:Boolean,
default:false
},
options:{
type:Array,
default:()=>[]
......
......@@ -29,7 +29,7 @@
<el-col :span="9">
<div style="display: flex;align-items: center;">
<el-input v-model="item.startNum"></el-input> - <el-input v-model="item.endNum" ></el-input > /
<weight-select v-model="item.weightUnit" :options="unitList"></weight-select>
<weight-select @change="changeWeight" :disabled="index > 0" v-model="item.weightUnit" :options="unitList"></weight-select>
</div>
</el-col>
</el-row>
......@@ -40,8 +40,8 @@
<el-col :span="9">
<div style="display: flex;align-items: center;">
<el-input v-model="item.clearancePrice"></el-input>
<currency-select :options="currencyList" v-model="item.clearancePriceUnit"></currency-select>
/ <weight-select :options="unitList" v-model="item.clearanceVolumeUnit"></weight-select>
<currency-select @change="setCurrency" :disabled="index > 0" :options="currencyList" v-model="item.clearancePriceUnit"></currency-select>
/ <weight-select :disabled="index > 0" @change="setAirFreightWeight" :options="unitList" v-model="item.clearanceVolumeUnit"></weight-select>
</div>
</el-col>
</el-row>
......@@ -91,16 +91,31 @@ export default {
})
},
methods:{
changeWeight(e){
this.value1[this.keyArr].forEach(item => {
item.weightUnit = e
})
},
setCurrency(e){
this.value1[this.keyArr].forEach(item => {
item.clearancePriceUnit = e
})
},
setAirFreightWeight(e){
this.value1[this.keyArr].forEach(item => {
item.clearanceVolumeUnit = e
})
},
addInterval(){
let p = {
"channelId":'',
"clearancePrice":'',
"clearancePriceUnit":'',
"clearanceVolumeUnit":6,
"clearancePriceUnit": this.value1[this.keyArr].length && this.value1[this.keyArr][0].clearancePriceUnit ? this.value1[this.keyArr][0].clearancePriceUnit : '',
"clearanceVolumeUnit":this.value1[this.keyArr].length ? this.value1[this.keyArr][0].clearanceVolumeUnit : 6,
"endNum":'',
"packagingId":'',
"startNum":'',
"weightUnit":6
"weightUnit": this.value1[this.keyArr].length ? this.value1[this.keyArr][0].weightUnit : 6
}
this.value1[this.keyArr].push(p)
this.$forceUpdate();
......
<template>
<div style="min-width: 100px;width: 100%;">
<el-select v-model="val">
<el-select @change="(e) =>{$emit('change',e)}" :disabled="disabled" v-model="val">
<el-option v-for="(item, index) in options" :value="item.id" :key="index" :label="$l(item ,'title')" ></el-option>
</el-select>
</div>
......@@ -10,6 +10,10 @@
export default {
name: "weight-select",
props:{
disabled:{
type:Boolean,
default:false
},
options:{
type:Array,
default:()=>[]
......
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