sunyanqiang 3 年之前
父节点
当前提交
6897927259

+ 59 - 0
src/api/militaryvehicleManagement/thebusApply.js

@@ -50,4 +50,63 @@ export function exportThebusApply(query) {
     method: 'get',
     params: query
   })
+}
+
+// 营级审批
+export function exportThebusYin(query) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/yingjishenpi',
+    method: 'get',
+    params: query
+  })
+}
+// 初审审批
+export function exportThebusChu(query) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/chushenshenpi',
+    method: 'get',
+    params: query
+  })
+}
+// 一级审批
+export function exportThebusOne(query) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/yijishenpi',
+    method: 'get',
+    params: query
+  })
+}
+// 二级审批
+export function exportThebusTwo(query) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/erjishenpi',
+    method: 'get',
+    params: query
+  })
+}
+// 三级审批
+export function exportThebusThree(query) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/sanjishenpi',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 添加出车列表
+export function exportThebusCar(data) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/chuchequren',
+    method: 'post',
+    data: data
+  })
+}
+// 查看出车列表
+export function exportThebusCha(params) {
+  return request({
+    url: '/militaryvehicleManagement/thebusApply/lookchuchelist',
+    method: 'post',
+    params
+  })
 }

+ 0 - 1
src/api/militaryvehicleManagement/thebusConfig.js

@@ -52,7 +52,6 @@ export function exportThebusConfig(query) {
   })
 }
 
-// 获取所有用户
 // 查询军车管理设置详细
 export function getThebusUser(id) {
   return request({

+ 329 - 337
src/views/militaryvehicleManagement/thebusApply/index.vue

@@ -25,286 +25,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <!-- <el-form-item label="人员名称" prop="peopleId">
-        <el-input
-          v-model="queryParams.peopleId"
-          placeholder="请输入人员名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="人员名称" prop="thebusId">
-        <el-input
-          v-model="queryParams.thebusId"
-          placeholder="请输入人员名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="联系方式" prop="contact">
-        <el-input
-          v-model="queryParams.contact"
-          placeholder="请输入联系方式"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="外出事由" prop="cause">
-        <el-input
-          v-model="queryParams.cause"
-          placeholder="请输入外出事由"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="授权开始时间" prop="authStime">
-        <el-input
-          v-model="queryParams.authStime"
-          placeholder="请输入授权开始时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="授权结束时间" prop="authEtime">
-        <el-input
-          v-model="queryParams.authEtime"
-          placeholder="请输入授权结束时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="审批模板" prop="thebusThemplateId">
-        <el-input
-          v-model="queryParams.thebusThemplateId"
-          placeholder="请输入审批模板"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="一级审批人" prop="people1Id">
-        <el-input
-          v-model="queryParams.people1Id"
-          placeholder="请输入一级审批人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="一级审批状态" prop="people1State">
-        <el-input
-          v-model="queryParams.people1State"
-          placeholder="请输入一级审批状态"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="一级审批备注" prop="people1Remark">
-        <el-input
-          v-model="queryParams.people1Remark"
-          placeholder="请输入一级审批备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="一级审批时间" prop="people1Authtime">
-        <el-input
-          v-model="queryParams.people1Authtime"
-          placeholder="请输入一级审批时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="二级审批人" prop="people2Id">
-        <el-input
-          v-model="queryParams.people2Id"
-          placeholder="请输入二级审批人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="二级审批状态" prop="people2State">
-        <el-input
-          v-model="queryParams.people2State"
-          placeholder="请输入二级审批状态"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="二级审批备注" prop="people2Remark">
-        <el-input
-          v-model="queryParams.people2Remark"
-          placeholder="请输入二级审批备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="二级审批时间" prop="people2Authtime">
-        <el-input
-          v-model="queryParams.people2Authtime"
-          placeholder="请输入二级审批时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="三级审批人" prop="people3Id">
-        <el-input
-          v-model="queryParams.people3Id"
-          placeholder="请输入三级审批人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="三级审批状态" prop="people3State">
-        <el-input
-          v-model="queryParams.people3State"
-          placeholder="请输入三级审批状态"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="三级审批备注" prop="people3Remark">
-        <el-input
-          v-model="queryParams.people3Remark"
-          placeholder="请输入三级审批备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="三级审批时间" prop="people3Authtime">
-        <el-input
-          v-model="queryParams.people3Authtime"
-          placeholder="请输入三级审批时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="整体审批状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择整体审批状态" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="出车状态" prop="outstatus">
-        <el-select v-model="queryParams.outstatus" placeholder="请选择出车状态" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="操作人" prop="adminId">
-        <el-input
-          v-model="queryParams.adminId"
-          placeholder="请输入操作人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createtime">
-        <el-input
-          v-model="queryParams.createtime"
-          placeholder="请输入创建时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatetime">
-        <el-input
-          v-model="queryParams.updatetime"
-          placeholder="请输入修改时间"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="车辆司机" prop="driver">
-        <el-input
-          v-model="queryParams.driver"
-          placeholder="请输入车辆司机"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="车辆联系方式" prop="driverContact">
-        <el-input
-          v-model="queryParams.driverContact"
-          placeholder="请输入车辆联系方式"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="人数" prop="peopleCount">
-        <el-input
-          v-model="queryParams.peopleCount"
-          placeholder="请输入人数"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="营级审批人" prop="unitPeopleId">
-        <el-input
-          v-model="queryParams.unitPeopleId"
-          placeholder="请输入营级审批人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="营级审批状态" prop="unitPeopleState">
-        <el-input
-          v-model="queryParams.unitPeopleState"
-          placeholder="请输入营级审批状态"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="营级审批备注" prop="unitPeopleRemark">
-        <el-input
-          v-model="queryParams.unitPeopleRemark"
-          placeholder="请输入营级审批备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="初审审批状态" prop="chushenState">
-        <el-input
-          v-model="queryParams.chushenState"
-          placeholder="请输入初审审批状态"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="初审审批备注" prop="chushenRemark">
-        <el-input
-          v-model="queryParams.chushenRemark"
-          placeholder="请输入初审审批备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
       <el-form-item>
         <el-button
           type="primary"
@@ -378,9 +98,9 @@
     >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" align="center" prop="id" />
-      <el-table-column label="人数" align="center" prop="model" />
-      <el-table-column label="单位" align="center" prop="unitId" />
-      <el-table-column label="人员名称" align="center" prop="peopleId" />
+      <el-table-column label="人数" align="center" prop="peopleCount" />
+      <el-table-column label="单位" align="center" prop="unitName" />
+      <el-table-column label="人员名称" align="center" prop="peopleName" />
       <el-table-column label="联系方式" align="center" prop="contact" />
       <el-table-column label="外出事由" align="center" prop="cause" />
       <el-table-column
@@ -388,70 +108,129 @@
         align="center"
         prop="unitPeopleName"
       />
+      <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 == 3"
+            :title="scope.row.unitPeopleRemark"
+            >已驳回</el-col
+          >
+          <el-col
+            v-if="scope.row.unitPeopleState == 4"
+            :title="scope.row.unitPeopleRemark"
+            >特殊审批</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 == 3"
+            :title="scope.row.chushenRemark"
+            >已驳回</el-col
+          >
+          <el-col
+            v-if="scope.row.chushenState == 4"
+            :title="scope.row.chushenRemark"
+            >特殊审批</el-col
+          >
+        </template>
+      </el-table-column>
+      <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 == 3"
+            :title="scope.row.peopleoneRemark"
+            >已驳回</el-col
+          >
+          <el-col
+            v-if="scope.row.peopleoneState == 4"
+            :title="scope.row.peopleoneRemark"
+            >特殊审批</el-col
+          >
+        </template>
+      </el-table-column>
+      <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 == 3"
+            :title="scope.row.peopletwoRemark"
+            >已驳回</el-col
+          >
+          <el-col
+            v-if="scope.row.peopletwoState == 4"
+            :title="scope.row.peopletwoRemark"
+            >特殊审批</el-col
+          >
+        </template>
+      </el-table-column>
       <el-table-column
-        label="营级审批状态"
-        align="center"
-        prop="unitPeopleState"
-        width="100"
-      />
-      <el-table-column label="初审状态" align="center" prop="chushenState" />
-      <el-table-column label="一级审批人" align="center" prop="people1Id" />
-      <el-table-column
-        label="一级审批状态"
-        align="center"
-        prop="people1State"
-        width="100"
-      />
-      <el-table-column label="二级审批人" align="center" prop="people2Id" />
-      <el-table-column
-        label="二级审批状态"
-        align="center"
-        prop="people2State"
-        width="100"
-      />
-      <el-table-column label="三级审批人" align="center" prop="people3Id" />
-      <el-table-column
-        label="三级审批状态"
+        label="三级审批人"
         align="center"
-        prop="people3State"
-        width="100"
+        prop="peoplethreeName"
       />
-      <el-table-column label="修改时间" align="center" prop="updatetime" />
+      <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 == 3"
+            :title="scope.row.peoplethreeRemark"
+            >已驳回</el-col
+          >
+          <el-col
+            v-if="scope.row.peoplethreeState == 4"
+            :title="scope.row.peoplethreeRemark"
+            >特殊审批</el-col
+          >
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
-        width="150"
+        width="200"
       >
         <template slot-scope="scope">
           <el-button
-            size="btu"
+            size="btc"
             type="text"
-            @click="handleUpdate(scope.row)"
+            v-show="scope.row.isTeShu == '1' && scope.row.status == '1'"
+            @click="handleTeShuShenPi(scope.row)"
             v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
-            >修改</el-button
+            >特殊审批</el-button
           >
           <el-button
             size="btc"
             type="text"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['militaryvehicleManagement:thebusApply:remove']"
-            >删除</el-button
+            v-if="scope.row.status == '1' && scope.row.isTeShu != '1'"
+            @click="handleShenPi(scope.row)"
+            v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
+            >审批</el-button
           >
           <el-button
-            size="btc"
+            size="btu"
             type="text"
-            @click="handleShenPi(scope.row)"
-            v-if="scope.row.isCaoZuo !== '1'"
+            @click="handleUpdate(scope.row)"
             v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
-            >审批</el-button
+            >修改</el-button
           >
           <el-button
             size="btc"
             type="text"
-            @click="handleTeShuShenPi(scope.row)"
-            v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
-            >特殊审批</el-button
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['militaryvehicleManagement:thebusApply:remove']"
+            >删除</el-button
           >
         </template>
       </el-table-column>
@@ -888,11 +667,18 @@ import {
   addThebusApply,
   updateThebusApply,
   exportThebusApply,
+  exportThebusYin,
+  exportThebusChu,
+  exportThebusOne,
+  exportThebusTwo,
+  exportThebusThree,
 } from "@/api/militaryvehicleManagement/thebusApply";
 // 导入树形结构
 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,
@@ -996,17 +782,70 @@ export default {
           { required: true, message: "请输特级审批原因", trigger: "blur" },
         ],
       },
+      // 用车审批状态
+      carApprova: [],
+      teJi: true,
     };
   },
   created() {
     this.getList();
   },
+  mounted() {},
   methods: {
     // 特殊审批通过
     submitFormTeShenPi() {
       this.$refs["formsTe"].validateField("teShuYuanYing", (valid) => {
         if (!valid) {
-          console.log("通过");
+          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;
+                });
+              }
+            });
+          }
         }
       });
     },
@@ -1014,33 +853,182 @@ export default {
     cancelTeShenPi() {
       this.$refs["formsTe"].validate((valid) => {
         if (valid) {
-          alert("通过");
-          this.opensTe = true;
+          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;
+                });
+              }
+            });
+          }
         }
       });
     },
     // 特殊审批按钮
-    handleTeShuShenPi() {
+    handleTeShuShenPi(row) {
       this.reset();
-      this.opensTe = true;
+      this.getTreeList();
+      this.getYingJi();
+      this.getShenPi();
+      const id = row.id || this.ids;
+      getThebusApply(id).then((response) => {
+        this.form = response.data;
+        this.getRen(this.form.unitId);
+        this.opensTe = true;
+        this.title = "审批用车申请";
+      });
     },
     // 审批通过
     submitFormShenPi() {
-      alert("通过");
-      this.opens = false;
+      this.thebusApplyList.forEach((item) => {
+        if (this.form.id != null) {
+          if (item.shenpijiedian == "1") {
+            this.form.isTongguo = "0";
+            console.log(this.form);
+            exportThebusYin(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.opens = false;
+              this.getList();
+            });
+          } else if (item.shenpijiedian == "2") {
+            this.form.isTongguo = "0";
+            exportThebusChu(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.opens = false;
+              this.getList();
+            });
+          } else if (item.shenpijiedian == "3") {
+            this.form.isTongguo = "0";
+            exportThebusOne(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.getList();
+              this.opens = false;
+            });
+          } else if (item.shenpijiedian == "4") {
+            this.form.isTongguo = "0";
+            exportThebusTwo(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.getList();
+              this.opens = false;
+            });
+          } else if (item.shenpijiedian == "5") {
+            this.form.isTongguo = "0";
+            exportThebusThree(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.getList();
+              this.opens = false;
+            });
+          }
+        }
+      });
     },
     // 审批不通过
     cancelShenPi() {
       this.$refs["forms"].validate((valid) => {
         if (valid) {
-          console.log("不通过");
-          this.opens = false;
+          if (this.form.id != null) {
+            this.thebusApplyList.forEach((item) => {
+              if (item.shenpijiedian == "1") {
+                console.log(1);
+                this.form.isTongguo = "1";
+                this.form.unitPeopleRemark = this.form.routes;
+                exportThebusYin(this.form).then((res) => {
+                  this.opens = false;
+                  this.getList();
+                });
+              } else if (item.shenpijiedian == "2") {
+                console.log(2);
+                this.form.isTongguo = "1";
+                this.form.chushenRemark = this.form.routes;
+                exportThebusChu(this.form).then((res) => {
+                  this.opens = false;
+                  this.getList();
+                });
+              } else if (item.shenpijiedian == "3") {
+                console.log(3);
+                this.form.isTongguo = "1";
+                this.form.peopleoneRemark = this.form.routes;
+                exportThebusOne(this.form).then((res) => {
+                  this.opens = false;
+                  this.getList();
+                });
+              } else if (item.shenpijiedian == "4") {
+                console.log(4);
+                this.form.isTongguo = "1";
+                this.form.peopletwoRemark = this.form.routes;
+                exportThebusTwo(this.form).then((res) => {
+                  this.opens = false;
+                  this.getList();
+                });
+              } else if (item.shenpijiedian == "5") {
+                console.log(5);
+                this.form.isTongguo = "1";
+                this.form.peoplethreeRemark = this.form.routes;
+                exportThebusThree(this.form).then((res) => {
+                  this.opens = false;
+                  this.getList();
+                });
+              }
+            });
+          }
         }
       });
     },
     // 审批按钮
-    handleShenPi() {
-      this.opens = true;
+    handleShenPi(row) {
+      this.reset();
+      this.getTreeList();
+      this.getYingJi();
+      this.getShenPi();
+      const id = row.id || this.ids;
+      getThebusApply(id).then((response) => {
+        this.form = response.data;
+        this.getRen(this.form.unitId);
+        this.opens = true;
+        this.title = "审批用车申请";
+      });
     },
     // 选择营级人员触发
     yinJi(name) {
@@ -1070,7 +1058,7 @@ export default {
     },
     // 选择人员触发
     cheRen(name) {
-      this.form.driverName = name;
+      this.form.peopleName = name;
     },
     // 获取人员列表
     getRen(id) {
@@ -1128,8 +1116,8 @@ export default {
         people3State: null,
         people3Remark: null,
         people3Authtime: null,
-        status: 0,
-        outstatus: 0,
+        status: null,
+        outstatus: null,
         adminId: null,
         createtime: null,
         updatetime: null,
@@ -1172,9 +1160,13 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.getTreeList();
+      this.getYingJi();
+      this.getShenPi();
       const id = row.id || this.ids;
       getThebusApply(id).then((response) => {
         this.form = response.data;
+        this.getRen(this.form.unitId);
         this.open = true;
         this.title = "修改用车申请";
       });

+ 0 - 1
src/views/peopleChuRu/bdglLeave/index.vue

@@ -900,7 +900,6 @@ export default {
     },
     //审批通过按钮
     submitForms() {
-      // this.tongGuo = "1";
       this.bdglLeaveList.forEach((item) => {
         if (item.shenPiJiBie == "一级") {
           this.form.status1 = 1;