income-log.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-export-dialog', '@backend/views/components/common');
  4. ?>
  5. <style>
  6. .order_stat {
  7. background: #FFF;
  8. padding: 10px 10px 0;
  9. margin-bottom: 10px;
  10. }
  11. .title {
  12. font-size: 18px;
  13. font-weight: bold;
  14. display: flex;
  15. align-items: center;
  16. height: 40px;
  17. }
  18. .order_stat>.title>.time {
  19. font-size: 13px;
  20. font-weight: 400;
  21. color: #BFBFBF;
  22. margin-left: 20px;
  23. flex: 1;
  24. }
  25. .order_stat .stat_details {
  26. padding: 30px 0;
  27. display: flex;
  28. }
  29. .default-avatar {
  30. width: 50px;
  31. height: 50px;
  32. border-radius: 50%;
  33. margin-right: 8px;
  34. }
  35. .uer-nickname {
  36. flex: 1;
  37. }
  38. .user_img {
  39. position: relative;
  40. margin-right: 8px;
  41. /* height: 50px;
  42. width: 50px; */
  43. }
  44. </style>
  45. <div id="app" v-cloak>
  46. <div class="order_stat">
  47. <div class="title">{{store_name}} 提成明细</div>
  48. <div class="stat_details">
  49. <div class="order_module" v-for="(item,index) in orderTotalArr" :key="item.type">
  50. <div class="oirder_modul_title">
  51. <div class="text">{{item.name}}</div>
  52. <el-tooltip class="item" effect="dark" v-if="item.prompt" :content="item.prompt" placement="bottom">
  53. <i class="el-icon-question stat_icon"></i>
  54. </el-tooltip>
  55. </div>
  56. <div class="price">
  57. {{item.value}}
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <el-card shadow="never" style="border:0;min-width: 800px;">
  63. <div class="input-item">
  64. <el-input @keyup.enter.native="search" size="small" placeholder="请输入会员id" v-model="searchData.user_id" clearable>
  65. </el-input>
  66. </div>
  67. <div class="input-item">
  68. <el-input @keyup.enter.native="search" size="small" placeholder="会员昵称/手机号" v-model="searchData.keyword" clearable>
  69. </el-input>
  70. </div>
  71. <div class="input-item">
  72. <el-input @keyup.enter.native="search" size="small" placeholder="订单编号" v-model="searchData.order_no" clearable>
  73. </el-input>
  74. </div>
  75. <el-select size="small" v-model="searchData.is_settlement" @change='search' class="select" clearable>
  76. <el-option label="已结算" value="1"></el-option>
  77. <el-option label="未结算" value="0"></el-option>
  78. </el-select>
  79. <div class="date-item">
  80. <el-date-picker
  81. stlye="float:left;"
  82. v-model="searchData.date"
  83. type="daterange"
  84. size="small"
  85. value-format="yyyy-MM-dd"
  86. range-separator="至"
  87. start-placeholder="开始日期"
  88. end-placeholder="结束日期">
  89. </el-date-picker>
  90. </div>
  91. <div class="input-item">
  92. <el-button type="primary" size="small" icon="el-icon-search" @click="search" class="search_button">搜索</el-button>
  93. </div>
  94. <el-table :data="form" stripe style="width: 100%" v-loading="listLoading">
  95. <el-table-column prop="user.id" label="会员ID" min-width="100" align="center"></el-table-column>
  96. <el-table-column label="会员" width="200">
  97. <template slot-scope="scope">
  98. <div class="table-info-img-text">
  99. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  100. <div slot="error" class="image-slot">
  101. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  102. </div>
  103. </el-image>
  104. <div class="table-info-text">
  105. <div v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
  106. <div>{{scope.row.user.mobile}}</div>
  107. </div>
  108. </div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column prop="order_no" label="订单编号" min-width="220" align="center"></el-table-column>
  112. <el-table-column prop="order_money" label="订单金额" min-width="100" align="center"></el-table-column>
  113. <el-table-column prop="discount_money" label="优惠金额" min-width="100" align="center"></el-table-column>
  114. <el-table-column prop="pay_money" label="支付金额" min-width="100" align="center"></el-table-column>
  115. <el-table-column prop="addons_bonus" label="插件(佣金)" min-width="100" align="center"></el-table-column>
  116. <el-table-column prop="is_settlement" label="佣金来源" min-width="100" align="center">
  117. <template slot-scope="scope">
  118. <div v-if="scope.row.settle_type == '4'">门店承担</div>
  119. <div v-else>平台承担</div>
  120. </template>
  121. </el-table-column>
  122. <el-table-column prop="store_send_commission" label="门店股东(佣金)" min-width="150" align="center"></el-table-column>
  123. <el-table-column prop="service_charge" label="服务费" min-width="100" align="center"></el-table-column>
  124. <el-table-column prop="higo_reward" label="嗨呗不足扣除" min-width="130" align="center"></el-table-column>
  125. <el-table-column prop="store_contributing_money" label="会员折扣金额" min-width="100" align="center"></el-table-column>
  126. <el-table-column prop="amount_received" label="到账金额" min-width="100" align="center"></el-table-column>
  127. <el-table-column prop="amount_received_score" label="到账积分" min-width="100" align="center"></el-table-column>
  128. <el-table-column prop="is_settlement" label="状态" min-width="100" align="center">
  129. <template slot-scope="scope">
  130. <div v-if="scope.row.is_settlement == '1'">已结算</div>
  131. <div v-if="scope.row.is_settlement == '0'">未结算</div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column prop="type" label="类型" min-width="100" align="center">
  135. <template slot-scope="scope">
  136. <div v-if="scope.row.type == '1'">非收银台订单</div>
  137. <div v-if="scope.row.type == '2'">收银台订单</div>
  138. <div v-if="scope.row.type == '3'">门店核销奖励</div>
  139. <div v-if="scope.row.type == '4'">次卡核销</div>
  140. </template>
  141. </el-table-column>
  142. <el-table-column prop="scope" min-width="150" label="创建时间" align="center">
  143. <template slot-scope="scope">
  144. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  145. </template>
  146. </el-table-column>
  147. </el-table>
  148. <!--工具条 批量操作和分页-->
  149. <div style="display: flex; margin-top: 20px;">
  150. <el-col :span="24" class="toolbar">
  151. <el-pagination v-if="pagination" style="float: right;" background @current-change="pageChange" layout="prev, pager, next" :page-count="pageCount">
  152. </el-pagination>
  153. </el-col>
  154. </div>
  155. </el-card>
  156. </div>
  157. <script>
  158. const app = new Vue({
  159. el: '#app',
  160. created() {
  161. this.searchData.store_id = getQuery('store_id')
  162. },
  163. data() {
  164. return {
  165. searchData: {
  166. keyword: '',
  167. user_id: '',
  168. order_no: '',
  169. is_settlement: '',
  170. store_id: 0,
  171. date: []
  172. },
  173. form: [],
  174. pageCount: 0,
  175. page: 1,
  176. pagination: null,
  177. listLoading: false,
  178. store_name: '',
  179. orderTotalArr: [{
  180. type: 'total_num',
  181. name: '总数',
  182. value: '0.00',
  183. prompt: '',
  184. }, {
  185. type: 'score_used',
  186. name: '订单总金额',
  187. value: '0.00',
  188. prompt: '',
  189. }, {
  190. type: 'total_settled_amount',
  191. name: '提成已结算总金额',
  192. value: '0.00',
  193. prompt: '',
  194. }, {
  195. type: 'unsettled_amount',
  196. name: '提成未结算总金额',
  197. value: '0.00',
  198. prompt: '',
  199. }]
  200. };
  201. },
  202. methods: {
  203. pageChange(currentPage) {
  204. this.page = currentPage;
  205. this.getList();
  206. },
  207. search() {
  208. this.page = 1;
  209. this.getList();
  210. },
  211. getList() {
  212. let params = {
  213. r: 'store/store-statistics/income-log',
  214. page: this.page,
  215. user_id: this.searchData.user_id,
  216. keyword: this.searchData.keyword,
  217. order_no: this.searchData.order_no,
  218. is_settlement: this.searchData.is_settlement,
  219. store_id: this.searchData.store_id,
  220. date: this.searchData.date,
  221. };
  222. request({
  223. params,
  224. }).then(e => {
  225. if (e.data.code === 0) {
  226. this.form = e.data.data.list;
  227. this.pagination = e.data.data.pagination;
  228. this.pageCount = e.data.data.page_count;
  229. this.orderTotalArr = e.data.data.order_total_arr;
  230. this.store_name = e.data.data.store_name
  231. } else {
  232. this.$message.error(e.data.msg);
  233. }
  234. this.listLoading = false;
  235. }).catch(e => {
  236. this.listLoading = false;
  237. });
  238. this.listLoading = true;
  239. },
  240. },
  241. mounted: function() {
  242. this.searchData.user_id = getQuery('user_id');
  243. this.getList();
  244. }
  245. });
  246. </script>
  247. <style>
  248. .table-body {
  249. padding: 20px;
  250. background-color: #fff;
  251. }
  252. .input-item {
  253. display: inline-block;
  254. width: 250px;
  255. margin: 0 0 20px 20px;
  256. }
  257. .date-item {
  258. display: inline-block;
  259. margin: 0 0 20px 20px;
  260. }
  261. .input-item .el-input__inner:hover {
  262. border: 1px solid #dcdfe6;
  263. border-right: 0;
  264. outline: 0;
  265. }
  266. .input-item .el-input__inner:focus {
  267. border: 1px solid #dcdfe6;
  268. border-right: 0;
  269. outline: 0;
  270. }
  271. .input-item .el-input-group__append {
  272. background-color: #fff;
  273. border-left: 0;
  274. width: 10%;
  275. padding: 0;
  276. }
  277. /* .input-item .el-input-group__append .el-button {
  278. padding: 0;
  279. }
  280. .input-item .el-input-group__append .el-button {
  281. margin: 0;
  282. }
  283. .table-body .el-button {
  284. padding: 0!important;
  285. border: 0;
  286. margin: 0 5px;
  287. } */
  288. .el-table th>.cell {
  289. color: #333;
  290. font-weight: bold;
  291. font-size: 14px;
  292. }
  293. .el-table__footer-wrapper,
  294. .el-table__header-wrapper {
  295. border-bottom: 1.4px solid #D6D6D6;
  296. }
  297. .stat_details {
  298. padding-bottom: 30px;
  299. display: flex;
  300. }
  301. .order_module {
  302. flex: 1;
  303. background: #F2F2F2;
  304. margin: 0 5px;
  305. padding: 20px 25px;
  306. }
  307. .order_module:last-child {
  308. margin-right: 0;
  309. }
  310. .order_module:first-child {
  311. margin-left: 0;
  312. }
  313. .price {
  314. font-size: 22px;
  315. font-weight: bold;
  316. }
  317. .oirder_modul_title {
  318. font-size: 12px;
  319. margin-bottom: 10px;
  320. display: flex;
  321. align-items: center;
  322. }
  323. .oirder_modul_title .text {
  324. margin-right: 10px;
  325. }
  326. .stat_icon {
  327. font-size: 19px;
  328. color: #BFBFBF;
  329. }
  330. </style>