Selaa lähdekoodia

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

wengyuwen 4 vuotta sitten
vanhempi
commit
63f658ba17

+ 441 - 70
src/views/finance/charge/index.vue

@@ -254,7 +254,7 @@
             icon="el-icon-view"
             @click="check(scope.row, 1)"
             v-hasPermi="['finance:contrast:edit']"
-             v-if="
+            v-if="
               scope.row.fBillstatus == '提交审核' ||
               scope.row.fBillstatus == '审核中'
             "
@@ -266,7 +266,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['finance:charge:edit']"
-             v-if="
+            v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
               scope.row.fBillstatus == '审批驳回'
@@ -497,45 +497,129 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <div style="width: 100%">
-        <el-button
-          type="warning"
-          size="small"
-          @click="charGe"
-          :disabled="notChange"
-          v-if="queryParams.fBillstatus < '4'"
-          >检索</el-button
-        >
-        <el-button
-          type="primary"
-          size="small"
-          @click="confirmCharge"
-          :disabled="notChange"
-          v-if="queryParams.fBillstatus < '4'"
-          >确认收费</el-button
-        >
-        <el-button type="warning" size="small" @click="handleExportItems"
-          >导出</el-button
-        >
-        <el-button
-          type="success"
-          size="small"
-          @click="revokeCharge"
-          v-if="queryParams.fBillstatus === '6'"
-          >撤销收费</el-button
-        >
-        <!--        <el-button type="info" size="small" @click="printing">打印</el-button>-->
-        <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">
+      <div style="width: 100%; display: flex; justify-content: space-between">
+        <div style="display: flex">
+          <el-button
+            type="warning"
+            size="small"
+            @click="charGe"
+            :disabled="notChange"
+            v-if="queryParams.fBillstatus < '4'"
+            >检索</el-button
+          >
+          <el-button
+            type="primary"
+            size="small"
+            @click="confirmCharge"
+            :disabled="notChange"
+            v-if="queryParams.fBillstatus < '4'"
+            >确认收费</el-button
+          >
+          <el-button type="warning" size="small" @click="handleExportItems"
+            >导出</el-button
+          >
+          <el-button
+            type="success"
+            size="small"
+            @click="revokeCharge"
+            v-if="queryParams.fBillstatus === '6'"
+            >撤销收费</el-button
+          >
+          <!--        <el-button type="info" size="small" @click="printing">打印</el-button>-->
+          <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">
         </el-button>-->
-        <el-button
-          type="danger"
-          size="small"
-          :disabled="tablefilter"
-          @click="approvalRevocation"
-          v-show="queryParams.fBillstatus === '4'"
-          >撤销审批</el-button
-        >
+          <el-button
+            type="danger"
+            size="small"
+            :disabled="tablefilter"
+            @click="approvalRevocation"
+            v-show="queryParams.fBillstatus === '4'"
+            >撤销审批</el-button
+          >
+        </div>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting2 = !showSetting2"
+          ></el-button>
+        </div>
       </div>
+      <el-dialog
+        title="自定义列显示"
+        :visible.sync="showSetting2"
+        width="700px"
+        v-dialogDrag
+        append-to-body
+      >
+        <template slot="title">
+          <div class="avue-crud__dialog__header">
+            <span class="el-dialog__title">
+              <span
+                style="
+                  display: inline-block;
+                  width: 3px;
+                  height: 20px;
+                  margin-right: 5px;
+                  float: left;
+                  margin-top: 2px;
+                "
+              ></span>
+            </span>
+          </div>
+        </template>
+        <div>配置排序列数据(拖动调整顺序)</div>
+        <div style="margin-left: 17px">
+          <el-checkbox
+            v-model="allCheck2"
+            label="全选"
+            @change="allChecked2"
+          ></el-checkbox>
+        </div>
+        <div style="padding: 4px; display: flex; justify-content: center">
+          <draggable
+            v-model="setRowList2"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList2"
+                :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="showSetting2 = false">取 消</el-button>
+          <el-button @click="delRow2" type="danger">重 置</el-button>
+          <el-button type="primary" @click="save2()">确 定</el-button>
+        </span>
+      </el-dialog>
       <el-table
         v-loading="loading"
         :data="increase_s"
@@ -543,7 +627,18 @@
       >
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
         <el-table-column label="序号" type="index" align="center" />
-        <el-table-column label="提单号" align="center" prop="fMblno" />
+        <el-table-column
+          v-for="(item, index) in getRowList2"
+          :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" prop="fMblno" />
         <el-table-column label="存货单号" align="center" prop="fBscorpno" />
         <el-table-column label="品名" align="center" prop="fProductName" />
         <el-table-column label="业务日期" align="center" prop="fBsdate">
@@ -569,7 +664,7 @@
         <el-table-column label="作业类型" align="center" prop="fBusinessType" />
         <el-table-column label="金额" align="center" prop="fAmtdr" />
         <el-table-column label="本次金额" align="center" prop="fAmt" />
-        <el-table-column label="备注" align="center" prop="fRemarks" />
+        <el-table-column label="备注" align="center" prop="fRemarks" /> -->
         <el-table-column
           label="操作"
           align="center"
@@ -815,11 +910,11 @@
           <el-table-column label="货权方" align="center" prop="fName" />
           <el-table-column label="提单号" align="center" prop="fMblno" />
           <el-table-column label="品名" align="center" prop="fProductName" />
-                <el-table-column label="业务日期" align="center">
-          <template slot-scope="scope" v-if="scope.row.fBsdate">
-            <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
-          </template>
-        </el-table-column>
+          <el-table-column label="业务日期" align="center">
+            <template slot-scope="scope" v-if="scope.row.fBsdate">
+              <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="业务类型" align="center" prop="fBilltype">
             <template slot-scope="scope">
               <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
@@ -997,7 +1092,7 @@ import Global from "@/layout/components/global";
 import draggable from "vuedraggable";
 import Vue from "vue";
 import Cookies from "js-cookie";
-import { addSet, select ,} from "@/api/system/set";
+import { addSet, select } from "@/api/system/set";
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1062,14 +1157,14 @@ export default {
       //全屏放大
       dialogFull: false,
       drag: false,
-      tableDate:[
+      tableDate: [
         {
           surface: "1",
           label: "createBy",
           name: "制单人",
           checked: 0,
           fixed: "left",
-          width:100,
+          width: 100,
         },
         {
           surface: "2",
@@ -1077,95 +1172,178 @@ export default {
           name: "系统编号",
           checked: 0,
           fixed: "left",
-          width:100,
+          width: 100,
         },
         {
           surface: "3",
           label: "fCtrlcorpid",
           name: "货权方",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "4",
           label: "createTime",
           name: "制单日期",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "5",
           label: "fAccbilldate",
           name: "收费日期",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "6",
           label: "tMblno",
           name: "提单号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "7",
           label: "chargingMethod",
           name: "收费方式",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "8",
           label: "invoiceNo",
           name: "发票号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "9",
           label: "bank",
           name: "收款银行",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "10",
           label: "waterBillNo",
           name: "水单号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "11",
           label: "fAmtdr",
           name: "应收合计",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "12",
           label: "fAmtcr",
           name: "实收合计",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "13",
           label: "fRemarks",
           name: "备注",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "14",
           label: "fBillstatus",
           name: "状态",
           checked: 0,
-          width:100,
+          width: 100,
+        },
+      ],
+      tableDate2: [
+        {
+          surface: "1",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fBscorpno",
+          name: "存货单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fBsdate",
+          name: "业务日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fFeeName",
+          name: "费用名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fSrcdc",
+          name: "收/付",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fBilltype",
+          name: "业务类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fBusinessType",
+          name: "作业类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "fAmtdr",
+          name: "金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "fAmt",
+          name: "本次金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "fRemarks",
+          name: "备注",
+          checked: 0,
+          width: 100,
         },
       ],
       setRowList: [],
-      getRowList:[],
+      getRowList: [],
+      setRowList2: [],
+      getRowList2: [],
+      allCheck2: false,
+      showSetting2: false,
       typevalue: "",
       typeoptions: [
         {
@@ -1316,6 +1494,8 @@ export default {
   created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
+    this.setRowList2 = this.tableDate2;
+    this.getRowList2 = this.tableDate2;
     this.typevalue = Cookies.get("sysType");
     this.getList();
     this.register();
@@ -1326,6 +1506,7 @@ export default {
       this.methodOptions = response.data;
     });
     this.getRow();
+    this.getRow2();
   },
   activated() {
     this.adoPt();
@@ -1402,7 +1583,7 @@ export default {
         this.getRowList = this.setRowList.filter((e) => e.checked == 0);
       });
     },
-        //重置列表
+    //重置列表
     delRow() {
       this.data = {
         tableName: "收费",
@@ -1416,6 +1597,69 @@ export default {
         }
       });
     },
+    //列设置全选
+    allChecked2() {
+      if (this.allCheck2 == true) {
+        this.setRowList2.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList2.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow2() {
+      let that = this;
+      this.data = {
+        tableName: "收费明细",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList2 = res.data.filter((e) => e.checked == 0);
+          this.setRowList2 = res.data;
+          this.setRowList2 = this.setRowList2.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;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save2() {
+      this.showSetting2 = false;
+      this.data = {
+        tableName: "收费明细",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList2,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
+      });
+    },
+    //重置列表
+    delRow2() {
+      this.data = {
+        tableName: "收费明细",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting2 = false;
+          this.setRowList2 = this.tableDate2;
+          this.getRowList2 = this.tableDate2;
+        }
+      });
+    },
     //开始拖拽事件
     onStart() {
       this.drag = true;
@@ -1539,6 +1783,20 @@ export default {
         };
         getCharge(this.approval.billId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1617,6 +1875,20 @@ export default {
         //大木
         getCharge(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1640,6 +1912,20 @@ export default {
               };
               const fId = row.fId || this.ids;
               getCharge(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.increase_s = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -1664,6 +1950,20 @@ export default {
             };
             const fId = row.fId || this.ids;
             getCharge(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.increase_s = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -1677,6 +1977,20 @@ export default {
         //车队
         getCharges(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1700,6 +2014,20 @@ export default {
               };
               const fId = row.fId || this.ids;
               getCharges(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.increase_s = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -1724,6 +2052,20 @@ export default {
             };
             const fId = row.fId || this.ids;
             getCharges(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.increase_s = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -1872,10 +2214,11 @@ export default {
       this.doNot = true;
       this.hide = true;
       for (let item in this.selection) {
-        this.pass.fAmtcr += Number(this.selection[item].fAmt).toFixed(2);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtcr += Number(this.selection[item].fAmt);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
-      console.log(this.pass.fAmtcr)
+      console.log(this.pass.fAmtcr);
+      console.log(this.pass.fAmtdr);
       // this.pass.fAmtcr.toFixed(2);
       if (this.state_s == true) {
         if (this.selection.length == "0") {
@@ -1906,8 +2249,8 @@ export default {
           this.queryParams.tMblno = this.pass.fMblno; //提单号
           this.queryParams.fCtrlcorpid = this.pass.fName;
           this.queryParams.fCorpid = this.queryParameter.fToCorpid;
-          this.queryParams.fAmtcr = this.pass.fAmtcr;
-          this.queryParams.fAmtdr = this.pass.fAmtdr;
+          this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
+          this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
           this.innerVisible = false;
           this.chargeList_s = [];
           this.queryParameter = {
@@ -2064,7 +2407,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { fName: name};
+      let queryParams = { fName: name };
       listCorps(queryParams).then((response) => {
         this.fMblnoOptions = response;
         this.KHblnoOptions = response;
@@ -2163,6 +2506,20 @@ export default {
         //大木
         getCharge(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2180,6 +2537,20 @@ export default {
         //车队
         getCharges(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;

+ 540 - 55
src/views/finance/contrast/index.vue

@@ -453,54 +453,147 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <div style="width: 100%">
-          <el-button
-            type="warning"
-            size="small"
-            @click="reconciliation"
-            :disabled="notChange"
-            v-if="queryParams.fBillstatus < '4'"
-            >检索</el-button
-          >
-          <el-button
-            type="primary"
-            size="small"
-            @click="confirmReconciliation"
-            :disabled="notChange"
-            v-if="queryParams.fBillstatus < '4'"
-            >确认对账</el-button
-          >
-          <el-button type="warning" size="small" @click="handleExportItems"
-            >导出</el-button
-          >
-          <el-button
-            type="success"
-            size="small"
-            @click="backrRconciliation"
-            v-if="queryParams.fBillstatus === '6'"
-            >撤销对账</el-button
-          >
-          <!--          <el-button type="info" size="small" @click="exportData">导出</el-button>-->
-          <el-button
-            type="danger"
-            size="small"
-            :disabled="disappear"
-            v-if="queryParams.fBillstatus === '4'"
-            @click="backApproval"
-            >撤销审批</el-button
-          >
+        <div style="width: 100%; display: flex; justify-content: space-between">
+          <div style="display: flex">
+            <el-button
+              type="warning"
+              size="small"
+              @click="reconciliation"
+              :disabled="notChange"
+              v-if="queryParams.fBillstatus < '4'"
+              >检索</el-button
+            >
+            <el-button
+              type="primary"
+              size="small"
+              @click="confirmReconciliation"
+              :disabled="notChange"
+              v-if="queryParams.fBillstatus < '4'"
+              >确认对账</el-button
+            >
+            <el-button type="warning" size="small" @click="handleExportItems"
+              >导出</el-button
+            >
+            <el-button
+              type="success"
+              size="small"
+              @click="backrRconciliation"
+              v-if="queryParams.fBillstatus === '6'"
+              >撤销对账</el-button
+            >
+            <!--          <el-button type="info" size="small" @click="exportData">导出</el-button>-->
+            <el-button
+              type="danger"
+              size="small"
+              :disabled="disappear"
+              v-if="queryParams.fBillstatus === '4'"
+              @click="backApproval"
+              >撤销审批</el-button
+            >
+          </div>
+          <div style="margin: 0 12px">
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting2 = !showSetting2"
+            ></el-button>
+          </div>
         </div>
 
         <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
       </el-form>
-
+      <el-dialog
+        title="自定义列显示"
+        :visible.sync="showSetting2"
+        width="700px"
+        v-dialogDrag
+        append-to-body
+      >
+        <template slot="title">
+          <div class="avue-crud__dialog__header">
+            <span class="el-dialog__title">
+              <span
+                style="
+                  display: inline-block;
+                  width: 3px;
+                  height: 20px;
+                  margin-right: 5px;
+                  float: left;
+                  margin-top: 2px;
+                "
+              ></span>
+            </span>
+          </div>
+        </template>
+        <div>配置排序列数据(拖动调整顺序)</div>
+        <div style="margin-left: 17px">
+          <el-checkbox
+            v-model="allCheck2"
+            label="全选"
+            @change="allChecked2"
+          ></el-checkbox>
+        </div>
+        <div style="padding: 4px; display: flex; justify-content: center">
+          <draggable
+            v-model="setRowList2"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList2"
+                :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="showSetting2 = false">取 消</el-button>
+          <el-button @click="delRow2" type="danger">重 置</el-button>
+          <el-button type="primary" @click="save2()">确 定</el-button>
+        </span>
+      </el-dialog>
       <el-table
         v-loading="loading"
         :data="DzfeeList"
         @selection-change="handleSelectionChange_s"
       >
         <el-table-column label="行号" align="center" type="index" />
-        <el-table-column label="提单号" align="center" prop="fMblno" />
+        <el-table-column
+          v-for="(item, index) in getRowList2"
+          :key="index"
+          :label="item.name"
+          :width="item.width"
+          :prop="item.label"
+          align="center"
+          :fixed="item.fixed"
+          :show-overflow-tooltip="true"
+        />
+        <!-- <el-table-column label="提单号" align="center" prop="fMblno" />
         <el-table-column label="业务日期" align="center" prop="fBsdate">
           <template slot-scope="scope">
             <span v-if="scope.row.fBsdate === undefined">无</span>
@@ -520,7 +613,6 @@
         <el-table-column label="单价" align="center" prop="fUnitprice" />
         <el-table-column label="本次金额" align="center" prop="fAmt" />
         <el-table-column label="作业类型" align="center" prop="fBusinessType" />
-
         <el-table-column label="业务类型" align="center" prop="fBilltype">
           <template slot-scope="scope">
             <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
@@ -557,7 +649,7 @@
           align="center"
           prop="fInventoryDays"
         />
-        <el-table-column label="备注" align="center" prop="fRemarks" />
+        <el-table-column label="备注" align="center" prop="fRemarks" /> -->
         <el-table-column
           label="操作"
           align="center"
@@ -706,15 +798,15 @@
               size="small"
             />
           </el-form-item>
-          <el-form-item label="收付" prop="fDc">
+          <el-form-item label="付" prop="fDc">
             <el-col :span="8">
               <el-select
                 v-model="TWareHouseFees.fDc"
                 size="small"
                 style="width: 200px"
               >
-                <el-option label="收" value="D" />
-                <el-option label="付" value="C" />
+                <el-option label="收" value="D" />
+                <el-option label="付" value="C" />
               </el-select>
             </el-col>
           </el-form-item>
@@ -779,7 +871,7 @@
               multiple
             >
               <el-option
-                v-for="(dict,index) in businessTypeOption"
+                v-for="(dict, index) in businessTypeOption"
                 :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
@@ -1005,7 +1097,7 @@ import {
   delFleet,
   detailFleet,
   confirmFleet,
-  listCorps
+  listCorps,
 } from "@/api/finance/contrast";
 // import { listCorps } from "@/api/basicdata/corps";
 import { listFees } from "@/api/basicdata/fees";
@@ -1016,7 +1108,7 @@ import print from "print-js";
 import ApprovalComments from "@/views/startApproval";
 import Global from "@/layout/components/global";
 import Cookies from "js-cookie";
-import { addSet, select ,resetModule} from "@/api/system/set";
+import { addSet, select, resetModule } from "@/api/system/set";
 import draggable from "vuedraggable";
 import Vue from "vue";
 Vue.directive("dialogDrag", {
@@ -1094,7 +1186,7 @@ export default {
         },
       ],
       typevalue: "",
-      tableDate:[
+      tableDate: [
         {
           surface: "1",
           label: "fBillno",
@@ -1159,10 +1251,156 @@ export default {
           width: 100,
         },
       ],
+      tableDate2: [
+        {
+          surface: "1",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fBsdate",
+          name: "业务日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fFeeName",
+          name: "费用名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fSrcdc",
+          name: "收/付",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fAmtdr",
+          name: "金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fFeeunitid",
+          name: "计价单位",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fQty",
+          name: "数量",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fUnitprice",
+          name: "单价",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "fAmt",
+          name: "本次金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "fBusinessType",
+          name: "作业类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "fBilltype",
+          name: "业务类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "12",
+          label: "srcBillNo",
+          name: "来源编号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "13",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "14",
+          label: "fProductName",
+          name: "货物品名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "15",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "16",
+          label: "fChargedate",
+          name: "计费起始日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "17",
+          label: "fBillingDeadline",
+          name: "计费截止日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "18",
+          label: "fBillingDays",
+          name: "计费天数",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "19",
+          label: "fInventoryDays",
+          name: "库存天数",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "20",
+          label: "fRemarks",
+          name: "备注",
+          checked: 0,
+          width: 100,
+        },
+      ],
       setRowList: [],
       getRowList: [],
       allCheck: false,
       showSetting: false,
+      setRowList2: [],
+      getRowList2: [],
+      allCheck2: false,
+      showSetting2: false,
       //控制结算单位是否可操作
       doNot: false,
       jFeetunitOptions: [],
@@ -1312,6 +1550,8 @@ export default {
   created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
+    this.setRowList2 = this.tableDate2;
+    this.getRowList2 = this.tableDate2;
     this.typevalue = Cookies.get("sysType");
     this.getList();
     this.register();
@@ -1322,6 +1562,7 @@ export default {
       this.businessTypeOption = response.data;
     });
     this.getRow();
+    this.getRow2();
   },
   activated() {
     this.Jump();
@@ -1346,7 +1587,7 @@ export default {
     getRow() {
       let that = this;
       this.data = {
-        tableName: "对账",
+        tableName: "对账列表页",
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
@@ -1371,7 +1612,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "对账",
+        tableName: "对账列表页",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };
@@ -1382,7 +1623,7 @@ export default {
     //重置列表
     delRow() {
       this.data = {
-        tableName: "对账",
+        tableName: "对账列表页",
         userId: Cookies.get("userName"),
       };
       resetModule(this.data).then((res) => {
@@ -1393,6 +1634,69 @@ export default {
         }
       });
     },
+    //列设置全选
+    allChecked2() {
+      if (this.allCheck2 == true) {
+        this.setRowList2.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList2.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow2() {
+      let that = this;
+      this.data = {
+        tableName: "对账明细",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList2 = res.data.filter((e) => e.checked == 0);
+          this.setRowList2 = res.data;
+          this.setRowList2 = this.setRowList2.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;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save2() {
+      this.showSetting2 = false;
+      this.data = {
+        tableName: "对账明细",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList2,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
+      });
+    },
+    //重置列表
+    delRow2() {
+      this.data = {
+        tableName: "对账明细",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting2 = false;
+          this.setRowList2 = this.tableDate2;
+          this.getRowList2 = this.tableDate2;
+        }
+      });
+    },
     //开始拖拽事件
     onStart() {
       this.drag = true;
@@ -1458,6 +1762,26 @@ export default {
         };
         getFee(this.approval.billId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBillingDeadline) {
+                e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+              }
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fChargedate) {
+                e.fChargedate = e.fChargedate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1548,9 +1872,9 @@ export default {
       this.addOrUpdateVisib = false;
       let id = null;
       if (this.queryParams.fId) {
-        id = this.queryParams.fId
+        id = this.queryParams.fId;
       } else {
-        id = this.queryParams.id
+        id = this.queryParams.id;
       }
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(id, this.contrastId);
@@ -1746,9 +2070,9 @@ export default {
         this.pass.fAmtcr = Number(this.pass.fAmtcr);
         this.pass.fAmtdr = Number(this.pass.fAmtdr);
         this.pass.fAmtcr += Number(this.selection[item].fAmt);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
-      this.pass.fAmtcr.toFixed(2);
+      // this.pass.fAmtcr.toFixed(2);
       if (this.state_s == true) {
         if (this.selection.length == "0") {
           this.$message.error("未选择导入行");
@@ -2100,6 +2424,26 @@ export default {
       if (Cookies.get("sysType") == 1) {
         getFee(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBillingDeadline) {
+                e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+              }
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fChargedate) {
+                e.fChargedate = e.fChargedate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2124,6 +2468,26 @@ export default {
               };
               const fId = row.fId || this.ids;
               getFee(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBillingDeadline) {
+                      e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+                    }
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fChargedate) {
+                      e.fChargedate = e.fChargedate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.DzfeeList = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -2148,6 +2512,26 @@ export default {
             };
             const fId = row.fId || this.ids;
             getFee(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBillingDeadline) {
+                    e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+                  }
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fChargedate) {
+                    e.fChargedate = e.fChargedate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.DzfeeList = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -2162,6 +2546,26 @@ export default {
       } else if (Cookies.get("sysType") == 2) {
         getFleet(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBillingDeadline) {
+                e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+              }
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fChargedate) {
+                e.fChargedate = e.fChargedate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2185,6 +2589,26 @@ export default {
               };
               const fId = row.fId || this.ids;
               getFleet(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBillingDeadline) {
+                      e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+                    }
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fChargedate) {
+                      e.fChargedate = e.fChargedate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.DzfeeList = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -2208,7 +2632,28 @@ export default {
             };
             const fId = row.fId || this.ids;
             getFleet(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBillingDeadline) {
+                    e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+                  }
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fChargedate) {
+                    e.fChargedate = e.fChargedate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.DzfeeList = response.data.feeDoList;
+              console.log(this.DzfeeList);
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
               this.fWbuOptions = response.data.feesList;
@@ -2237,6 +2682,26 @@ export default {
       if (Cookies.get("sysType") == 1) {
         getFee(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBillingDeadline) {
+                e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+              }
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fChargedate) {
+                e.fChargedate = e.fChargedate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2253,6 +2718,26 @@ export default {
       } else if (Cookies.get("sysType") == 2) {
         getFleet(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBillingDeadline) {
+                e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
+              }
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fChargedate) {
+                e.fChargedate = e.fChargedate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2272,7 +2757,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = {fName: name};
+      let queryParams = { fName: name };
       listCorps(queryParams).then((response) => {
         this.fMblnoOptions = response;
         this.KHblnoOptions = response;

+ 458 - 78
src/views/finance/payment/index.vue

@@ -118,10 +118,10 @@
         </el-button>
       </el-col>
       <div class="tabSetting">
-          <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
         <div style="margin: 0 12px">
           <el-button
             icon="el-icon-setting"
@@ -132,7 +132,7 @@
         </div>
       </div>
     </el-row>
-        <el-dialog
+    <el-dialog
       title="自定义列显示"
       :visible.sync="showSetting"
       width="700px"
@@ -220,7 +220,7 @@
         align="center"
         fixed
       />
-       <el-table-column
+      <el-table-column
         v-for="(item, index) in getRowList"
         :key="index"
         :label="item.name"
@@ -495,44 +495,128 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <div style="width: 100%">
-        <el-button
-          type="warning"
-          size="small"
-          @click="charGe"
-          :disabled="notChange"
-          v-if="queryParams.fBillstatus < '4'"
-          >检索</el-button
-        >
-        <el-button
-          type="primary"
-          size="small"
-          @click="confirmCharge"
-          :disabled="notChange"
-          v-if="queryParams.fBillstatus < '4'"
-          >确认付费</el-button
-        >
-        <el-button type="warning" size="small" @click="handleExportItems"
-          >导出</el-button
-        >
-        <el-button
-          type="success"
-          size="small"
-          @click="revokeCharge"
-          v-if="queryParams.fBillstatus === '6'"
-          >撤销付费</el-button
-        >
-        <!--        <el-button type="info" size="small" @click="printing">打印</el-button>-->
-        <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
-        <el-button
-          type="danger"
-          size="small"
-          :disabled="tablefilter"
-          @click="approvalRevocation"
-          v-show="queryParams.fBillstatus === '4'"
-          >撤销审批</el-button
-        >
+      <div style="width: 100%; display: flex; justify-content: space-between">
+        <div style="display: flex">
+          <el-button
+            type="warning"
+            size="small"
+            @click="charGe"
+            :disabled="notChange"
+            v-if="queryParams.fBillstatus < '4'"
+            >检索</el-button
+          >
+          <el-button
+            type="primary"
+            size="small"
+            @click="confirmCharge"
+            :disabled="notChange"
+            v-if="queryParams.fBillstatus < '4'"
+            >确认付费</el-button
+          >
+          <el-button type="warning" size="small" @click="handleExportItems"
+            >导出</el-button
+          >
+          <el-button
+            type="success"
+            size="small"
+            @click="revokeCharge"
+            v-if="queryParams.fBillstatus === '6'"
+            >撤销付费</el-button
+          >
+          <!--        <el-button type="info" size="small" @click="printing">打印</el-button>-->
+          <!--        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
+          <el-button
+            type="danger"
+            size="small"
+            :disabled="tablefilter"
+            @click="approvalRevocation"
+            v-show="queryParams.fBillstatus === '4'"
+            >撤销审批</el-button
+          >
+        </div>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting2 = !showSetting2"
+          ></el-button>
+        </div>
       </div>
+      <el-dialog
+        title="自定义列显示"
+        :visible.sync="showSetting2"
+        width="700px"
+        v-dialogDrag
+        append-to-body
+      >
+        <template slot="title">
+          <div class="avue-crud__dialog__header">
+            <span class="el-dialog__title">
+              <span
+                style="
+                  display: inline-block;
+                  width: 3px;
+                  height: 20px;
+                  margin-right: 5px;
+                  float: left;
+                  margin-top: 2px;
+                "
+              ></span>
+            </span>
+          </div>
+        </template>
+        <div>配置排序列数据(拖动调整顺序)</div>
+        <div style="margin-left: 17px">
+          <el-checkbox
+            v-model="allCheck2"
+            label="全选"
+            @change="allChecked2"
+          ></el-checkbox>
+        </div>
+        <div style="padding: 4px; display: flex; justify-content: center">
+          <draggable
+            v-model="setRowList2"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList2"
+                :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="showSetting2 = false">取 消</el-button>
+          <el-button @click="delRow2" type="danger">重 置</el-button>
+          <el-button type="primary" @click="save2()">确 定</el-button>
+        </span>
+      </el-dialog>
       <el-table
         v-loading="loading"
         :data="increase_s"
@@ -540,7 +624,18 @@
       >
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
         <el-table-column label="序号" type="index" align="center" />
-        <el-table-column label="提单号" align="center" prop="fMblno" />
+        <el-table-column
+          v-for="(item, index) in getRowList2"
+          :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" prop="fMblno" />
         <el-table-column label="存货单号" align="center" prop="fBscorpno" />
         <el-table-column label="品名" align="center" prop="fProductName" />
         <el-table-column label="业务日期" align="center">
@@ -566,7 +661,7 @@
         <el-table-column label="作业类型" align="center" prop="fBusinessType" />
         <el-table-column label="金额" align="center" prop="fAmtdr" />
         <el-table-column label="本次金额" align="center" prop="fAmt" />
-        <el-table-column label="备注" align="center" prop="fRemarks" />
+        <el-table-column label="备注" align="center" prop="fRemarks" /> -->
         <el-table-column
           label="操作"
           align="center"
@@ -765,7 +860,7 @@
               multiple
             >
               <el-option
-                v-for="(dict,index) in businessTypeOption"
+                v-for="(dict, index) in businessTypeOption"
                 :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
@@ -840,9 +935,9 @@
           <el-table-column label="提单号" align="center" prop="fMblno" />
           <el-table-column label="品名" align="center" prop="fProductName" />
           <el-table-column label="业务日期" align="center">
-             <template slot-scope="scope" v-if="scope.row.fBsdate">
-            <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
-          </template>
+            <template slot-scope="scope" v-if="scope.row.fBsdate">
+              <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
+            </template>
           </el-table-column>
           <el-table-column label="业务类型" align="center" prop="fBilltype">
             <template slot-scope="scope">
@@ -928,11 +1023,7 @@
           prop="fProductName"
           width="120"
         />
-        <el-table-column
-          label="业务日期"
-          align="center"
-          width="120"
-        >
+        <el-table-column label="业务日期" align="center" width="120">
           <template slot-scope="scope" v-if="scope.row.fBsdate">
             <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
           </template>
@@ -1019,7 +1110,7 @@ import draggable from "vuedraggable";
 import Global from "@/layout/components/global";
 import Cookies from "js-cookie";
 import Vue from "vue";
-import { addSet, select ,resetModule} from "@/api/system/set";
+import { addSet, select, resetModule } from "@/api/system/set";
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1082,14 +1173,14 @@ export default {
   data() {
     return {
       drag: false,
-      tableDate:[
+      tableDate: [
         {
           surface: "1",
           label: "createBy",
           name: "制单人",
           checked: 0,
           fixed: "left",
-          width:100,
+          width: 100,
         },
         {
           surface: "2",
@@ -1097,97 +1188,180 @@ export default {
           name: "系统编号",
           checked: 0,
           fixed: "left",
-          width:100,
+          width: 100,
         },
         {
           surface: "3",
           label: "fCtrlcorpid",
           name: "货权方",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "4",
           label: "createTime",
           name: "制单日期",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "5",
           label: "fAccbilldate",
           name: "收费日期",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "6",
           label: "tMblno",
           name: "提单号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "7",
           label: "chargingMethod",
           name: "收费方式",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "8",
           label: "invoiceNo",
           name: "发票号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "9",
           label: "bank",
           name: "收款银行",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "10",
           label: "waterBillNo",
           name: "水单号",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "11",
           label: "fAmtdr",
           name: "应收合计",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "12",
           label: "fAmtcr",
           name: "实收合计",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "13",
           label: "fRemarks",
           name: "备注",
           checked: 0,
-          width:100,
+          width: 100,
         },
         {
           surface: "14",
           label: "fBillstatus",
           name: "状态",
           checked: 0,
-          width:100,
+          width: 100,
         },
       ],
       setRowList: [],
       getRowList: [],
       allCheck: false,
       showSetting: false,
+      tableDate2: [
+        {
+          surface: "1",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fBscorpno",
+          name: "存货单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fBsdate",
+          name: "业务日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fFeeName",
+          name: "费用名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fSrcdc",
+          name: "收/付",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fBilltype",
+          name: "业务类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fBusinessType",
+          name: "作业类型",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "fAmtdr",
+          name: "金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "fAmt",
+          name: "本次金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "fRemarks",
+          name: "备注",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      setRowList2: [],
+      getRowList2: [],
+      allCheck2: false,
+      showSetting2: false,
       typevalue: "",
       typeoptions: [
         {
@@ -1227,7 +1401,7 @@ export default {
       //打开内部弹窗
       innerVisible: false,
       chargeList_s: [],
-      selection:[],
+      selection: [],
       increase_s: [],
       cancelButton: true,
       // 选中数组
@@ -1336,6 +1510,8 @@ export default {
   created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
+    this.setRowList2 = this.tableDate2;
+    this.getRowList2 = this.tableDate2;
     this.typevalue = Cookies.get("sysType");
     this.getList();
     this.register();
@@ -1347,6 +1523,7 @@ export default {
       this.methodOptions = response.data;
     });
     this.getRow();
+    this.getRow2();
   },
   activated() {
     this.adoPt();
@@ -1375,7 +1552,7 @@ export default {
     full() {
       this.dialogFull = !this.dialogFull;
     },
-        //列设置全选
+    //列设置全选
     allChecked() {
       if (this.allCheck == true) {
         this.setRowList.map((e) => {
@@ -1424,7 +1601,7 @@ export default {
         this.getRowList = this.setRowList.filter((e) => e.checked == 0);
       });
     },
-        //重置列表
+    //重置列表
     delRow() {
       this.data = {
         tableName: "付费",
@@ -1438,6 +1615,69 @@ export default {
         }
       });
     },
+    //列设置全选
+    allChecked2() {
+      if (this.allCheck2 == true) {
+        this.setRowList2.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList2.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow2() {
+      let that = this;
+      this.data = {
+        tableName: "付费明细",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList2 = res.data.filter((e) => e.checked == 0);
+          this.setRowList2 = res.data;
+          this.setRowList2 = this.setRowList2.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;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save2() {
+      this.showSetting2 = false;
+      this.data = {
+        tableName: "付费明细",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList2,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
+      });
+    },
+    //重置列表
+    delRow2() {
+      this.data = {
+        tableName: "付费明细",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting2 = false;
+          this.setRowList2 = this.tableDate2;
+          this.getRowList2 = this.tableDate2;
+        }
+      });
+    },
     //开始拖拽事件
     onStart() {
       this.drag = true;
@@ -1562,6 +1802,20 @@ export default {
           //大木
           getCharge(this.approval.billId).then((response) => {
             this.Operator = response.data.tFee.createBy;
+            if (response.data.feeDoList != 0) {
+              response.data.feeDoList.map((e) => {
+                if (e.fBsdate) {
+                  e.fBsdate = e.fBsdate.slice(0, 10);
+                }
+                if (e.fSrcdc) {
+                  if (e.fSrcdc == "D") {
+                    e.fSrcdc = "收";
+                  } else {
+                    e.fSrcdc = "付";
+                  }
+                }
+              });
+            }
             this.increase_s = response.data.feeDoList;
             this.fWbuOptions = response.data.feesList;
             this.queryParams = response.data.tFee;
@@ -1574,6 +1828,20 @@ export default {
           //车队
           getCharges(this.approval.billId).then((response) => {
             this.Operator = response.data.tFee.createBy;
+            if (response.data.feeDoList != 0) {
+              response.data.feeDoList.map((e) => {
+                if (e.fBsdate) {
+                  e.fBsdate = e.fBsdate.slice(0, 10);
+                }
+                if (e.fSrcdc) {
+                  if (e.fSrcdc == "D") {
+                    e.fSrcdc = "收";
+                  } else {
+                    e.fSrcdc = "付";
+                  }
+                }
+              });
+            }
             this.increase_s = response.data.feeDoList;
             this.fWbuOptions = response.data.feesList;
             this.queryParams = response.data.tFee;
@@ -1653,6 +1921,20 @@ export default {
         //大木
         getCharge(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1676,6 +1958,20 @@ export default {
               };
               const fId = row.fId || this.ids;
               getCharge(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.increase_s = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -1700,6 +1996,20 @@ export default {
             };
             const fId = row.fId || this.ids;
             getCharge(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.increase_s = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -1713,6 +2023,20 @@ export default {
         //车队
         getCharges(row.fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -1736,6 +2060,20 @@ export default {
               };
               const fId = row.fId || this.ids;
               getCharges(fId).then((response) => {
+                if (response.data.feeDoList != 0) {
+                  response.data.feeDoList.map((e) => {
+                    if (e.fBsdate) {
+                      e.fBsdate = e.fBsdate.slice(0, 10);
+                    }
+                    if (e.fSrcdc) {
+                      if (e.fSrcdc == "D") {
+                        e.fSrcdc = "收";
+                      } else {
+                        e.fSrcdc = "付";
+                      }
+                    }
+                  });
+                }
                 this.increase_s = response.data.feeDoList;
                 this.fWbuOptions = response.data.feesList;
                 this.queryParams = response.data.tFee;
@@ -1760,6 +2098,20 @@ export default {
             };
             const fId = row.fId || this.ids;
             getCharges(fId).then((response) => {
+              if (response.data.feeDoList != 0) {
+                response.data.feeDoList.map((e) => {
+                  if (e.fBsdate) {
+                    e.fBsdate = e.fBsdate.slice(0, 10);
+                  }
+                  if (e.fSrcdc) {
+                    if (e.fSrcdc == "D") {
+                      e.fSrcdc = "收";
+                    } else {
+                      e.fSrcdc = "付";
+                    }
+                  }
+                });
+              }
               this.increase_s = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -1907,10 +2259,10 @@ export default {
       this.doNot = true;
       this.hide = true;
       for (let item in this.selection) {
-        this.pass.fAmtcr += Number(this.selection[item].fAmt).toFixed(2);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtcr += Number(this.selection[item].fAmt);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
-      console.log(this.pass.fAmtcr)
+      console.log(this.pass.fAmtcr);
       if (this.state_s == true) {
         if (this.selection.length == "0") {
           this.$message.error("未选择导入行");
@@ -1974,7 +2326,7 @@ export default {
       } else if (Cookies.get("sysType") == 2) {
         //车队
         listCharges(this.tableFilter).then((response) => {
-             response.rows.map((e) => {
+          response.rows.map((e) => {
             if (e.createTime) {
               e.createTime = e.createTime.substring(0, 10);
             }
@@ -2095,7 +2447,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = {fName: name};
+      let queryParams = { fName: name };
       listCorps(queryParams).then((response) => {
         this.fMblnoOptions = response;
         this.KHblnoOptions = response;
@@ -2194,6 +2546,20 @@ export default {
         //大木
         getCharge(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;
@@ -2206,6 +2572,20 @@ export default {
         //车队
         getCharges(fId).then((response) => {
           this.Operator = response.data.tFee.createBy;
+          if (response.data.feeDoList != 0) {
+            response.data.feeDoList.map((e) => {
+              if (e.fBsdate) {
+                e.fBsdate = e.fBsdate.slice(0, 10);
+              }
+              if (e.fSrcdc) {
+                if (e.fSrcdc == "D") {
+                  e.fSrcdc = "收";
+                } else {
+                  e.fSrcdc = "付";
+                }
+              }
+            });
+          }
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
           this.queryParams = response.data.tFee;

+ 22 - 8
src/views/fleet/scheduling/AddOrUpdate.vue

@@ -79,7 +79,7 @@
             </el-form-item>
           </el-col>
         </el-row>
-                <el-row>
+        <el-row>
           <el-col :span="6">
             <el-form-item label="提单号" prop="mblno">
               <el-input
@@ -746,7 +746,9 @@
                       @click.native.prevent="
                         revokeplansRow(scope.$index, schedulingList, scope.row)
                       "
-                      :disabled="scope.row.billStatus < 6||!scope.row.billStatus"
+                      :disabled="
+                        scope.row.billStatus < 6 || !scope.row.billStatus
+                      "
                       >撤销</el-button
                     >
                     <el-button
@@ -754,7 +756,9 @@
                       type="text"
                       icon="el-icon-refresh"
                       @click.native.prevent="changeplansRow(scope.row)"
-                      :disabled="scope.row.billStatus < 6||!scope.row.billStatus"
+                      :disabled="
+                        scope.row.billStatus < 6 || !scope.row.billStatus
+                      "
                       >变更</el-button
                     >
                   </template>
@@ -1222,7 +1226,10 @@
                         :show-file-list="false"
                         :limit="1"
                       >
-                        <el-button size="small" type="text" :disabled="disabled2"
+                        <el-button
+                          size="small"
+                          type="text"
+                          :disabled="disabled2"
                           >点击上传</el-button
                         >
                       </el-upload>
@@ -1258,7 +1265,7 @@
                       @click.native.prevent="
                         deleteRow(scope.$index, relevantAttachments)
                       "
-                      :disabled="disabled2 "
+                      :disabled="disabled2"
                       >删除</el-button
                     >
                   </template>
@@ -1478,7 +1485,7 @@ export default {
       this.fWbuOptions = response.rows;
     });
     company({
-      fStatus:0
+      fStatus: 0,
     }).then((response) => {
       this.companyList = response.rows;
     });
@@ -1596,6 +1603,13 @@ export default {
             this.CList.map((e) => {
               return (e.fDc = "C");
             });
+            for (let item in this.planList) {
+              if (
+                this.planList[item].cntrQty != this.planList[item].cntrPlanQty
+              ) {
+                return this.$message.error("计划货量存在未安排的货量");
+              }
+            }
             let formData = new window.FormData();
             formData.append("tmsorder", JSON.stringify(this.form));
             formData.append(
@@ -1609,7 +1623,7 @@ export default {
             );
             formData.append("plans", JSON.stringify(this.schedulingList));
             addFtmsorderbillsplans(formData).then((response) => {
-              this.msgSuccess("新增成功");
+              this.msgSuccess("提交成功");
               this.$parent.getList();
               this.showDialog = false;
             });
@@ -1788,7 +1802,7 @@ export default {
           }
         });
       } else {
-       this.$message.error("请勿重复变更");
+        this.$message.error("请勿重复变更");
       }
     },
     total(row) {

+ 490 - 368
src/views/track/cabinet/AddOrUpdate.vue

@@ -7,7 +7,7 @@
     :close-on-click-modal="false"
   >
     <span>
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+      <el-form ref="form" :model="form" label-width="90px">
         <el-row>
           <el-col :span="6">
             <el-form-item label="客户名称" prop="fCorpId">
@@ -517,7 +517,7 @@
             </el-form-item>
           </el-col>
         </el-row>
-       <el-row v-if="form.billType == 1">
+        <el-row v-if="form.billType == 1">
           <el-col :span="6">
             <el-form-item label="修洗费" prop="costomAmt03">
               <el-input
@@ -631,12 +631,12 @@
         </el-row>
       </el-form>
       <el-collapse v-model="collapses">
-        <!-- <el-collapse-item v-if="userType == '00'">
+        <el-collapse-item>
           <template slot="title">
             <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
               ><span
                 style="font-size: 16px; font-weight: bolder; margin-left: 5px"
-                >收款信息</span
+                >确认费用</span
               >
             </i>
           </template>
@@ -653,340 +653,215 @@
                   type="primary"
                   icon="el-icon-plus"
                   size="mini"
-                  @click="addDListRow(DList)"
-                  :disabled="disabled"
-                  >添加</el-button
+                  @click="addRelevt"
+                  >添加费用</el-button
                 >
-              </div>
-            </div>
-            <el-table :data="DList">
-              <el-table-column label="结算单位" align="center" prop="fCorpid">
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fCorpid"
-                    placeholder="结算单位"
-                    :clearable="true"
-                    filterable
-                    :disabled="disabled"
-                  >
-                    <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 label="费用名称" align="center" prop="fFeeid">
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fFeeid"
-                    placeholder="费用名称"
-                    clearable
-                    filterable
-                    :disabled="disabled"
-                  >
-                    <el-option
-                      v-for="(dict, index) in fWbuOptions"
-                      :key="index.fId"
-                      :label="dict.fName"
-                      :value="dict.fId"
-                    />
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column
-                label="计费单位"
-                align="center"
-                prop="fFeeunitid"
-              >
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fFeeunitid"
-                    placeholder="计费单位"
-                    :disabled="disabled"
-                  >
-                    <el-option
-                      v-for="(dict, index) in ffeeunitidList"
-                      :key="index.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column label="计费数量" align="center" prop="fQty">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fQty"
-                    placeholder="计费数量"
-                    v-input-limit="0"
-                    :disabled="disabled"
-                    @input="total(scope.row)"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="单价" align="center" prop="fUnitprice">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fUnitprice"
-                    placeholder="单价"
-                    v-input-limit="2"
-                    :disabled="disabled"
-                    @input="total(scope.row)"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="币种" align="center" prop="fCurrency">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fCurrency"
-                    placeholder="RMB"
-                    :disabled="true"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="汇率" align="center" prop="fExrate">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fExrate"
-                    placeholder="汇率"
-                    v-input-limit="2"
-                    :disabled="disabled"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="金额" align="center" prop="fAmount">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fAmount"
-                    placeholder="金额"
-                    v-input-limit="2"
-                    :disabled="true"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="税率" align="center" prop="fTaxrate">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fTaxrate"
-                    placeholder="税率"
-                    v-input-limit="2"
-                    :disabled="disabled"
-                  />
-                </template>
-              </el-table-column>
-
-              <el-table-column label="备注" align="center" prop="remarks">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.remarks"
-                    placeholder="备注"
-                    :disabled="disabled"
-                  />
-                </template>
-              </el-table-column>
-
-              <el-table-column
-                label="操作"
-                align="center"
-                class-name="small-padding fixed-width"
-                width="100"
-              >
-                <template slot-scope="scope">
-                  <el-button
-                    size="mini"
-                    type="text"
-                    icon="el-icon-delete"
-                    @click.native.prevent="deleteRow(scope.$index, DList)"
-                    :disabled="disabled"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </el-collapse-item>
-        <el-collapse-item v-if="userType == '00'">
-          <template slot="title">
-            <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
-              ><span
-                style="font-size: 16px; font-weight: bolder; margin-left: 5px"
-                >付款信息</span
-              >
-            </i>
-          </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="addDListRow(CList)"
-                  :disabled="disabled"
-                  >添加</el-button
+                  @click="addRelevt2"
+                  >导入费用</el-button
                 >
               </div>
             </div>
-            <el-table :data="CList">
-              <el-table-column label="结算单位" align="center" prop="fCorpid">
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fCorpid"
-                    placeholder="结算单位"
-                    :clearable="true"
-                    filterable
-                    :disabled="disabled"
-                  >
-                    <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 label="费用名称" align="center" prop="fFeeid">
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fFeeid"
-                    placeholder="费用名称"
-                    clearable
-                    filterable
-                    :disabled="disabled"
-                  >
-                    <el-option
-                      v-for="(dict, index) in fWbuOptions"
-                      :key="index.fId"
-                      :label="dict.fName"
-                      :value="dict.fId"
-                    />
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column
-                label="计费单位"
-                align="center"
-                prop="fFeeunitid"
-              >
-                <template slot-scope="scope">
-                  <el-select
-                    v-model="scope.row.fFeeunitid"
-                    placeholder="计费单位"
-                    :disabled="disabled"
-                  >
-                    <el-option
-                      v-for="(dict, index) in ffeeunitidList"
-                      :key="index.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column label="计费数量" align="center" prop="fQty">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fQty"
-                    placeholder="计费数量"
-                    v-input-limit="0"
-                    :disabled="disabled"
-                    @input="total(scope.row)"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="单价" align="center" prop="fUnitprice">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fUnitprice"
-                    placeholder="单价"
-                    v-input-limit="2"
-                    :disabled="disabled"
-                    @input="total(scope.row)"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="币种" align="center" prop="fCurrency">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fCurrency"
-                    placeholder="RMB"
-                    :disabled="true"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="汇率" align="center" prop="fExrate">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fExrate"
-                    placeholder="汇率"
-                    v-input-limit="2"
-                    :disabled="disabled"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="金额" align="center" prop="fAmount">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fAmount"
-                    placeholder="金额"
-                    v-input-limit="2"
-                    :disabled="true"
-                  />
-                </template>
-              </el-table-column>
-              <el-table-column label="税率" align="center" prop="fTaxrate">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.fTaxrate"
-                    placeholder="税率"
-                    v-input-limit="2"
-                    :disabled="disabled"
+          </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"
+                >
+                  <el-option
+                    v-for="(dict, index) in fMblnoOptions2"
+                    :key="index.fId"
+                    :label="dict.fName"
+                    :value="dict.fId"
                   />
-                </template>
-              </el-table-column>
-
-              <el-table-column label="备注" align="center" prop="remarks">
-                <template slot-scope="scope">
-                  <el-input
-                    v-model="scope.row.remarks"
-                    placeholder="备注"
-                    :disabled="disabled"
+                </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
+                  remote
+                  placeholder="费用名称"
+                >
+                  <el-option
+                    v-for="(dict, index) in fWbuOptions"
+                    :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="请选择">
+                  <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="请选择计费单位"
+                  clearable
+                >
+                  <el-option
+                    v-for="dict in jFeetunitOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
                   />
-                </template>
-              </el-table-column>
-
-              <el-table-column
-                label="操作"
-                align="center"
-                class-name="small-padding fixed-width"
-                width="100"
-              >
-                <template slot-scope="scope">
-                  <el-button
-                    size="mini"
-                    type="text"
-                    icon="el-icon-delete"
-                    @click.native.prevent="deleteRow(scope.$index, DList)"
-                    :disabled="disabled"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </el-collapse-item> -->
+                </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"
+                  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"
+                  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"
+                  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"
+                  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"
+                  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"
+                  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"
+                  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"
+                  @click.native.prevent="deleteRow(scope.$index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-collapse-item>
         <el-collapse-item>
           <template slot="title">
             <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
@@ -1169,7 +1044,7 @@ import {
 } from "@/api/fleet/ftmsorderbillscars";
 import { getBasicInformation } from "@/api/kaihe/basicdata/container";
 import { listGoods } from "@/api/basicdata/goods";
-import { listCorps } from "@/api/basicdata/corps";
+import { listCorps,selectCorpList } from "@/api/basicdata/corps";
 import { listFees } from "@/api/basicdata/fees";
 import UploadFile from "@/components/Uploadfile";
 import Cookies from "js-cookie";
@@ -1199,6 +1074,10 @@ export default {
       type: Array,
       default: [],
     },
+    feesList: {
+      type: Array,
+      default: [],
+    },
   },
   components: {
     UploadFile,
@@ -1207,42 +1086,6 @@ export default {
     return {
       // 控制弹出框显示隐藏
       showDialog: false,
-      // 表单校验
-      rules: {
-        // fCorpId: [
-        //   { required: true, message: "请输入客户名称", trigger: "blur" },
-        // ],
-        // billType: [
-        //   { required: true, message: "请选择业务类型", trigger: "blur" },
-        // ],
-        // transType: [
-        //   { required: true, message: "请选择运输方式", trigger: "blur" },
-        // ],
-        // // loadAddr: [
-        // //   { required: true, message: "请输入提箱地点", trigger: "blur" },
-        // // ],
-        // loadAttntel: [
-        //   {
-        //     pattern: /^((0\d{2,3}-\d{7,8})|(1[0123456789]\d{9}))$/,
-        //     message: "请正确输入手机号",
-        //     trigger: "blur",
-        //   },
-        // ],
-        // mdLoadAttnTel: [
-        //   {
-        //     pattern: /^((0\d{2,3}-\d{7,8})|(1[0123456789]\d{9}))$/,
-        //     message: "请正确输入手机号",
-        //     trigger: "blur",
-        //   },
-        // ],
-        // unLoadAttnTel: [
-        //   {
-        //     pattern: /^((0\d{2,3}-\d{7,8})|(1[0123456789]\d{9}))$/,
-        //     message: "请正确输入手机号",
-        //     trigger: "blur",
-        //   },
-        // ],
-      },
       billTypeList: [],
       transTypeList: [],
       transPropList: [],
@@ -1253,6 +1096,7 @@ export default {
       username: null,
       collapses: [],
       fMblnoOptions: [],
+       fMblnoOptions2: [],
       cntrId2List: [],
       goodsOptions: [],
       fWbuOptions: [],
@@ -1263,9 +1107,15 @@ export default {
       headers: {
         Authorization: "Bearer " + getToken(),
       },
+      jFeetunitOptions:[]
     };
   },
   created() {
+    this.getDicts("data_unitfees").then((response) => {
+      if (response.data) {
+        this.jFeetunitOptions = response.data;
+      }
+    });
     this.getDicts("data_billType").then((response) => {
       this.billTypeList = response.data;
     });
@@ -1298,6 +1148,9 @@ export default {
     listCorps().then((response) => {
       this.fMblnoOptions = response.rows;
     });
+    // selectCorpList().then((response) => {
+    //   this.allfMblnoOptions = response;
+    // });
     listGoods().then((response) => {
       this.goodsOptions = response.rows;
     });
@@ -1370,6 +1223,275 @@ export default {
         this.$set(this.relevantAttachments[list], "attachName", row.fileName);
       }
     },
+    addRelevt2() {
+      let arr = this.feesList;
+      arr.filter((e) => e.actId == "1080");
+      if (arr.length > 0) {
+        this.$confirm("已生成费用信息, 是否重新生成?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.$nextTick().then(() => {
+              this.feesList = this.feesList.filter((e) => e.actId != "1080");
+            });
+            this.$nextTick().then(() => {
+              this.addRelevt3();
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消",
+            });
+          });
+      } else {
+        this.addRelevt3();
+      }
+    },
+    addRelevt3() {
+      if (this.form.oilAmt > 0) {
+        this.feesList.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: this.form.costRemarks,
+        });
+      }
+      if (this.form.driverbonus > 0) {
+        this.feesList.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: this.form.costRemarks,
+        });
+      }
+      if (this.form.costOth > 0) {
+        this.feesList.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: this.form.costRemarks,
+        });
+      }
+      if (this.form.costomAmt03 > 0) {
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
+      }
+      if (this.form.costomAmt04 > 0) {
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
+      }
+      if (this.form.costomAmt02 > 0) {
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
+      }
+      if (this.form.costomAmt05 > 0) {
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
+      }
+      if (this.form.costomAmt06 > 0) {
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
+      }
+      if (this.form.costomAmt01 > 0) {
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
+      }
+    },
     // 弹出框关闭后触发
     handleClose() {
       // 子组件调用父组件方法,并传递参数
@@ -1381,13 +1503,13 @@ export default {
     submitForm(butType) {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          if(this.form.costOth>0&&!this.form.costRemarks){
+          if (this.form.costOth > 0 && !this.form.costRemarks) {
             return this.$message.error("请输入花销备注");
           }
-          if(this.form.costomAmt02>0&&!this.form.costomStr02){
+          if (this.form.costomAmt02 > 0 && !this.form.costomStr02) {
             return this.$message.error("请输入费用备注");
           }
-           if(this.form.costomAmt01>0&&!this.form.costomStr01){
+          if (this.form.costomAmt01 > 0 && !this.form.costomStr01) {
             return this.$message.error("请输入费用备注");
           }
           this.DList.map((e) => {

+ 3 - 15
src/views/track/cabinet/index.vue

@@ -449,6 +449,7 @@
       :CList="CList"
       :relevantAttachments="relevantAttachments"
       :disabled="disabled"
+      :feesList="feesList"
       @changeShow="showAddOrUpdate"
       @fixDisabled="fixDisabled"
       ref="addOrUpdateRef"
@@ -509,6 +510,7 @@ export default {
           },
         ],
       },
+      feesList:[],
       // 控制新增编辑弹窗的显示与隐藏
       addOrUpdateVisible: false,
       // 非单个禁用
@@ -840,6 +842,7 @@ export default {
         this.form = response.data.cars;
         this.relevantAttachments = response.data.attachs;
         this.addOrUpdateVisible = !this.addOrUpdateVisible;
+        this.feesList=[]
       });
     }
   },
@@ -1048,21 +1051,6 @@ export default {
         if (response.data.cars.billType) {
           response.data.cars.billType = response.data.cars.billType.toString();
         }
-        // if (response.data.fees.length) {
-        //   this.DList = response.data.fees.filter((e) => e.fDc == "D");
-        //   this.CList = response.data.fees.filter((e) => e.fDc == "C");
-        //   response.data.fees.map((e) => {
-        //     if (e.fFeeunitid) {
-        //       e.fFeeunitid = e.fFeeunitid.toString();
-        //     }
-        //   });
-        // } else {
-        //   this.DList = [];
-        //   this.CList = [];
-        // }
-        // if (response.data.cars.orderStatus >= 60) {
-        //   this.disabled = true;
-        // }
         this.title = "查看详情页";
         this.form = response.data.cars;
         this.relevantAttachments = response.data.attachs;

+ 260 - 169
src/views/track/singleCost/AddOrUpdate.vue

@@ -817,11 +817,71 @@ export default {
     deleteRow(index) {
       this.feesList.splice(index, 1);
     },
+     // 表单重置
+    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.feesList=[]
+    },
     init() {
+      this.reset()
       this.showDialog = true;
       // console.log(this.fname.id)
       selectCorpList(this.fname.id).then((response) => {
-         this.fMblnoOptions = response;
+        this.fMblnoOptions = response;
       });
       query(this.fname.id).then((data) => {
         if (data.data.billType) {
@@ -879,13 +939,26 @@ export default {
     },
     addRelevt2() {
       let arr = this.feesList;
-      let arr2 = [];
-      arr.forEach((e) => {
-        arr2.push(e.fFeeid);
-      });
-      if (arr2.length > 0) {
-        return this.$message.error("费用已导入,请勿重复导入");
+      arr.filter((e) => e.actId == "1080");
+      if (arr.length > 0) {
+      this.$confirm('已生成费用信息, 是否重新生成?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+            this.feesList=this.feesList.filter((e) => e.actId != "1080");
+            this.addRelevt3()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });          
+        });
+      } else {
+        this.addRelevt3()
       }
+    },
+    addRelevt3() {
       if (this.form.oilAmt > 0) {
         this.feesList.push({
           actId: "1080",
@@ -935,178 +1008,196 @@ export default {
         });
       }
       if (this.form.costomAmt03 > 0) {
-        this.feesList.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:this.form.costomStr02,
-        },{
-          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: this.form.costomStr02,
-        });
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt04 > 0) {
-        this.feesList.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: this.form.costomStr02,
-        },{
-          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: this.form.costomStr02,
-        });
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt02 > 0) {
-        this.feesList.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: this.form.costomStr02,
-        },{
-          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: this.form.costomStr02,
-        });
+        this.feesList.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: this.form.costomStr02,
+          },
+          {
+            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: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt05 > 0) {
-        this.feesList.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: this.form.costomStr01,
-        },{
-          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: this.form.costomStr01,
-        });
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
       }
       if (this.form.costomAmt06 > 0) {
-        this.feesList.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: this.form.costomStr01,
-        },{
-          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: this.form.costomStr01,
-        });
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
       }
       if (this.form.costomAmt01 > 0) {
-        this.feesList.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: this.form.costomStr01,
-        },{
-          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: this.form.costomStr01,
-        });
+        this.feesList.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: this.form.costomStr01,
+          },
+          {
+            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: this.form.costomStr01,
+          }
+        );
       }
     },
     deleteplansRow(index, rows, row) {