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