Эх сурвалжийг харах

物资柜的新增和编辑好了查询还差点

pm 11 сар өмнө
parent
commit
21ea04ef1b

+ 2 - 2
src/api/mes/material/lockers.js

@@ -32,7 +32,7 @@ export function updateMaterialsCabinet(data) {
 // 删除物资柜 /dev-api/iscs/cabinet/deleteIsMaterialsCabinetByCabinetIds
 // 删除物资柜 /dev-api/iscs/cabinet/deleteIsMaterialsCabinetByCabinetIds
 export function deleteMaterialsCabinet(data) {
 export function deleteMaterialsCabinet(data) {
     return request({
     return request({
-        url: '/dev-api/iscs/cabinet/deleteIsMaterialsCabinetByCabinetIds?cabinetIds=' + data,
+        url: '/iscs/cabinet/deleteIsMaterialsCabinetByCabinetIds?cabinetIds=' + data,
         method: 'post',
         method: 'post',
     })
     })
 }
 }
@@ -43,4 +43,4 @@ export function selectMaterialsCabinetById(query) {
         url: '/iscs/cabinet/selectIsMaterialsCabinetById?cabinetId=' + query,
         url: '/iscs/cabinet/selectIsMaterialsCabinetById?cabinetId=' + query,
         method: 'get',
         method: 'get',
     })
     })
-}
+}

+ 229 - 282
src/views/mes/material/lockers/index.vue

@@ -24,51 +24,7 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <!-- <el-form-item label="物资状态" prop="loanState">
-        <el-select v-model="queryParams.loanState" placeholder="状态">
-          <el-option
-            v-for="dict in dict.type.material_status"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="物资类型" prop="materialsTypeId">
-        <treeselect
-          style="width: 318px"
-          v-model="queryParams.materialsTypeId"
-          :options="machinerytypeOptions"
-          :normalizer="normalizer"
-          placeholder="请选择物资类型"
-        />
-      </el-form-item>
-      <el-form-item label="启用时间" prop="createTime">
-        <el-date-picker
-          v-model="createTime"
-          type="datetimerange"
-          :picker-options="pickerOptions"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          align="right"
-        >
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="所属柜" prop="materialsCabinetId">
-        <el-select
-          style="width: 348px"
-          v-model="queryParams.materialsCabinetId"
-          placeholder="请选择所属柜"
-        >
-          <el-option
-            v-for="dict in cabinets"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item> -->
+
 
 
       <el-form-item>
       <el-form-item>
         <el-button
         <el-button
@@ -77,14 +33,16 @@
           icon="el-icon-search"
           icon="el-icon-search"
           size="mini"
           size="mini"
           @click="handleQuery"
           @click="handleQuery"
-          >搜索</el-button
+        >搜索
+        </el-button
         >
         >
         <el-button
         <el-button
           v-no-more-click
           v-no-more-click
           icon="el-icon-refresh"
           icon="el-icon-refresh"
           size="mini"
           size="mini"
           @click="resetQuery"
           @click="resetQuery"
-          >重置</el-button
+        >重置
+        </el-button
         >
         >
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
@@ -99,7 +57,7 @@
           size="mini"
           size="mini"
           @click="handleAdd"
           @click="handleAdd"
           v-hasPermi="['iscs:cabinet:add']"
           v-hasPermi="['iscs:cabinet:add']"
-          >新增
+        >新增
         </el-button>
         </el-button>
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
@@ -112,7 +70,7 @@
           :disabled="multiple"
           :disabled="multiple"
           @click="handleDelete"
           @click="handleDelete"
           v-hasPermi="['mes:mat:info:batchremove']"
           v-hasPermi="['mes:mat:info:batchremove']"
-          >批量删除
+        >批量删除
         </el-button>
         </el-button>
       </el-col>
       </el-col>
       <right-toolbar
       <right-toolbar
@@ -126,23 +84,22 @@
       :data="materialsList"
       :data="materialsList"
       @selection-change="handleSelectionChange"
       @selection-change="handleSelectionChange"
     >
     >
-      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="物资柜编码" align="center" prop="cabinetCode">
       <el-table-column label="物资柜编码" align="center" prop="cabinetCode">
       </el-table-column>
       </el-table-column>
-      <el-table-column label="物资柜名称" align="center" prop="cabinetName" />
-      <!-- <el-table-column
-        label="物资类型"
+      <el-table-column label="物资柜名称" align="center" prop="cabinetName"/>
+      <el-table-column
+        label="硬件名称"
         align="center"
         align="center"
-        prop="materialsTypeName"
-      /> -->
-      <!-- <el-table-column label="所属柜" align="center" prop="cabinetName" /> -->
-      <!-- <el-table-column label="物资状态" align="center" prop="loanState">
-        <template slot-scope="scope">
-          <span>{{ scope.row.loanState == 0 ? "借出" : "柜中" }}</span>
-        </template>
-      </el-table-column> -->
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="更新时间" align="center" prop="updateTime" />
+        prop="hardwareName"
+      />
+      <el-table-column
+        label="工作区域"
+        align="center"
+        prop="workareaName"
+      />
+      <el-table-column label="创建时间" align="center" prop="createTime"/>
+      <el-table-column label="更新时间" align="center" prop="updateTime"/>
 
 
       <el-table-column
       <el-table-column
         label="操作"
         label="操作"
@@ -157,7 +114,7 @@
             icon="el-icon-edit"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['iscs:cabinet:edit']"
             v-hasPermi="['iscs:cabinet:edit']"
-            >编辑
+          >编辑
           </el-button>
           </el-button>
           <el-button
           <el-button
             v-no-more-click
             v-no-more-click
@@ -166,7 +123,7 @@
             icon="el-icon-delete"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             @click="handleDelete(scope.row)"
             v-hasPermi="['iscs:cabinet:remove']"
             v-hasPermi="['iscs:cabinet:remove']"
-            >删除
+          >删除
           </el-button>
           </el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
@@ -179,74 +136,64 @@
       @pagination="getList"
       @pagination="getList"
     />
     />
     <!-- 添加或修改班组对话框 -->
     <!-- 添加或修改班组对话框 -->
-    <el-dialog :visible.sync="open" width="960px" append-to-body>
+    <el-dialog :visible.sync="open" width="510px" append-to-body>
       <div slot="title" class="dialog-title">
       <div slot="title" class="dialog-title">
         <i></i>
         <i></i>
         <span class="title">{{ title }}</span>
         <span class="title">{{ title }}</span>
       </div>
       </div>
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="物资柜编码" prop="cabinetCode">
-              <el-input
-                v-model="form.cabinetCode"
-                placeholder="请输入物资柜编码"
-                style="width: 200px; margin-right: 10px"
-              />
-              <el-switch
-                v-model="autoGenFlag"
-                active-color="#13ce66"
-                active-text="自动生成"
-                @change="handleAutoGenChange(autoGenFlag)"
-              >
-              </el-switch>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="硬件名称" prop="hardwareId">
-              <el-select
-                style="width: 348px"
-                v-model="form.workareaId"
-                placeholder="请选择硬件名称"
-                clearable
-              >
-                <el-option
-                  v-for="dict in this.hardWareList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="物资柜名称" prop="cabinetName">
-              <el-input
-                v-model="form.cabinetName"
-                placeholder="请输入物资柜名称"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="区域名称" prop="workareaId">
-              <treeselect
-                style="width: 350px"
-                v-model="form.workareaId"
-                :options="workareaOptions"
-                :normalizer="normalizer"
-                placeholder="选择区域名称"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
+        <el-form-item label="物资柜编码" prop="cabinetCode">
+          <el-input
+            v-model="form.cabinetCode"
+            placeholder="请输入物资柜编码"
+            style="width: 200px; margin-right: 10px"
+          />
+          <el-switch
+            v-model="autoGenFlag"
+            active-color="#13ce66"
+            active-text="自动生成"
+            @change="handleAutoGenChange(autoGenFlag)"
+          >
+          </el-switch>
+        </el-form-item>
+        <el-form-item label="物资柜名称" prop="cabinetName">
+          <el-input
+            style="width: 348px"
+            v-model="form.cabinetName"
+            placeholder="请输入物资柜名称"
+          />
+        </el-form-item>
+        <el-form-item label="硬件名称" prop="hardwareId">
+          <el-select
+            style="width: 348px"
+            v-model="form.hardwareId"
+            placeholder="请选择硬件名称"
+            clearable
+          >
+            <el-option
+              v-for="dict in this.hardWareList"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="工作区域" prop="workareaId">
+          <treeselect
+            style="width: 348px"
+            v-model="form.workareaId"
+            :options="workareaOptions"
+            :normalizer="normalizer"
+            placeholder="选择工作区域"
+          />
+        </el-form-item>
+
         <el-form-item label="备注" prop="remark">
         <el-form-item label="备注" prop="remark">
           <el-input
           <el-input
             v-model="form.remark"
             v-model="form.remark"
             type="textarea"
             type="textarea"
             placeholder="请输入内容"
             placeholder="请输入内容"
-            style="width: 420px"
+            style="width: 348px"
           />
           />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
@@ -257,10 +204,12 @@
           type="primary"
           type="primary"
           @click="cancel"
           @click="cancel"
           v-if="optType == 'view'"
           v-if="optType == 'view'"
-          >返回</el-button
+        >返回
+        </el-button
         >
         >
         <el-button v-no-more-click type="primary" @click="submitForm" v-else
         <el-button v-no-more-click type="primary" @click="submitForm" v-else
-          >确 定</el-button
+        >确 定
+        </el-button
         >
         >
         <el-button v-no-more-click @click="cancel">取 消</el-button>
         <el-button v-no-more-click @click="cancel">取 消</el-button>
       </div>
       </div>
@@ -274,23 +223,23 @@ import {
   addMaterialsCabinet,
   addMaterialsCabinet,
   updateMaterialsCabinet,
   updateMaterialsCabinet,
   deleteMaterialsCabinet,
   deleteMaterialsCabinet,
-  selectMaterialsCabinetById,
-} from "@/api/mes/material/lockers.js";
+  selectMaterialsCabinetById
+} from '@/api/mes/material/lockers.js'
 import {
 import {
   listWorkarea
   listWorkarea
-} from "@/api/mes/wa/workarea";
-import { listType } from "@/api/mes/material/typeindex";
-import { listHardware } from "@/api/mes/hw/hardwareinfo";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { genCode } from "@/api/system/autocode/rule";
+} from '@/api/mes/wa/workarea'
+import { listType } from '@/api/mes/material/typeindex'
+import { listHardware } from '@/api/mes/hw/hardwareinfo'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { genCode } from '@/api/system/autocode/rule'
 
 
 export default {
 export default {
-  name: "Team",
+  name: 'Team',
   components: {
   components: {
-    Treeselect,
+    Treeselect
   },
   },
-  dicts: ["material_status"],
+  dicts: ['material_status'],
   data() {
   data() {
     return {
     return {
       //自动生成编码
       //自动生成编码
@@ -312,83 +261,93 @@ export default {
       // 班组表格数据
       // 班组表格数据
       materialsList: [],
       materialsList: [],
       // 弹出层标题
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       // 是否显示弹出层
       open: false,
       open: false,
 
 
       // 查询参数
       // 查询参数
-      createTime: "",
+      createTime: '',
       queryParams: {
       queryParams: {
         pages: 1,
         pages: 1,
         size: 10,
         size: 10,
         cabinetCode: null,
         cabinetCode: null,
-        cabinetName: null,
+        cabinetName: null
       },
       },
       hardWareList: [],
       hardWareList: [],
       queryhwParams: {
       queryhwParams: {
         current: 1,
         current: 1,
-        size: -1,
+        size: -1
       },
       },
       // 查询参数
       // 查询参数
       queryParamsCabinets: {
       queryParamsCabinets: {
         current: 1,
         current: 1,
-        size: -1,
+        size: -1
       },
       },
       pickerOptions: {
       pickerOptions: {
         shortcuts: [
         shortcuts: [
           {
           {
-            text: "最近一周",
+            text: '最近一周',
             onClick(picker) {
             onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit("pick", [start, end]);
-            },
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
           },
           },
           {
           {
-            text: "最近一个月",
+            text: '最近一个月',
             onClick(picker) {
             onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
           },
           },
           {
           {
-            text: "最近三个月",
+            text: '最近三个月',
             onClick(picker) {
             onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }
+        ]
       },
       },
 
 
       // 表单参数
       // 表单参数
       form: {},
       form: {},
-      cabinets: [], //物资所属柜
+
       // 表单校验
       // 表单校验
       rules: {
       rules: {
         cabinetCode: [
         cabinetCode: [
-          { required: true, message: "物资柜编码不能为空", trigger: "blur" },
+          { required: true, message: '物资柜编码不能为空', trigger: 'blur' }
         ],
         ],
         cabinetName: [
         cabinetName: [
-          { required: true, message: "物资柜名称不能为空", trigger: "blur" },
+          { required: true, message: '物资柜名称不能为空', trigger: 'blur' }
         ],
         ],
+        hardwareId:[
+          {
+            require:true,message:'硬件名称不能为空',trigger:'blur'
+          }
+        ],
+        workareaId:[
+          {
+            require:true,message:'工作区域不能为空',trigger:'blur'
+          }
+        ]
       },
       },
 
 
-      workareaOptions: [],
-    };
+      workareaOptions: []
+    }
   },
   },
   created() {
   created() {
-    this.getList();
-    this.getHardWare();
-    this.getTreeselect();
+    this.getList()
+    this.getHardWare()
+    this.getTreeselect()
   },
   },
   mounted() {
   mounted() {
-    this.materialsCabinets();
+    this.materialsCabinets()
   },
   },
   methods: {
   methods: {
     getHardWare() {
     getHardWare() {
@@ -396,39 +355,45 @@ export default {
         this.hardWareList = response.data.records.map((item) => {
         this.hardWareList = response.data.records.map((item) => {
           return {
           return {
             value: item.id,
             value: item.id,
-            label: item.hardwareName,
-          };
-        });
+            label: item.hardwareName
+          }
+        })
+        // console.log(response, this.hardWareList, '获取硬件信息')
+      })
+      listWorkarea(this.queryParams).then((response) => {
+        debugger;
+        var depts = this.handleTree(response.data.records, 'workareaId')
 
 
-        console.log(response, this.hardWareList, "获取硬件信息");
-      });
+        this.workareaOptions = depts
+        this.loading = false
+      })
     },
     },
     /** 转换数据结构 */
     /** 转换数据结构 */
     normalizer(node) {
     normalizer(node) {
       if (node.children && !node.children.length) {
       if (node.children && !node.children.length) {
-        delete node.children;
+        delete node.children
       }
       }
       return {
       return {
-        id: node.materialsTypeId,
-        label: node.materialsTypeName,
-        children: node.children,
-      };
+        id: node.workareaId,
+        label: node.workareaName,
+        children: node.children
+      }
     },
     },
     /** 查询物资类型下拉树结构 */
     /** 查询物资类型下拉树结构 */
     getTreeselect() {
     getTreeselect() {
       const data = {
       const data = {
         current: 1,
         current: 1,
-        size: 99999,
-      };
+        size: 99999
+      }
 
 
       listType(data).then((response) => {
       listType(data).then((response) => {
         this.machinerytypeOptions = this.handleTree(
         this.machinerytypeOptions = this.handleTree(
           response.data.records,
           response.data.records,
-          "materialsTypeId",
-          "parentId",
-          "children"
-        );
-      });
+          'materialsTypeId',
+          'parentId',
+          'children'
+        )
+      })
     },
     },
     // 格式化日期查询数据
     // 格式化日期查询数据
     formatDate(date) {
     formatDate(date) {
@@ -436,168 +401,150 @@ export default {
         // 使用本地时间
         // 使用本地时间
         return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
         return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
           2,
           2,
-          "0"
-        )}-${String(date.getDate()).padStart(2, "0")}`;
+          '0'
+        )}-${String(date.getDate()).padStart(2, '0')}`
       }
       }
-      return null;
+      return null
     },
     },
     /** 查询物资信息列表 */
     /** 查询物资信息列表 */
     getList() {
     getList() {
-      this.loading = true;
+      this.loading = true
       // 格式化日期并更新 queryParams
       // 格式化日期并更新 queryParams
       if (Array.isArray(this.createTime) && this.createTime.length === 2) {
       if (Array.isArray(this.createTime) && this.createTime.length === 2) {
-        this.queryParams.startTime = this.formatDate(this.createTime[0]);
-        this.queryParams.endTime = this.formatDate(this.createTime[1]);
+        this.queryParams.startTime = this.formatDate(this.createTime[0])
+        this.queryParams.endTime = this.formatDate(this.createTime[1])
       }
       }
-
       getMaterialsCabinet(this.queryParams).then((response) => {
       getMaterialsCabinet(this.queryParams).then((response) => {
         // console.log(response, "获取物资信息allList ");
         // console.log(response, "获取物资信息allList ");
-        this.materialsList = response.data.records;
-        this.total = response.data.total;
+        this.materialsList = response.data.records
+        this.total = response.data.total
         this.machinerytypeList = this.handleTree(
         this.machinerytypeList = this.handleTree(
           response.data.records,
           response.data.records,
-          "materialsTypeId",
-          "parentId",
-          "children"
-        );
-        this.loading = false;
-      });
-    },
-    //图片上传成功
-    handleImgUplaoded(imgUrl) {
-      this.form.sipUrl = imgUrl;
-    },
-    //图片移除
-    handleImgRemoved(imgUrl) {
-      this.form.sipUrl = null;
+          'cabinetId',
+          'parentId',
+          'children'
+        )
+        this.loading = false
+      })
     },
     },
+
     // 取消按钮
     // 取消按钮
     cancel() {
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     },
     // 表单重置
     // 表单重置
     reset() {
     reset() {
       this.form = {
       this.form = {
-        cabinetCode: "",
-        cabinetName: "",
-      };
-      this.resetForm("form");
-      this.autoGenFlag = false;
+        cabinetCode: '',
+        cabinetName: ''
+      }
+      this.resetForm('form')
+      this.autoGenFlag = false
     },
     },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
     handleQuery() {
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pages = 1
+      this.getList()
     },
     },
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
-      this.createTime = "";
-      this.queryParams.cabinetCode = null;
-      this.queryParams.cabinetName = null;
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.createTime = ''
+      this.queryParams.cabinetCode = null
+      this.queryParams.cabinetName = null
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     },
     // 多选框选中数据
     // 多选框选中数据
     handleSelectionChange(selection) {
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.materialsId);
-      this.codes = selection.map((item) => item.cabinetCode);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
+      this.ids = selection.map((item) => item.cabinetId)
+      this.codes = selection.map((item) => item.cabinetCode)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
     },
     },
 
 
-    // 物资所属柜
-    materialsCabinets() {
-      getIsMaterialsCabinets(this.queryParamsCabinets).then((response) => {
-        if (response?.data?.records) {
-          // 提取 cabinetId 和 cabinetName
-          this.cabinets = response.data.records.map((item) => ({
-            value: item.cabinetId,
-            label: item.cabinetName,
-          }));
-        }
-      });
-    },
+
 
 
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "新增物资信息";
-      this.optType = "add";
-      this.form.materialsTypeId = undefined;
+      this.reset()
+      this.open = true
+      this.title = '新增物资柜信息'
+      this.optType = 'add'
+
     },
     },
 
 
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     handleUpdate(row) {
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       selectMaterialsCabinetById(row.cabinetId).then((response) => {
       selectMaterialsCabinetById(row.cabinetId).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "编辑物资信息";
-        this.optType = "edit";
-      });
+        this.form = response.data
+        this.open = true
+        this.title = '编辑物资柜信息'
+        this.optType = 'edit'
+      })
     },
     },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
         if (valid) {
-          if (this.form.materialsId != null) {
+          if (this.form.cabinetId != null) {
             updateMaterialsCabinet(this.form).then((response) => {
             updateMaterialsCabinet(this.form).then((response) => {
-              console.log(response, "修改返回");
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
+              console.log(response, '修改返回')
+              this.$modal.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
           } else {
           } else {
             addMaterialsCabinet(this.form).then((response) => {
             addMaterialsCabinet(this.form).then((response) => {
-              console.log(response, "新增返回");
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+              console.log(response, '新增返回')
+              this.$modal.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
           }
           }
         }
         }
-      });
+      })
     },
     },
     /** 删除按钮操作 */
     /** 删除按钮操作 */
     handleDelete(row) {
     handleDelete(row) {
-      const materialsIds = row.cabinetIds || this.ids;
-      const materialsCodes = row.cabinetCode || this.codes;
+      const cabinetIds = row.cabinetId || this.ids
+      const cabinetCodes = row.cabinetCode || this.codes
       this.$modal
       this.$modal
-        .confirm('是否确认删除编号为"' + materialsCodes + '"的数据项?')
-        .then(function () {
-          return deleteMaterialsCabinet(materialsIds);
+        .confirm('是否确认删除编号为"' + cabinetCodes + '"的数据项?')
+        .then(function() {
+          return deleteMaterialsCabinet(cabinetIds)
         })
         })
         .then(() => {
         .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.getList()
+          this.$modal.msgSuccess('删除成功')
+        })
+        .catch(() => {
         })
         })
-        .catch(() => {});
     },
     },
     /** 导出按钮操作 */
     /** 导出按钮操作 */
     handleExport() {
     handleExport() {
       this.download(
       this.download(
-        "cal/team/export",
+        'cal/team/export',
         {
         {
-          ...this.queryParams,
+          ...this.queryParams
         },
         },
         `team_${new Date().getTime()}.xlsx`
         `team_${new Date().getTime()}.xlsx`
-      );
+      )
     },
     },
 
 
     //自动生成编码
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
       if (autoGenFlag) {
-        genCode("MATERIALS_CABINET").then((response) => {
-          this.form.cabinetCode = response;
-        });
+        genCode('MATERIALS_CABINET').then((response) => {
+          this.form.cabinetCode = response
+        })
       } else {
       } else {
-        this.form.cabinetCode = null;
+        this.form.cabinetCode = null
       }
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 </script>
 <style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
 <style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
 .el-input-width {
 .el-input-width {