index.vue 25 KB

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