|
|
@@ -297,10 +297,13 @@ const updateEquipmentUtilizationExtProperty = () => {
|
|
|
const constructionCount = parseNumberValue(constructionItem.actualValue)
|
|
|
const operatingCount = parseNumberValue(operatingItem.actualValue)
|
|
|
|
|
|
- utilizationItem.actualValue =
|
|
|
- constructionCount === undefined || operatingCount === undefined || operatingCount === 0
|
|
|
- ? undefined
|
|
|
- : Number(((constructionCount / operatingCount) * 100).toFixed(2))
|
|
|
+ if (constructionCount === undefined || operatingCount === undefined) {
|
|
|
+ utilizationItem.actualValue = undefined
|
|
|
+ } else if (operatingCount === 0) {
|
|
|
+ utilizationItem.actualValue = 0
|
|
|
+ } else {
|
|
|
+ utilizationItem.actualValue = Number(((constructionCount / operatingCount) * 100).toFixed(2))
|
|
|
+ }
|
|
|
|
|
|
nextTick(() => detailFormRef.value?.clearValidate(getExtPropertyProp(utilizationItem)))
|
|
|
}
|
|
|
@@ -570,7 +573,7 @@ onMounted(() => {
|
|
|
:rules="getExtPropertyRules(item)">
|
|
|
<el-input-number
|
|
|
v-if="isDoubleExtProperty(item)"
|
|
|
- v-model="item.actualValue"
|
|
|
+ v-model="item.actualValue as any"
|
|
|
class="w-full!"
|
|
|
:controls="false"
|
|
|
:disabled="isReadonly || isEquipmentUtilizationExtProperty(item)"
|
|
|
@@ -646,7 +649,7 @@ onMounted(() => {
|
|
|
:rules="getExtPropertyRules(item)">
|
|
|
<el-input-number
|
|
|
v-if="isDoubleExtProperty(item)"
|
|
|
- v-model="item.actualValue"
|
|
|
+ v-model="item.actualValue as any"
|
|
|
class="w-full!"
|
|
|
:controls="false"
|
|
|
:disabled="isReadonly"
|