index.vue 27 KB

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