Browse Source

提交费用修改

caojunjie 4 years ago
parent
commit
2e3a450e8a

+ 10 - 3
src/api/fleet/ftmsorderbillscars.js

@@ -180,15 +180,22 @@ export function addFtmsorderbillscars(data) {
   })
 }
 
-//查看
+// //查看
+// export function selectDriverFtmsorderbillscars(data) {
+//   return request({
+//     url: '/fleet/ftmsorderbillscars/selectDriver',
+//     method: 'post',
+//     data: data
+//   })
+// }
+//查看2
 export function selectDriverFtmsorderbillscars(data) {
   return request({
-    url: '/fleet/ftmsorderbillscars/selectDriver',
+    url: '/fleet/ftmsorderbillscars/selectDriverModify',
     method: 'post',
     data: data
   })
 }
-
 //保存
 export function driverSaveFtmsorderbillscars(data) {
   return request({

+ 1 - 1
src/api/fleet/ftmsorderbillsfees.js

@@ -50,4 +50,4 @@ export function exportFtmsorderbillsfees(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/track/singleCost.js

@@ -51,4 +51,4 @@ export function driverSubmit(data) {
     method: 'post',
     data: data
   })
-}
+}

+ 2038 - 0
src/views/track/costModification/AddOrUpdate.vue

@@ -0,0 +1,2038 @@
+<template>
+  <el-dialog
+      :title="title"
+      :visible.sync="showDialog"
+      width="80%"
+      @close="handleClose"
+      :close-on-click-modal="false"
+  >
+    <span>
+      <el-form ref="form" :model="form" label-width="110px">
+        <span style="font-size: 20px" v-if="form.billKind == 'NN'"> 直单 </span>
+        <span style="font-size: 20px" v-if="form.billKind == 'MM'"> 主单 </span>
+        <span style="font-size: 20px" v-if="form.billKind == 'MH'"> 从单 </span>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="车号" prop="carregNo">
+              <el-input
+                  v-model="form.carregNo"
+                  placeholder="请输入车号"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="司机" prop="driverName">
+              <el-input
+                  v-model="form.driverName"
+                  placeholder="请输入司机"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="运输性质" prop="transProp">
+              <el-select
+                  v-model="form.transProp"
+                  placeholder="请选择运输方式"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              >
+                <el-option
+                    v-for="(dict, index) in transPropList"
+                    :key="index.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="运单号" prop="orderNo">
+              <el-input
+                  v-model="form.orderNo"
+                  placeholder="请输入运单号"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  disabled
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="客户名称" prop="fCorpId">
+              <el-select
+                  v-model="form.fCorpId"
+                  placeholder="请输入客户名称"
+                  :clearable="true"
+                  filterable
+                  size="small"
+                  style="width: 100%"
+                  :disabled="true"
+              >
+                <el-option
+                    v-for="(dict, index) in fMblnoOptions"
+                    :key="index.fId"
+                    :label="dict.fName"
+                    :value="dict.fId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="业务类型" prop="billType">
+              <el-select
+                  v-model="form.billType"
+                  placeholder="请选择业务类型"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              >
+                <el-option
+                    v-for="(dict, index) in billTypeList"
+                    :key="index.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="提单号" prop="mblno">
+              <el-input
+                  v-model="form.mblno"
+                  placeholder="请输入提单号"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="装车地点" prop="tLoadAddr">
+              <el-input
+                  v-model="form.tLoadAddr"
+                  placeholder="请输入装车地点"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="卸车地点" prop="unLoadAddr">
+              <el-input
+                  v-model="form.tUnLoadAddr"
+                  placeholder="请输入卸车地点"
+                  :disabled="true"
+                  size="small"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <div v-if="detailsHidden">
+          <el-divider></el-divider>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="运输方式" prop="transType">
+                <el-select
+                    v-model="form.transType"
+                    placeholder="请选择运输方式"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in transTypeList"
+                      :key="index.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="装车时间" prop="tLoadDate">
+                <el-date-picker
+                    clearable
+                    size="small"
+                    style="width: 100%"
+                    v-model="form.tLoadDate"
+                    type="date"
+                    placeholder="选择计划装车时间"
+                    :disabled="true"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="装车联系人" prop="loadAttn">
+                <el-input
+                    v-model="form.tLoadAttn"
+                    placeholder="请输入装车联系人"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="装车联系电话" prop="loadAttntel">
+                <el-input
+                    v-model="form.tLoadAttntel"
+                    placeholder="请输入装车联系电话"
+                    :disabled="true"
+                    v-input-limit="0"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="卸车时间" prop="tUnLoadDate">
+                <el-date-picker
+                    clearable
+                    size="small"
+                    style="width: 100%"
+                    v-model="form.tUnLoadDate"
+                    type="date"
+                    placeholder="选择计划卸车时间"
+                    :disabled="true"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="卸车联系人" prop="unLoadAttn">
+                <el-input
+                    v-model="form.tUnLoadAttn"
+                    placeholder="请输入卸车联系人"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="卸车联系电话" prop="unLoadAttnTel">
+                <el-input
+                    v-model="form.tUnLoadAttnTel"
+                    placeholder="请输入卸车联系电话"
+                    :disabled="true"
+                    v-input-limit="0"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="货品名称" prop="goodsId">
+                <el-select
+                    v-model="form.goodsId"
+                    placeholder="请输入货品名称"
+                    :disabled="true"
+                    clearable
+                    filterable
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in goodsOptions"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="计划件数" prop="qtyPlan">
+                <el-input
+                    v-model="form.qtyPlan"
+                    placeholder="请输入计划件数"
+                    :disabled="true"
+                    v-input-limit="2"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="重量(吨)" prop="weightPlan">
+                <el-input
+                    v-model="form.weightPlan"
+                    placeholder="请输入计划重量"
+                    :disabled="true"
+                    v-input-limit="2"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="船名" prop="ysl">
+                <el-input
+                    v-model="form.ysl"
+                    placeholder="请输入船名"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="航次" prop="voy">
+                <el-input
+                    v-model="form.voy"
+                    placeholder="请输入航次"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="起运港" prop="polId">
+                <el-select
+                    v-model="form.polId"
+                    placeholder="请输入起运港"
+                    :clearable="true"
+                    filterable
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in polList"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="目的港" prop="podId">
+                <el-select
+                    v-model="form.podId"
+                    placeholder="请输入目的港"
+                    :clearable="true"
+                    filterable
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in podList"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="司机电话" prop="driverTel">
+                <el-input
+                    v-model="form.driverTel"
+                    placeholder="请输入司机电话"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="箱号" prop="cntrName">
+                <el-input
+                    v-model="form.cntrName"
+                    placeholder="请输入箱号"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="起始里程" prop="odometerFrom">
+                <el-input
+                    v-model="form.odometerFrom"
+                    placeholder="请输入起始里程表读数"
+                    size="small"
+                    style="width: 100%"
+                    v-input-limit="2"
+                    :disabled="disabled || form.billStatus == 7"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="结束里程" prop="odometerEnd">
+                <el-input
+                    v-model="form.odometerEnd"
+                    placeholder="请输入结束里程表读数"
+                    size="small"
+                    style="width: 100%"
+                    v-input-limit="2"
+                    :disabled="disabled || form.billStatus == 7"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-divider></el-divider>
+        </div>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="接单时间" prop="acceptDate">
+              <el-date-picker
+                  clearable
+                  size="small"
+                  style="width: 100%"
+                  v-model="form.acceptDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择接单时间"
+                  :disabled="disabled || form.billStatus == 7"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="提箱时间" prop="loadDate">
+              <el-date-picker
+                  clearable
+                  size="small"
+                  style="width: 100%"
+                  v-model="form.loadDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择提箱时间"
+                  :disabled="disabled || form.billStatus == 7"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="装卸货时间" prop="mdLoadDate">
+              <el-date-picker
+                  clearable
+                  size="small"
+                  style="width: 100%"
+                  v-model="form.mdLoadDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择装卸货时间"
+                  :disabled="disabled || form.billStatus == 7"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="还卸柜时间" prop="unLoadDate">
+              <el-date-picker
+                  clearable
+                  size="small"
+                  style="width: 100%"
+                  v-model="form.unLoadDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择还卸柜时间"
+                  :disabled="disabled || form.billStatus == 7"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="回单时间" prop="waybillDate">
+              <el-date-picker
+                  clearable
+                  size="small"
+                  style="width: 100%"
+                  v-model="form.waybillDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择回单时间"
+                  :disabled="disabled || form.billStatus == 7"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="油气费" prop="oilAmt">
+              <el-input
+                  v-model="form.oilAmt"
+                  placeholder="请输入油气费"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="
+                  disabled || form.billStatus == 7 || form.billKind == 'MH'
+                "
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="单趟提成" prop="driverbonus">
+              <el-input
+                  v-model="form.driverbonus"
+                  placeholder="请输入单趟提成"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="
+                  disabled || form.billStatus == 7 || form.billKind == 'MH'
+                "
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="其他费用" prop="costOth">
+              <el-input
+                  v-model="form.costOth"
+                  placeholder="请输入其他费用"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="form.billType == 1">
+          <el-col :span="6">
+            <el-form-item label="花销备注" prop="costRemarks">
+              <el-input
+                  v-model="form.costRemarks"
+                  placeholder="请输入备注"
+                  size="small"
+                  style="width: 100%"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="修洗费" prop="costomAmt03">
+              <el-input
+                  v-model="form.costomAmt03"
+                  placeholder="请输入修洗费"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="吊装费" prop="costomAmt04">
+              <el-input
+                  v-model="form.costomAmt04"
+                  placeholder="请输入吊装费"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="其他费用" prop="costomAmt02">
+              <el-input
+                  v-model="form.costomAmt02"
+                  placeholder="请输入其他费用"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="form.billType == 2">
+          <el-col :span="6">
+            <el-form-item label="费用备注" prop="costomStr02">
+              <el-input
+                  v-model="form.costomStr02"
+                  placeholder="请输入备注"
+                  size="small"
+                  style="width: 100%"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="港杂费" prop="costomAmt05">
+              <el-input
+                  v-model="form.costomAmt05"
+                  placeholder="请输入港杂费"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="提箱费" prop="costomAmt06">
+              <el-input
+                  v-model="form.costomAmt06"
+                  placeholder="请输入提箱费"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="其他费用" prop="costomAmt01">
+              <el-input
+                  v-model="form.costomAmt01"
+                  placeholder="请输入其他费用"
+                  size="small"
+                  style="width: 100%"
+                  v-input-limit="2"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="费用备注" prop="costomStr01">
+              <el-input
+                  v-model="form.costomStr01"
+                  placeholder="请输入备注"
+                  size="small"
+                  style="width: 100%"
+                  :disabled="disabled || form.billStatus == 7"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col>
+            <el-form-item label="备注" prop="acceptRemarks">
+              <el-input
+                  v-model="form.acceptRemarks"
+                  placeholder="请输入备注"
+                  size="small"
+                  :disabled="disabled || form.billStatus == 7"
+                  type="textarea"
+                  :rows="2"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div v-if="form.billKind == 'MM'">
+        <span style="font-size: 20px"> 分单 </span>
+        <el-form ref="carsTable" :model="carsTable" label-width="110px">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="客户名称" prop="corpName">
+                <el-select
+                    v-model="carsTable.corpName"
+                    placeholder="请输入客户名称"
+                    :clearable="true"
+                    filterable
+                    size="small"
+                    style="width: 100%"
+                    :disabled="true"
+                >
+                  <el-option
+                      v-for="(dict, index) in fMblnoOptions"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="业务类型" prop="billType">
+                <el-select
+                    v-model="carsTable.billType"
+                    placeholder="请选择业务类型"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in billTypeList"
+                      :key="index.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="接单时间" prop="acceptDate">
+                <el-date-picker
+                    clearable
+                    size="small"
+                    style="width: 100%"
+                    v-model="carsTable.acceptDate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择接单时间"
+                    disabled
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="提单号" prop="mblno">
+                <el-input
+                    v-model="carsTable.mblno"
+                    placeholder="请输入提单号"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="装车地点" prop="loadAddr">
+                <el-input
+                    v-model="carsTable.loadAddr"
+                    placeholder="请输入装车地点"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="卸车地点" prop="unLoadAddr">
+                <el-input
+                    v-model="carsTable.unLoadAddr"
+                    placeholder="请输入卸车地点"
+                    :disabled="true"
+                    size="small"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div
+          style="display: flex; justify-content: flex-end; margin-bottom: 10px"
+      >
+        <el-button
+            @click="
+            detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
+          "
+        >{{ detailsHidden ? "隐藏" : "更多" }}
+        </el-button>
+      </div>
+      <el-collapse v-model="collapselist">
+  <el-collapse-item name="1">
+    <template slot="title">
+            <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
+            >原业务费用信息</span>
+    </template>
+    <el-table :data="feesList" style="width: 100%">
+    <el-table-column
+        prop="fCorpid"
+        label="结算单位"
+        align="center"
+        width="180"
+    >
+      <template slot-scope="scope">
+        <el-select
+            v-model="scope.row.fCorpid"
+            placeholder="请输入客户名称"
+            :clearable="true"
+            filterable
+            size="mini"
+            style="width: 160px"
+            :disabled="true"
+        >
+        <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+        />
+    </el-select>
+  </template>
+</el-table-column>
+<el-table-column
+    prop="fFeeid"
+    label="费用名称"
+    align="center"
+    width="120"
+>
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fFeeid"
+        filterable
+        :disabled="true"
+        remote
+        placeholder="费用名称"
+    >
+    <el-option
+        v-for="(dict, index) in fCNameOptions"
+        :key="index.fId"
+        :label="dict.fName"
+        :value="dict.fId"
+    ></el-option>
+</el-select>
+</template>
+</el-table-column>
+<el-table-column prop="fDc" label="收付" align="center" width="100">
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fDc"
+        placeholder="请选择"
+        :disabled="true"
+    >
+    <el-option label="收" value="D"></el-option>
+    <el-option label="付" value="C"></el-option>
+  </el-select>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fFeeunitid"
+    label="计费单位"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fFeeunitid"
+        placeholder="请选择计费单位"
+        :disabled="true"
+        clearable
+    >
+    <el-option
+        v-for="dict in jFeetunitOptions"
+        :key="dict.dictValue"
+        :label="dict.dictLabel"
+        :value="dict.dictValue"
+    />
+</el-select>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fBillingQty"
+    label="计费数量"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fBillingQty"
+        :disabled="true"
+        placeholder="请输入内容"
+        @input="total(scope.row)"
+        v-input-limit="2"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fUnitprice"
+    label="单价"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fUnitprice"
+        :disabled="true"
+        placeholder="请输入内容"
+        @input="total(scope.row)"
+        v-input-limit="2"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fCurrency"
+    label="币种"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fCurrency"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="fExrate" label="汇率" align="center" width="100">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fExrate"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="fAmount" label="金额" align="center" width="100">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fAmount"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fTaxrate"
+    label="税率"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fTaxrate"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="remarks" label="备注" align="center" width="180">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.remarks"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="remarks" label="费用来源" align="center">
+  <template slot-scope="scope">
+    <span v-if="scope.row.actId == 1080">费用确认</span>
+    <span v-if="scope.row.actId == 1090">追加费用</span>
+  </template>
+</el-table-column>
+<el-table-column
+    label="操作"
+    align="center"
+    class-name="small-padding fixed-width"
+    fixed="right"
+    width="100px"
+>
+  <template slot-scope="scope">
+    <el-button
+        size="mini"
+        type="text"
+        icon="el-icon-delete"
+        :disabled="scope.row.actId != 1090 || disabled"
+        @click.native.prevent="deleteRow(scope.$index)"
+    >删除</el-button
+    >
+</template>
+</el-table-column>
+</el-table>
+</el-collapse-item>
+<el-collapse-item name="2">
+  <template slot="title">
+            <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
+            >更改费用信息</span>
+  </template>
+  <div>
+    <div style="display: flex; justify-content: space-between; margin: 10px 0">
+      <div>
+        <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="mini"
+            @click="addRelevt"
+            :disabled="true"
+        >保存</el-button>
+      <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="addRelevt2"
+          :disabled="true"
+      >提交请核</el-button>
+  </div>
+</div>
+</div>
+<el-table :data="feesList" style="width: 100%">
+<el-table-column
+    prop="fCorpid"
+    label="结算单位"
+    align="center"
+    width="180"
+>
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fCorpid"
+        placeholder="请输入客户名称"
+        :clearable="true"
+        filterable
+        size="mini"
+        style="width: 160px"
+        :disabled="true"
+    >
+    <el-option
+        v-for="(dict, index) in fMblnoOptions"
+        :key="index.fId"
+        :label="dict.fName"
+        :value="dict.fId"
+    />
+</el-select>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fFeeid"
+    label="费用名称"
+    align="center"
+    width="120"
+>
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fFeeid"
+        filterable
+        :disabled="true"
+        remote
+        placeholder="费用名称"
+    >
+    <el-option
+        v-for="(dict, index) in fCNameOptions"
+        :key="index.fId"
+        :label="dict.fName"
+        :value="dict.fId"
+    ></el-option>
+</el-select>
+</template>
+</el-table-column>
+<el-table-column prop="fDc" label="收付" align="center" width="100">
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fDc"
+        placeholder="请选择"
+        :disabled="true"
+    >
+    <el-option label="收" value="D"></el-option>
+    <el-option label="付" value="C"></el-option>
+  </el-select>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fFeeunitid"
+    label="计费单位"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-select
+        v-model="scope.row.fFeeunitid"
+        placeholder="请选择计费单位"
+        :disabled="true"
+        clearable
+    >
+    <el-option
+        v-for="dict in jFeetunitOptions"
+        :key="dict.dictValue"
+        :label="dict.dictLabel"
+        :value="dict.dictValue"
+    />
+</el-select>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fBillingQty"
+    label="计费数量"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fBillingQty"
+        :disabled="true"
+        placeholder="请输入内容"
+        @input="total(scope.row)"
+        v-input-limit="2"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fUnitprice"
+    label="单价"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fUnitprice"
+        :disabled="true"
+        placeholder="请输入内容"
+        @input="total(scope.row)"
+        v-input-limit="2"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fCurrency"
+    label="币种"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fCurrency"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="fExrate" label="汇率" align="center" width="100">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fExrate"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="fAmount" label="金额" align="center" width="100">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fAmount"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    prop="fTaxrate"
+    label="税率"
+    align="center"
+    width="100"
+>
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.fTaxrate"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column prop="remarks" label="费用来源" align="center">
+  <template slot-scope="scope">
+    <span v-if="scope.row.actId == 1080">费用确认</span>
+    <span v-if="scope.row.actId == 1090">追加费用</span>
+  </template>
+</el-table-column>
+<el-table-column prop="remarks" label="录入人" align="center"></el-table-column>
+<el-table-column prop="remarks" label="录入日期" align="center"></el-table-column>
+<el-table-column prop="remarks" label="审核人" align="center"></el-table-column>
+<el-table-column prop="remarks" label="审核日期" align="center"></el-table-column>
+<el-table-column prop="remarks" label="备注" align="center" width="180">
+  <template slot-scope="scope">
+    <el-input
+        v-model="scope.row.remarks"
+        :disabled="true"
+        placeholder="请输入内容"
+    ></el-input>
+</template>
+</el-table-column>
+<el-table-column
+    label="操作"
+    align="center"
+    class-name="small-padding fixed-width"
+    fixed="right"
+    width="100px"
+>
+  <template slot-scope="scope">
+    <el-button
+        size="mini"
+        type="text"
+        icon="el-icon-delete"
+        :disabled="scope.row.actId != 1090 || disabled"
+        @click.native.prevent="deleteRow(scope.$index)"
+    >删除</el-button
+    >
+</template>
+</el-table-column>
+</el-table>
+</el-collapse-item>
+</el-collapse>
+    </span>
+    <span slot="footer" class="dialog-footer">
+      <el-button
+          type="primary"
+          @click="submitForm('acceptDate')"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >接 单</el-button
+      >
+      <el-button
+          type="primary"
+          @click="submitForm('loadDate')"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >提 箱</el-button
+      >
+      <el-button
+          type="primary"
+          @click="submitForm('mdLoadDate')"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >装卸货</el-button
+      >
+      <el-button
+          type="primary"
+          @click="submitForm('unLoadDate')"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >还卸柜</el-button
+      >
+      <el-button
+          type="primary"
+          @click="submitForm('waybillDate')"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >回 单</el-button
+      >
+      <el-button
+          type="primary"
+          @click="driversubmitForm"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >提 交</el-button
+      >
+      <el-button
+          type="success"
+          @click="submitAllowChanges"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >修 改</el-button
+      >
+      <el-button
+          type="info"
+          @click="submitSave"
+          v-hasPermi="['fleet:vehicleStatus:edit']"
+          :disabled="form.billStatus == 7"
+      >保 存</el-button
+      >
+      <!-- <el-button type="warning" @click="submitRetreat">撤 回</el-button> -->
+      <el-button @click="showDialog = false">取 消</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  removeFtmsorderbillscars,
+  driverSaveFtmsorderbillscars,
+  insertDriverFtmsorderbillscars,
+} from "@/api/fleet/ftmsorderbillscars";
+import {getBasicInformation} from "@/api/kaihe/basicdata/container";
+import {listGoods} from "@/api/basicdata/goods";
+import {listCorps} from "@/api/basicdata/corps";
+import {listFees} from "@/api/basicdata/fees";
+import UploadFile from "@/components/Uploadfile";
+import {
+  submit,
+  changeFees,
+  revokeFees,
+  deleteFees,
+  driverSubmit,
+} from "@/api/track/singleCost";
+import Cookies from "js-cookie";
+import {getToken} from "@/utils/auth";
+
+export default {
+  name: "plans",
+  props: {
+    addOrUpdateVisible: {
+      type: Boolean,
+      default: false,
+    },
+    title: {
+      type: String,
+      required: "",
+    },
+    form: Object,
+    carsTable: Object,
+    DList: {
+      type: Array,
+      default: [],
+    },
+    CList: {
+      type: Array,
+      default: [],
+    },
+    disabled: Boolean,
+    relevantAttachments: {
+      type: Array,
+      default: [],
+    },
+    feesList: {
+      type: Array,
+      default: () => [],
+    },
+    allfMblnoOptions: {
+      type: Array,
+      default: [],
+    },
+  },
+  components: {
+    UploadFile,
+  },
+  data() {
+    return {
+      chiFeesList: [],
+      // 控制弹出框显示隐藏
+      showDialog: false,
+      billTypeList: [],
+      transTypeList: [],
+      transPropList: [],
+      goodsLossTypeList: [],
+      cntrIdList: [],
+      priceTypeList: [],
+      userType: null,
+      username: null,
+      collapses: [],
+      fMblnoOptions: [],
+      fMblnoOptions2: [],
+      cntrId2List: [],
+      goodsOptions: [],
+      collapselist:["1","2"],
+      fWbuOptions: [],
+      ffeeunitidList: [],
+      polList: [],
+      podList: [],
+      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
+      jFeetunitOptions: [],
+      detailsHidden: false,
+      fCNameOptions:[]
+    };
+  },
+  created() {
+    this.getDicts("data_unitfees").then((response) => {
+      if (response.data) {
+        this.jFeetunitOptions = response.data;
+      }
+    });
+    this.getDicts("data_billType").then((response) => {
+      this.billTypeList = response.data;
+    });
+    this.getDicts("data_transType").then((response) => {
+      this.transTypeList = response.data;
+    });
+    this.getDicts("data_transProp").then((response) => {
+      this.transPropList = response.data;
+    });
+    this.getDicts("data_goodsLossType").then((response) => {
+      this.goodsLossTypeList = response.data;
+    });
+    this.getDicts("data_cntrId").then((response) => {
+      response.data.map((e) => (e.noOption = false));
+      this.cntrIdList = response.data;
+    });
+    this.getDicts("data_priceType").then((response) => {
+      this.priceTypeList = response.data;
+    });
+    this.getDicts("data_ffeeunitid").then((response) => {
+      this.ffeeunitidList = response.data;
+    });
+    getBasicInformation({
+      fTypes: 1,
+      fStatus: "T",
+    }).then((response) => {
+      this.polList = response;
+      this.podList = response;
+    });
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    listFees().then((response) => {
+      this.fCNameOptions = response.rows;
+    });
+    listGoods().then((response) => {
+      this.goodsOptions = response.rows;
+    });
+    listFees().then((response) => {
+      this.fWbuOptions = response.rows;
+    });
+    this.userType = Cookies.get("userType");
+    this.username = Cookies.get("userName");
+  },
+  methods: {
+    // 新增附件上传
+    addRelevt4() {
+      this.chiFeesList.push({
+        actId: "1090",
+        fCorpid: this.form.fCorpId,
+        fFeeid: "",
+        fDc: "",
+        fFeeunitid: "1",
+        fBillingQty: 0,
+        fUnitprice: 0,
+        fCurrency: "RMB",
+        fTaxrate: null,
+        fAmount: 0,
+        fExrate: 1,
+        remarks: "",
+      });
+    },
+    // 新增附件上传
+    addRelevt() {
+      this.relevantAttachments.push({
+        attachUrl: null,
+        attachName: null,
+        createBy: this.username,
+        createTime: Date.parse(new Date()),
+      });
+    },
+    //附件删除
+    deleteFile(scope) {
+      this.relevantAttachments[scope.$index].attachName = "";
+      this.relevantAttachments[scope.$index].attachUrl = "";
+      if (this.relevantAttachments[scope.$index].attachUrl === "") {
+        this.$message.success("删除成功");
+      } else {
+        this.$message.error("未知错误,删除失败");
+      }
+    },
+    //附件查看
+    checkFile(scope) {
+      if (this.relevantAttachments[scope.$index].attachUrl) {
+        window.open(this.relevantAttachments[scope.$index].attachUrl);
+      } else {
+        this.$message.error("请上传附件");
+      }
+    },
+    //附件上传
+    handleSucces(scope, res, file) {
+      this.relevantAttachments[scope.$index].attachName = res.fileName;
+      this.relevantAttachments[scope.$index].attachUrl = res.url;
+      if (this.relevantAttachments[scope.$index].attachUrl === "") {
+        this.$message.error("上传失败");
+      } else {
+        this.$message.success("上传成功");
+      }
+    },
+    // 添加行
+    addRow(tableData, event) {
+      var obj = {};
+      tableData.push(obj);
+    },
+    addDListRow(tableData, event) {
+      var obj = {
+        fcorpid: this.form.fCorpId,
+        fcurrency: "RMB",
+        fPid: this.form.id,
+        fExrate: "1",
+      };
+      tableData.push(obj);
+    },
+    //删除行
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    // 上传成功返回数据
+    showFile(row) {
+      for (let list in this.relevantAttachments) {
+        this.$set(this.relevantAttachments[list], "attachUrl", row.url);
+        this.$set(this.relevantAttachments[list], "attachName", row.fileName);
+      }
+    },
+    addRelevt2() {
+      let arr = this.chiFeesList;
+      arr.filter((e) => e.actId == "1080");
+      if (arr.length > 0) {
+        this.$confirm("已生成费用信息, 是否重新生成?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+            .then(() => {
+              this.chiFeesList = this.chiFeesList.filter(
+                  (e) => e.fBillstatus == 6 || e.actId != "1080"
+              );
+              console.log(this.chiFeesList);
+              this.addRelevt3();
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消",
+              });
+            });
+      } else {
+        this.addRelevt3();
+      }
+    },
+    addRelevt3() {
+      if (this.form.oilAmt > 0) {
+        this.fFeeid52 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 52 && e.actId == 1080) {
+            this.fFeeid52 = false;
+          }
+        });
+        if (this.fFeeid52) {
+          this.chiFeesList.push({
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 52,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.oilAmt,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.oilAmt,
+            fExrate: 1,
+            remarks: null,
+          });
+        }
+      }
+      if (this.form.driverbonus > 0) {
+        this.fFeeid53 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 53 && e.actId == 1080) {
+            this.fFeeid53 = false;
+          }
+        });
+        if (this.fFeeid53) {
+          this.chiFeesList.push({
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 53,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.driverbonus,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.driverbonus,
+            fExrate: 1,
+            remarks: null,
+          });
+        }
+      }
+      if (this.form.costOth > 0) {
+        this.fFeeid54 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 54 && e.actId == 1080) {
+            this.fFeeid54 = false;
+          }
+        });
+        if (this.fFeeid54) {
+          this.chiFeesList.push({
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 54,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costOth,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costOth,
+            fExrate: 1,
+            remarks: null,
+          });
+        }
+      }
+      if (this.form.costomAmt03 > 0) {
+        this.fFeeid55 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 55 && e.actId == 1080) {
+            this.fFeeid55 = false;
+          }
+        });
+        if (this.fFeeid55) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 55,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt03,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt03,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 55,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt03,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt03,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.costomAmt04 > 0) {
+        this.fFeeid56 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 56 && e.actId == 1080) {
+            this.fFeeid56 = false;
+          }
+        });
+        if (this.fFeeid56) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 56,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt04,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt04,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 56,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt04,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt04,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.costomAmt02 > 0) {
+        this.chiFeesList.map((e) => {
+          this.fFeeid57 = true;
+          if (e.fFeeid == 57 && e.actId == 1080) {
+            this.fFeeid57 = false;
+          }
+        });
+        if (this.fFeeid57) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 57,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt02,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt02,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 57,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt02,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt02,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.costomAmt05 > 0) {
+        this.fFeeid58 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 58 && e.actId == 1080) {
+            this.fFeeid58 = false;
+          }
+        });
+        if (this.fFeeid58) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 58,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt05,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt05,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 58,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt05,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt05,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.costomAmt06 > 0) {
+        this.fFeeid59 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 59 && e.actId == 1080) {
+            this.fFeeid59 = false;
+          }
+        });
+        if (this.fFeeid59) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 59,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt06,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt06,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 59,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt06,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt06,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.costomAmt01 > 0) {
+        this.fFeeid60 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 60 && e.actId == 1080) {
+            this.fFeeid60 = false;
+          }
+        });
+        if (this.fFeeid60) {
+          this.chiFeesList.push(
+              {
+                actId: "1080",
+                fCorpid: this.form.fCorpId,
+                fFeeid: 60,
+                fDc: "D",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt01,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt01,
+                fExrate: 1,
+                remarks: null,
+              },
+              {
+                actId: "1080",
+                fCorpid: this.form.driverUserId,
+                fFeeid: 60,
+                fDc: "C",
+                fFeeunitid: "6",
+                fBillingQty: 1,
+                fUnitprice: this.form.costomAmt01,
+                fCurrency: "RMB",
+                fTaxrate: 3,
+                fAmount: this.form.costomAmt01,
+                fExrate: 1,
+                remarks: null,
+              }
+          );
+        }
+      }
+      if (this.form.freightPriceCr > 0 || this.form.freightPriceDr > 0) {
+        this.fFeeid61 = true;
+        this.chiFeesList.map((e) => {
+          if (e.fFeeid == 61 && e.actId == 1080) {
+            this.fFeeid61 = false;
+          }
+        });
+        if (this.fFeeid61 && this.form.freightPriceDr > 0) {
+          this.chiFeesList.push({
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 61,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.freightPriceDr,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.freightPriceDr,
+            fExrate: 1,
+            remarks: null,
+          });
+        }
+        if (this.fFeeid61 && this.form.freightPriceCr > 0) {
+          this.chiFeesList.push({
+            actId: "1080",
+            fCorpid: this.form.carcorPid,
+            fFeeid: 61,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.freightPriceCr,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.freightPriceCr,
+            fExrate: 1,
+            remarks: null,
+          });
+        }
+      } else {
+        this.$message.error("未找到运输费用,请确认是否已添加");
+      }
+    },
+    // 弹出框关闭后触发
+    handleClose() {
+      // 子组件调用父组件方法,并传递参数
+      this.$emit("changeShow", "false");
+      this.cntrIdList.forEach((item) => (item.noOption = false));
+      this.collapses = [];
+    },
+    /** 提交按钮 */
+    submitForm(butType) {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.costOth > 0 && !this.form.costRemarks) {
+            return this.$message.error("请输入花销备注");
+          }
+          if (this.form.costomAmt02 > 0 && !this.form.costomStr02) {
+            return this.$message.error("请输入费用备注");
+          }
+          if (this.form.costomAmt01 > 0 && !this.form.costomStr01) {
+            return this.$message.error("请输入费用备注");
+          }
+          this.DList.map((e) => {
+            return (e.fDc = "D");
+          });
+          this.CList.map((e) => {
+            return (e.fDc = "C");
+          });
+          let formData = new window.FormData();
+          formData.append("cars", JSON.stringify(this.form));
+          formData.append("attachs", JSON.stringify(this.relevantAttachments));
+          formData.append("operationType", butType);
+          insertDriverFtmsorderbillscars(formData).then((response) => {
+            if (response.code == 200) {
+              this.$set(this.form, "orderStatus", response.data.orderStatus);
+              this.msgSuccess("提交成功");
+              this.$parent.getList();
+            }
+          });
+        }
+      });
+    },
+    //修改
+    submitFix() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+        }
+      });
+    },
+    //保存
+    submitSave() {
+      let formData = new window.FormData();
+      formData.append("cars", JSON.stringify(this.form));
+      formData.append("attachs", JSON.stringify(this.relevantAttachments));
+      formData.append("fees", JSON.stringify(this.chiFeesList));
+      formData.append("operationType", "unLoadDate");
+      driverSaveFtmsorderbillscars(formData).then((response) => {
+        if (response.code == 200) {
+          this.msgSuccess("保存成功");
+          this.$parent.getList();
+          // this.$parent.getSave(response);
+        }
+      });
+    },
+    //撤回
+    submitRetreat() {
+    },
+    //修改
+    submitAllowChanges() {
+      if (this.form.orderStatus <= 60) {
+        this.$emit("fixDisabled", "false");
+        this.msgSuccess("允许修改");
+      } else {
+        this.msgSuccess("不允许修改");
+      }
+    },
+    driversubmitForm() {
+      if (this.chiFeesList.length == 0) {
+        return this.$message.error("确认费用不能为空");
+      }
+      if (this.form.orderStatus < 60) {
+        return this.$message.error("该运单未回单,请先回单");
+      }
+      let formData = new window.FormData();
+      formData.append("cars", JSON.stringify(this.form));
+      formData.append("attachs", JSON.stringify(this.relevantAttachments));
+      formData.append("fees", JSON.stringify(this.chiFeesList));
+      driverSubmit(formData).then((response) => {
+        if (response.code == 200) {
+          this.msgSuccess("提交成功");
+          this.showDialog = false;
+          this.$parent.getList();
+        }
+      });
+    },
+    addFees(row) {
+      if (row.fBillstatus == 1) {
+        row.fBillstatus = 6;
+      }
+      if (row.fBillstatus == 6) {
+        return this.$message.error("已提交,请勿重复提交");
+      }
+      let formDatae = new window.FormData();
+      formDatae.append("status", 6);
+      formDatae.append("cars", JSON.stringify(this.form));
+      formDatae.append("ftmsorderbillsfees", JSON.stringify(row));
+      submit(formDatae).then((response) => {
+        if (response.code == 200) {
+          this.$message.success("提交成功");
+          this.$set(row, "fId", response.data.ftmsorderbillsfeesList.fId);
+          this.$set(
+              row,
+              "fBillstatus",
+              response.data.ftmsorderbillsfeesList.fBillstatus
+          );
+        }
+      });
+    },
+    fixFees(row) {
+      if (row.fBillstatus == 0) {
+        return this.$message.error("已进行变更,请勿重复点击");
+      }
+      if (row.fId) {
+        changeFees(row.fId).then((response) => {
+          if (response.code == 200) {
+            this.$message.success("允许修改");
+            this.$set(row, "fBillstatus", 1);
+          }
+        });
+      }
+    },
+    delFees(index, rows, row) {
+      if (row.fBillstatus == 2 || row.fBillstatus == 3) {
+        deleteFees(row.fId).then((response) => {
+          if (response.code == 200) {
+            rows.splice(index, 1);
+            this.$message.success("删除成功");
+          }
+        });
+      } else if (!row.fBillstatus) {
+        rows.splice(index, 1);
+        this.$message.success("删除成功");
+      } else {
+        this.$message.error("不允许删除");
+      }
+    },
+    revokeFees(row) {
+      revokeFees(row.fId).then((response) => {
+        if (response.code == 200) {
+          this.$message.success("撤销成功");
+          this.$set(row, "fBillstatus", 3);
+        }
+      });
+    },
+    //单条订单调度提交
+    addscarsRow(row) {
+    },
+    delscarsRow(index, rows, row) {
+      if (row.billStatus != 6 && row.id != null) {
+        removeFtmsorderbillscars(row).then((response) => {
+          if (response.code == 200) {
+            rows.splice(index, 1);
+            this.msgSuccess("成功删除");
+          }
+        });
+      } else {
+        rows.splice(index, 1);
+      }
+    },
+    revokescarsRow(index, rows, row) {
+    },
+    changescarsRow(row) {
+    },
+    total(row) {
+      console.log(row);
+      if (row.fQty && row.fUnitprice) {
+        this.$set(row, "fAmount", (row.fQty * row.fUnitprice).toFixed(2));
+      } else {
+        this.$set(row, "fAmount", 0);
+      }
+    },
+  },
+  watch: {
+    // 监听 addOrUpdateVisible 改变
+    addOrUpdateVisible(oldVal, newVal) {
+      this.showDialog = this.addOrUpdateVisible;
+    },
+    feesList(newVal, oldVal) {
+      console.log(newVal)
+      this.chiFeesList = newVal;
+    },
+  },
+  computed: {
+    sortchiFeesList() {
+      return sortByKey(this.chiFeesList, "fDc");
+    },
+  },
+};
+
+function sortByKey(array, key) {
+  return array.sort(function (a, b) {
+    var x = a[key];
+    var y = b[key];
+    return x > y ? -1 : x < y ? 1 : 0;
+  });
+}
+</script>

+ 1225 - 0
src/views/track/costModification/index.vue

@@ -0,0 +1,1225 @@
+<template>
+  <div class="app-container">
+    <el-form
+        :model="queryParams"
+        ref="queryForm"
+        v-show="showSearch"
+        label-width="100px"
+        size="mini"
+    >
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="提单号" prop="mblno">
+            <el-input
+                v-model="queryParams.mblno"
+                placeholder="请输入提单号"
+                clearable
+                size="small"
+                @keyup.enter.native="handleQuery()"
+                style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="客户名称" prop="corpId">
+            <el-select
+                v-model="queryParams.corpId"
+                placeholder="请输入客户名称"
+                clearable
+                size="small"
+                filterable
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="(dict, index) in fMblnoOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+              />
+            </el-select> </el-form-item
+          ></el-col>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="业务类型" prop="billType">
+            <el-select
+                v-model="queryParams.billType"
+                placeholder="请选择业务类型"
+                clearable
+                size="small"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="(dict, index) in billTypeList"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="运输方式" prop="transType">
+            <el-select
+                v-model="queryParams.transType"
+                placeholder="请选择运输方式"
+                clearable
+                size="small"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="(dict, index) in transTypeList"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-collapse-transition>
+        <div v-show="show">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item
+                  label-width="100px"
+                  label="运输性质"
+                  prop="transProp"
+              >
+                <el-select
+                    v-model="queryParams.transProp"
+                    placeholder="请选择运输性质"
+                    clearable
+                    size="small"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in transPropList"
+                      :key="index.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="100px" label="货品名称" prop="goodsId">
+                <el-select
+                    v-model="queryParams.goodsId"
+                    placeholder="请输入货品名称"
+                    clearable
+                    size="small"
+                    filterable
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="(dict, index) in goodsOptions"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="单据类型" prop="billKind">
+                <el-select
+                    style="width: 100%"
+                    v-model="queryParams.billKind"
+                    placeholder="请选择单据类型"
+                >
+                  <el-option label="直单" value="NN"></el-option>
+                  <el-option label="主单" value="MM"></el-option>
+                  <el-option label="从单" value="MH"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6"
+            ><el-form-item label-width="100px" label="车号" prop="carregNo">
+              <el-input
+                  v-model="queryParams.carregNo"
+                  placeholder="请输入车号"
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery()"
+                  style="width: 100%"
+              /> </el-form-item
+            ></el-col>
+            <el-col :span="6"
+            ><el-form-item
+                label-width="100px"
+                label="主运单号"
+                prop="mBillNo"
+            >
+              <el-input
+                  v-model="queryParams.mBillNo"
+                  placeholder="请输入主运单号"
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery()"
+                  style="width: 100%"
+              /> </el-form-item
+            ></el-col>
+            <el-col :span="6"
+            ><el-form-item label-width="100px" label="运单号" prop="orderNo">
+              <el-input
+                  v-model="queryParams.orderNo"
+                  placeholder="请输入运单号 "
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery()"
+                  style="width: 100%"
+              /> </el-form-item
+            ></el-col>
+            <el-col :span="6">
+              <el-form-item
+                  label-width="100px"
+                  label="提箱地点"
+                  prop="loadAddr"
+              >
+                <el-input
+                    v-model="queryParams.loadAddr"
+                    placeholder="请输入提箱地点"
+                    clearable
+                    size="small"
+                    @keyup.enter.native="handleQuery()"
+                    style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item
+                  label-width="100px"
+                  label="装卸货地点"
+                  prop="mdLoadAddr"
+              >
+                <el-input
+                    v-model="queryParams.mdLoadAddr"
+                    placeholder="请输入装卸货地点"
+                    clearable
+                    size="small"
+                    @keyup.enter.native="handleQuery()"
+                    style="width: 100%"
+                /> </el-form-item
+              ></el-col>
+            <el-col :span="6"
+            ><el-form-item
+                label-width="100px"
+                label="卸箱地点"
+                prop="unLoadAddr"
+            >
+              <el-input
+                  v-model="queryParams.unLoadAddr"
+                  placeholder="请输入卸箱地点"
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery()"
+                  style="width: 100%"
+              /> </el-form-item
+            ></el-col>
+            <el-col :span="6">
+              <el-form-item
+                  label-width="100px"
+                  label="提箱时间"
+                  prop="cLoadDate"
+              >
+                <el-date-picker
+                    v-model="queryParams.cLoadDate"
+                    type="daterange"
+                    align="right"
+                    unlink-panels
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    :picker-options="pickerOptions"
+                    value-format="yyyy-MM-dd HH:mm-ss"
+                    :default-time="['00:00:00', '23:59:59']"
+                    style="width: 100%"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item
+                  label-width="100px"
+                  label="接单日期"
+                  prop="acceptDateList"
+              >
+                <el-date-picker
+                    v-model="queryParams.acceptDateList"
+                    type="daterange"
+                    align="right"
+                    unlink-panels
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    :picker-options="pickerOptions"
+                    value-format="yyyy-MM-dd HH:mm-ss"
+                    :default-time="['00:00:00', '23:59:59']"
+                    style="width: 100%"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </el-collapse-transition>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <!--        <el-button size="mini" @click="handleQuery(null)">全 部</el-button>-->
+        <el-badge
+            :value="buttonValue.quantity"
+            type="warning"
+            style="margin-right: 10px"
+        >
+          <el-button size="mini" @click="handleQuery()">全 部</el-button>
+        </el-badge>
+      </el-col>
+      <el-col :span="1.5">
+        <el-badge
+            :value="buttonValue.planDate"
+            type="warning"
+            style="margin-right: 10px"
+        >
+          <el-button size="mini" @click="handleQuery('planDate')"
+          >未接单</el-button
+          >
+        </el-badge></el-col
+      >
+      <el-col :span="1.5">
+        <el-badge
+            :value="buttonValue.acceptDate"
+            type="warning"
+            style="margin-right: 10px"
+        >
+          <el-button size="mini" @click="handleQuery('acceptDate')"
+          >未提箱</el-button
+          >
+        </el-badge></el-col
+      >
+      <el-col :span="1.5"
+      ><el-badge
+          :value="buttonValue.loadDate"
+          type="warning"
+          style="margin-right: 10px"
+      ><el-button size="mini" @click="handleQuery('loadDate')"
+      >未装卸货</el-button
+      ></el-badge
+      ></el-col
+      >
+
+      <el-col :span="1.5"
+      ><el-badge
+          :value="buttonValue.mdLoadDate"
+          type="warning"
+          style="margin-right: 10px"
+      >
+        <el-button size="mini" @click="handleQuery('mdLoadDate')"
+        >未还卸柜</el-button
+        ></el-badge
+      >
+      </el-col>
+      <el-col :span="1.5"
+      ><el-badge
+          :value="buttonValue.unLoadDate"
+          type="warning"
+          style="margin-right: 10px"
+      ><el-button size="mini" @click="handleQuery('unLoadDate')"
+      >未回单</el-button
+      ></el-badge
+      ></el-col
+      >
+      <el-col :span="1.5"
+      ><el-badge type="warning" style="margin-right: 10px"
+      ><el-button size="mini" @click="handleQuery('receiptDate')"
+      >已完成</el-button
+      ></el-badge
+      ></el-col
+      >
+      <div class="tabSetting">
+        <div style="margin-right: 20px">
+          <el-button
+              type="cyan"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery()"
+          >搜索</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+          >
+          <el-button
+              v-show="show"
+              @click="show = !show"
+              icon="el-icon-arrow-up"
+              size="mini"
+          >展开</el-button
+          >
+          <el-button
+              v-show="!show"
+              @click="show = !show"
+              icon="el-icon-arrow-down"
+              size="mini"
+          >展开</el-button
+          >
+        </div>
+        <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
+    </el-row>
+    <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+            v-model="allCheck"
+            label="全选"
+            @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+            v-model="setRowList"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+        >
+          <transition-group>
+            <div
+                v-for="item in setRowList"
+                :key="item.surface"
+                class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                      :label="item.name"
+                      v-model="item.checked"
+                      :true-label="0"
+                      :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                  v-model.number="item.width"
+                  controls-position="right"
+                  :min="1"
+                  :max="500"
+                  size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-table
+        v-loading="loading"
+        :data="ftmsorderbillscarsList"
+        @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column
+          label="提单号"
+          width="180"
+          align="center"
+          :show-overflow-tooltip="true"
+          sortable
+          fixed="left"
+      >
+        <template slot-scope="scope">
+          <el-link :underline="false" type="primary"
+          ><div @click="handleUpdate(scope.row)">
+            {{ scope.row.mblno }}
+          </div></el-link
+          >
+        </template>
+      </el-table-column>
+      <el-table-column
+          v-for="(item, index) in getRowList"
+          :key="index"
+          :label="item.name"
+          :width="item.width"
+          :prop="item.label"
+          align="center"
+          :show-overflow-tooltip="true"
+          sortable
+          :fixed="item.fixed"
+      />
+      <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+          fixed="right"
+          width="150px"
+      >
+        <template slot-scope="scope">
+          <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+          >查看</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+    />
+    <!-- 新增编辑弹框子组件 -->
+    <add-or-update
+        :addOrUpdateVisible="addOrUpdateVisible"
+        :title="title"
+        :form="form"
+        :DList="DList"
+        :CList="CList"
+        :relevantAttachments="relevantAttachments"
+        :disabled="disabled"
+        :feesList="feesList"
+        :allfMblnoOptions="allfMblnoOptions"
+        :carsTable="carsTable"
+        @changeShow="showAddOrUpdate"
+        @fixDisabled="fixDisabled"
+        ref="addOrUpdateRef"
+    ></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from "./AddOrUpdate.vue";
+import {
+  delFtmsorderbills,
+  exportFtmsorderbills,
+} from "@/api/fleet/ftmsorderbills";
+import {
+  listFtmsorderbillscars,
+  exportFtmsorderbillscars,
+  selectDriverFtmsorderbillscars,
+} from "@/api/fleet/ftmsorderbillscars";
+import { listGoods } from "@/api/basicdata/goods";
+import { listCorps, selectCorpList } from "@/api/basicdata/corps";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
+
+export default {
+  name: "plans",
+  data() {
+    return {
+      //时间区间
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+      feesList: [],
+      // 控制新增编辑弹窗的显示与隐藏
+      addOrUpdateVisible: false,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 订单主表格数据
+      ftmsorderbillscarsList: [],
+      relevantAttachments: [],
+      // 总条数
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        corpId: null,
+        carStatus: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        goodsId: null,
+        mblno: null,
+        loadAddr: null,
+        mdLoadAddr: null,
+        unLoadAddr: null,
+        cLoadDate: null,
+        billKind:null,
+        carregNo:null,
+        mBillNo:null,
+        orderNo:null,
+        acceptDateList:null,
+      },
+      showSetting: false,
+      drag: false,
+      setRowList: [],
+      getRowList: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "billKind",
+          name: "单据类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "mdLoadDate",
+          name: "装卸日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "billType",
+          name: "贸易方式",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "transType",
+          name: "运输方式",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "corpId",
+          name: "托运人",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "ysl",
+          name: "船名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "voy",
+          name: "航次",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "cntrQty",
+          name: "柜量",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "cntrId",
+          name: "柜型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "goodsId",
+          name: "品名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "cntrWeight",
+          name: "重量",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "12",
+          label: "polId",
+          name: "起运港",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "13",
+          label: "podId",
+          name: "目的港",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "14",
+          label: "loadAddr",
+          name: "提箱场站",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "15",
+          label: "mdLoadAddr",
+          name: "装货地",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "16",
+          label: "unLoadAddr",
+          name: "卸货地",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "17",
+          label: "carregNo",
+          name: "车号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "18",
+          label: "driverName",
+          name: "司机",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "19",
+          label: "orderNo",
+          name: "运单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "20",
+          label: "driverTel",
+          name: "司机电话",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "21",
+          label: "orderName",
+          name: "状态",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "22",
+          label: "acceptDate",
+          name: "接单日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "23",
+          label: "loadDate",
+          name: "提箱日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "24",
+          label: "unLoadDate",
+          name: "还柜日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "25",
+          label: "oilAmt",
+          name: "油气费",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "26",
+          label: "driverbonus",
+          name: "单趟提成",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "27",
+          label: "costOth",
+          name: "其他费用",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "28",
+          label: "costRemarks",
+          name: "备注",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "29",
+          label: "costomAmt05",
+          name: "港杂费",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "30",
+          label: "costomAmt06",
+          name: "提箱费",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "31",
+          label: "costomAmt03",
+          name: "修洗费",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "32",
+          label: "costomAmt04",
+          name: "吊装费",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "33",
+          label: "costomAmt01",
+          name: "出口其他费用",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "34",
+          label: "costomStr01",
+          name: "出口费用备注",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "35",
+          label: "costomAmt02",
+          name: "进口其他费用",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "36",
+          label: "costomStr02",
+          name: "进口费用备注",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "37",
+          label: "mBillNo",
+          name: "主运单号",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      allCheck: false,
+      title: "",
+      form: {},
+      DList: [],
+      CList: [],
+      disabled: false,
+      goodsOptions: [],
+      fMblnoOptions: [],
+      transPropList: [],
+      transTypeList: [],
+      billTypeList: [],
+      show: false,
+      buttonValue: {},
+      allfMblnoOptions: [],
+      carsTable: {},
+    };
+  },
+  // 使用子组件
+  components: {
+    AddOrUpdate,
+    draggable,
+  },
+  created() {
+    this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
+    this.getList();
+    this.getDicts("data_billType").then((response) => {
+      this.billTypeList = response.data;
+    });
+    this.getDicts("data_transType").then((response) => {
+      this.transTypeList = response.data;
+    });
+    this.getDicts("data_transProp").then((response) => {
+      this.transPropList = response.data;
+    });
+    listGoods().then((response) => {
+      this.goodsOptions = response.rows;
+    });
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    this.getRow();
+    if (this.$route.query.id) {
+      this.reset();
+      const data = { id: this.$route.query.id, billStatus: 1060 };
+      selectDriverFtmsorderbillscars(data).then((response) => {
+        if (response.data.cars.billType) {
+          response.data.cars.billType = response.data.cars.billType.toString();
+        }
+        this.title = "查看详情页";
+        this.form = response.data.cars;
+        this.relevantAttachments = response.data.attachs;
+        this.addOrUpdateVisible = !this.addOrUpdateVisible;
+        this.feesList = [];
+      });
+    }
+  },
+  methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "状态跟踪",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    delRow() {
+      this.data = {
+        tableName: "状态跟踪",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "状态跟踪",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+        }
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    /** 查询订单主列表 */
+    getList() {
+      this.loading = true;
+      listFtmsorderbillscars(this.queryParams).then((response) => {
+        response.dataTable.rows.map((e) => {
+          if (e.orderStatus == 10) {
+            e.orderStatus = "车队安排";
+          }
+          if (e.orderStatus == 20) {
+            e.orderStatus = "司机受理";
+          }
+          if (e.orderStatus == 30) {
+            e.orderStatus = "司机出车";
+          }
+          if (e.orderStatus == 40) {
+            e.orderStatus = "提箱";
+          }
+          if (e.orderStatus == 50) {
+            e.orderStatus = "装卸货";
+          }
+          if (e.orderStatus == 60) {
+            e.orderStatus = "还卸柜";
+          }
+          if (e.orderStatus == 70) {
+            e.orderStatus = "费用确认";
+          }
+          if (e.orderStatus == 80) {
+            e.orderStatus = "回单";
+          }
+          if (e.loadDate) {
+            this.$set(e, "loadDate", e.loadDate.substring(0, 10));
+          }
+          if (e.acceptDate) {
+            this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
+          }
+          if (e.mdLoadDate) {
+            this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
+          }
+          if (e.unLoadDate) {
+            this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
+          }
+          if (e.waybillDate) {
+            e.waybillDate = e.waybillDate.substring(0, 10);
+          }
+        });
+        this.ftmsorderbillscarsList = response.dataTable.rows;
+        this.buttonValue = response.buttonValue;
+        this.total = response.dataTable.total;
+        this.loading = false;
+      });
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.addOrUpdateVisible = !this.addOrUpdateVisible;
+      this.title = "添加订单主";
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        billNo: null,
+        actId: null,
+        corpId: null,
+        transUserName: null,
+        planUserName: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        ifContracted: null,
+        contractNo: null,
+        refNo: null,
+        accstlType: null,
+        accdays: null,
+        goodsId: null,
+        goodsPrice: null,
+        goodsLossType: null,
+        goodsLossStd: null,
+        mblno: null,
+        ysl: null,
+        voy: null,
+        pol: null,
+        pod: null,
+        qtyPlan: null,
+        qtyDisPatch: null,
+        weightPlan: null,
+        cntrDesc: null,
+        carNoList: null,
+        loadAddr: null,
+        loadAttn: null,
+        loadAttntel: null,
+        loadDate: null,
+        mdLoadAddr: null,
+        mdLoadAttn: null,
+        mdLoadAttnTel: null,
+        mdLoadDate: null,
+        unLoadAddr: null,
+        unLoadAttn: null,
+        unLoadAttnTel: null,
+        unLoadDate: null,
+        routeId: null,
+        routeDesc: null,
+        ifWaybill: null,
+        ifNeedinvDr: null,
+        postDate: null,
+        billStatus: 0,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remarks: null,
+      };
+      this.disabled = false;
+      this.resetForm("form");
+      this.relevantAttachments = [];
+      this.allfMblnoOptions = [];
+      this.feesList = [];
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const data = { id: row.id, billStatus: 1060 };
+      selectDriverFtmsorderbillscars(data).then((response) => {
+        selectCorpList(row.id).then((response) => {
+          this.allfMblnoOptions = response;
+        });
+        if (response.data.cars.billType) {
+          response.data.cars.billType = response.data.cars.billType.toString();
+        }
+        response.data.feesList.map((e) => {
+          if (e.fFeeunitid) {
+            e.fFeeunitid = e.fFeeunitid.toString();
+          }
+        });
+        this.title = "查看详情页";
+        this.form = response.data.cars;
+        this.relevantAttachments = response.data.attachs;
+        this.feesList = response.data.feesList;
+        this.addOrUpdateVisible = !this.addOrUpdateVisible;
+        this.carsTable = response.data.carsTable;
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+          .then(function () {
+            return delFtmsorderbills(ids);
+          })
+          .then(() => {
+            this.getList();
+            this.msgSuccess("删除成功");
+          });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有订单主数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+          .then(function () {
+            return exportFtmsorderbillscars(queryParams);
+          })
+          .then((response) => {
+            this.download(response.msg);
+          });
+    },
+    /** 搜索按钮操作 */
+    handleQuery(Status) {
+      this.queryParams.pageNum = 1;
+      if (Status) {
+        this.queryParams.carStatus = Status;
+      } else {
+        this.queryParams.carStatus = null;
+      }
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams=this.$options.data().queryParams;
+      this.handleQuery();
+    },
+    // 监听 子组件弹窗关闭后触发,有子组件调用
+    showAddOrUpdate(data) {
+      if (data === "false") {
+        this.addOrUpdateVisible = false;
+      } else {
+        this.addOrUpdateVisible = true;
+      }
+    },
+    fixDisabled(data) {
+      if (data === "false") {
+        this.disabled = false;
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>