Commit dbbd91b6 by 张晓玮

Merge branch 'feature/584/zxw' into 'SAAS+V5.8.4'

兜底条件输入限制整数最大值

See merge request !896
2 parents ca211c25 90d0f610
...@@ -381,8 +381,8 @@ export default { ...@@ -381,8 +381,8 @@ export default {
], ],
customerInformation: [ customerInformation: [
{ label: "人员成本占比", key: "personnelCostRate", type: "input", unit: "%", inputRule: "decimal", min: 0, max: 100, decimalPlaces: 2, disabled: true }, { label: "人员成本占比", key: "personnelCostRate", type: "input", unit: "%", inputRule: "decimal", min: 0, max: 100, decimalPlaces: 2, disabled: true },
{ label: "装修、设备总投入", key: "renovationEquipmentCost", type: "input", inputRule: "decimal", min: 0, max: 99999999.99, decimalPlaces: 2, disabled: true }, { label: "装修、设备总投入", key: "renovationEquipmentCost", type: "input", inputRule: "decimal", min: 0, max: 99999999, decimalPlaces: 2, disabled: true },
{ label: "其他(房租、水电、耗材等)/月", key: "otherCostPerMonth", type: "input", inputRule: "decimal", min: 0, max: 99999999.99, decimalPlaces: 2, disabled: true }, { label: "其他(房租、水电、耗材等)/月", key: "otherCostPerMonth", type: "input", inputRule: "decimal", min: 0, max: 99999999, decimalPlaces: 2, disabled: true },
{ label: "预估毛利率", key: "estimatedGrossMargin", type: "input", unit: "%", inputRule: "decimal", min: 0, max: 100, decimalPlaces: 2, disabled: true }, { label: "预估毛利率", key: "estimatedGrossMargin", type: "input", unit: "%", inputRule: "decimal", min: 0, max: 100, decimalPlaces: 2, disabled: true },
{ label: "是否存在兜底", key: "hasGuarantee", type: "radio", options: [{ label: "是", value: 1 }, { label: "否", value: 0 }] }, { label: "是否存在兜底", key: "hasGuarantee", type: "radio", options: [{ label: "是", value: 1 }, { label: "否", value: 0 }] },
{ {
...@@ -613,20 +613,20 @@ export default { ...@@ -613,20 +613,20 @@ export default {
* 兜底标准输入(按指标类型应用不同规则) * 兜底标准输入(按指标类型应用不同规则)
*/ */
handleStandardInput(value, item) { handleStandardInput(value, item) {
item.guaranteeStandard = this.formatDecimal(value, this.isRateIndicator(item.guaranteeIndex) ? { min: 0, max: 100, decimalPlaces: 2 } : { min: 0, max: 999999.99, decimalPlaces: 2 }); item.guaranteeStandard = this.formatDecimal(value, this.isRateIndicator(item.guaranteeIndex) ? { min: 0, max: 100, decimalPlaces: 2 } : { min: 0, max: 99999999, decimalPlaces: 2 });
}, },
/** /**
* 赔付金额输入(0-999999.99,小数点后 2 位) * 赔付金额输入(0-999999,小数点后 2 位)
* 区间值输入时跟随兜底标准的输入限制 * 区间值输入时跟随兜底标准的输入限制
*/ */
handleAmountInput(value, target, key, item) { handleAmountInput(value, target, key, item) {
// 如果是阶梯模式的区间值输入(startValue/endValue) // 如果是阶梯模式的区间值输入(startValue/endValue)
if (key === "startValue" || key === "endValue") { if (key === "startValue" || key === "endValue") {
const result = this.formatDecimal(value, { min: 0, max: 999999.99, decimalPlaces: 2 }); const result = this.formatDecimal(value, { min: 0, max: item.dataType == 1 ? 100 : 99999999, decimalPlaces: 2 });
this.$set(target, key, result); this.$set(target, key, result);
} else { } else {
// 其他赔付金额(fixedCompensation、ladder.compensationAmount),固定使用 0-999999.99,小数点后 2 位 // 其他赔付金额(fixedCompensation、ladder.compensationAmount),固定使用 0-999999,小数点后 2 位
const result = this.formatDecimal(value, { min: 0, max: 999999.99, decimalPlaces: 2 }); const result = this.formatDecimal(value, { min: 0, max: 999999, decimalPlaces: 2 });
this.$set(target, key, result); this.$set(target, key, result);
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!