|
@@ -40,7 +40,7 @@
|
|
|
<div class="form-item-flex just">
|
|
|
<div>价格(元)</div>
|
|
|
<el-input class="input100" v-model="item.price" placeholder="请输入价格"></el-input>
|
|
|
- <div v-if="formData.chargeType === 2">阶梯水量(吨)</div>
|
|
|
+ <div v-if="formData.chargeType === 4">阶梯水量(吨)</div>
|
|
|
<div v-if="formData.chargeType === 3">阶梯电量(度)</div>
|
|
|
<el-input class="input100" v-model="item.quantity" placeholder="请输入用量"></el-input>
|
|
|
<div class="sunm" @click="addPrice" v-if="index === 0 && formData.ladderList.length < 5">
|
|
@@ -166,6 +166,7 @@ export default {
|
|
|
watch: {
|
|
|
// 切换电水label
|
|
|
'formData.chargeType'(val, old) {
|
|
|
+ debugger;
|
|
|
if (val == 1 && this.formData.chargeMode == 3) {
|
|
|
this.formData.chargeMode = '';
|
|
|
} else if (old == 1 && !this.formData.id) {
|
|
@@ -279,8 +280,12 @@ export default {
|
|
|
if (this.params.todo == 'edit') {
|
|
|
let paramsData = JSON.parse(JSON.stringify(this.params.data));
|
|
|
let newLadd = JSON.parse(paramsData.chargePriceLadder);
|
|
|
- paramsData.ladderList = newLadd;
|
|
|
-
|
|
|
+ if (!!newLadd) {
|
|
|
+ paramsData.ladderList = newLadd;
|
|
|
+ }
|
|
|
+ if (paramsData.chargeCycle == null) {
|
|
|
+ paramsData.chargeCycle = 1;
|
|
|
+ }
|
|
|
Object.assign(this.formData, paramsData);
|
|
|
}
|
|
|
}
|