高敬炎 2 سال پیش
والد
کامیت
865083173a
3فایلهای تغییر یافته به همراه47 افزوده شده و 4 حذف شده
  1. 8 0
      src/api/orderManagement.js
  2. 38 3
      src/views/orderManagement/orderAudit.vue
  3. 1 1
      vue.config.js

+ 8 - 0
src/api/orderManagement.js

@@ -81,4 +81,12 @@ export function tailMoney(data) {
     method: 'post',
     data: data,
   })
+}
+// 平台编辑实际运费
+export function editFreight(data) {
+  return request({
+    url: '/orderInfo/api/editFreight',
+    method: 'post',
+     data: data,
+  })
 }

+ 38 - 3
src/views/orderManagement/orderAudit.vue

@@ -79,8 +79,21 @@
             {{scope.row.cargoOwnerStatusKey > 3 ? scope.row.freight : ""}}
           </template>
         </el-table-column> -->
-        <el-table-column prop="freight" label="预计运费(元)"></el-table-column>
-        <el-table-column prop="actualFreight" label="实际运费(元)"></el-table-column>
+        <el-table-column prop="freight" label="预计运费">
+          <template slot-scope="scope">
+            {{scope.row.billingMethod == 0 ? scope.row.freight+'元/吨':scope.row.freight+'元/车' }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="actualFreight" label="实际运费(元)" width="120">
+          <template slot-scope="scope">
+            <div style="display:flex;align-items: center;justify-content: center;">
+              <div v-if='!scope.row.editactualFreight'>{{scope.row.actualFreight}}</div>
+              <div v-else><el-input v-model="scope.row.actualFreight" placeholder="请输入内容"></el-input></div>
+              <i v-if="scope.row.cargoOwnerStatus=='待付款'" @click="edit(scope.row)" :class="scope.row.editactualFreight?'el-icon-check':'el-icon-edit'"></i>
+            </div>
+            
+          </template>
+        </el-table-column>
         <el-table-column prop="advanceCharge" label="预付运费(元)"></el-table-column>
         <el-table-column prop="amountMoney" label="司机费用结算">
           <!-- <el-table-column prop="driverServiceCharge" label="服务费(元)"></el-table-column> -->
@@ -376,7 +389,8 @@ import {
   editEndData,
   batchData,
   preMoney,
-  tailMoney
+  tailMoney,
+  editFreight
 } from '@/api/orderManagement'
 export default {
   components: {
@@ -420,6 +434,26 @@ export default {
     this.getList()
   },
   methods: {
+    edit(row){
+      if(row.editactualFreight){
+        editFreight({
+            id: row.id,
+            actualFreight: row.actualFreight
+          }).then(response => {
+            this.$notify({
+              title: '成功',
+              message: '操作成功!',
+              type: 'success'
+            });
+            this.getList()
+          })
+            .catch(() => {
+            })
+      }else{
+        row.editactualFreight=true
+      }
+      
+    },
     getDate() {//获取默认时间
       let date = new Date()
       let date1 = new Date().setTime(date.getTime() - 3 * 60 * 60 * 24 * 1000) //三天前的时间蹉
@@ -532,6 +566,7 @@ export default {
       getListData(_obj).then(response => {
         if (response.data.records) {
           for (let i = 0; i < response.data.records.length; i++) {
+            response.data.records[i].editactualFreight=false
             if (response.data.records[i].cargoOwnerStatus == '已终止') {
               if (response.data.records[i].terminator == 1) {
                 if (response.data.records[i].terminationReason == 1) {

+ 1 - 1
vue.config.js

@@ -56,7 +56,7 @@ module.exports = {
         },
         proxy: {
             '/pb': {
-                // target: 'https://api.changyuntong56.com'
+                // target: 'https://api.changyuntong56.com',
                 // target: 'http://192.168.110.9:8099/',       
                 target: 'http://192.168.110.138:8999/', 
                 // target: 'https://apitest.changyuntong56.com',