From b9aa93af26450229b9a67ee78fc012107301e7a3 Mon Sep 17 00:00:00 2001
From: cuikaidong <ckd2942379034@163.com>
Date: 星期五, 29 八月 2025 15:46:57 +0800
Subject: [PATCH] 设备台账模块修改

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue     |   17 +++
 src/views/eam/equipment/modules/EamEquipmentFluidList.vue |   30 +++++++
 src/views/eam/equipment/EamEquipmentList.vue              |  165 +++++++++++++++++++++++++++++++++--------
 3 files changed, 176 insertions(+), 36 deletions(-)

diff --git a/src/views/eam/equipment/EamEquipmentList.vue b/src/views/eam/equipment/EamEquipmentList.vue
index ec10e87..9524814 100644
--- a/src/views/eam/equipment/EamEquipmentList.vue
+++ b/src/views/eam/equipment/EamEquipmentList.vue
@@ -96,7 +96,83 @@
                 </a-tree-select>
               </a-form-item>
             </a-col>
-
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+            <a-form-item label="鏈哄簥鍘傚">
+              <a-input
+                placeholder="璇疯緭鍏ユ満搴婂巶瀹�"
+                v-model="queryParam.manufacturingEnterprise"
+              ></a-input>
+            </a-form-item>
+            </a-col>
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+            <a-form-item label="鍘熷��(鍏�)">
+              <a-input
+                placeholder="璇疯緭鍏ュ師鍊�(鍏�)"
+                v-model="queryParam.originalValue"
+              ></a-input>
+            </a-form-item>
+            </a-col>
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+            <a-form-item label="鎬ц兘鎸囨爣">
+              <a-input
+                placeholder="璇疯緭鍏ユ�ц兘鎸囨爣"
+                v-model="queryParam.performanceIndicators"
+              ></a-input>
+            </a-form-item>
+            </a-col>
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+              <a-form-item label="鍑哄巶鏃ユ湡">
+                <a-range-picker v-model="leaveFactoryDate" value-format="YYYY-MM-DD HH:mm:ss"
+                                @change="leaveFactoryRangeChange"
+                                style="width: 100%"/>
+              </a-form-item>
+            </a-col>
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+              <a-form-item label="鎶曠敤鏃ユ湡">
+                <a-range-picker v-model="acceptanceCheckDate" value-format="YYYY-MM-DD"
+                                @change="acceptanceCheckRangeChange"
+                                style="width: 100%"/>
+              </a-form-item>
+            </a-col>
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+              <a-form-item label="璁惧鐢ㄩ��">
+                <j-dict-select-tag
+                  dict-code="equipment_use"
+                  placeholder="璇烽�夋嫨璁惧鐢ㄩ��"
+                  v-model="queryParam.equipmentUse"
+                ></j-dict-select-tag>
+              </a-form-item>
+            </a-col>
           </template>
           <a-col
             :xl="6"
@@ -451,16 +527,33 @@
           fixed: 'left'
         },
         {
-          title: '绠$悊鍒嗙被',
+          title: '璁惧鍨嬪彿',
           align: 'center',
-          width: 120,
-          dataIndex: 'equipmentImportance_dictText',
+          width: 200,
+          dataIndex: 'equipmentModel'
         },
         {
-          title: '鎶�鏈姸鎬�',
+          title: '鍑哄巶鏃ユ湡',
           align: 'center',
           width: 100,
-          dataIndex: 'technologyStatus_dictText'
+          dataIndex: 'leaveFactoryDate'
+        },
+        {
+          title: '鎶曠敤鏃ユ湡',
+          align: 'center',
+          width: 100,
+          dataIndex: 'acceptanceCheckDate'
+        },
+        {
+          title: '鍘熷��(鍏�)',
+          align: 'center',
+          dataIndex: 'originalValue'
+        },
+        {
+          title: '浣跨敤杞﹂棿',
+          align: 'center',
+          width: 100,
+          dataIndex: 'orgId_dictText'
         },
         {
           title: '璧勪骇浣跨敤鐘舵��',
@@ -481,13 +574,31 @@
           dataIndex: 'maintenanceStatus_dictText'
         },
         {
-          title: '浣跨敤杞﹂棿',
+          title: '璁惧鐢ㄩ��',
           align: 'center',
           width: 100,
-          dataIndex: 'orgId_dictText'
+          dataIndex: 'equipmentUse_dictText'
         },
         {
-          title: '璁惧绠$悊鍛�',
+          title: '鎿嶄綔宸�',
+          align: 'center',
+          width: 100,
+          dataIndex: 'operator'
+        },
+        {
+          title: '绠$悊鍒嗙被',
+          align: 'center',
+          width: 120,
+          dataIndex: 'equipmentImportance_dictText',
+        },
+        {
+          title: '鎶�鏈姸鎬�',
+          align: 'center',
+          width: 100,
+          dataIndex: 'technologyStatus_dictText'
+        },
+        {
+          title: '璁惧璐d换浜�',
           align: 'center',
           width: 100,
           dataIndex: 'equipmentManager_dictText'
@@ -501,12 +612,6 @@
           title: '璁惧绉嶇被',
           align: 'center',
           dataIndex: 'equipmentType_dictText'
-        },
-        {
-          title: '璁惧鍨嬪彿',
-          align: 'center',
-          width: 200,
-          dataIndex: 'equipmentModel'
         },
         {
           title: '璁惧瑙勬牸',
@@ -562,18 +667,6 @@
           dataIndex: 'supplier'
         },
         {
-          title: '鍑哄巶鏃ユ湡',
-          align: 'center',
-          width: 100,
-          dataIndex: 'leaveFactoryDate'
-        },
-        {
-          title: '鎶曠敤鏃ユ湡',
-          align: 'center',
-          width: 100,
-          dataIndex: 'acceptanceCheckDate'
-        },
-        {
           title: '鏈夋棤宸ヨ壓鍙傛暟',
           align: 'center',
           width: 120,
@@ -591,11 +684,6 @@
           title: '澶栧舰灏哄',
           align: 'center',
           dataIndex: 'overallDimensions'
-        },
-        {
-          title: '鍘熷��(鍏�)',
-          align: 'center',
-          dataIndex: 'originalValue'
         },
         {
           title: '璧勯噾鏉ユ簮',
@@ -671,6 +759,8 @@
       isOpenProcess: false,
       isOpenPrecision: false,
       treeDataAlias: [],
+      leaveFactoryDate: [],
+      acceptanceCheckDate: [],
     }
   },
   computed: {
@@ -683,6 +773,14 @@
     this.loadAppHomeUrlConfigValue()
   },
   methods: {
+    leaveFactoryRangeChange(valueArray) {
+      this.queryParam.leaveFactoryStartTime = valueArray[0]
+      this.queryParam.leaveFactoryEndTime = valueArray[1]
+    },
+    acceptanceCheckRangeChange(valueArray) {
+      this.queryParam.acceptanceCheckStartTime = valueArray[0]
+      this.queryParam.acceptanceCheckEndTime = valueArray[1]
+    },
     loadAllProductionTree() {
       //鍔犺浇杞﹂棿閫夋嫨鏍�
       getAction(this.url.loadProductionOptions).then(res => {
@@ -831,8 +929,9 @@
       }
       return newObj;
     },
-
     searchReset() {
+      this.leaveFactoryDate = []
+      this.acceptanceCheckDate = []
       this.queryParam = {}
       this.onClearSelected()
       this.loadTabPaneTableData('-1')
diff --git a/src/views/eam/equipment/modules/EamEquipmentFluidList.vue b/src/views/eam/equipment/modules/EamEquipmentFluidList.vue
index 9ec6631..e022d2a 100644
--- a/src/views/eam/equipment/modules/EamEquipmentFluidList.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentFluidList.vue
@@ -25,6 +25,27 @@
       <vxe-table-column title="娌规恫鍚嶇О" field="fluidId" align="center"
                         :edit-render="{name : '$select', options: fluidList, optionProps: {label:'fluidName', value:'id'}, props: {clearable:true}, events: {change:handleParamSelectChange}}"></vxe-table-column>
       <vxe-table-column title="鍙傛暟缂栫爜" field="fluidCode" align="center"></vxe-table-column>
+      <vxe-table-column title="浣跨敤鏁伴噺" field="usageQuantity" align="center"
+                        :edit-render="{name: '$input',props: {type: 'number',min: 0,step: 1,precision: 0 }}"></vxe-table-column>
+      <vxe-table-column title="鍔犲叆閮ㄤ綅" field="additionSite" align="center" :edit-render="{name : '$input'}"></vxe-table-column>
+      <vxe-table-column
+        title="鏃堕棿"
+        field="oilTime"
+        align="center"
+        :edit-render="{
+    name: 'ADatePicker',
+    props: {
+      type: 'datetime',
+      format: 'YYYY-MM-DD HH:mm:ss',
+      valueFormat: 'YYYY-MM-DD HH:mm:ss'
+    },
+    events: {
+      change: (value, context) => {
+        context.row.oilTime = value
+      }
+    }
+  }":formatter="formatDate"
+      ></vxe-table-column>
       <vxe-table-column title="鎿嶄綔" width="160">
         <template v-slot="{row}">
           <template v-if="hasEditStatus(row)">
@@ -93,6 +114,15 @@
     this.loadFluidList()
   },
   methods: {
+    formatDate({ cellValue }) {
+      // 妫�鏌ユ槸鍚︿负鏈夋晥鐨勬棩鏈熷璞�
+      if (cellValue && (cellValue instanceof Date || !isNaN(Date.parse(cellValue)))) {
+        const date = cellValue instanceof Date ? cellValue : new Date(cellValue);
+        // 鎵嬪姩鏍煎紡鍖栨棩鏈�
+        return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`;
+      }
+      return cellValue; // 闈炴棩鏈熺被鍨嬬洿鎺ヨ繑鍥炲師鍊�
+    },
     handleParamSelectChange($event, value) {
       console.log(value)
       let parameter = this.fluidList.find(item => item.id === value.value)
diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 2e3b087..79a6881 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -127,6 +127,17 @@
                                  disabled/>
             </a-form-model-item>
           </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="equipmentUse" label="璁惧鐢ㄩ��">
+              <j-dict-select-tag dict-code="equipment_use" v-model="model.equipmentUse"
+                                 placeholder="璇烽�夋嫨璁惧鐢ㄩ��" :disabled="disableSubmit"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="operator" label="鎿嶄綔宸�">
+              <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ搷浣滃伐'" v-model="model.operator" :disabled="disableSubmit"/>
+            </a-form-model-item>
+          </a-col>
         </a-row>
 
         <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍑哄巶淇℃伅
@@ -197,8 +208,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item prop="equipmentManager" label="璁惧绠$悊鍛�">
-              <j-search-select-tag  placeholder="璇烽�夋嫨璁惧绠$悊鍛�" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0 and post='PCR0004' and status=1" :disabled="disableSubmit"/>
+            <a-form-model-item prop="equipmentManager" label="璁惧璐d换浜�">
+              <j-search-select-tag  placeholder="璇烽�夋嫨璁惧璐d换浜�" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0 and post='PCR0004' and status=1" :disabled="disableSubmit"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
@@ -280,7 +291,7 @@
           { required: true, message: '璇烽�夋嫨浣跨敤杞﹂棿' }
         ],
         equipmentManager: [
-          { required: true, message: '璇烽�夋嫨璁惧绠$悊鍛�' }
+          { required: true, message: '璇烽�夋嫨璁惧璐d换浜�' }
         ],
         deviceType: [
           { required: false, message: '璇烽�夋嫨璁惧绫诲瀷' }

--
Gitblit v1.9.3