zhongtianhaoyuan 2 years ago
parent
commit
b4edf51114
1 changed files with 9 additions and 50 deletions
  1. 9 50
      src/views/orderManagement/orderAudit.vue

+ 9 - 50
src/views/orderManagement/orderAudit.vue

@@ -95,20 +95,7 @@
          </template>
         </el-table-column>
         <el-table-column prop="updateDate" label="更新时间" min-width="160"></el-table-column>
-        <el-table-column prop="cargoOwnerStatus" label="状态" min-width="92">
-          <template slot-scope="scope">
-            <span>{{scope.row.cargoOwnerStatus}}</span>
-            <el-popover
-              v-if='scope.row.terminator==1'
-              placement="top-start"
-              title="司机终止订单"
-              width="200"
-              trigger="hover">
-              <div v-html='scope.row.content'></div>
-              <i v-if='scope.row.cargoOwnerStatus=="已终止"' slot="reference" class="el-icon-question"></i>
-            </el-popover>
-          </template>
-        </el-table-column>
+        <el-table-column prop="cargoOwnerStatus" label="状态" min-width="92"></el-table-column>
         <el-table-column label="操作" min-width="350">
           <template slot-scope="scope">
             <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false"
@@ -139,16 +126,17 @@
                   <!-- 完结:支付完尾款后从未进行过完结操作前显示的操作。 -->
                 </el-dropdown-item>
                 <el-dropdown-item>
-                  <!-- v-if="scope.row.freightAdvance == 1" -->
+                  <!-- 运输中的可以付预付款-->
                   <el-link target="_blank" type="primary" :underline="false" v-if="scope.row.freightAdvance == '垫付'"
-                    :disabled="scope.row.cargoOwnerStatusKey != 13  && scope.row.payabled " @click="preMoneyChange(scope.row)">预付{{scope.row.cargoOwnerStatusKey}}</el-link>
+                    :disabled="scope.row.cargoOwnerStatusKey == 13?'true':'false' && scope.row.payabled " @click="preMoneyChange(scope.row)">预付</el-link>
                   <!-- 垫付类型的订单,平台确认装车后从未进行过预付操作(即预付款=0)时显示的按钮。 -->
                 </el-dropdown-item>
                 <!-- 货主订单状态key(1待接单3未装车5待确认装车7已驳回装车信息9待平台确认装车11平台驳回装车信息13运输中15待收货17已驳回卸车信息19待平台确认卸车21平台驳回卸车信息
                  * 23待结算25已结算27待还款29已还款31已完结33已终止) -->
                 <el-dropdown-item>
-                  <el-link target="_blank" type="primary" :underline="false"
-                    :disabled="scope.row.freightAdvance == '非垫付' && scope.row.cargoOwnerStatusKey < 19 " @click="tailmoneyChange(scope.row)">尾款</el-link>
+                  <!-- 垫付  待结算  未付过尾款的 -->
+                  <el-link target="_blank" type="primary" :underline="false" v-if="scope.row.freightAdvance == '垫付'"
+                    :disabled="scope.row.cargoOwnerStatusKey == 23?'false':'true' && scope.row.payabled == scope.row.payable" @click="tailmoneyChange(scope.row)">尾款</el-link>
                   <!-- 垫付类型的订单,平台确认卸车后从未进行过尾款操作(即尾款=0)时显示的按钮。 -->
                 </el-dropdown-item>
                 <el-dropdown-item>
@@ -240,8 +228,6 @@
           <div class="right_item">{{costData.hyCarrierInfo.estimatedFreight}}</div>
           <div class="right_title">装车时间</div>
           <div class="right_item">{{costData.hyCarrierInfo.loadingDate}}</div>
-          <div class="right_title">装车定位</div>
-          <div class="right_item">{{costData.hyCarrierInfo.loadingCity}}{{costData.hyCarrierInfo.loadingArea}}</div>
           <div class="right_title">装车照片</div>
           <div style="display: flex;" v-if="costData.hyCarrierInfo.loadingImg">
             <div v-for="(item,index) in costData.hyCarrierInfo.loadingImg.split(',')" :key="index">
@@ -252,8 +238,6 @@
           <div class="right_item">{{costData.hyCarrierInfo.totalFreight}}</div>
           <div class="right_title" v-if="costData.hyCarrierInfo.unloadingDate">卸车时间</div>
           <div class="right_item">{{costData.hyCarrierInfo.unloadingDate}}</div>
-          <div class="right_title">卸车定位</div>
-        <div class="right_item">{{costData.hyCarrierInfo.unloadingCity}}{{costData.hyCarrierInfo.unloadingArea}}</div>
           <div class="right_title" v-if="costData.hyCarrierInfo.unloadingImg">卸车照片</div>
           <div style="display: flex;" v-if="costData.hyCarrierInfo.unloadingImg">
             <div v-for="(item,index) in costData.hyCarrierInfo.unloadingImg.split(',')" :key="index">
@@ -347,12 +331,7 @@
       };
     },
     mounted() {
-      console.log(12212,this)
-      var that=this
-      this.$nextTick(()=>{
-        that.getList()
-      })
-      
+      this.getList()
     },
     methods: {
       //预付
@@ -381,6 +360,7 @@
               })
           })
       },
+      //尾款
       tailmoneyChange(val){
         // 合计运费-预付款-司机服务费=尾款
         let money = Number(val.actualFreight) - Number(val.prepaidFreight) - Number(val.driverServiceCharge)
@@ -435,7 +415,6 @@
         })
       },
       getList() {
-        console.log(222222)
         this.loading = true
         let _obj = {}
         _obj.currentPage = this.currentPage
@@ -445,26 +424,6 @@
         _obj.startDate = this.startDate
         _obj.endDate = this.endDate
         getListData(_obj).then(response => {
-          if(response.data.records){
-            for (let i = 0; i < response.data.records.length; i++) {
-              if(response.data.records[i].cargoOwnerStatus=='已终止'){
-                if(response.data.records[i].terminationReason==1){
-                  response.data.records[i].content='原因:已与货主协商<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==2){
-                  response.data.records[i].content='原因:货主原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==3){
-                  response.data.records[i].content='原因:司机个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }else if(response.data.records[i].terminationReason==4){
-                  response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
-                }
-                
-              }else{
-                response.data.records[i].content=''
-              }
-            }
-          }
-          
-          console.log(response.data.records)
             this.tableData = response.data.records
             this.deptBudgetTotal = response.data.total
             this.listLoading = false
@@ -588,7 +547,7 @@
         } else if (this.costData.orderStatusKey == 19) {
           _data.loadingFlag = 2
         }
-        this.$confirm('确定订单已完结?', '提示', {
+        this.$confirm('确定'+num==1?'通过':'驳回'+'订单?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',