Prechádzať zdrojové kódy

修改车队 变更

qukaidi 4 rokov pred
rodič
commit
c471396757

+ 1 - 1
src/views/fleet/plans/AddOrUpdate.vue

@@ -724,7 +724,7 @@
                       @click.native.prevent="
                         revokeplansRow(scope.$index, schedulingList, scope.row)
                       "
-                      :disabled="disabled"
+                      :disabled="true"
                       >撤销</el-button
                     >
                   </template>

+ 26 - 18
src/views/fleet/scheduling/AddOrUpdate.vue

@@ -540,7 +540,7 @@
                     <el-select
                       v-model="scope.row.cntrId"
                       placeholder="请选择箱型"
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                       @change="checkPid(scope.row)"
                     >
                       <el-option
@@ -562,7 +562,7 @@
                     <el-input
                       v-model="scope.row.carcorPid"
                       placeholder="车队名称"
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                     />
                   </template>
                 </el-table-column>
@@ -571,14 +571,13 @@
                   label="调度安排货量"
                   align="center"
                   prop="cntrQty"
-                  :disabled="disabled"
                 >
                   <template slot-scope="scope">
                     <el-input
                       v-model="scope.row.cntrQty"
                       placeholder="调度安排货量"
                       v-input-limit="2"
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                     />
                   </template>
                 </el-table-column>
@@ -600,7 +599,7 @@
                     <el-input
                       v-model="scope.row.remarks"
                       placeholder="备注"
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                     />
                   </template>
                 </el-table-column>
@@ -619,7 +618,7 @@
                       @click.native.prevent="
                         delplansRow(scope.$index, schedulingList, scope.row)
                       "
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                       >删除</el-button
                     >
                     <el-button
@@ -627,7 +626,7 @@
                       type="text"
                       icon="el-icon-document-checked"
                       @click.native.prevent="addplansRow(scope.row)"
-                      :disabled="scope.row.billStatus >= 6"
+                      :disabled="scope.row.disabled"
                       >提交</el-button
                     >
                     <el-button
@@ -637,7 +636,7 @@
                       @click.native.prevent="
                         revokeplansRow(scope.$index, schedulingList, scope.row)
                       "
-                      :disabled="disabled"
+                      :disabled="true"
                       >撤销</el-button
                     >
                     <el-button
@@ -1128,11 +1127,11 @@
       </el-form>
     </span>
     <span slot="footer" class="dialog-footer">
-      <el-button type="primary" @click="submitForm" :disabled="disabled2"
+      <el-button type="primary" @click="submitForm" :disabled="disabled"
         >提交</el-button
       >
       <el-button type="success" @click="submitAllowChanges">修改</el-button>
-      <el-button type="info" @click="submitSave" :disabled="disabled2"
+      <el-button type="info" @click="submitSave" :disabled="disabled"
         >保 存</el-button
       >
       <el-button
@@ -1439,9 +1438,10 @@ export default {
       formData.append("plans", JSON.stringify(this.schedulingList));
       saveFtmsorderbillsplans(formData).then((response) => {
         if (response.code == 200) {
+          console.log(response);
           this.msgSuccess("保存成功");
           this.$parent.getList();
-          this.$parent.getSave(response);
+          // this.$parent.getSave(response);
         }
       });
     },
@@ -1530,7 +1530,7 @@ export default {
     },
     //单条订单调度提交
     addplansRow(row) {
-      if (row.billStatus == 70) {
+      if (row.billStatus == 5) {
         let formData = new window.FormData();
         formData.append("tmsorder", JSON.stringify(this.form));
         formData.append("plans", JSON.stringify(row));
@@ -1581,12 +1581,20 @@ export default {
       }
     },
     changeplansRow(row) {
-      changeFtmsorderbillsplans(row).then((response) => {
-        if (response.code == 200) {
-          this.msgSuccess("允许变更");
-          this.$set(row, "billStatus", response.data.billStatus);
-        }
-      });
+      if (billStatus != 5) {
+        this.msgSuccess("允许变更");
+        this.$set(row, "billStatus", 5);
+        this.$set(row, "disabled", false);
+      } else {
+        this.msgSuccess("请勿重复变更");
+      }
+
+      // changeFtmsorderbillsplans(row).then((response) => {
+      //   if (response.code == 200) {
+      //     this.msgSuccess("允许变更");
+      //     this.$set(row, "billStatus", response.data.billStatus);
+      //   }
+      // });
     },
   },
   watch: {

+ 6 - 3
src/views/fleet/scheduling/index.vue

@@ -814,9 +814,12 @@ export default {
           });
         }
         if (response.data.plans.length != 0) {
-          response.data.plans.cntrId = response.data.plans.map((e) => {
-            if (e.cntrId != null) {
-              return (e.cntrId = e.cntrId.toString());
+          response.data.plans.map((e) => {
+            if (e.cntrId) {
+              e.cntrId = e.cntrId.toString();
+            }
+            if (e.billStatus>=6) {
+              e.disabled = true;
             }
           });
         }

+ 9 - 17
src/views/fleet/sendcar/AddOrUpdate.vue

@@ -685,6 +685,7 @@
                       @click.native.prevent="
                         revokescarsRow(scope.$index, schedulingList, scope.row)
                       "
+                      :disabled="true"
                       >撤销</el-button
                     >
                     <el-button
@@ -1173,9 +1174,9 @@
     <span slot="footer" class="dialog-footer">
       <el-button type="primary" @click="submitForm">提交 </el-button>
       <!-- <el-button type="success" @click="submitFix">修改</el-button> -->
-      <el-button type="success" @click="submitAllowChanges">修 改</el-button>
+      <!-- <el-button type="success" @click="submitAllowChanges">修 改</el-button> -->
       <el-button type="info" @click="submitSave">保 存</el-button>
-      <el-button type="warning" @click="submitRetreat">撤 回</el-button>
+      <!-- <el-button type="warning" @click="submitRetreat">撤 回</el-button> -->
       <el-button @click="showDialog = false">取 消</el-button>
     </span>
   </el-dialog>
@@ -1522,6 +1523,7 @@ export default {
       formData.append("plans", JSON.stringify(this.schedulingList[0]));
       saveFtmsorderbillscars(formData).then((response) => {
         if (response.code == 200) {
+          console.log(response);
           this.msgSuccess("保存成功");
           this.$parent.getList();
           this.$parent.getSave(response);
@@ -1566,13 +1568,7 @@ export default {
           .then(() => {
             this.submitSave();
             if (row.billStatus != 6) {
-              singleaddFtmsorderbillscars(row).then((response) => {
-                this.msgSuccess("成功提交");
-                if (response.code == 200) {
-                  this.$set(row, "id", response.data.id);
-                  this.$set(row, "billStatus", 6);
-                }
-              });
+              this.msgSuccess("保存成功");
             } else {
               this.msgSuccess("请勿重复提交");
             }
@@ -1622,15 +1618,11 @@ export default {
       }
     },
     changescarsRow(row) {
-      if (row.billStatus == 6) {
-        changeFtmsorderbillscars(row.id).then((response) => {
-          if (response.code == 200) {
-            this.msgSuccess("允许变更");
-            this.$set(row, "billStatus", 5);
-          }
-        });
+      if (row.billStatus != 5) {
+        this.msgSuccess("允许变更");
+        this.$set(row, "billStatus", 5);
       } else {
-        this.msgSuccess("此条数据没有提交,不能申请变更");
+        this.msgSuccess("请勿重复变更变更");
       }
     },
   },