优化代码

This commit is contained in:
java110 2020-09-10 23:45:54 +08:00
parent ea90ba9ad1
commit bfe240d8a9
5 changed files with 48 additions and 7 deletions

View File

@ -14,6 +14,13 @@
v-model="addFeeFormulaInfo.formulaValue"></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">单价</label>
<div class="col-sm-10">
<input placeholder="必填,请填写单价" type="text" class="form-control"
v-model="addFeeFormulaInfo.price">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">描述</label>
<div class="col-sm-10">
@ -29,8 +36,8 @@
<div>U 代表房屋对应单元面积</div>
<div>R 代表房屋面积</div>
<div>X 代表房屋收费系数(房屋管理中配置)</div>
<div>举例:公共区域公摊电费 电量/楼栋面积*房屋面积*单价</div>
<div>公式T/F * R * 1.5 1.5为单价</div>
<div>举例:公共区域公摊电费 电量/楼栋面积*房屋面积</div>
<div>公式T/F * R</div>
</div>
</div>

View File

@ -10,6 +10,7 @@
formulaId: '',
formulaValue: '',
formulaDesc: '',
price:''
}
},
@ -38,6 +39,18 @@
errInfo: "公式太复杂"
},
],
'addFeeFormulaInfo.price': [
{
limit: "required",
param: "",
errInfo: "单价不能为空"
},
{
limit: "money",
param: "",
errInfo: "单价填写有误如1.50"
},
],
'addFeeFormulaInfo.formulaDesc': [
{
limit: "maxLength",
@ -97,7 +110,7 @@
vc.component.addFeeFormulaInfo = {
formulaValue: '',
formulaDesc: '',
price:''
};
}
}

View File

@ -14,6 +14,13 @@
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">单价</label>
<div class="col-sm-10">
<input placeholder="必填,请填写单价" type="text" class="form-control"
v-model="editFeeFormulaInfo.price">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">描述</label>
<div class="col-sm-10">
@ -29,8 +36,8 @@
<div>U 代表房屋对应单元面积</div>
<div>R 代表房屋面积</div>
<div>X 代表房屋收费系数(房屋管理中配置)</div>
<div>举例:公共区域公摊电费 电量/楼栋面积*房屋面积*单价</div>
<div>公式T/F * R * 1.5 1.5为单价</div>
<div>举例:公共区域公摊电费 电量/楼栋面积*房屋面积</div>
<div>公式T/F * R</div>
</div>
</div>

View File

@ -6,7 +6,7 @@
formulaId: '',
formulaValue: '',
formulaDesc: '',
price:''
}
},
_initMethod: function () {
@ -37,6 +37,18 @@
errInfo: "公式太复杂"
},
],
'editFeeFormulaInfo.price': [
{
limit: "required",
param: "",
errInfo: "单价不能为空"
},
{
limit: "money",
param: "",
errInfo: "单价填写有误如1.50"
},
],
'editFeeFormulaInfo.formulaDesc': [
{
limit: "maxLength",
@ -87,7 +99,7 @@
formulaId: '',
formulaValue: '',
formulaDesc: '',
price:''
}
}
}

View File

@ -18,6 +18,7 @@
<tr>
<th class="text-center">公式ID</th>
<th class="text-center">公式</th>
<th class="text-center">单价</th>
<th class="text-center">描述</th>
<th class="text-center">操作</th>
</tr>
@ -26,6 +27,7 @@
<tr v-for="feeFormula in feeFormulaManageInfo.feeFormulas">
<td class="text-center">{{feeFormula.formulaId}}</td>
<td class="text-center">{{feeFormula.formulaValue}}</td>
<td class="text-center">{{feeFormula.price}}</td>
<td class="text-center">{{feeFormula.formulaDesc}}</td>
<td class="text-center">
<div class="btn-group">