index.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268
  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="single"
  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-button
  245. icon="el-icon-setting"
  246. size="mini"
  247. circle
  248. @click="showSetting = !showSetting"
  249. ></el-button>
  250. </div>
  251. </div>
  252. </el-row>
  253. <el-dialog title="提示" :visible.sync="showSetting" width="700px">
  254. <div>配置排序列数据(拖动调整顺序)</div>
  255. <div style="margin-left: 17px">
  256. <el-checkbox
  257. v-model="allCheck"
  258. label="全选"
  259. @change="allChecked"
  260. ></el-checkbox>
  261. </div>
  262. <div style="padding: 4px; display: flex; justify-content: center">
  263. <draggable
  264. v-model="setRowList"
  265. group="site"
  266. animation="300"
  267. @start="onStart"
  268. @end="onEnd"
  269. handle=".indraggable"
  270. >
  271. <transition-group>
  272. <div
  273. v-for="item in setRowList"
  274. :key="item.surface"
  275. class="listStyle"
  276. >
  277. <div style="width: 500px" class="indraggable">
  278. <div class="progress" :style="{ width: item.width + 'px' }">
  279. <el-checkbox
  280. :label="item.name"
  281. v-model="item.checked"
  282. :true-label="0"
  283. :false-label="1"
  284. >{{ item.name }}
  285. </el-checkbox>
  286. </div>
  287. </div>
  288. <el-input-number
  289. v-model.number="item.width"
  290. controls-position="right"
  291. :min="1"
  292. :max="500"
  293. size="mini"
  294. ></el-input-number>
  295. </div>
  296. </transition-group>
  297. </draggable>
  298. </div>
  299. <span slot="footer" class="dialog-footer">
  300. <el-button @click="showSetting = false">取 消</el-button>
  301. <el-button type="primary" @click="save()">确 定</el-button>
  302. </span>
  303. </el-dialog>
  304. <el-table
  305. v-loading="loading"
  306. :data="ftmsorderbillscarsList"
  307. @selection-change="handleSelectionChange"
  308. >
  309. <el-table-column type="selection" width="55" align="center" />
  310. <el-table-column
  311. v-for="(item, index) in getRowList"
  312. :key="index"
  313. :label="item.name"
  314. :width="item.width"
  315. :prop="item.label"
  316. align="center"
  317. :show-overflow-tooltip="true"
  318. sortable
  319. :fixed="item.fixed"
  320. />
  321. <el-table-column
  322. label="操作"
  323. align="center"
  324. class-name="small-padding fixed-width"
  325. fixed="right"
  326. width="150px"
  327. >
  328. <template slot-scope="scope">
  329. <el-button
  330. size="mini"
  331. type="text"
  332. icon="el-icon-edit"
  333. @click="handleUpdate(scope.row)"
  334. >查看</el-button
  335. >
  336. <!-- <el-button
  337. v-if="scope.row.billStatus != 6"
  338. size="mini"
  339. type="text"
  340. icon="el-icon-edit"
  341. @click="handleUpdate(scope.row)"
  342. v-hasPermi="['fleet:plans:edit']"
  343. >修改</el-button
  344. > -->
  345. <el-button
  346. size="mini"
  347. type="text"
  348. icon="el-icon-delete"
  349. @click="handleDelete(scope.row)"
  350. v-hasPermi="['fleet:plans:remove']"
  351. >删除</el-button
  352. >
  353. </template>
  354. </el-table-column>
  355. </el-table>
  356. <pagination
  357. v-show="total > 0"
  358. :total="total"
  359. :page.sync="queryParams.pageNum"
  360. :limit.sync="queryParams.pageSize"
  361. @pagination="getList"
  362. />
  363. <!-- 新增编辑弹框子组件 -->
  364. <add-or-update
  365. :addOrUpdateVisible="addOrUpdateVisible"
  366. :title="title"
  367. :form="form"
  368. :DList="DList"
  369. :CList="CList"
  370. :disabled="disabled"
  371. @changeShow="showAddOrUpdate"
  372. @fixDisabled="fixDisabled"
  373. ref="addOrUpdateRef"
  374. ></add-or-update>
  375. </div>
  376. </template>
  377. <script>
  378. import AddOrUpdate from "./AddOrUpdate.vue";
  379. import {
  380. delFtmsorderbills,
  381. exportFtmsorderbills,
  382. } from "@/api/fleet/ftmsorderbills";
  383. import {
  384. listFtmsorderbillscars,
  385. selectDriverFtmsorderbillscars,
  386. } from "@/api/fleet/ftmsorderbillscars";
  387. import { listGoods } from "@/api/basicdata/goods";
  388. import { listCorps } from "@/api/basicdata/corps";
  389. import { addSet, select } from "@/api/system/set";
  390. import Cookies from "js-cookie";
  391. import draggable from "vuedraggable";
  392. export default {
  393. name: "plans",
  394. data() {
  395. return {
  396. // 控制新增编辑弹窗的显示与隐藏
  397. addOrUpdateVisible: false,
  398. // 非单个禁用
  399. single: true,
  400. // 非多个禁用
  401. multiple: true,
  402. // 显示搜索条件
  403. showSearch: true,
  404. // 订单主表格数据
  405. ftmsorderbillscarsList: [],
  406. // 总条数
  407. total: 0,
  408. // 查询参数
  409. queryParams: {
  410. pageNum: 1,
  411. pageSize: 10,
  412. corpId: null,
  413. billType: null,
  414. transType: null,
  415. transProp: null,
  416. goodsId: null,
  417. mblno: null,
  418. loadAddr: null,
  419. mdLoadAddr: null,
  420. unLoadAddr: null,
  421. },
  422. showSetting: false,
  423. drag: false,
  424. setRowList: [
  425. {
  426. surface: "1",
  427. label: "mdLoadDate",
  428. name: "装卸日期",
  429. checked: 0,
  430. width: 100,
  431. },
  432. {
  433. surface: "2",
  434. label: "billType",
  435. name: "贸易方式",
  436. checked: 0,
  437. width: 100,
  438. },
  439. {
  440. surface: "3",
  441. label: "transType",
  442. name: "运输方式",
  443. checked: 0,
  444. width: 100,
  445. },
  446. {
  447. surface: "4",
  448. label: "corpId",
  449. name: "托运人",
  450. checked: 0,
  451. width: 100,
  452. },
  453. {
  454. surface: "5",
  455. label: "ysl",
  456. name: "船名",
  457. checked: 0,
  458. width: 100,
  459. },
  460. {
  461. surface: "6",
  462. label: "voy",
  463. name: "航次",
  464. checked: 0,
  465. width: 100,
  466. },
  467. {
  468. surface: "7",
  469. label: "mblno",
  470. name: "提单号",
  471. checked: 0,
  472. width: 100,
  473. fixed: "left",
  474. },
  475. {
  476. surface: "8",
  477. label: "cntrQty",
  478. name: "柜量",
  479. checked: 0,
  480. width: 100,
  481. },
  482. {
  483. surface: "9",
  484. label: "cntrId",
  485. name: "柜型",
  486. checked: 0,
  487. width: 100,
  488. },
  489. {
  490. surface: "10",
  491. label: "goodsId",
  492. name: "品名",
  493. checked: 0,
  494. width: 100,
  495. },
  496. {
  497. surface: "11",
  498. label: "cntrWeight",
  499. name: "重量",
  500. checked: 0,
  501. width: 100,
  502. },
  503. {
  504. surface: "12",
  505. label: "polId",
  506. name: "起运港",
  507. checked: 0,
  508. width: 100,
  509. },
  510. {
  511. surface: "13",
  512. label: "podId",
  513. name: "目的港",
  514. checked: 0,
  515. width: 100,
  516. },
  517. {
  518. surface: "14",
  519. label: "loadAddr",
  520. name: "提箱场站",
  521. checked: 0,
  522. width: 100,
  523. },
  524. {
  525. surface: "15",
  526. label: "mdLoadAddr",
  527. name: "装货地",
  528. checked: 0,
  529. width: 100,
  530. },
  531. {
  532. surface: "16",
  533. label: "unLoadAddr",
  534. name: "卸货地",
  535. checked: 0,
  536. width: 100,
  537. },
  538. {
  539. surface: "17",
  540. label: "carregNo",
  541. name: "车号",
  542. checked: 0,
  543. width: 100,
  544. },
  545. {
  546. surface: "18",
  547. label: "name",
  548. name: "司机",
  549. checked: 0,
  550. width: 100,
  551. },
  552. {
  553. surface: "19",
  554. label: "orderNo",
  555. name: "运单号",
  556. checked: 0,
  557. width: 100,
  558. },
  559. {
  560. surface: "20",
  561. label: "driverTel",
  562. name: "司机电话",
  563. checked: 0,
  564. width: 100,
  565. },
  566. {
  567. surface: "21",
  568. label: "orderName",
  569. name: "状态",
  570. checked: 0,
  571. width: 100,
  572. },
  573. {
  574. surface: "22",
  575. label: "acceptDate",
  576. name: "接单日期",
  577. checked: 0,
  578. width: 100,
  579. },
  580. {
  581. surface: "23",
  582. label: "loadDate",
  583. name: "提箱日期",
  584. checked: 0,
  585. width: 100,
  586. },
  587. {
  588. surface: "24",
  589. label: "unLoadDate",
  590. name: "还柜日期",
  591. checked: 0,
  592. width: 100,
  593. },
  594. {
  595. surface: "25",
  596. label: "oilAmt",
  597. name: "油气费",
  598. checked: 0,
  599. width: 100,
  600. },
  601. {
  602. surface: "26",
  603. label: "driverbonus",
  604. name: "单趟提成",
  605. checked: 0,
  606. width: 100,
  607. },
  608. {
  609. surface: "27",
  610. label: "costOth",
  611. name: "其他费用",
  612. checked: 0,
  613. width: 100,
  614. },
  615. {
  616. surface: "28",
  617. label: "costRemarks",
  618. name: "备注",
  619. checked: 0,
  620. width: 100,
  621. },
  622. {
  623. surface: "29",
  624. label: "costomAmt05",
  625. name: "港杂费",
  626. checked: 0,
  627. width: 100,
  628. },
  629. {
  630. surface: "30",
  631. label: "costomAmt06",
  632. name: "提箱费",
  633. checked: 0,
  634. width: 100,
  635. },
  636. {
  637. surface: "31",
  638. label: "costomAmt03",
  639. name: "修洗费",
  640. checked: 0,
  641. width: 100,
  642. },
  643. {
  644. surface: "32",
  645. label: "costomAmt04",
  646. name: "吊装费",
  647. checked: 0,
  648. width: 100,
  649. },
  650. {
  651. surface: "33",
  652. label: "costomAmt01",
  653. name: "出口其他费用",
  654. checked: 0,
  655. width: 100,
  656. },
  657. {
  658. surface: "34",
  659. label: "costomStr01",
  660. name: "出口费用备注",
  661. checked: 0,
  662. width: 100,
  663. },
  664. {
  665. surface: "35",
  666. label: "costomAmt02",
  667. name: "进口其他费用",
  668. checked: 0,
  669. width: 100,
  670. },
  671. {
  672. surface: "36",
  673. label: "costomStr02",
  674. name: "进口费用备注",
  675. checked: 0,
  676. width: 100,
  677. },
  678. ],
  679. getRowList: [
  680. {
  681. surface: "1",
  682. label: "mdLoadDate",
  683. name: "装卸日期",
  684. checked: 0,
  685. width: 100,
  686. },
  687. {
  688. surface: "2",
  689. label: "billType",
  690. name: "贸易方式",
  691. checked: 0,
  692. width: 100,
  693. },
  694. {
  695. surface: "3",
  696. label: "transType",
  697. name: "运输方式",
  698. checked: 0,
  699. width: 100,
  700. },
  701. {
  702. surface: "4",
  703. label: "corpId",
  704. name: "托运人",
  705. checked: 0,
  706. width: 100,
  707. },
  708. {
  709. surface: "5",
  710. label: "ysl",
  711. name: "船名",
  712. checked: 0,
  713. width: 100,
  714. },
  715. {
  716. surface: "6",
  717. label: "voy",
  718. name: "航次",
  719. checked: 0,
  720. width: 100,
  721. },
  722. {
  723. surface: "7",
  724. label: "mblno",
  725. name: "提单号",
  726. checked: 0,
  727. width: 100,
  728. fixed: "left",
  729. },
  730. {
  731. surface: "8",
  732. label: "cntrQty",
  733. name: "柜量",
  734. checked: 0,
  735. width: 100,
  736. },
  737. {
  738. surface: "9",
  739. label: "cntrId",
  740. name: "柜型",
  741. checked: 0,
  742. width: 100,
  743. },
  744. {
  745. surface: "10",
  746. label: "goodsId",
  747. name: "品名",
  748. checked: 0,
  749. width: 100,
  750. },
  751. {
  752. surface: "11",
  753. label: "cntrWeight",
  754. name: "重量",
  755. checked: 0,
  756. width: 100,
  757. },
  758. {
  759. surface: "12",
  760. label: "polId",
  761. name: "起运港",
  762. checked: 0,
  763. width: 100,
  764. },
  765. {
  766. surface: "13",
  767. label: "podId",
  768. name: "目的港",
  769. checked: 0,
  770. width: 100,
  771. },
  772. {
  773. surface: "14",
  774. label: "loadAddr",
  775. name: "提箱场站",
  776. checked: 0,
  777. width: 100,
  778. },
  779. {
  780. surface: "15",
  781. label: "mdLoadAddr",
  782. name: "装货地",
  783. checked: 0,
  784. width: 100,
  785. },
  786. {
  787. surface: "16",
  788. label: "unLoadAddr",
  789. name: "卸货地",
  790. checked: 0,
  791. width: 100,
  792. },
  793. {
  794. surface: "17",
  795. label: "carregNo",
  796. name: "车号",
  797. checked: 0,
  798. width: 100,
  799. },
  800. {
  801. surface: "18",
  802. label: "name",
  803. name: "司机",
  804. checked: 0,
  805. width: 100,
  806. },
  807. {
  808. surface: "19",
  809. label: "orderNo",
  810. name: "运单号",
  811. checked: 0,
  812. width: 100,
  813. },
  814. {
  815. surface: "20",
  816. label: "driverTel",
  817. name: "司机电话",
  818. checked: 0,
  819. width: 100,
  820. },
  821. {
  822. surface: "21",
  823. label: "orderName",
  824. name: "状态",
  825. checked: 0,
  826. width: 100,
  827. },
  828. {
  829. surface: "22",
  830. label: "acceptDate",
  831. name: "接单日期",
  832. checked: 0,
  833. width: 100,
  834. },
  835. {
  836. surface: "23",
  837. label: "loadDate",
  838. name: "提箱日期",
  839. checked: 0,
  840. width: 100,
  841. },
  842. {
  843. surface: "24",
  844. label: "unLoadDate",
  845. name: "还柜日期",
  846. checked: 0,
  847. width: 100,
  848. },
  849. {
  850. surface: "25",
  851. label: "oilAmt",
  852. name: "油气费",
  853. checked: 0,
  854. width: 100,
  855. },
  856. {
  857. surface: "26",
  858. label: "driverbonus",
  859. name: "单趟提成",
  860. checked: 0,
  861. width: 100,
  862. },
  863. {
  864. surface: "27",
  865. label: "costOth",
  866. name: "其他费用",
  867. checked: 0,
  868. width: 100,
  869. },
  870. {
  871. surface: "28",
  872. label: "costRemarks",
  873. name: "备注",
  874. checked: 0,
  875. width: 100,
  876. },
  877. {
  878. surface: "29",
  879. label: "costomAmt05",
  880. name: "港杂费",
  881. checked: 0,
  882. width: 100,
  883. },
  884. {
  885. surface: "30",
  886. label: "costomAmt06",
  887. name: "提箱费",
  888. checked: 0,
  889. width: 100,
  890. },
  891. {
  892. surface: "31",
  893. label: "costomAmt03",
  894. name: "修洗费",
  895. checked: 0,
  896. width: 100,
  897. },
  898. {
  899. surface: "32",
  900. label: "costomAmt04",
  901. name: "吊装费",
  902. checked: 0,
  903. width: 100,
  904. },
  905. {
  906. surface: "33",
  907. label: "costomAmt01",
  908. name: "出口其他费用",
  909. checked: 0,
  910. width: 100,
  911. },
  912. {
  913. surface: "34",
  914. label: "costomStr01",
  915. name: "出口费用备注",
  916. checked: 0,
  917. width: 100,
  918. },
  919. {
  920. surface: "35",
  921. label: "costomAmt02",
  922. name: "进口其他费用",
  923. checked: 0,
  924. width: 100,
  925. },
  926. {
  927. surface: "36",
  928. label: "costomStr02",
  929. name: "进口费用备注",
  930. checked: 0,
  931. width: 100,
  932. },
  933. ],
  934. allCheck: false,
  935. title: "",
  936. form: {},
  937. DList: [],
  938. CList: [],
  939. disabled: false,
  940. goodsOptions: [],
  941. fMblnoOptions: [],
  942. transPropList: [],
  943. transTypeList: [],
  944. billTypeList: [],
  945. show: false,
  946. };
  947. },
  948. // 使用子组件
  949. components: {
  950. AddOrUpdate,
  951. draggable,
  952. },
  953. created() {
  954. this.getList();
  955. this.getDicts("data_billType").then((response) => {
  956. this.billTypeList = response.data;
  957. });
  958. this.getDicts("data_transType").then((response) => {
  959. this.transTypeList = response.data;
  960. });
  961. this.getDicts("data_transProp").then((response) => {
  962. this.transPropList = response.data;
  963. });
  964. listGoods().then((response) => {
  965. this.goodsOptions = response.rows;
  966. });
  967. listCorps().then((response) => {
  968. this.fMblnoOptions = response.rows;
  969. });
  970. this.getRow();
  971. },
  972. methods: {
  973. //列设置全选
  974. allChecked() {
  975. if (this.allCheck == true) {
  976. this.setRowList.map((e) => {
  977. return (e.checked = 0);
  978. });
  979. } else {
  980. this.setRowList.map((e) => {
  981. return (e.checked = 1);
  982. });
  983. }
  984. },
  985. //查询列数据
  986. getRow() {
  987. let that = this;
  988. this.data = {
  989. tableName: "还柜/卸柜",
  990. userId: Cookies.get("userName"),
  991. };
  992. select(this.data).then((res) => {
  993. if (res.data.length != 0) {
  994. this.getRowList = res.data.filter((e) => e.checked == 0);
  995. this.setRowList = res.data;
  996. this.setRowList = this.setRowList.reduce((res, item) => {
  997. res.push({
  998. surface: item.surface,
  999. label: item.label,
  1000. name: item.name,
  1001. checked: item.checked,
  1002. width: item.width,
  1003. });
  1004. return res;
  1005. }, []);
  1006. }
  1007. });
  1008. },
  1009. //保存列设置
  1010. save() {
  1011. this.showSetting = false;
  1012. this.data = {
  1013. tableName: "还柜/卸柜",
  1014. userId: Cookies.get("userName"),
  1015. sysTableSetList: this.setRowList,
  1016. };
  1017. addSet(this.data).then((res) => {
  1018. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1019. });
  1020. },
  1021. //开始拖拽事件
  1022. onStart() {
  1023. this.drag = true;
  1024. },
  1025. //拖拽结束事件
  1026. onEnd() {
  1027. this.drag = false;
  1028. },
  1029. /** 查询订单主列表 */
  1030. getList() {
  1031. this.loading = true;
  1032. listFtmsorderbillscars(this.queryParams).then((response) => {
  1033. response.rows.map((e) => {
  1034. if (e.orderStatus == 10) {
  1035. e.orderStatus = "车队安排";
  1036. }
  1037. if (e.orderStatus == 20) {
  1038. e.orderStatus = "司机受理";
  1039. }
  1040. if (e.orderStatus == 30) {
  1041. e.orderStatus = "司机出车";
  1042. }
  1043. if (e.orderStatus == 40) {
  1044. e.orderStatus = "提箱";
  1045. }
  1046. if (e.orderStatus == 50) {
  1047. e.orderStatus = "装卸货";
  1048. }
  1049. if (e.orderStatus == 60) {
  1050. e.orderStatus = "还卸柜";
  1051. }
  1052. if (e.orderStatus == 70) {
  1053. e.orderStatus = "费用确认";
  1054. }
  1055. if (e.orderStatus == 80) {
  1056. e.orderStatus = "回单";
  1057. }
  1058. if (e.loadDate) {
  1059. this.$set(e, "loadDate", e.loadDate.substring(0, 10));
  1060. }
  1061. if (e.acceptDate) {
  1062. this.$set(e, "acceptDate", e.acceptDate.substring(0, 10));
  1063. }
  1064. if (e.mdLoadDate) {
  1065. this.$set(e, "mdLoadDate", e.mdLoadDate.substring(0, 10));
  1066. }
  1067. if (e.unLoadDate) {
  1068. this.$set(e, "unLoadDate", e.unLoadDate.substring(0, 10));
  1069. }
  1070. if (e.waybillDate) {
  1071. e.waybillDate = e.waybillDate.substring(0, 10);
  1072. }
  1073. });
  1074. this.ftmsorderbillscarsList = response.rows;
  1075. this.total = response.total;
  1076. this.loading = false;
  1077. });
  1078. },
  1079. /** 新增按钮操作 */
  1080. handleAdd() {
  1081. this.reset();
  1082. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1083. this.title = "添加订单主";
  1084. },
  1085. // 表单重置
  1086. reset() {
  1087. this.form = {
  1088. id: null,
  1089. billNo: null,
  1090. actId: null,
  1091. corpId: null,
  1092. transUserName: null,
  1093. planUserName: null,
  1094. billType: null,
  1095. transType: null,
  1096. transProp: null,
  1097. ifContracted: null,
  1098. contractNo: null,
  1099. refNo: null,
  1100. accstlType: null,
  1101. accdays: null,
  1102. goodsId: null,
  1103. goodsPrice: null,
  1104. goodsLossType: null,
  1105. goodsLossStd: null,
  1106. mblno: null,
  1107. ysl: null,
  1108. voy: null,
  1109. pol: null,
  1110. pod: null,
  1111. qtyPlan: null,
  1112. qtyDisPatch: null,
  1113. weightPlan: null,
  1114. cntrDesc: null,
  1115. carNoList: null,
  1116. loadAddr: null,
  1117. loadAttn: null,
  1118. loadAttntel: null,
  1119. loadDate: null,
  1120. mdLoadAddr: null,
  1121. mdLoadAttn: null,
  1122. mdLoadAttnTel: null,
  1123. mdLoadDate: null,
  1124. unLoadAddr: null,
  1125. unLoadAttn: null,
  1126. unLoadAttnTel: null,
  1127. unLoadDate: null,
  1128. routeId: null,
  1129. routeDesc: null,
  1130. ifWaybill: null,
  1131. ifNeedinvDr: null,
  1132. postDate: null,
  1133. billStatus: 0,
  1134. delFlag: null,
  1135. createBy: null,
  1136. createTime: null,
  1137. updateBy: null,
  1138. updateTime: null,
  1139. remarks: null,
  1140. };
  1141. this.disabled = false;
  1142. this.resetForm("form");
  1143. },
  1144. // 多选框选中数据
  1145. handleSelectionChange(selection) {
  1146. this.ids = selection.map((item) => item.id);
  1147. this.single = selection.length !== 1;
  1148. this.multiple = !selection.length;
  1149. },
  1150. /** 修改按钮操作 */
  1151. handleUpdate(row) {
  1152. this.reset();
  1153. const data = { id: row.id, billStatus: 1060 };
  1154. selectDriverFtmsorderbillscars(data).then((response) => {
  1155. if (response.data.cars.billType) {
  1156. response.data.cars.billType = response.data.cars.billType.toString();
  1157. }
  1158. if (response.data.fees.length) {
  1159. this.DList = response.data.fees.filter((e) => e.fDc == "D");
  1160. this.CList = response.data.fees.filter((e) => e.fDc == "C");
  1161. response.data.fees.map((e) => {
  1162. if (e.fFeeunitid) {
  1163. e.fFeeunitid = e.fFeeunitid.toString();
  1164. }
  1165. });
  1166. } else {
  1167. this.DList = [];
  1168. this.CList = [];
  1169. }
  1170. if (response.data.cars.orderStatus >= 60) {
  1171. this.disabled = true;
  1172. }
  1173. this.title = "查看装卸柜";
  1174. this.form = response.data.cars;
  1175. this.addOrUpdateVisible = !this.addOrUpdateVisible;
  1176. });
  1177. },
  1178. // //获取到保存并复制
  1179. // getSave(data) {
  1180. // data.data.map((e) => {s
  1181. // if (e.cntrId != null) {
  1182. // return (e.cntrId = e.cntrId.toString());
  1183. // }
  1184. // });
  1185. // this.vehicleList = data.data;
  1186. // },
  1187. /** 删除按钮操作 */
  1188. handleDelete(row) {
  1189. const ids = row.id || this.ids;
  1190. this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
  1191. confirmButtonText: "确定",
  1192. cancelButtonText: "取消",
  1193. type: "warning",
  1194. })
  1195. .then(function () {
  1196. return delFtmsorderbills(ids);
  1197. })
  1198. .then(() => {
  1199. this.getList();
  1200. this.msgSuccess("删除成功");
  1201. });
  1202. },
  1203. /** 导出按钮操作 */
  1204. handleExport() {
  1205. const queryParams = this.queryParams;
  1206. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  1207. confirmButtonText: "确定",
  1208. cancelButtonText: "取消",
  1209. type: "warning",
  1210. })
  1211. .then(function () {
  1212. return exportFtmsorderbills(queryParams);
  1213. })
  1214. .then((response) => {
  1215. this.download(response.msg);
  1216. });
  1217. },
  1218. /** 搜索按钮操作 */
  1219. handleQuery() {
  1220. this.queryParams.pageNum = 1;
  1221. this.getList();
  1222. },
  1223. /** 重置按钮操作 */
  1224. resetQuery() {
  1225. this.resetForm("queryForm");
  1226. this.handleQuery();
  1227. },
  1228. // 监听 子组件弹窗关闭后触发,有子组件调用
  1229. showAddOrUpdate(data) {
  1230. if (data === "false") {
  1231. this.addOrUpdateVisible = false;
  1232. } else {
  1233. this.addOrUpdateVisible = true;
  1234. }
  1235. },
  1236. fixDisabled(data) {
  1237. if (data === "false") {
  1238. this.disabled = false;
  1239. }
  1240. },
  1241. },
  1242. };
  1243. </script>
  1244. <style lang="scss" scoped>
  1245. .tabSetting {
  1246. display: flex;
  1247. justify-content: flex-end;
  1248. }
  1249. .listStyle {
  1250. display: flex;
  1251. border-top: 1px solid #dcdfe6;
  1252. border-left: 1px solid #dcdfe6;
  1253. border-right: 1px solid #dcdfe6;
  1254. }
  1255. .listStyle:last-child {
  1256. border-bottom: 1px solid #dcdfe6;
  1257. }
  1258. .progress {
  1259. display: flex;
  1260. align-items: center;
  1261. padding: 2px;
  1262. background-color: rgba(0, 0, 0, 0.05);
  1263. height: 100%;
  1264. }
  1265. </style>