index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  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 :xs="12" :sm="6">
  12. <el-form-item label="提单号" prop="fMblno">
  13. <el-input
  14. v-model="queryParams.fMblno"
  15. placeholder="请输入提单号"
  16. clearable
  17. />
  18. </el-form-item>
  19. </el-col>
  20. <el-col :xs="12" :sm="6">
  21. <el-form-item label="客户名称" prop="fCorpid">
  22. <el-select
  23. v-model="queryParams.fCorpid"
  24. clearable
  25. filterable
  26. placeholder="请输入关键词"
  27. style="width: 100%"
  28. >
  29. <el-option
  30. v-for="(item, index) in fMblnoOptions"
  31. :key="index.fId"
  32. :label="item.fName"
  33. :value="item.fId"
  34. ></el-option>
  35. </el-select>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :xs="12" :sm="6">
  39. <el-form-item label="业务日期" prop="fBsdateList">
  40. <el-date-picker
  41. type="daterange"
  42. value-format="yyyy-MM-dd HH:mm:ss"
  43. :default-time="['00:00:00', '23:59:59']"
  44. clearable
  45. unlink-panels
  46. style="width: 100%"
  47. range-separator="至"
  48. start-placeholder="开始日期"
  49. end-placeholder="结束日期"
  50. v-model="queryParams.fBsdateList"
  51. ></el-date-picker>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :xs="12" :sm="6">
  55. <el-form-item label="审核日期" prop="fReviewDateList">
  56. <el-date-picker
  57. type="daterange"
  58. value-format="yyyy-MM-dd HH:mm:ss"
  59. :default-time="['00:00:00', '23:59:59']"
  60. clearable
  61. unlink-panels
  62. style="width: 100%"
  63. range-separator="至"
  64. start-placeholder="开始日期"
  65. end-placeholder="结束日期"
  66. v-model="queryParams.fReviewDateList"
  67. ></el-date-picker>
  68. </el-form-item>
  69. </el-col>
  70. </el-row>
  71. <el-collapse-transition>
  72. <div v-show="show">
  73. <el-row>
  74. <el-col :xs="12" :sm="6">
  75. <el-form-item label="收/付" prop="fDc">
  76. <el-select
  77. v-model="queryParams.fDc"
  78. clearable
  79. filterable
  80. placeholder="请选择"
  81. style="width: 100%"
  82. >
  83. <el-option
  84. label="收"
  85. value="D"
  86. ></el-option>
  87. <el-option
  88. label="付"
  89. value="C"
  90. ></el-option>
  91. </el-select>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :xs="12" :sm="6">
  95. <el-form-item label="费用状态" prop="fBillstatus">
  96. <el-select
  97. v-model="queryParams.fBillstatus"
  98. clearable
  99. filterable
  100. placeholder="请选择费用状态"
  101. style="width: 100%"
  102. >
  103. <el-option
  104. label="录入"
  105. value="1"
  106. ></el-option>
  107. <el-option
  108. label="暂存"
  109. value="2"
  110. ></el-option>
  111. <el-option
  112. label="审批驳回"
  113. value="3"
  114. ></el-option>
  115. <el-option
  116. label="提交审核"
  117. value="4"
  118. ></el-option>
  119. <el-option
  120. label="审核中"
  121. value="5"
  122. ></el-option>
  123. <el-option
  124. label="审核通过"
  125. value="6"
  126. ></el-option>
  127. </el-select>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :xs="12" :sm="6">
  131. <el-form-item label="费用名称">
  132. <el-select
  133. v-model="queryParams.fFeeids"
  134. clearable
  135. filterable
  136. multiple
  137. collapse-tags
  138. placeholder="请选择费用名称"
  139. style="width: 100%"
  140. >
  141. <el-option
  142. v-for="(dict, index) in fNameOptions"
  143. :key="dict.fId"
  144. :label="dict.fName"
  145. :value="dict.fId"
  146. ></el-option>
  147. </el-select>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :xs="12" :sm="6">
  151. <el-form-item label="结算方式">
  152. <el-select
  153. v-model="queryParams.fStltypeid"
  154. clearable
  155. filterable
  156. placeholder="请选择结算方式"
  157. style="width: 100%"
  158. >
  159. <el-option
  160. v-for="(item, index) in fStltypeOptions"
  161. :key="index.dictValue"
  162. :label="item.dictLabel"
  163. :value="item.dictValue"
  164. ></el-option>
  165. </el-select>
  166. </el-form-item>
  167. </el-col>
  168. </el-row>
  169. <el-row>
  170. <el-col :xs="12" :sm="6">
  171. <el-form-item label="结算状态">
  172. <el-select
  173. v-model="queryParams.fStalmountStatus"
  174. filterable
  175. clearable
  176. placeholder="请选择结算状态"
  177. style="width: 100%"
  178. @clear="queryParams.fStalmountStatus = null"
  179. >
  180. <el-option label="已结算" :value="1"/>
  181. <el-option label="未结算" :value="2"/>
  182. </el-select>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :xs="12" :sm="6">
  186. <el-form-item label="对账状态">
  187. <el-select
  188. v-model="queryParams.feesStatus"
  189. filterable
  190. clearable
  191. placeholder="请选择对账状态"
  192. style="width: 100%"
  193. @clear="queryParams.feesStatus = null"
  194. >
  195. <el-option label="已对账" :value="1"/>
  196. <el-option label="未对账" :value="2"/>
  197. </el-select>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :xs="12" :sm="6">
  201. <el-form-item label="发票状态">
  202. <el-select
  203. v-model="queryParams.fInvnosStatus"
  204. filterable
  205. clearable
  206. placeholder="请选择发票状态"
  207. style="width: 100%"
  208. @clear="queryParams.fInvnosStatus = null"
  209. >
  210. <el-option label="已开票" :value="1"/>
  211. <el-option label="未开票" :value="2"/>
  212. </el-select>
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="6">
  216. <el-form-item label="发货方">
  217. <el-select
  218. v-model="queryParams.fShipper"
  219. clearable
  220. filterable
  221. placeholder="请输入关键词"
  222. style="width: 100%"
  223. allow-create
  224. default-first-option
  225. >
  226. <el-option
  227. v-for="(item, index) in fMblnoOptions"
  228. :key="index.fId"
  229. :label="item.fCname"
  230. :value="item.fCname"
  231. ></el-option>
  232. </el-select>
  233. </el-form-item>
  234. </el-col>
  235. </el-row>
  236. </div>
  237. </el-collapse-transition>
  238. </el-form>
  239. <el-row :gutter="10" style="padding-bottom: 10px">
  240. <el-col :span="1.5">
  241. <el-button
  242. type="warning"
  243. icon="el-icon-download"
  244. size="mini"
  245. @click="handleExport"
  246. >导出</el-button>
  247. <el-button
  248. type="primary"
  249. icon="el-icon-download"
  250. size="mini"
  251. @click="handleSubItemExport"
  252. >导出分项</el-button>
  253. </el-col>
  254. <div class="tabSetting">
  255. <div style="margin-right: 20px">
  256. <el-button
  257. type="cyan"
  258. icon="el-icon-search"
  259. size="mini"
  260. @click="handleQuery"
  261. >搜索</el-button
  262. >
  263. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  264. >重置</el-button
  265. >
  266. <el-button
  267. v-show="show"
  268. @click="show = !show"
  269. icon="el-icon-arrow-up"
  270. size="mini"
  271. >展开</el-button
  272. >
  273. <el-button
  274. v-show="!show"
  275. @click="show = !show"
  276. icon="el-icon-arrow-down"
  277. size="mini"
  278. >展开</el-button
  279. >
  280. </div>
  281. <right-toolbar
  282. :showSearch.sync="showSearch"
  283. @queryTable="getList"
  284. ></right-toolbar>
  285. <div style="margin: 0 12px">
  286. <el-button
  287. icon="el-icon-setting"
  288. size="mini"
  289. circle
  290. @click="showSetting = !showSetting"
  291. ></el-button>
  292. </div>
  293. </div>
  294. </el-row>
  295. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  296. <div>配置排序列数据(拖动调整顺序)</div>
  297. <div style="margin-left: 17px">
  298. <el-checkbox
  299. v-model="allCheck"
  300. label="全选"
  301. @change="allChecked"
  302. ></el-checkbox>
  303. </div>
  304. <div style="padding: 4px; display: flex; justify-content: center">
  305. <draggable
  306. v-model="setRowList"
  307. group="site"
  308. animation="300"
  309. @start="onStart"
  310. @end="onEnd"
  311. handle=".indraggable"
  312. >
  313. <transition-group>
  314. <div
  315. v-for="item in setRowList"
  316. :key="item.surface"
  317. class="listStyle"
  318. >
  319. <div style="width: 500px" class="indraggable">
  320. <div class="progress" :style="{ width: item.width + 'px' }">
  321. <el-checkbox
  322. :label="item.name"
  323. v-model="item.checked"
  324. :true-label="0"
  325. :false-label="1"
  326. >{{ item.name }}
  327. </el-checkbox>
  328. </div>
  329. </div>
  330. <el-input-number
  331. v-model.number="item.width"
  332. controls-position="right"
  333. :min="1"
  334. :max="500"
  335. size="mini"
  336. ></el-input-number>
  337. </div>
  338. </transition-group>
  339. </draggable>
  340. </div>
  341. <span slot="footer" class="dialog-footer">
  342. <el-button @click="showSetting = false">取 消</el-button>
  343. <el-button @click="delRow" type="danger">重 置</el-button>
  344. <el-button type="primary" @click="save()">确 定</el-button>
  345. </span>
  346. </el-dialog>
  347. <el-table
  348. v-loading="loading"
  349. :data="dataList"
  350. style="width: 100%"
  351. ref="table"
  352. :height="tableHeight"
  353. stripe
  354. show-summary
  355. :summary-method="getSum"
  356. >
  357. <el-table-column
  358. type="index"
  359. width="50">
  360. </el-table-column>
  361. <el-table-column
  362. v-for="(item, index) in getRowList"
  363. :key="index"
  364. :label="item.name"
  365. :width="item.width"
  366. :prop="item.label"
  367. align="center"
  368. :show-overflow-tooltip="true"
  369. sortable
  370. :fixed="item.fixed"
  371. >
  372. <template slot-scope="scope">
  373. <span v-if="item.label == 'fDc'">
  374. {{ scope.row.fDc == 'D'? '收': '付' }}
  375. </span>
  376. <span v-else-if="item.label == 'fFeeunitid'">
  377. {{ scope.row.fFeeunitid | fFeeUnitFormat(fFeetUnitOptions) }}
  378. </span>
  379. <span v-else-if="item.label == 'fBilltype'">
  380. {{ scope.row.fBilltype | billTypeFormat(billTypeList) }}
  381. </span>
  382. <span v-else-if="item.label == 'fStltypeid'">
  383. {{ scope.row.fStltypeid | fStltypeFormat(fStltypeOptions) }}
  384. </span>
  385. <span v-else>{{ scope.row[item.label] }}</span>
  386. </template>
  387. </el-table-column>
  388. </el-table>
  389. <pagination
  390. v-show="total > 0"
  391. :total="total"
  392. :page.sync="queryParams.pageNum"
  393. :limit.sync="queryParams.pageSize"
  394. @pagination="getList"
  395. />
  396. </div>
  397. </template>
  398. <script>
  399. import Cookies from "js-cookie";
  400. import draggable from "vuedraggable";
  401. import { addSet, resetModule, select } from '@/api/system/set';
  402. import {listCorps} from "@/api/basicdata/corps";
  403. import { getList, exportList, exportSubItemList } from '@/api/finance/query'
  404. import {listFees} from "@/api/basicdata/fees";
  405. export default {
  406. name: "index",
  407. components: {
  408. draggable,
  409. },
  410. data() {
  411. return {
  412. // 表格高度
  413. tableHeight: 0,
  414. // 总条数
  415. total: 0,
  416. // 查询参数
  417. queryParams: {
  418. pageNum: 1,
  419. pageSize: 10,
  420. fDc: "D",
  421. },
  422. showSearch: true,
  423. // 搜索展开/隐藏
  424. show: false,
  425. // 自定义列弹窗显示
  426. showSetting: false,
  427. //自定义列宽
  428. allCheck: false,
  429. setRowList: [],
  430. getRowList: [],
  431. drag: false,
  432. tableDate: [
  433. {
  434. surface: "1",
  435. label: "corpName",
  436. name: "客户名称",
  437. checked: 0,
  438. width: 140,
  439. },
  440. {
  441. surface: "2",
  442. label: "fMblno",
  443. name: "提单号",
  444. checked: 0,
  445. width: 180,
  446. }, {
  447. surface: "3",
  448. label: "fBsdate",
  449. name: "业务日期",
  450. checked: 0,
  451. width: 100,
  452. },{
  453. surface: "4",
  454. label: "fReviewDate",
  455. name: "审核日期",
  456. checked: 0,
  457. width: 100,
  458. },{
  459. surface: "5",
  460. label: "feeName",
  461. name: "费用名称",
  462. checked: 0,
  463. width: 100,
  464. },
  465. {
  466. surface: "6",
  467. label: "fBillstatusName",
  468. name: "费用状态",
  469. checked: 0,
  470. width: 100,
  471. },{
  472. surface: "6",
  473. label: "fDc",
  474. name: "收/付",
  475. checked: 0,
  476. width: 100,
  477. },
  478. {
  479. surface: "7",
  480. label: "fAmount",
  481. name: "金额",
  482. checked: 0,
  483. width: 100,
  484. },
  485. {
  486. surface: "8",
  487. label: "fStlamount",
  488. name: "结算金额",
  489. checked: 0,
  490. width: 100,
  491. },
  492. {
  493. surface: "9",
  494. label: "fStlamountDate",
  495. name: "结算日期",
  496. checked: 0,
  497. width: 100,
  498. },
  499. {
  500. surface: "10",
  501. label: "fInvamount",
  502. name: "开票金额",
  503. checked: 0,
  504. width: 100,
  505. },
  506. {
  507. surface: "11",
  508. label: "fInvnos",
  509. name: "发票号",
  510. checked: 0,
  511. width: 100,
  512. },
  513. {
  514. surface: "12",
  515. label: "fAccamount",
  516. name: "对账金额",
  517. checked: 0,
  518. width: 100,
  519. },
  520. {
  521. surface: "13",
  522. label: "fAccamountDate",
  523. name: "对账日期",
  524. checked: 0,
  525. width: 100,
  526. },
  527. {
  528. surface: "14",
  529. label: "fStatementNo",
  530. name: "对账单号",
  531. checked: 0,
  532. width: 100,
  533. },
  534. {
  535. surface: "15",
  536. label: "fFeeunitid",
  537. name: "计价单位",
  538. checked: 0,
  539. width: 100,
  540. },
  541. {
  542. surface: "16",
  543. label: "fQty",
  544. name: "数量",
  545. checked: 0,
  546. width: 100,
  547. },
  548. {
  549. surface: "17",
  550. label: "fUnitprice",
  551. name: "单价",
  552. checked: 0,
  553. width: 100,
  554. },
  555. {
  556. surface: "18",
  557. label: "fBilltype",
  558. name: "业务类型",
  559. checked: 0,
  560. width: 100,
  561. },
  562. {
  563. surface: "18",
  564. label: "fStltypeid",
  565. name: "结算方式",
  566. checked: 0,
  567. width: 100,
  568. },
  569. {
  570. surface: "19",
  571. label: "fProductName",
  572. name: "货物名称",
  573. checked: 0,
  574. width: 100,
  575. },
  576. {
  577. surface: "20",
  578. label: "fShipper",
  579. name: "发货方(货主)",
  580. checked: 0,
  581. width: 130,
  582. },
  583. {
  584. surface: "20",
  585. label: "remark",
  586. name: "备注",
  587. checked: 0,
  588. width: 100,
  589. },
  590. ],
  591. // 计价单位
  592. fFeetUnitOptions: [],
  593. fMblnoOptions: [],
  594. loading: false,
  595. dataList: [],
  596. billTypeList: [],
  597. fNameOptions:[],
  598. fStltypeOptions: [],
  599. fCorpOptions: [],
  600. }
  601. },
  602. created() {
  603. this.setRowList = this.tableDate;
  604. this.getRowList = this.tableDate;
  605. this.getRow()
  606. this.getList()
  607. listCorps({type: 1}).then((response) => {
  608. this.fMblnoOptions = response.rows;
  609. });
  610. listFees().then((response) => {
  611. this.fNameOptions = response.rows;
  612. });
  613. this.getDicts("data_unitfees").then((response) => {
  614. this.fFeetUnitOptions = response.data;
  615. });
  616. this.getDicts("data_billtype_type").then((response) => {
  617. this.billTypeList = response.data;
  618. });
  619. this.getDicts("data_stltype_type").then((response) => {
  620. this.fStltypeOptions = response.data;
  621. });
  622. },
  623. mounted() {
  624. this.$nextTick(() => {
  625. let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
  626. this.tableHeight = windowHeight - 280;
  627. // 监听浏览器高度变化,改变表格高度
  628. window.onresize = () => {
  629. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
  630. }
  631. })
  632. },
  633. updated() {
  634. this.$nextTick(() => {
  635. this.$refs.table.doLayout();
  636. })
  637. },
  638. filters: {
  639. fFeeUnitFormat(row, fFeetUnitOptions) {
  640. let name;
  641. fFeetUnitOptions.map((e) => {
  642. if (row == e.dictValue) {
  643. name = e.dictLabel;
  644. }
  645. });
  646. return name;
  647. },
  648. billTypeFormat(row, billTypeList) {
  649. let type;
  650. billTypeList.map((e) => {
  651. if (row == e.dictValue) {
  652. type = e.dictLabel;
  653. }
  654. });
  655. return type;
  656. },
  657. fStltypeFormat(row, fStltypeOptions) {
  658. let name;
  659. fStltypeOptions.map(e => {
  660. if (row == e.dictValue) {
  661. name = e.dictLabel
  662. }
  663. });
  664. return name;
  665. },
  666. },
  667. methods: {
  668. getList() {
  669. this.loading = true
  670. getList(this.queryParams).then(res => {
  671. this.dataList = res.rows
  672. this.total = res.total
  673. this.loading = false;
  674. })
  675. },
  676. /** 搜索按钮操作 */
  677. handleQuery() {
  678. this.queryParams.pageNum = 1;
  679. this.queryParams.pageSize = 10;
  680. this.getList();
  681. },
  682. /** 重置按钮操作 */
  683. resetQuery() {
  684. this.queryParams = {
  685. pageNum: 1,
  686. pageSize: 10,
  687. fDc: "D",
  688. }
  689. this.resetForm("queryForm");
  690. this.handleQuery();
  691. },
  692. // 导出
  693. handleExport() {
  694. this.$confirm("是否确认导出所有账单明细数据项?", "警告", {
  695. confirmButtonText: "确定",
  696. cancelButtonText: "取消",
  697. type: "warning",
  698. }).then(() => {
  699. return exportList(this.queryParams)
  700. }).then(res => {
  701. this.download(res.msg)
  702. })
  703. },
  704. // 分项导出
  705. handleSubItemExport(){
  706. this.$confirm("是否确认导出分项所有账单明细数据项?","警告",{
  707. confirmButtonText: "确定",
  708. cancelButtonText: "取消",
  709. type: "warning",
  710. }).then(()=> {
  711. return exportSubItemList(this.queryParams)
  712. }).then(res => {
  713. this.download(res.msg)
  714. })
  715. },
  716. // 表格合计
  717. getSum(param) {
  718. const { columns, data } = param;
  719. const sums = [];
  720. var values = [];
  721. columns.forEach((column, index) => {
  722. if (index === 0) {
  723. sums[index] = "合计";
  724. return;
  725. }
  726. if (column.property === "fAmount") {
  727. values = data.map((item) => Number(item["fAmount"]));
  728. }
  729. if (column.property === "fStlamount") {
  730. values = data.map((item) => Number(item["fStlamount"]));
  731. }
  732. if (column.property === "fInvamount") {
  733. values = data.map((item) => Number(item["fInvamount"]));
  734. }
  735. if (column.property === "fAccamount") {
  736. values = data.map((item) => Number(item.fAccamount));
  737. }
  738. if (column.property === "fQty") {
  739. values = data.map((item) => Number(item.fQty));
  740. }
  741. if (
  742. column.property === "fAmount" ||
  743. column.property === "fStlamount" ||
  744. column.property === "fInvamount" ||
  745. column.property === "fAccamount" ||
  746. column.property === "fQty"
  747. ) {
  748. sums[index] = values.reduce((prev, curr) => {
  749. const value = Number(curr);
  750. if (!isNaN(value)) {
  751. return prev + curr;
  752. } else {
  753. return prev;
  754. }
  755. }, 0);
  756. if (column.property === "fAmount") {
  757. sums[index] = (sums[index]).toFixed(2);
  758. }
  759. if (column.property === "fStlamount") {
  760. sums[index] = (sums[index]).toFixed(2);
  761. }
  762. if (column.property === "fInvamount") {
  763. sums[index] = (sums[index]).toFixed(2);
  764. }
  765. if (column.property === "fAccamount") {
  766. sums[index] = (sums[index]).toFixed(2);
  767. }
  768. if (column.property === "fQty") {
  769. sums[index] = sums[index];
  770. }
  771. }
  772. });
  773. return sums;
  774. },
  775. //列设置全选
  776. allChecked() {
  777. if (this.allCheck == true) {
  778. this.setRowList.map((e) => {
  779. return (e.checked = 0);
  780. });
  781. } else {
  782. this.setRowList.map((e) => {
  783. return (e.checked = 1);
  784. });
  785. }
  786. },
  787. //开始拖拽事件
  788. onStart() {
  789. this.drag = true;
  790. },
  791. //拖拽结束事件
  792. onEnd() {
  793. this.drag = false;
  794. },
  795. //重置列表
  796. delRow() {
  797. this.data = {
  798. tableName: "财务查询",
  799. userId: Cookies.get("userName"),
  800. };
  801. resetModule(this.data).then((res) => {
  802. if (res.code == 200) {
  803. this.showSetting = false;
  804. this.setRowList = this.tableDate;
  805. console.log(this.setRowList)
  806. this.getRowList = this.tableDate;
  807. }
  808. });
  809. },
  810. //保存列设置
  811. save() {
  812. this.showSetting = false;
  813. this.data = {
  814. tableName: "财务查询",
  815. userId: Cookies.get("userName"),
  816. sysTableSetList: this.setRowList,
  817. };
  818. addSet(this.data).then((res) => {
  819. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  820. });
  821. },
  822. //查询列数据
  823. getRow() {
  824. let that = this;
  825. this.data = {
  826. tableName: "财务查询",
  827. userId: Cookies.get("userName"),
  828. };
  829. select(this.data).then((res) => {
  830. if (res.data.length != 0) {
  831. this.getRowList = res.data.filter((e) => e.checked == 0);
  832. this.setRowList = res.data;
  833. this.setRowList = this.setRowList.reduce((res, item) => {
  834. res.push({
  835. surface: item.surface,
  836. label: item.label,
  837. name: item.name,
  838. checked: item.checked,
  839. width: item.width,
  840. fixed: item.fixed,
  841. });
  842. return res;
  843. }, []);
  844. }
  845. });
  846. },
  847. },
  848. }
  849. </script>
  850. <style scoped>
  851. </style>