index.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>养老金管理</span>
  5. </div>
  6. <div class="table-body">
  7. <div class="stat_details">
  8. <div class="order_module" v-for="(item,index) in Total_Money" :key="item.type">
  9. <div class="oirder_modul_title">
  10. <div class="text">{{item.name}}</div>
  11. <el-tooltip class="item" effect="dark" v-if="item.prompt" :content="item.prompt" placement="bottom">
  12. <i class="el-icon-question stat_icon"></i>
  13. </el-tooltip>
  14. </div>
  15. <div class="price">
  16. ¥{{item.value}}
  17. </div>
  18. </div>
  19. </div>
  20. <div>
  21. <el-form :inline="true" :model="search_data" size="small" class="demo-form-inline">
  22. <div class="flex">
  23. <el-form-item label="">
  24. <el-input placeholder="请输入用户ID|昵称|手机号" v-model="search_data.user_keyword"
  25. clearable></el-input>
  26. </el-form-item>
  27. <el-form-item label="">
  28. <el-input placeholder="请输入订单号" v-model="search_data.order_no" clearable></el-input>
  29. </el-form-item>
  30. <el-form-item label="是否已经实名">
  31. <el-select v-model="search_data.is_real" placeholder="是否已实名">
  32. <el-option label="全部" value=""></el-option>
  33. <el-option label="是" value="1"></el-option>
  34. <el-option label="否" value="0"></el-option>
  35. </el-select>
  36. </el-form-item>
  37. </div>
  38. <div class="flex">
  39. <el-form-item label="是否已入账">
  40. <el-select v-model="search_data.is_entry" placeholder="是否已入账">
  41. <el-option label="全部" value=""></el-option>
  42. <el-option label="是" value="1"></el-option>
  43. <el-option label="否" value="0"></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="创建时间">
  47. <el-date-picker v-model="dates" size="small" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="selectedDates"> </el-date-picker>
  48. </el-form-item>
  49. <el-form-item>
  50. <el-button type="primary" @click="search">搜索</el-button>
  51. <el-button type="danger" @click="clearSearch" v-if="show_clear_search_btn">清除条件</el-button>
  52. </el-form-item>
  53. </div>
  54. </el-form>
  55. </div>
  56. <el-table :data="list" stripe v-loading="listLoading" size="small" style="margin-bottom: 15px; width: 100%">
  57. <el-table-column prop="user_id" label="会员ID" align="center"></el-table-column>
  58. <el-table-column label="会员信息" width="200" prop="store_name">
  59. <template slot-scope="scope">
  60. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.user.avatar_url"></com-image>
  61. <div>{{scope.row.user.nickname}}</div>
  62. <div>{{scope.row.user.mobile}}</div>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="实名认证信息" width="200" prop="money">
  66. <template slot-scope="scope">
  67. <div v-if="scope.row.thirdUser && scope.row.thirdUser.is_real==1">
  68. <div>姓名: {{scope.row.thirdUser?scope.row.thirdUser.user_name:''}}</div>
  69. <div>身份证: {{scope.row.thirdUser?scope.row.thirdUser.id_no:''}}</div>
  70. </div>
  71. <div v-if="!scope.row.thirdUser || scope.row.thirdUser.is_real==0">未实名</div>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="关联订单" width="200" prop="money">
  75. <template slot-scope="scope">
  76. <div>{{scope.row.order_no}}</div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="下单时间" width="200" prop="money">
  80. <template slot-scope="scope">
  81. <div>{{scope.row.created_at | dateTimeFormat('Y-m-d H:i:s')}}</div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="订单完成时间" width="200" prop="money">
  85. <template slot-scope="scope" v-if="scope.row.settle_time>0">
  86. <div>{{scope.row.settle_time | dateTimeFormat('Y-m-d H:i:s')}}</div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="订单已结算" width="200" prop="money">
  90. <template slot-scope="scope">
  91. <el-tag v-if="scope.row.is_settle==1" type="success">已结算</el-tag>
  92. <el-tag v-if="scope.row.is_settle==0" type="danger">未结算</el-tag>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="养老金" width="200" prop="money">
  96. <template slot-scope="scope">
  97. <div>¥{{scope.row.money}}</div>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="处理状态" width="200" prop="money">
  101. <template slot-scope="scope">
  102. <div>{{scope.row.order_status_text}}</div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="公证处入账编号" width="200" prop="money">
  106. <template slot-scope="scope">
  107. <div>{{scope.row.result_sn}}</div>
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="公证处入账结果" width="200" prop="money">
  111. <template slot-scope="scope">
  112. <div>{{scope.row.result_code}}</div>
  113. </template>
  114. </el-table-column>
  115. <el-table-column label="入账时间" width="200" prop="money">
  116. <template slot-scope="scope">
  117. <div v-if="scope.row.result_time>0">{{scope.row.result_time | dateTimeFormat('Y-m-d H:i:s')}}</div>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="操作" style="width: 180px;" fixed="right" align="center">
  121. <template slot-scope="scope">
  122. <template>
  123. <el-button v-if="scope.row.is_settle==1 && scope.row.order_status==0 && scope.row.thirdUser && scope.row.thirdUser.is_real==1" type="text"
  124. size="small" @click="handle('send',scope.row)">发起入账</el-button>
  125. </template>
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. <div style="text-align: right;margin: 20px 0;">
  130. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  131. </div>
  132. </div>
  133. </el-card>
  134. </div>
  135. <script>
  136. const app = new Vue({
  137. el: '#app',
  138. data() {
  139. return {
  140. search_data: {
  141. user_keyword:'',
  142. is_real: '',
  143. is_entry: '',
  144. start_time:'',
  145. end_time:''
  146. },
  147. list: [],
  148. dates: null,
  149. page: 1,
  150. pageCount: 0,
  151. listLoading: false,
  152. //金额统计
  153. Total_Money: {
  154. "no_send":{
  155. type: 'no_send',
  156. name: '待发起',
  157. value: '0',
  158. prompt: '',
  159. },
  160. "is_send":{
  161. type: 'is_send',
  162. name: '已发起',
  163. value: '0',
  164. prompt: '',
  165. },
  166. "wait_entry":{
  167. type: 'wait_entry',
  168. name: '待打款金额',
  169. value: '0',
  170. prompt: '',
  171. },
  172. "is_entry":{
  173. type: 'is_entry',
  174. name: '已打款金额',
  175. value: '0',
  176. prompt: '',
  177. }
  178. }
  179. };
  180. },
  181. mounted: function() {
  182. this.getList();
  183. },
  184. computed: {
  185. show_clear_search_btn: function() {
  186. return !isEmpty(this.search_data.user_keyword) || !isEmpty(this.search_data.is_real) || !isEmpty(this
  187. .search_data.is_entry) || !isEmpty(this.search_data.start_time) || !isEmpty(this.search_data
  188. .end_time);
  189. }
  190. },
  191. methods: {
  192. // 选中时间
  193. selectedDates(e) {
  194. if (e) {
  195. this.search_data.start_time = e[0];
  196. this.search_data.end_time = e[1];
  197. } else {
  198. this.search_data.start_time = '';
  199. this.search_data.end_time = '';
  200. this.dates = null;
  201. }
  202. },
  203. pagination(currentPage) {
  204. let self = this;
  205. self.page = currentPage;
  206. self.getList();
  207. },
  208. getList() {
  209. let self = this;
  210. let basic_params = {
  211. r: 'happiness/store-pension/index',
  212. page: self.page,
  213. };
  214. params = Object.assign(basic_params, this.search_data);
  215. if (self.listLoading === false) {
  216. self.listLoading = true;
  217. request({
  218. params: params,
  219. method: 'get',
  220. }).then(e => {
  221. self.listLoading = false;
  222. if (e.data.code === 0) {
  223. self.list = e.data.data.list;
  224. self.pageCount = e.data.data.page_count;
  225. //金额统计
  226. for (let field in this.Total_Money) {
  227. if (e.data.data.total_money[field]) {
  228. this.Total_Money[field]['value'] = e.data.data.total_money[field];
  229. } else {
  230. this.Total_Money[field]['value'] = '0.00';
  231. }
  232. }
  233. } else {
  234. self.$message.error(e.data.msg);
  235. }
  236. }).catch(e => {
  237. });
  238. }
  239. },
  240. search() {
  241. this.page = 1;
  242. this.getList();
  243. },
  244. clearSearch() {
  245. this.search_data.user_keyword = null;
  246. this.search_data.is_real = null;
  247. this.search_data.is_entry = null;
  248. this.search_data.start_time = null;
  249. this.search_data.end_time = null;
  250. this.dates = null;
  251. this.getList();
  252. },
  253. handle(type, data = null) {
  254. let id = data ? parseInt(data.id) : '';
  255. let user_id = data ? parseInt(data.user_id) : '';
  256. switch (type) {
  257. case 'send':
  258. //确认提示
  259. this.btnLoading=true;
  260. this.$request({
  261. params: {
  262. r: 'happiness/store-pension/send'
  263. },
  264. data:{
  265. id:id
  266. },
  267. method: 'post',
  268. }).then(e => {
  269. if (e.data.code === 0) {
  270. this.$message.success('已发起');
  271. this.getList();
  272. this.btnLoading=false;
  273. } else {
  274. this.$message.error(e.data.msg);
  275. this.btnLoading=false;
  276. }
  277. }).catch(e => {
  278. });
  279. }
  280. },
  281. }
  282. })
  283. </script>
  284. <style>
  285. .flex {
  286. display: flex;
  287. align-items: center;
  288. }
  289. .stat_details{
  290. padding: 0 0 20px;
  291. display: flex;
  292. }
  293. .stat_details .order_module{
  294. flex: 1;
  295. background: #F2F2F2;
  296. margin: 0 5px;
  297. padding: 20px 25px;
  298. }
  299. .order_module{
  300. display: flex;
  301. flex-direction: column;
  302. }
  303. .order_module:last-child{
  304. margin-right: 0;
  305. }
  306. .order_module:first-child{
  307. margin-left: 0;
  308. }
  309. .price{
  310. font-size: 14px;
  311. flex: 1;
  312. word-break: break-all;
  313. }
  314. .oirder_modul_title{
  315. font-size: 12px;
  316. margin-bottom: 10px;
  317. display: flex;
  318. align-items: center;
  319. }
  320. .oirder_modul_title .text{
  321. margin-right: 10px;
  322. }
  323. .stat_icon{
  324. font-size: 19px;
  325. color: #BFBFBF;
  326. }
  327. </style>