index.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015
  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="客户名称" prop="corpId">
  13. <el-select
  14. v-model="queryParams.corpId"
  15. placeholder="请输入客户名称"
  16. clearable
  17. size="small"
  18. filterable
  19. >
  20. <el-option
  21. v-for="(dict, index) in fMblnoOptions"
  22. :key="index.fId"
  23. :label="dict.fName"
  24. :value="dict.fId"
  25. />
  26. </el-select> </el-form-item
  27. ></el-col>
  28. <el-col :span="6">
  29. <el-form-item label-width="100px" label="业务类型" prop="billType">
  30. <el-select
  31. v-model="queryParams.billType"
  32. placeholder="请选择业务类型"
  33. clearable
  34. size="small"
  35. >
  36. <el-option
  37. v-for="(dict, index) in billTypeList"
  38. :key="index.dictValue"
  39. :label="dict.dictLabel"
  40. :value="dict.dictValue"
  41. />
  42. </el-select>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="6">
  46. <el-form-item label-width="100px" label="运输方式" prop="transType">
  47. <el-select
  48. v-model="queryParams.transType"
  49. placeholder="请选择运输方式"
  50. clearable
  51. size="small"
  52. >
  53. <el-option
  54. v-for="(dict, index) in transTypeList"
  55. :key="index.dictValue"
  56. :label="dict.dictLabel"
  57. :value="dict.dictValue"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="6">
  63. <el-form-item label-width="100px" label="运输性质" prop="transProp">
  64. <el-select
  65. v-model="queryParams.transProp"
  66. placeholder="请选择运输性质"
  67. clearable
  68. size="small"
  69. >
  70. <el-option
  71. v-for="(dict, index) in transPropList"
  72. :key="index.dictValue"
  73. :label="dict.dictLabel"
  74. :value="dict.dictValue"
  75. />
  76. </el-select>
  77. </el-form-item>
  78. </el-col>
  79. </el-row>
  80. <el-collapse-transition>
  81. <div v-show="show">
  82. <el-row>
  83. <el-col :span="6">
  84. <el-form-item label-width="100px" label="提单号" prop="mblno">
  85. <el-input
  86. v-model="queryParams.mblno"
  87. placeholder="请输入提单号"
  88. clearable
  89. size="small"
  90. @keyup.enter.native="handleQuery"
  91. style="max-width: 187px"
  92. />
  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. },
  470. {
  471. surface: "8",
  472. label: "cntrQty",
  473. name: "柜量",
  474. checked: 0,
  475. width: 100,
  476. },
  477. {
  478. surface: "9",
  479. label: "cntrId",
  480. name: "柜型",
  481. checked: 0,
  482. width: 100,
  483. },
  484. {
  485. surface: "10",
  486. label: "goodsId",
  487. name: "品名",
  488. checked: 0,
  489. width: 100,
  490. },
  491. {
  492. surface: "11",
  493. label: "cntrWeight",
  494. name: "重量",
  495. checked: 0,
  496. width: 100,
  497. },
  498. {
  499. surface: "12",
  500. label: "polId",
  501. name: "起运港",
  502. checked: 0,
  503. width: 100,
  504. },
  505. {
  506. surface: "13",
  507. label: "podId",
  508. name: "目的港",
  509. checked: 0,
  510. width: 100,
  511. },
  512. {
  513. surface: "14",
  514. label: "loadAddr",
  515. name: "提箱场站",
  516. checked: 0,
  517. width: 100,
  518. },
  519. {
  520. surface: "15",
  521. label: "mdLoadAddr",
  522. name: "装货地",
  523. checked: 0,
  524. width: 100,
  525. },
  526. {
  527. surface: "16",
  528. label: "unLoadAddr",
  529. name: "卸货地",
  530. checked: 0,
  531. width: 100,
  532. },
  533. {
  534. surface: "17",
  535. label: "carregNo",
  536. name: "车号",
  537. checked: 0,
  538. width: 100,
  539. },
  540. {
  541. surface: "18",
  542. label: "name",
  543. name: "司机",
  544. checked: 0,
  545. width: 100,
  546. },
  547. ],
  548. getRowList: [
  549. {
  550. surface: "1",
  551. label: "mdLoadDate",
  552. name: "装卸日期",
  553. checked: 0,
  554. width: 100,
  555. },
  556. {
  557. surface: "2",
  558. label: "billType",
  559. name: "贸易方式",
  560. checked: 0,
  561. width: 100,
  562. },
  563. {
  564. surface: "3",
  565. label: "transType",
  566. name: "运输方式",
  567. checked: 0,
  568. width: 100,
  569. },
  570. {
  571. surface: "4",
  572. label: "corpId",
  573. name: "托运人",
  574. checked: 0,
  575. width: 100,
  576. },
  577. {
  578. surface: "5",
  579. label: "ysl",
  580. name: "船名",
  581. checked: 0,
  582. width: 100,
  583. },
  584. {
  585. surface: "6",
  586. label: "voy",
  587. name: "航次",
  588. checked: 0,
  589. width: 100,
  590. },
  591. {
  592. surface: "7",
  593. label: "mblno",
  594. name: "运单号",
  595. checked: 0,
  596. width: 100,
  597. },
  598. {
  599. surface: "8",
  600. label: "cntrQty",
  601. name: "柜量",
  602. checked: 0,
  603. width: 100,
  604. },
  605. {
  606. surface: "9",
  607. label: "cntrId",
  608. name: "柜型",
  609. checked: 0,
  610. width: 100,
  611. },
  612. {
  613. surface: "10",
  614. label: "goodsId",
  615. name: "品名",
  616. checked: 0,
  617. width: 100,
  618. },
  619. {
  620. surface: "11",
  621. label: "cntrWeight",
  622. name: "重量",
  623. checked: 0,
  624. width: 100,
  625. },
  626. {
  627. surface: "12",
  628. label: "polId",
  629. name: "起运港",
  630. checked: 0,
  631. width: 100,
  632. },
  633. {
  634. surface: "13",
  635. label: "podId",
  636. name: "目的港",
  637. checked: 0,
  638. width: 100,
  639. },
  640. {
  641. surface: "14",
  642. label: "loadAddr",
  643. name: "提箱场站",
  644. checked: 0,
  645. width: 100,
  646. },
  647. {
  648. surface: "15",
  649. label: "mdLoadAddr",
  650. name: "装货地",
  651. checked: 0,
  652. width: 100,
  653. },
  654. {
  655. surface: "16",
  656. label: "unLoadAddr",
  657. name: "卸货地",
  658. checked: 0,
  659. width: 100,
  660. },
  661. {
  662. surface: "17",
  663. label: "carregNo",
  664. name: "车号",
  665. checked: 0,
  666. width: 100,
  667. },
  668. {
  669. surface: "18",
  670. label: "name",
  671. name: "司机",
  672. checked: 0,
  673. width: 100,
  674. },
  675. ],
  676. allCheck: false,
  677. title: "",
  678. form: {},
  679. DList: [],
  680. CList: [],
  681. disabled: false,
  682. goodsOptions: [],
  683. fMblnoOptions: [],
  684. transPropList: [],
  685. transTypeList: [],
  686. billTypeList: [],
  687. show: false,
  688. };
  689. },
  690. // 使用子组件
  691. components: {
  692. AddOrUpdate,
  693. draggable,
  694. },
  695. created() {
  696. this.getList();
  697. this.getDicts("data_billType").then((response) => {
  698. this.billTypeList = response.data;
  699. });
  700. this.getDicts("data_transType").then((response) => {
  701. this.transTypeList = response.data;
  702. });
  703. this.getDicts("data_transProp").then((response) => {
  704. this.transPropList = response.data;
  705. });
  706. listGoods().then((response) => {
  707. this.goodsOptions = response.rows;
  708. });
  709. listCorps().then((response) => {
  710. this.fMblnoOptions = response.rows;
  711. });
  712. this.getRow();
  713. },
  714. methods: {
  715. //列设置全选
  716. allChecked() {
  717. if (this.allCheck == true) {
  718. this.setRowList.map((e) => {
  719. return (e.checked = 0);
  720. });
  721. } else {
  722. this.setRowList.map((e) => {
  723. return (e.checked = 1);
  724. });
  725. }
  726. },
  727. //查询列数据
  728. getRow() {
  729. let that = this;
  730. this.data = {
  731. tableName: "回单",
  732. userId: Cookies.get("userName"),
  733. };
  734. select(this.data).then((res) => {
  735. if (res.data.length != 0) {
  736. this.getRowList = res.data.filter((e) => e.checked == 0);
  737. this.setRowList = res.data;
  738. this.setRowList = this.setRowList.reduce((res, item) => {
  739. res.push({
  740. surface: item.surface,
  741. label: item.label,
  742. name: item.name,
  743. checked: item.checked,
  744. width: item.width,
  745. });
  746. return res;
  747. }, []);
  748. }
  749. });
  750. },
  751. //保存列设置
  752. save() {
  753. this.showSetting = false;
  754. this.data = {
  755. tableName: "回单",
  756. userId: Cookies.get("userName"),
  757. sysTableSetList: this.setRowList,
  758. };
  759. addSet(this.data).then((res) => {
  760. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  761. });
  762. },
  763. //开始拖拽事件
  764. onStart() {
  765. this.drag = true;
  766. },
  767. //拖拽结束事件
  768. onEnd() {
  769. this.drag = false;
  770. },
  771. /** 查询订单主列表 */
  772. getList() {
  773. this.loading = true;
  774. listFtmsorderbillscars(this.queryParams).then((response) => {
  775. response.rows.map((e) => {
  776. if (e.orderStatus == 10) {
  777. e.orderStatus = "车队安排";
  778. }
  779. if (e.orderStatus == 20) {
  780. e.orderStatus = "司机受理";
  781. }
  782. if (e.orderStatus == 30) {
  783. e.orderStatus = "司机出车";
  784. }
  785. if (e.orderStatus == 40) {
  786. e.orderStatus = "提箱";
  787. }
  788. if (e.orderStatus == 50) {
  789. e.orderStatus = "装卸货";
  790. }
  791. if (e.orderStatus == 60) {
  792. e.orderStatus = "还卸柜";
  793. }
  794. if (e.orderStatus == 70) {
  795. e.orderStatus = "费用确认";
  796. }
  797. if (e.orderStatus == 80) {
  798. e.orderStatus = "回单";
  799. }
  800. if (e.loadDate) {
  801. this.$set(e, "loadDate", e.loadDate.substring(0, 10));
  802. }
  803. if (e.acceptDate) {
  804. this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
  805. }
  806. if (e.mdLoadDate) {
  807. this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
  808. }
  809. if (e.unLoadDate) {
  810. this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
  811. }
  812. if (e.waybillDate) {
  813. e.waybillDate = e.waybillDate.substring(0, 10);
  814. }
  815. });
  816. this.ftmsorderbillscarsList = response.rows;
  817. this.total = response.total;
  818. this.loading = false;
  819. });
  820. },
  821. /** 新增按钮操作 */
  822. handleAdd() {
  823. this.reset();
  824. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  825. this.title = "添加订单主";
  826. },
  827. // 表单重置
  828. reset() {
  829. this.form = {
  830. id: null,
  831. billNo: null,
  832. actId: null,
  833. corpId: null,
  834. transUserName: null,
  835. planUserName: null,
  836. billType: null,
  837. transType: null,
  838. transProp: null,
  839. ifContracted: null,
  840. contractNo: null,
  841. refNo: null,
  842. accstlType: null,
  843. accdays: null,
  844. goodsId: null,
  845. goodsPrice: null,
  846. goodsLossType: null,
  847. goodsLossStd: null,
  848. mblno: null,
  849. ysl: null,
  850. voy: null,
  851. pol: null,
  852. pod: null,
  853. qtyPlan: null,
  854. qtyDisPatch: null,
  855. weightPlan: null,
  856. cntrDesc: null,
  857. carNoList: null,
  858. loadAddr: null,
  859. loadAttn: null,
  860. loadAttntel: null,
  861. loadDate: null,
  862. mdLoadAddr: null,
  863. mdLoadAttn: null,
  864. mdLoadAttnTel: null,
  865. mdLoadDate: null,
  866. unLoadAddr: null,
  867. unLoadAttn: null,
  868. unLoadAttnTel: null,
  869. unLoadDate: null,
  870. routeId: null,
  871. routeDesc: null,
  872. ifWaybill: null,
  873. ifNeedinvDr: null,
  874. postDate: null,
  875. billStatus: 0,
  876. delFlag: null,
  877. createBy: null,
  878. createTime: null,
  879. updateBy: null,
  880. updateTime: null,
  881. remarks: null,
  882. };
  883. this.resetForm("form");
  884. },
  885. // 多选框选中数据
  886. handleSelectionChange(selection) {
  887. this.ids = selection.map((item) => item.id);
  888. this.single = selection.length !== 1;
  889. this.multiple = !selection.length;
  890. },
  891. /** 修改按钮操作 */
  892. handleUpdate(row) {
  893. this.reset();
  894. const data = { id: row.id, billStatus: 1070 };
  895. selectDriverFtmsorderbillscars(data).then((response) => {
  896. if (response.data.cars.billType) {
  897. response.data.cars.billType = response.data.cars.billType.toString();
  898. }
  899. if (response.data.cars.polId) {
  900. response.data.cars.polId = response.data.cars.polId.toString();
  901. }
  902. if (response.data.cars.podId) {
  903. response.data.cars.podId = response.data.cars.podId.toString();
  904. }
  905. if (response.data.fees.length) {
  906. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  907. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  908. response.data.fees.map((e) => {
  909. if (e.fFeeunitid) {
  910. e.fFeeunitid = e.fFeeunitid.toString();
  911. }
  912. });
  913. } else {
  914. this.DList = [];
  915. this.CList = [];
  916. }
  917. if (response.data.cars.orderStatus >= 80) {
  918. this.disabled = true;
  919. }
  920. this.title = "查看回单";
  921. this.form = response.data.cars;
  922. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  923. });
  924. },
  925. // //获取到保存并复制
  926. // getSave(data) {
  927. // data.data.map((e) => {s
  928. // if (e.cntrId != null) {
  929. // return (e.cntrId = e.cntrId.toString());
  930. // }
  931. // });
  932. // this.vehicleList = data.data;
  933. // },
  934. /** 删除按钮操作 */
  935. handleDelete(row) {
  936. const ids = row.id || this.ids;
  937. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  938. confirmButtonText: "确定",
  939. cancelButtonText: "取消",
  940. type: "warning",
  941. })
  942. .then(function () {
  943. return delFtmsorderbills(ids);
  944. })
  945. .then(() => {
  946. this.getList();
  947. this.msgSuccess("删除成功");
  948. });
  949. },
  950. /** 导出按钮操作 */
  951. handleExport() {
  952. const queryParams = this.queryParams;
  953. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  954. confirmButtonText: "确定",
  955. cancelButtonText: "取消",
  956. type: "warning",
  957. })
  958. .then(function () {
  959. return exportFtmsorderbills(queryParams);
  960. })
  961. .then((response) => {
  962. this.download(response.msg);
  963. });
  964. },
  965. /** 搜索按钮操作 */
  966. handleQuery() {
  967. this.queryParams.pageNum = 1;
  968. this.getList();
  969. },
  970. /** 重置按钮操作 */
  971. resetQuery() {
  972. this.resetForm("queryForm");
  973. this.handleQuery();
  974. },
  975. // 监听 子组件弹窗关闭后触发,有子组件调用
  976. showAddOrUpdate(data) {
  977. if (data === "false") {
  978. this.addOrUpdateVisible = false;
  979. } else {
  980. this.addOrUpdateVisible = true;
  981. }
  982. },
  983. fixDisabled(data) {
  984. if (data === "false") {
  985. this.disabled = false;
  986. }
  987. },
  988. },
  989. };
  990. </script>
  991. <style lang="scss" scoped>
  992. .tabSetting {
  993. display: flex;
  994. justify-content: flex-end;
  995. }
  996. .listStyle {
  997. display: flex;
  998. border-top: 1px solid #dcdfe6;
  999. border-left: 1px solid #dcdfe6;
  1000. border-right: 1px solid #dcdfe6;
  1001. }
  1002. .listStyle:last-child {
  1003. border-bottom: 1px solid #dcdfe6;
  1004. }
  1005. .progress {
  1006. display: flex;
  1007. align-items: center;
  1008. padding: 2px;
  1009. background-color: rgba(0, 0, 0, 0.05);
  1010. height: 100%;
  1011. }
  1012. </style>