index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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="100"
  303. align="center"
  304. :show-overflow-tooltip="true"
  305. sortable
  306. fixed="left"
  307. >
  308. <template slot-scope="scope">
  309. <el-link :underline="false"
  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: "createTime",
  447. name: "制单日期",
  448. checked: 0,
  449. width: 100,
  450. },
  451. {
  452. surface: "3",
  453. label: "loadDate",
  454. name: "提箱日期",
  455. checked: 0,
  456. width: 100,
  457. },
  458. {
  459. surface: "4",
  460. label: "billType",
  461. name: "业务类型",
  462. checked: 0,
  463. width: 100,
  464. },
  465. {
  466. surface: "5",
  467. label: "transType",
  468. name: "运输方式",
  469. checked: 0,
  470. width: 100,
  471. },
  472. {
  473. surface: "6",
  474. label: "transProp",
  475. name: "运输性质",
  476. checked: 0,
  477. width: 100,
  478. },
  479. {
  480. surface: "8",
  481. label: "qtyPlan",
  482. name: "计划件数",
  483. checked: 0,
  484. width: 100,
  485. },
  486. {
  487. surface: "9",
  488. label: "loadAddr",
  489. name: "提箱地点",
  490. checked: 0,
  491. width: 100,
  492. },
  493. {
  494. surface: "10",
  495. label: "mdLoadAddr",
  496. name: "装卸货地点",
  497. checked: 0,
  498. width: 110,
  499. },
  500. {
  501. surface: "11",
  502. label: "unLoadAddr",
  503. name: "卸箱地点",
  504. checked: 0,
  505. width: 100,
  506. },
  507. {
  508. surface: "12",
  509. label: "cntrDesc",
  510. name: "箱型箱量",
  511. checked: 0,
  512. width: 100,
  513. },
  514. {
  515. surface: "13",
  516. label: "qtyDisPatch",
  517. name: "已安排箱量",
  518. checked: 0,
  519. width: 100,
  520. },
  521. {
  522. surface: "14",
  523. label: "billStatus",
  524. name: "状态",
  525. checked: 0,
  526. width: 100,
  527. },
  528. {
  529. surface: "15",
  530. label: "remarks",
  531. name: "备注",
  532. checked: 0,
  533. width: 100,
  534. },
  535. ],
  536. allCheck: false,
  537. title: "",
  538. form: {},
  539. planList: [],
  540. DList: [],
  541. CList: [],
  542. schedulingList: [],
  543. fMblnoOptions: [],
  544. goodsOptions: [],
  545. show: false,
  546. collapses: [],
  547. };
  548. },
  549. // 使用子组件
  550. components: {
  551. AddOrUpdate,
  552. draggable,
  553. },
  554. created() {
  555. this.setRowList = this.tableDate;
  556. this.getRowList = this.tableDate;
  557. this.getList();
  558. this.getDicts("data_billType").then((response) => {
  559. this.billTypeList = response.data;
  560. });
  561. this.getDicts("data_transType").then((response) => {
  562. this.transTypeList = response.data;
  563. });
  564. this.getDicts("data_transProp").then((response) => {
  565. this.transPropList = response.data;
  566. });
  567. listGoods().then((response) => {
  568. this.goodsOptions = response.rows;
  569. });
  570. listCorps().then((response) => {
  571. this.fMblnoOptions = response.rows;
  572. });
  573. this.getRow();
  574. },
  575. methods: {
  576. //列设置全选
  577. allChecked() {
  578. if (this.allCheck == true) {
  579. this.setRowList.map((e) => {
  580. return (e.checked = 0);
  581. });
  582. } else {
  583. this.setRowList.map((e) => {
  584. return (e.checked = 1);
  585. });
  586. }
  587. },
  588. //查询列数据
  589. getRow() {
  590. let that = this;
  591. this.data = {
  592. tableName: "业务调度",
  593. userId: Cookies.get("userName"),
  594. };
  595. select(this.data).then((res) => {
  596. if (res.data.length != 0) {
  597. this.getRowList = res.data.filter((e) => e.checked == 0);
  598. this.setRowList = res.data;
  599. this.setRowList = this.setRowList.reduce((res, item) => {
  600. res.push({
  601. surface: item.surface,
  602. label: item.label,
  603. name: item.name,
  604. checked: item.checked,
  605. width: item.width,
  606. fixed: item.fixed,
  607. });
  608. return res;
  609. }, []);
  610. }
  611. });
  612. },
  613. delRow() {
  614. this.data = {
  615. tableName: "业务调度",
  616. userId: Cookies.get("userName"),
  617. };
  618. resetModule(this.data).then((res) => {
  619. if (res.code == 200) {
  620. this.showSetting = false;
  621. this.setRowList = this.tableDate;
  622. this.getRowList = this.tableDate;
  623. }
  624. });
  625. },
  626. //保存列设置
  627. save() {
  628. this.showSetting = false;
  629. this.data = {
  630. tableName: "业务调度",
  631. userId: Cookies.get("userName"),
  632. sysTableSetList: this.setRowList,
  633. };
  634. addSet(this.data).then((res) => {
  635. if (res.code == 200) {
  636. this.showSetting = false;
  637. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  638. }
  639. });
  640. },
  641. //开始拖拽事件
  642. onStart() {
  643. this.drag = true;
  644. },
  645. //拖拽结束事件
  646. onEnd() {
  647. this.drag = false;
  648. },
  649. /** 查询订单主列表 */
  650. getList() {
  651. this.loading = true;
  652. // this.queryParams["billStatus"]="40"
  653. listFtmsorderbillscntrs(this.queryParams).then((response) => {
  654. response.rows.map((e) => {
  655. if (e.createTime) {
  656. e.createTime = e.createTime.substring(0, 10);
  657. }
  658. if (e.loadDate) {
  659. e.loadDate = e.loadDate.substring(0, 10);
  660. }
  661. if (e.billStatus == 1) {
  662. e.billStatus = "新建";
  663. }
  664. if (e.billStatus == 2) {
  665. e.billStatus = "计划暂存";
  666. }
  667. if (e.billStatus == 3) {
  668. e.billStatus = "计划撤销";
  669. }
  670. if (e.billStatus == 6) {
  671. e.billStatus = "计划提交";
  672. }
  673. if (e.billStatus == 20) {
  674. e.billStatus = "调度暂存";
  675. }
  676. if (e.billStatus == 30) {
  677. e.billStatus = "调度撤回";
  678. }
  679. if (e.billStatus == 60) {
  680. e.billStatus = "调度提交";
  681. }
  682. });
  683. this.ftmsorderbillsList = response.rows;
  684. this.total = response.total;
  685. this.loading = false;
  686. });
  687. },
  688. /** 新增按钮操作 */
  689. handleAdd() {
  690. this.reset();
  691. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  692. this.title = "添加订单主";
  693. },
  694. // 表单重置
  695. reset() {
  696. this.form = {
  697. id: null,
  698. billNo: null,
  699. actId: null,
  700. corpId: null,
  701. transUserName: null,
  702. planUserName: null,
  703. billType: null,
  704. transType: null,
  705. transProp: null,
  706. ifContracted: null,
  707. contractNo: null,
  708. refNo: null,
  709. accstlType: null,
  710. accdays: null,
  711. goodsId: null,
  712. goodsPrice: null,
  713. goodsLossType: null,
  714. goodsLossStd: null,
  715. mblno: null,
  716. ysl: null,
  717. voy: null,
  718. pol: null,
  719. pod: null,
  720. qtyPlan: null,
  721. qtyDisPatch: null,
  722. weightPlan: null,
  723. cntrDesc: null,
  724. carNoList: null,
  725. loadAddr: null,
  726. loadAttn: null,
  727. loadAttntel: null,
  728. loadDate: null,
  729. mdLoadAddr: null,
  730. mdLoadAttn: null,
  731. mdLoadAttnTel: null,
  732. mdLoadDate: null,
  733. unLoadAddr: null,
  734. unLoadAttn: null,
  735. unLoadAttnTel: null,
  736. unLoadDate: null,
  737. routeId: null,
  738. routeDesc: null,
  739. ifWaybill: null,
  740. ifNeedinvDr: null,
  741. postDate: null,
  742. billStatus: 0,
  743. delFlag: null,
  744. createBy: null,
  745. createTime: null,
  746. updateBy: null,
  747. updateTime: null,
  748. remarks: null,
  749. };
  750. this.resetForm("form");
  751. this.planList = [];
  752. this.DList = [];
  753. this.CList = [];
  754. this.schedulingList = [];
  755. this.disabled = false;
  756. this.disabled2 = false;
  757. this.collapses = ["1", "2"];
  758. this.relevantAttachments = [];
  759. },
  760. // 多选框选中数据
  761. handleSelectionChange(selection) {
  762. this.ids = selection.map((item) => item.id);
  763. this.single = selection.length !== 1;
  764. this.multiple = !selection.length;
  765. },
  766. /** 修改按钮操作 */
  767. handleUpdate(row) {
  768. this.reset();
  769. const id = row.id || this.ids;
  770. getFtmsorderbillsplans(id).then((response) => {
  771. if (response.data.tmsorder.billType) {
  772. response.data.tmsorder.billType = response.data.tmsorder.billType.toString();
  773. }
  774. // if (response.data.tmsorder.polId) {
  775. // response.data.tmsorder.polId = response.data.tmsorder.polId.toString();
  776. // }
  777. // if (response.data.tmsorder.podId) {
  778. // response.data.tmsorder.podId = response.data.tmsorder.podId.toString();
  779. // }
  780. if (response.data.scntrs.length != 0) {
  781. response.data.scntrs.map((e) => {
  782. if (e.cntrId) {
  783. e.cntrId = e.cntrId.toString();
  784. }
  785. if (e.priceType) {
  786. e.priceType = e.priceType.toString();
  787. }
  788. });
  789. }
  790. if (response.data.plans.length != 0) {
  791. response.data.plans.map((e) => {
  792. if (e.cntrId) {
  793. e.cntrId = e.cntrId.toString();
  794. }
  795. if (e.billStatus >= 6 || e.billStatus == 3) {
  796. e.disabled = true;
  797. }
  798. });
  799. }
  800. this.disabled = true;
  801. this.title = "查看订单";
  802. if (response.data.tmsorder.billStatus > 6) {
  803. this.disabled2 = true;
  804. }
  805. // this.$refs.addOrUpdateRef.showSure();
  806. this.form = response.data.tmsorder;
  807. this.planList = response.data.scntrs;
  808. if (response.data.fees.length) {
  809. response.data.fees.map((e) => {
  810. if (e.fFeeunitid) {
  811. return (e.fFeeunitid = e.fFeeunitid.toString());
  812. }
  813. });
  814. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  815. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  816. } else {
  817. this.DList = [];
  818. this.CList = [];
  819. }
  820. this.schedulingList = response.data.plans;
  821. this.relevantAttachments = response.data.attach;
  822. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  823. });
  824. },
  825. //获取到保存并复制
  826. getSave(data) {
  827. if (data.data.length != 0) {
  828. data.data.cntrId = data.data.map((e) => {
  829. if (e.cntrId) {
  830. e.cntrId = e.cntrId.toString();
  831. }
  832. if (e.billStatus == 6 || e.billStatus == 3) {
  833. e.disabled = true;
  834. }
  835. });
  836. }
  837. this.schedulingList = data.data;
  838. },
  839. getSave2(data) {
  840. if (data.length != 0) {
  841. data.map((e) => {
  842. if (e.cntrId) {
  843. e.cntrId = e.cntrId.toString();
  844. }
  845. if (e.priceType) {
  846. e.priceType = e.priceType.toString();
  847. }
  848. });
  849. }
  850. this.planList = data;
  851. },
  852. /** 导出按钮操作 */
  853. handleExport() {
  854. const queryParams = this.queryParams;
  855. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  856. confirmButtonText: "确定",
  857. cancelButtonText: "取消",
  858. type: "warning",
  859. })
  860. .then(function () {
  861. return exportFtmsorderbills(queryParams);
  862. })
  863. .then((response) => {
  864. this.download(response.msg);
  865. });
  866. },
  867. /** 搜索按钮操作 */
  868. handleQuery() {
  869. this.queryParams.pageNum = 1;
  870. this.getList();
  871. },
  872. /** 重置按钮操作 */
  873. resetQuery() {
  874. this.resetForm("queryForm");
  875. this.handleQuery();
  876. },
  877. // 监听 子组件弹窗关闭后触发,有子组件调用
  878. showAddOrUpdate(data) {
  879. if (data === "false") {
  880. this.addOrUpdateVisible = false;
  881. this.disabled = false;
  882. } else {
  883. this.addOrUpdateVisible = true;
  884. }
  885. },
  886. fixDisabled(data) {
  887. if (data === "false") {
  888. this.disabled = false;
  889. }
  890. },
  891. fixDisabled2(data) {
  892. if (data === "false") {
  893. this.disabled2 = false;
  894. }
  895. },
  896. },
  897. };
  898. </script>
  899. <style lang="scss" scoped>
  900. .tabSetting {
  901. display: flex;
  902. justify-content: flex-end;
  903. }
  904. .listStyle {
  905. display: flex;
  906. border-top: 1px solid #dcdfe6;
  907. border-left: 1px solid #dcdfe6;
  908. border-right: 1px solid #dcdfe6;
  909. }
  910. .listStyle:last-child {
  911. border-bottom: 1px solid #dcdfe6;
  912. }
  913. .progress {
  914. display: flex;
  915. align-items: center;
  916. padding: 2px;
  917. background-color: rgba(0, 0, 0, 0.05);
  918. height: 100%;
  919. }
  920. </style>