124 lines
3.1 KiB
Vue
124 lines
3.1 KiB
Vue
<template>
|
|
<view class="shet-cont">
|
|
<view class="jsfm-item nobg" style="padding-top: 0;margin-bottom: 0;">
|
|
<u-row>
|
|
<view class="lft1 font-28">计费方式</view>
|
|
<view style="flex: 1;">
|
|
<u-radio-group v-model="modelInfo.calcFeeType" @change="groupChange" >
|
|
<u-radio v-for="(item, index) in dicData.emis_calc_fee_type" :label="item.title" :name="item.val"
|
|
activeColor="#B12D29" size="30" labelSize="26" :custom-style="`margin-right: ${index+1<dicData.emis_calc_fee_type.length?30:0}rpx;`"
|
|
>
|
|
</u-radio>
|
|
</u-radio-group>
|
|
</view>
|
|
</u-row>
|
|
</view>
|
|
|
|
<view v-for="(item, index) in modelInfo.feeItems" class="jsfm-item">
|
|
<u-row custom-style="gap: 20rpx;">
|
|
<u-row custom-style="flex: 1">
|
|
<text class="font-26 pr-10">{{item.feeName}}</text>
|
|
<tpx-input v-model:value="item.fee" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input>
|
|
</u-row>
|
|
<!-- 干线运输费才显示 续重 -->
|
|
<u-row v-if="item.feeCode == '1001'" custom-style="flex: 1">
|
|
<text class="font-26 pr-10">续重</text>
|
|
<tpx-input v-model:value="item.addWeight" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;" suffix="KG"></tpx-input>
|
|
</u-row>
|
|
<view v-if="item.__add" @click="handleDelFee(index)" class="delicon">
|
|
<u-icon name="minus-circle" size="30"></u-icon>
|
|
</view>
|
|
</u-row>
|
|
<view v-if="item.calcExp" class="mt-10 clr-sub">计算公式: {{item.calcExp}}</view>
|
|
</view>
|
|
|
|
<tpx-select v-if="feeTypeOptions.length > 0" :list="feeTypeOptions" @onChange="handleAddFee" mode="drop" customInput="true"
|
|
>
|
|
<u-row justify="center">
|
|
<u-button custom-style="border-radius: 16rpx;height:60rpx;font-size: 30rpx;margin-top: 20rpx;" :plain="true" type="primary">
|
|
<u-icon name="plus" size="30" color="#B12D29"></u-icon>
|
|
<text class="pl-10">增加收费项</text>
|
|
</u-button>
|
|
</u-row>
|
|
</tpx-select>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
computed: {
|
|
modelInfo: {
|
|
get(){
|
|
return this.value
|
|
}
|
|
},
|
|
feeTypeOptions(){
|
|
let list = this.dicData.emis_fee_type || []
|
|
let curVals = this.modelInfo.feeItems.map(t=> t.feeCode)
|
|
list = list.filter(t=> curVals.indexOf(t.val) == -1)
|
|
return list
|
|
},
|
|
dicData() {
|
|
return this.$store.getters.dicData
|
|
}
|
|
},
|
|
props: {
|
|
value: {
|
|
default () {
|
|
return { }
|
|
}
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
}
|
|
},
|
|
created() {
|
|
|
|
},
|
|
onHide() {
|
|
|
|
},
|
|
unmounted() {
|
|
|
|
},
|
|
|
|
methods: {
|
|
handleDelFee(index) {
|
|
this.modelInfo.feeItems.splice(index, 1)
|
|
},
|
|
handleAddFee(val) {
|
|
this.modelInfo.feeItems.push({
|
|
__add: true,
|
|
feeCode: val,
|
|
feeName: this.dicData.emis_fee_type.filter(t=> t.val == val)[0].title
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.shet-cont{
|
|
}
|
|
.jsfm-item{
|
|
background-color: #F6F6F6;
|
|
padding: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
border-bottom: 2rpx solid #F6F6F6;
|
|
&:last-child{
|
|
margin-bottom: 0rpx;
|
|
}
|
|
.lft1{
|
|
width: 150rpx;
|
|
margin-right: 10rpx;
|
|
}
|
|
.delicon{
|
|
padding: 16rpx 0 16rpx 20rpx;
|
|
}
|
|
}
|
|
.nobg{
|
|
background-color: transparent;
|
|
}
|
|
|
|
</style> |