index.vue 26 KB

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