车间能级提升-智能设备管理系统
zhuguifei
2025-06-06 17aaffd6f60443a070f8f9aab29c6f53d44795de
eims-ui-mobile/src/pages/inspect/insp-record.vue
@@ -118,6 +118,22 @@
        </template>
      </wd-cell>
      <view class="w-full h-[1px] bg-base"></view>
      <wd-input
        label="运行时间"
        label-width="200rpx"
        clearable
        v-model="inspSt.runTimes"
        placeholder="请输入运行时间(h)"
        inputmode="numeric"
      />
      <wd-input
        label="故障时间"
        label-width="200rpx"
        clearable
        v-model="inspSt.faultTimes"
        placeholder="请输入故障时间(h)"
        inputmode="numeric"
      />
      <wd-textarea
        label="特记事项"
        label-width="200rpx"
@@ -136,7 +152,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store'
import { isLeader, isOperatorOrRepair } from "@/utils/RoleUtils";
import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils'
import {
  getInspStRecordList,
  getInspSt,
@@ -170,6 +186,8 @@
  status: string
  inspUser: number | string
  specialNote: string
  runTimes: number
  faultTimes: number
}
const dataChange = ref(false)
@@ -189,6 +207,8 @@
  status: '',
  inspUser: '',
  specialNote: '',
  runTimes: 0,
  faultTimes: 0,
})
const paging = ref(null)
@@ -263,10 +283,10 @@
  updateInspRecordBatch(params)
    .then((res: any) => {
      updateInspSt(resolve)
      toast.success('操作成功')
    })
    .catch((res) => {
      console.error(res)
      toast.error('操作失败')
    })
}
function updateInspSt(resolve: any) {
@@ -274,12 +294,14 @@
  inspSt.status = '1'
  updateInspectSt(inspSt)
    .then((res: any) => {
      toast.success('操作成功')
      paging.value.reload()
      uni.$emit('insp-st-refresh')
      resolve(true)
    })
    .catch((res) => {
      console.error(res)
      toast.error('操作失败')
    })
}