index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ?>
  4. <style>
  5. </style>
  6. <div id="app" v-cloak>
  7. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  8. <div slot="header">
  9. <span>延时结算明细</span>
  10. </div>
  11. <div class="table-body">
  12. <div class="input-item">
  13. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入订单编号" v-model="search.order_no" clearable @clear="toSearch">
  14. </el-input>
  15. </div>
  16. <div class="input-item">
  17. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入关键字搜索" v-model="search.keyword" clearable @clear="toSearch">
  18. </el-input>
  19. </div>
  20. <el-date-picker size="small" v-model="search.date" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="addTimeChange">
  21. </el-date-picker>
  22. <div class="input-item">
  23. <el-select size="small" v-model="search.capital_type" @change='toSearch' class="select" placeholder="资金类型" clearable>
  24. <el-option key="0" label="补货货款" value="payment_for_goods_fill"></el-option>
  25. <el-option key="1" label="买货货款" value="payment_for_goods_buy"></el-option>
  26. </el-select>
  27. </div>
  28. <div class="input-item">
  29. <el-select size="small" v-model="search.status" @change='toSearch' class="select" placeholder="结算状态" clearable>
  30. <el-option key="0" label="未结算" value="0"></el-option>
  31. <el-option key="1" label="已结算" value="1"></el-option>
  32. </el-select>
  33. </div>
  34. <el-button type="primary" size="small" @click="toSearch">搜索</el-button>
  35. <el-tabs v-model="activeName" @tab-click="handleClick">
  36. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  37. <!-- <el-table-column align='center' type="selection"></el-table-column>-->
  38. <el-table-column prop="user_id" label="用户ID" width="80" align="center"></el-table-column>
  39. <el-table-column label="用户昵称">
  40. <template slot-scope="scope">
  41. <div class="user_img" flex="cross:center">
  42. <el-image class="default-avatar" :src="scope.row.user && scope.row.user.avatar_url">
  43. <div slot="error" class="image-slot">
  44. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  45. </div>
  46. </el-image>
  47. <div class="nickname-box">
  48. <div class="uer-nickname over1">{{scope.row.user && scope.row.user.nickname}}</div>
  49. <div class="uer-nickname over1">{{scope.row.user && scope.row.user.mobile}}</div>
  50. </div>
  51. </div>
  52. </template>
  53. </el-table-column>
  54. <!-- <el-table-column prop="contributor_name" label="商品名称"></el-table-column>-->
  55. <el-table-column label="订单号" prop="order_no" align="center">
  56. <template slot-scope="scope">
  57. <span style="display:block;">{{scope.row.order_no}}</span>
  58. <span class="tag-diff" v-if="scope.row.order_no && scope.row.order_no.indexOf('DYC') > -1">抖音cps订单</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="结算金额" prop="wallet_num" align="center" width="100">
  62. <template slot-scope="scope">
  63. <el-link type="primary" :underline="false" class="wallet-price">{{ scope.row.wallet_num }}</el-link>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="延时天数" prop="day_num" align="center" width="100"></el-table-column>
  67. <el-table-column label="资金说明" prop="wallet_desc" align="center"></el-table-column>
  68. <el-table-column label="结算方式" prop="compute_type" align="center">
  69. <template slot-scope="scope">
  70. <span v-if="scope.row.compute_type == 0">订单完成后</span>
  71. <span v-else-if="scope.row.compute_type == 1">订单支付后</span>
  72. <span v-else>未知</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="结算状态" prop="status" align="center">
  76. <template slot-scope="scope">
  77. {{ scope.row.status ? '已结算' : '未结算' }}
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="创建时间" align="center">
  81. <template slot-scope="scope">
  82. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="结算时间" align="center">
  86. <template slot-scope="scope">
  87. <span v-if="scope.row.agented_at">{{scope.row.agented_at|dateTimeFormat('Y-m-d H:i:s')}}</span>
  88. <span v-else>--</span>
  89. </template>
  90. </el-table-column>
  91. </el-table>
  92. </el-tabs>
  93. <div flex="box:last cross:center">
  94. <div></div>
  95. <div>
  96. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;float: right;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  97. </el-pagination>
  98. </div>
  99. </div>
  100. </div>
  101. </el-card>
  102. </div>
  103. <script>
  104. const app = new Vue({
  105. el: '#app',
  106. data: {
  107. search: {
  108. order_no: '',
  109. keyword: '',
  110. page: 1,
  111. status: '',
  112. capital_type: '',
  113. date_start: '',
  114. date_end: '',
  115. date: []
  116. },
  117. wallet_types: {},
  118. loading: false,
  119. activeName: '-1',
  120. list: [],
  121. pagination: null,
  122. exportList: {},
  123. choose_list: [],
  124. export_url: 'agent/detail/index', // 导出路径
  125. },
  126. mounted() {
  127. this.loadData();
  128. },
  129. methods: {
  130. addTimeChange(v) {
  131. this.search.date_start = v ? v[0] : '';
  132. this.search.date_end = v ? v[1] : '';
  133. },
  134. confirmSubmit() {
  135. console.log(this.activeName)
  136. this.search.status = this.activeName
  137. },
  138. loadData() {
  139. this.loading = true;
  140. let params = {
  141. r: 'cloud-stock/delay-log/index'
  142. };
  143. params = Object.assign(params, this.search);
  144. request({
  145. params: params,
  146. method: 'get',
  147. }).then(e => {
  148. this.loading = false;
  149. if (e.data.code == 0) {
  150. this.list = e.data.data.list;
  151. this.pagination = e.data.data.pagination;
  152. this.wallet_types = e.data.data.wallet_types;
  153. // this.exportList = e.data.data.export_list;
  154. } else {
  155. this.$message.error(e.data.msg);
  156. }
  157. }).catch(e => {
  158. this.loading = false;
  159. });
  160. },
  161. pageChange(page) {
  162. this.search.page = page;
  163. this.loadData();
  164. },
  165. handleClick(tab, event) {
  166. this.search.page = 1;
  167. this.search.status = this.activeName;
  168. this.loadData()
  169. },
  170. toSearch() {
  171. this.search.page = 1;
  172. this.loadData();
  173. },
  174. editClick() {
  175. this.edit.show = true;
  176. },
  177. handleSelectionChange(val) {
  178. let self = this;
  179. self.choose_list = [];
  180. val.forEach(function(item) {
  181. self.choose_list.push(item.id);
  182. })
  183. }
  184. }
  185. });
  186. </script>
  187. <style>
  188. .el-tabs__header {
  189. font-size: 16px;
  190. }
  191. .table-body {
  192. padding: 20px;
  193. background-color: #fff;
  194. }
  195. .table-body .el-button {
  196. border: 0;
  197. margin: 0 5px;
  198. }
  199. .input-item {
  200. margin: 0 0 20px;
  201. display: inline-block;
  202. }
  203. /*.input-item .el-input__inner {*/
  204. /* border-right: 0;*/
  205. /*}*/
  206. .input-item .el-input__inner:hover {
  207. border: 1px solid #dcdfe6;
  208. /*border-right: 0;*/
  209. outline: 0;
  210. }
  211. .input-item .el-input__inner:focus {
  212. border: 1px solid #dcdfe6;
  213. /*border-right: 0;*/
  214. outline: 0;
  215. }
  216. .input-item .el-input-group__append {
  217. background-color: #fff;
  218. border-left: 0;
  219. width: 10%;
  220. padding: 0;
  221. }
  222. .input-item .el-input-group__append .el-button {
  223. padding: 0;
  224. }
  225. .input-item .el-input-group__append .el-button {
  226. margin: 0;
  227. }
  228. .batch {
  229. margin: 0 0 20px;
  230. display: inline-block;
  231. }
  232. .batch .el-button {
  233. padding: 9px 15px !important;
  234. }
  235. .el-table th>.cell {
  236. color: #333;
  237. font-weight: bold;
  238. font-size: 14px;
  239. }
  240. .el-table__footer-wrapper,
  241. .el-table__header-wrapper {
  242. border-bottom: 1.4px solid #D6D6D6;
  243. }
  244. .el-table th>.cell {
  245. color: #333;
  246. font-weight: bold;
  247. font-size: 14px;
  248. }
  249. .table1 .el-table__footer-wrapper,
  250. .table1 .el-table__header-wrapper {
  251. border-bottom: 1.4px solid #D6D6D6;
  252. }
  253. .user_img {
  254. position: relative;
  255. margin-right: 8px;
  256. }
  257. .default-avatar {
  258. width: 50px;
  259. height: 50px;
  260. border-radius: 50%;
  261. margin-right: 8px;
  262. }
  263. .uer-nickname {
  264. flex: 1;
  265. }
  266. .tag-diff{
  267. display: inline-block;
  268. background-color: rgba(112, 182, 3, 1);
  269. color: #fff;
  270. border-radius: 42px;
  271. line-height: 22px;
  272. height: 22px;
  273. padding: 0 6px;
  274. }
  275. .wallet-price {
  276. font-size: 16px;
  277. }
  278. </style>