zxz 3 éve
szülő
commit
978f7c9672

+ 40 - 5
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -200,7 +200,11 @@
             </el-form-item>
             </el-form-item>
 
 
             <!-- 提交 -->
             <!-- 提交 -->
-            <span class="servicein" v-show="item.status == '已装车' || item.status == '已送达'">已装车</span>
+            <span
+              class="servicein"
+              v-show="item.status == '已装车' || item.status == '已送达'"
+              >已装车</span
+            >
             <span
             <span
               style="text-align: right; padding: 10px"
               style="text-align: right; padding: 10px"
               class="center"
               class="center"
@@ -263,16 +267,15 @@
         class="bg-bottom"
         class="bg-bottom"
         type="primary"
         type="primary"
         size="small"
         size="small"
-        @click="submit(deptBudgetList)"
+        @click="finished(deptBudgetList)"
         >完货</el-button
         >完货</el-button
       >
       >
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, packList, feedback, getbank } from '@/model/transport/index'
-import { getstaff } from '@/model/warehouse/index'
+import { regionData } from 'element-china-area-data'
+import { seeCat, feedback, state } from '@/model/transport/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
 export default {
@@ -419,6 +422,38 @@ export default {
     revert() {
     revert() {
       this.$router.push({ path: 'tranManagementTransporHairRespond' })
       this.$router.push({ path: 'tranManagementTransporHairRespond' })
     },
     },
+    //完货
+    finished() {
+      this.$confirm(`完货操作后,装车信息不可修改,是否确定完货?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              var tranProcessInfo = {}
+              tranProcessInfo.id = this.deptBudgetList.id
+              state(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('完货成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ''
+                  this.$router.push({
+                    path: 'tranManagementTransporHairRespond',
+                  })
+                })
+            } else {
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     submit() {
     submit() {
       for (var i = 0; i < this.freightspace.length; i++) {
       for (var i = 0; i < this.freightspace.length; i++) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {

+ 37 - 5
src/views/tranManagement/tranManagementFireReceivingFeedback.vue

@@ -273,16 +273,15 @@
         class="bg-bottom"
         class="bg-bottom"
         type="primary"
         type="primary"
         size="small"
         size="small"
-        @click="submit(deptBudgetList)"
+        @click="finished(deptBudgetList)"
         >完货</el-button
         >完货</el-button
       >
       >
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, packList, feedback, getbank } from '@/model/transport/index'
-import { getstaff } from '@/model/warehouse/index'
+import { regionData } from 'element-china-area-data'
+import { seeCat, feedback, stateRec } from '@/model/transport/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
 export default {
@@ -426,6 +425,38 @@ export default {
         this.freightspace.splice(index, 1)
         this.freightspace.splice(index, 1)
       }
       }
     },
     },
+    //完货
+    finished() {
+      this.$confirm(`完货操作后,装车信息不可修改,是否确定完货?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              var tranProcessInfo = {}
+              tranProcessInfo.id = this.deptBudgetList.id
+              stateRec(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('完货成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ''
+                  this.$router.push({
+                    path: 'tranManagementReceivingFeedback',
+                  })
+                })
+            } else {
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     submit() {
     submit() {
       for (var i = 0; i < this.freightspace.length; i++) {
       for (var i = 0; i < this.freightspace.length; i++) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {
@@ -470,7 +501,8 @@ export default {
               // this.deptBudgetList.totalStorage = this.totalStorage
               // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList.driver = this.deptBudgetList.driver
               this.tranCarInfoList.driver = this.deptBudgetList.driver
-              this.tranCarInfoList.unloadingDate = this.deptBudgetList.unloadingDate
+              this.tranCarInfoList.unloadingDate =
+                this.deptBudgetList.unloadingDate
               this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
               this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
               this.tranCarInfoList.tranCarNo = this.deptBudgetList.tranCarNo
               this.tranCarInfoList.tranCarNo = this.deptBudgetList.tranCarNo
               this.tranCarInfoList.carNo = this.deptBudgetList.carNo
               this.tranCarInfoList.carNo = this.deptBudgetList.carNo

+ 78 - 48
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -44,7 +44,8 @@
         <!--发货地址-->
         <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
           {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
           {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
-          }}{{ deptBudgetList.sendArea }}{{ deptBudgetList.sendDetailedAddress }}
+          }}{{ deptBudgetList.sendArea
+          }}{{ deptBudgetList.sendDetailedAddress }}
         </ws-form-item>
         </ws-form-item>
         <!--发货人-->
         <!--发货人-->
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
@@ -62,7 +63,8 @@
         <!--收货地址-->
         <!--收货地址-->
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
           {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
           {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
-          }}{{ deptBudgetList.receiveArea }}{{ deptBudgetList.receiveDetailedAddress }}
+          }}{{ deptBudgetList.receiveArea
+          }}{{ deptBudgetList.receiveDetailedAddress }}
         </ws-form-item>
         </ws-form-item>
         <!--收货人-->
         <!--收货人-->
         <ws-form-item label="收货人" span="1" prop="receiver">
         <ws-form-item label="收货人" span="1" prop="receiver">
@@ -153,19 +155,29 @@
               />
               />
             </el-select>
             </el-select>
           </ws-form-item>
           </ws-form-item>
-          <ws-form-item
-              :label="'车厢号' "
-              span="1"
-              prop="boxNo"
-            >
-              <ws-input
-                v-model="item.boxNo"
-                placeholder="请输入车厢号"
-                maxlength="20"
-                size="small"
-              />
-            </ws-form-item>
+          <ws-form-item :label="'车厢号'" span="1" prop="boxNo">
+            <ws-input
+              v-model="item.boxNo"
+              placeholder="请输入车厢号"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--   -->
         </ws-info-table>
         </ws-info-table>
+        <!-- class="del" -->
+        <span
+          v-if="
+            item.status == '未装车' || item.status == '' || item.status == null
+          "
+          width="22"
+          height="22"
+          class="del"
+          @click="del(index, item)"
+          src="../../../public/img/del.png"
+          alt=""
+          >×</span
+        >
       </div>
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
         <img width="22" height="22" src="../../../public/img/add.png" alt="" />
         <img width="22" height="22" src="../../../public/img/add.png" alt="" />
@@ -174,11 +186,7 @@
     </ws-form>
     </ws-form>
     <!-- 提交 -->
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button
-        class="bg-bottom"
-        type="primary"
-        size="small"
-        @click="submit()"
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
         >提交</el-button
         >提交</el-button
       >
       >
     </div>
     </div>
@@ -186,7 +194,12 @@
 </template>
 </template>
 <script>
 <script>
 import { regionData } from 'element-china-area-data'
 import { regionData } from 'element-china-area-data'
-import { seeCat, dispatchCat, packList } from '@/model/transport/index'
+import {
+  seeCat,
+  dispatchCat,
+  packList,
+  delhaulagestage,
+} from '@/model/transport/index'
 import { getstaff } from '@/model/warehouse/index'
 import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -296,18 +309,35 @@ export default {
     // },
     // },
     add() {
     add() {
       this.deptBudgetList.tranCarInfoList.push({
       this.deptBudgetList.tranCarInfoList.push({
-        driver:this.deptBudgetList.tranCarInfoList[0].driver,
-        driverPhone:this.deptBudgetList.tranCarInfoList[0].driverPhone,
-        sendDateStart:this.deptBudgetList.tranCarInfoList[0].sendDateStart,
-        receiveDateEnd:this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
-        carModel:this.deptBudgetList.tranCarInfoList[0].carModel,
+        driver: this.deptBudgetList.tranCarInfoList[0].driver,
+        driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
+        sendDateStart: this.deptBudgetList.tranCarInfoList[0].sendDateStart,
+        receiveDateEnd: this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
+        carModel: this.deptBudgetList.tranCarInfoList[0].carModel,
         boxNo: '',
         boxNo: '',
-        tranType: '2'
+        tranType: '2',
       })
       })
     },
     },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
+    del(index, row) {
+      if (row.status == '未装车') {
+        this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+          delhaulagestage({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('删除成功')
+              if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                this.deptBudgetList.tranCarInfoList.splice(index, 1)
+              }
+            })
+        })
+      } else {
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+          this.deptBudgetList.tranCarInfoList.splice(index, 1)
+        }
       }
       }
     },
     },
     //下拉司机姓名改变事件
     //下拉司机姓名改变事件
@@ -374,7 +404,7 @@ export default {
             type: 'warning',
             type: 'warning',
           })
           })
           return
           return
-        } 
+        }
         if (!this.deptBudgetList.tranCarInfoList[i].boxNo) {
         if (!this.deptBudgetList.tranCarInfoList[i].boxNo) {
           this.$message({
           this.$message({
             message: '车厢号不能为空',
             message: '车厢号不能为空',
@@ -420,7 +450,7 @@ export default {
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
           this.deptBudgetList = response
           this.deptBudgetList = response
-          if (response.tranCarInfoList.length == 0) 
+          if (response.tranCarInfoList.length == 0)
             this.deptBudgetList.tranCarInfoList = [
             this.deptBudgetList.tranCarInfoList = [
               {
               {
                 driver: '',
                 driver: '',
@@ -429,7 +459,7 @@ export default {
                 receiveDateEnd: '',
                 receiveDateEnd: '',
                 carModel: '',
                 carModel: '',
                 boxNo: '',
                 boxNo: '',
-                tranType :'2'
+                tranType: '2',
               },
               },
             ]
             ]
         })
         })
@@ -510,20 +540,6 @@ export default {
 .position {
 .position {
   position: relative;
   position: relative;
 }
 }
-
-.del {
-  position: absolute;
-  // right: -38px;
-  top: 9px;
-  cursor: pointer;
-  right: 0;
-  display: inline-block;
-  font-size: 20px;
-  width: 16px;
-  height: 10px;
-  line-height: 0px;
-}
-
 .amap-page-container {
 .amap-page-container {
   width: 300px;
   width: 300px;
   height: 300px;
   height: 300px;
@@ -636,7 +652,14 @@ export default {
 .bg-bottom {
 .bg-bottom {
   margin: 15px 0px;
   margin: 15px 0px;
 }
 }
-
+.el-input--small {
+  font-size: 13px;
+}
+.el-input {
+  position: relative;
+  display: inline-block;
+  width: 86%;
+}
 .center {
 .center {
   width: 90%;
   width: 90%;
   margin: 0 auto;
   margin: 0 auto;
@@ -709,6 +732,13 @@ export default {
     padding: 0 !important;
     padding: 0 !important;
   }
   }
 }
 }
+//减号
+.del {
+  position: absolute;
+  cursor: pointer;
+  margin-left: 224px;
+  margin-top: -52px;
+}
 .winseaview-view {
 .winseaview-view {
   padding: 0 0 20px;
   padding: 0 0 20px;
 }
 }
@@ -821,7 +851,7 @@ export default {
   padding: 0 25px;
   padding: 0 25px;
   background: #f6f7fc;
   background: #f6f7fc;
 }
 }
-/deep/.liaison .ws-info-table .el-form-item .el-form-item__content{
+/deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
   padding: 0px;
   padding: 0px;
 }
 }
 </style>
 </style>