index.vue 28 KB

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