standbook_list.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <template>
  2. <div class="app-container">
  3. <span>台账</span>
  4. <el-divider></el-divider>
  5. <!-- <el-radio-group v-model="mainId" size="">
  6. <el-radio-button
  7. v-for="(v, i) in dictList"
  8. :key="i"
  9. :label="v.dictCode"
  10. >{{ v.dictValue }}</el-radio-button
  11. >
  12. </el-radio-group>
  13. <br /><br /> -->
  14. <el-radio-group v-model="bill" @change="checkFn" size="">
  15. <el-radio-button label="COMMONLY">货款台账</el-radio-button>
  16. <el-radio-button label="REBATE">返利台账</el-radio-button>
  17. </el-radio-group>
  18. <h1></h1>
  19. <!-- 筛选条件 -->
  20. <div>
  21. <el-form
  22. ref="searchForm"
  23. :model="searchForm"
  24. label-width="100px"
  25. size="small"
  26. label-position="left"
  27. >
  28. <el-row :gutter="20">
  29. <el-col :xs="24" :sm="12" :lg="6">
  30. <el-form-item label="经销商名称" prop="customerId">
  31. <el-select
  32. :disabled="isDisabled"
  33. class="selectStyle"
  34. v-model="searchForm.customerId"
  35. placeholder="请选择"
  36. filterable
  37. @change="changeFn"
  38. >
  39. <el-option
  40. v-for="(v, i) in customerList"
  41. :key="i"
  42. :label="v.name"
  43. :value="v.id"
  44. >
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :xs="24" :sm="12" :lg="6">
  50. <el-form-item label="钱包" prop="customerWalletId">
  51. <el-select
  52. class="selectStyle"
  53. v-model="searchForm.customerWalletId"
  54. placeholder="请选择"
  55. filterable
  56. >
  57. <el-option
  58. v-for="(v, i) in walletList"
  59. :key="i"
  60. :label="v.customerWalletName"
  61. :value="v.customerWalletId"
  62. >
  63. </el-option>
  64. </el-select>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :xs="24" :sm="12" :lg="6">
  68. <el-form-item label="单据号" prop="billNo">
  69. <el-input
  70. v-model="searchForm.billNo"
  71. placeholder="请输入"
  72. ></el-input>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :xs="24" :sm="12" :lg="6">
  76. <el-form-item label="开始时间" prop="startTime">
  77. <el-date-picker
  78. class="selectStyle"
  79. v-model="searchForm.startTime"
  80. type="datetime"
  81. placeholder="选择日期时间"
  82. default-time="00:00:00"
  83. value-format="yyyy-MM-dd HH:mm:ss"
  84. >
  85. </el-date-picker>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :xs="24" :sm="12" :lg="6">
  89. <el-form-item label="结束时间" prop="endTime">
  90. <el-date-picker
  91. class="selectStyle"
  92. v-model="searchForm.endTime"
  93. type="datetime"
  94. placeholder="选择日期时间"
  95. default-time="23:59:59"
  96. value-format="yyyy-MM-dd HH:mm:ss"
  97. >
  98. </el-date-picker>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :xs="24" :sm="12" :lg="18">
  102. <el-form-item label="" class="fr">
  103. <el-button size="small" @click="resetFn">清空</el-button>
  104. <el-button size="small" type="primary" @click="searchFn"
  105. >搜索</el-button
  106. >
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. </el-form>
  111. </div>
  112. <div v-show="bill == 'COMMONLY'">
  113. <!-- 列表 -->
  114. <div class="mymain-container">
  115. <div class="table">
  116. <el-table
  117. v-loading="listLoading"
  118. :data="dataList"
  119. element-loading-text="Loading"
  120. border
  121. fit
  122. highlight-current-row
  123. stripe
  124. >
  125. <el-table-column
  126. label="序号"
  127. align="center"
  128. width="100"
  129. type="index"
  130. show-overflow-tooltip
  131. ></el-table-column>
  132. <el-table-column
  133. align="center"
  134. label="单据日期"
  135. prop="theTime"
  136. min-width="160"
  137. show-overflow-tooltip
  138. ></el-table-column>
  139. <el-table-column
  140. align="center"
  141. label="单据类型"
  142. prop="billType"
  143. min-width="160"
  144. show-overflow-tooltip
  145. ></el-table-column>
  146. <el-table-column
  147. align="center"
  148. label="单据号"
  149. prop="billNo"
  150. min-width="160"
  151. show-overflow-tooltip
  152. ></el-table-column>
  153. <el-table-column
  154. align="center"
  155. label="钱包"
  156. prop="walletName"
  157. min-width="160"
  158. show-overflow-tooltip
  159. ></el-table-column>
  160. <el-table-column
  161. align="center"
  162. label="摘要"
  163. prop="remark"
  164. min-width="160"
  165. show-overflow-tooltip
  166. ></el-table-column>
  167. <el-table-column
  168. align="center"
  169. label="预付货款"
  170. prop="flag"
  171. min-width="160"
  172. show-overflow-tooltip
  173. >
  174. <template slot-scope="scope">
  175. {{
  176. scope.row.flag == 1
  177. ? scope.row.amountType == "IN"
  178. ? scope.row.amount
  179. : scope.row.amountType == "OUT"
  180. ? -scope.row.amount
  181. : ""
  182. : "-"
  183. }}
  184. </template>
  185. </el-table-column>
  186. <el-table-column
  187. align="center"
  188. label="订单占款"
  189. prop="flag"
  190. min-width="160"
  191. show-overflow-tooltip
  192. >
  193. <template slot-scope="scope">
  194. {{
  195. scope.row.flag == 2
  196. ? scope.row.amountType == "IN"
  197. ? scope.row.amount
  198. : scope.row.amountType == "OUT"
  199. ? -scope.row.amount
  200. : ""
  201. : "-"
  202. }}
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. align="center"
  207. label="支付货款"
  208. prop="flag"
  209. min-width="160"
  210. show-overflow-tooltip
  211. >
  212. <template slot-scope="scope">
  213. {{
  214. scope.row.flag == 3
  215. ? scope.row.amountType == "IN"
  216. ? scope.row.amount
  217. : scope.row.amountType == "OUT"
  218. ? -scope.row.amount
  219. : ""
  220. : "-"
  221. }}
  222. </template>
  223. </el-table-column>
  224. <el-table-column
  225. align="center"
  226. label="押金"
  227. prop="flag"
  228. min-width="160"
  229. show-overflow-tooltip
  230. >
  231. <template slot-scope="scope">
  232. {{
  233. scope.row.flag == 4
  234. ? scope.row.amountType == "IN"
  235. ? scope.row.amount
  236. : scope.row.amountType == "OUT"
  237. ? -scope.row.amount
  238. : ""
  239. : "-"
  240. }}
  241. </template>
  242. </el-table-column>
  243. <el-table-column
  244. align="center"
  245. label="工程保证金"
  246. prop="flag"
  247. min-width="160"
  248. show-overflow-tooltip
  249. >
  250. <template slot-scope="scope">
  251. {{
  252. scope.row.flag == 5
  253. ? scope.row.amountType == "IN"
  254. ? scope.row.amount
  255. : scope.row.amountType == "OUT"
  256. ? -scope.row.amount
  257. : ""
  258. : "-"
  259. }}
  260. </template>
  261. </el-table-column>
  262. <el-table-column
  263. align="center"
  264. label="其他暂扣款"
  265. prop="flag"
  266. min-width="160"
  267. show-overflow-tooltip
  268. >
  269. <template slot-scope="scope">
  270. {{
  271. scope.row.flag == 6
  272. ? scope.row.amountType == "IN"
  273. ? scope.row.amount
  274. : scope.row.amountType == "OUT"
  275. ? -scope.row.amount
  276. : ""
  277. : "-"
  278. }}
  279. </template>
  280. </el-table-column>
  281. <el-table-column
  282. align="center"
  283. label="账户余额"
  284. prop="balanceAmount"
  285. min-width="160"
  286. show-overflow-tooltip
  287. ></el-table-column>
  288. </el-table>
  289. </div>
  290. <!-- 分页 -->
  291. <div class="fr">
  292. <el-pagination
  293. @size-change="handleSizeChange"
  294. @current-change="handleCurrentChange"
  295. :current-page="currentPage"
  296. :page-sizes="[10, 20, 30, 50]"
  297. :page-size="10"
  298. layout="total, sizes, prev, pager, next, jumper"
  299. :total="listTotal"
  300. >
  301. </el-pagination>
  302. </div>
  303. </div>
  304. </div>
  305. <div v-show="bill == 'REBATE'">
  306. <!-- 列表 -->
  307. <div class="mymain-container">
  308. <div class="table">
  309. <el-table
  310. v-loading="listLoading"
  311. :data="dataList"
  312. element-loading-text="Loading"
  313. border
  314. fit
  315. highlight-current-row
  316. stripe
  317. >
  318. <el-table-column
  319. label="序号"
  320. align="center"
  321. width="100"
  322. type="index"
  323. show-overflow-tooltip
  324. ></el-table-column>
  325. <el-table-column
  326. align="center"
  327. label="客户编码"
  328. prop="customerCode"
  329. min-width="160"
  330. show-overflow-tooltip
  331. ></el-table-column>
  332. <el-table-column
  333. align="center"
  334. label="客户名称"
  335. prop="customerName"
  336. min-width="160"
  337. show-overflow-tooltip
  338. ></el-table-column>
  339. <el-table-column
  340. align="center"
  341. label="单据日期"
  342. prop="theTime"
  343. min-width="160"
  344. show-overflow-tooltip
  345. ></el-table-column>
  346. <el-table-column
  347. align="center"
  348. label="审核日期"
  349. prop="examineTime"
  350. min-width="160"
  351. show-overflow-tooltip
  352. ></el-table-column>
  353. <el-table-column
  354. align="center"
  355. label="单据类型"
  356. prop="billType"
  357. min-width="160"
  358. show-overflow-tooltip
  359. >
  360. <template slot-scope="scope">
  361. {{ scope.row.billType == 3 ? "付款单" : scope.row.billType }}
  362. </template>
  363. </el-table-column>
  364. <el-table-column
  365. align="center"
  366. label="单据号"
  367. prop="billNo"
  368. min-width="160"
  369. show-overflow-tooltip
  370. ></el-table-column>
  371. <el-table-column
  372. align="center"
  373. label="返利类型"
  374. prop="walletName"
  375. min-width="160"
  376. show-overflow-tooltip
  377. ></el-table-column>
  378. <el-table-column
  379. align="center"
  380. label="摘要"
  381. prop="remark"
  382. min-width="160"
  383. show-overflow-tooltip
  384. ></el-table-column>
  385. <el-table-column
  386. align="center"
  387. label="收入"
  388. prop="amountType"
  389. min-width="160"
  390. show-overflow-tooltip
  391. >
  392. <template slot-scope="scope">
  393. {{ scope.row.amountType == "IN" ? scope.row.amount : "-" }}
  394. </template>
  395. </el-table-column>
  396. <el-table-column
  397. align="center"
  398. label="支出"
  399. prop="amountType"
  400. min-width="160"
  401. show-overflow-tooltip
  402. >
  403. <template slot-scope="scope">
  404. {{ scope.row.amountType == "OUT" ? scope.row.amount : "-" }}
  405. </template>
  406. </el-table-column>
  407. <el-table-column
  408. align="center"
  409. label="暂扣返利"
  410. prop="withholdAmount"
  411. min-width="160"
  412. show-overflow-tooltip
  413. >
  414. <!-- <template slot-scope="scope">
  415. {{
  416. scope.row.amountType == "OUT"
  417. ? scope.row.amount
  418. : -scope.row.amount
  419. }}
  420. </template> -->
  421. </el-table-column>
  422. <el-table-column
  423. align="center"
  424. label="结存"
  425. prop="balanceAmount"
  426. min-width="160"
  427. show-overflow-tooltip
  428. ></el-table-column>
  429. </el-table>
  430. </div>
  431. <!-- 分页 -->
  432. <div class="fr">
  433. <el-pagination
  434. @size-change="handleSizeChange"
  435. @current-change="handleCurrentChange"
  436. :current-page="currentPage"
  437. :page-sizes="[10, 20, 30, 50]"
  438. :page-size="10"
  439. layout="total, sizes, prev, pager, next, jumper"
  440. :total="listTotal"
  441. >
  442. </el-pagination>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </template>
  448. <script>
  449. // import { mapGetters } from "vuex";
  450. import { getWalletCustomerList } from "@/api/finance/change_apply";
  451. import {
  452. getStandbookList,
  453. getDictList,
  454. getCustomerList,
  455. } from "@/api/finance/standbook_list";
  456. export default {
  457. data() {
  458. return {
  459. customerList: [],
  460. currentPage: 1, // 当前页码
  461. pageSize: 10, // 每页数量
  462. listTotal: 0, // 列表总数
  463. // dataListRebate: [], // 列表数据
  464. // dataListLoan: [], // 列表数据
  465. dataList: [],
  466. walletList: [],
  467. // dictList: [],
  468. customerName: "",
  469. customerNumber: "",
  470. searchForm: {
  471. customerId: "",
  472. customerWalletId: "",
  473. billNo: "",
  474. startTime: "",
  475. endTime: "",
  476. }, //搜索表单
  477. listLoading: false, // 列表加载loading
  478. bill: "COMMONLY",
  479. isCustomer: JSON.parse(localStorage.getItem("supply_user")).isCustomer,
  480. isDisabled: false,
  481. };
  482. },
  483. beforeRouteEnter(to, from, next) {
  484. // console.log(to, from, next, 898);
  485. next((vm) => {
  486. // 这个时候组件还没有创建,所以要通过vm来访问
  487. console.log(vm);
  488. if (
  489. from.path == "/finance/details/balance_sum" &&
  490. to.path == "/finance/details/standbook_list"
  491. ) {
  492. //只有是从A进到B页面才执行
  493. // 将要执行的逻辑
  494. vm.isDisabled = true;
  495. vm.searchForm.customerId = vm.$route.query.customerName;
  496. vm.changeFn(vm.$route.query.customerId);
  497. vm.getDataList({
  498. pageSize: vm.pageSize,
  499. pageNum: vm.currentPage,
  500. type: vm.bill,
  501. customerName: vm.$route.query.customerName,
  502. customerNumber: vm.$route.query.customerNumber,
  503. });
  504. } else if (vm.isCustomer) {
  505. vm.isDisabled = true;
  506. vm.searchForm.customerId = vm.$store.state.user.customerName;
  507. vm.changeFn(vm.$store.state.user.customerId);
  508. vm.getDataList({
  509. pageSize: vm.pageSize,
  510. pageNum: vm.currentPage,
  511. type: vm.bill,
  512. customerName: vm.$store.state.user.customerName,
  513. customerNumber: vm.$store.state.user.customerNumber,
  514. });
  515. } else {
  516. vm.searchForm.customerId = "";
  517. vm.isDisabled = false;
  518. vm.getDataList({
  519. pageSize: vm.pageSize,
  520. pageNum: vm.currentPage,
  521. type: vm.bill,
  522. });
  523. vm.getCustomerDataList();
  524. }
  525. });
  526. },
  527. created() {
  528. // console.log(
  529. // this.customerId,
  530. // this.$store.state.user.customerName,
  531. // this.$store.state.user.customerNumber,
  532. // 777777
  533. // );
  534. // if (this.$route.query.customerName && this.$route.query.customerNumber) {
  535. // this.isDisabled = true;
  536. // this.searchForm.customerId = this.$route.query.customerName;
  537. // this.changeFn(this.$route.query.customerId);
  538. // this.getDataList({
  539. // pageSize: this.pageSize,
  540. // pageNum: this.currentPage,
  541. // type: this.bill,
  542. // customerName: this.$route.query.customerName,
  543. // customerNumber: this.$route.query.customerNumber,
  544. // });
  545. // } else
  546. // if (this.isCustomer) {
  547. // this.isDisabled = true;
  548. // this.searchForm.customerId = this.$store.state.user.customerName;
  549. // this.changeFn(this.$store.state.user.customerId);
  550. // this.getDataList({
  551. // pageSize: this.pageSize,
  552. // pageNum: this.currentPage,
  553. // type: this.bill,
  554. // customerName: this.$store.state.user.customerName,
  555. // customerNumber: this.$store.state.user.customerNumber,
  556. // });
  557. // } else {
  558. // this.getDataList({
  559. // pageSize: this.pageSize,
  560. // pageNum: this.currentPage,
  561. // type: this.bill,
  562. // });
  563. // this.getCustomerDataList();
  564. // }
  565. // this.getCustomerDataList();
  566. // this.getWalletList();
  567. // this.getDataDict();
  568. },
  569. methods: {
  570. // //合计
  571. // getSummaries(param) {
  572. // console.log(this.$getSummaries, 333333333);
  573. // console.log(param, "param");
  574. // // const { columns, data } = param;
  575. // // const sums = [];
  576. // // columns.forEach((column, index) => {
  577. // // if (index === 0) {
  578. // // sums[index] = "总价";
  579. // // return;
  580. // // }
  581. // // const values = data.map((item) => Number(item[column.property]));
  582. // // if (!values.every((value) => isNaN(value))) {
  583. // // sums[index] = values.reduce((prev, curr) => {
  584. // // const value = Number(curr);
  585. // // if (!isNaN(value)) {
  586. // // return prev + curr;
  587. // // } else {
  588. // // return prev;
  589. // // }
  590. // // }, 0);
  591. // // sums[index] += " 元";
  592. // // } else {
  593. // // sums[index] = "N/A";
  594. // // }
  595. // // });
  596. // // return sums;
  597. // },
  598. //改变经销商
  599. async changeFn(v) {
  600. this.searchForm.customerWalletId = "";
  601. let res = await getWalletCustomerList({
  602. customerId: v,
  603. type: this.bill,
  604. hasRecord: true,
  605. });
  606. this.walletList = res.data;
  607. },
  608. //获取经销商列表
  609. async getCustomerDataList() {
  610. let res = await getCustomerList({
  611. pageNum: 1,
  612. pageSize: -1,
  613. });
  614. this.customerList = res.data.records;
  615. },
  616. // 更改每页数量
  617. handleSizeChange(val) {
  618. this.pageSize = val;
  619. this.currentPage = 1;
  620. // this.getDataList({
  621. // type: this.bill,
  622. // pageNum: this.currentPage,
  623. // pageSize: this.pageSize,
  624. // });
  625. if (this.$route.query.customerName && this.$route.query.customerNumber) {
  626. this.getDataList({
  627. ...this.searchForm,
  628. pageSize: this.pageSize,
  629. pageNum: this.currentPage,
  630. type: this.bill,
  631. customerName: this.$route.query.customerName,
  632. customerNumber: this.$route.query.customerNumber,
  633. });
  634. } else if (this.isCustomer) {
  635. this.getDataList({
  636. ...this.searchForm,
  637. pageSize: this.pageSize,
  638. pageNum: this.currentPage,
  639. type: this.bill,
  640. customerName: this.$store.state.user.customerName,
  641. customerNumber: this.$store.state.user.customerNumber,
  642. });
  643. } else {
  644. this.getDataList({
  645. ...this.searchForm,
  646. pageSize: this.pageSize,
  647. pageNum: this.currentPage,
  648. type: this.bill,
  649. customerName: this.customerName,
  650. customerNumber: this.customerNumber,
  651. });
  652. }
  653. },
  654. // 更改当前页
  655. handleCurrentChange(val) {
  656. this.currentPage = val;
  657. // this.getDataList({
  658. // type: this.bill,
  659. // pageNum: this.currentPage,
  660. // pageSize: this.pageSize,
  661. // });
  662. if (this.$route.query.customerName && this.$route.query.customerNumber) {
  663. this.getDataList({
  664. ...this.searchForm,
  665. pageSize: this.pageSize,
  666. pageNum: this.currentPage,
  667. type: this.bill,
  668. customerName: this.$route.query.customerName,
  669. customerNumber: this.$route.query.customerNumber,
  670. });
  671. } else if (this.isCustomer) {
  672. this.getDataList({
  673. ...this.searchForm,
  674. pageSize: this.pageSize,
  675. pageNum: this.currentPage,
  676. type: this.bill,
  677. customerName: this.$store.state.user.customerName,
  678. customerNumber: this.$store.state.user.customerNumber,
  679. });
  680. } else {
  681. this.getDataList({
  682. ...this.searchForm,
  683. pageSize: this.pageSize,
  684. pageNum: this.currentPage,
  685. type: this.bill,
  686. customerName: this.customerName,
  687. customerNumber: this.customerNumber,
  688. });
  689. }
  690. },
  691. // //获取品类
  692. // async getDataDict() {
  693. // const res = await getDictList({ sysDictEnum: "PRODUCT_TYPE" });
  694. // console.log(res);
  695. // this.dictList = res.data;
  696. // },
  697. //重置
  698. async resetFn() {
  699. // this.searchForm.customerId = "";
  700. // this.walletList = [];
  701. // this.customerName = "";
  702. // this.customerNumber = "";
  703. if (this.isCustomer || this.$route.query.customerId) {
  704. await this.$refs.searchForm.resetFields();
  705. } else {
  706. this.walletList = [];
  707. this.customerName = "";
  708. this.customerNumber = "";
  709. await this.$refs.searchForm.resetFields();
  710. }
  711. },
  712. //查询
  713. searchFn() {
  714. // this.customerName = null;
  715. // this.customerNumber = null;
  716. let res = this.customerList.filter((v) => {
  717. return v.id == this.searchForm.customerId;
  718. });
  719. console.log(res);
  720. // return;
  721. if (res.length > 0) {
  722. this.customerName = res[0].name;
  723. this.customerNumber = res[0].number;
  724. }
  725. if (this.$route.query.customerName && this.$route.query.customerNumber) {
  726. this.getDataList({
  727. ...this.searchForm,
  728. pageSize: this.pageSize,
  729. pageNum: this.currentPage,
  730. type: this.bill,
  731. customerName: this.$route.query.customerName,
  732. customerNumber: this.$route.query.customerNumber,
  733. });
  734. } else if (this.isCustomer) {
  735. this.getDataList({
  736. ...this.searchForm,
  737. pageSize: this.pageSize,
  738. pageNum: this.currentPage,
  739. type: this.bill,
  740. customerName: this.$store.state.user.customerName,
  741. customerNumber: this.$store.state.user.customerNumber,
  742. });
  743. } else {
  744. this.getDataList({
  745. ...this.searchForm,
  746. customerName: this.customerName,
  747. customerNumber: this.customerNumber,
  748. pageSize: this.pageSize,
  749. pageNum: this.currentPage,
  750. type: this.bill,
  751. });
  752. }
  753. },
  754. // //钱包数据
  755. // async getWalletList() {
  756. // let res = await getWalletCustomerList({
  757. // customerId: this.customerId,
  758. // type: this.bill,
  759. // });
  760. // this.selectList = res.data;
  761. // },
  762. //切换列表
  763. checkFn(v) {
  764. // this.getDataList({
  765. // pageSize: 10,
  766. // pageNum: 1,
  767. // type: v,
  768. // });
  769. this.resetFn();
  770. this.pageSize = 10;
  771. this.currentPage = 1;
  772. if (this.$route.query.customerName && this.$route.query.customerNumber) {
  773. this.changeFn(this.$route.query.customerId);
  774. this.getDataList({
  775. ...this.searchForm,
  776. pageSize: this.pageSize,
  777. pageNum: this.currentPage,
  778. type: v,
  779. customerName: this.$route.query.customerName,
  780. customerNumber: this.$route.query.customerNumber,
  781. });
  782. } else if (this.isCustomer) {
  783. this.changeFn(this.$store.state.user.customerId);
  784. this.getDataList({
  785. ...this.searchForm,
  786. pageSize: this.pageSize,
  787. pageNum: this.currentPage,
  788. type: this.bill,
  789. customerName: this.$store.state.user.customerName,
  790. customerNumber: this.$store.state.user.customerNumber,
  791. });
  792. } else {
  793. this.getDataList({
  794. // ...this.searchForm,
  795. // customerName: this.customerName,
  796. // customerNumber: this.customerNumber,
  797. pageSize: this.pageSize,
  798. pageNum: this.currentPage,
  799. type: v,
  800. });
  801. }
  802. // this.getWalletList();
  803. },
  804. //
  805. async getDataList(data) {
  806. let res;
  807. if (this.bill == "COMMONLY") {
  808. res = await getStandbookList(data);
  809. } else {
  810. res = await getStandbookList(data);
  811. }
  812. this.dataList = res.data.records;
  813. this.listTotal = res.data.total;
  814. },
  815. },
  816. };
  817. </script>
  818. <style lang="scss" scoped>
  819. .moneyStyle {
  820. height: 130px;
  821. border-radius: 20px;
  822. padding: 20px 0 0 20px;
  823. color: #fff;
  824. span {
  825. display: block;
  826. font-size: 20px;
  827. }
  828. strong {
  829. margin-top: 16px;
  830. display: block;
  831. font-size: 36px;
  832. }
  833. }
  834. .selectStyle {
  835. width: 100%;
  836. }
  837. .color1 {
  838. background-color: #6c83d0;
  839. }
  840. .color2 {
  841. background-color: #dfc062;
  842. }
  843. .color3 {
  844. background-color: #dfc062;
  845. }
  846. .color4 {
  847. background-color: #6bcfd7;
  848. }
  849. </style>