index.vue 25 KB

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