Explorar o código

提交单趟费用

caojunjie %!s(int64=4) %!d(string=hai) anos
pai
achega
f89a985e01

+ 27 - 0
src/api/track/singleCost.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询订单调度列表
+export function listFtmsorderbillsplans(query) {
+  return request({
+    url: 'fleet/ftmsorderbillscars/list',
+    method: 'get',
+    params: query
+  })
+}
+//修改查询
+export function query(query) {
+  return request({
+    url: 'fleet/ftmsorderbillsfees/'+query,
+    method: 'get'
+  })
+}
+//提交
+export function submit(data) {
+  return request({
+    url: '/fleet/ftmsorderbillsfees',
+    method: 'post',
+    data: data
+  })
+}
+
+

BIN=BIN
src/assets/logo/logo.png


+ 50 - 42
src/views/basicdata/fleet/companyMsg.vue

@@ -22,38 +22,39 @@
             size="mini"
             @click="addOrUpdateHandle()"
             v-hasPermi="['fleet:companyMsg:add']"
-          >新增</el-button>
+          >新增
+          </el-button>
         </el-col>
-<!--        <el-col :span="1.5">-->
-<!--          <el-button-->
-<!--            type="success"-->
-<!--            icon="el-icon-edit"-->
-<!--            size="mini"-->
-<!--            :disabled="single"-->
-<!--            @click="handleUpdate"-->
-<!--            v-hasPermi="['basicdata:corps:edit']"-->
-<!--          >修改</el-button>-->
-<!--        </el-col>-->
-<!--        <el-col :span="1.5">-->
-<!--          <el-button-->
-<!--            type="danger"-->
-<!--            icon="el-icon-delete"-->
-<!--            size="mini"-->
-<!--            :disabled="multiple"-->
-<!--            @click="handleDelete"-->
-<!--            v-hasPermi="['basicdata:corps:remove']"-->
-<!--          >删除</el-button>-->
-<!--        </el-col>-->
-<!--        <el-col :span="1.5">-->
-<!--          <el-button-->
-<!--            type="warning"-->
-<!--            icon="el-icon-download"-->
-<!--            size="mini"-->
-<!--            @click="handleExport"-->
-<!--            v-hasPermi="['basicdata:corps:export']"-->
-<!--          >导出</el-button>-->
-<!--        </el-col>-->
-<!--        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+        <!--        <el-col :span="1.5">-->
+        <!--          <el-button-->
+        <!--            type="success"-->
+        <!--            icon="el-icon-edit"-->
+        <!--            size="mini"-->
+        <!--            :disabled="single"-->
+        <!--            @click="handleUpdate"-->
+        <!--            v-hasPermi="['basicdata:corps:edit']"-->
+        <!--          >修改</el-button>-->
+        <!--        </el-col>-->
+        <!--        <el-col :span="1.5">-->
+        <!--          <el-button-->
+        <!--            type="danger"-->
+        <!--            icon="el-icon-delete"-->
+        <!--            size="mini"-->
+        <!--            :disabled="multiple"-->
+        <!--            @click="handleDelete"-->
+        <!--            v-hasPermi="['basicdata:corps:remove']"-->
+        <!--          >删除</el-button>-->
+        <!--        </el-col>-->
+        <!--        <el-col :span="1.5">-->
+        <!--          <el-button-->
+        <!--            type="warning"-->
+        <!--            icon="el-icon-download"-->
+        <!--            size="mini"-->
+        <!--            @click="handleExport"-->
+        <!--            v-hasPermi="['basicdata:corps:export']"-->
+        <!--          >导出</el-button>-->
+        <!--        </el-col>-->
+        <!--        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
       </el-row>
     </el-form>
     <el-table
@@ -171,14 +172,16 @@
             icon="el-icon-edit"
             @click="addOrUpdateHandle(scope.row,2)"
             v-hasPermi="['fleet:companyMsg:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="deleteHandle(scope.row.id)"
             v-hasPermi="['fleet:companyMsg:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
 
       </el-table-column>
@@ -194,15 +197,20 @@
     >
     </el-pagination>
     <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :dataForm="editModel"
+    <add-or-update
+      v-if="addOrUpdateVisible"
+      ref="addOrUpdate"
+      @refreshDataList="getDataList"
+      :dataForm="editModel"
     ></add-or-update>
 
   </div>
 </template>
 
 <script>
-import {listFtmsorderbills,deleted} from "@/api/fleet/companyMsg"
+import { listFtmsorderbills, deleted } from '@/api/fleet/companyMsg'
 import AddOrUpdate from './companyMsg-add-or-update'
+
 export default {
   data() {
     return {
@@ -231,7 +239,7 @@ export default {
     // 获取数据列表
     getDataList() {
       this.dataListLoading = true
-      listFtmsorderbills(this.dataForm).then(data=>{
+      listFtmsorderbills(this.dataForm).then(data => {
         console.log(data)
         if (data && data.code === 200) {
           this.dataList = data.rows
@@ -251,11 +259,11 @@ export default {
       //
       // })
     },
-    resetQuery(){
+    resetQuery() {
       this.dataForm = {
-        companyName:'',
-        linkMan:'',
-        linkPhone:''
+        companyName: '',
+        linkMan: '',
+        linkPhone: ''
       }
     },
     // 每页数
@@ -274,7 +282,7 @@ export default {
       this.dataListSelections = val
     },
     // 新增 / 修改
-    addOrUpdateHandle(row,count) {
+    addOrUpdateHandle(row, count) {
       this.addOrUpdateVisible = true
       if (row) {
         this.editModel = row
@@ -329,7 +337,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        deleted(companyMsgIds).then(data=>{
+        deleted(companyMsgIds).then(data => {
           console.log(data)
           if (data && data.code === 200) {
             this.$message({

+ 746 - 0
src/views/track/singleCost/AddOrUpdate.vue

@@ -0,0 +1,746 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="showDialog"
+    width="80%"
+    @close="handleClose"
+    :close-on-click-modal="false"
+  >
+    <span>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="客户名称" prop="corpId">
+              <el-select
+                v-model="form.corpId"
+                placeholder="请输入客户名称"
+                :clearable="true"
+                filterable
+                size="mini"
+                style="width: 180px"
+                :disabled="true"
+              >
+                <el-option
+                  v-for="(dict, index) in fMblnoOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="业务类型" prop="billType">
+              <el-select
+                v-model="form.billType"
+                placeholder="请选择业务类型"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              >
+                <el-option
+                  v-for="(dict, index) in billTypeList"
+                  :key="index.dictSort"
+                  :label="dict.dictLabel"
+                  :value="dict.dictSort"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="运输方式" prop="transType">
+              <el-select
+                v-model="form.transType"
+                placeholder="请选择运输方式"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              >
+                <el-option
+                  v-for="(dict, index) in transTypeList"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="运输性质" prop="transProp">
+              <el-select
+                v-model="form.transProp"
+                placeholder="请选择运输方式"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              >
+                <el-option
+                  v-for="(dict, index) in transPropList"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="提箱地点" prop="loadAddr">
+              <el-input
+                v-model="form.loadAddr"
+                placeholder="请输入提箱地点"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="提箱时间" prop="loadDate">
+              <el-date-picker
+                clearable
+                size="mini"
+                style="width: 180px"
+                v-model="form.loadDate"
+                type="date"
+                :disabled="true"
+                value-format="yyyy-MM-dd"
+                placeholder="选择卸箱时间"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="装货地点" prop="mdLoadAddr">
+              <el-input
+                v-model="form.mdLoadAddr"
+                placeholder="请输入装货地点"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="装货时间" prop="mdLoadDate">
+              <el-date-picker
+                clearable
+                size="mini"
+                style="width: 180px"
+                v-model="form.mdLoadDate"
+                type="date"
+                :disabled="true"
+                value-format="yyyy-MM-dd"
+                placeholder="选择装货时间"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="卸箱地点" prop="unLoadAddr">
+              <el-input
+                v-model="form.unLoadAddr"
+                placeholder="请输入装卸箱地点"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="卸箱时间" prop="unLoadDate">
+              <el-date-picker
+                clearable
+                size="mini"
+                style="width: 180px"
+                v-model="form.unLoadDate"
+                type="date"
+                :disabled="true"
+                value-format="yyyy-MM-dd"
+                placeholder="选择卸箱时间"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="提单号" prop="mblno">
+              <el-input
+                v-model="form.mblno"
+                placeholder="请输入提单号"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="货品名称" prop="goodsId">
+              <el-select
+                v-model="form.goodsId"
+                placeholder="请输入货品名称"
+                :disabled="true"
+                clearable
+                filterable
+                size="mini"
+                style="width: 180px"
+              >
+                <el-option
+                  v-for="(dict, index) in goodsOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="计划件数" prop="qtyPlan">
+              <el-input
+                v-model="form.qtyPlan"
+                placeholder="请输入计划件数"
+                :disabled="true"
+                v-input-limit="2"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="计划重量" prop="weightPlan">
+              <el-input
+                v-model="form.weightPlan"
+                placeholder="请输入计划重量"
+                :disabled="true"
+                v-input-limit="2"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="船名" prop="ysl">
+              <el-input
+                v-model="form.ysl"
+                placeholder="请输入船名"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="航次" prop="voy">
+              <el-input
+                v-model="form.voy"
+                placeholder="请输入航次"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="起运港" prop="polId">
+              <el-input
+                v-model="form.polId"
+                placeholder="请输入起运港"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="目的港" prop="podId">
+              <el-input
+                v-model="form.podId"
+                placeholder="请输入目的港"
+                :disabled="true"
+                size="mini"
+                style="width: 180px"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+       <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="addRelevt"
+                    :disabled="disabled"
+                  >添加费用</el-button>
+                </div>
+              </div>
+            </div>
+      <el-table
+        :data="feesList"
+        style="width: 100%"
+      >
+        <el-table-column
+          prop="fCorpid"
+          label="结算单位"
+          align="center"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-select
+            v-model="scope.row.fCorpid"
+            placeholder="请输入客户名称"
+            :clearable="true"
+            filterable
+            size="mini"
+            style="width: 160px"
+            :disabled="scope.row.actId != '1080' ? true : false || 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
+          prop="fFeeid"
+          label="费用名称"
+          width="180"
+        >
+          <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.fFeeid"
+                  filterable
+                  :disabled="scope.row.actId != '1080' ? true : false || disabled"
+                  remote
+                  placeholder="费用名称"
+                >
+                  <el-option
+                    v-for="(dict, index) in fCNameOptions"
+                    :key="index.fId"
+                    :label="dict.fName"
+                    :value="dict.fId"
+                  ></el-option>
+                </el-select>
+              </template>
+      </el-table-column>
+        <el-table-column
+          prop="fDc"
+          label="收付"
+          width="180"
+        >
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.fDc" placeholder="请选择" :disabled="scope.row.actId != '1080' ? true : false || disabled">
+              <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="计费单位"
+          width="180"
+        >
+          <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.fFeeunitid"
+                placeholder="请选择计费单位"
+                :disabled="scope.row.actId != '1080' ? true : false || disabled"
+                clearable
+              >
+                <el-option
+                  v-for="dict in jFeetunitOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </template>
+      </el-table-column>
+        <el-table-column
+          prop="fBillingQty"
+          label="计费数量"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fBillingQty" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="fUnitprice"
+          label="单价"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fUnitprice" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="fCurrency"
+          label="币种"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fCurrency" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="fTaxrate"
+          label="税率"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fTaxrate" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="fAmount"
+          label="金额"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fAmount" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="fExrate"
+          label="汇率"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.fExrate" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+        <el-table-column
+          prop="remarks"
+          label="备注"
+          width="180"
+        >
+          <template slot-scope="scope">
+          <el-input v-model="scope.row.remarks" :disabled="scope.row.actId != '1080' ? true : false || disabled" placeholder="请输入内容"></el-input>
+          </template>
+      </el-table-column>
+       <el-table-column
+         label="操作"
+         align="center"
+         class-name="small-padding fixed-width"
+         fixed="right"
+         width="150px"
+       >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            :disabled="scope.row.actId != '1080' ? true : false || disabled"
+            @click.native.prevent="deleteRow(scope.$index)"
+          >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    </span>
+    <span slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">提交</el-button>
+      <el-button type="success" @click="submitAllowChanges">修改</el-button>
+      <el-button type="info" @click="submitSave">保 存</el-button>
+      <el-button type="warning" @click="submitRetreat">撤 回</el-button>
+      <el-button @click="showDialog = false">取 消</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { removeFtmsorderbillscars } from '@/api/fleet/ftmsorderbillscars'
+import { query,submit} from '@/api/track/singleCost'
+import { listGoods } from '@/api/basicdata/goods'
+import { listCorps } from '@/api/basicdata/corps'
+import { listFees } from '@/api/basicdata/fees'
+import UploadFile from '@/components/Uploadfile'
+import Cookies from 'js-cookie'
+
+export default {
+  name: 'plans',
+  props: {
+    addOrUpdateVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      required: ''
+    },
+    fname: Object
+  },
+  components: {
+    UploadFile
+  },
+  data() {
+    return {
+      jFeetunitOptions:[],
+      form: {},
+      feesList:[],
+      // 控制弹出框显示隐藏
+      showDialog: false,
+      disabled: true,
+      // 表单校验
+      rules: {
+        corpId: [
+          { 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[3584]\d{9}))$/,
+            message: '请正确输入手机号',
+            trigger: 'blur'
+          }
+        ],
+        mdLoadAttnTel: [
+          {
+            pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
+            message: '请正确输入手机号',
+            trigger: 'blur'
+          }
+        ],
+        unLoadAttnTel: [
+          {
+            pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
+            message: '请正确输入手机号',
+            trigger: 'blur'
+          }
+        ]
+      },
+      billTypeList: [],
+      transTypeList: [],
+      transPropList: [],
+      goodsLossTypeList: [],
+      relevantAttachments: [],
+      cntrIdList: [],
+      priceTypeList: [],
+      userType: null,
+      username: null,
+      collapses: [],
+      fMblnoOptions: [],
+      cntrId2List: [],
+      goodsOptions: [],
+      fWbuOptions: []
+    }
+  },
+  created() {
+    this.getDicts("data_unitfees").then((response) => {
+      console.log(response.data)
+      if (response.data){
+        this.jFeetunitOptions = response.data;
+      }
+    });
+    listFees().then((response) => {
+      this.fCNameOptions = response.rows;
+    });
+    this.getDicts('data_billType').then((response) => {
+      console.log(response.data)
+      this.billTypeList = response.data
+    })
+    this.getDicts('data_transType').then((response) => {
+      this.transTypeList = response.data
+    })
+    this.getDicts('data_transProp').then((response) => {
+      this.transPropList = response.data
+    })
+    this.getDicts('data_goodsLossType').then((response) => {
+      this.goodsLossTypeList = response.data
+    })
+    this.getDicts('data_cntrId').then((response) => {
+      if (response.data) {
+        response.data.map((e) => (e.noOption = false))
+        this.cntrIdList = response.data
+      }
+    })
+    this.getDicts('data_priceType').then((response) => {
+      this.priceTypeList = response.data
+    })
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows
+    })
+    listGoods().then((response) => {
+      this.goodsOptions = response.rows
+    })
+    listFees().then((response) => {
+      this.fWbuOptions = response.rows
+    })
+    this.userType = Cookies.get('userType')
+    this.username = Cookies.get('userName')
+  },
+  methods: {
+    deleteRow(index) {
+      this.feesList.splice(index, 1);
+    },
+    init() {
+      console.log(this.fname.id)
+      this.showDialog = true
+      query(this.fname.id).then(data => {
+        console.log(data)
+        this.form = data.data.ftmsorderbills
+        this.feesList = data.data.ftmsorderbillsfees
+        for (let item in this.feesList){
+          this.feesList[item].fFeeunitid = this.feesList[item].fFeeunitid + ""
+        }
+      })
+    },
+    //选中时赋值pid
+    checkPid(row) {
+      let arr = this.schedulingList
+      let arr2 = arr.filter((e) => e.cntrId == row.cntrId)
+      row['pid'] = arr2[0].id
+    },
+    noMorecntrId(e) {
+      this.cntrIdList.forEach((item) => (item.noOption = false))
+      let arrIds = e.map((item) => item.cntrId)
+      this.cntrIdList
+        .filter((item) => arrIds.indexOf(item.dictValue) > -1)
+        .forEach((item) => (item.noOption = true))
+    },
+    showSure(val) {
+      let pidList = val.filter((e) => e.pid != null)
+      let arr1 = pidList
+      let arr1Ids = arr1.map((item) => item.cntrId)
+      arr1Ids = [...new Set(arr1Ids)]
+      let arr2 = this.cntrIdList
+      this.cntrId2List = arr2.filter(
+        (item) => arr1Ids.indexOf(item.dictValue) > -1
+      )
+    },
+    // 新增附件上传
+    addRelevt() {
+      this.feesList.push({
+        actId:'1080',
+        fPid:this.feesList[0].fPid,
+        fCorpid:'',
+        fFeeid:'',
+        fDc:'',
+        fFeeunitid:"1",
+        fBillingQty:'',
+        fUnitprice:'',
+        fCurrency:'',
+        fTaxrate:'',
+        fAmount:'',
+        fExrate:'',
+        remarks:''
+      })
+      console.log(this.feesList)
+    },
+    deleteplansRow(index, rows, row) {
+      let arr = this.schedulingList
+      let arr2 = arr.filter((e) => e.cntrId == row.cntrId && e.cntrId != null)
+      if (arr2.length != 0) {
+        this.msgSuccess('调度安排已插入此箱型数据,不能删除')
+      } else {
+        this.cntrIdList
+          .filter((item) => item.dictValue == row.cntrId)
+          .forEach((item) => (item.noOption = false))
+        rows.splice(index, 1)
+      }
+    },
+    // 上传成功返回数据
+    showFile(row) {
+      for (let list in this.relevantAttachments) {
+        this.$set(this.relevantAttachments[list], 'attachUrl', row.url)
+        this.$set(this.relevantAttachments[list], 'attachName', row.fileName)
+      }
+    },
+    // 弹出框关闭后触发
+    handleClose() {
+      // 子组件调用父组件方法,并传递参数
+      this.$emit('changeShow', 'false')
+      this.cntrIdList.forEach((item) => (item.noOption = false))
+      this.collapses = []
+    },
+    /** 提交按钮 */
+    submitForm() {
+      console.log(this.feesList)
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+        }
+      })
+    },
+    //修改
+    submitFix() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+        }
+      })
+    },
+    //保存
+    submitSave() {
+      let formDatae = new window.FormData()
+      formDatae.append('ftmsorderbillsfees', JSON.stringify(this.feesList))
+      submit(formDatae).then(data=>{
+        this.feesList = data.data.ftmsorderbillsfeesList
+        for (let item in this.feesList){
+          this.feesList[item].fFeeunitid = this.feesList[item].fFeeunitid + ""
+          console.log(this.feesList[item])
+        }
+        this.$message.success('保存成功');
+      })
+    },
+    //撤回
+    submitRetreat() {
+    },
+    //修改
+    submitAllowChanges() {
+      this.disabled = !this.disabled
+    },
+
+    //单条订单调度提交
+    addscarsRow(row) {
+    },
+    delscarsRow(index, rows, row) {
+      if (row.billStatus != 6 && row.id != null) {
+        removeFtmsorderbillscars(row).then((response) => {
+          if (response.code == 200) {
+            rows.splice(index, 1)
+            this.msgSuccess('成功删除')
+          }
+        })
+      } else {
+        rows.splice(index, 1)
+      }
+    },
+    revokescarsRow(index, rows, row) {
+    },
+    changescarsRow(row) {
+    }
+  },
+  watch: {
+    // 监听 addOrUpdateVisible 改变
+    addOrUpdateVisible(oldVal, newVal) {
+      this.showDialog = this.addOrUpdateVisible
+    }
+  }
+}
+</script>

+ 742 - 0
src/views/track/singleCost/index.vue

@@ -0,0 +1,742 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label-width="100px" label="客户名称" prop="corpId">
+        <el-select
+          v-model="queryParams.corpId"
+          placeholder="请输入客户名称"
+          clearable
+          size="small"
+          filterable
+        >
+          <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label-width="100px" label="业务类型" prop="billType">
+        <el-select
+          v-model="queryParams.billType"
+          placeholder="请选择业务类型"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="(dict, index) in billTypeList"
+            :key="index.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label-width="100px" label="运输方式" prop="transType">
+        <el-select
+          v-model="queryParams.transType"
+          placeholder="请选择运输方式"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="(dict, index) in transTypeList"
+            :key="index.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label-width="100px" label="运输性质" prop="transProp">
+        <el-select
+          v-model="queryParams.transProp"
+          placeholder="请选择运输性质"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="(dict, index) in transPropList"
+            :key="index.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label-width="100px" label="提单号" prop="mblno">
+        <el-input
+          v-model="queryParams.mblno"
+          placeholder="请输入提单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label-width="100px" label="货品名称" prop="goodsId">
+        <el-select
+          v-model="queryParams.goodsId"
+          placeholder="请输入货品名称"
+          clearable
+          size="small"
+          filterable
+        >
+          <el-option
+            v-for="(dict, index) in goodsOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label-width="100px" label="装车地点" prop="loadAddr">
+        <el-input
+          v-model="queryParams.loadAddr"
+          placeholder="请输入装车地点"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label-width="100px" label="装卸货地点" prop="mdLoadAddr">
+        <el-input
+          v-model="queryParams.mdLoadAddr"
+          placeholder="请输入装卸货地点"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label-width="100px" label="卸车地点" prop="unLoadAddr">
+        <el-input
+          v-model="queryParams.unLoadAddr"
+          placeholder="请输入卸车地点"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="cyan"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          style="margin-left: 30px"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['fleet:plans:add']"
+          >新增</el-button
+        >
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['fleet:plans:edit']"
+          >修改</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['fleet:plans:remove']"
+          >删除</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['fleet:plans:export']"
+          >导出</el-button
+        >
+      </el-col>
+      <div class="tabSetting">
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
+    </el-row>
+    <el-dialog title="提示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px;" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                    >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-table
+      v-loading="loading"
+      :data="ftmsorderbillsList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+      >
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        fixed="right"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            >查看</el-button
+          >
+          <!-- <el-button
+            v-if="scope.row.billStatus != 6"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['fleet:plans:edit']"
+            >修改</el-button
+          > -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['fleet:plans:remove']"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 新增编辑弹框子组件 -->
+    <add-or-update
+      v-if="addOrUpdateVisible"
+      :title="title"
+      :fname="form"
+      ref="addOrUpdateRef"
+    ></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from "./AddOrUpdate";
+import {
+  getFtmsorderbills,
+  delFtmsorderbills,
+  exportFtmsorderbills,
+} from "@/api/fleet/ftmsorderbills";
+import { listFtmsorderbillsplans } from "@/api/track/singleCost";
+import { listGoods } from "@/api/basicdata/goods";
+import { listCorps } from "@/api/basicdata/corps";
+import { addSet, select } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
+
+export default {
+  name: "plans",
+  data() {
+    return {
+      // 控制新增编辑弹窗的显示与隐藏
+      addOrUpdateVisible: false,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 订单主表格数据
+      ftmsorderbillsList: [],
+      // 总条数
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        corpId: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        goodsId: null,
+        mblno: null,
+        loadAddr: null,
+        mdLoadAddr: null,
+        unLoadAddr: null,
+      },
+      showSetting: false,
+      drag: false,
+      setRowList: [
+        {
+          surface: "1",
+          label: "mblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "carregNo",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "orderStatus",
+          name: "订单状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "acceptDate",
+          name: "接单时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "loadDate",
+          name: "提箱时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "mdLoadDate",
+          name: "装卸货时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "unLoadDate",
+          name: "还卸柜时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "waybillDate",
+          name: "回单时间",
+          checked: 0,
+          width: null,
+        },
+      ],
+      getRowList: [
+        {
+          surface: "1",
+          label: "mblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "carregNo",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "orderStatus",
+          name: "订单状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "acceptDate",
+          name: "接单时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "loadDate",
+          name: "提箱时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "mdLoadDate",
+          name: "装卸货时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "unLoadDate",
+          name: "还卸柜时间",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "waybillDate",
+          name: "回单时间",
+          checked: 0,
+          width: null,
+        },
+      ],
+      allCheck: false,
+      title: "",
+      form: {},
+      goodsOptions:[],
+      fMblnoOptions:[],
+      transPropList:[],
+      transTypeList:[],
+      billTypeList:[]
+    };
+  },
+  // 使用子组件
+  components: {
+    AddOrUpdate,
+    draggable,
+  },
+  created() {
+    this.getList();
+    this.getDicts("data_billType").then((response) => {
+      this.billTypeList = response.data;
+    });
+    this.getDicts("data_transType").then((response) => {
+      this.transTypeList = response.data;
+    });
+    this.getDicts("data_transProp").then((response) => {
+      this.transPropList = response.data;
+    });
+    listGoods().then((response) => {
+      this.goodsOptions = response.rows;
+    });
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    this.getRow();
+  },
+  methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "单趟费用",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        console.log(res)
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "单趟费用",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    /** 查询订单主列表 */
+    getList() {
+      this.loading = true;
+      listFtmsorderbillsplans(this.queryParams).then((response) => {
+        this.ftmsorderbillsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.addOrUpdateVisible = !this.addOrUpdateVisible;
+      this.title = "添加订单主";
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        billNo: null,
+        actId: null,
+        corpId: null,
+        transUserName: null,
+        planUserName: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        ifContracted: null,
+        contractNo: null,
+        refNo: null,
+        accstlType: null,
+        accdays: null,
+        goodsId: null,
+        goodsPrice: null,
+        goodsLossType: null,
+        goodsLossStd: null,
+        mblno: null,
+        ysl: null,
+        voy: null,
+        pol: null,
+        pod: null,
+        qtyPlan: null,
+        qtyDisPatch: null,
+        weightPlan: null,
+        cntrDesc: null,
+        carNoList: null,
+        loadAddr: null,
+        loadAttn: null,
+        loadAttntel: null,
+        loadDate: null,
+        mdLoadAddr: null,
+        mdLoadAttn: null,
+        mdLoadAttnTel: null,
+        mdLoadDate: null,
+        unLoadAddr: null,
+        unLoadAttn: null,
+        unLoadAttnTel: null,
+        unLoadDate: null,
+        routeId: null,
+        routeDesc: null,
+        ifWaybill: null,
+        ifNeedinvDr: null,
+        postDate: null,
+        billStatus: 0,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remarks: null,
+      };
+      this.resetForm("form");
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      let id = row.id
+      this.reset();
+      this.title = "查看订单主";
+      this.addOrUpdateVisible = true;
+      this.form.id = id
+      this.$nextTick(() => {
+        this.$refs.addOrUpdateRef.init()
+      })
+    },
+    // //获取到保存并复制
+    // getSave(data) {
+    //   data.data.map((e) => {
+    //     if (e.cntrId != null) {
+    //       return (e.cntrId = e.cntrId.toString());
+    //     }
+    //   });
+    //   this.vehicleList = data.data;
+    // },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return delFtmsorderbills(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有订单主数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportFtmsorderbills(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 监听 子组件弹窗关闭后触发,有子组件调用
+    showAddOrUpdate(data) {
+      if (data === "false") {
+        this.addOrUpdateVisible = false;
+        this.disabled = false;
+      } else {
+        this.addOrUpdateVisible = true;
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>