index.vue 25 KB

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