|
|
@@ -221,7 +221,7 @@ const validateTotalTime =
|
|
|
let total = 0
|
|
|
let msg = ''
|
|
|
|
|
|
- total = parseFloat((drillingTime + nonProdSum).toFixed(2))
|
|
|
+ total = parseFloat((drillingTime + otherTime + nonProdSum).toFixed(2))
|
|
|
msg = `进尺(${drillingTime})+其他(${otherTime})+非生产(${nonProdSum})=${total}H,必须为24H`
|
|
|
|
|
|
if (Math.abs(total - 24) > 0.01) {
|
|
|
@@ -334,6 +334,20 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const orange = computed(() => {
|
|
|
+ const drillingTime = form.value.drillingWorkingTime || 0
|
|
|
+ const otherTime = form.value.otherProductionTime || 0
|
|
|
+
|
|
|
+ const nonProdSum = sumNonProdTimes()
|
|
|
+
|
|
|
+ let total = 0
|
|
|
+
|
|
|
+ total = parseFloat((drillingTime + otherTime + nonProdSum).toFixed(2))
|
|
|
+
|
|
|
+ if (Math.abs(total - 24) > 0.01) return true
|
|
|
+ return false
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -580,6 +594,7 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
align="left"
|
|
|
placeholder="进尺+其他+非生产=24H"
|
|
|
:disabled="isMainFieldDisabled"
|
|
|
+ :class="{ 'orange-input': orange }"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="其它生产时间(H)" prop="otherProductionTime">
|
|
|
@@ -592,6 +607,7 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
align="left"
|
|
|
placeholder="请输入其它生产时间(H)"
|
|
|
:disabled="isMainFieldDisabled"
|
|
|
+ :class="{ 'orange-input': orange }"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
|
|
|
@@ -610,6 +626,7 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
:controls="false"
|
|
|
align="left"
|
|
|
:disabled="isMainFieldDisabled"
|
|
|
+ :class="{ 'orange-input': orange }"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
|
|
|
@@ -641,16 +658,18 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
<template #footer>
|
|
|
<div v-if="isEdit">
|
|
|
<el-button
|
|
|
+ size="default"
|
|
|
type="primary"
|
|
|
@click="submitForm"
|
|
|
:loading="formLoading"
|
|
|
:disabled="formType === 'readonly'"
|
|
|
>确 定</el-button
|
|
|
>
|
|
|
- <el-button @click="emits('update:visible', false)">取 消</el-button>
|
|
|
+ <el-button size="default" @click="emits('update:visible', false)">取 消</el-button>
|
|
|
</div>
|
|
|
<div v-if="isApproval">
|
|
|
<el-button
|
|
|
+ size="default"
|
|
|
type="primary"
|
|
|
@click="handleAudit(20)"
|
|
|
:loading="formLoading"
|
|
|
@@ -658,13 +677,14 @@ const handleAudit = async (auditStatus: 20 | 30) => {
|
|
|
>审批通过</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
+ size="default"
|
|
|
type="danger"
|
|
|
@click="handleAudit(30)"
|
|
|
:loading="formLoading"
|
|
|
:disabled="formType === 'readonly'"
|
|
|
>审批拒绝</el-button
|
|
|
>
|
|
|
- <el-button @click="emits('update:visible', false)">取 消</el-button>
|
|
|
+ <el-button size="default" @click="emits('update:visible', false)">取 消</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-drawer>
|