浏览代码

军车申请完成

sunyanqiang 3 年之前
父节点
当前提交
0390ca13f4

+ 316 - 206
src/views/militaryvehicleManagement/thebusApply/index.vue

@@ -101,32 +101,44 @@
       />
       <el-table-column label="营级审批状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-col v-if="scope.row.unitPeopleState == 1">未处理</el-col>
-          <el-col v-if="scope.row.unitPeopleState == 2">已审批</el-col>
+          <el-col v-if="scope.row.unitPeopleState == 1" style="color: #ff4949"
+            >未处理</el-col
+          >
+          <el-col v-if="scope.row.unitPeopleState == 2" style="color: #13ce66"
+            >已审批</el-col
+          >
           <el-col
             v-if="scope.row.unitPeopleState == 3"
             :title="scope.row.unitPeopleRemark"
+            style="color: #00eaff"
             >已驳回</el-col
           >
           <el-col
             v-if="scope.row.unitPeopleState == 4"
             :title="scope.row.unitPeopleRemark"
+            style="color: #1d96ff"
             >特殊审批</el-col
           >
         </template>
       </el-table-column>
       <el-table-column label="初审状态" align="center">
         <template slot-scope="scope">
-          <el-col v-if="scope.row.chushenState == 1">未处理</el-col>
-          <el-col v-if="scope.row.chushenState == 2">已审批</el-col>
+          <el-col v-if="scope.row.chushenState == 1" style="color: #ff4949"
+            >未处理</el-col
+          >
+          <el-col v-if="scope.row.chushenState == 2" style="color: #13ce66"
+            >已审批</el-col
+          >
           <el-col
             v-if="scope.row.chushenState == 3"
             :title="scope.row.chushenRemark"
+            style="color: #00eaff"
             >已驳回</el-col
           >
           <el-col
             v-if="scope.row.chushenState == 4"
             :title="scope.row.chushenRemark"
+            style="color: #1d96ff"
             >特殊审批</el-col
           >
         </template>
@@ -134,16 +146,22 @@
       <el-table-column label="一级审批人" align="center" prop="peopleoneName" />
       <el-table-column label="一级审批状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-col v-if="scope.row.peopleoneState == 1">未处理</el-col>
-          <el-col v-if="scope.row.peopleoneState == 2">已审批</el-col>
+          <el-col v-if="scope.row.peopleoneState == 1" style="color: #ff4949"
+            >未处理</el-col
+          >
+          <el-col v-if="scope.row.peopleoneState == 2" style="color: #13ce66"
+            >已审批</el-col
+          >
           <el-col
             v-if="scope.row.peopleoneState == 3"
             :title="scope.row.peopleoneRemark"
+            style="color: #00eaff"
             >已驳回</el-col
           >
           <el-col
             v-if="scope.row.peopleoneState == 4"
             :title="scope.row.peopleoneRemark"
+            style="color: #1d96ff"
             >特殊审批</el-col
           >
         </template>
@@ -151,16 +169,22 @@
       <el-table-column label="二级审批人" align="center" prop="peopletwoName" />
       <el-table-column label="二级审批状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-col v-if="scope.row.peopletwoState == 1">未处理</el-col>
-          <el-col v-if="scope.row.peopletwoState == 2">已审批</el-col>
+          <el-col v-if="scope.row.peopletwoState == 1" style="color: #ff4949"
+            >未处理</el-col
+          >
+          <el-col v-if="scope.row.peopletwoState == 2" style="color: #13ce66"
+            >已审批</el-col
+          >
           <el-col
             v-if="scope.row.peopletwoState == 3"
             :title="scope.row.peopletwoRemark"
+            style="color: #00eaff"
             >已驳回</el-col
           >
           <el-col
             v-if="scope.row.peopletwoState == 4"
             :title="scope.row.peopletwoRemark"
+            style="color: #1d96ff"
             >特殊审批</el-col
           >
         </template>
@@ -172,16 +196,22 @@
       />
       <el-table-column label="三级审批状态" align="center" width="100">
         <template slot-scope="scope">
-          <el-col v-if="scope.row.peoplethreeState == 1">未处理</el-col>
-          <el-col v-if="scope.row.peoplethreeState == 2">已审批</el-col>
+          <el-col v-if="scope.row.peoplethreeState == 1" style="color: #ff4949"
+            >未处理</el-col
+          >
+          <el-col v-if="scope.row.peoplethreeState == 2" style="color: #13ce66"
+            >已审批</el-col
+          >
           <el-col
             v-if="scope.row.peoplethreeState == 3"
             :title="scope.row.peoplethreeRemark"
+            style="color: #00eaff"
             >已驳回</el-col
           >
           <el-col
             v-if="scope.row.peoplethreeState == 4"
             :title="scope.row.peoplethreeRemark"
+            style="color: #1d96ff"
             >特殊审批</el-col
           >
         </template>
@@ -193,22 +223,109 @@
         width="200"
       >
         <template slot-scope="scope">
-          <el-button
-            size="btc"
-            type="text"
-            v-show="scope.row.isTeShu == '1' && scope.row.status == '1'"
-            @click="handleTeShuShenPi(scope.row)"
-            v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
-            >特殊审批</el-button
-          >
-          <el-button
-            size="btc"
-            type="text"
-            v-if="scope.row.status == '1' && scope.row.isTeShu != '1'"
-            @click="handleShenPi(scope.row)"
-            v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
-            >审批</el-button
-          >
+          <div v-if="scope.row.isTeShu == '1'">
+            <!-- 1 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peopleoneState == '1' &&
+                scope.row.shenpijiedian == '3'
+              "
+              @click="handleTeShuShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >特殊审批</el-button
+            >
+            <!-- 2 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peopletwoState == '1' &&
+                scope.row.shenpijiedian == '4'
+              "
+              @click="handleTeShuShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >特殊审批</el-button
+            >
+            <!-- 3 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peoplethreeState == '1' &&
+                scope.row.shenpijiedian == '5'
+              "
+              @click="handleTeShuShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >特殊审批</el-button
+            >
+          </div>
+          <div v-if="scope.row.status == '1' && scope.row.isTeShu != '1'">
+            <!-- 1 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.unitPeopleState == '1' &&
+                scope.row.shenpijiedian == '1' &&
+                scope.row.yingjicaozuoren == 'yingji'
+              "
+              @click="handleShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >审批</el-button
+            >
+            <!-- 2 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.chushenState == '1' &&
+                scope.row.shenpijiedian == '2' &&
+                scope.row.chushenyuan == 'chushen'
+              "
+              @click="handleShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >审批</el-button
+            >
+
+            <!-- 3 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peopleoneState == '1' &&
+                scope.row.shenpijiedian == '3'
+              "
+              @click="handleShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >审批</el-button
+            >
+            <!-- 4 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peopletwoState == '1' &&
+                scope.row.shenpijiedian == '4'
+              "
+              @click="handleShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >审批</el-button
+            >
+            <!-- 5 -->
+            <el-button
+              size="btc"
+              type="text"
+              v-if="
+                scope.row.peoplethreeState == '1' &&
+                scope.row.shenpijiedian == '5'
+              "
+              @click="handleShenPi(scope.row)"
+              v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+              >审批</el-button
+            >
+          </div>
           <el-button
             size="btu"
             type="text"
@@ -217,7 +334,7 @@
             >修改</el-button
           >
           <el-button
-            size="btc"
+            size="btd"
             type="text"
             @click="handleDelete(scope.row)"
             v-hasPermi="['militaryvehicleManagement:thebusApply:remove']"
@@ -668,8 +785,6 @@ import {
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getZhuChiRen, getDept } from "@/api/militaryvehicleManagement/thebus";
-// 查询字典
-import { getDicts } from "@/api/system/dict/data";
 
 import {
   listThebusConfig,
@@ -788,54 +903,52 @@ export default {
       this.$refs["formsTe"].validateField("teShuYuanYing", (valid) => {
         if (!valid) {
           if (this.form.id != null) {
-            this.thebusApplyList.forEach((item) => {
-              if (item.shenpijiedian == "1") {
-                this.form.isTongguo = "0";
-                this.form.yjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusYin(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.opensTe = false;
-                  this.getList();
-                });
-              } else if (item.shenpijiedian == "2") {
-                this.form.isTongguo = "0";
-                this.form.cstsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusChu(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.opensTe = false;
-                  this.getList();
-                });
-              } else if (item.shenpijiedian == "3") {
-                this.form.isTongguo = "0";
-                this.form.ojtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusOne(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              } else if (item.shenpijiedian == "4") {
-                this.form.isTongguo = "0";
-                this.form.tjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusTwo(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              } else if (item.shenpijiedian == "5") {
-                this.form.isTongguo = "0";
-                this.form.sjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusThree(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              }
-            });
+            if (this.form.shenpijiedian == "1") {
+              this.form.isTongguo = "0";
+              this.form.yjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusYin(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.opensTe = false;
+                this.getList();
+              });
+            } else if (this.form.shenpijiedian == "2") {
+              this.form.isTongguo = "0";
+              this.form.cstsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusChu(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.opensTe = false;
+                this.getList();
+              });
+            } else if (this.form.shenpijiedian == "3") {
+              this.form.isTongguo = "0";
+              this.form.ojtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusOne(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            } else if (this.form.shenpijiedian == "4") {
+              this.form.isTongguo = "0";
+              this.form.tjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusTwo(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            } else if (this.form.shenpijiedian == "5") {
+              this.form.isTongguo = "0";
+              this.form.sjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusThree(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            }
           }
         }
       });
@@ -845,54 +958,52 @@ export default {
       this.$refs["formsTe"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            this.thebusApplyList.forEach((item) => {
-              if (item.shenpijiedian == "1") {
-                this.form.isTongguo = "1";
-                this.form.yjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusYin(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.opensTe = false;
-                  this.getList();
-                });
-              } else if (item.shenpijiedian == "2") {
-                this.form.isTongguo = "1";
-                this.form.cstsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusChu(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.opensTe = false;
-                  this.getList();
-                });
-              } else if (item.shenpijiedian == "3") {
-                this.form.isTongguo = "1";
-                this.form.ojtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusOne(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              } else if (item.shenpijiedian == "4") {
-                this.form.isTongguo = "1";
-                this.form.tjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusTwo(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              } else if (item.shenpijiedian == "5") {
-                this.form.isTongguo = "1";
-                this.form.sjtsYuanyin = this.form.teShuYuanYing;
-                this.form.isTeShu = "1";
-                exportThebusThree(this.form).then((response) => {
-                  this.$modal.msgSuccess("审批成功");
-                  this.getList();
-                  this.opensTe = false;
-                });
-              }
-            });
+            if (this.form.shenpijiedian == "1") {
+              this.form.isTongguo = "1";
+              this.form.yjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusYin(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.opensTe = false;
+                this.getList();
+              });
+            } else if (this.form.shenpijiedian == "2") {
+              this.form.isTongguo = "1";
+              this.form.cstsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusChu(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.opensTe = false;
+                this.getList();
+              });
+            } else if (this.form.shenpijiedian == "3") {
+              this.form.isTongguo = "1";
+              this.form.ojtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusOne(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            } else if (this.form.shenpijiedian == "4") {
+              this.form.isTongguo = "1";
+              this.form.tjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusTwo(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            } else if (this.form.shenpijiedian == "5") {
+              this.form.isTongguo = "1";
+              this.form.sjtsYuanyin = this.form.teShuYuanYing;
+              this.form.isTeShu = "1";
+              exportThebusThree(this.form).then((response) => {
+                this.$modal.msgSuccess("审批成功");
+                this.getList();
+                this.opensTe = false;
+              });
+            }
           }
         }
       });
@@ -913,102 +1024,96 @@ export default {
     },
     // 审批通过
     submitFormShenPi() {
-      this.thebusApplyList.forEach((item) => {
+      if (this.form.shenpijiedian == "1") {
+        console.log("营级");
+        this.form.isTongguo = "0";
         if (this.form.id != null) {
-          if (item.shenpijiedian == "1") {
-            this.form.isTongguo = "0";
-            exportThebusYin(this.form).then((response) => {
-              console.log("营级");
-              this.$modal.msgSuccess("审批成功");
+          exportThebusYin(this.form).then((response) => {
+            this.$modal.msgSuccess("审批成功");
+            this.opens = false;
+            this.getList();
+          });
+          return;
+        }
+      } else if (this.form.shenpijiedian == "2") {
+        console.log("初级");
+        this.form.isTongguo = "0";
+        exportThebusChu(this.form).then((response) => {
+          this.$modal.msgSuccess("审批成功");
+          this.opens = false;
+          this.getList();
+        });
+        return;
+      } else if (this.form.shenpijiedian == "3") {
+        this.form.isTongguo = "0";
+        console.log("一级");
+        exportThebusOne(this.form).then((response) => {
+          this.$modal.msgSuccess("审批成功");
+          this.getList();
+          this.opens = false;
+        });
+        return;
+      } else if (this.form.shenpijiedian == "4") {
+        this.form.isTongguo = "0";
+        console.log("二级");
+        exportThebusTwo(this.form).then((response) => {
+          this.$modal.msgSuccess("审批成功");
+          this.getList();
+          this.opens = false;
+        });
+        return;
+      } else if (this.form.shenpijiedian == "5") {
+        this.form.isTongguo = "0";
+        console.log("三级");
+        exportThebusThree(this.form).then((response) => {
+          this.$modal.msgSuccess("审批成功");
+          this.getList();
+          this.opens = false;
+        });
+      }
+    },
+    // 审批不通过
+    cancelShenPi() {
+      this.$refs["forms"].validate((valid) => {
+        if (valid) {
+          if (this.form.shenpijiedian == "1") {
+            this.form.isTongguo = "1";
+            this.form.unitPeopleRemark = this.form.routes;
+            exportThebusYin(this.form).then((res) => {
               this.opens = false;
               this.getList();
             });
             return;
-          } else if (item.shenpijiedian == "2") {
-            this.form.isTongguo = "0";
-            exportThebusChu(this.form).then((response) => {
-              console.log("初级");
-              this.$modal.msgSuccess("审批成功");
+          } else if (this.form.shenpijiedian == "2") {
+            this.form.isTongguo = "1";
+            this.form.chushenRemark = this.form.routes;
+            exportThebusChu(this.form).then((res) => {
               this.opens = false;
               this.getList();
             });
             return;
-          } else if (item.shenpijiedian == "3") {
-            this.form.isTongguo = "0";
-            exportThebusOne(this.form).then((response) => {
-              console.log("一级");
-              this.$modal.msgSuccess("审批成功");
-              this.getList();
+          } else if (this.form.shenpijiedian == "3") {
+            this.form.isTongguo = "1";
+            this.form.peopleoneRemark = this.form.routes;
+            exportThebusOne(this.form).then((res) => {
               this.opens = false;
+              this.getList();
             });
             return;
-          } else if (item.shenpijiedian == "4") {
-            this.form.isTongguo = "0";
-            exportThebusTwo(this.form).then((response) => {
-              console.log("二级");
-              this.$modal.msgSuccess("审批成功");
-              this.getList();
+          } else if (this.form.shenpijiedian == "4") {
+            this.form.isTongguo = "1";
+            this.form.peopletwoRemark = this.form.routes;
+            exportThebusTwo(this.form).then((res) => {
               this.opens = false;
+              this.getList();
             });
             return;
-          } else if (item.shenpijiedian == "5") {
-            this.form.isTongguo = "0";
-            exportThebusThree(this.form).then((response) => {
-              console.log("三级");
-              this.$modal.msgSuccess("审批成功");
-              this.getList();
+          } else if (this.form.shenpijiedian == "5") {
+            this.form.isTongguo = "1";
+            this.form.peoplethreeRemark = this.form.routes;
+            exportThebusThree(this.form).then((res) => {
               this.opens = false;
-            });
-          }
-        }
-      });
-    },
-    // 审批不通过
-    cancelShenPi() {
-      this.$refs["forms"].validate((valid) => {
-        if (valid) {
-          if (this.form.id != null) {
-            this.thebusApplyList.forEach((item) => {
-              if (item.shenpijiedian == "1") {
-                this.form.isTongguo = "1";
-                this.form.unitPeopleRemark = this.form.routes;
-                exportThebusYin(this.form).then((res) => {
-                  this.opens = false;
-                  this.getList();
-                });
-                return;
-              } else if (item.shenpijiedian == "2") {
-                this.form.isTongguo = "1";
-                this.form.chushenRemark = this.form.routes;
-                exportThebusChu(this.form).then((res) => {
-                  this.opens = false;
-                  this.getList();
-                });
-                return;
-              } else if (item.shenpijiedian == "3") {
-                this.form.isTongguo = "1";
-                this.form.peopleoneRemark = this.form.routes;
-                exportThebusOne(this.form).then((res) => {
-                  this.opens = false;
-                  this.getList();
-                });
-                return;
-              } else if (item.shenpijiedian == "4") {
-                this.form.isTongguo = "1";
-                this.form.peopletwoRemark = this.form.routes;
-                exportThebusTwo(this.form).then((res) => {
-                  this.opens = false;
-                  this.getList();
-                });
-                return;
-              } else if (item.shenpijiedian == "5") {
-                this.form.isTongguo = "1";
-                this.form.peoplethreeRemark = this.form.routes;
-                exportThebusThree(this.form).then((res) => {
-                  this.opens = false;
-                  this.getList();
-                });
-              }
+              this.getList();
             });
           }
         }
@@ -1016,6 +1121,7 @@ export default {
     },
     // 审批按钮
     handleShenPi(row) {
+      console.log(row);
       this.reset();
       this.getTreeList();
       this.getYingJi();
@@ -1034,7 +1140,6 @@ export default {
     },
     // 选择审批模板触发
     shenPiThemplate(data) {
-      console.log(data);
       this.form.peopleoneName = data.oneshenpirenname;
       this.form.peopletwoName = data.twoshenpirenname;
       this.form.peoplethreeName = data.threeshenpirenname;
@@ -1079,6 +1184,11 @@ export default {
     getList() {
       this.loading = true;
       listThebusApply(this.queryParams).then((response) => {
+        console.log(
+          (response.rows.unitPeopleState == "1" ||
+            response.rows.status == "1") &&
+            response.rows.isCaoZuo != null
+        );
         this.thebusApplyList = response.rows;
         this.total = response.total;
         this.loading = false;

+ 1 - 1
src/views/militaryvehicleManagement/thebusConfig/index.vue

@@ -120,7 +120,7 @@
             >修改</el-button
           >
           <el-button
-            size="mini"
+            size="btd"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"

+ 89 - 44
src/views/militaryvehicleManagement/thebusThemplate/index.vue

@@ -1,6 +1,12 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="审批模板名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -56,8 +62,16 @@
         />
       </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>
 
@@ -70,7 +84,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['militaryvehicleManagement:thebusThemplate:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -81,7 +96,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['militaryvehicleManagement:thebusThemplate:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -92,7 +108,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['militaryvehicleManagement:thebusThemplate:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -103,12 +120,20 @@
           :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['militaryvehicleManagement:thebusThemplate:export']"
-        >导出</el-button>
+          >导出</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="thebusThemplateList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="thebusThemplateList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="三级审批人" align="center" prop="id" />
       <el-table-column label="审批模板名称" align="center" prop="name" />
@@ -117,7 +142,11 @@
       <el-table-column label="三级审批人" align="center" prop="people3Id" />
       <el-table-column label="三级审批人" align="center" prop="createtime" />
       <el-table-column label="三级审批人" align="center" prop="updatetime" />
-      <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"
@@ -125,20 +154,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['militaryvehicleManagement:thebusThemplate:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
-            size="mini"
+            size="btd"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['militaryvehicleManagement:thebusThemplate:remove']"
-          >删除</el-button>
+            >删除</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"
@@ -170,7 +201,14 @@
 </template>
 
 <script>
-import { listThebusThemplate, getThebusThemplate, delThebusThemplate, addThebusThemplate, updateThebusThemplate, exportThebusThemplate } from "@/api/militaryvehicleManagement/thebusThemplate";
+import {
+  listThebusThemplate,
+  getThebusThemplate,
+  delThebusThemplate,
+  addThebusThemplate,
+  updateThebusThemplate,
+  exportThebusThemplate,
+} from "@/api/militaryvehicleManagement/thebusThemplate";
 
 export default {
   name: "ThebusThemplate",
@@ -205,13 +243,12 @@ export default {
         people2Id: null,
         people3Id: null,
         createtime: null,
-        updatetime: null
+        updatetime: null,
       },
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
   },
   created() {
@@ -221,7 +258,7 @@ export default {
     /** 查询军车审批模板列表 */
     getList() {
       this.loading = true;
-      listThebusThemplate(this.queryParams).then(response => {
+      listThebusThemplate(this.queryParams).then((response) => {
         this.thebusThemplateList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -241,7 +278,7 @@ export default {
         people2Id: null,
         people3Id: null,
         createtime: null,
-        updatetime: null
+        updatetime: null,
       };
       this.resetForm("form");
     },
@@ -257,9 +294,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -270,8 +307,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getThebusThemplate(id).then(response => {
+      const id = row.id || this.ids;
+      getThebusThemplate(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改军车审批模板";
@@ -279,16 +316,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateThebusThemplate(this.form).then(response => {
+            updateThebusThemplate(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addThebusThemplate(this.form).then(response => {
+            addThebusThemplate(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -300,24 +337,32 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除军车审批模板编号为"' + ids + '"的数据项?').then(function() {
-        return delThebusThemplate(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除军车审批模板编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delThebusThemplate(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$modal.confirm('是否确认导出所有军车审批模板数据项?').then(() => {
-        this.exportLoading = true;
-        return exportThebusThemplate(queryParams);
-      }).then(response => {
-        this.$download.name(response.msg);
-        this.exportLoading = false;
-      }).catch(() => {});
-    }
-  }
+      this.$modal
+        .confirm("是否确认导出所有军车审批模板数据项?")
+        .then(() => {
+          this.exportLoading = true;
+          return exportThebusThemplate(queryParams);
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>

+ 9 - 8
src/views/peopleChuRu/bdglLeave/index.vue

@@ -85,7 +85,11 @@
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="请假类型" align="center" prop="leaveType" :formatter="qingJia"
+      <el-table-column
+        label="请假类型"
+        align="center"
+        prop="leaveType"
+        :formatter="qingJia"
       >
         <template slot-scope="scope">
           <dict-tag
@@ -107,12 +111,9 @@
         prop="returnTime"
         width="100"
       />
-      <el-table-column label="是否归队" align="center" prop="isReturn" >
-         <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.sys_is"
-            :value="scope.row.isReturn"
-          />
+      <el-table-column label="是否归队" align="center" prop="isReturn">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.sys_is" :value="scope.row.isReturn" />
         </template>
       </el-table-column>
       <el-table-column
@@ -734,7 +735,7 @@ export default {
   components: {
     Treeselect,
   },
-   dicts: ["Leave_type", "sys_is"],
+  dicts: ["Leave_type", "sys_is"],
   data() {
     return {
       // 审批按钮状态 审批按钮状态1 修改为0,超级审批状态2