Преглед изворни кода

feat(资产管理): 优化分类对话框搜索功能,支持编码/名称/固资编码多条件搜索并修复表格列显示

yusheng пре 5 месеци
родитељ
комит
788ff8ed56

+ 6 - 6
src/components/AssetDialog/categoryDialog.vue

@@ -17,9 +17,9 @@
     </template>
     <div class="search_wrapper">
       <el-input
-        v-model="code"
+        v-model="keyWord"
         class="search_input"
-        placeholder="请输入编码"
+        placeholder="编码/名称/固资编码"
       ></el-input>
       <el-button type="primary" @click="doSearch">搜索</el-button>
       <el-button type="primary" @click="reset">重置</el-button>
@@ -54,7 +54,7 @@
           @selection-change="selectItem"
           :header-cell-style="{ background: '#F0F3F3' }"
         >
-          <!-- <el-table-column prop="code" label="物品编码"></el-table-column> -->
+          <el-table-column prop="code" label="编码"></el-table-column>
           <el-table-column prop="name" label="物品名称"></el-table-column>
           <el-table-column prop="fixCode" label="固资编码"></el-table-column>
           <el-table-column prop="codeNumber" label="编号"></el-table-column>
@@ -127,7 +127,7 @@
       return {
         fullscreen: false,
         dialogVisible: false,
-        code: '',
+        keyWord: '',
         tableLoading: false,
         tableData: [],
         currentTreeData: {},
@@ -160,7 +160,7 @@
       },
 
       async reset() {
-        this.code = '';
+        this.keyWord = '';
         this._getClassificationList();
       },
 
@@ -192,7 +192,7 @@
           size: this.pageSize,
           categoryLevelId: this.currentTreeData.id,
           rootCategoryLevelId: this.rootId,
-          code: this.code
+          keyWord: this.keyWord
         };
         const res = await getAssetList(params);
         this.tableLoading = false;

+ 15 - 9
src/views/maintenance/repair/repairNotes/components/addDialog.vue

@@ -112,7 +112,11 @@
               />
             </el-form-item> -->
             <el-form-item
-             :label="clientEnvironmentId == '9'?'所在班组(科室):':'片区负责人部门:'"
+              :label="
+                clientEnvironmentId == '9'
+                  ? '所在班组(科室):'
+                  : '片区负责人部门:'
+              "
               prop="areaPersonInChargeGroupId"
             >
               <dept-select
@@ -135,7 +139,10 @@
             </el-form-item>
           </el-col> -->
           <el-col :span="12">
-            <el-form-item :label="clientEnvironmentId == '9'?'责任人':'片区负责人:'" prop="areaPersonInChargeUserId">
+            <el-form-item
+              :label="clientEnvironmentId == '9' ? '责任人' : '片区负责人:'"
+              prop="areaPersonInChargeUserId"
+            >
               <person-select
                 v-model="addForm.areaPersonInChargeUserId"
                 clearable
@@ -182,7 +189,6 @@
                 >
                 </el-option>
               </el-select>
-
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -343,9 +349,10 @@
         title: '新增',
         addRepairNotesDialog: false,
         addForm: {
-          leaderUserId: ''
+          leaderUserId: '',
+          faultType: [],
+          impact: []
         },
-        faultType: [],
         impact: [],
         initData: [],
 
@@ -382,10 +389,9 @@
     },
     created() {
       this.getUserList();
-
     },
     mounted() {
-            this.clientEnvironmentId =
+      this.clientEnvironmentId =
         this.$store.state.user.info.clientEnvironmentId;
     },
     methods: {
@@ -574,8 +580,8 @@
           repairGroupId: this.addForm.repairGroupId,
           repairGroupName: this.addForm.repairGroupName,
           repairUserName: this.addForm.repairUserName,
-          faultType: this.addForm.faultType.toString(),
-          impact: this.addForm.impact.toString()
+          faultType: this.addForm.faultType?.toString(),
+          impact: this.addForm.impact?.toString()
         };
         this.loading = true;
         if (this.row) {