index.vue 26 KB

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