Bläddra i källkod

修改军车审批

sunyanqiang 3 år sedan
förälder
incheckning
7694feaa72

+ 7 - 10
src/views/militaryvehicleManagement/thebusApply/index.vue

@@ -411,8 +411,7 @@
               type="text"
               v-if="
                 scope.row.peopleoneState == '1' &&
-                scope.row.shenpijiedian == '3' &&
-                scope.row.yingjicaozuoren == 'oneji'
+                scope.row.shenpijiedian == '3'
               "
               @click="handleShenPi(scope.row)"
               v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
@@ -424,8 +423,7 @@
               type="text"
               v-if="
                 scope.row.peopletwoState == '1' &&
-                scope.row.shenpijiedian == '4' &&
-                scope.row.yingjicaozuoren == 'twoji'
+                scope.row.shenpijiedian == '4'
               "
               @click="handleShenPi(scope.row)"
               v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
@@ -437,8 +435,7 @@
               type="text"
               v-if="
                 scope.row.peoplethreeState == '1' &&
-                scope.row.shenpijiedian == '5' &&
-                scope.row.yingjicaozuoren == 'threeji'
+                scope.row.shenpijiedian == '5'
               "
               @click="handleShenPi(scope.row)"
               v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
@@ -1184,7 +1181,7 @@ export default {
           return;
         }
       } else if (this.form.shenpijiedian == "2") {
-        // console.log("初级");
+        console.log("初级");
         this.form.isTongguo = "0";
         exportThebusChu(this.form).then((response) => {
           this.$modal.msgSuccess("审批成功");
@@ -1194,7 +1191,7 @@ export default {
         return;
       } else if (this.form.shenpijiedian == "3") {
         this.form.isTongguo = "0";
-        // console.log("一级");
+        console.log("一级");
         exportThebusOne(this.form).then((response) => {
           this.$modal.msgSuccess("审批成功");
           this.getList();
@@ -1203,7 +1200,7 @@ export default {
         return;
       } else if (this.form.shenpijiedian == "4") {
         this.form.isTongguo = "0";
-        // console.log("二级");
+        console.log("二级");
         exportThebusTwo(this.form).then((response) => {
           this.$modal.msgSuccess("审批成功");
           this.getList();
@@ -1212,7 +1209,7 @@ export default {
         return;
       } else if (this.form.shenpijiedian == "5") {
         this.form.isTongguo = "0";
-        // console.log("三级");
+        console.log("三级");
         exportThebusThree(this.form).then((response) => {
           this.$modal.msgSuccess("审批成功");
           this.getList();

+ 30 - 28
src/views/militaryvehicleManagement/thebusConfig/index.vue

@@ -495,35 +495,37 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      if (
-        this.form.twoshenpirenid ||
-        this.form.onshenpirenid ||
-        this.form.threeshenpirenid
-      ) {
-        this.$refs["form"].validate((valid) => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateThebusConfig(this.form).then((response) => {
-                this.$modal.msgSuccess("修改成功");
-                this.opens = false;
-                this.getList();
-              });
-            } else {
-              addThebusConfig(this.checkShop).then((response) => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
+      this.checkShop.forEach((item) => {
+        if (
+          item.twoshenpirenid ||
+          item.onshenpirenid ||
+          item.threeshenpirenid
+        ) {
+          this.$refs["form"].validate((valid) => {
+            if (valid) {
+              if (this.form.id != null) {
+                updateThebusConfig(this.form).then((response) => {
+                  this.$modal.msgSuccess("修改成功");
+                  this.opens = false;
+                  this.getList();
+                });
+              } else {
+                addThebusConfig(this.checkShop).then((response) => {
+                  this.$modal.msgSuccess("新增成功");
+                  this.open = false;
+                  this.getList();
+                });
+              }
             }
-          }
-        });
-      } else {
-        this.$message({
-          showClose: true,
-          message: "审批人必须有一个",
-          type: "warning",
-        });
-      }
+          });
+        } else {
+          this.$message({
+            showClose: true,
+            message: "审批人必须有一个",
+            type: "warning",
+          });
+        }
+      });
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 2 - 2
src/views/militaryvehicleManagement/thebusList/index.vue

@@ -91,9 +91,9 @@
           >
         </template>
       </el-table-column>
-      <el-table-column label="申请时间" align="center" prop="authStime">
+      <el-table-column label="出车时间" align="center" prop="outtime">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.authStime, "{y}-{m}-{d}") }}</span>
+          <span>{{ parseTime(scope.row.outtime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
       <el-table-column label="流程" align="center" prop="outtime">