index.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <style>
  2. .table-body {
  3. padding: 20px;
  4. background-color: #fff;
  5. }
  6. .input-item {
  7. display: inline-block;
  8. width: 250px;
  9. margin: 0 0 20px;
  10. }
  11. .input-item .el-input__inner {
  12. border-right: 0;
  13. }
  14. .input-item .el-input__inner:hover {
  15. border: 1px solid #dcdfe6;
  16. border-right: 0;
  17. outline: 0;
  18. }
  19. .input-item .el-input__inner:focus {
  20. border: 1px solid #dcdfe6;
  21. border-right: 0;
  22. outline: 0;
  23. }
  24. .input-item .el-input-group__append {
  25. background-color: #fff;
  26. border-left: 0;
  27. width: 10%;
  28. padding: 0;
  29. }
  30. .input-item .el-input-group__append .el-button {
  31. padding: 0;
  32. }
  33. .input-item .el-input-group__append .el-button {
  34. margin: 0;
  35. }
  36. .table-body .el-button {
  37. padding: 0 !important;
  38. border: 0;
  39. margin: 0 5px;
  40. }
  41. .el-table th > .cell {
  42. color: #333;
  43. font-weight: bold;
  44. font-size: 14px;
  45. }
  46. .el-table__footer-wrapper, .el-table__header-wrapper {
  47. border-bottom: 1.4px solid #D6D6D6;
  48. }
  49. .label {
  50. margin-right: 10px;
  51. }
  52. .default-goods{
  53. max-width: 50px;
  54. max-height: 50px;
  55. }
  56. .flex-x-between {
  57. display: -webkit-box;
  58. display: -webkit-flex;
  59. display: flex;
  60. -webkit-box-pack: space-between;
  61. -webkit-justify-content: space-between;
  62. -ms-flex-pack: space-between;
  63. justify-content: space-between;
  64. }
  65. .cont-title {
  66. font-size: 15px;
  67. padding-top: 20px;
  68. padding-bottom: 10px;
  69. font-weight: 700;
  70. }
  71. .cont-num {
  72. font-size: 14px;
  73. font-weight: 700;
  74. padding-bottom: 10px;
  75. }
  76. .center {
  77. text-align: center;
  78. }
  79. .el-dialog__header .el-dialog__title{
  80. font-size: 18px;
  81. }
  82. .el-dialog__wrapper .el-dialog__body{
  83. padding: 3px 20px;
  84. }
  85. /*头像样式 start*/
  86. .default-avatar{
  87. width: 50px;
  88. height: 50px;
  89. border-radius: 50%;
  90. }
  91. .user_img{
  92. position: relative;
  93. margin-right: 8px;
  94. height: 50px;
  95. width: 50px;
  96. }
  97. .el-table_1_column_2 .cell { /*-2 表示在第二行*/
  98. display: flex;
  99. }
  100. /*头像样式 end*/
  101. .num-info {
  102. display: flex;
  103. width: 100%;
  104. height: 60px;
  105. font-size: 28px;
  106. color: #303133;
  107. }
  108. .num-info .num-info-item {
  109. text-align: center;
  110. width: 25%;
  111. border-left: 1px dashed #EFF1F7;
  112. }
  113. .num-info .num-info-item:first-of-type {
  114. border-left: 0;
  115. }
  116. .info-item-name {
  117. font-size: 16px;
  118. color: #92959B;
  119. }
  120. .tab-pay {
  121. position: absolute;
  122. bottom: 0;
  123. right: 50px;
  124. }
  125. .tab-pay .el-tabs__item {
  126. height: 56px;
  127. line-height: 56px;
  128. }
  129. .pay-info {
  130. padding: 40px 0;
  131. display: flex;
  132. background-color: #fff;
  133. }
  134. .pay-info .pay-info-item {
  135. padding-top: 20px;
  136. width: 22%;
  137. margin: 0 0.5%;
  138. text-align: center;
  139. font-size: 26px;
  140. border: 1px solid #c8cacf;
  141. border-radius: 10px;
  142. height: 113px;
  143. position: relative;
  144. cursor: pointer;
  145. }
  146. .pay-info .pay-info-item.active {
  147. border: 1px solid #3399FF;
  148. }
  149. .pay-info .pay-info-item img {
  150. display: none;
  151. }
  152. .pay-info .pay-info-item.active img {
  153. position: absolute;
  154. top: 0;
  155. left: 0;
  156. display: block;
  157. }
  158. .line{
  159. width: 100%;
  160. height: 5px;
  161. clear: both;
  162. background-color: #f3f3f3;
  163. }
  164. </style>
  165. <div id="app" v-cloak>
  166. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  167. <div slot="header">
  168. <div>
  169. <span>财务明细</span>
  170. </div>
  171. </template>
  172. </div>
  173. <!-- 选择框 -->
  174. <div class="table-body el-input--small">
  175. <el-form size="small" :inline="true" flex="dir:left cross:center" style="margin-bottom: 12px;">
  176. <div class="item-box" flex="dir:left cross:center">
  177. <div class="label">创建时间</div>
  178. <el-date-picker
  179. v-model="time"
  180. type="datetimerange"
  181. value-format="yyyy-MM-dd HH:mm:ss"
  182. range-separator="至"
  183. start-placeholder="开始日期"
  184. end-placeholder="结束日期">
  185. </el-date-picker>
  186. </div>
  187. <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px; margin-left: 20px;">
  188. <div class="label">支付流水号</div>
  189. <el-input style="width: 200px" v-model="search.out_trade_no" placeholder="支付流水号"></el-input>
  190. </div>
  191. <div class="item-box" flex="dir:left cross:center">
  192. <el-button type="primary" style="padding: 12px 34px !important;" @click="searchs">搜索
  193. </el-button>
  194. </div>
  195. </el-form>
  196. </div>
  197. <div class="line"></div>
  198. <div class="table-body el-input--small">
  199. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  200. <el-table-column label="支付流水号" min-width="80" align="center">
  201. <template slot-scope="scope">
  202. <div style="font-size: 13px;" >{{scope.row.out_trade_no}}</div>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="金额" width="80" align="center">
  206. <template slot-scope="scope">
  207. <div style="font-size: 13px;" >
  208. <span v-if="scope.row.change_type == change_type[1]">-</span>
  209. <span v-if="scope.row.change_type == change_type[0]">+</span>
  210. ¥{{scope.row.change_num}}
  211. </div>
  212. </template>
  213. </el-table-column>
  214. <el-table-column label="来源" min-width="80" align="center">
  215. <template slot-scope="scope">
  216. {{from_type[scope.row.from_type]}}
  217. </template>
  218. </el-table-column>
  219. <el-table-column label="支付类型" min-width="80" align="center">
  220. <template slot-scope="scope">
  221. <div style="font-size: 13px;" >{{payment_type[scope.row.payment_type]}}</div>
  222. </template>
  223. </el-table-column>
  224. <el-table-column label="说明" min-width="80" align="center">
  225. <template slot-scope="scope">
  226. <div style="font-size: 13px;" >{{scope.row.desc}}</div>
  227. </template>
  228. </el-table-column>
  229. <el-table-column prop="scope" width="160" label="创建时间">
  230. <template slot-scope="scope">
  231. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  232. </template>
  233. </el-table-column>
  234. </el-table>
  235. <div style="text-align: right;margin: 20px 0;">
  236. <el-pagination v-if="pagination" :page-size="pagination.pageSize"
  237. style="display: inline-block;float: right;" background @current-change="pageChange"
  238. layout="prev, pager, next" :total="pagination.total_count">
  239. </el-pagination>
  240. </div>
  241. </div>
  242. </el-card>
  243. </div>
  244. <script>
  245. const app = new Vue({
  246. el: '#app',
  247. data() {
  248. return {
  249. listLoading: false,
  250. page: 1,
  251. order: true,
  252. pageCount: 0,
  253. statistics:{'add_money':0,'sub_money':0},
  254. //基础数据
  255. editBasisData: {
  256. materialTypeList: [],
  257. },
  258. //本地存时间,请求时不发送
  259. time: [],
  260. search: {
  261. out_trade_no: '',
  262. date_start: null,
  263. date_end: null,
  264. },
  265. list: [],
  266. change_type:[0,1],
  267. from_type:[],
  268. payment_type:[],
  269. pagination:null,
  270. };
  271. },
  272. methods: {
  273. searchs() {
  274. this.page = 1;
  275. this.getList();
  276. },
  277. pageChange(currentPage) {
  278. let self = this;
  279. self.page = currentPage;
  280. self.getList();
  281. },
  282. getList() {
  283. let self = this;
  284. self.listLoading = true;
  285. // 检查是否选择了搜索时间
  286. if (!self.time) {
  287. self.search.date_start = '';
  288. self.search.date_end = '';
  289. } else {
  290. self.search.date_start = self.time[0];
  291. self.search.date_end = self.time[1];
  292. }
  293. request({
  294. method: 'post',
  295. params: {
  296. r: 'admin/finance/index',
  297. },
  298. data: {
  299. page: self.page,
  300. out_trade_no: self.search.out_trade_no,
  301. date_start: self.search.date_start,
  302. date_end: self.search.date_end,
  303. },
  304. }).then(e => {
  305. self.listLoading = false;
  306. self.list = e.data.data.list;
  307. this.change_type = e.data.data.change_type;
  308. this.from_type = e.data.data.from_type;
  309. this.statistics = e.data.data.statistics;
  310. this.payment_type = e.data.data.payment_type;
  311. console.log(this.change_type,66);
  312. this.pagination = e.data.data.pagination;
  313. this.pagination.pageSize = e.data.data.page_size;
  314. this.pagination.total_count = e.data.data.count;
  315. }).catch(e => {
  316. console.log(e);
  317. });
  318. },
  319. },
  320. mounted: function () {
  321. this.getList();
  322. }
  323. });
  324. </script>