index.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  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="max-width: 187px"
  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. >
  32. <el-option
  33. v-for="(dict, index) in fMblnoOptions"
  34. :key="index.fId"
  35. :label="dict.fName"
  36. :value="dict.fId"
  37. />
  38. </el-select> </el-form-item
  39. ></el-col>
  40. <el-col :span="6">
  41. <el-form-item label-width="100px" label="业务类型" prop="billType">
  42. <el-select
  43. v-model="queryParams.billType"
  44. placeholder="请选择业务类型"
  45. clearable
  46. size="small"
  47. >
  48. <el-option
  49. v-for="(dict, index) in billTypeList"
  50. :key="index.dictValue"
  51. :label="dict.dictLabel"
  52. :value="dict.dictValue"
  53. />
  54. </el-select>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="6">
  58. <el-form-item label-width="100px" label="运输方式" prop="transType">
  59. <el-select
  60. v-model="queryParams.transType"
  61. placeholder="请选择运输方式"
  62. clearable
  63. size="small"
  64. >
  65. <el-option
  66. v-for="(dict, index) in transTypeList"
  67. :key="index.dictValue"
  68. :label="dict.dictLabel"
  69. :value="dict.dictValue"
  70. />
  71. </el-select>
  72. </el-form-item>
  73. </el-col>
  74. </el-row>
  75. <el-collapse-transition>
  76. <div v-show="show">
  77. <el-row>
  78. <el-col :span="6">
  79. <el-form-item
  80. label-width="100px"
  81. label="运输性质"
  82. prop="transProp"
  83. >
  84. <el-select
  85. v-model="queryParams.transProp"
  86. placeholder="请选择运输性质"
  87. clearable
  88. size="small"
  89. >
  90. <el-option
  91. v-for="(dict, index) in transPropList"
  92. :key="index.dictValue"
  93. :label="dict.dictLabel"
  94. :value="dict.dictValue"
  95. />
  96. </el-select>
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="6">
  100. <el-form-item label-width="100px" label="货品名称" prop="goodsId">
  101. <el-select
  102. v-model="queryParams.goodsId"
  103. placeholder="请输入货品名称"
  104. clearable
  105. size="small"
  106. filterable
  107. >
  108. <el-option
  109. v-for="(dict, index) in goodsOptions"
  110. :key="index.fId"
  111. :label="dict.fName"
  112. :value="dict.fId"
  113. />
  114. </el-select>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="6">
  118. <el-form-item
  119. label-width="100px"
  120. label="提箱地点"
  121. prop="loadAddr"
  122. >
  123. <el-input
  124. v-model="queryParams.loadAddr"
  125. placeholder="请输入提箱地点"
  126. clearable
  127. size="small"
  128. @keyup.enter.native="handleQuery"
  129. style="max-width: 187px"
  130. />
  131. </el-form-item>
  132. </el-col>
  133. <el-col :span="6">
  134. <el-form-item
  135. label-width="100px"
  136. label="装卸货地点"
  137. prop="mdLoadAddr"
  138. >
  139. <el-input
  140. v-model="queryParams.mdLoadAddr"
  141. placeholder="请输入装卸货地点"
  142. clearable
  143. size="small"
  144. @keyup.enter.native="handleQuery"
  145. style="max-width: 187px"
  146. /> </el-form-item
  147. ></el-col>
  148. </el-row>
  149. <el-row>
  150. <el-col :span="6"
  151. ><el-form-item
  152. label-width="100px"
  153. label="卸箱地点"
  154. prop="unLoadAddr"
  155. >
  156. <el-input
  157. v-model="queryParams.unLoadAddr"
  158. placeholder="请输入卸箱地点"
  159. clearable
  160. size="small"
  161. @keyup.enter.native="handleQuery"
  162. style="max-width: 187px"
  163. /> </el-form-item
  164. ></el-col>
  165. </el-row>
  166. </div>
  167. </el-collapse-transition>
  168. </el-form>
  169. <el-row :gutter="10" class="mb8">
  170. <!-- <el-col :span="1.5">
  171. <el-button
  172. type="primary"
  173. icon="el-icon-plus"
  174. size="mini"
  175. @click="handleAdd"
  176. v-hasPermi="['fleet:plans:add']"
  177. >新增</el-button
  178. >
  179. </el-col> -->
  180. <el-col :span="1.5">
  181. <el-button
  182. type="success"
  183. icon="el-icon-edit"
  184. size="mini"
  185. :disabled="single"
  186. @click="handleUpdate"
  187. v-hasPermi="['fleet:plans:edit']"
  188. >修改</el-button
  189. >
  190. </el-col>
  191. <el-col :span="1.5">
  192. <el-button
  193. type="danger"
  194. icon="el-icon-delete"
  195. size="mini"
  196. :disabled="multiple"
  197. @click="handleDelete"
  198. v-hasPermi="['fleet:plans:remove']"
  199. >删除</el-button
  200. >
  201. </el-col>
  202. <el-col :span="1.5">
  203. <el-button
  204. type="warning"
  205. icon="el-icon-download"
  206. size="mini"
  207. @click="handleExport"
  208. v-hasPermi="['fleet:plans:export']"
  209. >导出</el-button
  210. >
  211. </el-col>
  212. <div class="tabSetting">
  213. <div style="margin-right: 20px">
  214. <el-button
  215. type="cyan"
  216. icon="el-icon-search"
  217. size="mini"
  218. @click="handleQuery"
  219. >搜索</el-button
  220. >
  221. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  222. >重置</el-button
  223. >
  224. <el-button
  225. v-show="show"
  226. @click="show = !show"
  227. icon="el-icon-arrow-up"
  228. size="mini"
  229. >展开</el-button
  230. >
  231. <el-button
  232. v-show="!show"
  233. @click="show = !show"
  234. icon="el-icon-arrow-down"
  235. size="mini"
  236. >展开</el-button
  237. >
  238. </div>
  239. <right-toolbar
  240. :showSearch.sync="showSearch"
  241. @queryTable="getList"
  242. ></right-toolbar>
  243. <div style="margin: 0 12px">
  244. <el-button
  245. icon="el-icon-setting"
  246. size="mini"
  247. circle
  248. @click="showSetting = !showSetting"
  249. ></el-button>
  250. </div>
  251. </div>
  252. </el-row>
  253. <el-dialog title="提示" :visible.sync="showSetting" width="700px">
  254. <div>配置排序列数据(拖动调整顺序)</div>
  255. <div style="margin-left: 17px">
  256. <el-checkbox
  257. v-model="allCheck"
  258. label="全选"
  259. @change="allChecked"
  260. ></el-checkbox>
  261. </div>
  262. <div style="padding: 4px; display: flex; justify-content: center">
  263. <draggable
  264. v-model="setRowList"
  265. group="site"
  266. animation="300"
  267. @start="onStart"
  268. @end="onEnd"
  269. handle=".indraggable"
  270. >
  271. <transition-group>
  272. <div
  273. v-for="item in setRowList"
  274. :key="item.surface"
  275. class="listStyle"
  276. >
  277. <div style="width: 500px" class="indraggable">
  278. <div class="progress" :style="{ width: item.width + 'px' }">
  279. <el-checkbox
  280. :label="item.name"
  281. v-model="item.checked"
  282. :true-label="0"
  283. :false-label="1"
  284. >{{ item.name }}
  285. </el-checkbox>
  286. </div>
  287. </div>
  288. <el-input-number
  289. v-model.number="item.width"
  290. controls-position="right"
  291. :min="1"
  292. :max="500"
  293. size="mini"
  294. ></el-input-number>
  295. </div>
  296. </transition-group>
  297. </draggable>
  298. </div>
  299. <span slot="footer" class="dialog-footer">
  300. <el-button @click="showSetting = false">取 消</el-button>
  301. <el-button type="primary" @click="save()">确 定</el-button>
  302. </span>
  303. </el-dialog>
  304. <el-table
  305. v-loading="loading"
  306. :data="ftmsorderbillscarsList"
  307. @selection-change="handleSelectionChange"
  308. >
  309. <el-table-column type="selection" width="55" align="center" />
  310. <el-table-column
  311. v-for="(item, index) in getRowList"
  312. :key="index"
  313. :label="item.name"
  314. :width="item.width"
  315. :prop="item.label"
  316. align="center"
  317. :show-overflow-tooltip="true"
  318. sortable
  319. :fixed="item.fixed"
  320. />
  321. <el-table-column
  322. label="操作"
  323. align="center"
  324. class-name="small-padding fixed-width"
  325. fixed="right"
  326. width="150px"
  327. >
  328. <template slot-scope="scope">
  329. <el-button
  330. size="mini"
  331. type="text"
  332. icon="el-icon-edit"
  333. @click="handleUpdate(scope.row)"
  334. >查看</el-button
  335. >
  336. <!-- <el-button
  337. v-if="scope.row.billStatus != 6"
  338. size="mini"
  339. type="text"
  340. icon="el-icon-edit"
  341. @click="handleUpdate(scope.row)"
  342. v-hasPermi="['fleet:plans:edit']"
  343. >修改</el-button
  344. > -->
  345. <el-button
  346. size="mini"
  347. type="text"
  348. icon="el-icon-delete"
  349. @click="handleDelete(scope.row)"
  350. v-hasPermi="['fleet:plans:remove']"
  351. >删除</el-button
  352. >
  353. </template>
  354. </el-table-column>
  355. </el-table>
  356. <pagination
  357. v-show="total > 0"
  358. :total="total"
  359. :page.sync="queryParams.pageNum"
  360. :limit.sync="queryParams.pageSize"
  361. @pagination="getList"
  362. />
  363. <!-- 新增编辑弹框子组件 -->
  364. <add-or-update
  365. :addOrUpdateVisible="addOrUpdateVisible"
  366. :title="title"
  367. :form="form"
  368. :DList="DList"
  369. :CList="CList"
  370. :disabled="disabled"
  371. :relevantAttachments="relevantAttachments"
  372. @changeShow="showAddOrUpdate"
  373. @fixDisabled="fixDisabled"
  374. ref="addOrUpdateRef"
  375. ></add-or-update>
  376. </div>
  377. </template>
  378. <script>
  379. import AddOrUpdate from "./AddOrUpdate.vue";
  380. import {
  381. delFtmsorderbills,
  382. exportFtmsorderbills,
  383. } from "@/api/fleet/ftmsorderbills";
  384. import {
  385. listFtmsorderbillscars,
  386. selectDriverFtmsorderbillscars,
  387. } from "@/api/fleet/ftmsorderbillscars";
  388. import { listGoods } from "@/api/basicdata/goods";
  389. import { listCorps } from "@/api/basicdata/corps";
  390. import { addSet, select } from "@/api/system/set";
  391. import Cookies from "js-cookie";
  392. import draggable from "vuedraggable";
  393. export default {
  394. name: "plans",
  395. data() {
  396. return {
  397. // 控制新增编辑弹窗的显示与隐藏
  398. addOrUpdateVisible: false,
  399. // 非单个禁用
  400. single: true,
  401. // 非多个禁用
  402. multiple: true,
  403. // 显示搜索条件
  404. showSearch: true,
  405. // 订单主表格数据
  406. ftmsorderbillscarsList: [],
  407. // 总条数
  408. total: 0,
  409. // 查询参数
  410. queryParams: {
  411. pageNum: 1,
  412. pageSize: 10,
  413. corpId: null,
  414. billType: null,
  415. transType: null,
  416. transProp: null,
  417. goodsId: null,
  418. mblno: null,
  419. loadAddr: null,
  420. mdLoadAddr: null,
  421. unLoadAddr: null,
  422. },
  423. showSetting: false,
  424. drag: false,
  425. setRowList: [
  426. {
  427. surface: "1",
  428. label: "mdLoadDate",
  429. name: "装卸日期",
  430. checked: 0,
  431. width: 100,
  432. },
  433. {
  434. surface: "2",
  435. label: "billType",
  436. name: "贸易方式",
  437. checked: 0,
  438. width: 100,
  439. },
  440. {
  441. surface: "3",
  442. label: "transType",
  443. name: "运输方式",
  444. checked: 0,
  445. width: 100,
  446. },
  447. {
  448. surface: "4",
  449. label: "corpId",
  450. name: "托运人",
  451. checked: 0,
  452. width: 100,
  453. },
  454. {
  455. surface: "5",
  456. label: "ysl",
  457. name: "船名",
  458. checked: 0,
  459. width: 100,
  460. },
  461. {
  462. surface: "6",
  463. label: "voy",
  464. name: "航次",
  465. checked: 0,
  466. width: 100,
  467. },
  468. {
  469. surface: "7",
  470. label: "mblno",
  471. name: "提单号",
  472. checked: 0,
  473. width: 100,
  474. fixed: "left",
  475. },
  476. {
  477. surface: "8",
  478. label: "cntrQty",
  479. name: "柜量",
  480. checked: 0,
  481. width: 100,
  482. },
  483. {
  484. surface: "9",
  485. label: "cntrId",
  486. name: "柜型",
  487. checked: 0,
  488. width: 100,
  489. },
  490. {
  491. surface: "10",
  492. label: "goodsId",
  493. name: "品名",
  494. checked: 0,
  495. width: 100,
  496. },
  497. {
  498. surface: "11",
  499. label: "cntrWeight",
  500. name: "重量",
  501. checked: 0,
  502. width: 100,
  503. },
  504. {
  505. surface: "12",
  506. label: "polId",
  507. name: "起运港",
  508. checked: 0,
  509. width: 100,
  510. },
  511. {
  512. surface: "13",
  513. label: "podId",
  514. name: "目的港",
  515. checked: 0,
  516. width: 100,
  517. },
  518. {
  519. surface: "14",
  520. label: "loadAddr",
  521. name: "提箱场站",
  522. checked: 0,
  523. width: 100,
  524. },
  525. {
  526. surface: "15",
  527. label: "mdLoadAddr",
  528. name: "装货地",
  529. checked: 0,
  530. width: 100,
  531. },
  532. {
  533. surface: "16",
  534. label: "unLoadAddr",
  535. name: "卸货地",
  536. checked: 0,
  537. width: 100,
  538. },
  539. {
  540. surface: "17",
  541. label: "carregNo",
  542. name: "车号",
  543. checked: 0,
  544. width: 100,
  545. },
  546. {
  547. surface: "18",
  548. label: "driverName",
  549. name: "司机",
  550. checked: 0,
  551. width: 100,
  552. },
  553. {
  554. surface: "19",
  555. label: "orderNo",
  556. name: "运单号",
  557. checked: 0,
  558. width: 100,
  559. },
  560. {
  561. surface: "20",
  562. label: "driverTel",
  563. name: "司机电话",
  564. checked: 0,
  565. width: 100,
  566. },
  567. {
  568. surface: "21",
  569. label: "orderName",
  570. name: "状态",
  571. checked: 0,
  572. width: 100,
  573. },
  574. {
  575. surface: "22",
  576. label: "acceptDate",
  577. name: "接单日期",
  578. checked: 0,
  579. width: 100,
  580. },
  581. {
  582. surface: "23",
  583. label: "loadDate",
  584. name: "提箱日期",
  585. checked: 0,
  586. width: 100,
  587. },
  588. {
  589. surface: "24",
  590. label: "unLoadDate",
  591. name: "还柜日期",
  592. checked: 0,
  593. width: 100,
  594. },
  595. ],
  596. getRowList: [
  597. {
  598. surface: "1",
  599. label: "mdLoadDate",
  600. name: "装卸日期",
  601. checked: 0,
  602. width: 100,
  603. },
  604. {
  605. surface: "2",
  606. label: "billType",
  607. name: "贸易方式",
  608. checked: 0,
  609. width: 100,
  610. },
  611. {
  612. surface: "3",
  613. label: "transType",
  614. name: "运输方式",
  615. checked: 0,
  616. width: 100,
  617. },
  618. {
  619. surface: "4",
  620. label: "corpId",
  621. name: "托运人",
  622. checked: 0,
  623. width: 100,
  624. },
  625. {
  626. surface: "5",
  627. label: "ysl",
  628. name: "船名",
  629. checked: 0,
  630. width: 100,
  631. },
  632. {
  633. surface: "6",
  634. label: "voy",
  635. name: "航次",
  636. checked: 0,
  637. width: 100,
  638. },
  639. {
  640. surface: "7",
  641. label: "mblno",
  642. name: "提单号",
  643. checked: 0,
  644. width: 100,
  645. fixed: "left",
  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. allCheck: false,
  768. title: "",
  769. form: {},
  770. DList: [],
  771. CList: [],
  772. disabled: false,
  773. goodsOptions: [],
  774. fMblnoOptions: [],
  775. transPropList: [],
  776. transTypeList: [],
  777. billTypeList: [],
  778. show: false,
  779. relevantAttachments:[]
  780. };
  781. },
  782. // 使用子组件
  783. components: {
  784. AddOrUpdate,
  785. draggable,
  786. },
  787. created() {
  788. this.getList();
  789. this.getDicts("data_billType").then((response) => {
  790. this.billTypeList = response.data;
  791. });
  792. this.getDicts("data_transType").then((response) => {
  793. this.transTypeList = response.data;
  794. });
  795. this.getDicts("data_transProp").then((response) => {
  796. this.transPropList = response.data;
  797. });
  798. listGoods().then((response) => {
  799. this.goodsOptions = response.rows;
  800. });
  801. listCorps().then((response) => {
  802. this.fMblnoOptions = response.rows;
  803. });
  804. this.getRow();
  805. },
  806. methods: {
  807. //列设置全选
  808. allChecked() {
  809. if (this.allCheck == true) {
  810. this.setRowList.map((e) => {
  811. return (e.checked = 0);
  812. });
  813. } else {
  814. this.setRowList.map((e) => {
  815. return (e.checked = 1);
  816. });
  817. }
  818. },
  819. //查询列数据
  820. getRow() {
  821. let that = this;
  822. this.data = {
  823. tableName: "回单",
  824. userId: Cookies.get("userName"),
  825. };
  826. select(this.data).then((res) => {
  827. if (res.data.length != 0) {
  828. this.getRowList = res.data.filter((e) => e.checked == 0);
  829. this.setRowList = res.data;
  830. this.setRowList = this.setRowList.reduce((res, item) => {
  831. res.push({
  832. surface: item.surface,
  833. label: item.label,
  834. name: item.name,
  835. checked: item.checked,
  836. width: item.width,
  837. fixed: item.fixed,
  838. });
  839. return res;
  840. }, []);
  841. }
  842. });
  843. },
  844. //保存列设置
  845. save() {
  846. this.showSetting = false;
  847. this.data = {
  848. tableName: "回单",
  849. userId: Cookies.get("userName"),
  850. sysTableSetList: this.setRowList,
  851. };
  852. addSet(this.data).then((res) => {
  853. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  854. });
  855. },
  856. //开始拖拽事件
  857. onStart() {
  858. this.drag = true;
  859. },
  860. //拖拽结束事件
  861. onEnd() {
  862. this.drag = false;
  863. },
  864. /** 查询订单主列表 */
  865. getList() {
  866. this.loading = true;
  867. listFtmsorderbillscars(this.queryParams).then((response) => {
  868. response.rows.map((e) => {
  869. if (e.orderStatus == 10) {
  870. e.orderStatus = "车队安排";
  871. }
  872. if (e.orderStatus == 20) {
  873. e.orderStatus = "司机受理";
  874. }
  875. if (e.orderStatus == 30) {
  876. e.orderStatus = "司机出车";
  877. }
  878. if (e.orderStatus == 40) {
  879. e.orderStatus = "提箱";
  880. }
  881. if (e.orderStatus == 50) {
  882. e.orderStatus = "装卸货";
  883. }
  884. if (e.orderStatus == 60) {
  885. e.orderStatus = "还卸柜";
  886. }
  887. if (e.orderStatus == 70) {
  888. e.orderStatus = "费用确认";
  889. }
  890. if (e.orderStatus == 80) {
  891. e.orderStatus = "回单";
  892. }
  893. if (e.loadDate) {
  894. this.$set(e, "loadDate", e.loadDate.substring(0, 10));
  895. }
  896. if (e.acceptDate) {
  897. this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
  898. }
  899. if (e.mdLoadDate) {
  900. this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
  901. }
  902. if (e.unLoadDate) {
  903. this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
  904. }
  905. if (e.waybillDate) {
  906. e.waybillDate = e.waybillDate.substring(0, 10);
  907. }
  908. });
  909. this.ftmsorderbillscarsList = response.rows;
  910. this.total = response.total;
  911. this.loading = false;
  912. });
  913. },
  914. /** 新增按钮操作 */
  915. handleAdd() {
  916. this.reset();
  917. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  918. this.title = "添加订单主";
  919. },
  920. // 表单重置
  921. reset() {
  922. this.form = {
  923. id: null,
  924. billNo: null,
  925. actId: null,
  926. corpId: null,
  927. transUserName: null,
  928. planUserName: null,
  929. billType: null,
  930. transType: null,
  931. transProp: null,
  932. ifContracted: null,
  933. contractNo: null,
  934. refNo: null,
  935. accstlType: null,
  936. accdays: null,
  937. goodsId: null,
  938. goodsPrice: null,
  939. goodsLossType: null,
  940. goodsLossStd: null,
  941. mblno: null,
  942. ysl: null,
  943. voy: null,
  944. pol: null,
  945. pod: null,
  946. qtyPlan: null,
  947. qtyDisPatch: null,
  948. weightPlan: null,
  949. cntrDesc: null,
  950. carNoList: null,
  951. loadAddr: null,
  952. loadAttn: null,
  953. loadAttntel: null,
  954. loadDate: null,
  955. mdLoadAddr: null,
  956. mdLoadAttn: null,
  957. mdLoadAttnTel: null,
  958. mdLoadDate: null,
  959. unLoadAddr: null,
  960. unLoadAttn: null,
  961. unLoadAttnTel: null,
  962. unLoadDate: null,
  963. routeId: null,
  964. routeDesc: null,
  965. ifWaybill: null,
  966. ifNeedinvDr: null,
  967. postDate: null,
  968. billStatus: 0,
  969. delFlag: null,
  970. createBy: null,
  971. createTime: null,
  972. updateBy: null,
  973. updateTime: null,
  974. remarks: null,
  975. };
  976. this.disabled = false;
  977. this.resetForm("form");
  978. this.relevantAttachments=[]
  979. },
  980. // 多选框选中数据
  981. handleSelectionChange(selection) {
  982. this.ids = selection.map((item) => item.id);
  983. this.single = selection.length !== 1;
  984. this.multiple = !selection.length;
  985. },
  986. /** 修改按钮操作 */
  987. handleUpdate(row) {
  988. this.reset();
  989. const data = { id: row.id, billStatus: 1070 };
  990. selectDriverFtmsorderbillscars(data).then((response) => {
  991. if (response.data.cars.billType) {
  992. response.data.cars.billType = response.data.cars.billType.toString();
  993. }
  994. if (response.data.fees.length) {
  995. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  996. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  997. response.data.fees.map((e) => {
  998. if (e.fFeeunitid) {
  999. e.fFeeunitid = e.fFeeunitid.toString();
  1000. }
  1001. });
  1002. } else {
  1003. this.DList = [];
  1004. this.CList = [];
  1005. }
  1006. if (response.data.cars.orderStatus >= 80) {
  1007. this.disabled = true;
  1008. }
  1009. this.title = "查看回单";
  1010. this.form = response.data.cars;
  1011. this.relevantAttachments=response.data.attach;
  1012. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1013. });
  1014. },
  1015. // //获取到保存并复制
  1016. // getSave(data) {
  1017. // data.data.map((e) => {s
  1018. // if (e.cntrId != null) {
  1019. // return (e.cntrId = e.cntrId.toString());
  1020. // }
  1021. // });
  1022. // this.vehicleList = data.data;
  1023. // },
  1024. /** 删除按钮操作 */
  1025. handleDelete(row) {
  1026. const ids = row.id || this.ids;
  1027. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  1028. confirmButtonText: "确定",
  1029. cancelButtonText: "取消",
  1030. type: "warning",
  1031. })
  1032. .then(function () {
  1033. return delFtmsorderbills(ids);
  1034. })
  1035. .then(() => {
  1036. this.getList();
  1037. this.msgSuccess("删除成功");
  1038. });
  1039. },
  1040. /** 导出按钮操作 */
  1041. handleExport() {
  1042. const queryParams = this.queryParams;
  1043. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  1044. confirmButtonText: "确定",
  1045. cancelButtonText: "取消",
  1046. type: "warning",
  1047. })
  1048. .then(function () {
  1049. return exportFtmsorderbills(queryParams);
  1050. })
  1051. .then((response) => {
  1052. this.download(response.msg);
  1053. });
  1054. },
  1055. /** 搜索按钮操作 */
  1056. handleQuery() {
  1057. this.queryParams.pageNum = 1;
  1058. this.getList();
  1059. },
  1060. /** 重置按钮操作 */
  1061. resetQuery() {
  1062. this.resetForm("queryForm");
  1063. this.handleQuery();
  1064. },
  1065. // 监听 子组件弹窗关闭后触发,有子组件调用
  1066. showAddOrUpdate(data) {
  1067. if (data === "false") {
  1068. this.addOrUpdateVisible = false;
  1069. } else {
  1070. this.addOrUpdateVisible = true;
  1071. }
  1072. },
  1073. fixDisabled(data) {
  1074. if (data === "false") {
  1075. this.disabled = false;
  1076. }
  1077. },
  1078. },
  1079. };
  1080. </script>
  1081. <style lang="scss" scoped>
  1082. .tabSetting {
  1083. display: flex;
  1084. justify-content: flex-end;
  1085. }
  1086. .listStyle {
  1087. display: flex;
  1088. border-top: 1px solid #dcdfe6;
  1089. border-left: 1px solid #dcdfe6;
  1090. border-right: 1px solid #dcdfe6;
  1091. }
  1092. .listStyle:last-child {
  1093. border-bottom: 1px solid #dcdfe6;
  1094. }
  1095. .progress {
  1096. display: flex;
  1097. align-items: center;
  1098. padding: 2px;
  1099. background-color: rgba(0, 0, 0, 0.05);
  1100. height: 100%;
  1101. }
  1102. </style>