index.vue 27 KB

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