index.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-export-dialog-syn');
  4. ComponentHelper::loadComponentView('com-image');
  5. ?>
  6. <div id="app" v-cloak>
  7. <el-card v-loading="loading" style="border:0" shadow="never" body-style="background-color: #f3f3f3;padding: 0 0;">
  8. <div class="table-body">
  9. <el-form ref="form" style="margin-bottom: 10px;" :model="searchData" label-width="96px" size="mini">
  10. <el-row :gutter="24">
  11. <el-col :span="8" style="padding-left: 0;" class="top_form">
  12. <el-form-item label="会员">
  13. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入会员名称" v-model="searchData.keyword" clearable>
  14. </el-input>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="8" style="padding-left: 0;" class="top_form">
  18. <el-form-item label="付款时间">
  19. <el-date-picker style="margin-top: 1px;" @change="changeTime" v-model="datetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="8" style="padding-right: 0;">
  23. <el-form-item label="实付金额" class="value_input">
  24. <el-input v-model="searchData.min">
  25. <template slot="append">元</template>
  26. </el-input>
  27. <span style="margin: 0 5px;">-</span>
  28. <el-input v-model="searchData.max">
  29. <template slot="append">元</template>
  30. </el-input>
  31. </el-form-item>
  32. </el-col>
  33. </el-row>
  34. <el-row :gutter="24">
  35. <el-col :span="5" style="padding-left: 0;" class="top_form">
  36. <el-button type="primary" size="small" icon="el-icon-search" @click="search" style="padding: 9px 15px !important;">搜索</el-button>
  37. <com-export-dialog-syn :field_list='exportList' :action_url='export_url' :params="searchData">
  38. </com-export-dialog-syn>
  39. </el-col>
  40. </el-row>
  41. </el-form>
  42. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;">
  43. <el-table-column prop="user_id" min-width="100" label="会员ID" align="center"></el-table-column>
  44. <el-table-column label="会员" min-width="100px">
  45. <template slot-scope="scope">
  46. <div class="user_img" flex="cross:center">
  47. <el-image v-if="scope.row.user" class="default-avatar" :src="scope.row.user.avatar_url">
  48. <div slot="error" class="image-slot">
  49. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  50. </div>
  51. </el-image>
  52. <div v-if="scope.row.user" class="uer-nickname over1" v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
  53. </div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="订单编号" prop="order_no" align="center" width="220"></el-table-column>
  57. <el-table-column label="付款时间" align="center" width="200">
  58. <template slot-scope="scope">
  59. {{scope.row.pay_time|dateTimeFormat('Y-m-d H:i:s')}}
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="应付金额" prop="money" align="center">
  63. <template slot-scope="scope">
  64. <div>{{scope.row.money}}</div>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="实付金额" prop="pay_money" align="center"></el-table-column>
  68. <el-table-column label="实收金额" prop="amount_received" align="center"></el-table-column>
  69. <el-table-column label="佣金" prop="commission" align="center"></el-table-column>
  70. <el-table-column label="备注" prop="remark" align="center"></el-table-column>
  71. <el-table-column label="小店名称" prop="store_name" align="center"></el-table-column>
  72. <el-table-column label="操作" width="180" align="center">
  73. <template slot-scope="scope">
  74. <el-button circle size="mini" type="text" @click="showDrawer(true, scope.row.detail)">
  75. 商品明细
  76. </el-button>
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. <!--工具条 批量操作和分页-->
  81. <div style="display: flex;">
  82. <el-col :span="24" class="toolbar">
  83. <el-pagination v-if="pagination" style="float: right;" background @current-change="pageChange" layout="prev, pager, next" :page-count="pageCount">
  84. </el-pagination>
  85. </el-col>
  86. </div>
  87. </div>
  88. <el-drawer title="商品明细" :visible.sync="is_show_drawer" direction="rtl" size="33%">
  89. <el-table :data="drawer_data">
  90. <el-table-column property="goods_id" label="商品ID"></el-table-column>
  91. <el-table-column property="goods_name" label="商品名称"></el-table-column>
  92. <el-table-column property="num" label="数量" width="50"></el-table-column>
  93. <el-table-column property="info" label="规格信息" min-width="180">
  94. <template slot-scope="scope">
  95. <div style="display:flex">
  96. <div style="max-width:60px">
  97. <el-image class=" circle" :src="scope.row.pic_url"></el-image>
  98. </div>
  99. <div style="display: flex; align-items:center">
  100. <div>
  101. <span> 规格: </span><span>{{scope.row.goods_attr_name ? scope.row.goods_attr_name : '默认'}}</span>
  102. </div>
  103. </div>
  104. </div>
  105. </template>
  106. </el-table-column>
  107. <el-table-column property="price" label="售价"></el-table-column>
  108. </el-table>
  109. </el-drawer>
  110. </el-card>
  111. </div>
  112. <script>
  113. const app = new Vue({
  114. el: '#app',
  115. data() {
  116. return {
  117. activeName: 'collection-code',
  118. basicForm: {
  119. store_id: 0,
  120. scan_code_bind: 0,
  121. cashier_url: '',
  122. },
  123. exportList: {},
  124. export_url: '/index.php?r=happiness/store-casher/index',
  125. basicFormRules: {},
  126. loading: false,
  127. listLoading: false,
  128. submitLoading: false,
  129. dialogFormVisible: false,
  130. store_bank_form: {},
  131. formLabelWidth: '120px',
  132. list: [],
  133. pageCount: 0,
  134. pagination: null,
  135. page: 1,
  136. searchData: {
  137. min: '',
  138. max: '',
  139. keyword: '',
  140. start: '',
  141. end: '',
  142. },
  143. datetime: '',
  144. dialogTableVisible_fenRun: false,
  145. activeNames: 'commission',
  146. user_level: {},
  147. dialogVisible: false,
  148. applet_url: '',
  149. is_show_drawer: false,
  150. drawer_data: []
  151. };
  152. },
  153. mounted: function() {
  154. this.loadData();
  155. },
  156. methods: {
  157. loadData() {
  158. console.log(222);
  159. request({
  160. params: {
  161. r: 'happiness/store-casher/index',
  162. page: this.page,
  163. withdraw_status: this.searchData.withdraw_status,
  164. start: this.searchData.start,
  165. end: this.searchData.end,
  166. min: this.searchData.min,
  167. max: this.searchData.max,
  168. keyword: this.searchData.keyword,
  169. },
  170. method: 'get',
  171. }).then(e => {
  172. this.loading = false;
  173. if (e.data.code === 0) {
  174. this.list = e.data.data.list;
  175. this.exportList = e.data.data.export_list;
  176. this.pagination = e.data.data.pagination;
  177. this.pageCount = e.data.data.page_count;
  178. } else {
  179. this.$message.error(e.data.msg);
  180. }
  181. }).catch(e => {
  182. this.$message.error('网络错误');
  183. });
  184. },
  185. handle(data = null) {
  186. let id = data ? parseInt(data.id) : '';
  187. this.dialogTableVisible_fenRun = true;
  188. this.orderId = id;
  189. this.getCapitalLog(id, this.activeNames)
  190. },
  191. commissionHandleClick(tab, event) {
  192. console.log(this.activeNames);
  193. console.log(tab);
  194. console.log(event);
  195. this.getCapitalLog(this.orderId, this.activeNames)
  196. },
  197. handleChange() {},
  198. handleCurrentChange(val) {
  199. this.basicForm.select_bank = val;
  200. },
  201. pageChange(currentPage) {
  202. this.page = currentPage;
  203. this.loadData();
  204. },
  205. search() {
  206. this.page = 1;
  207. if (this.date == null) {
  208. this.date = ''
  209. }
  210. this.loadData();
  211. },
  212. changeTime(e) {
  213. this.searchData.start = e[0]
  214. this.searchData.end = e[1]
  215. },
  216. showDrawer(is_show, detail) {
  217. this.is_show_drawer = is_show
  218. this.drawer_data = detail
  219. }
  220. },
  221. computed: {
  222. }
  223. });
  224. </script>
  225. <style>
  226. .el-tabs__header {
  227. font-size: 16px;
  228. }
  229. .table-body {
  230. padding: 20px;
  231. background-color: #fff;
  232. }
  233. .table-body .el-button {
  234. padding: 0 !important;
  235. border: 0;
  236. margin: 0 5px;
  237. }
  238. .input-item {
  239. width: 250px;
  240. margin: 0 0 20px;
  241. display: inline-block;
  242. }
  243. /*.input-item .el-input__inner {*/
  244. /* border-right: 0;*/
  245. /*}*/
  246. .input-item .el-input__inner:hover {
  247. border: 1px solid #dcdfe6;
  248. /*border-right: 0;*/
  249. outline: 0;
  250. }
  251. .input-item .el-input__inner:focus {
  252. border: 1px solid #dcdfe6;
  253. /*border-right: 0;*/
  254. outline: 0;
  255. }
  256. .input-item .el-input-group__append {
  257. background-color: #fff;
  258. border-left: 0;
  259. width: 10%;
  260. padding: 0;
  261. }
  262. .input-item .el-input-group__append .el-button {
  263. padding: 0;
  264. }
  265. .input-item .el-input-group__append .el-button {
  266. margin: 0;
  267. }
  268. .batch {
  269. margin: 0 0 20px;
  270. display: inline-block;
  271. }
  272. .batch .el-button {
  273. padding: 9px 15px !important;
  274. }
  275. .el-table th>.cell {
  276. color: #333;
  277. font-weight: bold;
  278. font-size: 14px;
  279. }
  280. .el-table__footer-wrapper,
  281. .el-table__header-wrapper {
  282. border-bottom: 1.4px solid #D6D6D6;
  283. }
  284. .el-table th>.cell {
  285. color: #333;
  286. font-weight: bold;
  287. font-size: 14px;
  288. }
  289. .table1 .el-table__footer-wrapper,
  290. .table1 .el-table__header-wrapper {
  291. border-bottom: 1.4px solid #D6D6D6;
  292. }
  293. .user_img {
  294. position: relative;
  295. margin-right: 8px;
  296. /* height: 50px;
  297. width: 50px; */
  298. }
  299. .default-avatar {
  300. width: 50px;
  301. height: 50px;
  302. border-radius: 50%;
  303. margin-right: 8px;
  304. }
  305. .uer-nickname {
  306. flex: 1;
  307. }
  308. .value_input .el-form-item__content {
  309. display: flex;
  310. }
  311. .value_input .el-input-group input {
  312. width: 58px;
  313. border-right: 0;
  314. }
  315. .value_input .el-input-group {
  316. display: flex;
  317. width: 100px;
  318. }
  319. .value_input .el-input-group__append {
  320. display: flex;
  321. align-items: center;
  322. justify-content: center;
  323. background: #FFF;
  324. }
  325. </style>