index.vue 27 KB

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