index.vue 25 KB

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