index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. label-width="100px"
  7. size="mini"
  8. >
  9. <el-row>
  10. <el-col :span="6">
  11. <el-form-item label-width="100px" label="结算单位" prop="tCorpId">
  12. <el-select
  13. v-model="queryParams.tCorpId"
  14. placeholder="请选择结算单位"
  15. clearable
  16. size="small"
  17. style="width: 100%"
  18. filterable
  19. @keyup.enter.native="handleQuery"
  20. >
  21. <el-option
  22. v-for="(dict, index) in corpsOptions"
  23. :key="index.fId"
  24. :label="dict.fCname"
  25. :value="dict.fId"
  26. />
  27. </el-select>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="6">
  31. <el-form-item label-width="100px" label="结算状态" prop="mblno">
  32. <el-select
  33. v-model="queryParams.stlStatus"
  34. placeholder="请选择对账状态"
  35. clearable
  36. size="small"
  37. style="width: 100%"
  38. filterable
  39. @keyup.enter.native="handleQuery"
  40. >
  41. <el-option
  42. v-for="(dict, index) in stlStatusOptions"
  43. :key="index.id"
  44. :label="dict.name"
  45. :value="dict.id"
  46. />
  47. </el-select>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="6">
  51. <el-form-item label="对账状态" prop="corpId">
  52. <el-select
  53. v-model="queryParams.accchkStatus"
  54. placeholder="请选择对账状态"
  55. clearable
  56. size="small"
  57. style="width: 100%"
  58. filterable
  59. >
  60. <el-option
  61. v-for="(dict, index) in accchkOptions"
  62. :key="index.id"
  63. :label="dict.name"
  64. :value="dict.id"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="6">
  70. <el-form-item label-width="100px" label="开票状态" prop="billType">
  71. <el-select
  72. v-model="queryParams.invStatus"
  73. placeholder="请选择开票状态"
  74. clearable
  75. size="small"
  76. style="width: 100%"
  77. >
  78. <el-option
  79. v-for="(dict, index) in invOptions"
  80. :key="index.id"
  81. :label="dict.name"
  82. :value="dict.id"
  83. />
  84. </el-select>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="6">
  88. <el-form-item label-width="100px" label="主运单号" prop="mBillNo">
  89. <el-input
  90. v-model="queryParams.mBillNo"
  91. placeholder="请输入主运单号"
  92. clearable
  93. size="small"
  94. @keyup.enter.native="handleQuery"
  95. style="width: 100%"
  96. />
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="6">
  100. <el-form-item label-width="100px" label="运单号" prop="orderNo">
  101. <el-input
  102. v-model="queryParams.orderNo"
  103. placeholder="请输入运单号"
  104. clearable
  105. size="small"
  106. @keyup.enter.native="handleQuery"
  107. style="width: 100%"
  108. />
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="6">
  112. <el-form-item label-width="100px" label="车牌号" prop="carregNo">
  113. <el-input
  114. v-model="queryParams.carregNo"
  115. placeholder="请输入车牌号"
  116. clearable
  117. size="small"
  118. @keyup.enter.native="handleQuery"
  119. style="width: 100%"
  120. />
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="6">
  124. <el-form-item label-width="100px" label="接单时间">
  125. <el-date-picker
  126. style="width: 100%"
  127. v-model="queryParams.acceptDateList"
  128. type="daterange"
  129. start-placeholder="开始日期"
  130. end-placeholder="结束日期"
  131. value-format="yyyy-MM-dd HH:mm:ss"
  132. :default-time="['00:00:00', '23:59:59']"
  133. size="small"
  134. >      
  135. </el-date-picker>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="6">
  139. <el-form-item label="对账时间">
  140. <el-date-picker
  141. style="width: 100%"
  142. v-model="queryParams.accchkDateList"
  143. type="daterange"
  144. start-placeholder="开始日期"
  145. end-placeholder="结束日期"
  146. value-format="yyyy-MM-dd HH:mm:ss"
  147. :default-time="['00:00:00', '23:59:59']"
  148. size="small"
  149. >
  150. </el-date-picker>
  151. </el-form-item>
  152. </el-col>
  153. </el-row>
  154. </el-form>
  155. <el-row :gutter="10" class="mb8">
  156. <el-col :span="1.5">
  157. <el-button
  158. type="warning"
  159. icon="el-icon-download"
  160. size="mini"
  161. @click="handleExport"
  162. v-hasPermi="['fleet:ftmsorderbills:export']"
  163. >导出</el-button
  164. >
  165. </el-col>
  166. <div class="tabSetting">
  167. <div style="margin-right: 20px">
  168. <el-button
  169. type="cyan"
  170. icon="el-icon-search"
  171. size="mini"
  172. @click="handleQuery"
  173. >搜索</el-button
  174. >
  175. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  176. >重置</el-button
  177. >
  178. </div>
  179. <right-toolbar @queryTable="getList"></right-toolbar>
  180. <div style="margin: 0 12px">
  181. <el-tooltip
  182. class="item"
  183. effect="dark"
  184. content="列设置"
  185. placement="top"
  186. >
  187. <el-button
  188. icon="el-icon-setting"
  189. size="mini"
  190. circle
  191. @click="showSetting = !showSetting"
  192. v-if="typevalue != 2"
  193. ></el-button>
  194. <el-button
  195. icon="el-icon-setting"
  196. size="mini"
  197. circle
  198. @click="showSetting2 = !showSetting2"
  199. v-else
  200. ></el-button>
  201. </el-tooltip>
  202. </div>
  203. </div>
  204. </el-row>
  205. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  206. <div>配置排序列数据(拖动调整顺序)</div>
  207. <div style="margin-left: 17px">
  208. <el-checkbox
  209. v-model="allCheck"
  210. label="全选"
  211. @change="allChecked"
  212. ></el-checkbox>
  213. </div>
  214. <div style="padding: 4px; display: flex; justify-content: center">
  215. <draggable
  216. v-model="setRowList"
  217. group="site"
  218. animation="300"
  219. @start="onStart"
  220. @end="onEnd"
  221. handle=".indraggable"
  222. >
  223. <transition-group>
  224. <div
  225. v-for="item in setRowList"
  226. :key="item.surface"
  227. class="listStyle"
  228. >
  229. <div style="width: 500px" class="indraggable">
  230. <div class="progress" :style="{ width: item.width + 'px' }">
  231. <el-checkbox
  232. :label="item.name"
  233. v-model="item.checked"
  234. :true-label="0"
  235. :false-label="1"
  236. >{{ item.name }}
  237. </el-checkbox>
  238. </div>
  239. </div>
  240. <el-input-number
  241. v-model.number="item.width"
  242. controls-position="right"
  243. :min="1"
  244. :max="500"
  245. size="mini"
  246. ></el-input-number>
  247. </div>
  248. </transition-group>
  249. </draggable>
  250. </div>
  251. <span slot="footer" class="dialog-footer">
  252. <el-button @click="showSetting = false">取 消</el-button>
  253. <el-button @click="delRow" type="danger">重 置</el-button>
  254. <el-button type="primary" @click="save">确 定</el-button>
  255. </span>
  256. </el-dialog>
  257. <el-table
  258. v-if="typevalue != 2"
  259. v-loading="loading"
  260. :data="tabularData"
  261. id="out-table"
  262. >
  263. <el-table-column type="selection" width="55" align="center" />
  264. <el-table-column
  265. label="提单号"
  266. width="180"
  267. align="center"
  268. :show-overflow-tooltip="true"
  269. sortable
  270. fixed="left"
  271. >
  272. <template slot-scope="scope">
  273. <el-link :underline="false" type="primary"
  274. ><div @click="handleUpdate(scope.row)">
  275. {{ scope.row.mblno }}
  276. </div></el-link
  277. >
  278. </template>
  279. </el-table-column>
  280. <el-table-column
  281. v-for="(item, index) in getRowList"
  282. :key="index"
  283. :label="item.name"
  284. :width="item.width"
  285. :prop="item.label"
  286. align="center"
  287. :show-overflow-tooltip="true"
  288. sortable
  289. :fixed="item.fixed"
  290. />
  291. </el-table>
  292. <el-dialog title="自定义列显示" :visible.sync="showSetting2" width="700px">
  293. <div>配置排序列数据(拖动调整顺序)</div>
  294. <div style="margin-left: 17px">
  295. <el-checkbox
  296. v-model="allCheck2"
  297. label="全选"
  298. @change="allChecked2"
  299. ></el-checkbox>
  300. </div>
  301. <div style="padding: 4px; display: flex; justify-content: center">
  302. <draggable
  303. v-model="setRowList2"
  304. group="site"
  305. animation="300"
  306. @start="onStart"
  307. @end="onEnd"
  308. handle=".indraggable"
  309. >
  310. <transition-group>
  311. <div
  312. v-for="item in setRowList2"
  313. :key="item.surface"
  314. class="listStyle"
  315. >
  316. <div style="width: 500px" class="indraggable">
  317. <div class="progress" :style="{ width: item.width + 'px' }">
  318. <el-checkbox
  319. :label="item.name"
  320. v-model="item.checked"
  321. :true-label="0"
  322. :false-label="1"
  323. >{{ item.name }}
  324. </el-checkbox>
  325. </div>
  326. </div>
  327. <el-input-number
  328. v-model.number="item.width"
  329. controls-position="right"
  330. :min="1"
  331. :max="500"
  332. size="mini"
  333. ></el-input-number>
  334. </div>
  335. </transition-group>
  336. </draggable>
  337. </div>
  338. <span slot="footer" class="dialog-footer">
  339. <el-button @click="showSetting2 = false">取 消</el-button>
  340. <el-button @click="delRow2" type="danger">重 置</el-button>
  341. <el-button type="primary" @click="save2">确 定</el-button>
  342. </span>
  343. </el-dialog>
  344. <el-table
  345. v-if="typevalue == 2"
  346. v-loading="loading"
  347. :data="tabularData"
  348. id="out-table"
  349. >
  350. <el-table-column type="selection" width="55" align="center" />
  351. <el-table-column
  352. v-for="(item, index) in getRowList2"
  353. :key="index"
  354. :label="item.name"
  355. :width="item.width"
  356. :prop="item.label"
  357. align="center"
  358. :show-overflow-tooltip="true"
  359. sortable
  360. :fixed="item.fixed"
  361. />
  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. </div>
  371. </template>
  372. <script>
  373. import Cookies from "js-cookie";
  374. import draggable from "vuedraggable";
  375. import { listCorps } from "@/api/basicdata/corps";
  376. import AddOrUpdate from "../scheduling/AddOrUpdate";
  377. import { addSet, select, resetModule } from "@/api/system/set";
  378. import { queryLedgerList, ledgerListExport } from "@/api/fleet/fleetStatistics";
  379. export default {
  380. name: "plans",
  381. data() {
  382. return {
  383. // 总条数
  384. total: 0,
  385. show: false,
  386. allCheck: false,
  387. stlStatusOptions: [
  388. {
  389. id: "T",
  390. name: "已结算",
  391. },
  392. {
  393. id: "F",
  394. name: "未结算",
  395. },
  396. ],
  397. accchkOptions: [
  398. {
  399. id: "T",
  400. name: "已对账",
  401. },
  402. {
  403. id: "F",
  404. name: "未对账",
  405. },
  406. ],
  407. invOptions: [
  408. {
  409. id: "T",
  410. name: "已开票",
  411. },
  412. {
  413. id: "F",
  414. name: "未开票",
  415. },
  416. ],
  417. drag: false,
  418. loading: false,
  419. // 查询参数
  420. queryParams: {
  421. pageNum: 1,
  422. pageSize: 10,
  423. tCorpId: null,
  424. stlStatus: null,
  425. invStatus: null,
  426. accchkStatus: null,
  427. accchkDateList: null,
  428. acceptDateList: null,
  429. },
  430. tableDate: [
  431. {
  432. surface: "1",
  433. label: "acceptDate",
  434. name: "接单日期",
  435. checked: 0,
  436. width: 100,
  437. },
  438. {
  439. surface: "2",
  440. label: "billType",
  441. name: "贸易方式",
  442. checked: 0,
  443. width: 100,
  444. },
  445. {
  446. surface: "3",
  447. label: "transType",
  448. name: "运输方式",
  449. checked: 0,
  450. width: 100,
  451. },
  452. {
  453. surface: "4",
  454. label: "corpId",
  455. name: "托运人",
  456. checked: 0,
  457. width: 100,
  458. },
  459. {
  460. surface: "5",
  461. label: "ysl",
  462. name: "船名",
  463. checked: 0,
  464. width: 100,
  465. },
  466. {
  467. surface: "6",
  468. label: "voy",
  469. name: "航次",
  470. checked: 0,
  471. width: 100,
  472. },
  473. {
  474. surface: "8",
  475. label: "cntrQty",
  476. name: "柜量",
  477. checked: 0,
  478. width: 100,
  479. },
  480. {
  481. surface: "9",
  482. label: "cntrId",
  483. name: "柜型",
  484. checked: 0,
  485. width: 100,
  486. },
  487. {
  488. surface: "10",
  489. label: "goodsId",
  490. name: "品名",
  491. checked: 0,
  492. width: 100,
  493. },
  494. {
  495. surface: "11",
  496. label: "cntrWeight",
  497. name: "重量",
  498. checked: 0,
  499. width: 100,
  500. },
  501. {
  502. surface: "12",
  503. label: "polId",
  504. name: "起运港",
  505. checked: 0,
  506. width: 100,
  507. },
  508. {
  509. surface: "13",
  510. label: "podId",
  511. name: "目的港",
  512. checked: 0,
  513. width: 100,
  514. },
  515. {
  516. surface: "14",
  517. label: "loadAddr",
  518. name: "提箱场站",
  519. checked: 0,
  520. width: 100,
  521. },
  522. {
  523. surface: "15",
  524. label: "mdLoadAddr",
  525. name: "装货地",
  526. checked: 0,
  527. width: 100,
  528. },
  529. {
  530. surface: "16",
  531. label: "unLoadAddr",
  532. name: "卸货地",
  533. checked: 0,
  534. width: 100,
  535. },
  536. {
  537. surface: "17",
  538. label: "carregNo",
  539. name: "车号",
  540. checked: 0,
  541. width: 100,
  542. },
  543. {
  544. surface: "18",
  545. label: "driverName",
  546. name: "司机",
  547. checked: 0,
  548. width: 100,
  549. },
  550. {
  551. surface: "19",
  552. label: "orderNo",
  553. name: "运单号",
  554. checked: 0,
  555. width: 100,
  556. },
  557. {
  558. surface: "20",
  559. label: "driverTel",
  560. name: "司机电话",
  561. checked: 0,
  562. width: 100,
  563. },
  564. {
  565. surface: "21",
  566. label: "orderName",
  567. name: "状态",
  568. checked: 0,
  569. width: 100,
  570. },
  571. {
  572. surface: "23",
  573. label: "loadDate",
  574. name: "提箱日期",
  575. checked: 0,
  576. width: 100,
  577. },
  578. {
  579. surface: "24",
  580. label: "unLoadDate",
  581. name: "还柜日期",
  582. checked: 0,
  583. width: 100,
  584. },
  585. {
  586. surface: "25",
  587. label: "oilAmt",
  588. name: "油气费",
  589. checked: 0,
  590. width: 100,
  591. },
  592. {
  593. surface: "26",
  594. label: "driverbonus",
  595. name: "单趟提成",
  596. checked: 0,
  597. width: 100,
  598. },
  599. {
  600. surface: "27",
  601. label: "costOth",
  602. name: "其他费用",
  603. checked: 0,
  604. width: 100,
  605. },
  606. {
  607. surface: "28",
  608. label: "costRemarks",
  609. name: "备注",
  610. checked: 0,
  611. width: 100,
  612. },
  613. {
  614. surface: "29",
  615. label: "costomAmt05",
  616. name: "港杂费",
  617. checked: 0,
  618. width: 100,
  619. },
  620. {
  621. surface: "30",
  622. label: "costomAmt06",
  623. name: "提箱费",
  624. checked: 0,
  625. width: 100,
  626. },
  627. {
  628. surface: "31",
  629. label: "costomAmt03",
  630. name: "修洗费",
  631. checked: 0,
  632. width: 100,
  633. },
  634. {
  635. surface: "32",
  636. label: "costomAmt04",
  637. name: "吊装费",
  638. checked: 0,
  639. width: 100,
  640. },
  641. {
  642. surface: "33",
  643. label: "costomAmt01",
  644. name: "出口其他费用",
  645. checked: 0,
  646. width: 100,
  647. },
  648. {
  649. surface: "34",
  650. label: "costomStr01",
  651. name: "出口费用备注",
  652. checked: 0,
  653. width: 100,
  654. },
  655. {
  656. surface: "35",
  657. label: "costomAmt02",
  658. name: "进口其他费用",
  659. checked: 0,
  660. width: 100,
  661. },
  662. {
  663. surface: "36",
  664. label: "costomStr02",
  665. name: "进口费用备注",
  666. checked: 0,
  667. width: 100,
  668. },
  669. {
  670. surface: "37",
  671. label: "mBillNo",
  672. name: "主单号",
  673. checked: 0,
  674. width: 100,
  675. },
  676. {
  677. surface: "38",
  678. label: "billKind",
  679. name: "单据类型",
  680. checked: 0,
  681. width: 100,
  682. },
  683. {
  684. surface: "39",
  685. label: "amtDr",
  686. name: "应收结算金额",
  687. checked: 0,
  688. width: 100,
  689. },
  690. {
  691. surface: "40",
  692. label: "amtCr",
  693. name: "应付结算金额",
  694. checked: 0,
  695. width: 100,
  696. },
  697. {
  698. surface: "41",
  699. label: "stlAmtDr",
  700. name: "已收结算金额",
  701. checked: 0,
  702. width: 100,
  703. },
  704. {
  705. surface: "42",
  706. label: "stlAmtCr",
  707. name: "已付结算金额",
  708. checked: 0,
  709. width: 100,
  710. },
  711. {
  712. surface: "43",
  713. label: "profitBill",
  714. name: "业务利润",
  715. checked: 0,
  716. width: 100,
  717. },
  718. {
  719. surface: "44",
  720. label: "profitCar",
  721. name: "车利润",
  722. checked: 0,
  723. width: 100,
  724. },
  725. ],
  726. setRowList: [],
  727. getRowList: [],
  728. tabularData: [],
  729. corpsOptions: [],
  730. showSetting: false,
  731. tableDate2: [
  732. {
  733. surface: "1",
  734. label: "carregNo",
  735. name: "车牌号",
  736. checked: 0,
  737. width: 100,
  738. },
  739. {
  740. surface: "2",
  741. label: "orderNo",
  742. name: "运单号",
  743. checked: 0,
  744. width: 100,
  745. },
  746. {
  747. surface: "3",
  748. label: "acceptDate",
  749. name: "接单日期",
  750. checked: 0,
  751. width: 100,
  752. },
  753. {
  754. surface: "4",
  755. label: "billType",
  756. name: "运输性质",
  757. checked: 0,
  758. width: 100,
  759. },
  760. {
  761. surface: "5",
  762. label: "inMblno",
  763. name: "进口提单号",
  764. checked: 0,
  765. width: 120,
  766. },
  767. {
  768. surface: "6",
  769. label: "loadAddr",
  770. name: "提箱地点",
  771. checked: 0,
  772. width: 100,
  773. },
  774. {
  775. surface: "7",
  776. label: "mdLoadAddr",
  777. name: "卸货地点",
  778. checked: 0,
  779. width: 100,
  780. },
  781. {
  782. surface: "8",
  783. label: "cntrQty",
  784. name: "箱量",
  785. checked: 0,
  786. width: 100,
  787. },
  788. {
  789. surface: "9",
  790. label: "cntrId",
  791. name: "箱型",
  792. checked: 0,
  793. width: 100,
  794. },
  795. {
  796. surface: "10",
  797. label: "boxVolume",
  798. name: "船名航次",
  799. checked: 0,
  800. width: 100,
  801. },
  802. {
  803. surface: "11",
  804. label: "outMblno",
  805. name: "出口提单号",
  806. checked: 0,
  807. width: 120,
  808. },
  809. {
  810. surface: "12",
  811. label: "driverName",
  812. name: "司机",
  813. checked: 0,
  814. width: 100,
  815. },
  816. {
  817. surface: "13",
  818. label: "fleetId",
  819. name: "费用名称",
  820. checked: 0,
  821. width: 100,
  822. },
  823. {
  824. surface: "14",
  825. label: "shippingDr",
  826. name: "应收运费",
  827. checked: 0,
  828. width: 100,
  829. },
  830. {
  831. surface: "15",
  832. label: "otherDr",
  833. name: "应收其他",
  834. checked: 0,
  835. width: 100,
  836. },
  837. {
  838. surface: "16",
  839. label: "shippingCr",
  840. name: "应付运费",
  841. checked: 0,
  842. width: 100,
  843. },
  844. {
  845. surface: "17",
  846. label: "otherCr",
  847. name: "应付其他",
  848. checked: 0,
  849. width: 100,
  850. },
  851. {
  852. surface: "18",
  853. label: "profit",
  854. name: "利润",
  855. checked: 0,
  856. width: 100,
  857. },
  858. ],
  859. setRowList2: [],
  860. getRowList2: [],
  861. allCheck2: false,
  862. showSetting2: false,
  863. typevalue: null,
  864. };
  865. },
  866. // 使用子组件
  867. components: {
  868. AddOrUpdate,
  869. draggable,
  870. },
  871. created() {
  872. this.setRowList = this.tableDate;
  873. this.getRowList = this.tableDate;
  874. this.setRowList2 = this.tableDate2;
  875. this.getRowList2 = this.tableDate2;
  876. // this.getList();
  877. this.typevalue = Cookies.get("sysType");
  878. this.getRow();
  879. this.getRow2();
  880. listCorps().then((response) => {
  881. this.corpsOptions = response.rows;
  882. });
  883. },
  884. methods: {
  885. //列设置全选
  886. allChecked() {
  887. if (this.allCheck == true) {
  888. this.setRowList.map((e) => {
  889. return (e.checked = 0);
  890. });
  891. } else {
  892. this.setRowList.map((e) => {
  893. return (e.checked = 1);
  894. });
  895. }
  896. },
  897. //查询列数据
  898. getRow() {
  899. let that = this;
  900. this.data = {
  901. tableName: "陆运台账",
  902. userId: Cookies.get("userName"),
  903. };
  904. select(this.data).then((res) => {
  905. if (res.data.length != 0) {
  906. this.getRowList = res.data.filter((e) => e.checked == 0);
  907. this.setRowList = res.data;
  908. this.setRowList = this.setRowList.reduce((res, item) => {
  909. res.push({
  910. surface: item.surface,
  911. label: item.label,
  912. name: item.name,
  913. checked: item.checked,
  914. width: item.width,
  915. fixed: item.fixed,
  916. });
  917. return res;
  918. }, []);
  919. }
  920. });
  921. },
  922. //重置列表
  923. delRow() {
  924. this.data = {
  925. tableName: "陆运台账",
  926. userId: Cookies.get("userName"),
  927. };
  928. resetModule(this.data).then((res) => {
  929. if (res.code == 200) {
  930. this.showSetting = false;
  931. this.setRowList = this.tableDate;
  932. this.getRowList = this.tableDate;
  933. }
  934. });
  935. },
  936. //保存列设置
  937. save() {
  938. this.showSetting = false;
  939. this.data = {
  940. tableName: "陆运台账",
  941. userId: Cookies.get("userName"),
  942. sysTableSetList: this.setRowList,
  943. };
  944. addSet(this.data).then((res) => {
  945. if (res.code == 200) {
  946. this.showSetting = false;
  947. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  948. }
  949. });
  950. },
  951. //列设置全选
  952. allChecked2() {
  953. if (this.allCheck2 == true) {
  954. this.setRowList2.map((e) => {
  955. return (e.checked = 0);
  956. });
  957. } else {
  958. this.setRowList2.map((e) => {
  959. return (e.checked = 1);
  960. });
  961. }
  962. },
  963. //查询列数据
  964. getRow2() {
  965. let that = this;
  966. this.data = {
  967. tableName: "车队-陆运台账",
  968. userId: Cookies.get("userName"),
  969. };
  970. select(this.data).then((res) => {
  971. if (res.data.length != 0) {
  972. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  973. this.setRowList2 = res.data;
  974. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  975. res.push({
  976. surface: item.surface,
  977. label: item.label,
  978. name: item.name,
  979. checked: item.checked,
  980. width: item.width,
  981. fixed: item.fixed,
  982. });
  983. return res;
  984. }, []);
  985. }
  986. });
  987. },
  988. //重置列表
  989. delRow2() {
  990. this.data = {
  991. tableName: "车队-陆运台账",
  992. userId: Cookies.get("userName"),
  993. };
  994. resetModule(this.data).then((res) => {
  995. if (res.code == 200) {
  996. this.showSetting2 = false;
  997. this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2;
  998. }
  999. });
  1000. },
  1001. //保存列设置
  1002. save2() {
  1003. this.showSetting = false;
  1004. this.data = {
  1005. tableName: "车队-陆运台账",
  1006. userId: Cookies.get("userName"),
  1007. sysTableSetList: this.setRowList2,
  1008. };
  1009. addSet(this.data).then((res) => {
  1010. if (res.code == 200) {
  1011. this.showSetting2 = false;
  1012. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  1013. }
  1014. });
  1015. },
  1016. //开始拖拽事件
  1017. onStart() {
  1018. this.drag = true;
  1019. },
  1020. //拖拽结束事件
  1021. onEnd() {
  1022. this.drag = false;
  1023. },
  1024. /** 查询订单主列表 */
  1025. getList() {
  1026. if (!this.queryParams.acceptDateList) {
  1027. return this.$message.error("请选择接单时间");
  1028. }
  1029. this.loading = true;
  1030. queryLedgerList(this.queryParams).then((response) => {
  1031. this.tabularData = response.rows;
  1032. this.total = response.total;
  1033. this.loading = false;
  1034. });
  1035. },
  1036. // 表单重置
  1037. reset() {
  1038. this.resetForm("form");
  1039. },
  1040. /** 导出按钮操作 */
  1041. handleExport() {
  1042. const queryParams = this.queryParams;
  1043. this.$confirm("是否确认导出所有订单主数据项?", "警告", {
  1044. confirmButtonText: "确定",
  1045. cancelButtonText: "取消",
  1046. type: "warning",
  1047. })
  1048. .then(function () {
  1049. return ledgerListExport(queryParams);
  1050. })
  1051. .then((response) => {
  1052. this.download(response.msg);
  1053. });
  1054. },
  1055. /** 搜索按钮操作 */
  1056. handleQuery() {
  1057. this.queryParams.pageNum = 1;
  1058. this.getList();
  1059. },
  1060. /** 重置按钮操作 */
  1061. resetQuery() {
  1062. this.queryParams = this.$options.data().queryParams;
  1063. this.loading = true;
  1064. setTimeout(() => {
  1065. this.loading = false;
  1066. this.tabularData =[];
  1067. this.total = 0;
  1068. }, 400);
  1069. },
  1070. },
  1071. };
  1072. </script>
  1073. <style lang="scss" scoped>
  1074. .tabSetting {
  1075. display: flex;
  1076. justify-content: flex-end;
  1077. }
  1078. .listStyle {
  1079. display: flex;
  1080. border-top: 1px solid #dcdfe6;
  1081. border-left: 1px solid #dcdfe6;
  1082. border-right: 1px solid #dcdfe6;
  1083. }
  1084. .listStyle:last-child {
  1085. border-bottom: 1px solid #dcdfe6;
  1086. }
  1087. .progress {
  1088. display: flex;
  1089. align-items: center;
  1090. padding: 2px;
  1091. background-color: rgba(0, 0, 0, 0.05);
  1092. height: 100%;
  1093. }
  1094. </style>