Explorar o código

Merge branch 'master' of http://git.zthymaoyi.com:3000/gdc/yiliangyiyun-pc

gjy %!s(int64=3) %!d(string=hai) anos
pai
achega
eebf681156

+ 2 - 9
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -1479,8 +1479,6 @@ export default {
           }else{ 
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }
           }
-          
-
           addList(this.deptBudgetList)
           addList(this.deptBudgetList)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
@@ -1495,14 +1493,8 @@ export default {
               }
               }
               this.$router.push({ path: 'futuresPurchaseContract' })
               this.$router.push({ path: 'futuresPurchaseContract' })
             })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
           return false
         }
         }
       })
       })
@@ -1587,6 +1579,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
         }
       }
       }
     },
     },

+ 3 - 8
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -1457,7 +1457,7 @@ export default {
           }else{ 
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }
           }
-
+          debugger
           addList(this.deptBudgetList)
           addList(this.deptBudgetList)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
@@ -1472,14 +1472,8 @@ export default {
               }
               }
               this.$router.push({ path: 'futuresSalesContract' })
               this.$router.push({ path: 'futuresSalesContract' })
             })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+         EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
           return false
         }
         }
       })
       })
@@ -1564,6 +1558,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+           this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
         }
       }
       }
     },
     },

+ 3 - 9
src/views/contractManagement/purchaseContractAdd.vue

@@ -1327,7 +1327,6 @@ export default {
           } else {
           } else {
             this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
             this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
           }
           }
-
           addList(this.deptBudgetList)
           addList(this.deptBudgetList)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
@@ -1342,14 +1341,8 @@ export default {
               }
               }
               this.$router.push({ path: 'buyContract' })
               this.$router.push({ path: 'buyContract' })
             })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
           return false
         }
         }
       })
       })
@@ -1427,8 +1420,9 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
         }
-      }
+      } 
     },
     },
     selectpackingMethod(e) {
     selectpackingMethod(e) {
       for (var i = 0; i < this.packtypeList.length; i++) {
       for (var i = 0; i < this.packtypeList.length; i++) {

+ 2 - 1
src/views/contractManagement/salesContractAdd.vue

@@ -354,7 +354,7 @@
               v-model="deptBudgetList.contractGoodsInfo.goodsName"
               v-model="deptBudgetList.contractGoodsInfo.goodsName"
               placeholder=""
               placeholder=""
               class="typeselect"
               class="typeselect"
-              @change="selectpackingMethod"
+              @change="selectgoodsName"
             >
             >
               <ws-option
               <ws-option
                 v-for="item in goodnameList"
                 v-for="item in goodnameList"
@@ -1410,6 +1410,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+           this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
         }
       }
       }
     },
     },

+ 0 - 1
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -1057,7 +1057,6 @@ export default {
                   ) {
                   ) {
                     this.deptBudgetList.tranProcessInfoList[i].sort = i
                     this.deptBudgetList.tranProcessInfoList[i].sort = i
                   }
                   }
-
                 addtrantask(this.deptBudgetList)
                 addtrantask(this.deptBudgetList)
                   .toPromise()
                   .toPromise()
                   .then((response) => {
                   .then((response) => {

+ 37 - 11
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -107,7 +107,7 @@
       >
       >
         <div class="trucks">
         <div class="trucks">
           <div class="driver">
           <div class="driver">
-            <span class="driver">货车信息-{{ index + 1 }}</span>         
+            <span class="driver">货车信息-{{ index + 1 }}</span>
             <img
             <img
               width="22"
               width="22"
               height="22"
               height="22"
@@ -222,7 +222,7 @@
       >
       >
         <div class="gathering">
         <div class="gathering">
           <div class="driver">
           <div class="driver">
-        收款人账户信息-{{ index + 1 }}
+            收款人账户信息-{{ index + 1 }}
             <img
             <img
               width="22"
               width="22"
               height="22"
               height="22"
@@ -745,6 +745,31 @@ export default {
       this.selectedOptions = value
       this.selectedOptions = value
     },
     },
     returnsales() {
     returnsales() {
+      this.deptBudgetList = {}
+      this.freightspace = [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ]
+      this.freightspace1 = [
+        {
+          accountTypeFlag: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          addressUrlArray: [],
+          bankCard: '',
+        },
+      ]
+      this.addressUrls = {},
+      this.selectedOptions = [],
       this.$router.go(-1)
       this.$router.go(-1)
     },
     },
     // confirmPosition() {
     // confirmPosition() {
@@ -963,7 +988,9 @@ export default {
                   addressUrlArray: [],
                   addressUrlArray: [],
                   bankCard: '',
                   bankCard: '',
                 },
                 },
-              ]
+              ],
+              this.addressUrls = {},
+              this.selectedOptions = [],
               this.$router.go(-1)
               this.$router.go(-1)
             })
             })
         } else {
         } else {
@@ -985,7 +1012,7 @@ export default {
   background: #f6f7fc;
   background: #f6f7fc;
   height: 124px;
   height: 124px;
   margin-top: 20px;
   margin-top: 20px;
-  border: 1px solid #D8DCE6;
+  border: 1px solid #d8dce6;
   border-radius: 3px;
   border-radius: 3px;
 }
 }
 .add,
 .add,
@@ -1137,9 +1164,9 @@ export default {
 }
 }
 .el-form-item.el-car.el-form-item--small {
 .el-form-item.el-car.el-form-item--small {
   width: 33.33%;
   width: 33.33%;
-  border-top: 1px solid #D8DCE6;
+  border-top: 1px solid #d8dce6;
   border-bottom: 0px;
   border-bottom: 0px;
-  background: #F6F7FC;
+  background: #f6f7fc;
 }
 }
 .trucks {
 .trucks {
   color: #69708c;
   color: #69708c;
@@ -1172,7 +1199,6 @@ export default {
 }
 }
 .gathering {
 .gathering {
   background: #f5f7fa;
   background: #f5f7fa;
-  
 }
 }
 /deep/.gathering .ws-info-table {
 /deep/.gathering .ws-info-table {
   border-left: none;
   border-left: none;
@@ -1189,17 +1215,17 @@ export default {
 /deep/.gathering .el-form-item .el-form-item__label {
 /deep/.gathering .el-form-item .el-form-item__label {
   background: #f5f7fa;
   background: #f5f7fa;
   text-align: center;
   text-align: center;
-  border-right: 1px solid #D8DCE6;
+  border-right: 1px solid #d8dce6;
   width: 140px;
   width: 140px;
 }
 }
 /deep/.gathering .ws-info-table .el-form-item .el-form-item__content {
 /deep/.gathering .ws-info-table .el-form-item .el-form-item__content {
-  border:none;
-  background: #F6F7FC;
+  border: none;
+  background: #f6f7fc;
 }
 }
 /deep/.gathering .ws-info-table .el-form-item.compname,
 /deep/.gathering .ws-info-table .el-form-item.compname,
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit,
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit,
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit1 {
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit1 {
-  border:none;
+  border: none;
 }
 }
 /deep/.gathering .ws-info-table .el-form-item.compname {
 /deep/.gathering .ws-info-table .el-form-item.compname {
   width: 100%;
   width: 100%;

+ 33 - 16
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -117,11 +117,11 @@
           <el-button type="primary">导入</el-button>
           <el-button type="primary">导入</el-button>
         </el-upload>
         </el-upload>
       </div>
       </div>
-      <div class="liaison">
+      <div class="liaison" v-if="file_is_show">
         <div
         <div
           style="width: 100%"
           style="width: 100%"
           class="flex position"
           class="flex position"
-          v-for="(item, index) in this.freightspace"
+          v-for="(item, index) in freightspace"
           :key="index"
           :key="index"
         >
         >
           <ws-info-table>
           <ws-info-table>
@@ -150,8 +150,8 @@
             </ws-form-item>
             </ws-form-item>
             <!--磅单-->
             <!--磅单-->
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
-              <!-- slot-scope="scope" -->
               <template>
               <template>
+                <!-- slot-scope="scope" -->
                 <el-upload
                 <el-upload
                   action="https://www.zthymaoyi.com/upload/admin"
                   action="https://www.zthymaoyi.com/upload/admin"
                   :show-file-list="false"
                   :show-file-list="false"
@@ -171,16 +171,8 @@
                     alt
                     alt
                   />
                   />
                 </el-upload>
                 </el-upload>
-                <span
-                  v-if="
-                    deptBudgetList.tranCarInfoList.length>0 && deptBudgetList.tranCarInfoList[0].loadPoundImg
-                  "
-                >1</span>
-                <span
-                  v-if="
-                     deptBudgetList.tranCarInfoList.length>0 && !deptBudgetList.tranCarInfoList[0].loadPoundImg
-                  "
-                >未上传</span>
+                <span v-show="item.imgCount > 0">{{item.imgCount}}</span>
+                <span v-show="item.imgCount == 0">未上传</span>
               </template>
               </template>
             </ws-form-item>
             </ws-form-item>
             <!--装车日期-->
             <!--装车日期-->
@@ -290,10 +282,20 @@ export default {
     },
     },
     isShow(val) {
     isShow(val) {
       this.showType = val
       this.showType = val
+    },
+       freightspace(newVal) {debugger
+        this.file_is_show = false
+        if (true) {
+            this.$nextTick(()=>{ // $nextTick 是在 DOM 更新循环结束之后执行延迟回调
+                this.file_is_show = true
+            })
+        }
     }
     }
   },
   },
   data() {
   data() {
     return {
     return {
+      index:0,
+      file_is_show:true,
       deptBudgetList: {
       deptBudgetList: {
         totalStorage: 0
         totalStorage: 0
       },
       },
@@ -347,7 +349,8 @@ export default {
           boxNo: '',
           boxNo: '',
           loadNetWeight: '',
           loadNetWeight: '',
           loadPoundImg: '',
           loadPoundImg: '',
-          loadingDate: ''
+          loadingDate: '',
+          imgCount:0
         }
         }
         // {loadPoundImg:{}},
         // {loadPoundImg:{}},
       ],
       ],
@@ -369,7 +372,7 @@ export default {
       //上传
       //上传
       accessoryTFs: false,
       accessoryTFs: false,
       fileList: [],
       fileList: [],
-      appendixIdsAdd: ''
+      appendixIdsAdd: '',
     }
     }
   },
   },
   activated() {
   activated() {
@@ -678,11 +681,25 @@ export default {
             if (!this.freightspace[i].loadNetWeight) {
             if (!this.freightspace[i].loadNetWeight) {
               this.freightspace[i].loadNetWeight = 0
               this.freightspace[i].loadNetWeight = 0
             }
             }
+            if(this.freightspace[i].loadPoundImg){
+               this.freightspace[i].imgCount = this.freightspace[i].loadPoundImg.split(",").length
+            }else{
+               this.freightspace[i].loadPoundImg = ""
+               this.freightspace[i].imgCount = 0
+            }
           }
           }
         })
         })
     },
     },
     uploadSuccessHandle1(e, index) {
     uploadSuccessHandle1(e, index) {
-      this.freightspace[index].loadPoundImg = e.url
+      this.index = index
+      let that = this;
+      setTimeout(function(){ 
+      that.freightspace[that.index].imgCount++
+      console.log(that.freightspace[that.index].imgCount)
+      that.freightspace[that.index].loadPoundImg += e.url+","
+      console.log( that.freightspace[that.index].loadPoundImg)
+      console.log( that.freightspace,"成功后")},1000)
+
     }
     }
   }
   }
 }
 }

+ 12 - 8
src/views/tranManagement/tranManagementShippingFeedback.vue

@@ -235,7 +235,8 @@
         </div>
         </div>
       </div>
       </div>
       <div class="yd-bottom">
       <div class="yd-bottom">
-        <ws-form-item label="运单:" span="1" prop="loadPoundImg" class="yd-bottom-left">
+       
+        <ws-form-item label="运单:" span="1" prop="loadPoundImg" class="yd-bottom-left" v-if="freightspace[0].status == '已装车'">
           <!-- slot-scope="scope" -->
           <!-- slot-scope="scope" -->
           <template>
           <template>
             <el-upload
             <el-upload
@@ -700,10 +701,8 @@ export default {
         .then(() => {
         .then(() => {
           this.$refs.deptBudgetList.validate(valid => {
           this.$refs.deptBudgetList.validate(valid => {
             if (valid) {
             if (valid) {
-              // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
               this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
-              // this.tranCarInfoList.boxNo = this.arr.toString()
               for (var i = 0; i < this.tranCarInfoList.length; i++) {
               for (var i = 0; i < this.tranCarInfoList.length; i++) {
                 this.tranCarInfoList[i].id = this.freightspace[i].id
                 this.tranCarInfoList[i].id = this.freightspace[i].id
               }
               }
@@ -712,7 +711,6 @@ export default {
               tranProcessInfo.infoId = this.deptBudgetList.infoId
               tranProcessInfo.infoId = this.deptBudgetList.infoId
               tranProcessInfo.processNo = this.deptBudgetList.processNo
               tranProcessInfo.processNo = this.deptBudgetList.processNo
               tranProcessInfo.tranCarInfoList = this.tranCarInfoList
               tranProcessInfo.tranCarInfoList = this.tranCarInfoList
-              // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
               feedback(tranProcessInfo)
               feedback(tranProcessInfo)
                 .toPromise()
                 .toPromise()
                 .then(response => {
                 .then(response => {
@@ -756,9 +754,9 @@ export default {
             this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
             this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
             this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
             this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
             this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
             this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
-            this.deptBudgetList.boxNumber =
-              response.tranCarInfoList[0].boxNumber
-            //  this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
+            this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
+            //上传附件计数
+            this.pictureTotal =  this.deptBudgetList.tranCarInfoList[0].loadPoundImg.split(",").length
             this.freightspace = response.tranCarInfoList
             this.freightspace = response.tranCarInfoList
           }
           }
 
 
@@ -823,12 +821,18 @@ export default {
       }
       }
     },
     },
     uploadSuccessHandle1(e) {
     uploadSuccessHandle1(e) {
-      this.pictureTotal++;
+      this.pictureTotal++; 
       if (this.deptBudgetList.tranCarInfoList[0].loadPoundImg) {
       if (this.deptBudgetList.tranCarInfoList[0].loadPoundImg) {
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg += ',' + e.url
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg += ',' + e.url
       } else {
       } else {
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg = e.url
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg = e.url
       }
       }
+
+      console.log(this.deptBudgetList.tranCarInfoList,"duixiang1")
+       feedback(this.deptBudgetList)
+                .toPromise()
+                .then(response => {
+                })
     }
     }
   }
   }
 }
 }

+ 17 - 3
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -489,9 +489,20 @@ export default {
       this.$router.go(-1)
       this.$router.go(-1)
     },
     },
     del(index, row) {
     del(index, row) {
+      debugger
       if(row.status == null){
       if(row.status == null){
         if (this.deptBudgetList.tranCarInfoList.length > 1) {
         if (this.deptBudgetList.tranCarInfoList.length > 1) {
                   this.deptBudgetList.tranCarInfoList.splice(index, 1)
                   this.deptBudgetList.tranCarInfoList.splice(index, 1)
+                  for(let i = index;i<this.deptBudgetList.tranCarInfoList.length;i++){
+                    let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1])-1
+                    if(number < 10){
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C00" + number
+                    }else if(number < 100){
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C0" + number
+                    }else{
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C" + number
+                    }   
+                  }
                }
                }
       }else{
       }else{
       this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
       this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
@@ -533,7 +544,8 @@ export default {
                 carNumber: '',
                 carNumber: '',
                 disabled: false,
                 disabled: false,
                 tranType: '1',
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
                 tranPrice:this.deptBudgetList.tranPrice
               })
               })
           }
           }
@@ -551,7 +563,8 @@ export default {
                 carNumber: '',
                 carNumber: '',
                 disabled: false,
                 disabled: false,
                 tranType: '1',
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
                 tranPrice:this.deptBudgetList.tranPrice
               })
               })
           }
           }
@@ -569,7 +582,8 @@ export default {
                 carNumber: '',
                 carNumber: '',
                 disabled: false,
                 disabled: false,
                 tranType: '1',
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                 tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
                 tranPrice:this.deptBudgetList.tranPrice
               })
               })
           }
           }

+ 0 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -1051,8 +1051,6 @@ export default {
           return
           return
         }
         }
       }
       }
-      console.log(this.deptBudgetList,"入库对象")
-      return
       this.deptBudgetList.id = this.$route.query.id
       this.deptBudgetList.id = this.$route.query.id
       this.$confirm(`确定提交入库信息`, {
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',