瀏覽代碼

前端gjy

gjy 3 年之前
父節點
當前提交
31ce9836a6
共有 1 個文件被更改,包括 57 次插入29 次删除
  1. 57 29
      src/views/financialManagement/collectionManagementList.vue

+ 57 - 29
src/views/financialManagement/collectionManagementList.vue

@@ -4,7 +4,6 @@
     <BaseHeaderLayout :leftSpan="15">
     <BaseHeaderLayout :leftSpan="15">
     <template slot="left"> </template>
     <template slot="left"> </template>
       <template slot="right">
       <template slot="right">
-        <span style="width: 91px; display: inline-block;color: #8890B1;">状态:</span>
         <ws-select
         <ws-select
           v-model="searchTypeText"
           v-model="searchTypeText"
           placeholder=""
           placeholder=""
@@ -121,7 +120,7 @@
             />
             />
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-         <div style="text-align: left; color: #8890b1; font-size: 16px; margin-left: 309px; margin-top: -21px;">
+         <div style="text-align: left; color: #8890b1; font-size: 16px; margin-left: 309px; margin-top: -32px;">
            共 {{ total }} 车,发 {{  current }} 辆
            共 {{ total }} 车,发 {{  current }} 辆
           </div> 
           </div> 
         <el-table :data="freightspace" style="width: 100%" height="560">
         <el-table :data="freightspace" style="width: 100%" height="560">
@@ -218,8 +217,8 @@ export default {
       currentPage: 1,
       currentPage: 1,
       pageSize: 10,
       pageSize: 10,
       appendixIdsAdd: '',
       appendixIdsAdd: '',
-      searchType: 1,
-      searchTypeText: '',
+      searchType: '',
+      searchTypeText: '全部',
       searchKeyWord: '',
       searchKeyWord: '',
       contractType: 2,
       contractType: 2,
       goodsType: 2,
       goodsType: 2,
@@ -277,6 +276,7 @@ export default {
       dataList: {},
       dataList: {},
       staffQO: {},
       staffQO: {},
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
+      roleId: sessionStorage.getItem('ws-pf_roleId'),
       pickerBeginDateBefore: {
       pickerBeginDateBefore: {
         disabledDate: time => {
         disabledDate: time => {
           return time.getTime() > Date.now()
           return time.getTime() > Date.now()
@@ -321,17 +321,24 @@ export default {
   methods: {
   methods: {
     changeCarNo(e) {
     changeCarNo(e) {
       this.$forceUpdate()
       this.$forceUpdate()
-      this.freightspace[0].carNo = e
+      this.$set(this.freightspace[0],'carNo',e)
+      // this.freightspace[0].carNo = e
     },
     },
     changeBoxNo(e) {
     changeBoxNo(e) {
       this.$forceUpdate()
       this.$forceUpdate()
-      this.freightspace[0].boxNo = e
+      this.$set(this.freightspace[0],'boxNo',e)
+      // this.freightspace[0].boxNo = e
     },
     },
     changeTitleNo(e) {
     changeTitleNo(e) {
       this.$forceUpdate()
       this.$forceUpdate()
-      this.freightspace[0].titleNo = e
+      this.$set(this.freightspace[0],'titleNo',e)
+      // this.freightspace[0].titleNo = e
     },
     },
     dianlog(item) {
     dianlog(item) {
+      // if(this.roleId!='fd0fce5697ad4eb6b24b4a2100969608'){
+      //   this.$message.warning('您未获得该权限')
+      //   return
+      // }
       this.paifaDialogForm.contractNo = item.contractNo
       this.paifaDialogForm.contractNo = item.contractNo
       this.planId = item.planId
       this.planId = item.planId
       this.goodsName = item.goodsName
       this.goodsName = item.goodsName
@@ -349,19 +356,32 @@ export default {
         .toPromise()
         .toPromise()
         .then(response => {
         .then(response => {
           // this.index = response.length + 1
           // this.index = response.length + 1
-          this.freightspace = response
-          this.freightspace.unshift({
+          var tmp1='C00'
+          if(response.length>0){
+            this.freightspace = response
+          }else{
+            this.freightspace=[{
             carNo: '',
             carNo: '',
             boxNo: '',
             boxNo: '',
             titleNo: '',
             titleNo: '',
-            tranCarNo: '',
+            tranCarNo: 'C001',
             agent: ''
             agent: ''
-          })
-          for (var i = 0; i < this.freightspace.length; i++) {
-            var index = i + 1
-            this.freightspace[this.freightspace.length - 1 - i].tranCarNo =
-              'C00' + index
+          }]
           }
           }
+          
+          if(this.freightspace.length+1>=10){
+            tmp1='C0'
+          }if(this.freightspace.length+1>=100){
+            tmp1='C'
+          }
+          this.freightspace.unshift({
+            carNo: '',
+            boxNo: '',
+            titleNo: '',
+            tranCarNo: tmp1+(this.freightspace.length+1),
+            agent: this.freightspace[1].agent
+          })
+          
         })
         })
 
 
       this.staffQO.roleId = 'd6a5c8a52da544309259f91f75de1ec6'
       this.staffQO.roleId = 'd6a5c8a52da544309259f91f75de1ec6'
@@ -515,14 +535,15 @@ export default {
     //   }
     //   }
     // },
     // },
     add1(item) {
     add1(item) {
-          if (!this.freightspace.carNo) {
+      console.log(this.freightspace[0],this.freightspace[0].carNo.length)
+          if (!this.freightspace[0].carNo) {
         this.$message({
         this.$message({
            message: '车牌号不能为空',
            message: '车牌号不能为空',
              type: 'warning'
              type: 'warning'
         })
         })
         return
         return
       }
       }
-      if (this.freightspace.carNo.length <= 7) {
+      if (this.freightspace[0].carNo.length != 7) {
         this.$message({
         this.$message({
           message: '车牌号输入有误',
           message: '车牌号输入有误',
           type: 'warning'
           type: 'warning'
@@ -530,8 +551,8 @@ export default {
         return
         return
       }
       }
       if (
       if (
-        !this.freightspace.boxNo.length < 1 ||
-        this.freightspace.boxNo.length > 15
+        this.freightspace[0].boxNo.length < 1 ||
+        this.freightspace[0].boxNo.length > 15
       ) {
       ) {
         this.$message({
         this.$message({
           message: '箱号输入错误',
           message: '箱号输入错误',
@@ -539,7 +560,7 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (!this.freightspace.boxNo) {
+      if (!this.freightspace[0].boxNo) {
         this.$message({
         this.$message({
           message: '箱号不能为空',
           message: '箱号不能为空',
           type: 'warning'
           type: 'warning'
@@ -547,8 +568,8 @@ export default {
         return
         return
       }
       }
       if (
       if (
-        this.freightspace.titleNo.length < 1 ||
-        this.freightspace.titleNo.length > 15
+        this.freightspace[0].titleNo.length < 1 ||
+        this.freightspace[0].titleNo.length > 15
       ) {
       ) {
         this.$message({
         this.$message({
           message: '封号输入错误',
           message: '封号输入错误',
@@ -556,7 +577,7 @@ export default {
         })
         })
         return
         return
       }
       }
-      if (!this.freightspace.titleNo) {
+      if (!this.freightspace[0].titleNo) {
         this.$message({
         this.$message({
           message: '封号不能为空',
           message: '封号不能为空',
           type: 'warning'
           type: 'warning'
@@ -566,6 +587,13 @@ export default {
       console.log(this.planId)
       console.log(this.planId)
       var tmp = this.freightspace[0].agent
       var tmp = this.freightspace[0].agent
       var tmp1 = this.freightspace.length + 1
       var tmp1 = this.freightspace.length + 1
+      var tmp2='C00'
+      if(tmp1>=10){
+        tmp2='C0'
+      }
+      if(tmp1>=100){
+        tmp2='C'
+      }
       this.freightspace.unshift({
       this.freightspace.unshift({
         carNo: '',
         carNo: '',
         boxNo: '',
         boxNo: '',
@@ -574,7 +602,7 @@ export default {
         staffId: this.staffId,
         staffId: this.staffId,
         goodsName: this.goodsName,
         goodsName: this.goodsName,
         buyer: this.buyer,
         buyer: this.buyer,
-        tranCarNo: 'C00' + tmp1,
+        tranCarNo: tmp2 + tmp1,
         agent: tmp
         agent: tmp
       })
       })
       item.planId = this.planId
       item.planId = this.planId
@@ -585,8 +613,9 @@ export default {
 
 
       paifa(item)
       paifa(item)
         .toPromise()
         .toPromise()
-        .then(response => {})
-      this.freightspace = response
+        .then(response => {
+          this.refresh()
+        })
     },
     },
     editClick(row) {
     editClick(row) {
       var status = ''
       var status = ''
@@ -624,6 +653,7 @@ export default {
           this.searchType = this.taskTypeList[i].type
           this.searchType = this.taskTypeList[i].type
         }
         }
       }
       }
+      this.getList()
     },
     },
      find() {
      find() {
       if (this.inOutDate != null) {
       if (this.inOutDate != null) {
@@ -804,6 +834,7 @@ export default {
 }
 }
 .typeselect {
 .typeselect {
   width: 500px;
   width: 500px;
+  margin-right:10px;
 }
 }
 .padding-xs {
 .padding-xs {
   padding: 15px;
   padding: 15px;
@@ -991,9 +1022,6 @@ export default {
   border-bottom-left-radius: 0px;
   border-bottom-left-radius: 0px;
   margin-top: -1px;
   margin-top: -1px;
 }
 }
-/deep/.typeselect .el-input__inner {
-  color: #8890b1;
-}
 .car {
 .car {
   width: 100px;
   width: 100px;
   margin-left: 131px;
   margin-left: 131px;