index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101
  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. @changeShow="showAddOrUpdate"
  372. @fixDisabled="fixDisabled"
  373. ref="addOrUpdateRef"
  374. ></add-or-update>
  375. </div>
  376. </template>
  377. <script>
  378. import AddOrUpdate from "./AddOrUpdate.vue";
  379. import {
  380. delFtmsorderbills,
  381. exportFtmsorderbills,
  382. } from "@/api/fleet/ftmsorderbills";
  383. import {
  384. listFtmsorderbillscars,
  385. selectDriverFtmsorderbillscars,
  386. } from "@/api/fleet/ftmsorderbillscars";
  387. import { listGoods } from "@/api/basicdata/goods";
  388. import { listCorps } from "@/api/basicdata/corps";
  389. import { addSet, select } from "@/api/system/set";
  390. import Cookies from "js-cookie";
  391. import draggable from "vuedraggable";
  392. export default {
  393. name: "plans",
  394. data() {
  395. return {
  396. // 控制新增编辑弹窗的显示与隐藏
  397. addOrUpdateVisible: false,
  398. // 非单个禁用
  399. single: true,
  400. // 非多个禁用
  401. multiple: true,
  402. // 显示搜索条件
  403. showSearch: true,
  404. // 订单主表格数据
  405. ftmsorderbillscarsList: [],
  406. // 总条数
  407. total: 0,
  408. // 查询参数
  409. queryParams: {
  410. pageNum: 1,
  411. pageSize: 10,
  412. corpId: null,
  413. billType: null,
  414. transType: null,
  415. transProp: null,
  416. goodsId: null,
  417. mblno: null,
  418. loadAddr: null,
  419. mdLoadAddr: null,
  420. unLoadAddr: null,
  421. },
  422. showSetting: false,
  423. drag: false,
  424. setRowList: [
  425. {
  426. surface: "1",
  427. label: "mdLoadDate",
  428. name: "装卸日期",
  429. checked: 0,
  430. width: 100,
  431. },
  432. {
  433. surface: "2",
  434. label: "billType",
  435. name: "贸易方式",
  436. checked: 0,
  437. width: 100,
  438. },
  439. {
  440. surface: "3",
  441. label: "transType",
  442. name: "运输方式",
  443. checked: 0,
  444. width: 100,
  445. },
  446. {
  447. surface: "4",
  448. label: "corpId",
  449. name: "托运人",
  450. checked: 0,
  451. width: 100,
  452. },
  453. {
  454. surface: "5",
  455. label: "ysl",
  456. name: "船名",
  457. checked: 0,
  458. width: 100,
  459. },
  460. {
  461. surface: "6",
  462. label: "voy",
  463. name: "航次",
  464. checked: 0,
  465. width: 100,
  466. },
  467. {
  468. surface: "7",
  469. label: "mblno",
  470. name: "提单号",
  471. checked: 0,
  472. width: 100,
  473. fixed: "left",
  474. },
  475. {
  476. surface: "8",
  477. label: "cntrQty",
  478. name: "柜量",
  479. checked: 0,
  480. width: 100,
  481. },
  482. {
  483. surface: "9",
  484. label: "cntrId",
  485. name: "柜型",
  486. checked: 0,
  487. width: 100,
  488. },
  489. {
  490. surface: "10",
  491. label: "goodsId",
  492. name: "品名",
  493. checked: 0,
  494. width: 100,
  495. },
  496. {
  497. surface: "11",
  498. label: "cntrWeight",
  499. name: "重量",
  500. checked: 0,
  501. width: 100,
  502. },
  503. {
  504. surface: "12",
  505. label: "polId",
  506. name: "起运港",
  507. checked: 0,
  508. width: 100,
  509. },
  510. {
  511. surface: "13",
  512. label: "podId",
  513. name: "目的港",
  514. checked: 0,
  515. width: 100,
  516. },
  517. {
  518. surface: "14",
  519. label: "loadAddr",
  520. name: "提箱场站",
  521. checked: 0,
  522. width: 100,
  523. },
  524. {
  525. surface: "15",
  526. label: "mdLoadAddr",
  527. name: "装货地",
  528. checked: 0,
  529. width: 100,
  530. },
  531. {
  532. surface: "16",
  533. label: "unLoadAddr",
  534. name: "卸货地",
  535. checked: 0,
  536. width: 100,
  537. },
  538. {
  539. surface: "17",
  540. label: "carregNo",
  541. name: "车号",
  542. checked: 0,
  543. width: 100,
  544. },
  545. {
  546. surface: "18",
  547. label: "driverName",
  548. name: "司机",
  549. checked: 0,
  550. width: 100,
  551. },
  552. {
  553. surface: "19",
  554. label: "orderNo",
  555. name: "运单号",
  556. checked: 0,
  557. width: 100,
  558. },
  559. {
  560. surface: "20",
  561. label: "driverTel",
  562. name: "司机电话",
  563. checked: 0,
  564. width: 100,
  565. },
  566. {
  567. surface: "21",
  568. label: "orderName",
  569. name: "状态",
  570. checked: 0,
  571. width: 100,
  572. },
  573. {
  574. surface: "22",
  575. label: "acceptDate",
  576. name: "接单日期",
  577. checked: 0,
  578. width: 100,
  579. },
  580. {
  581. surface: "23",
  582. label: "loadDate",
  583. name: "提箱日期",
  584. checked: 0,
  585. width: 100,
  586. },
  587. {
  588. surface: "24",
  589. label: "unLoadDate",
  590. name: "还柜日期",
  591. checked: 0,
  592. width: 100,
  593. },
  594. ],
  595. getRowList: [
  596. {
  597. surface: "1",
  598. label: "mdLoadDate",
  599. name: "装卸日期",
  600. checked: 0,
  601. width: 100,
  602. },
  603. {
  604. surface: "2",
  605. label: "billType",
  606. name: "贸易方式",
  607. checked: 0,
  608. width: 100,
  609. },
  610. {
  611. surface: "3",
  612. label: "transType",
  613. name: "运输方式",
  614. checked: 0,
  615. width: 100,
  616. },
  617. {
  618. surface: "4",
  619. label: "corpId",
  620. name: "托运人",
  621. checked: 0,
  622. width: 100,
  623. },
  624. {
  625. surface: "5",
  626. label: "ysl",
  627. name: "船名",
  628. checked: 0,
  629. width: 100,
  630. },
  631. {
  632. surface: "6",
  633. label: "voy",
  634. name: "航次",
  635. checked: 0,
  636. width: 100,
  637. },
  638. {
  639. surface: "7",
  640. label: "mblno",
  641. name: "提单号",
  642. checked: 0,
  643. width: 100,
  644. fixed: "left",
  645. },
  646. {
  647. surface: "8",
  648. label: "cntrQty",
  649. name: "柜量",
  650. checked: 0,
  651. width: 100,
  652. },
  653. {
  654. surface: "9",
  655. label: "cntrId",
  656. name: "柜型",
  657. checked: 0,
  658. width: 100,
  659. },
  660. {
  661. surface: "10",
  662. label: "goodsId",
  663. name: "品名",
  664. checked: 0,
  665. width: 100,
  666. },
  667. {
  668. surface: "11",
  669. label: "cntrWeight",
  670. name: "重量",
  671. checked: 0,
  672. width: 100,
  673. },
  674. {
  675. surface: "12",
  676. label: "polId",
  677. name: "起运港",
  678. checked: 0,
  679. width: 100,
  680. },
  681. {
  682. surface: "13",
  683. label: "podId",
  684. name: "目的港",
  685. checked: 0,
  686. width: 100,
  687. },
  688. {
  689. surface: "14",
  690. label: "loadAddr",
  691. name: "提箱场站",
  692. checked: 0,
  693. width: 100,
  694. },
  695. {
  696. surface: "15",
  697. label: "mdLoadAddr",
  698. name: "装货地",
  699. checked: 0,
  700. width: 100,
  701. },
  702. {
  703. surface: "16",
  704. label: "unLoadAddr",
  705. name: "卸货地",
  706. checked: 0,
  707. width: 100,
  708. },
  709. {
  710. surface: "17",
  711. label: "carregNo",
  712. name: "车号",
  713. checked: 0,
  714. width: 100,
  715. },
  716. {
  717. surface: "18",
  718. label: "driverName",
  719. name: "司机",
  720. checked: 0,
  721. width: 100,
  722. },
  723. {
  724. surface: "19",
  725. label: "orderNo",
  726. name: "运单号",
  727. checked: 0,
  728. width: 100,
  729. },
  730. {
  731. surface: "20",
  732. label: "driverTel",
  733. name: "司机电话",
  734. checked: 0,
  735. width: 100,
  736. },
  737. {
  738. surface: "21",
  739. label: "orderName",
  740. name: "状态",
  741. checked: 0,
  742. width: 100,
  743. },
  744. {
  745. surface: "22",
  746. label: "acceptDate",
  747. name: "接单日期",
  748. checked: 0,
  749. width: 100,
  750. },
  751. {
  752. surface: "23",
  753. label: "loadDate",
  754. name: "提箱日期",
  755. checked: 0,
  756. width: 100,
  757. },
  758. {
  759. surface: "24",
  760. label: "unLoadDate",
  761. name: "还柜日期",
  762. checked: 0,
  763. width: 100,
  764. },
  765. ],
  766. allCheck: false,
  767. title: "",
  768. form: {},
  769. DList: [],
  770. CList: [],
  771. disabled: false,
  772. goodsOptions: [],
  773. fMblnoOptions: [],
  774. transPropList: [],
  775. transTypeList: [],
  776. billTypeList: [],
  777. show: false,
  778. };
  779. },
  780. // 使用子组件
  781. components: {
  782. AddOrUpdate,
  783. draggable,
  784. },
  785. created() {
  786. this.getList();
  787. this.getDicts("data_billType").then((response) => {
  788. this.billTypeList = response.data;
  789. });
  790. this.getDicts("data_transType").then((response) => {
  791. this.transTypeList = response.data;
  792. });
  793. this.getDicts("data_transProp").then((response) => {
  794. this.transPropList = response.data;
  795. });
  796. listGoods().then((response) => {
  797. this.goodsOptions = response.rows;
  798. });
  799. listCorps().then((response) => {
  800. this.fMblnoOptions = response.rows;
  801. });
  802. this.getRow();
  803. },
  804. methods: {
  805. //列设置全选
  806. allChecked() {
  807. if (this.allCheck == true) {
  808. this.setRowList.map((e) => {
  809. return (e.checked = 0);
  810. });
  811. } else {
  812. this.setRowList.map((e) => {
  813. return (e.checked = 1);
  814. });
  815. }
  816. },
  817. //查询列数据
  818. getRow() {
  819. let that = this;
  820. this.data = {
  821. tableName: "提箱",
  822. userId: Cookies.get("userName"),
  823. };
  824. select(this.data).then((res) => {
  825. if (res.data.length != 0) {
  826. this.getRowList = res.data.filter((e) => e.checked == 0);
  827. this.setRowList = res.data;
  828. this.setRowList = this.setRowList.reduce((res, item) => {
  829. res.push({
  830. surface: item.surface,
  831. label: item.label,
  832. name: item.name,
  833. checked: item.checked,
  834. width: item.width,
  835. fixed: item.fixed,
  836. });
  837. return res;
  838. }, []);
  839. }
  840. });
  841. },
  842. //保存列设置
  843. save() {
  844. this.showSetting = false;
  845. this.data = {
  846. tableName: "提箱",
  847. userId: Cookies.get("userName"),
  848. sysTableSetList: this.setRowList,
  849. };
  850. addSet(this.data).then((res) => {
  851. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  852. });
  853. },
  854. //开始拖拽事件
  855. onStart() {
  856. this.drag = true;
  857. },
  858. //拖拽结束事件
  859. onEnd() {
  860. this.drag = false;
  861. },
  862. /** 查询订单主列表 */
  863. getList() {
  864. this.loading = true;
  865. listFtmsorderbillscars(this.queryParams).then((response) => {
  866. response.rows.map((e) => {
  867. if (e.orderStatus == 10) {
  868. e.orderStatus = "车队安排";
  869. }
  870. if (e.orderStatus == 20) {
  871. e.orderStatus = "司机受理";
  872. }
  873. if (e.orderStatus == 30) {
  874. e.orderStatus = "司机出车";
  875. }
  876. if (e.orderStatus == 40) {
  877. e.orderStatus = "提箱";
  878. }
  879. if (e.orderStatus == 50) {
  880. e.orderStatus = "装卸货";
  881. }
  882. if (e.orderStatus == 60) {
  883. e.orderStatus = "还卸柜";
  884. }
  885. if (e.orderStatus == 70) {
  886. e.orderStatus = "费用确认";
  887. }
  888. if (e.orderStatus == 80) {
  889. e.orderStatus = "回单";
  890. }
  891. if (e.loadDate) {
  892. this.$set(e, "loadDate", e.loadDate.substring(0, 10));
  893. }
  894. if (e.acceptDate) {
  895. this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
  896. }
  897. if (e.mdLoadDate) {
  898. this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
  899. }
  900. if (e.unLoadDate) {
  901. this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
  902. }
  903. if (e.waybillDate) {
  904. e.waybillDate = e.waybillDate.substring(0, 10);
  905. }
  906. });
  907. this.ftmsorderbillscarsList = response.rows;
  908. this.total = response.total;
  909. this.loading = false;
  910. });
  911. },
  912. /** 新增按钮操作 */
  913. handleAdd() {
  914. this.reset();
  915. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  916. this.title = "添加订单主";
  917. },
  918. // 表单重置
  919. reset() {
  920. this.form = {
  921. id: null,
  922. billNo: null,
  923. actId: null,
  924. corpId: null,
  925. transUserName: null,
  926. planUserName: null,
  927. billType: null,
  928. transType: null,
  929. transProp: null,
  930. ifContracted: null,
  931. contractNo: null,
  932. refNo: null,
  933. accstlType: null,
  934. accdays: null,
  935. goodsId: null,
  936. goodsPrice: null,
  937. goodsLossType: null,
  938. goodsLossStd: null,
  939. mblno: null,
  940. ysl: null,
  941. voy: null,
  942. pol: null,
  943. pod: null,
  944. qtyPlan: null,
  945. qtyDisPatch: null,
  946. weightPlan: null,
  947. cntrDesc: null,
  948. carNoList: null,
  949. loadAddr: null,
  950. loadAttn: null,
  951. loadAttntel: null,
  952. loadDate: null,
  953. mdLoadAddr: null,
  954. mdLoadAttn: null,
  955. mdLoadAttnTel: null,
  956. mdLoadDate: null,
  957. unLoadAddr: null,
  958. unLoadAttn: null,
  959. unLoadAttnTel: null,
  960. unLoadDate: null,
  961. routeId: null,
  962. routeDesc: null,
  963. ifWaybill: null,
  964. ifNeedinvDr: null,
  965. postDate: null,
  966. billStatus: 0,
  967. delFlag: null,
  968. createBy: null,
  969. createTime: null,
  970. updateBy: null,
  971. updateTime: null,
  972. remarks: null,
  973. };
  974. this.disabled = false;
  975. this.resetForm("form");
  976. },
  977. // 多选框选中数据
  978. handleSelectionChange(selection) {
  979. this.ids = selection.map((item) => item.id);
  980. this.single = selection.length !== 1;
  981. this.multiple = !selection.length;
  982. },
  983. /** 修改按钮操作 */
  984. handleUpdate(row) {
  985. this.reset();
  986. const data = { id: row.id, billStatus: 1040 };
  987. selectDriverFtmsorderbillscars(data).then((response) => {
  988. if (response.data.cars.billType) {
  989. response.data.cars.billType = response.data.cars.billType.toString();
  990. }
  991. if (response.data.fees.length) {
  992. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  993. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  994. response.data.fees.map((e) => {
  995. if (e.fFeeunitid) {
  996. e.fFeeunitid = e.fFeeunitid.toString();
  997. }
  998. });
  999. } else {
  1000. this.DList = [];
  1001. this.CList = [];
  1002. }
  1003. if (response.data.cars.orderStatus >= 40) {
  1004. this.disabled = true;
  1005. }
  1006. this.title = "查看提箱";
  1007. this.form = response.data.cars;
  1008. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1009. });
  1010. },
  1011. // //获取到保存并复制
  1012. // getSave(data) {
  1013. // data.data.map((e) => {s
  1014. // if (e.cntrId != null) {
  1015. // return (e.cntrId = e.cntrId.toString());
  1016. // }
  1017. // });
  1018. // this.vehicleList = data.data;
  1019. // },
  1020. /** 删除按钮操作 */
  1021. handleDelete(row) {
  1022. const ids = row.id || this.ids;
  1023. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  1024. confirmButtonText: "确定",
  1025. cancelButtonText: "取消",
  1026. type: "warning",
  1027. })
  1028. .then(function () {
  1029. return delFtmsorderbills(ids);
  1030. })
  1031. .then(() => {
  1032. this.getList();
  1033. this.msgSuccess("删除成功");
  1034. });
  1035. },
  1036. /** 导出按钮操作 */
  1037. handleExport() {
  1038. const queryParams = this.queryParams;
  1039. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  1040. confirmButtonText: "确定",
  1041. cancelButtonText: "取消",
  1042. type: "warning",
  1043. })
  1044. .then(function () {
  1045. return exportFtmsorderbills(queryParams);
  1046. })
  1047. .then((response) => {
  1048. this.download(response.msg);
  1049. });
  1050. },
  1051. /** 搜索按钮操作 */
  1052. handleQuery() {
  1053. this.queryParams.pageNum = 1;
  1054. this.getList();
  1055. },
  1056. /** 重置按钮操作 */
  1057. resetQuery() {
  1058. this.resetForm("queryForm");
  1059. this.handleQuery();
  1060. },
  1061. // 监听 子组件弹窗关闭后触发,有子组件调用
  1062. showAddOrUpdate(data) {
  1063. if (data === "false") {
  1064. this.addOrUpdateVisible = false;
  1065. } else {
  1066. this.addOrUpdateVisible = true;
  1067. }
  1068. },
  1069. fixDisabled(data) {
  1070. if (data === "false") {
  1071. this.disabled = false;
  1072. }
  1073. },
  1074. },
  1075. };
  1076. </script>
  1077. <style lang="scss" scoped>
  1078. .tabSetting {
  1079. display: flex;
  1080. justify-content: flex-end;
  1081. }
  1082. .listStyle {
  1083. display: flex;
  1084. border-top: 1px solid #dcdfe6;
  1085. border-left: 1px solid #dcdfe6;
  1086. border-right: 1px solid #dcdfe6;
  1087. }
  1088. .listStyle:last-child {
  1089. border-bottom: 1px solid #dcdfe6;
  1090. }
  1091. .progress {
  1092. display: flex;
  1093. align-items: center;
  1094. padding: 2px;
  1095. background-color: rgba(0, 0, 0, 0.05);
  1096. height: 100%;
  1097. }
  1098. </style>