Procházet zdrojové kódy

🐞 fix(日报): 修复警告提示,瑞鹰日报明细返还操作栏

Zimo před 5 dny
rodič
revize
a2b66825e9

+ 1 - 1
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -186,7 +186,7 @@ function render() {
         let item = params.map(
           (el) => `<div class="flex items-center justify-between mt-1">
             <span>${el.marker} ${el.seriesName}</span>
-            <span>${el.value[2].toFixed(2)}</span>
+            <span>${el.value[2]?.toFixed(2)}</span>
           </div>`
         )
 

+ 10 - 0
src/views/pms/iotrhdailyreport/approval.vue

@@ -775,6 +775,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.dailyInjectGasTime"
             placeholder="请输入当日注气时间(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="当日注水时间(H)" prop="dailyInjectWaterTime">
@@ -784,6 +785,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.dailyInjectWaterTime"
             placeholder="当日注水时间(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="非生产时间(H)" prop="nonProductionTime">
@@ -793,6 +795,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.nonProductionTime"
             placeholder="非生产时间(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="非生产时间原因" prop="nptReason">
@@ -888,6 +891,13 @@ const submitForm = async (auditStatus: 20 | 30) => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number__decrease) {
   display: none !important;
 }

+ 10 - 0
src/views/pms/iotrhdailyreport/fill.vue

@@ -778,6 +778,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.dailyInjectGasTime"
             placeholder="请输入当日注气时间(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="当日注水时间(H)" prop="dailyInjectWaterTime">
@@ -786,6 +787,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.dailyInjectWaterTime"
             placeholder="当日注水时间(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="非生产时间(H)" prop="nonProductionTime">
@@ -794,6 +796,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.nonProductionTime"
             placeholder="非生产时间(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="非生产时间原因" prop="nptReason">
@@ -864,6 +867,13 @@ const submitForm = async () => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number) {
   width: 100%;
 }

+ 17 - 0
src/views/pms/iotrydailyreport/approval.vue

@@ -980,6 +980,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.drillingWorkingTime"
             placeholder="进尺工作时间(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="其它生产时间(H)" prop="otherProductionTime">
@@ -989,6 +990,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.otherProductionTime"
             placeholder="其它生产时间(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
       </div>
@@ -1001,6 +1003,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.accidentTime"
             placeholder="请输入事故(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="修理(H)" prop="repairTime">
@@ -1010,6 +1013,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.repairTime"
             placeholder="请输入修理(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="自停(H)" prop="selfStopTime">
@@ -1019,6 +1023,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.selfStopTime"
             placeholder="请输入自停(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="复杂(H)" prop="complexityTime">
@@ -1028,6 +1033,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.complexityTime"
             placeholder="请输入复杂(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="搬迁(H)" prop="relocationTime">
@@ -1037,6 +1043,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.relocationTime"
             placeholder="请输入搬迁(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="整改(H)" prop="rectificationTime">
@@ -1046,6 +1053,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.rectificationTime"
             placeholder="请输入整改(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="等停(H)" prop="waitingStopTime">
@@ -1055,6 +1063,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.waitingStopTime"
             placeholder="请输入等停(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="冬休(H)" prop="winterBreakTime">
@@ -1064,6 +1073,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             v-model="form.winterBreakTime"
             placeholder="请输入冬休(H)"
             disabled
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
       </div>
@@ -1149,6 +1159,13 @@ const submitForm = async (auditStatus: 20 | 30) => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number) {
   width: 100%;
 }

+ 17 - 0
src/views/pms/iotrydailyreport/fill.vue

@@ -1019,6 +1019,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.drillingWorkingTime"
             placeholder="进尺工作时间(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="其它生产时间(H)" prop="otherProductionTime">
@@ -1027,6 +1028,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.otherProductionTime"
             placeholder="其它生产时间(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
       </div>
@@ -1038,6 +1040,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.accidentTime"
             placeholder="请输入事故(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="修理(H)" prop="repairTime">
@@ -1046,6 +1049,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.repairTime"
             placeholder="请输入修理(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="自停(H)" prop="selfStopTime">
@@ -1054,6 +1058,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.selfStopTime"
             placeholder="请输入自停(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="复杂(H)" prop="complexityTime">
@@ -1062,6 +1067,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.complexityTime"
             placeholder="请输入复杂(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="搬迁(H)" prop="relocationTime">
@@ -1070,6 +1076,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.relocationTime"
             placeholder="请输入搬迁(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="整改(H)" prop="rectificationTime">
@@ -1078,6 +1085,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.rectificationTime"
             placeholder="请输入整改(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="等停(H)" prop="waitingStopTime">
@@ -1086,6 +1094,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.waitingStopTime"
             placeholder="请输入等停(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
         <el-form-item label="冬休(H)" prop="winterBreakTime">
@@ -1094,6 +1103,7 @@ const submitForm = async () => {
             :min="0"
             v-model="form.winterBreakTime"
             placeholder="请输入冬休(H)"
+            :class="{ 'orange-input': sumTimes() !== 24 }"
           />
         </el-form-item>
       </div>
@@ -1154,6 +1164,13 @@ const submitForm = async () => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number) {
   width: 100%;
 }

+ 2 - 2
src/views/pms/iotrydailyreport/index.vue

@@ -399,7 +399,7 @@
                 resizable
               />
             </el-table-column>
-            <!-- <el-table-column label="操作" align="center" fixed="right">
+            <el-table-column label="操作" align="center" fixed="right">
               <template #default="scope">
                 <el-button
                   link
@@ -418,7 +418,7 @@
                   删除
                 </el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </div>
         <!-- 分页 -->

+ 10 - 0
src/views/pms/iotrydailyreport/xapproval.vue

@@ -842,6 +842,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             :min="0"
             v-model="form.ratedProductionTime"
             placeholder="请输入额定生产时间(H)"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             disabled
           />
         </el-form-item>
@@ -851,6 +852,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             :min="0"
             v-model="form.productionTime"
             placeholder="请输入生产时间(H)"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             disabled
           />
         </el-form-item>
@@ -860,6 +862,7 @@ const submitForm = async (auditStatus: 20 | 30) => {
             :min="0"
             v-model="form.nonProductionTime"
             placeholder="非生产时间(H)"
+            :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
             disabled
           />
         </el-form-item>
@@ -975,6 +978,13 @@ const submitForm = async (auditStatus: 20 | 30) => {
   }
 }
 
+:deep(.orange-input) {
+  .el-input__inner {
+    color: orange !important;
+    -webkit-text-fill-color: orange !important;
+  }
+}
+
 :deep(.el-input-number) {
   width: 100%;
 }

+ 6 - 0
src/views/pms/iotrydailyreport/xfill.vue

@@ -589,6 +589,12 @@ const submitForm = async () => {
   try {
     await formRef.value.validate()
     formLoading.value = true
+
+    const total = sumTimes()
+    if (total !== form.value.ratedProductionTime) {
+      message.error(`生产时间和非生产时间之和必须等于额定生产时间`)
+    }
+
     const { createTime, ...other } = form.value
 
     const data = { ...other, fillOrderCreateTime: createTime, projectClassification: '2' } as any

+ 2 - 2
src/views/pms/iotrydailyreport/xjindex.vue

@@ -358,7 +358,7 @@
               :min-width="columnWidths.leaveStaffNum.width"
               resizable
             />
-            <!-- <el-table-column label="操作" align="center" fixed="right">
+            <el-table-column label="操作" align="center" fixed="right">
               <template #default="scope">
                 <el-button
                   link
@@ -377,7 +377,7 @@
                   删除
                 </el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </div>
         <!-- 分页 -->