Sfoglia il codice sorgente

25年2月7日修复问题提交

pm 9 mesi fa
parent
commit
04f45cb59a

+ 1 - 1
src/router/index.js

@@ -294,7 +294,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/mes/material/standard/PropertyForm'),
         name: 'propertyForm',
         meta: {
-          title: '物资属性值'
+          title: '物资规格'
         },
       }
     ]

+ 56 - 0
src/views/mes/material/Lending/index.vue

@@ -0,0 +1,56 @@
+<template>
+  <div class="mapBox">
+    <div id="container" ref="container" style=""></div>
+  </div>
+</template>
+<script>
+import Konva from "konva";
+export default {
+  name: 'Lending',
+  data(){
+    return {
+      stage:null,
+      layer:null,
+      bgLayer:null,
+    }
+  },
+  mounted(){
+    this.$nextTick(() => {
+      this.initKonva()
+    })
+  },
+  methods:{
+    initKonva(){
+      this.stage=new Konva.Stage({
+        container:this.$refs.container,
+        width:1200,
+        height:1000,
+      })
+      this.bgLayer=new Konva.Layer()
+      const bgImage=new Image()
+      bgImage.src=require('@/assets/images/table.png');
+      bgImage.onLoad=()=>{
+        const KonvaImage=new Konva.Image({
+          x:100,
+          y:25,
+          image:bgImage,
+          width:500,
+          height:500,
+          draggable:false,
+        });
+        this.bgLayer.add(KonvaImage);
+        this.bgLayer.draw();
+      };
+      this.stage.add(this.bgLayer);
+
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+.mapBox {
+  width: 100%;
+  height: 100%;
+  background-color: #f5f5f5;
+}
+</style>

+ 24 - 6
src/views/mes/material/blacklist/index.vue

@@ -131,13 +131,13 @@
     <el-dialog :title="title" :visible.sync="open" width="1300px" append-to-body>
       <div>
         <el-row :gutter="24">
-          <el-col :span="12">
+          <el-col :span="11" style="margin-left: 20px">
             <!-- 穿梭框左边 -->
             <el-input v-model="searchQueryLeft" placeholder="请输入姓名" @input="searchQueryLeftInput" style="margin-bottom: 5px"></el-input>
             <el-table
               ref="multipleTable"
               :data="tableData1"
-              height="500"
+              height="486"
               tooltip-effect="dark"
               style="width: 100%"
               @select="checkLeft"
@@ -168,8 +168,9 @@
             </el-table>
             <pagination v-show="totalLeft>0" :total="totalLeft" :page.sync="currentLeft" :limit.sync="sizeLeft" @pagination="getOtherList"/>
           </el-col>
-          <el-col :span="2" class="el-btn-dialog">
+          <div style="width: 56px;height:100%;float: left">
             <el-button
+              style="margin-top: 25vh"
               @click="right"
               type="primary"
               :disabled="nowSelectData.length ? false : true"
@@ -186,13 +187,14 @@
               style="margin-left: 0;margin-top: 10px;"
             ></el-button
             >
-          </el-col>
-          <el-col :span="9">
+          </div>
+          <el-col :span="11">
             <!-- 穿梭框右边 -->
+            <el-input v-model="searchQueryRight" placeholder="请输入姓名" @input="searchQueryRightInput" style="margin-bottom: 5px"></el-input>
             <el-table
               ref="multipleTable"
               :data="tableData2"
-              height="540"
+              height="488"
               tooltip-effect="dark"
               style="width: 100%"
               @select="checkRight"
@@ -273,6 +275,7 @@ export default {
       // 日期选择
       tableData1: [],
       tableData2: [],
+      originalTableData2:[],//右侧原始数据
       nowSelectData: [], // 左边选中列表数据
       nowSelectRightData: [], // 右边选中列表数据
       searchQueryLeft:'',//左边查询
@@ -317,6 +320,21 @@ export default {
       this.queryParams.nickName = value
       this.getOtherList()
     },
+    searchQueryRightInput(value) {
+      console.log(value, '右侧数据筛选');
+      if (!this.originalTableData2.length) {
+        this.originalTableData2 = [...this.tableData2]; // 保存原始数据
+      }
+      if (value) {
+        this.tableData2 = this.originalTableData2.filter(item => {
+          return item.nickName.includes(value);
+        });
+      } else {
+        this.tableData2 = [...this.originalTableData2]; // 恢复原始数据
+      }
+      console.log(this.tableData2, '过滤筛选');
+    },
+
     // 取消按钮
     cancel() {
       this.open = false

+ 0 - 13
src/views/mes/material/lockers/Map.vue

@@ -1,13 +0,0 @@
-<template>
-
-</template>
-<script>
-export default {
-  name: 'Map'
-}
-</script>
-
-
-<style scoped lang="scss">
-
-</style>

+ 35 - 10
src/views/mes/material/materialinformation/index.vue

@@ -71,8 +71,8 @@
         >
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="状态" prop="loanState">
-        <el-select style="width: 215px" v-model="queryParams.loanState" placeholder="状态">
+      <el-form-item label="是否在柜中" prop="loanState">
+        <el-select style="width: 215px" v-model="queryParams.loanState" placeholder="是否在柜中">
           <el-option
             v-for="dict in dict.type.material_status"
             :key="dict.value"
@@ -81,8 +81,18 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="物资属性" prop="propertyId">
-        <el-select style="width: 200px" v-model="queryParams.propertyId" placeholder="请选择属性"
+      <el-form-item label="状态" prop="status">
+        <el-select style="width: 200px" v-model="queryParams.status" placeholder="物资状态">
+          <el-option
+            v-for="dict in dict.type.material_info_status"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="物资规格种类" prop="propertyId">
+        <el-select style="width: 215px" v-model="queryParams.propertyId" placeholder="请选择物资规格种类"
                    @change="handlePropertyChange"
         >
           <el-option
@@ -94,8 +104,8 @@
         </el-select>
       </el-form-item>
 
-      <el-form-item label="物资属性值" prop="recordId">
-        <el-select style="width: 215px" v-model="queryParams.recordId" placeholder="请选择属性值"
+      <el-form-item label="物资规格" prop="recordId">
+        <el-select style="width: 215px" v-model="queryParams.recordId" placeholder="请选择物资规格"
                    :disabled="!queryParams.propertyId"
         >
           <el-option
@@ -203,6 +213,11 @@
         align="center"
         prop="materialsTypeName"
       />
+      <el-table-column
+        label="物资规格种类"
+        align="center"
+        prop="propertiesProperty"
+      />
       <el-table-column
         label="物资规格"
         align="center"
@@ -240,11 +255,21 @@
           {{ scope.row.expirationDate }}
         </template>
       </el-table-column>
-      <el-table-column label="状态" align="center" prop="loanState">
+      <el-table-column label="是否在柜中" align="center" prop="loanState">
+        <template slot-scope="scope">
+<!--          <dict-tag-->
+<!--            :options="dict.type.material_status"-->
+<!--            :value="scope.row.loanState"-->
+<!--          />-->
+          <span v-if="scope.row.loanState=='0'">-</span>
+          <span v-if="scope.row.loanState=='1'">√</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
           <dict-tag
-            :options="dict.type.material_status"
-            :value="scope.row.loanState"
+            :options="dict.type.material_info_status"
+            :value="scope.row.status"
           />
         </template>
       </el-table-column>
@@ -569,7 +594,7 @@ export default {
       required: false
     }
   },
-  dicts: ['material_status'],
+  dicts: ['material_status','material_info_status'],
   data() {
     return {
       //自动生成编码

+ 13 - 13
src/views/mes/material/standard/PropertyForm.vue

@@ -8,19 +8,19 @@
       v-show="showSearch"
       label-width="100px"
     >
-      <el-form-item label="属性项" prop="propertyName">
+      <el-form-item label="物资规格种类" prop="propertyName">
         <el-input
           disabled
           v-model="queryParams.propertyName"
-          placeholder="请输入属性项"
+          placeholder="请输入物资规格种类"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="名称" prop="valueName">
+      <el-form-item label="物资规格" prop="valueName">
         <el-input
           v-model="queryParams.valueName"
-          placeholder="请输入名称"
+          placeholder="请输入物资规格"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -98,7 +98,7 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="编号" align="center" prop="recordId">
       </el-table-column>
-      <el-table-column label="名称" align="center" prop="valueName"/>
+      <el-table-column label="物资规格" align="center" prop="valueName"/>
       <el-table-column
         label="备注"
         align="center"
@@ -145,25 +145,25 @@
       @pagination="getList"
     />
     <!-- 添加或修改物资对话框 -->
-    <el-dialog :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :visible.sync="open" width="580px" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
-        <el-form-item label="属性编号" prop="propertyId">
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
+        <el-form-item label="物资规格种类编号" prop="propertyId">
           <el-input
             disabled
             style="width: 350px"
             v-model="form.propertyId"
-            placeholder="请输入属性编号"
+            placeholder="请输入物资规格种类"
           />
         </el-form-item>
-        <el-form-item label="名称" prop="valueName">
+        <el-form-item label="物资规格" prop="valueName">
           <el-input
             style="width: 350px"
             v-model="form.valueName"
-            placeholder="请输入名称"
+            placeholder="请输入物资规格"
           />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
@@ -316,7 +316,7 @@ export default {
       this.reset()
       this.open = true
       this.form.propertyId=this.$route.query.propertyId
-      this.title = '新增物资属性值'
+      this.title = '新增物资规格'
       this.optType = 'add'
     },
 
@@ -327,7 +327,7 @@ export default {
         console.log(response,'编辑')
         this.form = response.data
         this.open = true
-        this.title = '编辑物资属性值'
+        this.title = '编辑物资规格'
         this.optType = 'edit'
       })
     },

+ 10 - 10
src/views/mes/material/standard/index.vue

@@ -6,12 +6,12 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      label-width="140px"
     >
-      <el-form-item label="名称" prop="propertyName">
+      <el-form-item label="物资规格种类" prop="propertyName">
         <el-input
           v-model="queryParams.propertyName"
-          placeholder="请输入名称"
+          placeholder="请输入物资规格种类"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -80,7 +80,7 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="编号" align="center" prop="propertyId">
       </el-table-column>
-      <el-table-column label="名称" align="center" prop="propertyName"/>
+      <el-table-column label="物资规格种类" align="center" prop="propertyName"/>
       <el-table-column
         label="备注"
         align="center"
@@ -113,7 +113,7 @@
             icon="el-icon-view"
             @click="handleValue(scope.row)"
             v-hasPermi="['iscs:property:edit']"
-          >属性值
+          >规格设置
           </el-button>
           <el-button
             v-no-more-click
@@ -135,13 +135,13 @@
       @pagination="getList"
     />
     <!-- 添加或修改物资对话框 -->
-    <el-dialog :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :visible.sync="open" width="540px" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
-        <el-form-item label="名称" prop="propertyName">
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+        <el-form-item label="物资规格种类" prop="propertyName">
           <el-input
             style="width: 350px"
             v-model="form.propertyName"
@@ -295,7 +295,7 @@ export default {
     handleAdd() {
       this.reset()
       this.open = true
-      this.title = '新增物资属性项'
+      this.title = '新增物资规格种类'
       this.optType = 'add'
     },
 
@@ -305,7 +305,7 @@ export default {
       selectPropertyById(row.propertyId).then((response) => {
         this.form = response.data
         this.open = true
-        this.title = '编辑物资属性项'
+        this.title = '编辑物资规格种类'
         this.optType = 'edit'
       })
     },

+ 296 - 288
src/views/mes/material/typeofmaterial/index.vue

@@ -25,16 +25,16 @@
         />
       </el-form-item>
 
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="状态">
-          <el-option
-            v-for="dict in dict.type.material_type_status"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="状态" prop="status">-->
+<!--        <el-select v-model="queryParams.status" placeholder="状态">-->
+<!--          <el-option-->
+<!--            v-for="dict in dict.type.material_type_status"-->
+<!--            :key="dict.value"-->
+<!--            :label="dict.label"-->
+<!--            :value="dict.value"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
       <el-form-item style="margin-left: 50px">
         <el-button
           v-no-more-click
@@ -42,14 +42,16 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+        >搜索
+        </el-button
         >
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+        >重置
+        </el-button
         >
       </el-form-item>
     </el-form>
@@ -60,7 +62,8 @@
       icon="el-icon-plus"
       v-hasPermi="['mes:mat:type:add']"
       @click="handleAdd"
-      >新增</el-button
+    >新增
+    </el-button
     >
     <el-table
       v-loading="loading"
@@ -71,44 +74,42 @@
     >
       <el-table-column
         label="物资类型编码"
-        width="170px"
         align="center"
         prop="materialsTypeCode"
       />
       <el-table-column
         label="物资类型名称"
-        width="150px"
         align="center"
         prop="materialsTypeName"
         :show-overflow-tooltip="true"
       />
-      <el-table-column label="状态" align="center" prop="status"  >
-        <template slot-scope="scope">
-          <el-tag v-if="scope.row.status == 'y'">启用</el-tag>
-          <el-tag v-else type="danger">禁用</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="出借时长" align="center" prop="loanDuration" >
-        <template slot-scope="scope">
-          <span>{{ formattedTime(scope.row.loanDuration) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="提醒时间" align="center" prop="reminderTime">
-        <template slot-scope="scope">
-          <span>{{ formattedTime(scope.row.reminderTime) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="报警时间" align="center" prop="timeoutAlarm">
-        <template slot-scope="scope">
-          <span>{{ formattedTime(scope.row.timeoutAlarm) }}</span>
-        </template>
-      </el-table-column>
+<!--      <el-table-column label="状态" align="center" prop="status">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-tag v-if="scope.row.status == 'y'">启用</el-tag>-->
+<!--          <el-tag v-else type="danger">禁用</el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="出借时长" align="center" prop="loanDuration">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ formattedTime(scope.row.loanDuration) }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="提醒时间" align="center" prop="reminderTime">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ formattedTime(scope.row.reminderTime) }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="报警时间" align="center" prop="timeoutAlarm">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ formattedTime(scope.row.timeoutAlarm) }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column
         label="物资类型图标"
         prop="materialsTypeIcon"
       >
         <template slot-scope="scope">
-          <div  class="img-box" v-if="scope.row.materialsTypeIcon">
+          <div class="img-box" v-if="scope.row.materialsTypeIcon">
             <el-image
               style="width: 50px; height: 50px"
               :preview-teleported="true"
@@ -118,7 +119,8 @@
               :zoom-rate="1.2"
               :preview-src-list="[scope.row.materialsTypeIcon]"
               :initial-index="1"
-              fit="cover" >
+              fit="cover"
+            >
             </el-image>
             <i class="el-icon-zoom-in" id="eyeicon"></i>
           </div>
@@ -130,7 +132,7 @@
         prop="materialsTypePicture"
       >
         <template slot-scope="scope">
-          <div  class="img-box" v-if="scope.row.materialsTypePicture">
+          <div class="img-box" v-if="scope.row.materialsTypePicture">
             <el-image
               style="width: 50px; height: 50px"
               :preview-teleported="true"
@@ -140,7 +142,8 @@
               :zoom-rate="1.2"
               :preview-src-list="[scope.row.materialsTypePicture]"
               :initial-index="1"
-              fit="cover" >
+              fit="cover"
+            >
             </el-image>
             <i class="el-icon-zoom-in" id="eyeicon"></i>
           </div>
@@ -148,16 +151,16 @@
         </template>
       </el-table-column>
 
-      <el-table-column
-        label="是否需要归还"
-        align="center"
-        prop="restitutionRequired"
-      >
-        <template slot-scope="scope">
-          <el-tag v-if="scope.row.restitutionRequired == '1'">是</el-tag>
-          <el-tag v-else type="danger">否</el-tag>
-        </template>
-      </el-table-column>
+<!--      <el-table-column-->
+<!--        label="是否需要归还"-->
+<!--        align="center"-->
+<!--        prop="restitutionRequired"-->
+<!--      >-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-tag v-if="scope.row.restitutionRequired == '1'">是</el-tag>-->
+<!--          <el-tag v-else type="danger">否</el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column
         label="操作"
         align="center"
@@ -171,7 +174,8 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:mat:type:edit']"
-            >编辑</el-button
+          >编辑
+          </el-button
           >
           <el-button
             v-no-more-click
@@ -180,9 +184,10 @@
             icon="el-icon-plus"
             v-hasPermi="['mes:mat:type:add']"
             @click="handleAdd(scope.row)"
-            >新增</el-button
+          >新增
+          </el-button
           >
-<!--           v-if="scope.row.parentId != 0"-->
+          <!--           v-if="scope.row.parentId != 0"-->
           <el-button
             v-no-more-click
             size="mini"
@@ -190,7 +195,8 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:mat:type:remove']"
-            >删除</el-button
+          >删除
+          </el-button
           >
         </template>
       </el-table-column>
@@ -238,7 +244,7 @@
           />
         </el-form-item>
         <el-form-item label="物资规格" prop="propertyId">
-          <el-select style="width: 318px" v-model="form.propertyIds" placeholder="请选择规格" >
+          <el-select style="width: 318px" v-model="form.propertyIds" placeholder="请选择规格">
             <el-option
               v-for="property in PropertyList"
               :key="property.propertyId"
@@ -246,97 +252,6 @@
               :value="property.propertyId"
             />
           </el-select>
-        </el-form-item>
-         <el-form-item label="是否需要归还" prop="restitutionRequired">
-          <el-radio-group v-model="form.restitutionRequired" @change="changeLabel">
-             <el-radio :label="1">需要归还</el-radio>
-            <el-radio :label="2">不需要归还</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="借用时长" prop="loanDuration" v-if="this.form.restitutionRequired==1">
-          <div class="time-picker">
-            <div
-              class="time-unit"
-              v-for="(unit, index) in timeUnits"
-              :key="index"
-            >
-              <select
-                v-model="timeValues.loanDuration[unit.name]"
-                :id="unit.name"
-              >
-                <option
-                  v-for="option in unit.options"
-                  :key="option"
-                  :value="option"
-                >
-                  {{ option }}
-                </option>
-              </select>
-              <label :for="unit.name">{{ unit.label }}</label>
-            </div>
-          </div>
-        </el-form-item>
-        <el-form-item label="提醒设置" prop="reminderTime" v-if="this.form.restitutionRequired==1">
-          <div class="time-picker">
-            <div
-              class="time-unit"
-              v-for="(unit, index) in timeUnits"
-              :key="index"
-            >
-              <select
-                v-model="timeValues.reminderTime[unit.name]"
-                :id="unit.name"
-              >
-                <option
-                  v-for="option in unit.options"
-                  :key="option"
-                  :value="option"
-                >
-                  {{ option }}
-                </option>
-              </select>
-              <label :for="unit.name">{{ unit.label }}</label>
-            </div>
-          </div>
-        </el-form-item>
-        <el-form-item label="超时报警" prop="timeoutAlarm" v-if="this.form.restitutionRequired==1">
-          <div class="time-picker">
-            <div
-              class="time-unit"
-              v-for="(unit, index) in timeUnits"
-              :key="index"
-            >
-              <select
-                v-model="timeValues.timeoutAlarm[unit.name]"
-                :id="unit.name"
-              >
-                <option
-                  v-for="option in unit.options"
-                  :key="option"
-                  :value="option"
-                >
-                  {{ option }}
-                </option>
-              </select>
-              <label :for="unit.name">{{ unit.label }}</label>
-            </div>
-          </div>
-        </el-form-item>
-
-        <el-form-item label="状态" prop="status">
-          <el-radio-group v-model="form.status">
-            <el-radio :label="'y'">启用</el-radio>
-            <el-radio :label="'n'">禁用</el-radio>
-          </el-radio-group>
-        </el-form-item>
-
-        <el-form-item label="备注" prop="remark">
-          <el-input
-            v-model="form.remark"
-            type="textarea"
-            placeholder="请输入内容"
-            style="width: 420px"
-          />
         </el-form-item>
         <el-row>
           <el-col :span="10">
@@ -374,10 +289,100 @@
             />
           </el-form-item>
         </el-row>
+        <el-form-item label="备注" prop="remark">
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+            style="width: 420px"
+          />
+        </el-form-item>
+<!--        <el-form-item label="是否需要归还" prop="restitutionRequired">-->
+<!--          <el-radio-group v-model="form.restitutionRequired" @change="changeLabel">-->
+<!--            <el-radio :label="1">需要归还</el-radio>-->
+<!--            <el-radio :label="2">不需要归还</el-radio>-->
+<!--          </el-radio-group>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="借用时长" prop="loanDuration" v-if="this.form.restitutionRequired==1">-->
+<!--          <div class="time-picker">-->
+<!--            <div-->
+<!--              class="time-unit"-->
+<!--              v-for="(unit, index) in timeUnits"-->
+<!--              :key="index"-->
+<!--            >-->
+<!--              <select-->
+<!--                v-model="timeValues.loanDuration[unit.name]"-->
+<!--                :id="unit.name"-->
+<!--              >-->
+<!--                <option-->
+<!--                  v-for="option in unit.options"-->
+<!--                  :key="option"-->
+<!--                  :value="option"-->
+<!--                >-->
+<!--                  {{ option }}-->
+<!--                </option>-->
+<!--              </select>-->
+<!--              <label :for="unit.name">{{ unit.label }}</label>-->
+<!--            </div>-->
+<!--          </div>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="提醒设置" prop="reminderTime" v-if="this.form.restitutionRequired==1">-->
+<!--          <div class="time-picker">-->
+<!--            <div-->
+<!--              class="time-unit"-->
+<!--              v-for="(unit, index) in timeUnits"-->
+<!--              :key="index"-->
+<!--            >-->
+<!--              <select-->
+<!--                v-model="timeValues.reminderTime[unit.name]"-->
+<!--                :id="unit.name"-->
+<!--              >-->
+<!--                <option-->
+<!--                  v-for="option in unit.options"-->
+<!--                  :key="option"-->
+<!--                  :value="option"-->
+<!--                >-->
+<!--                  {{ option }}-->
+<!--                </option>-->
+<!--              </select>-->
+<!--              <label :for="unit.name">{{ unit.label }}</label>-->
+<!--            </div>-->
+<!--          </div>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="超时报警" prop="timeoutAlarm" v-if="this.form.restitutionRequired==1">-->
+<!--          <div class="time-picker">-->
+<!--            <div-->
+<!--              class="time-unit"-->
+<!--              v-for="(unit, index) in timeUnits"-->
+<!--              :key="index"-->
+<!--            >-->
+<!--              <select-->
+<!--                v-model="timeValues.timeoutAlarm[unit.name]"-->
+<!--                :id="unit.name"-->
+<!--              >-->
+<!--                <option-->
+<!--                  v-for="option in unit.options"-->
+<!--                  :key="option"-->
+<!--                  :value="option"-->
+<!--                >-->
+<!--                  {{ option }}-->
+<!--                </option>-->
+<!--              </select>-->
+<!--              <label :for="unit.name">{{ unit.label }}</label>-->
+<!--            </div>-->
+<!--          </div>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="状态" prop="status">-->
+<!--          <el-radio-group v-model="form.status">-->
+<!--            <el-radio :label="'y'">启用</el-radio>-->
+<!--            <el-radio :label="'n'">禁用</el-radio>-->
+<!--          </el-radio-group>-->
+<!--        </el-form-item>-->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-          >确 定</el-button
+        >确 定
+        </el-button
         >
         <el-button v-no-more-click @click="cancel">取 消</el-button>
       </div>
@@ -391,17 +396,18 @@ import {
   addMaterialsType,
   updateMaterialsType,
   selectMaterialsTypeById,
-  deleteMaterialsType,
-} from "@/api/mes/material/typeindex";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { genCode } from "@/api/system/autocode/rule";
+  deleteMaterialsType
+} from '@/api/mes/material/typeindex'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { genCode } from '@/api/system/autocode/rule'
 import { PropertyPage } from '@/api/mes/standard'
+
 export default {
-  name: "hardwareType",
-  dicts: ["material_type_status"],
+  name: 'hardwareType',
+  dicts: ['material_type_status'],
   components: {
-    Treeselect,
+    Treeselect
   },
   data() {
     return {
@@ -416,9 +422,9 @@ export default {
       machinerytypeList: [],
       // 设备类型树选项
       machinerytypeOptions: [],
-      PropertyList:[],//属性名 物资规格
+      PropertyList: [],//属性名 物资规格
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 总条数
@@ -428,14 +434,14 @@ export default {
         current: 1,
         size: -1,
         materialsTypeCode: null,
-        materialsTypeName: null,
+        materialsTypeName: null
       },
       // 表单参数
       form: {
         parentId: 0,
-        ancestors: "0",
+        ancestors: '0',
         restitutionRequired: 2, // 默认为 "不需要归还"
-        status: "y", // 默认为 "启用"
+        status: 'y' // 默认为 "启用"
       },
       EditId: null, //编辑传递id
       // 借用时长
@@ -444,98 +450,98 @@ export default {
           days: 0,
           hours: 0,
           minutes: 0,
-          seconds: 0,
+          seconds: 0
         },
         loanDuration: {
           days: 0,
           hours: 0,
           minutes: 0,
-          seconds: 0,
+          seconds: 0
         },
         timeoutAlarm: {
           days: 0,
           hours: 0,
           minutes: 0,
-          seconds: 0,
-        },
+          seconds: 0
+        }
       },
       timeUnits: [
         {
-          name: "days",
-          label: "天",
-          options: Array.from({ length: 31 }, (_, i) => i),
+          name: 'days',
+          label: '天',
+          options: Array.from({ length: 31 }, (_, i) => i)
         },
         {
-          name: "hours",
-          label: "时",
-          options: Array.from({ length: 24 }, (_, i) => i),
+          name: 'hours',
+          label: '时',
+          options: Array.from({ length: 24 }, (_, i) => i)
         },
         {
-          name: "minutes",
-          label: "分",
-          options: Array.from({ length: 60 }, (_, i) => i),
+          name: 'minutes',
+          label: '分',
+          options: Array.from({ length: 60 }, (_, i) => i)
         },
         {
-          name: "seconds",
-          label: "秒",
-          options: Array.from({ length: 60 }, (_, i) => i),
-        },
+          name: 'seconds',
+          label: '秒',
+          options: Array.from({ length: 60 }, (_, i) => i)
+        }
       ],
       // 表单校验
       rules: {
         materialsTypeCode: [
-          { required: true, message: "物资类型编码不能为空", trigger: "blur" },
+          { required: true, message: '物资类型编码不能为空', trigger: 'blur' }
         ],
         materialsTypeName: [
-          { required: true, message: "物资类型名称不能为空", trigger: "blur" },
-        ],
-      },
-    };
+          { required: true, message: '物资类型名称不能为空', trigger: 'blur' }
+        ]
+      }
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     /** 查询设备类型列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listType(this.queryParams).then((response) => {
-        console.log(response, "物资类型列表");
+        console.log(response, '物资类型列表')
         this.machinerytypeList = this.handleTree(
           response.data.records,
-          "materialsTypeId",
-          "parentId",
-          "children"
-        );
-        this.loading = false;
-        console.log(this.machinerytypeList, "machinerytypeList");
-      });
+          'materialsTypeId',
+          'parentId',
+          'children'
+        )
+        this.loading = false
+        console.log(this.machinerytypeList, 'machinerytypeList')
+      })
     },
     /** 转换数据结构 */
     normalizer(node) {
       if (node.children && !node.children.length) {
-        delete node.children;
+        delete node.children
       }
       return {
         id: node.materialsTypeId,
         label: node.materialsTypeName,
-        children: node.children,
-      };
+        children: node.children
+      }
     },
     /** 查询类型下拉树结构 */
     getTreeselect() {
       const data = {
         current: 1,
-        size: 99999,
-      };
+        size: 99999
+      }
       listType(data).then((response) => {
         this.machinerytypeOptions = this.handleTree(
           response.data.records,
-          "materialsTypeId",
-          "parentId",
-          "children"
-        );
-      });
+          'materialsTypeId',
+          'parentId',
+          'children'
+        )
+      })
       PropertyPage(data).then((response) => {
         console.log(response, '获取物资属性名 ')
         this.PropertyList = response.data.records
@@ -543,167 +549,168 @@ export default {
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
       this.form = {
-        status: "",
-        materialsTypeCode: "",
-        materialsTypeName: "",
-      };
-      this.resetForm("form");
+        status: '',
+        materialsTypeCode: '',
+        materialsTypeName: ''
+      }
+      this.resetForm('form')
       // 重置所有时间值
       const resetTimeValues = (timeObj) => {
-        timeObj.days = 0;
-        timeObj.hours = 0;
-        timeObj.minutes = 0;
-        timeObj.seconds = 0;
-      };
+        timeObj.days = 0
+        timeObj.hours = 0
+        timeObj.minutes = 0
+        timeObj.seconds = 0
+      }
 
-      resetTimeValues(this.timeValues.reminderTime);
-      resetTimeValues(this.timeValues.loanDuration);
-      resetTimeValues(this.timeValues.timeoutAlarm);
-      this.autoGenFlag = false;
+      resetTimeValues(this.timeValues.reminderTime)
+      resetTimeValues(this.timeValues.loanDuration)
+      resetTimeValues(this.timeValues.timeoutAlarm)
+      this.autoGenFlag = false
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.getList();
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 层级计数器函数
     handleChange(value) {
-      console.log(value);
+      console.log(value)
     },
     /** 新增按钮操作 */
     handleAdd(row) {
-      this.reset();
-      this.getTreeselect();
+      this.reset()
+      this.getTreeselect()
       if (row != null && row.materialsTypeId) {
-        this.form.parentId = row.materialsTypeId;
-        this.form.ancestors = row.ancestors + "," + row.materialsTypeId;
+        this.form.parentId = row.materialsTypeId
+        this.form.ancestors = row.ancestors + ',' + row.materialsTypeId
       } else {
-        this.form.parentId = null;
-        this.form.ancestors = 0;
+        this.form.parentId = null
+        this.form.ancestors = 0
       }
-      this.form.restitutionRequired = 2;
-      this.form.status = "y";
-      this.open = true;
-      this.title = "新增物资类型";
+      this.form.restitutionRequired = 2
+      this.form.status = 'y'
+      this.open = true
+      this.title = '新增物资类型'
     },
-    changeLabel(){
-this.$forceUpdate();
+    changeLabel() {
+      this.$forceUpdate()
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      console.log(row, row.materialsTypeId, "row");
-      this.reset();
-      this.getTreeselect();
+      console.log(row, row.materialsTypeId, 'row')
+      this.reset()
+      this.getTreeselect()
       if (row != null) {
-        this.form.parentId = row.materialsTypeId;
+        this.form.parentId = row.materialsTypeId
       }
 
       selectMaterialsTypeById(row.materialsTypeId).then((response) => {
-        this.form = response.data;
+        this.form = response.data
         if (this.form.parentId == 0) {
-          this.form.parentId = null;
+          this.form.parentId = null
         }
-        console.log(response.data.reminderTime, "修改");
+        console.log(response.data.reminderTime, '修改')
 
         const convertTime = (time) => ({
           days: Math.floor(time / (24 * 60 * 60)),
           hours: Math.floor((time % (24 * 60 * 60)) / (60 * 60)),
           minutes: Math.floor((time % (60 * 60)) / 60),
-          seconds: time % 60,
-        });
+          seconds: time % 60
+        })
 
-        this.timeValues.reminderTime = convertTime(response.data.reminderTime);
-        this.timeValues.loanDuration = convertTime(response.data.loanDuration);
-        this.timeValues.timeoutAlarm = convertTime(response.data.timeoutAlarm);
-        this.open = true;
-        this.title = "编辑物资类型";
-      });
+        this.timeValues.reminderTime = convertTime(response.data.reminderTime)
+        this.timeValues.loanDuration = convertTime(response.data.loanDuration)
+        this.timeValues.timeoutAlarm = convertTime(response.data.timeoutAlarm)
+        this.open = true
+        this.title = '编辑物资类型'
+      })
     },
     // 时间转换
     formattedTime(totalSeconds) {
-      const days = Math.floor(totalSeconds / (24 * 60 * 60));
-      const hours = Math.floor((totalSeconds % (24 * 60 * 60)) / (60 * 60));
-      const minutes = Math.floor((totalSeconds % (60 * 60)) / 60);
-      const seconds = totalSeconds % 60;
+      const days = Math.floor(totalSeconds / (24 * 60 * 60))
+      const hours = Math.floor((totalSeconds % (24 * 60 * 60)) / (60 * 60))
+      const minutes = Math.floor((totalSeconds % (60 * 60)) / 60)
+      const seconds = totalSeconds % 60
 
-      const parts = [];
-      if (days > 0) parts.push(`${days}天`);
-      if (hours > 0) parts.push(`${hours}小时`);
-      if (minutes > 0) parts.push(`${minutes}分钟`);
-      if (seconds > 0) parts.push(`${seconds}秒`);
+      const parts = []
+      if (days > 0) parts.push(`${days}天`)
+      if (hours > 0) parts.push(`${hours}小时`)
+      if (minutes > 0) parts.push(`${minutes}分钟`)
+      if (seconds > 0) parts.push(`${seconds}秒`)
 
-      return parts.join(" ");
+      return parts.join(' ')
     },
     /** 提交按钮 */
     submitForm() {
       const calculateTotalSeconds = ({ days, hours, minutes, seconds }) =>
-        ((days * 24 + hours) * 60 + minutes) * 60 + seconds;
+        ((days * 24 + hours) * 60 + minutes) * 60 + seconds
 
       this.form.reminderTime = calculateTotalSeconds(
         this.timeValues.reminderTime
-      );
+      )
       this.form.loanDuration = calculateTotalSeconds(
         this.timeValues.loanDuration
-      );
+      )
       this.form.timeoutAlarm = calculateTotalSeconds(
         this.timeValues.timeoutAlarm
-      );
+      )
 
-      this.$refs["form"].validate((valid) => {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
           if (this.form.materialsTypeId != null) {
             updateMaterialsType(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
           } else {
             if (this.form.parentId == null) {
-              this.form.parentId = 0;
+              this.form.parentId = 0
             }
             addMaterialsType(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
           }
         }
-      });
+      })
     },
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
-        genCode("MATERIALS_TYPE_CODE").then((response) => {
-          this.form.materialsTypeCode = response;
-        });
+        genCode('MATERIALS_TYPE_CODE').then((response) => {
+          this.form.materialsTypeCode = response
+        })
       } else {
-        this.form.materialsTypeCode = null;
+        this.form.materialsTypeCode = null
       }
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const materialsTypeIds = row.materialsTypeId;
-      const materialsTypeCodes = row.materialsTypeCode;
+      const materialsTypeIds = row.materialsTypeId
+      const materialsTypeCodes = row.materialsTypeCode
       this.$modal
         .confirm('是否删除编码为"' + materialsTypeCodes + '"的数据项?')
-        .then(function () {
-          return deleteMaterialsType(materialsTypeIds);
+        .then(function() {
+          return deleteMaterialsType(materialsTypeIds)
         })
         .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.getList()
+          this.$modal.msgSuccess('删除成功')
+        })
+        .catch(() => {
         })
-        .catch(() => {});
     },
     //图片上传成功
     handleImgUplaoded(imgUrl) {
@@ -720,9 +727,9 @@ this.$forceUpdate();
     // 图标移除
     handleIconRemoved(imgUrl) {
       this.form.materialsTypeIcon = null
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">
@@ -754,6 +761,7 @@ this.$forceUpdate();
     pointer-events: none
   }
 }
+
 .time-picker {
   display: flex;
   gap: 15px;