index.vue 28 KB

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