浏览代码

物资管理界面内容

wangyani 1 年之前
父节点
当前提交
cff905dcfb

+ 215 - 159
src/views/mes/material/collectionmanagement/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="物资编码" prop="teamCode">
         <el-input
           v-model="queryParams.teamCode"
@@ -26,7 +33,10 @@
         />
       </el-form-item>
       <el-form-item label="是否需要归还" prop="teamCode">
-        <el-select v-model="queryParams.calendarType" placeholder="是否需要归还">
+        <el-select
+          v-model="queryParams.calendarType"
+          placeholder="是否需要归还"
+        >
           <el-option>需要归还</el-option>
           <el-option>不需要归还</el-option>
           <!--          <el-option-->
@@ -60,23 +70,31 @@
       </el-form-item>
 
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="primary"-->
-<!--          plain-->
-<!--          icon="el-icon-plus"-->
-<!--          size="mini"-->
-<!--          @click="handleAdd"-->
-<!--          v-hasPermi="['mes:mat:info:add']"-->
-<!--        >新增-->
-<!--        </el-button>-->
-<!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="primary"-->
+      <!--          plain-->
+      <!--          icon="el-icon-plus"-->
+      <!--          size="mini"-->
+      <!--          @click="handleAdd"-->
+      <!--          v-hasPermi="['mes:mat:info:add']"-->
+      <!--        >新增-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
       <!--      <el-col :span="1.5">-->
       <!--        <el-button-->
       <!--          type="success"-->
@@ -97,7 +115,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:mat:coll:batchremove']"
-        >批量删除
+          >批量删除
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -110,29 +128,30 @@
       <!--          v-hasPermi="['mes:cal:team:export']"-->
       <!--        >导出</el-button>-->
       <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
+    <el-table
+      v-loading="loading"
+      :data="teamList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="物资编码" align="center" prop="teamCode">
         <template slot-scope="scope">
           <el-button
             type="text"
             @click="handleView(scope.row)"
             v-hasPermi="['mes:mat:coll:query']"
-          >{{ scope.row.teamCode }}
+            >{{ scope.row.teamCode }}
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="物资名称" align="center" prop="teamName"/>
-      <el-table-column label="状态" align="center" prop="calendarType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.mes_calendar_type" :value="scope.row.calendarType"/>
-        </template>
-      </el-table-column>
+      <el-table-column label="物资名称" align="center" prop="teamName" />
       <el-table-column label="操作" align="center" prop="remark">
-
       </el-table-column>
       <el-table-column label="领取柜" align="center" prop="remark">
       </el-table-column>
@@ -142,30 +161,34 @@
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="remark">
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-edit"-->
-<!--            @click="handleUpdate(scope.row)"-->
-<!--            v-hasPermi="['mes:mat:info:edit']"-->
-<!--          >编辑-->
-<!--          </el-button>-->
+          <!--          <el-button-->
+          <!--            size="mini"-->
+          <!--            type="text"-->
+          <!--            icon="el-icon-edit"-->
+          <!--            @click="handleUpdate(scope.row)"-->
+          <!--            v-hasPermi="['mes:mat:info:edit']"-->
+          <!--          >编辑-->
+          <!--          </el-button>-->
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:mat:coll:remove']"
-          >删除
+            >删除
           </el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -173,7 +196,7 @@
     />
 
     <!-- 添加或修改班组对话框 -->
-    <el-dialog  :visible.sync="open" width="960px" append-to-body>
+    <el-dialog :visible.sync="open" width="960px" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
         <span class="title">{{ title }}</span>
@@ -181,13 +204,20 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="物资类型编码" prop="teamCode" >
-              <el-input   v-model="form.teamCode" placeholder="请输入物资类型编码" />
+            <el-form-item label="物资类型编码" prop="teamCode">
+              <el-input
+                v-model="form.teamCode"
+                placeholder="请输入物资类型编码"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资类型" prop="calendarType">
-              <el-select style="width: 348px"  v-model="form.calendarType" placeholder="请选择隔离点类型">
+              <el-select
+                style="width: 348px"
+                v-model="form.calendarType"
+                placeholder="请选择隔离点类型"
+              >
                 <el-option
                   v-for="dict in dict.type.mes_calendar_type"
                   :key="dict.value"
@@ -201,12 +231,16 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="物资名称" prop="teamCode">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资名称"       />
+              <el-input v-model="form.teamCode" placeholder="请输入物资名称" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="所属柜" prop="teamCode">
-              <el-select style="width: 348px"  v-model="form.calendarType" placeholder="请选择所属柜">
+              <el-select
+                style="width: 348px"
+                v-model="form.calendarType"
+                placeholder="请选择所属柜"
+              >
                 <el-option
                   v-for="dict in dict.type.mes_calendar_type"
                   :key="dict.value"
@@ -220,24 +254,27 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="启用日期" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="" disabled />
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资使用次数" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资使用次数"  />
+              <el-input
+                v-model="form.teamCode"
+                placeholder="请输入物资使用次数"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="可用次数" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="" disabled />
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资寿命" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资寿命"  />
+              <el-input v-model="form.teamCode" placeholder="请输入物资寿命" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -245,7 +282,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="物资报废时间" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder=""  disabled/>
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
         </el-row>
@@ -260,7 +297,9 @@
       </el-form>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
+        <el-button type="primary" @click="cancel" v-if="optType == 'view'"
+          >返回</el-button
+        >
         <el-button type="primary" @click="submitForm" v-else>确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
@@ -269,14 +308,20 @@
 </template>
 
 <script>
-import { listTeam, getTeam, delTeam, addTeam, updateTeam } from '@/api/mes/cal/team'
+import {
+  listTeam,
+  getTeam,
+  delTeam,
+  addTeam,
+  updateTeam,
+} from "@/api/mes/cal/team";
 
-import { genCode } from '@/api/system/autocode/rule'
+import { genCode } from "@/api/system/autocode/rule";
 
 export default {
-  name: 'Team',
+  name: "Team",
 
-  dicts: ['mes_calendar_type'],
+  dicts: ["mes_calendar_type"],
   data() {
     return {
       //自动生成编码
@@ -297,7 +342,7 @@ export default {
       // 班组表格数据
       teamList: [],
       // 弹出层标题
-      title: '',
+      title: "",
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -306,79 +351,83 @@ export default {
         pageSize: 10,
         teamCode: null,
         teamName: null,
-        calendarType: null
+        calendarType: null,
       },
       pickerOptions: {
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-            picker.$emit('pick', [start, end])
-          }
-        }]
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
       },
 
-      value2: '',
+      value2: "",
 
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         teamCode: [
-          { required: true, message: '班组编号不能为空', trigger: 'blur' }
+          { required: true, message: "班组编号不能为空", trigger: "blur" },
         ],
         teamName: [
-          { required: true, message: '班组名称不能为空', trigger: 'blur' }
+          { required: true, message: "班组名称不能为空", trigger: "blur" },
         ],
         calendarType: [
-          { required: true, message: '清选择班组类型', trigger: 'blur' }
-        ]
-      }
-    }
+          { required: true, message: "清选择班组类型", trigger: "blur" },
+        ],
+      },
+    };
   },
   created() {
-    this.getList()
+    this.getList();
   },
   methods: {
     /** 查询班组列表 */
     getList() {
-      this.loading = true
-      listTeam(this.queryParams).then(response => {
-        this.teamList = response.rows
-        this.total = response.total
-        this.loading = false
-      })
+      this.loading = true;
+      listTeam(this.queryParams).then((response) => {
+        this.teamList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     //图片上传成功
-    handleImgUplaoded(imgUrl){
+    handleImgUplaoded(imgUrl) {
       this.form.sipUrl = imgUrl;
     },
     //图片移除
-    handleImgRemoved(imgUrl){
+    handleImgRemoved(imgUrl) {
       this.form.sipUrl = null;
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+      this.open = false;
+      this.reset();
     },
     // 表单重置
     reset() {
@@ -395,104 +444,111 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
-      }
-      this.resetForm('form')
+        updateTime: null,
+      };
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
-      this.handleQuery()
+      this.resetForm("queryForm");
+      this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.teamId)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.teamId);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增物资类型'
-      this.optType = 'add'
+      this.reset();
+      this.open = true;
+      this.title = "新增物资类型";
+      this.optType = "add";
     },
     // 查询明细按钮操作
     handleView(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '查看班组'
-        this.optType = 'view'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "查看班组";
+        this.optType = "view";
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '编辑物资类型'
-        this.optType = 'edit'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "编辑物资类型";
+        this.optType = "edit";
+      });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.teamId != null) {
-            updateTeam(this.form).then(response => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
+            updateTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
           } else {
-            addTeam(this.form).then(response => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
+            addTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
         }
-      })
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const teamIds = row.teamId || this.ids
-      this.$modal.confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?').then(function() {
-        return delTeam(teamIds)
-      }).then(() => {
-        this.getList()
-        this.$modal.msgSuccess('删除成功')
-      }).catch(() => {
-      })
+      const teamIds = row.teamId || this.ids;
+      this.$modal
+        .confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?')
+        .then(function () {
+          return delTeam(teamIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('cal/team/export', {
-        ...this.queryParams
-      }, `team_${new Date().getTime()}.xlsx`)
+      this.download(
+        "cal/team/export",
+        {
+          ...this.queryParams,
+        },
+        `team_${new Date().getTime()}.xlsx`
+      );
     },
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
-        genCode('CAL_TEAM_CODE').then(response => {
-          this.form.teamCode = response
-        })
+        genCode("CAL_TEAM_CODE").then((response) => {
+          this.form.teamCode = response;
+        });
       } else {
-        this.form.teamCode = null
+        this.form.teamCode = null;
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
 .el-input-width {

+ 182 - 137
src/views/mes/material/expireremind/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="物资编码" prop="teamCode">
         <el-input
           v-model="queryParams.teamCode"
@@ -62,8 +69,16 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -76,7 +91,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:mat:exp:add']"
-        >新增
+          >新增
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -99,7 +114,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:mat:exp:batchremove']"
-        >批量删除
+          >批量删除
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -112,29 +127,30 @@
       <!--          v-hasPermi="['mes:cal:team:export']"-->
       <!--        >导出</el-button>-->
       <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
+    <el-table
+      v-loading="loading"
+      :data="teamList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="物资编码" align="center" prop="teamCode">
         <template slot-scope="scope">
           <el-button
             type="text"
             @click="handleView(scope.row)"
             v-hasPermi="['mes:mat:exp:query']"
-          >{{ scope.row.teamCode }}
+            >{{ scope.row.teamCode }}
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="物资名称" align="center" prop="teamName"/>
-      <el-table-column label="状态" align="center" prop="calendarType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.mes_calendar_type" :value="scope.row.calendarType"/>
-        </template>
-      </el-table-column>
+      <el-table-column label="物资名称" align="center" prop="teamName" />
       <el-table-column label="通知人" align="center" prop="remark">
-
       </el-table-column>
       <el-table-column label="所属柜" align="center" prop="remark">
       </el-table-column>
@@ -142,7 +158,11 @@
       </el-table-column>
       <el-table-column label="状态" align="center" prop="remark">
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -150,7 +170,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:mat:exp:edit']"
-          >编辑
+            >编辑
           </el-button>
           <el-button
             size="mini"
@@ -158,14 +178,14 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:mat:exp:remove']"
-          >删除
+            >删除
           </el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -180,10 +200,14 @@
       </div>
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-form-item label="物资编码" prop="teamCode">
-          <el-input v-model="form.teamCode" placeholder="请输入物资编码"/>
+          <el-input v-model="form.teamCode" placeholder="请输入物资编码" />
         </el-form-item>
         <el-form-item label="物资名称" prop="calendarType">
-          <el-select style="width: 310px" v-model="form.calendarType" placeholder="请选择物资名称">
+          <el-select
+            style="width: 310px"
+            v-model="form.calendarType"
+            placeholder="请选择物资名称"
+          >
             <el-option
               v-for="dict in dict.type.mes_calendar_type"
               :key="dict.value"
@@ -193,9 +217,8 @@
           </el-select>
         </el-form-item>
 
-
         <el-form-item label="通知人" prop="teamCode">
-          <el-input v-model="form.teamCode" placeholder="请输入通知人"/>
+          <el-input v-model="form.teamCode" placeholder="请输入通知人" />
         </el-form-item>
 
         <el-form-item label="过期时间" prop="teamCode">
@@ -211,7 +234,11 @@
         </el-form-item>
 
         <el-form-item label="所属柜" prop="calendarType">
-          <el-select style="width: 310px" v-model="form.calendarType" placeholder="请选择所属柜">
+          <el-select
+            style="width: 310px"
+            v-model="form.calendarType"
+            placeholder="请选择所属柜"
+          >
             <el-option
               v-for="dict in dict.type.mes_calendar_type"
               :key="dict.value"
@@ -220,11 +247,12 @@
             />
           </el-select>
         </el-form-item>
-
       </el-form>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
+        <el-button type="primary" @click="cancel" v-if="optType == 'view'"
+          >返回</el-button
+        >
         <el-button type="primary" @click="submitForm" v-else>确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
@@ -233,14 +261,20 @@
 </template>
 
 <script>
-import { listTeam, getTeam, delTeam, addTeam, updateTeam } from '@/api/mes/cal/team'
+import {
+  listTeam,
+  getTeam,
+  delTeam,
+  addTeam,
+  updateTeam,
+} from "@/api/mes/cal/team";
 
-import { genCode } from '@/api/system/autocode/rule'
+import { genCode } from "@/api/system/autocode/rule";
 
 export default {
-  name: 'Team',
+  name: "Team",
 
-  dicts: ['mes_calendar_type'],
+  dicts: ["mes_calendar_type"],
   data() {
     return {
       //自动生成编码
@@ -261,7 +295,7 @@ export default {
       // 班组表格数据
       teamList: [],
       // 弹出层标题
-      title: '',
+      title: "",
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -270,80 +304,84 @@ export default {
         pageSize: 10,
         teamCode: null,
         teamName: null,
-        calendarType: null
+        calendarType: null,
       },
       pickerOptions: {
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-            picker.$emit('pick', [start, end])
-          }
-        }]
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
       },
 
-      value2: '',
-      value3: '',
+      value2: "",
+      value3: "",
 
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         teamCode: [
-          { required: true, message: '班组编号不能为空', trigger: 'blur' }
+          { required: true, message: "班组编号不能为空", trigger: "blur" },
         ],
         teamName: [
-          { required: true, message: '班组名称不能为空', trigger: 'blur' }
+          { required: true, message: "班组名称不能为空", trigger: "blur" },
         ],
         calendarType: [
-          { required: true, message: '清选择班组类型', trigger: 'blur' }
-        ]
-      }
-    }
+          { required: true, message: "清选择班组类型", trigger: "blur" },
+        ],
+      },
+    };
   },
   created() {
-    this.getList()
+    this.getList();
   },
   methods: {
     /** 查询班组列表 */
     getList() {
-      this.loading = true
-      listTeam(this.queryParams).then(response => {
-        this.teamList = response.rows
-        this.total = response.total
-        this.loading = false
-      })
+      this.loading = true;
+      listTeam(this.queryParams).then((response) => {
+        this.teamList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     //图片上传成功
     handleImgUplaoded(imgUrl) {
-      this.form.sipUrl = imgUrl
+      this.form.sipUrl = imgUrl;
     },
     //图片移除
     handleImgRemoved(imgUrl) {
-      this.form.sipUrl = null
+      this.form.sipUrl = null;
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+      this.open = false;
+      this.reset();
     },
     // 表单重置
     reset() {
@@ -360,104 +398,111 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
-      }
-      this.resetForm('form')
+        updateTime: null,
+      };
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
-      this.handleQuery()
+      this.resetForm("queryForm");
+      this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.teamId)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.teamId);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增提醒'
-      this.optType = 'add'
+      this.reset();
+      this.open = true;
+      this.title = "新增提醒";
+      this.optType = "add";
     },
     // 查询明细按钮操作
     handleView(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '查看班组'
-        this.optType = 'view'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "查看班组";
+        this.optType = "view";
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '编辑提醒'
-        this.optType = 'edit'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "编辑提醒";
+        this.optType = "edit";
+      });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.teamId != null) {
-            updateTeam(this.form).then(response => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
+            updateTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
           } else {
-            addTeam(this.form).then(response => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
+            addTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
         }
-      })
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const teamIds = row.teamId || this.ids
-      this.$modal.confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?').then(function() {
-        return delTeam(teamIds)
-      }).then(() => {
-        this.getList()
-        this.$modal.msgSuccess('删除成功')
-      }).catch(() => {
-      })
+      const teamIds = row.teamId || this.ids;
+      this.$modal
+        .confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?')
+        .then(function () {
+          return delTeam(teamIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('cal/team/export', {
-        ...this.queryParams
-      }, `team_${new Date().getTime()}.xlsx`)
+      this.download(
+        "cal/team/export",
+        {
+          ...this.queryParams,
+        },
+        `team_${new Date().getTime()}.xlsx`
+      );
     },
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
-        genCode('CAL_TEAM_CODE').then(response => {
-          this.form.teamCode = response
-        })
+        genCode("CAL_TEAM_CODE").then((response) => {
+          this.form.teamCode = response;
+        });
       } else {
-        this.form.teamCode = null
+        this.form.teamCode = null;
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
 .el-input-width {

+ 216 - 159
src/views/mes/material/materialinformation/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
       <el-form-item label="物资类型编码" prop="teamCode">
         <el-input
           v-model="queryParams.teamCode"
@@ -32,10 +39,10 @@
       <el-form-item label="物资类型" prop="teamCode">
         <el-select v-model="queryParams.calendarType" placeholder="物资状态">
           <el-option
-                      v-for="dict in dict.type.mes_calendar_type"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
+            v-for="dict in dict.type.mes_calendar_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
           />
         </el-select>
       </el-form-item>
@@ -48,7 +55,8 @@
           range-separator="-"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
-          align="right">
+          align="right"
+        >
         </el-date-picker>
       </el-form-item>
       <el-form-item label="所属物资柜" prop="teamCode">
@@ -62,20 +70,31 @@
         </el-select>
       </el-form-item>
       <el-form-item label="是否需要归还" prop="teamCode">
-        <el-select v-model="queryParams.calendarType" placeholder="是否需要归还">
+        <el-select
+          v-model="queryParams.calendarType"
+          placeholder="是否需要归还"
+        >
           <el-option>需要归还</el-option>
           <el-option>不需要归还</el-option>
-<!--          <el-option-->
-<!--            v-for="dict in dict.type.mes_calendar_type"-->
-<!--            :key="dict.value"-->
-<!--            :label="dict.label"-->
-<!--            :value="dict.value"-->
-<!--          />-->
+          <!--          <el-option-->
+          <!--            v-for="dict in dict.type.mes_calendar_type"-->
+          <!--            :key="dict.value"-->
+          <!--            :label="dict.label"-->
+          <!--            :value="dict.value"-->
+          <!--          />-->
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -88,7 +107,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:mat:info:add']"
-        >新增
+          >新增
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -111,7 +130,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:mat:info.batchremove']"
-        >批量删除
+          >批量删除
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -124,36 +143,46 @@
       <!--          v-hasPermi="['mes:cal:team:export']"-->
       <!--        >导出</el-button>-->
       <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="物资类型编码" align="center" prop="teamCode">
+    <el-table
+      v-loading="loading"
+      :data="teamList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="物资编码" align="center" prop="teamCode">
         <template slot-scope="scope">
           <el-button
             type="text"
             @click="handleView(scope.row)"
             v-hasPermi="['mes:mat:info:query']"
-          >{{ scope.row.teamCode }}
+            >{{ scope.row.teamCode }}
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="物资类型名称" align="center" prop="teamName"/>
-      <el-table-column label="状态" align="center" prop="calendarType">
+      <el-table-column label="物资名称" align="center" prop="teamName" />
+      <el-table-column label="物资类型" align="center" prop="teamName" />
+      <el-table-column label="所属柜" align="center" prop="teamName" />
+      <el-table-column label="物资状态" align="center" prop="calendarType">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.mes_calendar_type" :value="scope.row.calendarType"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="出借时长" align="center" prop="remark">
-        <template slot-scope="scope">
-          <img src="" alt="">
+          <dict-tag
+            :options="dict.type.mes_calendar_type"
+            :value="scope.row.calendarType"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="是否需要归还" align="center" prop="remark">
+      <el-table-column label="创建时间" align="center" prop="remark">
       </el-table-column>
-
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -161,7 +190,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:mat:info:edit']"
-          >编辑
+            >编辑
           </el-button>
           <el-button
             size="mini"
@@ -169,22 +198,20 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:mat:info:remove']"
-          >删除
+            >删除
           </el-button>
         </template>
       </el-table-column>
     </el-table>
-
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
     <!-- 添加或修改班组对话框 -->
-    <el-dialog  :visible.sync="open" width="960px" append-to-body>
+    <el-dialog :visible.sync="open" width="960px" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
         <span class="title">{{ title }}</span>
@@ -192,13 +219,17 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="物资编码" prop="teamCode" >
-              <el-input   v-model="form.teamCode" placeholder="请输入物资编码" />
+            <el-form-item label="物资编码" prop="teamCode">
+              <el-input v-model="form.teamCode" placeholder="请输入物资编码" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资类型" prop="calendarType">
-              <el-select style="width: 348px"  v-model="form.calendarType" placeholder="请选择物资类型">
+              <el-select
+                style="width: 348px"
+                v-model="form.calendarType"
+                placeholder="请选择物资类型"
+              >
                 <el-option
                   v-for="dict in dict.type.mes_calendar_type"
                   :key="dict.value"
@@ -212,12 +243,16 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="物资名称" prop="teamCode">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资名称"       />
+              <el-input v-model="form.teamCode" placeholder="请输入物资名称" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="所属柜" prop="teamCode">
-              <el-select style="width: 348px"  v-model="form.calendarType" placeholder="请选择所属柜">
+              <el-select
+                style="width: 348px"
+                v-model="form.calendarType"
+                placeholder="请选择所属柜"
+              >
                 <el-option
                   v-for="dict in dict.type.mes_calendar_type"
                   :key="dict.value"
@@ -231,24 +266,27 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="启用日期" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="" disabled />
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资使用次数" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资使用次数"  />
+              <el-input
+                v-model="form.teamCode"
+                placeholder="请输入物资使用次数"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="可用次数" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="" disabled />
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="物资寿命" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder="请输入物资寿命"  />
+              <el-input v-model="form.teamCode" placeholder="请输入物资寿命" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -256,7 +294,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="物资报废时间" prop="calendarType">
-              <el-input  v-model="form.teamCode" placeholder=""  disabled/>
+              <el-input v-model="form.teamCode" placeholder="" disabled />
             </el-form-item>
           </el-col>
         </el-row>
@@ -271,7 +309,9 @@
       </el-form>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
+        <el-button type="primary" @click="cancel" v-if="optType == 'view'"
+          >返回</el-button
+        >
         <el-button type="primary" @click="submitForm" v-else>确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
@@ -280,14 +320,20 @@
 </template>
 
 <script>
-import { listTeam, getTeam, delTeam, addTeam, updateTeam } from '@/api/mes/cal/team'
+import {
+  listTeam,
+  getTeam,
+  delTeam,
+  addTeam,
+  updateTeam,
+} from "@/api/mes/cal/team";
 
-import { genCode } from '@/api/system/autocode/rule'
+import { genCode } from "@/api/system/autocode/rule";
 
 export default {
-  name: 'Team',
+  name: "Team",
 
-  dicts: ['mes_calendar_type'],
+  dicts: ["mes_calendar_type"],
   data() {
     return {
       //自动生成编码
@@ -308,7 +354,7 @@ export default {
       // 班组表格数据
       teamList: [],
       // 弹出层标题
-      title: '',
+      title: "",
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -317,79 +363,83 @@ export default {
         pageSize: 10,
         teamCode: null,
         teamName: null,
-        calendarType: null
+        calendarType: null,
       },
       pickerOptions: {
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-            picker.$emit('pick', [start, end])
-          }
-        }]
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
       },
 
-      value2: '',
+      value2: "",
 
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         teamCode: [
-          { required: true, message: '班组编号不能为空', trigger: 'blur' }
+          { required: true, message: "班组编号不能为空", trigger: "blur" },
         ],
         teamName: [
-          { required: true, message: '班组名称不能为空', trigger: 'blur' }
+          { required: true, message: "班组名称不能为空", trigger: "blur" },
         ],
         calendarType: [
-          { required: true, message: '清选择班组类型', trigger: 'blur' }
-        ]
-      }
-    }
+          { required: true, message: "清选择班组类型", trigger: "blur" },
+        ],
+      },
+    };
   },
   created() {
-    this.getList()
+    this.getList();
   },
   methods: {
     /** 查询班组列表 */
     getList() {
-      this.loading = true
-      listTeam(this.queryParams).then(response => {
-        this.teamList = response.rows
-        this.total = response.total
-        this.loading = false
-      })
+      this.loading = true;
+      listTeam(this.queryParams).then((response) => {
+        this.teamList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     //图片上传成功
-    handleImgUplaoded(imgUrl){
+    handleImgUplaoded(imgUrl) {
       this.form.sipUrl = imgUrl;
     },
     //图片移除
-    handleImgRemoved(imgUrl){
+    handleImgRemoved(imgUrl) {
       this.form.sipUrl = null;
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+      this.open = false;
+      this.reset();
     },
     // 表单重置
     reset() {
@@ -406,104 +456,111 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
-      }
-      this.resetForm('form')
+        updateTime: null,
+      };
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
-      this.handleQuery()
+      this.resetForm("queryForm");
+      this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.teamId)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.teamId);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增物资类型'
-      this.optType = 'add'
+      this.reset();
+      this.open = true;
+      this.title = "新增物资类型";
+      this.optType = "add";
     },
     // 查询明细按钮操作
     handleView(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '查看班组'
-        this.optType = 'view'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "查看班组";
+        this.optType = "view";
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset()
-      const teamId = row.teamId || this.ids
-      getTeam(teamId).then(response => {
-        this.form = response.data
-        this.open = true
-        this.title = '编辑物资类型'
-        this.optType = 'edit'
-      })
+      this.reset();
+      const teamId = row.teamId || this.ids;
+      getTeam(teamId).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "编辑物资类型";
+        this.optType = "edit";
+      });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.teamId != null) {
-            updateTeam(this.form).then(response => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
+            updateTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
           } else {
-            addTeam(this.form).then(response => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
+            addTeam(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
         }
-      })
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const teamIds = row.teamId || this.ids
-      this.$modal.confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?').then(function() {
-        return delTeam(teamIds)
-      }).then(() => {
-        this.getList()
-        this.$modal.msgSuccess('删除成功')
-      }).catch(() => {
-      })
+      const teamIds = row.teamId || this.ids;
+      this.$modal
+        .confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?')
+        .then(function () {
+          return delTeam(teamIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('cal/team/export', {
-        ...this.queryParams
-      }, `team_${new Date().getTime()}.xlsx`)
+      this.download(
+        "cal/team/export",
+        {
+          ...this.queryParams,
+        },
+        `team_${new Date().getTime()}.xlsx`
+      );
     },
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
-        genCode('CAL_TEAM_CODE').then(response => {
-          this.form.teamCode = response
-        })
+        genCode("CAL_TEAM_CODE").then((response) => {
+          this.form.teamCode = response;
+        });
       } else {
-        this.form.teamCode = null
+        this.form.teamCode = null;
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" src="@/assets/styles/dialog-title.scss" scoped>
 .el-input-width {

+ 0 - 12
src/views/mes/material/returnremind/index.vue

@@ -57,18 +57,6 @@
         >
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="物资类型" prop="teamCode">
-        <el-select v-model="queryParams.calendarType" placeholder="物资状态">
-          <el-option
-            v-for="dict in dict.type.mes_calendar_type"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-
-
       <el-form-item label="状态" prop="teamCode">
         <el-select v-model="queryParams.calendarType" placeholder="状态">
           <el-option>已读</el-option>