index.vue 25 KB

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