index.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  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="ftmsorderbillsList"
  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. <el-table-column
  323. label="操作"
  324. align="center"
  325. class-name="small-padding fixed-width"
  326. fixed="right"
  327. width="150px"
  328. >
  329. <template slot-scope="scope">
  330. <el-button
  331. size="mini"
  332. type="text"
  333. icon="el-icon-edit"
  334. @click="handleUpdate(scope.row)"
  335. >查看</el-button
  336. >
  337. <!-- <el-button
  338. v-if="scope.row.billStatus != 6"
  339. size="mini"
  340. type="text"
  341. icon="el-icon-edit"
  342. @click="handleUpdate(scope.row)"
  343. v-hasPermi="['fleet:plans:edit']"
  344. >修改</el-button
  345. > -->
  346. <el-button
  347. size="mini"
  348. type="text"
  349. icon="el-icon-delete"
  350. @click="handleDelete(scope.row)"
  351. v-hasPermi="['fleet:plans:remove']"
  352. >删除</el-button
  353. >
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. <pagination
  358. v-show="total > 0"
  359. :total="total"
  360. :page.sync="queryParams.pageNum"
  361. :limit.sync="queryParams.pageSize"
  362. @pagination="getList"
  363. />
  364. <!-- 新增编辑弹框子组件 -->
  365. <add-or-update
  366. v-if="addOrUpdateVisible"
  367. :title="title"
  368. :fname="form"
  369. ref="addOrUpdateRef"
  370. :disabled="disabled"
  371. ></add-or-update>
  372. </div>
  373. </template>
  374. <script>
  375. import AddOrUpdate from "./AddOrUpdate";
  376. import {
  377. getFtmsorderbills,
  378. delFtmsorderbills,
  379. exportFtmsorderbills,
  380. } from "@/api/fleet/ftmsorderbills";
  381. import { listFtmsorderbillsplans } from "@/api/track/singleCost";
  382. import { listGoods } from "@/api/basicdata/goods";
  383. import { listCorps } from "@/api/basicdata/corps";
  384. import { addSet, select } from "@/api/system/set";
  385. import Cookies from "js-cookie";
  386. import draggable from "vuedraggable";
  387. export default {
  388. name: "plans",
  389. data() {
  390. return {
  391. // 控制新增编辑弹窗的显示与隐藏
  392. addOrUpdateVisible: false,
  393. // 非单个禁用
  394. single: true,
  395. disabled: false,
  396. // 非多个禁用
  397. multiple: true,
  398. // 显示搜索条件
  399. showSearch: true,
  400. // 订单主表格数据
  401. ftmsorderbillsList: [],
  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: "driverName",
  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. surface: "21",
  564. label: "orderName",
  565. name: "状态",
  566. checked: 0,
  567. width: 100,
  568. },
  569. {
  570. surface: "22",
  571. label: "acceptDate",
  572. name: "接单日期",
  573. checked: 0,
  574. width: 100,
  575. },
  576. {
  577. surface: "23",
  578. label: "loadDate",
  579. name: "提箱日期",
  580. checked: 0,
  581. width: 100,
  582. },
  583. {
  584. surface: "24",
  585. label: "unLoadDate",
  586. name: "还柜日期",
  587. checked: 0,
  588. width: 100,
  589. },
  590. ],
  591. getRowList: [
  592. {
  593. surface: "1",
  594. label: "mdLoadDate",
  595. name: "装卸日期",
  596. checked: 0,
  597. width: 100,
  598. },
  599. {
  600. surface: "2",
  601. label: "billType",
  602. name: "贸易方式",
  603. checked: 0,
  604. width: 100,
  605. },
  606. {
  607. surface: "3",
  608. label: "transType",
  609. name: "运输方式",
  610. checked: 0,
  611. width: 100,
  612. },
  613. {
  614. surface: "4",
  615. label: "corpId",
  616. name: "托运人",
  617. checked: 0,
  618. width: 100,
  619. },
  620. {
  621. surface: "5",
  622. label: "ysl",
  623. name: "船名",
  624. checked: 0,
  625. width: 100,
  626. },
  627. {
  628. surface: "6",
  629. label: "voy",
  630. name: "航次",
  631. checked: 0,
  632. width: 100,
  633. },
  634. {
  635. surface: "7",
  636. label: "mblno",
  637. name: "提单号",
  638. checked: 0,
  639. width: 100,
  640. fixed: "left",
  641. },
  642. {
  643. surface: "8",
  644. label: "cntrQty",
  645. name: "柜量",
  646. checked: 0,
  647. width: 100,
  648. },
  649. {
  650. surface: "9",
  651. label: "cntrId",
  652. name: "柜型",
  653. checked: 0,
  654. width: 100,
  655. },
  656. {
  657. surface: "10",
  658. label: "goodsId",
  659. name: "品名",
  660. checked: 0,
  661. width: 100,
  662. },
  663. {
  664. surface: "11",
  665. label: "cntrWeight",
  666. name: "重量",
  667. checked: 0,
  668. width: 100,
  669. },
  670. {
  671. surface: "12",
  672. label: "polId",
  673. name: "起运港",
  674. checked: 0,
  675. width: 100,
  676. },
  677. {
  678. surface: "13",
  679. label: "podId",
  680. name: "目的港",
  681. checked: 0,
  682. width: 100,
  683. },
  684. {
  685. surface: "14",
  686. label: "loadAddr",
  687. name: "提箱场站",
  688. checked: 0,
  689. width: 100,
  690. },
  691. {
  692. surface: "15",
  693. label: "mdLoadAddr",
  694. name: "装货地",
  695. checked: 0,
  696. width: 100,
  697. },
  698. {
  699. surface: "16",
  700. label: "unLoadAddr",
  701. name: "卸货地",
  702. checked: 0,
  703. width: 100,
  704. },
  705. {
  706. surface: "17",
  707. label: "carregNo",
  708. name: "车号",
  709. checked: 0,
  710. width: 100,
  711. },
  712. {
  713. surface: "18",
  714. label: "driverName",
  715. name: "司机",
  716. checked: 0,
  717. width: 100,
  718. },
  719. {
  720. surface: "19",
  721. label: "orderNo",
  722. name: "运单号",
  723. checked: 0,
  724. width: 100,
  725. },
  726. {
  727. surface: "20",
  728. label: "driverTel",
  729. name: "司机电话",
  730. checked: 0,
  731. width: 100,
  732. },
  733. {
  734. surface: "21",
  735. label: "orderName",
  736. name: "状态",
  737. checked: 0,
  738. width: 100,
  739. },
  740. {
  741. surface: "22",
  742. label: "acceptDate",
  743. name: "接单日期",
  744. checked: 0,
  745. width: 100,
  746. },
  747. {
  748. surface: "23",
  749. label: "loadDate",
  750. name: "提箱日期",
  751. checked: 0,
  752. width: 100,
  753. },
  754. {
  755. surface: "24",
  756. label: "unLoadDate",
  757. name: "还柜日期",
  758. checked: 0,
  759. width: 100,
  760. },
  761. ],
  762. allCheck: false,
  763. title: "",
  764. form: {},
  765. goodsOptions: [],
  766. fMblnoOptions: [],
  767. transPropList: [],
  768. transTypeList: [],
  769. billTypeList: [],
  770. show: false,
  771. };
  772. },
  773. // 使用子组件
  774. components: {
  775. AddOrUpdate,
  776. draggable,
  777. },
  778. created() {
  779. this.getList();
  780. this.getDicts("data_billType").then((response) => {
  781. this.billTypeList = response.data;
  782. });
  783. this.getDicts("data_transType").then((response) => {
  784. this.transTypeList = response.data;
  785. });
  786. this.getDicts("data_transProp").then((response) => {
  787. this.transPropList = response.data;
  788. });
  789. listGoods().then((response) => {
  790. this.goodsOptions = response.rows;
  791. });
  792. listCorps().then((response) => {
  793. this.fMblnoOptions = response.rows;
  794. });
  795. this.getRow();
  796. },
  797. methods: {
  798. //列设置全选
  799. allChecked() {
  800. if (this.allCheck == true) {
  801. this.setRowList.map((e) => {
  802. return (e.checked = 0);
  803. });
  804. } else {
  805. this.setRowList.map((e) => {
  806. return (e.checked = 1);
  807. });
  808. }
  809. },
  810. //查询列数据
  811. getRow() {
  812. let that = this;
  813. this.data = {
  814. tableName: "单趟费用",
  815. userId: Cookies.get("userName"),
  816. };
  817. select(this.data).then((res) => {
  818. console.log(res);
  819. if (res.data.length != 0) {
  820. this.getRowList = res.data.filter((e) => e.checked == 0);
  821. this.setRowList = res.data;
  822. this.setRowList = this.setRowList.reduce((res, item) => {
  823. res.push({
  824. surface: item.surface,
  825. label: item.label,
  826. name: item.name,
  827. checked: item.checked,
  828. width: item.width,
  829. fixed: item.fixed,
  830. });
  831. return res;
  832. }, []);
  833. }
  834. });
  835. },
  836. //保存列设置
  837. save() {
  838. this.showSetting = false;
  839. this.data = {
  840. tableName: "单趟费用",
  841. userId: Cookies.get("userName"),
  842. sysTableSetList: this.setRowList,
  843. };
  844. addSet(this.data).then((res) => {
  845. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  846. });
  847. },
  848. //开始拖拽事件
  849. onStart() {
  850. this.drag = true;
  851. },
  852. //拖拽结束事件
  853. onEnd() {
  854. this.drag = false;
  855. },
  856. /** 查询订单主列表 */
  857. getList() {
  858. this.loading = true;
  859. listFtmsorderbillsplans(this.queryParams).then((response) => {
  860. this.ftmsorderbillsList = response.rows;
  861. this.total = response.total;
  862. this.loading = false;
  863. });
  864. },
  865. /** 新增按钮操作 */
  866. handleAdd() {
  867. this.reset();
  868. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  869. this.title = "添加订单主";
  870. },
  871. // 表单重置
  872. reset() {
  873. this.form = {
  874. id: null,
  875. billNo: null,
  876. actId: null,
  877. corpId: null,
  878. transUserName: null,
  879. planUserName: null,
  880. billType: null,
  881. transType: null,
  882. transProp: null,
  883. ifContracted: null,
  884. contractNo: null,
  885. refNo: null,
  886. accstlType: null,
  887. accdays: null,
  888. goodsId: null,
  889. goodsPrice: null,
  890. goodsLossType: null,
  891. goodsLossStd: null,
  892. mblno: null,
  893. ysl: null,
  894. voy: null,
  895. pol: null,
  896. pod: null,
  897. qtyPlan: null,
  898. qtyDisPatch: null,
  899. weightPlan: null,
  900. cntrDesc: null,
  901. carNoList: null,
  902. loadAddr: null,
  903. loadAttn: null,
  904. loadAttntel: null,
  905. loadDate: null,
  906. mdLoadAddr: null,
  907. mdLoadAttn: null,
  908. mdLoadAttnTel: null,
  909. mdLoadDate: null,
  910. unLoadAddr: null,
  911. unLoadAttn: null,
  912. unLoadAttnTel: null,
  913. unLoadDate: null,
  914. routeId: null,
  915. routeDesc: null,
  916. ifWaybill: null,
  917. ifNeedinvDr: null,
  918. postDate: null,
  919. billStatus: 0,
  920. delFlag: null,
  921. createBy: null,
  922. createTime: null,
  923. updateBy: null,
  924. updateTime: null,
  925. remarks: null,
  926. };
  927. this.disabled = false;
  928. this.resetForm("form");
  929. },
  930. // 多选框选中数据
  931. handleSelectionChange(selection) {
  932. this.ids = selection.map((item) => item.id);
  933. this.single = selection.length !== 1;
  934. this.multiple = !selection.length;
  935. },
  936. /** 修改按钮操作 */
  937. handleUpdate(row) {
  938. let id = row.id;
  939. this.reset();
  940. this.title = "查看订单";
  941. this.addOrUpdateVisible = true;
  942. this.form.id = id;
  943. this.$nextTick(() => {
  944. this.$refs.addOrUpdateRef.init();
  945. });
  946. },
  947. // //获取到保存并复制
  948. // getSave(data) {
  949. // data.data.map((e) => {
  950. // if (e.cntrId != null) {
  951. // return (e.cntrId = e.cntrId.toString());
  952. // }
  953. // });
  954. // this.vehicleList = data.data;
  955. // },
  956. /** 删除按钮操作 */
  957. handleDelete(row) {
  958. const ids = row.id || this.ids;
  959. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  960. confirmButtonText: "确定",
  961. cancelButtonText: "取消",
  962. type: "warning",
  963. })
  964. .then(function () {
  965. return delFtmsorderbills(ids);
  966. })
  967. .then(() => {
  968. this.getList();
  969. this.msgSuccess("删除成功");
  970. });
  971. },
  972. /** 导出按钮操作 */
  973. handleExport() {
  974. const queryParams = this.queryParams;
  975. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  976. confirmButtonText: "确定",
  977. cancelButtonText: "取消",
  978. type: "warning",
  979. })
  980. .then(function () {
  981. return exportFtmsorderbills(queryParams);
  982. })
  983. .then((response) => {
  984. this.download(response.msg);
  985. });
  986. },
  987. /** 搜索按钮操作 */
  988. handleQuery() {
  989. this.queryParams.pageNum = 1;
  990. this.getList();
  991. },
  992. /** 重置按钮操作 */
  993. resetQuery() {
  994. this.resetForm("queryForm");
  995. this.handleQuery();
  996. },
  997. // 监听 子组件弹窗关闭后触发,有子组件调用
  998. showAddOrUpdate(data) {
  999. if (data === "false") {
  1000. this.addOrUpdateVisible = false;
  1001. this.disabled = false;
  1002. } else {
  1003. this.addOrUpdateVisible = true;
  1004. }
  1005. },
  1006. },
  1007. };
  1008. </script>
  1009. <style lang="scss" scoped>
  1010. .tabSetting {
  1011. display: flex;
  1012. justify-content: flex-end;
  1013. }
  1014. .listStyle {
  1015. display: flex;
  1016. border-top: 1px solid #dcdfe6;
  1017. border-left: 1px solid #dcdfe6;
  1018. border-right: 1px solid #dcdfe6;
  1019. }
  1020. .listStyle:last-child {
  1021. border-bottom: 1px solid #dcdfe6;
  1022. }
  1023. .progress {
  1024. display: flex;
  1025. align-items: center;
  1026. padding: 2px;
  1027. background-color: rgba(0, 0, 0, 0.05);
  1028. height: 100%;
  1029. }
  1030. </style>