index.vue 25 KB

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