index.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. v-show="showSearch"
  7. label-width="100px"
  8. size="mini"
  9. >
  10. <el-row>
  11. <el-col :span="6">
  12. <el-form-item label-width="100px" label="提单号" prop="mblno">
  13. <el-input
  14. v-model="queryParams.mblno"
  15. placeholder="请输入提单号"
  16. clearable
  17. size="small"
  18. @keyup.enter.native="handleQuery()"
  19. style="width: 100%"
  20. />
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="6">
  24. <el-form-item label="客户名称" prop="corpId">
  25. <el-select
  26. v-model="queryParams.corpId"
  27. placeholder="请输入客户名称"
  28. clearable
  29. size="small"
  30. filterable
  31. style="width: 100%"
  32. >
  33. <el-option
  34. v-for="(dict, index) in fMblnoOptions"
  35. :key="index.fId"
  36. :label="dict.fName"
  37. :value="dict.fId"
  38. />
  39. </el-select> </el-form-item
  40. ></el-col>
  41. <el-col :span="6">
  42. <el-form-item label-width="100px" label="业务类型" prop="billType">
  43. <el-select
  44. v-model="queryParams.billType"
  45. placeholder="请选择业务类型"
  46. clearable
  47. size="small"
  48. style="width: 100%"
  49. >
  50. <el-option
  51. v-for="(dict, index) in billTypeList"
  52. :key="index.dictValue"
  53. :label="dict.dictLabel"
  54. :value="dict.dictValue"
  55. />
  56. </el-select>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="6">
  60. <el-form-item label-width="100px" label="运输方式" prop="transType">
  61. <el-select
  62. v-model="queryParams.transType"
  63. placeholder="请选择运输方式"
  64. clearable
  65. size="small"
  66. style="width: 100%"
  67. >
  68. <el-option
  69. v-for="(dict, index) in transTypeList"
  70. :key="index.dictValue"
  71. :label="dict.dictLabel"
  72. :value="dict.dictValue"
  73. />
  74. </el-select>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-collapse-transition>
  79. <div v-show="show">
  80. <el-row>
  81. <el-col :span="6">
  82. <el-form-item
  83. label-width="100px"
  84. label="运输性质"
  85. prop="transProp"
  86. >
  87. <el-select
  88. v-model="queryParams.transProp"
  89. placeholder="请选择运输性质"
  90. clearable
  91. size="small"
  92. style="width: 100%"
  93. >
  94. <el-option
  95. v-for="(dict, index) in transPropList"
  96. :key="index.dictValue"
  97. :label="dict.dictLabel"
  98. :value="dict.dictValue"
  99. />
  100. </el-select>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="6">
  104. <el-form-item label-width="100px" label="货品名称" prop="goodsId">
  105. <el-select
  106. v-model="queryParams.goodsId"
  107. placeholder="请输入货品名称"
  108. clearable
  109. size="small"
  110. filterable
  111. style="width: 100%"
  112. >
  113. <el-option
  114. v-for="(dict, index) in goodsOptions"
  115. :key="index.fId"
  116. :label="dict.fName"
  117. :value="dict.fId"
  118. />
  119. </el-select>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="6">
  123. <el-form-item label="单据类型" prop="billKind">
  124. <el-select
  125. style="width: 100%"
  126. v-model="queryParams.billKind"
  127. placeholder="请选择单据类型"
  128. >
  129. <el-option label="直单" value="NN"></el-option>
  130. <el-option label="主单" value="MM"></el-option>
  131. <el-option label="从单" value="MH"></el-option>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="6"
  136. ><el-form-item label-width="100px" label="车号" prop="carregNo">
  137. <el-input
  138. v-model="queryParams.carregNo"
  139. placeholder="请输入车号"
  140. clearable
  141. size="small"
  142. @keyup.enter.native="handleQuery()"
  143. style="width: 100%"
  144. /> </el-form-item
  145. ></el-col>
  146. <el-col :span="6"
  147. ><el-form-item
  148. label-width="100px"
  149. label="主运单号"
  150. prop="mBillNo"
  151. >
  152. <el-input
  153. v-model="queryParams.mBillNo"
  154. placeholder="请输入主运单号"
  155. clearable
  156. size="small"
  157. @keyup.enter.native="handleQuery()"
  158. style="width: 100%"
  159. /> </el-form-item
  160. ></el-col>
  161. <el-col :span="6"
  162. ><el-form-item label-width="100px" label="运单号" prop="orderNo">
  163. <el-input
  164. v-model="queryParams.orderNo"
  165. placeholder="请输入运单号 "
  166. clearable
  167. size="small"
  168. @keyup.enter.native="handleQuery()"
  169. style="width: 100%"
  170. /> </el-form-item
  171. ></el-col>
  172. <el-col :span="6">
  173. <el-form-item
  174. label-width="100px"
  175. label="提箱地点"
  176. prop="loadAddr"
  177. >
  178. <el-input
  179. v-model="queryParams.loadAddr"
  180. placeholder="请输入提箱地点"
  181. clearable
  182. size="small"
  183. @keyup.enter.native="handleQuery()"
  184. style="width: 100%"
  185. />
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="6">
  189. <el-form-item
  190. label-width="100px"
  191. label="装卸货地点"
  192. prop="mdLoadAddr"
  193. >
  194. <el-input
  195. v-model="queryParams.mdLoadAddr"
  196. placeholder="请输入装卸货地点"
  197. clearable
  198. size="small"
  199. @keyup.enter.native="handleQuery()"
  200. style="width: 100%"
  201. /> </el-form-item
  202. ></el-col>
  203. <el-col :span="6"
  204. ><el-form-item
  205. label-width="100px"
  206. label="卸箱地点"
  207. prop="unLoadAddr"
  208. >
  209. <el-input
  210. v-model="queryParams.unLoadAddr"
  211. placeholder="请输入卸箱地点"
  212. clearable
  213. size="small"
  214. @keyup.enter.native="handleQuery()"
  215. style="width: 100%"
  216. /> </el-form-item
  217. ></el-col>
  218. <el-col :span="6">
  219. <el-form-item
  220. label-width="100px"
  221. label="提箱时间"
  222. prop="cLoadDate"
  223. >
  224. <el-date-picker
  225. v-model="queryParams.cLoadDate"
  226. type="daterange"
  227. align="right"
  228. unlink-panels
  229. range-separator="至"
  230. start-placeholder="开始日期"
  231. end-placeholder="结束日期"
  232. :picker-options="pickerOptions"
  233. value-format="yyyy-MM-dd HH:mm-ss"
  234. :default-time="['00:00:00', '23:59:59']"
  235. style="width: 100%"
  236. >
  237. </el-date-picker>
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="6">
  241. <el-form-item
  242. label-width="100px"
  243. label="接单日期"
  244. prop="acceptDateList"
  245. >
  246. <el-date-picker
  247. v-model="queryParams.acceptDateList"
  248. type="daterange"
  249. align="right"
  250. unlink-panels
  251. range-separator="至"
  252. start-placeholder="开始日期"
  253. end-placeholder="结束日期"
  254. :picker-options="pickerOptions"
  255. value-format="yyyy-MM-dd HH:mm-ss"
  256. :default-time="['00:00:00', '23:59:59']"
  257. style="width: 100%"
  258. >
  259. </el-date-picker>
  260. </el-form-item>
  261. </el-col>
  262. </el-row>
  263. </div>
  264. </el-collapse-transition>
  265. </el-form>
  266. <el-row :gutter="10" class="mb8">
  267. <el-col :span="1.5">
  268. <!-- <el-button size="mini" @click="handleQuery(null)">全 部</el-button>-->
  269. <el-badge
  270. :value="buttonValue.quantity"
  271. type="warning"
  272. style="margin-right: 10px"
  273. >
  274. <el-button size="mini" @click="handleQuery()">全 部</el-button>
  275. </el-badge>
  276. </el-col>
  277. <el-col :span="1.5">
  278. <el-badge
  279. :value="buttonValue.planDate"
  280. type="warning"
  281. style="margin-right: 10px"
  282. >
  283. <el-button size="mini" @click="handleQuery('planDate')"
  284. >未接单</el-button
  285. >
  286. </el-badge></el-col
  287. >
  288. <el-col :span="1.5">
  289. <el-badge
  290. :value="buttonValue.acceptDate"
  291. type="warning"
  292. style="margin-right: 10px"
  293. >
  294. <el-button size="mini" @click="handleQuery('acceptDate')"
  295. >未提箱</el-button
  296. >
  297. </el-badge></el-col
  298. >
  299. <el-col :span="1.5"
  300. ><el-badge
  301. :value="buttonValue.loadDate"
  302. type="warning"
  303. style="margin-right: 10px"
  304. ><el-button size="mini" @click="handleQuery('loadDate')"
  305. >未装卸货</el-button
  306. ></el-badge
  307. ></el-col
  308. >
  309. <el-col :span="1.5"
  310. ><el-badge
  311. :value="buttonValue.mdLoadDate"
  312. type="warning"
  313. style="margin-right: 10px"
  314. >
  315. <el-button size="mini" @click="handleQuery('mdLoadDate')"
  316. >未还卸柜</el-button
  317. ></el-badge
  318. >
  319. </el-col>
  320. <el-col :span="1.5"
  321. ><el-badge
  322. :value="buttonValue.unLoadDate"
  323. type="warning"
  324. style="margin-right: 10px"
  325. ><el-button size="mini" @click="handleQuery('unLoadDate')"
  326. >未回单</el-button
  327. ></el-badge
  328. ></el-col
  329. >
  330. <el-col :span="1.5"
  331. ><el-badge type="warning" style="margin-right: 10px"
  332. ><el-button size="mini" @click="handleQuery('receiptDate')"
  333. >已完成</el-button
  334. ></el-badge
  335. ></el-col
  336. >
  337. <div class="tabSetting">
  338. <div style="margin-right: 20px">
  339. <el-button
  340. type="cyan"
  341. icon="el-icon-search"
  342. size="mini"
  343. @click="handleQuery()"
  344. >搜索</el-button
  345. >
  346. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  347. >重置</el-button
  348. >
  349. <el-button
  350. v-show="show"
  351. @click="show = !show"
  352. icon="el-icon-arrow-up"
  353. size="mini"
  354. >展开</el-button
  355. >
  356. <el-button
  357. v-show="!show"
  358. @click="show = !show"
  359. icon="el-icon-arrow-down"
  360. size="mini"
  361. >展开</el-button
  362. >
  363. </div>
  364. <right-toolbar
  365. :showSearch.sync="showSearch"
  366. @queryTable="getList"
  367. ></right-toolbar>
  368. <div style="margin: 0 12px">
  369. <el-button
  370. icon="el-icon-setting"
  371. size="mini"
  372. circle
  373. @click="showSetting = !showSetting"
  374. ></el-button>
  375. </div>
  376. </div>
  377. </el-row>
  378. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  379. <div>配置排序列数据(拖动调整顺序)</div>
  380. <div style="margin-left: 17px">
  381. <el-checkbox
  382. v-model="allCheck"
  383. label="全选"
  384. @change="allChecked"
  385. ></el-checkbox>
  386. </div>
  387. <div style="padding: 4px; display: flex; justify-content: center">
  388. <draggable
  389. v-model="setRowList"
  390. group="site"
  391. animation="300"
  392. @start="onStart"
  393. @end="onEnd"
  394. handle=".indraggable"
  395. >
  396. <transition-group>
  397. <div
  398. v-for="item in setRowList"
  399. :key="item.surface"
  400. class="listStyle"
  401. >
  402. <div style="width: 500px" class="indraggable">
  403. <div class="progress" :style="{ width: item.width + 'px' }">
  404. <el-checkbox
  405. :label="item.name"
  406. v-model="item.checked"
  407. :true-label="0"
  408. :false-label="1"
  409. >{{ item.name }}
  410. </el-checkbox>
  411. </div>
  412. </div>
  413. <el-input-number
  414. v-model.number="item.width"
  415. controls-position="right"
  416. :min="1"
  417. :max="500"
  418. size="mini"
  419. ></el-input-number>
  420. </div>
  421. </transition-group>
  422. </draggable>
  423. </div>
  424. <span slot="footer" class="dialog-footer">
  425. <el-button @click="showSetting = false">取 消</el-button>
  426. <el-button @click="delRow" type="danger">重 置</el-button>
  427. <el-button type="primary" @click="save()">确 定</el-button>
  428. </span>
  429. </el-dialog>
  430. <el-table
  431. v-loading="loading"
  432. :data="ftmsorderbillscarsList"
  433. @selection-change="handleSelectionChange"
  434. >
  435. <el-table-column type="selection" width="55" align="center" />
  436. <el-table-column
  437. label="提单号"
  438. width="180"
  439. align="center"
  440. :show-overflow-tooltip="true"
  441. sortable
  442. fixed="left"
  443. >
  444. <template slot-scope="scope">
  445. <el-link :underline="false" type="primary"
  446. ><div @click="handleUpdate(scope.row)">
  447. {{ scope.row.mblno }}
  448. </div></el-link
  449. >
  450. </template>
  451. </el-table-column>
  452. <el-table-column
  453. v-for="(item, index) in getRowList"
  454. :key="index"
  455. :label="item.name"
  456. :width="item.width"
  457. :prop="item.label"
  458. align="center"
  459. :show-overflow-tooltip="true"
  460. sortable
  461. :fixed="item.fixed"
  462. />
  463. <el-table-column
  464. label="操作"
  465. align="center"
  466. class-name="small-padding fixed-width"
  467. fixed="right"
  468. width="150px"
  469. >
  470. <template slot-scope="scope">
  471. <el-button
  472. size="mini"
  473. type="text"
  474. icon="el-icon-edit"
  475. @click="handleUpdate(scope.row)"
  476. >查看</el-button
  477. >
  478. </template>
  479. </el-table-column>
  480. </el-table>
  481. <pagination
  482. v-show="total > 0"
  483. :total="total"
  484. :page.sync="queryParams.pageNum"
  485. :limit.sync="queryParams.pageSize"
  486. @pagination="getList"
  487. />
  488. <!-- 新增编辑弹框子组件 -->
  489. <add-or-update
  490. :addOrUpdateVisible="addOrUpdateVisible"
  491. :title="title"
  492. :form="form"
  493. :DList="DList"
  494. :CList="CList"
  495. :relevantAttachments="relevantAttachments"
  496. :disabled="disabled"
  497. :feesList="feesList"
  498. :allfMblnoOptions="allfMblnoOptions"
  499. :carsTable="carsTable"
  500. @changeShow="showAddOrUpdate"
  501. @fixDisabled="fixDisabled"
  502. ref="addOrUpdateRef"
  503. ></add-or-update>
  504. </div>
  505. </template>
  506. <script>
  507. import AddOrUpdate from "./AddOrUpdate.vue";
  508. import {
  509. delFtmsorderbills,
  510. exportFtmsorderbills,
  511. } from "@/api/fleet/ftmsorderbills";
  512. import {
  513. listFtmsorderbillscars,
  514. exportFtmsorderbillscars,
  515. selectDriverFtmsorderbillscars,
  516. } from "@/api/fleet/ftmsorderbillscars";
  517. import { listGoods } from "@/api/basicdata/goods";
  518. import { listCorps, selectCorpList } from "@/api/basicdata/corps";
  519. import { addSet, select, resetModule } from "@/api/system/set";
  520. import Cookies from "js-cookie";
  521. import draggable from "vuedraggable";
  522. export default {
  523. name: "plans",
  524. data() {
  525. return {
  526. //时间区间
  527. pickerOptions: {
  528. shortcuts: [
  529. {
  530. text: "最近一周",
  531. onClick(picker) {
  532. const end = new Date();
  533. const start = new Date();
  534. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  535. picker.$emit("pick", [start, end]);
  536. },
  537. },
  538. {
  539. text: "最近一个月",
  540. onClick(picker) {
  541. const end = new Date();
  542. const start = new Date();
  543. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  544. picker.$emit("pick", [start, end]);
  545. },
  546. },
  547. {
  548. text: "最近三个月",
  549. onClick(picker) {
  550. const end = new Date();
  551. const start = new Date();
  552. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  553. picker.$emit("pick", [start, end]);
  554. },
  555. },
  556. ],
  557. },
  558. feesList: [],
  559. // 控制新增编辑弹窗的显示与隐藏
  560. addOrUpdateVisible: false,
  561. // 非单个禁用
  562. single: true,
  563. // 非多个禁用
  564. multiple: true,
  565. // 显示搜索条件
  566. showSearch: true,
  567. // 订单主表格数据
  568. ftmsorderbillscarsList: [],
  569. relevantAttachments: [],
  570. // 总条数
  571. total: 0,
  572. // 查询参数
  573. queryParams: {
  574. pageNum: 1,
  575. pageSize: 10,
  576. corpId: null,
  577. carStatus: null,
  578. billType: null,
  579. transType: null,
  580. transProp: null,
  581. goodsId: null,
  582. mblno: null,
  583. loadAddr: null,
  584. mdLoadAddr: null,
  585. unLoadAddr: null,
  586. cLoadDate: null,
  587. billKind:null,
  588. carregNo:null,
  589. mBillNo:null,
  590. orderNo:null,
  591. acceptDateList:null,
  592. },
  593. showSetting: false,
  594. drag: false,
  595. setRowList: [],
  596. getRowList: [],
  597. tableDate: [
  598. {
  599. surface: "1",
  600. label: "billKind",
  601. name: "单据类型",
  602. checked: 0,
  603. width: 100,
  604. },
  605. {
  606. surface: "2",
  607. label: "mdLoadDate",
  608. name: "装卸日期",
  609. checked: 0,
  610. width: 100,
  611. },
  612. {
  613. surface: "3",
  614. label: "billType",
  615. name: "贸易方式",
  616. checked: 0,
  617. width: 100,
  618. },
  619. {
  620. surface: "4",
  621. label: "transType",
  622. name: "运输方式",
  623. checked: 0,
  624. width: 100,
  625. },
  626. {
  627. surface: "5",
  628. label: "corpId",
  629. name: "托运人",
  630. checked: 0,
  631. width: 100,
  632. },
  633. {
  634. surface: "6",
  635. label: "ysl",
  636. name: "船名",
  637. checked: 0,
  638. width: 100,
  639. },
  640. {
  641. surface: "7",
  642. label: "voy",
  643. name: "航次",
  644. checked: 0,
  645. width: 100,
  646. },
  647. {
  648. surface: "8",
  649. label: "cntrQty",
  650. name: "柜量",
  651. checked: 0,
  652. width: 100,
  653. },
  654. {
  655. surface: "9",
  656. label: "cntrId",
  657. name: "柜型",
  658. checked: 0,
  659. width: 100,
  660. },
  661. {
  662. surface: "10",
  663. label: "goodsId",
  664. name: "品名",
  665. checked: 0,
  666. width: 100,
  667. },
  668. {
  669. surface: "11",
  670. label: "cntrWeight",
  671. name: "重量",
  672. checked: 0,
  673. width: 100,
  674. },
  675. {
  676. surface: "12",
  677. label: "polId",
  678. name: "起运港",
  679. checked: 0,
  680. width: 100,
  681. },
  682. {
  683. surface: "13",
  684. label: "podId",
  685. name: "目的港",
  686. checked: 0,
  687. width: 100,
  688. },
  689. {
  690. surface: "14",
  691. label: "loadAddr",
  692. name: "提箱场站",
  693. checked: 0,
  694. width: 100,
  695. },
  696. {
  697. surface: "15",
  698. label: "mdLoadAddr",
  699. name: "装货地",
  700. checked: 0,
  701. width: 100,
  702. },
  703. {
  704. surface: "16",
  705. label: "unLoadAddr",
  706. name: "卸货地",
  707. checked: 0,
  708. width: 100,
  709. },
  710. {
  711. surface: "17",
  712. label: "carregNo",
  713. name: "车号",
  714. checked: 0,
  715. width: 100,
  716. },
  717. {
  718. surface: "18",
  719. label: "driverName",
  720. name: "司机",
  721. checked: 0,
  722. width: 100,
  723. },
  724. {
  725. surface: "19",
  726. label: "orderNo",
  727. name: "运单号",
  728. checked: 0,
  729. width: 100,
  730. },
  731. {
  732. surface: "20",
  733. label: "driverTel",
  734. name: "司机电话",
  735. checked: 0,
  736. width: 100,
  737. },
  738. {
  739. surface: "21",
  740. label: "orderName",
  741. name: "状态",
  742. checked: 0,
  743. width: 100,
  744. },
  745. {
  746. surface: "22",
  747. label: "acceptDate",
  748. name: "接单日期",
  749. checked: 0,
  750. width: 100,
  751. },
  752. {
  753. surface: "23",
  754. label: "loadDate",
  755. name: "提箱日期",
  756. checked: 0,
  757. width: 100,
  758. },
  759. {
  760. surface: "24",
  761. label: "unLoadDate",
  762. name: "还柜日期",
  763. checked: 0,
  764. width: 100,
  765. },
  766. {
  767. surface: "25",
  768. label: "oilAmt",
  769. name: "油气费",
  770. checked: 0,
  771. width: 100,
  772. },
  773. {
  774. surface: "26",
  775. label: "driverbonus",
  776. name: "单趟提成",
  777. checked: 0,
  778. width: 100,
  779. },
  780. {
  781. surface: "27",
  782. label: "costOth",
  783. name: "其他费用",
  784. checked: 0,
  785. width: 100,
  786. },
  787. {
  788. surface: "28",
  789. label: "costRemarks",
  790. name: "备注",
  791. checked: 0,
  792. width: 100,
  793. },
  794. {
  795. surface: "29",
  796. label: "costomAmt05",
  797. name: "港杂费",
  798. checked: 0,
  799. width: 100,
  800. },
  801. {
  802. surface: "30",
  803. label: "costomAmt06",
  804. name: "提箱费",
  805. checked: 0,
  806. width: 100,
  807. },
  808. {
  809. surface: "31",
  810. label: "costomAmt03",
  811. name: "修洗费",
  812. checked: 0,
  813. width: 100,
  814. },
  815. {
  816. surface: "32",
  817. label: "costomAmt04",
  818. name: "吊装费",
  819. checked: 0,
  820. width: 100,
  821. },
  822. {
  823. surface: "33",
  824. label: "costomAmt01",
  825. name: "出口其他费用",
  826. checked: 0,
  827. width: 100,
  828. },
  829. {
  830. surface: "34",
  831. label: "costomStr01",
  832. name: "出口费用备注",
  833. checked: 0,
  834. width: 100,
  835. },
  836. {
  837. surface: "35",
  838. label: "costomAmt02",
  839. name: "进口其他费用",
  840. checked: 0,
  841. width: 100,
  842. },
  843. {
  844. surface: "36",
  845. label: "costomStr02",
  846. name: "进口费用备注",
  847. checked: 0,
  848. width: 100,
  849. },
  850. {
  851. surface: "37",
  852. label: "mBillNo",
  853. name: "主运单号",
  854. checked: 0,
  855. width: 100,
  856. },
  857. ],
  858. allCheck: false,
  859. title: "",
  860. form: {},
  861. DList: [],
  862. CList: [],
  863. disabled: false,
  864. goodsOptions: [],
  865. fMblnoOptions: [],
  866. transPropList: [],
  867. transTypeList: [],
  868. billTypeList: [],
  869. show: false,
  870. buttonValue: {},
  871. allfMblnoOptions: [],
  872. carsTable: {},
  873. };
  874. },
  875. // 使用子组件
  876. components: {
  877. AddOrUpdate,
  878. draggable,
  879. },
  880. created() {
  881. this.setRowList = this.tableDate;
  882. this.getRowList = this.tableDate;
  883. this.getList();
  884. this.getDicts("data_billType").then((response) => {
  885. this.billTypeList = response.data;
  886. });
  887. this.getDicts("data_transType").then((response) => {
  888. this.transTypeList = response.data;
  889. });
  890. this.getDicts("data_transProp").then((response) => {
  891. this.transPropList = response.data;
  892. });
  893. listGoods().then((response) => {
  894. this.goodsOptions = response.rows;
  895. });
  896. listCorps().then((response) => {
  897. this.fMblnoOptions = response.rows;
  898. });
  899. this.getRow();
  900. if (this.$route.query.id) {
  901. this.reset();
  902. const data = { id: this.$route.query.id, billStatus: 1060 };
  903. selectDriverFtmsorderbillscars(data).then((response) => {
  904. if (response.data.cars.billType) {
  905. response.data.cars.billType = response.data.cars.billType.toString();
  906. }
  907. this.title = "查看详情页";
  908. this.form = response.data.cars;
  909. this.relevantAttachments = response.data.attachs;
  910. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  911. this.feesList = [];
  912. });
  913. }
  914. },
  915. methods: {
  916. //列设置全选
  917. allChecked() {
  918. if (this.allCheck == true) {
  919. this.setRowList.map((e) => {
  920. return (e.checked = 0);
  921. });
  922. } else {
  923. this.setRowList.map((e) => {
  924. return (e.checked = 1);
  925. });
  926. }
  927. },
  928. //查询列数据
  929. getRow() {
  930. let that = this;
  931. this.data = {
  932. tableName: "状态跟踪",
  933. userId: Cookies.get("userName"),
  934. };
  935. select(this.data).then((res) => {
  936. if (res.data.length != 0) {
  937. this.getRowList = res.data.filter((e) => e.checked == 0);
  938. this.setRowList = res.data;
  939. this.setRowList = this.setRowList.reduce((res, item) => {
  940. res.push({
  941. surface: item.surface,
  942. label: item.label,
  943. name: item.name,
  944. checked: item.checked,
  945. width: item.width,
  946. fixed: item.fixed,
  947. });
  948. return res;
  949. }, []);
  950. }
  951. });
  952. },
  953. delRow() {
  954. this.data = {
  955. tableName: "状态跟踪",
  956. userId: Cookies.get("userName"),
  957. };
  958. resetModule(this.data).then((res) => {
  959. if (res.code == 200) {
  960. this.showSetting = false;
  961. this.setRowList = this.tableDate;
  962. this.getRowList = this.tableDate;
  963. }
  964. });
  965. },
  966. //保存列设置
  967. save() {
  968. this.showSetting = false;
  969. this.data = {
  970. tableName: "状态跟踪",
  971. userId: Cookies.get("userName"),
  972. sysTableSetList: this.setRowList,
  973. };
  974. addSet(this.data).then((res) => {
  975. if (res.code == 200) {
  976. this.showSetting = false;
  977. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  978. }
  979. });
  980. },
  981. //开始拖拽事件
  982. onStart() {
  983. this.drag = true;
  984. },
  985. //拖拽结束事件
  986. onEnd() {
  987. this.drag = false;
  988. },
  989. /** 查询订单主列表 */
  990. getList() {
  991. this.loading = true;
  992. listFtmsorderbillscars(this.queryParams).then((response) => {
  993. response.dataTable.rows.map((e) => {
  994. if (e.orderStatus == 10) {
  995. e.orderStatus = "车队安排";
  996. }
  997. if (e.orderStatus == 20) {
  998. e.orderStatus = "司机受理";
  999. }
  1000. if (e.orderStatus == 30) {
  1001. e.orderStatus = "司机出车";
  1002. }
  1003. if (e.orderStatus == 40) {
  1004. e.orderStatus = "提箱";
  1005. }
  1006. if (e.orderStatus == 50) {
  1007. e.orderStatus = "装卸货";
  1008. }
  1009. if (e.orderStatus == 60) {
  1010. e.orderStatus = "还卸柜";
  1011. }
  1012. if (e.orderStatus == 70) {
  1013. e.orderStatus = "费用确认";
  1014. }
  1015. if (e.orderStatus == 80) {
  1016. e.orderStatus = "回单";
  1017. }
  1018. if (e.loadDate) {
  1019. this.$set(e, "loadDate", e.loadDate.substring(0, 10));
  1020. }
  1021. if (e.acceptDate) {
  1022. this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
  1023. }
  1024. if (e.mdLoadDate) {
  1025. this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
  1026. }
  1027. if (e.unLoadDate) {
  1028. this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
  1029. }
  1030. if (e.waybillDate) {
  1031. e.waybillDate = e.waybillDate.substring(0, 10);
  1032. }
  1033. });
  1034. this.ftmsorderbillscarsList = response.dataTable.rows;
  1035. this.buttonValue = response.buttonValue;
  1036. this.total = response.dataTable.total;
  1037. this.loading = false;
  1038. });
  1039. },
  1040. /** 新增按钮操作 */
  1041. handleAdd() {
  1042. this.reset();
  1043. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1044. this.title = "添加订单主";
  1045. },
  1046. // 表单重置
  1047. reset() {
  1048. this.form = {
  1049. id: null,
  1050. billNo: null,
  1051. actId: null,
  1052. corpId: null,
  1053. transUserName: null,
  1054. planUserName: null,
  1055. billType: null,
  1056. transType: null,
  1057. transProp: null,
  1058. ifContracted: null,
  1059. contractNo: null,
  1060. refNo: null,
  1061. accstlType: null,
  1062. accdays: null,
  1063. goodsId: null,
  1064. goodsPrice: null,
  1065. goodsLossType: null,
  1066. goodsLossStd: null,
  1067. mblno: null,
  1068. ysl: null,
  1069. voy: null,
  1070. pol: null,
  1071. pod: null,
  1072. qtyPlan: null,
  1073. qtyDisPatch: null,
  1074. weightPlan: null,
  1075. cntrDesc: null,
  1076. carNoList: null,
  1077. loadAddr: null,
  1078. loadAttn: null,
  1079. loadAttntel: null,
  1080. loadDate: null,
  1081. mdLoadAddr: null,
  1082. mdLoadAttn: null,
  1083. mdLoadAttnTel: null,
  1084. mdLoadDate: null,
  1085. unLoadAddr: null,
  1086. unLoadAttn: null,
  1087. unLoadAttnTel: null,
  1088. unLoadDate: null,
  1089. routeId: null,
  1090. routeDesc: null,
  1091. ifWaybill: null,
  1092. ifNeedinvDr: null,
  1093. postDate: null,
  1094. billStatus: 0,
  1095. delFlag: null,
  1096. createBy: null,
  1097. createTime: null,
  1098. updateBy: null,
  1099. updateTime: null,
  1100. remarks: null,
  1101. };
  1102. this.disabled = false;
  1103. this.resetForm("form");
  1104. this.relevantAttachments = [];
  1105. this.allfMblnoOptions = [];
  1106. this.feesList = [];
  1107. },
  1108. // 多选框选中数据
  1109. handleSelectionChange(selection) {
  1110. this.ids = selection.map((item) => item.id);
  1111. this.single = selection.length !== 1;
  1112. this.multiple = !selection.length;
  1113. },
  1114. /** 修改按钮操作 */
  1115. handleUpdate(row) {
  1116. this.reset();
  1117. const data = { id: row.id, billStatus: 1060 };
  1118. selectDriverFtmsorderbillscars(data).then((response) => {
  1119. selectCorpList(row.id).then((response) => {
  1120. this.allfMblnoOptions = response;
  1121. });
  1122. if (response.data.cars.billType) {
  1123. response.data.cars.billType = response.data.cars.billType.toString();
  1124. }
  1125. response.data.feesList.map((e) => {
  1126. if (e.fFeeunitid) {
  1127. e.fFeeunitid = e.fFeeunitid.toString();
  1128. }
  1129. });
  1130. this.title = "查看详情页";
  1131. this.form = response.data.cars;
  1132. this.relevantAttachments = response.data.attachs;
  1133. this.feesList = response.data.feesList;
  1134. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1135. this.carsTable = response.data.carsTable;
  1136. });
  1137. },
  1138. /** 删除按钮操作 */
  1139. handleDelete(row) {
  1140. const ids = row.id || this.ids;
  1141. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  1142. confirmButtonText: "确定",
  1143. cancelButtonText: "取消",
  1144. type: "warning",
  1145. })
  1146. .then(function () {
  1147. return delFtmsorderbills(ids);
  1148. })
  1149. .then(() => {
  1150. this.getList();
  1151. this.msgSuccess("删除成功");
  1152. });
  1153. },
  1154. /** 导出按钮操作 */
  1155. handleExport() {
  1156. const queryParams = this.queryParams;
  1157. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  1158. confirmButtonText: "确定",
  1159. cancelButtonText: "取消",
  1160. type: "warning",
  1161. })
  1162. .then(function () {
  1163. return exportFtmsorderbillscars(queryParams);
  1164. })
  1165. .then((response) => {
  1166. this.download(response.msg);
  1167. });
  1168. },
  1169. /** 搜索按钮操作 */
  1170. handleQuery(Status) {
  1171. this.queryParams.pageNum = 1;
  1172. if (Status) {
  1173. this.queryParams.carStatus = Status;
  1174. } else {
  1175. this.queryParams.carStatus = null;
  1176. }
  1177. this.getList();
  1178. },
  1179. /** 重置按钮操作 */
  1180. resetQuery() {
  1181. this.queryParams=this.$options.data().queryParams;
  1182. this.handleQuery();
  1183. },
  1184. // 监听 子组件弹窗关闭后触发,有子组件调用
  1185. showAddOrUpdate(data) {
  1186. if (data === "false") {
  1187. this.addOrUpdateVisible = false;
  1188. } else {
  1189. this.addOrUpdateVisible = true;
  1190. }
  1191. },
  1192. fixDisabled(data) {
  1193. if (data === "false") {
  1194. this.disabled = false;
  1195. }
  1196. },
  1197. },
  1198. };
  1199. </script>
  1200. <style lang="scss" scoped>
  1201. .tabSetting {
  1202. display: flex;
  1203. justify-content: flex-end;
  1204. }
  1205. .listStyle {
  1206. display: flex;
  1207. border-top: 1px solid #dcdfe6;
  1208. border-left: 1px solid #dcdfe6;
  1209. border-right: 1px solid #dcdfe6;
  1210. }
  1211. .listStyle:last-child {
  1212. border-bottom: 1px solid #dcdfe6;
  1213. }
  1214. .progress {
  1215. display: flex;
  1216. align-items: center;
  1217. padding: 2px;
  1218. background-color: rgba(0, 0, 0, 0.05);
  1219. height: 100%;
  1220. }
  1221. </style>