ソースを参照

设备详情加检测证书

yanghao 19 時間 前
コミット
c4dba4d326

+ 1 - 0
src/api/pms/iotmainworkorder/index.ts

@@ -24,6 +24,7 @@ export interface IotMainWorkOrderVO {
   status: number // 状态 0启用  1停用
   processInstanceId: string // 流程实例id
   auditStatus: number // 审批状态 未提交、审批中、审批通过、审批不通过、已取消
+  applicant: string // 申请人id
 }
 
 // 保养工单 API

+ 8 - 0
src/views/pms/iotmainworkorder/IotMainWorkOrderAdd.vue

@@ -15,6 +15,11 @@
               <lang-input v-model="formData.name" />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="填报人" prop="applicant">
+              <el-input v-model="formData.applicant" placeholder="请输入填报人" />
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item :label="t('mainPlan.MaintenanceMethod')" prop="type">
               <el-select
@@ -446,6 +451,7 @@ const formData = ref({
   id: undefined,
   deptId: undefined,
   name: '',
+  applicant: undefined,
   orderNumber: undefined,
   responsiblePerson: undefined,
   actualStartTime: undefined,
@@ -560,6 +566,7 @@ const getCurrentDeviceIds = (): number[] => {
 
 const formRules = reactive({
   name: [{ required: true, message: '工单名称不能为空', trigger: 'blur' }],
+  applicant: [{ required: true, message: '填报人不能为空', trigger: 'blur' }],
   actualStartTime: [
     {
       required: true,
@@ -1129,6 +1136,7 @@ const resetForm = () => {
     description: undefined,
     pic: undefined,
     remark: undefined,
+    applicant: undefined,
     deviceName: undefined,
     processInstanceId: undefined,
     auditStatus: undefined,

+ 8 - 0
src/views/pms/iotmainworkorder/IotMainWorkOrderDetail.vue

@@ -14,6 +14,11 @@
               <el-input type="text" v-model="formData.name" disabled />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="填报人" prop="applicant">
+              <el-input v-model="formData.applicant" placeholder="请输入填报人" disabled />
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item :label="t('mainPlan.MaintenanceMethod')" prop="type">
               <el-select
@@ -537,6 +542,7 @@ const formData = ref({
   id: undefined,
   deptId: undefined,
   name: '',
+  applicant: undefined,
   orderNumber: undefined,
   responsiblePerson: undefined,
   actualStartTime: undefined,
@@ -646,6 +652,7 @@ const inContent = async (attachment: any) => {
 }
 const formRules = reactive({
   name: [{ required: true, message: '工单名称不能为空', trigger: 'blur' }],
+  applicant: [{ required: true, message: '填报人不能为空', trigger: 'blur' }],
   responsiblePerson: [{ required: true, message: '责任人不能为空', trigger: 'blur' }]
 })
 const formRef = ref() // 表单 Ref
@@ -1033,6 +1040,7 @@ const resetForm = () => {
     description: undefined,
     pic: undefined,
     remark: undefined,
+    applicant: undefined,
     deviceName: undefined,
     processInstanceId: undefined,
     auditStatus: undefined,

+ 8 - 0
src/views/pms/iotmainworkorder/IotMainWorkOrderOptimize.vue

@@ -14,6 +14,11 @@
               <el-input type="text" v-model="formData.name" />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="填报人" prop="applicant">
+              <el-input v-model="formData.applicant" placeholder="请输入填报人" />
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item :label="t('mainPlan.MaintenanceMethod')" prop="type">
               <el-select
@@ -1098,6 +1103,7 @@ const formData = ref({
   id: undefined,
   deptId: undefined,
   name: '',
+  applicant: undefined,
   orderNumber: undefined,
   responsiblePerson: undefined,
   actualStartTime: undefined,
@@ -1209,6 +1215,7 @@ const inContent = async (attachment: any) => {
 
 const formRules = reactive({
   name: [{ required: true, message: '工单名称不能为空', trigger: 'blur' }],
+  applicant: [{ required: true, message: '填报人不能为空', trigger: 'blur' }],
   actualStartTime: [
     {
       required: true,
@@ -2821,6 +2828,7 @@ const resetForm = () => {
     description: undefined,
     pic: undefined,
     remark: undefined,
+    applicant: undefined,
     deviceName: undefined,
     processInstanceId: undefined,
     auditStatus: undefined,

+ 23 - 44
src/views/pms/iotmainworkorder/index.vue

@@ -273,8 +273,7 @@ onMounted(() => {
 
 <template>
   <div
-    class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
       :top-id="rootDeptId"
       :deptId="deptId"
@@ -283,16 +282,14 @@ onMounted(() => {
       :show-title="false"
       request-api="getSimpleDeptList"
       class="main-work-order-tree row-span-2"
-      @node-click="handleDeptNodeClick"
-    />
+      @node-click="handleDeptNodeClick" />
 
     <el-form
       ref="queryFormRef"
       :model="queryParams"
       size="default"
       label-width="68px"
-      class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
-    >
+      class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
       <div class="query-row">
         <el-form-item :label="t('bomList.name')" prop="name">
           <el-input
@@ -300,22 +297,19 @@ onMounted(() => {
             :placeholder="t('bomList.nHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('bomList.status')" prop="result">
           <el-select
             v-model="queryParams.result"
             :placeholder="t('bomList.status')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in resultOptions"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item :label="t('common.createTime')" prop="createTime" label-width="100px">
@@ -326,8 +320,7 @@ onMounted(() => {
             :start-placeholder="t('operationFill.start')"
             :end-placeholder="t('operationFill.end')"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="query-control query-control--date"
-          />
+            class="query-control query-control--date" />
         </el-form-item>
       </div>
 
@@ -342,8 +335,7 @@ onMounted(() => {
           type="primary"
           plain
           @click="openForm('create')"
-          v-hasPermi="['pms:iot-main-work-order:create']"
-        >
+          v-hasPermi="['pms:iot-main-work-order:create']">
           <Icon icon="ep:plus" class="mr-5px" />{{ t('operationFill.add') }}
         </el-button>
         <el-button
@@ -351,8 +343,7 @@ onMounted(() => {
           plain
           :loading="exportLoading"
           @click="handleExport"
-          v-hasPermi="['pms:iot-main-work-order:export']"
-        >
+          v-hasPermi="['pms:iot-main-work-order:export']">
           <Icon icon="ep:download" class="mr-5px" />导出
         </el-button>
       </el-form-item>
@@ -368,15 +359,13 @@ onMounted(() => {
               :width="width"
               :height="height"
               :max-height="height"
-              show-border
-            >
+              show-border>
               <ZmTableColumn
                 type="index"
                 :label="t('iotDevice.serial')"
                 :width="70"
                 fixed="left"
-                hide-in-column-settings
-              />
+                hide-in-column-settings />
               <ZmTableColumn prop="name" :label="t('bomList.name')" fixed="left" min-width="300" />
               <ZmTableColumn prop="deptName" :label="t('iotDevice.dept')" min-width="150" />
               <ZmTableColumn prop="result" :label="t('bomList.status')" width="120">
@@ -399,19 +388,18 @@ onMounted(() => {
               <ZmTableColumn
                 prop="responsiblePersonName"
                 :label="t('iotMaintain.PersonInCharge')"
-                min-width="150"
-              />
+                min-width="150" />
               <ZmTableColumn
                 prop="createTime"
                 :label="t('dict.createTime')"
                 :formatter="dateFormatter2"
-                width="180"
-              />
+                width="180" />
               <ZmTableColumn prop="updateTime" :label="t('dict.fillTime')" width="180">
                 <template #default="{ row }">
                   <span v-if="row.result == 2">{{ formatCellDate(row.updateTime) }}</span>
                 </template>
               </ZmTableColumn>
+              <ZmTableColumn prop="applicant" label="填报人" />
               <ZmTableColumn :label="t('iotMaintain.operation')" width="140" fixed="right" action>
                 <template #default="{ row }">
                   <el-button
@@ -419,8 +407,7 @@ onMounted(() => {
                     link
                     :type="getDelayReasonButtonType(row.delayReason)"
                     @click="openDelayReasonDialog(row)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('mainPlan.delayed') || '延时' }}
                   </el-button>
                   <el-button
@@ -428,16 +415,14 @@ onMounted(() => {
                     link
                     type="primary"
                     @click="openForm('update', row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('operationFill.fill') }}
                   </el-button>
                   <el-button
                     link
                     type="primary"
                     @click="detail(row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:query']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:query']">
                     {{ t('operationFill.view') }}
                   </el-button>
                   <el-button
@@ -445,8 +430,7 @@ onMounted(() => {
                     link
                     type="danger"
                     @click="handleBack(row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:back']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:back']">
                     {{ t('workOrderMaterial.back') }}
                   </el-button>
                   <el-button
@@ -459,8 +443,7 @@ onMounted(() => {
                     type="warning"
                     class="warning-btn"
                     @click="openModifyForm('modify', row.id)"
-                    v-hasPermi="['pms:iot-main-work-order:update']"
-                  >
+                    v-hasPermi="['pms:iot-main-work-order:update']">
                     {{ t('modelTemplate.update') }}
                   </el-button>
                 </template>
@@ -481,8 +464,7 @@ onMounted(() => {
           :total="total"
           layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+          @current-change="handleCurrentChange" />
       </div>
     </div>
   </div>
@@ -491,14 +473,12 @@ onMounted(() => {
     v-model="delayReasonDialogVisible"
     :title="t('workOrderMaterial.delayReason') || '延时原因'"
     width="500px"
-    :close-on-click-modal="false"
-  >
+    :close-on-click-modal="false">
     <el-form
       ref="delayReasonFormRef"
       :model="delayReasonForm"
       :rules="delayReasonRules"
-      label-width="0px"
-    >
+      label-width="0px">
       <el-form-item label=" " prop="delayReason" class="required-item" label-width="16px">
         <el-input
           v-model="delayReasonForm.delayReason"
@@ -506,8 +486,7 @@ onMounted(() => {
           :rows="4"
           :placeholder="t('workOrderMaterial.inputDelayReason') || '请输入延时原因'"
           maxlength="500"
-          show-word-limit
-        />
+          show-word-limit />
       </el-form-item>
     </el-form>
     <template #footer>