|
|
@@ -533,8 +533,6 @@ const sumTimes = () => {
|
|
|
|
|
|
const validateTotalTime = (_rule: any, _value: any, callback: any) => {
|
|
|
const total = sumTimes()
|
|
|
- console.log('total :>> ', total)
|
|
|
- console.log('form.value.ratedProductionTime :>> ', form.value.ratedProductionTime)
|
|
|
if (total !== form.value.ratedProductionTime) {
|
|
|
callback(new Error(`生产时间和非生产时间之和必须等于额定生产时间`))
|
|
|
} else {
|
|
|
@@ -550,7 +548,7 @@ const validateNptReason = (_rule: any, value: any, callback: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const timeRuleItem = [
|
|
|
+const _timeRuleItem = [
|
|
|
{ required: true, message: '请输入时间', trigger: 'blur' },
|
|
|
{ validator: validateTotalTime, trigger: 'blur' }
|
|
|
]
|
|
|
@@ -560,9 +558,9 @@ const rules = reactive<FormRules>({
|
|
|
productionStatus: [{ required: true, message: '请输入生产动态', trigger: ['change', 'blur'] }],
|
|
|
|
|
|
// 复用规则
|
|
|
- productionTime: timeRuleItem,
|
|
|
- nonProductionTime: timeRuleItem,
|
|
|
- ratedProductionTime: timeRuleItem,
|
|
|
+ // productionTime: timeRuleItem,
|
|
|
+ // nonProductionTime: timeRuleItem,
|
|
|
+ // ratedProductionTime: timeRuleItem,
|
|
|
|
|
|
ryNptReason: [{ validator: validateNptReason, trigger: ['change', 'blur'] }]
|
|
|
})
|
|
|
@@ -592,6 +590,7 @@ const submitForm = async () => {
|
|
|
await formRef.value.validate()
|
|
|
formLoading.value = true
|
|
|
const { createTime, ...other } = form.value
|
|
|
+
|
|
|
const data = { ...other, fillOrderCreateTime: createTime, projectClassification: '2' } as any
|
|
|
await IotRyDailyReportApi.createIotRyDailyReport(data)
|
|
|
message.success(t('common.updateSuccess'))
|
|
|
@@ -800,15 +799,15 @@ const submitForm = async () => {
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="运行时效" prop="transitTime">
|
|
|
+ <!-- <el-form-item label="运行时效" prop="transitTime">
|
|
|
<el-input
|
|
|
:model-value="transitTime.value"
|
|
|
placeholder="运行时效"
|
|
|
disabled
|
|
|
- :class="{ 'warning-input': transitTime.original > 1.2 }"
|
|
|
+ :class="{ 'warning-input': transitTime.original > 1.0 }"
|
|
|
id="transitTimeInput"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="井别" prop="wellCategory">
|
|
|
<el-input v-model="form.wellCategory" placeholder="" disabled />
|
|
|
</el-form-item>
|
|
|
@@ -853,6 +852,7 @@ const submitForm = async () => {
|
|
|
class="w-full!"
|
|
|
:min="0"
|
|
|
v-model="form.ratedProductionTime"
|
|
|
+ :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
|
|
|
placeholder="请输入额定生产时间(H)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
@@ -861,6 +861,7 @@ const submitForm = async () => {
|
|
|
class="w-full!"
|
|
|
:min="0"
|
|
|
v-model="form.productionTime"
|
|
|
+ :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
|
|
|
placeholder="请输入生产时间(H)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
@@ -869,6 +870,7 @@ const submitForm = async () => {
|
|
|
class="w-full!"
|
|
|
:min="0"
|
|
|
v-model="form.nonProductionTime"
|
|
|
+ :class="{ 'orange-input': sumTimes() !== Number(form.ratedProductionTime ?? 0) }"
|
|
|
placeholder="非生产时间(H)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
@@ -948,6 +950,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%;
|
|
|
}
|