index.vue 25 KB

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