ccjgmwz 3 gadi atpakaļ
vecāks
revīzija
b5d882ce32

+ 0 - 1
src/views/tranManagement/tranManagementShippingArrangemen.vue

@@ -569,7 +569,6 @@ export default {
       shippingLook({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          debugger
           this.deptBudgetList = response
           if (response.tranCarInfoList.length > 0) {
             if(response.tranCarInfoList[0].shipType =='集装箱') {

+ 18 - 19
src/views/tranManagement/tranManagementShippingFeedback.vue

@@ -334,8 +334,8 @@
             />           
           </el-upload>
           <div class="tupian">
-          <span v-if="deptBudgetList.tranCarInfoList[0].loadPoundImg != null " >1</span>
-          <span v-if="deptBudgetList.tranCarInfoList[0].loadPoundImg == null ">未上传</span>
+          <span v-if="deptBudgetList.tranCarInfoList && deptBudgetList.tranCarInfoList.length > 0 && deptBudgetList.tranCarInfoList[0].loadPoundImg != null " >1</span>
+          <span v-else>未上传</span>
           </div>
         </template>       
       </ws-form-item>
@@ -430,9 +430,6 @@ export default {
       staffList: [],
       options: [],
       carModel: [],
-      tranCarInfoList: {
-        loadPoundImg: '',
-      },
       //上传
       accessoryTFs: false,
       fileList: [],
@@ -505,6 +502,7 @@ export default {
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false
+      this.accessoryTFs = false
     },
     //下拉司机姓名改变事件
     selectdriver() {},
@@ -522,9 +520,6 @@ export default {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
     },
-    handleClose() {
-      this.accessoryTFs = false
-    },
     //导入
     import() {},
     //完货
@@ -640,7 +635,9 @@ export default {
             if (valid) {
               // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
-              this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
+              if(this.tranCarInfoList.length > 0){
+                this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
+              }
               // this.tranCarInfoList.boxNo = this.arr.toString()
               for (var i = 0; i < this.tranCarInfoList.length; i++) {
                 this.tranCarInfoList[i].id = this.freightspace[i].id
@@ -680,16 +677,18 @@ export default {
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
-          this.deptBudgetList.driver = response.tranCarInfoList[0].driver
-          this.deptBudgetList.driverPhone =
-            response.tranCarInfoList[0].driverPhone
-          this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
-          this.deptBudgetList.receiveDateEnd =
-            response.tranCarInfoList[0].receiveDateEnd
-          this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
-          this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
-          this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
-          this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
+          if(response.tranCarInfoList.length >0 ){
+            this.deptBudgetList.driver = response.tranCarInfoList[0].driver
+            this.deptBudgetList.driverPhone =
+              response.tranCarInfoList[0].driverPhone
+            this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
+            this.deptBudgetList.receiveDateEnd =
+              response.tranCarInfoList[0].receiveDateEnd
+            this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
+            this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
+            this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
+            this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
+          }
           //  this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
           this.freightspace = response.tranCarInfoList
           for (var i = 0; i < this.freightspace.length; i++) {

+ 1 - 1
src/views/tranManagement/tranManagementShippingLook.vue

@@ -180,7 +180,7 @@
           .toPromise()
           .then((response) => {
             this.deptBudgetList = response
-            if(response.tranCarInfoList[0].shipType =='集装箱') {
+            if(response.tranCarInfoList.length > 0 &&response.tranCarInfoList[0].shipType =='集装箱') {
               this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
 
             }else{