index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976
  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="planBillStatus"
  83. >
  84. <el-select
  85. v-model="queryParams.planBillStatus"
  86. placeholder="请选择状态"
  87. clearable
  88. size="small"
  89. >
  90. <el-option
  91. v-for="(dict, index) in planStatusOption"
  92. :key="index.id"
  93. :label="dict.name"
  94. :value="dict.id"
  95. />
  96. </el-select>
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="6">
  100. <el-form-item
  101. label-width="100px"
  102. label="运输性质"
  103. prop="transProp"
  104. >
  105. <el-select
  106. v-model="queryParams.transProp"
  107. placeholder="请选择运输性质"
  108. clearable
  109. size="small"
  110. >
  111. <el-option
  112. v-for="(dict, index) in transPropList"
  113. :key="index.dictValue"
  114. :label="dict.dictLabel"
  115. :value="dict.dictValue"
  116. />
  117. </el-select>
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="6">
  121. <el-form-item label-width="100px" label="货品名称" prop="goodsId">
  122. <el-select
  123. v-model="queryParams.goodsId"
  124. placeholder="请输入货品名称"
  125. clearable
  126. size="small"
  127. filterable
  128. >
  129. <el-option
  130. v-for="(dict, index) in goodsOptions"
  131. :key="index.fId"
  132. :label="dict.fName"
  133. :value="dict.fId"
  134. />
  135. </el-select>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="6">
  139. <el-form-item
  140. label-width="100px"
  141. label="提箱地点"
  142. prop="loadAddr"
  143. >
  144. <el-input
  145. v-model="queryParams.loadAddr"
  146. placeholder="请输入提箱地点"
  147. clearable
  148. size="small"
  149. @keyup.enter.native="handleQuery"
  150. style="max-width: 187px"
  151. />
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="6">
  155. <el-form-item
  156. label-width="100px"
  157. label="装卸货地点"
  158. prop="mdLoadAddr"
  159. >
  160. <el-input
  161. v-model="queryParams.mdLoadAddr"
  162. placeholder="请输入装卸货地点"
  163. clearable
  164. size="small"
  165. @keyup.enter.native="handleQuery"
  166. style="max-width: 187px"
  167. /> </el-form-item
  168. ></el-col>
  169. </el-row>
  170. <el-row>
  171. <el-col :span="6"
  172. ><el-form-item
  173. label-width="100px"
  174. label="卸箱地点"
  175. prop="unLoadAddr"
  176. >
  177. <el-input
  178. v-model="queryParams.unLoadAddr"
  179. placeholder="请输入卸箱地点"
  180. clearable
  181. size="small"
  182. @keyup.enter.native="handleQuery"
  183. style="max-width: 187px"
  184. /> </el-form-item
  185. ></el-col>
  186. </el-row>
  187. </div>
  188. </el-collapse-transition>
  189. </el-form>
  190. <el-row :gutter="10" class="mb8">
  191. <!-- <el-col :span="1.5">
  192. <el-button
  193. type="primary"
  194. icon="el-icon-plus"
  195. size="mini"
  196. @click="handleAdd"
  197. v-hasPermi="['fleet:plans:add']"
  198. >新增</el-button
  199. >
  200. </el-col> -->
  201. <el-col :span="1.5">
  202. <el-button
  203. type="success"
  204. icon="el-icon-edit"
  205. size="mini"
  206. :disabled="single"
  207. @click="handleUpdate"
  208. v-hasPermi="['fleet:plans:edit']"
  209. >修改</el-button
  210. >
  211. </el-col>
  212. <el-col :span="1.5">
  213. <el-button
  214. type="danger"
  215. icon="el-icon-delete"
  216. size="mini"
  217. :disabled="multiple"
  218. @click="handleDelete"
  219. v-hasPermi="['fleet:plans:remove']"
  220. >删除</el-button
  221. >
  222. </el-col>
  223. <el-col :span="1.5">
  224. <el-button
  225. type="warning"
  226. icon="el-icon-download"
  227. size="mini"
  228. @click="handleExport"
  229. v-hasPermi="['fleet:plans:export']"
  230. >导出</el-button
  231. >
  232. </el-col>
  233. <div class="tabSetting">
  234. <div style="margin-right: 20px">
  235. <el-button
  236. type="cyan"
  237. icon="el-icon-search"
  238. size="mini"
  239. @click="handleQuery"
  240. >搜索</el-button
  241. >
  242. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  243. >重置</el-button
  244. >
  245. <el-button
  246. v-show="show"
  247. @click="show = !show"
  248. icon="el-icon-arrow-up"
  249. size="mini"
  250. >展开</el-button
  251. >
  252. <el-button
  253. v-show="!show"
  254. @click="show = !show"
  255. icon="el-icon-arrow-down"
  256. size="mini"
  257. >展开</el-button
  258. >
  259. </div>
  260. <right-toolbar
  261. :showSearch.sync="showSearch"
  262. @queryTable="getList"
  263. ></right-toolbar>
  264. <div style="margin: 0 12px">
  265. <el-button
  266. icon="el-icon-setting"
  267. size="mini"
  268. circle
  269. @click="showSetting = !showSetting"
  270. ></el-button>
  271. </div>
  272. </div>
  273. </el-row>
  274. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  275. <div>配置排序列数据(拖动调整顺序)</div>
  276. <div style="margin-left: 17px">
  277. <el-checkbox
  278. v-model="allCheck"
  279. label="全选"
  280. @change="allChecked"
  281. ></el-checkbox>
  282. </div>
  283. <div style="padding: 4px; display: flex; justify-content: center">
  284. <draggable
  285. v-model="setRowList"
  286. group="site"
  287. animation="300"
  288. @start="onStart"
  289. @end="onEnd"
  290. handle=".indraggable"
  291. >
  292. <transition-group>
  293. <div
  294. v-for="item in setRowList"
  295. :key="item.surface"
  296. class="listStyle"
  297. >
  298. <div style="width: 500px" class="indraggable">
  299. <div class="progress" :style="{ width: item.width + 'px' }">
  300. <el-checkbox
  301. :label="item.name"
  302. v-model="item.checked"
  303. :true-label="0"
  304. :false-label="1"
  305. >{{ item.name }}
  306. </el-checkbox>
  307. </div>
  308. </div>
  309. <el-input-number
  310. v-model.number="item.width"
  311. controls-position="right"
  312. :min="1"
  313. :max="500"
  314. size="mini"
  315. ></el-input-number>
  316. </div>
  317. </transition-group>
  318. </draggable>
  319. </div>
  320. <span slot="footer" class="dialog-footer">
  321. <el-button @click="showSetting = false">取 消</el-button>
  322. <el-button @click="delRow" type="danger">重 置</el-button>
  323. <el-button type="primary" @click="save()">确 定</el-button>
  324. </span>
  325. </el-dialog>
  326. <el-table
  327. v-loading="loading"
  328. :data="ftmsorderbillsList"
  329. @selection-change="handleSelectionChange"
  330. >
  331. <el-table-column type="selection" width="55" align="center" />
  332. <el-table-column
  333. label="提单号"
  334. width="180"
  335. align="center"
  336. :show-overflow-tooltip="true"
  337. sortable
  338. fixed="left"
  339. >
  340. <template slot-scope="scope">
  341. <el-link :underline="false" type="primary"
  342. ><div @click="handleUpdate(scope.row)">
  343. {{ scope.row.mblno }}
  344. </div></el-link
  345. >
  346. </template>
  347. </el-table-column>
  348. <el-table-column
  349. v-for="(item, index) in getRowList"
  350. :key="index"
  351. :label="item.name"
  352. :width="item.width"
  353. :prop="item.label"
  354. align="center"
  355. :show-overflow-tooltip="true"
  356. sortable
  357. :fixed="item.fixed"
  358. />
  359. <el-table-column
  360. label="操作"
  361. align="center"
  362. class-name="small-padding fixed-width"
  363. fixed="right"
  364. width="150px"
  365. >
  366. <template slot-scope="scope">
  367. <el-button
  368. size="mini"
  369. type="text"
  370. icon="el-icon-edit"
  371. @click="handleUpdate(scope.row)"
  372. >查看</el-button
  373. >
  374. <!-- <el-button
  375. v-if="scope.row.billStatus != 6"
  376. size="mini"
  377. type="text"
  378. icon="el-icon-edit"
  379. @click="handleUpdate(scope.row)"
  380. v-hasPermi="['fleet:plans:edit']"
  381. >修改</el-button
  382. > -->
  383. <el-button
  384. size="mini"
  385. type="text"
  386. icon="el-icon-delete"
  387. @click="handleDelete(scope.row)"
  388. v-hasPermi="['fleet:plans:remove']"
  389. >删除</el-button
  390. >
  391. </template>
  392. </el-table-column>
  393. </el-table>
  394. <pagination
  395. v-show="total > 0"
  396. :total="total"
  397. :page.sync="queryParams.pageNum"
  398. :limit.sync="queryParams.pageSize"
  399. @pagination="getList"
  400. />
  401. <!-- 新增编辑弹框子组件 -->
  402. <add-or-update
  403. :addOrUpdateVisible="addOrUpdateVisible"
  404. :title="title"
  405. :form="form"
  406. :disabled="disabled"
  407. :disabled2="disabled2"
  408. :DList="DList"
  409. :CList="CList"
  410. :schedulingList="schedulingList"
  411. :vehicleList="vehicleList"
  412. :collapses="collapses"
  413. :relevantAttachments="relevantAttachments"
  414. @changeShow="showAddOrUpdate"
  415. @fixDisabled="fixDisabled"
  416. ref="addOrUpdateRef"
  417. ></add-or-update>
  418. </div>
  419. </template>
  420. <script>
  421. import AddOrUpdate from "./AddOrUpdate.vue";
  422. import {
  423. getFtmsorderbills,
  424. delFtmsorderbills,
  425. exportFtmsorderbills,
  426. } from "@/api/fleet/ftmsorderbills";
  427. import { listFtmsorderbillsplans } from "@/api/fleet/ftmsorderbillsplans";
  428. import { getFtmsorderbillscars } from "@/api/fleet/ftmsorderbillscars";
  429. import { listGoods } from "@/api/basicdata/goods";
  430. import { listCorps } from "@/api/basicdata/corps";
  431. import { addSet, select, resetModule } from "@/api/system/set";
  432. import Cookies from "js-cookie";
  433. import draggable from "vuedraggable";
  434. export default {
  435. name: "plans",
  436. data() {
  437. return {
  438. disabled: false,
  439. disabled2: false,
  440. // 控制新增编辑弹窗的显示与隐藏
  441. addOrUpdateVisible: false,
  442. // 非单个禁用
  443. single: true,
  444. // 非多个禁用
  445. multiple: true,
  446. // 显示搜索条件
  447. showSearch: true,
  448. // 订单主表格数据
  449. ftmsorderbillsList: [],
  450. relevantAttachments: [],
  451. // 总条数
  452. total: 0,
  453. // 查询参数
  454. queryParams: {
  455. pageNum: 1,
  456. pageSize: 10,
  457. corpId: null,
  458. billType: null,
  459. transType: null,
  460. transProp: null,
  461. goodsId: null,
  462. mblno: null,
  463. loadAddr: null,
  464. mdLoadAddr: null,
  465. unLoadAddr: null,
  466. planBillStatus: null,
  467. },
  468. billTypeList: [],
  469. transTypeList: [],
  470. transPropList: [],
  471. showSetting: false,
  472. drag: false,
  473. setRowList: [],
  474. getRowList: [],
  475. tableDate: [
  476. {
  477. surface: "1",
  478. label: "corpId",
  479. name: "客户名称",
  480. checked: 0,
  481. width: 100,
  482. },
  483. {
  484. surface: "2",
  485. label: "createTime",
  486. name: "制单日期",
  487. checked: 0,
  488. width: 100,
  489. },
  490. {
  491. surface: "3",
  492. label: "loadDate",
  493. name: "提箱日期",
  494. checked: 0,
  495. width: 100,
  496. },
  497. {
  498. surface: "4",
  499. label: "billType",
  500. name: "业务类型",
  501. checked: 0,
  502. width: 100,
  503. },
  504. {
  505. surface: "5",
  506. label: "transType",
  507. name: "运输方式",
  508. checked: 0,
  509. width: 100,
  510. },
  511. {
  512. surface: "6",
  513. label: "transProp",
  514. name: "运输性质",
  515. checked: 0,
  516. width: 100,
  517. },
  518. {
  519. surface: "8",
  520. label: "qtyPlan",
  521. name: "计划件数",
  522. checked: 0,
  523. width: 100,
  524. },
  525. {
  526. surface: "9",
  527. label: "loadAddr",
  528. name: "提箱地点",
  529. checked: 0,
  530. width: 100,
  531. },
  532. {
  533. surface: "10",
  534. label: "mdLoadAddr",
  535. name: "装卸货地点",
  536. checked: 0,
  537. width: 110,
  538. },
  539. {
  540. surface: "11",
  541. label: "unLoadAddr",
  542. name: "卸箱地点",
  543. checked: 0,
  544. width: 100,
  545. },
  546. {
  547. surface: "12",
  548. label: "carQty",
  549. name: "已安排箱量",
  550. checked: 0,
  551. width: 100,
  552. },
  553. {
  554. surface: "13",
  555. label: "cntrName",
  556. name: "箱型",
  557. checked: 0,
  558. width: 100,
  559. },
  560. {
  561. surface: "14",
  562. label: "carnolist",
  563. name: "车号",
  564. checked: 0,
  565. width: 100,
  566. },
  567. {
  568. surface: "15",
  569. label: "carcorPid",
  570. name: "车队名称",
  571. checked: 0,
  572. width: 100,
  573. },
  574. {
  575. surface: "16",
  576. label: "billStatus",
  577. name: "状态",
  578. checked: 0,
  579. width: 100,
  580. },
  581. {
  582. surface: "17",
  583. label: "remarks",
  584. name: "备注",
  585. checked: 0,
  586. width: 100,
  587. },
  588. {
  589. surface: "18",
  590. label: "cntrQty",
  591. name: "调度数量",
  592. checked: 0,
  593. width: 100,
  594. },
  595. ],
  596. allCheck: false,
  597. title: "",
  598. form: {},
  599. DList: [],
  600. CList: [],
  601. schedulingList: [],
  602. fMblnoOptions: [],
  603. goodsOptions: [],
  604. vehicleList: [],
  605. show: false,
  606. collapses: [],
  607. planStatusOption: [{
  608. id: 6,
  609. name: '待派车'
  610. }, {
  611. id: 20,
  612. name: '派车中'
  613. }, {
  614. id: 60,
  615. name: '派车完成'
  616. }]
  617. };
  618. },
  619. // 使用子组件
  620. components: {
  621. AddOrUpdate,
  622. draggable,
  623. },
  624. created() {
  625. this.setRowList = this.tableDate;
  626. this.getRowList = this.tableDate;
  627. this.getList();
  628. this.getDicts("data_billType").then((response) => {
  629. this.billTypeList = response.data;
  630. });
  631. this.getDicts("data_transType").then((response) => {
  632. this.transTypeList = response.data;
  633. });
  634. this.getDicts("data_transProp").then((response) => {
  635. this.transPropList = response.data;
  636. });
  637. listGoods().then((response) => {
  638. this.goodsOptions = response.rows;
  639. });
  640. listCorps().then((response) => {
  641. this.fMblnoOptions = response.rows;
  642. });
  643. this.getRow();
  644. console.log(window.location);
  645. },
  646. methods: {
  647. //列设置全选
  648. allChecked() {
  649. if (this.allCheck == true) {
  650. this.setRowList.map((e) => {
  651. return (e.checked = 0);
  652. });
  653. } else {
  654. this.setRowList.map((e) => {
  655. return (e.checked = 1);
  656. });
  657. }
  658. },
  659. //查询列数据
  660. getRow() {
  661. let that = this;
  662. this.data = {
  663. tableName: "车队派车",
  664. userId: Cookies.get("userName"),
  665. };
  666. select(this.data).then((res) => {
  667. if (res.data.length != 0) {
  668. this.getRowList = res.data.filter((e) => e.checked == 0);
  669. this.setRowList = res.data;
  670. this.setRowList = this.setRowList.reduce((res, item) => {
  671. res.push({
  672. surface: item.surface,
  673. label: item.label,
  674. name: item.name,
  675. checked: item.checked,
  676. width: item.width,
  677. fixed: item.fixed,
  678. });
  679. return res;
  680. }, []);
  681. }
  682. });
  683. },
  684. delRow() {
  685. this.data = {
  686. tableName: "车队派车",
  687. userId: Cookies.get("userName"),
  688. };
  689. resetModule(this.data).then((res) => {
  690. if (res.code == 200) {
  691. this.showSetting = false;
  692. this.setRowList = this.tableDate;
  693. this.getRowList = this.tableDate;
  694. }
  695. });
  696. },
  697. //保存列设置
  698. save() {
  699. console.log(this.setRowList);
  700. this.showSetting = false;
  701. this.data = {
  702. tableName: "车队派车",
  703. userId: Cookies.get("userName"),
  704. sysTableSetList: this.setRowList,
  705. };
  706. addSet(this.data).then((res) => {
  707. if (res.code == 200) {
  708. this.showSetting = false;
  709. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  710. }
  711. });
  712. },
  713. //开始拖拽事件
  714. onStart() {
  715. this.drag = true;
  716. },
  717. //拖拽结束事件
  718. onEnd() {
  719. this.drag = false;
  720. },
  721. /** 查询订单主列表 */
  722. getList() {
  723. this.loading = true;
  724. listFtmsorderbillsplans(this.queryParams).then((response) => {
  725. response.rows.map((e) => {
  726. if (e.createTime) {
  727. e.createTime = e.createTime.substring(0, 10);
  728. }
  729. if (e.loadDate) {
  730. e.loadDate = e.loadDate.substring(0, 10);
  731. }
  732. if (e.billStatus == 1) {
  733. e.billStatus = "新建";
  734. }
  735. if (e.billStatus == 2) {
  736. e.billStatus = "暂存";
  737. }
  738. if (e.billStatus == 3) {
  739. e.billStatus = "撤销";
  740. }
  741. if (e.billStatus == 6) {
  742. e.billStatus = "待派车";
  743. }
  744. if (e.billStatus == 20) {
  745. e.billStatus = "派车中";
  746. }
  747. if (e.billStatus == 30) {
  748. e.billStatus = "派车撤回";
  749. }
  750. if (e.billStatus == 60) {
  751. e.billStatus = "派车完成";
  752. }
  753. });
  754. this.ftmsorderbillsList = response.rows;
  755. this.total = response.total;
  756. this.loading = false;
  757. });
  758. },
  759. /** 新增按钮操作 */
  760. handleAdd() {
  761. this.reset();
  762. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  763. this.title = "添加订单主";
  764. },
  765. // 表单重置
  766. reset() {
  767. this.form = {
  768. id: null,
  769. billNo: null,
  770. actId: null,
  771. corpId: null,
  772. transUserName: null,
  773. planUserName: null,
  774. billType: null,
  775. transType: null,
  776. transProp: null,
  777. ifContracted: null,
  778. contractNo: null,
  779. refNo: null,
  780. accstlType: null,
  781. accdays: null,
  782. goodsId: null,
  783. goodsPrice: null,
  784. goodsLossType: null,
  785. goodsLossStd: null,
  786. mblno: null,
  787. ysl: null,
  788. voy: null,
  789. pol: null,
  790. pod: null,
  791. qtyPlan: null,
  792. qtyDisPatch: null,
  793. weightPlan: null,
  794. cntrDesc: null,
  795. carNoList: null,
  796. loadAddr: null,
  797. loadAttn: null,
  798. loadAttntel: null,
  799. loadDate: null,
  800. mdLoadAddr: null,
  801. mdLoadAttn: null,
  802. mdLoadAttnTel: null,
  803. mdLoadDate: null,
  804. unLoadAddr: null,
  805. unLoadAttn: null,
  806. unLoadAttnTel: null,
  807. unLoadDate: null,
  808. routeId: null,
  809. routeDesc: null,
  810. ifWaybill: null,
  811. ifNeedinvDr: null,
  812. postDate: null,
  813. billStatus: 0,
  814. delFlag: null,
  815. createBy: null,
  816. createTime: null,
  817. updateBy: null,
  818. updateTime: null,
  819. remarks: null,
  820. };
  821. this.resetForm("form");
  822. this.DList = [];
  823. this.CList = [];
  824. this.schedulingList = [];
  825. this.vehicleList = [];
  826. this.disabled = false;
  827. this.disabled2 = false;
  828. this.collapses = ["1", "2"];
  829. this.relevantAttachments = [];
  830. },
  831. // 多选框选中数据
  832. handleSelectionChange(selection) {
  833. this.ids = selection.map((item) => item.id);
  834. this.single = selection.length !== 1;
  835. this.multiple = !selection.length;
  836. },
  837. /** 修改按钮操作 */
  838. handleUpdate(row) {
  839. this.reset();
  840. const id = row.id || this.ids;
  841. getFtmsorderbillscars(id).then((response) => {
  842. if (response.data.tmsorder.billType) {
  843. response.data.tmsorder.billType = response.data.tmsorder.billType.toString();
  844. }
  845. if (response.data.plans.billStatus == 60) {
  846. this.disabled2 = true;
  847. }
  848. let arr = [];
  849. arr.push(response.data.plans);
  850. if (response.data.plans.billStatus == 60) {
  851. this.disabled = true;
  852. }
  853. this.title = "查看订单";
  854. this.form = response.data.tmsorder;
  855. if (response.data.fees.length) {
  856. response.data.fees.map((e) => {
  857. if (e.fFeeunitid) {
  858. e.fFeeunitid = e.fFeeunitid.toString();
  859. }
  860. });
  861. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  862. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  863. } else {
  864. this.DList = [];
  865. this.CList = [];
  866. }
  867. arr.map((e) => {
  868. if (e.cntrId) {
  869. e.cntrId = e.cntrId.toString();
  870. }
  871. });
  872. this.schedulingList = arr;
  873. if (response.data.cars.length != 0) {
  874. response.data.cars.map((e) => {
  875. if (e.cntrId) {
  876. e.cntrId = e.cntrId.toString();
  877. }
  878. });
  879. }
  880. this.vehicleList = response.data.cars;
  881. this.relevantAttachments = response.data.attachs;
  882. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  883. });
  884. },
  885. //获取到保存并复制
  886. getSave(data) {
  887. data.data.map((e) => {
  888. if (e.cntrId != null) {
  889. return (e.cntrId = e.cntrId.toString());
  890. }
  891. });
  892. this.vehicleList = data.data;
  893. },
  894. /** 删除按钮操作 */
  895. handleDelete(row) {
  896. const ids = row.id || this.ids;
  897. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  898. confirmButtonText: "确定",
  899. cancelButtonText: "取消",
  900. type: "warning",
  901. })
  902. .then(function () {
  903. return delFtmsorderbills(ids);
  904. })
  905. .then(() => {
  906. this.getList();
  907. this.msgSuccess("删除成功");
  908. });
  909. },
  910. /** 导出按钮操作 */
  911. handleExport() {
  912. const queryParams = this.queryParams;
  913. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  914. confirmButtonText: "确定",
  915. cancelButtonText: "取消",
  916. type: "warning",
  917. })
  918. .then(function () {
  919. return exportFtmsorderbills(queryParams);
  920. })
  921. .then((response) => {
  922. this.download(response.msg);
  923. });
  924. },
  925. /** 搜索按钮操作 */
  926. handleQuery() {
  927. this.queryParams.pageNum = 1;
  928. this.getList();
  929. },
  930. /** 重置按钮操作 */
  931. resetQuery() {
  932. this.resetForm("queryForm");
  933. this.handleQuery();
  934. },
  935. // 监听 子组件弹窗关闭后触发,有子组件调用
  936. showAddOrUpdate(data) {
  937. if (data === "false") {
  938. this.addOrUpdateVisible = false;
  939. this.disabled = false;
  940. } else {
  941. this.addOrUpdateVisible = true;
  942. }
  943. },
  944. fixDisabled(data) {
  945. if (data === "false") {
  946. this.disabled = false;
  947. }
  948. },
  949. },
  950. };
  951. </script>
  952. <style lang="scss" scoped>
  953. .tabSetting {
  954. display: flex;
  955. justify-content: flex-end;
  956. }
  957. .listStyle {
  958. display: flex;
  959. border-top: 1px solid #dcdfe6;
  960. border-left: 1px solid #dcdfe6;
  961. border-right: 1px solid #dcdfe6;
  962. }
  963. .listStyle:last-child {
  964. border-bottom: 1px solid #dcdfe6;
  965. }
  966. .progress {
  967. display: flex;
  968. align-items: center;
  969. padding: 2px;
  970. background-color: rgba(0, 0, 0, 0.05);
  971. height: 100%;
  972. }
  973. </style>