Ver código fonte

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhangyuewww 3 anos atrás
pai
commit
a528019052

+ 18 - 18
src/views/taskManagement/moveWarehouseTaskLook.vue

@@ -38,28 +38,28 @@
         <!--出货库-->
         <div class="library">
           <span style="margin-left: 14px"
-            >出货库:{{ this.shipment.sendWarehouse }}</span
+            >出货库:{{ shipment1.sendWarehouse }}</span
           >
-          <span style="margin-left: 10px">{{ this.shipment.taskStatus }}</span>
+          <span style="margin-left: 10px">{{ shipment1.taskStatus }}</span>
         </div>
         <!--出库经办人-->
         <ws-form-item label="出库经办人:" span="1" prop="agent">
-          {{ this.shipment.agent }}
+          {{shipment1.agent}}
         </ws-form-item>
         <el-divider direction="vertical" class="line"></el-divider>
         <!--出库重量(吨)-->
         <ws-form-item label="出库重量(吨):" span="1" prop="weight">
-          {{ shipment.weight }}
+          {{ shipment1.weight }}
         </ws-form-item>
         <el-divider direction="vertical" class="line"></el-divider>
         <!--仓位-->
         <ws-form-item label="仓位:" span="1" prop="deliveryVolume">
-          {{ shipment.binNumber == null ? '未指定' : shipment.binNumber }}
+          {{ shipment1.binNumber == null ? '未指定' : shipment1.binNumber }}
         </ws-form-item>
         <el-divider direction="vertical" class="line"></el-divider>
         <!--预计出库日期-->
         <ws-form-item label="预计出库日期:" span="1" prop="predictDate">
-          {{ shipment.predictDate }}
+          {{ shipment1.predictDate }}
         </ws-form-item>
       </ws-info-table>
       <!-- </div> -->
@@ -152,26 +152,26 @@
       />
       <div class="small-title" style="font-size: 16px">实际流转数量</div>
       <ws-info-table class="flow">
-        <el-table :data="weights" height="90" border style="width: 100%">
+        <el-table :data="weights"  border style="width: 100%">
           <el-table-column prop="weightOut" label="累计出库量(吨)">
           </el-table-column>
           <el-table-column prop="weightIn" label="累计入库量(吨)">
           </el-table-column>
           <el-table-column prop="transportLoss" label="累计运输损耗(吨)"> 
-            <!-- <template scope="scope">
-              {{weightOut}}
-            </template> -->
+            <template scope="scope">
+              {{scope.row.weightOut - scope.row.weightIn}}
+            </template>
           </el-table-column>
         </el-table>
       </ws-info-table>
       <ws-info-table class="flow1">
         <el-table :data="enter.inOutWarehouseTaskList"  border style="width: 100%">
           <el-table-column prop="weight" label="累计退库量(吨)">
-            <!-- <template>
-              <div>30</div>
-            </template> -->
+             <template >
+             {{this.enter.stockReturnCount}}
+            </template> 
              <template scope="scope">
-              {{scope.row.weight}}<span style="margin: 0 20px">至</span>{{scope.row.warehouseName}}
+              {{scope.row.weight}}<span style="margin: 0 30px">至</span>{{scope.row.warehouseName}}
               <div></div>
             </template> 
           </el-table-column>
@@ -237,6 +237,7 @@ export default {
       name: '',
       moveLookData: [],
       shipment: {},
+      shipment1:{},
       enter: {},
       moveTaskNo: '',
       weights:[
@@ -304,18 +305,16 @@ export default {
           for (var i = 0; i < this.moveLookData.length; i++) {
             if (this.moveLookData[i].inOutType == '移库出库') {
               this.shipment = this.moveLookData[i]
+              this.shipment1 = this.moveLookData[i]
                this.weightOut = this.moveLookData[i].weight
                this.$set(this.weights[0],'weightOut',this.moveLookData[i].weight)
-              // this.weights.splice(1,1,{weightOut:this.moveLookData[i].weight})
-
             } else  {
               // if (this.moveLookData[i].inOutType == '移库入库')
-              this.enter = this.shipment = this.moveLookData[i]
+               this.enter = this.shipment = this.moveLookData[i]
                 this.weightIn = this.moveLookData[i].weight
                 this.$set(this.weights[0],'weightIn',this.moveLookData[i].weight)
               this.businessDescribe = this.moveLookData[i].businessDescribe
             }
-            console.log(this.weights)
            this.transportLoss = this.weightOut - this.weightIn
             this.goodsName = this.moveLookData[0].goodsName
             this.grade = this.moveLookData[0].grade
@@ -324,6 +323,7 @@ export default {
             this.weight = this.moveLookData[0].weight
             this.unitPrice = this.moveLookData[0].unitPrice
           }
+          console.log(this.shipment1,"出库对象")
         })
     },
     selectChapterTwo(e) {

+ 177 - 67
src/views/taskManagement/tranManagementTransportEdit.vue

@@ -78,7 +78,7 @@
         </el-form-item>
         <el-form-item label="重量(吨)" span="1" prop="weight">
           <el-input
-          @input='weightchange'
+            @input="weightchange"
             v-model="deptBudgetList.weight"
             placeholder="请输入重量"
             maxlength="20"
@@ -87,14 +87,13 @@
         </el-form-item>
       </ws-info-table>
       <ws-info-table class="el-table">
-        <div class="start-address" style="width : 36%">
-          <el-radio-group @change='warehouseTypechange' v-model="deptBudgetList.warehouseType">
-          <el-radio label="1"
-            >常用仓库发货</el-radio
-          >
-          <el-radio label="2"
-            >临时仓库发货</el-radio
+        <div class="start-address" style="width: 36%">
+          <el-radio-group
+            @change="warehouseTypechange"
+            v-model="deptBudgetList.warehouseType"
           >
+            <el-radio label="1">常用仓库发货</el-radio>
+            <el-radio label="2">临时仓库发货</el-radio>
           </el-radio-group>
           <el-select
             v-model="deptBudgetList.sendWarehouse"
@@ -198,8 +197,11 @@
         :key="index"
       >
         <div class="driver">
-          <span style='vertical-align: top;'>运输阶段{{ index + 1 }} {{ item.processNo }}</span>
-          <img v-if='!endflag'
+          <span style="vertical-align: top"
+            >运输阶段{{ index + 1 }} {{ item.processNo }}</span
+          >
+          <img
+            v-if="!endflag"
             width="22"
             height="22"
             class="add"
@@ -216,13 +218,13 @@
             alt=""
           />
           <el-checkbox
-          @change='engflagchange'
-           class='endflag'
+            @change="engflagchange"
+            class="endflag"
             v-if="index == deptBudgetList.tranProcessInfoList.length - 1"
             v-model="item.endFlag"
             :label="1"
             >最终阶段</el-checkbox
-          >     
+          >
         </div>
         <ws-info-table>
           <el-form-item label="运输方式" span="1" prop="waterContent">
@@ -398,7 +400,7 @@ export default {
       checkList: [],
       deptBudgetList: {},
       radio: '1',
-      endflag:false,
+      endflag: false,
       carModelList: [],
       carLengthList: [],
       warehouseType: '1',
@@ -437,8 +439,8 @@ export default {
     },
   },
   methods: {
-    warehouseTypechange(){
-        getwarehousename({
+    warehouseTypechange() {
+      getwarehousename({
         compId: this.compId,
         warehouseType: this.deptBudgetList.warehouseType,
       })
@@ -447,57 +449,82 @@ export default {
           this.warehouseList = response
         })
     },
-    weightchange(e){
-      this.deptBudgetList.tranProcessInfoList[0].weight=e
+    weightchange(e) {
+      this.deptBudgetList.tranProcessInfoList[0].weight = e
     },
-    engflagchange(e){
-      this.endflag=e
+    engflagchange(e) {
+      this.endflag = e
     },
     loaddata() {
       examinetran({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          var tmp = []
-          tmp[0] = TextToCode[response.startPrivate].code
-          tmp[1] = TextToCode[response.startPrivate][response.startCity].code
-          tmp[2] =
-            TextToCode[response.startPrivate][response.startCity][
-              response.startArea
-            ].code
-          this.selectedOptions = tmp
-          var tmp1 = []
-          tmp1[0] = TextToCode[response.endPrivate].code
-          tmp1[1] = TextToCode[response.endPrivate][response.endCity].code
-          tmp1[2] =
-            TextToCode[response.endPrivate][response.endCity][
-              response.endArea
-            ].code
-          this.selectedOptions1 = tmp1
-          for (var i = 0; i < response.tranProcessInfoList.length; i++) {
-            var tmp2 = []
-            tmp2[0] =
-              TextToCode[response.tranProcessInfoList[i].sendPrivate].code
-            tmp2[1] =
-              TextToCode[response.tranProcessInfoList[i].sendPrivate][
-                response.tranProcessInfoList[i].sendCity
+          if (
+            response.startPrivate != null &&
+            response.startCity != null &&
+            response.startArea != null
+          ) {
+            var tmp = []
+            tmp[0] = TextToCode[response.startPrivate].code
+            tmp[1] = TextToCode[response.startPrivate][response.startCity].code
+            tmp[2] =
+              TextToCode[response.startPrivate][response.startCity][
+                response.startArea
               ].code
-            tmp2[2] =
-              TextToCode[response.tranProcessInfoList[i].sendPrivate][
-                response.tranProcessInfoList[i].sendCity
-              ][response.tranProcessInfoList[i].sendArea].code
-            response.tranProcessInfoList[i].selectedOptions = tmp2
-            var tmp3 = []
-            tmp3[0] =
-              TextToCode[response.tranProcessInfoList[i].receivePrivate].code
-            tmp3[1] =
-              TextToCode[response.tranProcessInfoList[i].receivePrivate][
-                response.tranProcessInfoList[i].receiveCity
+            this.selectedOptions = tmp
+          }
+          if (
+            response.endPrivate != null &&
+            response.endCity != null &&
+            response.endArea != null
+          ) {
+            var tmp1 = []
+            tmp1[0] = TextToCode[response.endPrivate].code
+            tmp1[1] = TextToCode[response.endPrivate][response.endCity].code
+            tmp1[2] =
+              TextToCode[response.endPrivate][response.endCity][
+                response.endArea
               ].code
-            tmp3[2] =
-              TextToCode[response.tranProcessInfoList[i].receivePrivate][
-                response.tranProcessInfoList[i].receiveCity
-              ][response.tranProcessInfoList[i].receiveArea].code
-            response.tranProcessInfoList[i].selectedOptions1 = tmp3
+            this.selectedOptions1 = tmp1
+          }
+
+          for (var i = 0; i < response.tranProcessInfoList.length; i++) {
+            if (
+              response.tranProcessInfoList[i].sendPrivate != '' &&
+              response.tranProcessInfoList[i].sendCity != '' &&
+              response.tranProcessInfoList[i].sendArea != ''
+            ) {
+              var tmp2 = []
+              tmp2[0] =
+                TextToCode[response.tranProcessInfoList[i].sendPrivate].code
+              tmp2[1] =
+                TextToCode[response.tranProcessInfoList[i].sendPrivate][
+                  response.tranProcessInfoList[i].sendCity
+                ].code
+              tmp2[2] =
+                TextToCode[response.tranProcessInfoList[i].sendPrivate][
+                  response.tranProcessInfoList[i].sendCity
+                ][response.tranProcessInfoList[i].sendArea].code
+              response.tranProcessInfoList[i].selectedOptions = tmp2
+            }
+            if (
+              response.tranProcessInfoList[i].receivePrivate != '' &&
+              response.tranProcessInfoList[i].receiveCity != '' &&
+              response.tranProcessInfoList[i].receiveArea != ''
+            ) {
+              var tmp3 = []
+              tmp3[0] =
+                TextToCode[response.tranProcessInfoList[i].receivePrivate].code
+              tmp3[1] =
+                TextToCode[response.tranProcessInfoList[i].receivePrivate][
+                  response.tranProcessInfoList[i].receiveCity
+                ].code
+              tmp3[2] =
+                TextToCode[response.tranProcessInfoList[i].receivePrivate][
+                  response.tranProcessInfoList[i].receiveCity
+                ][response.tranProcessInfoList[i].receiveArea].code
+              response.tranProcessInfoList[i].selectedOptions1 = tmp3
+            }
           }
           this.checkList = response.tranType.split(',')
           this.deptBudgetList = response
@@ -631,6 +658,87 @@ export default {
           ) {
             this.deptBudgetList.tranProcessInfoList[i].processNo =
               this.deptBudgetList.taskNo + (i + 1)
+            if (
+              new Date(
+                this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart
+              ).getTime() >
+              new Date(
+                this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd
+              ).getTime()
+            ) {
+              this.$message({
+                message: '发货日期不能大于最晚到货日期',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart) {
+              this.$message({
+                message: '发货日期不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd) {
+              this.$message({
+                message: '最晚到货日期不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].weight) {
+              this.$message({
+                message: '重量不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].sender) {
+              this.$message({
+                message: '发货人不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].senderPhone) {
+              this.$message({
+                message: '发货人电话不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].receiver) {
+              this.$message({
+                message: '收货人不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (!this.deptBudgetList.tranProcessInfoList[i].receiverPhone) {
+              this.$message({
+                message: '收货人电话不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (
+              !this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress
+            ) {
+              this.$message({
+                message: '收获详细地址不能为空',
+                type: 'warning',
+              })
+              return
+            }
+            if (
+              !this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress
+            ) {
+              this.$message({
+                message: '发货详细地址不能为空',
+                type: 'warning',
+              })
+              return
+            }
           }
           this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
           this.deptBudgetList.tranType = this.checkList.toString()
@@ -666,9 +774,9 @@ export default {
 .position .ws-info-table .el-form-item {
   width: 25%;
 }
-.typeselect{
-  width:42%;
-  margin-left:32px;
+.typeselect {
+  width: 42%;
+  margin-left: 32px;
 }
 /deep/.position .ws-info-table .el-form-item .el-form-item__label,
 /deep/.position .ws-info-table .el-form-item .el-form-item__content {
@@ -700,8 +808,10 @@ export default {
   color: #8890b1;
   font-size: 14px;
 }
-/deep/.el-table--border:after, /deep/.el-table--group:after, /deep/.el-table:before {
-  background:transparent;
+/deep/.el-table--border:after,
+/deep/.el-table--group:after,
+/deep/.el-table:before {
+  background: transparent;
 }
 .el-form {
   padding: 0 10%;
@@ -801,8 +911,8 @@ export default {
   font-size: 16px;
   color: #5473e8;
 }
-.el-form{
-      height: 73vh;
-    overflow: scroll;
+.el-form {
+  height: 73vh;
+  overflow: scroll;
 }
 </style>

+ 1 - 3
src/views/tranManagement/tranManagementDriverEdit.vue

@@ -544,10 +544,8 @@ export default {
             TextToCode[this.deptBudgetList.residentCityProvincial][
               this.deptBudgetList.residentCityMunicipal
             ].code
-          this.selectedOptions = tmp
-           
+          this.selectedOptions = tmp         
         })
-      console.log(11111)
       // 车型
       packList({ constId: 'TRAN1' })
         .toPromise()