index.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
  2. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
  3. <style>
  4. .font-size-12 {
  5. font-size: 12px;
  6. }
  7. .color-999 {
  8. color: #999;
  9. }
  10. .color-22D38D {
  11. color: #22D38D;
  12. }
  13. .margin-left-10 {
  14. margin-left: 10px;
  15. }
  16. /* table */
  17. .order-table {
  18. padding: 20px 20px 30px;
  19. margin-top: 10px;
  20. background: #fff;
  21. color: #444;
  22. }
  23. .screen-container {
  24. background: #fff;
  25. flex-wrap: wrap;
  26. padding: 0 20px;
  27. }
  28. .screen-item {
  29. width: 240px;
  30. display: flex;
  31. align-items: center;
  32. margin: 14px 30px 10px 0;
  33. }
  34. .el-input-group__prepend {
  35. width: 116px;
  36. }
  37. .screen-item-time {
  38. width: 480px;
  39. }
  40. .screen-item-tip {
  41. width: 60px;
  42. margin-right: 14px;
  43. }
  44. .expand-container {
  45. margin-bottom: 8px;
  46. color: #444;
  47. width: 100%;
  48. border-left: 1px solid #e6e6e6;
  49. }
  50. .expand-item {
  51. display: flex;
  52. align-items: center;
  53. width: 98px;
  54. justify-content: center;
  55. }
  56. .expand-item>div {
  57. padding: 0 10px;
  58. }
  59. .expand-item-goods {
  60. width: 548px;
  61. flex-direction: column;
  62. /* padding: 0 22px 0 10px; */
  63. }
  64. .expand-item-goods-iamge {
  65. width: 60px;
  66. height: 60px;
  67. margin-right: 10px;
  68. border-radius: 2px;
  69. border: 1px solid #E6E6E6;
  70. }
  71. .expand-item-height {
  72. height: 80px;
  73. width: 100%;
  74. }
  75. .expand-item-goods-container {
  76. flex-direction: column;
  77. justify-content: space-between;
  78. height: 60px;
  79. width: 100%;
  80. align-items: flex-start;
  81. }
  82. .expand-item-goods-title {
  83. line-height: 18px;
  84. color: #444;
  85. font-size: 13px;
  86. }
  87. .expand-item-goods-describe {
  88. line-height: 12px;
  89. color: #999;
  90. }
  91. .border-right {
  92. border-right: 1px solid #E6E6E6;
  93. }
  94. .border-bottom {
  95. border-bottom: 1px solid #E6E6E6;
  96. }
  97. .expand-item-commissin-user {
  98. width: 110px;
  99. }
  100. .expand-item-commission-describe {
  101. width: 294px;
  102. }
  103. .expand-item-commission-describe-image {
  104. width: 36px;
  105. height: 36px;
  106. border-radius: 50%;
  107. overflow: hidden;
  108. margin-bottom: 8px;
  109. }
  110. .expand-item-commission-container {
  111. justify-content: center;
  112. }
  113. .expand-item-commission-describe-item {
  114. /* margin-right: ; */
  115. margin-right: 20px;
  116. }
  117. .expand-item-commission-describe-item:last-of-type {
  118. margin: 0;
  119. }
  120. .expand-item-commission-time {
  121. width: 160px;
  122. }
  123. .expand-item-buyer {
  124. width: 140px;
  125. }
  126. .expand-item-commission-money {
  127. width: 120px;
  128. }
  129. .shopro-reset-button {
  130. margin-right: 20px;
  131. }
  132. .display-flex-center {
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. }
  137. .font-weight {
  138. font-weight: 500;
  139. }
  140. .table-image {
  141. border-radius: 15px;
  142. width: 30px;
  143. height: 30px;
  144. overflow: hidden;
  145. border: 1px solid #e6e6e6;
  146. }
  147. .cursor-pointer {
  148. cursor: pointer;
  149. }
  150. .popover-container>div {
  151. margin-bottom: 12px;
  152. }
  153. .popover-container>div:last-of-type {
  154. margin-bottom: 0;
  155. }
  156. .table-dashboard-item-container {
  157. width: 20%;
  158. }
  159. .table-dashboard-item {
  160. min-height: 46px;
  161. box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
  162. border-radius: 2px;
  163. margin: 0 5px 14px;
  164. display: flex;
  165. align-items: center;
  166. font-size: 12px;
  167. color: #58575A;
  168. line-height: 16px;
  169. flex-wrap: wrap;
  170. }
  171. .table-dashboard-item-tip {
  172. width: 138px;
  173. /* text-align: center; */
  174. padding-left: 20px;
  175. height: 46px;
  176. line-height: 46px;
  177. }
  178. .table-dashboard-item-form {
  179. display: flex;
  180. justify-content: center;
  181. align-items: flex-end;
  182. flex: 1;
  183. height: 46px;
  184. line-height: 46px;
  185. min-width: 170px;
  186. }
  187. .table-dashboard-item-unit {
  188. margin-left: 4px;
  189. line-height: 40px;
  190. }
  191. .table-dashboard-item-num {
  192. font-size: 20px;
  193. /* line-height: 20px; */
  194. }
  195. .el-table td .cell {
  196. height: 60px;
  197. display: flex;
  198. align-items: center;
  199. }
  200. .table-dashboard-item-dot {
  201. width: 8px;
  202. height: 8px;
  203. background: #8644F2;
  204. border-radius: 50%;
  205. margin-right: 10px;
  206. display: inline-block;
  207. }
  208. .dot-2 {
  209. background: #E6A93C;
  210. }
  211. .dot-3 {
  212. background: #687FF4;
  213. }
  214. .dot-4 {
  215. background: #F08972;
  216. }
  217. .dot-5 {
  218. background: #EC5B55;
  219. }
  220. .color-ED655F {
  221. color: #ED655F;
  222. }
  223. .table-dashboard-container {
  224. display: flex;
  225. align-items: center;
  226. flex-wrap: wrap;
  227. }
  228. .nice-validator .el-input__inner {
  229. vertical-align: baseline !important;
  230. }
  231. .commission-avatar {
  232. width: 36px;
  233. height: 36px;
  234. border: 1px solid #E6E6E6;
  235. border-radius: 50%;
  236. overflow: hidden;
  237. }
  238. .commission-nickname {
  239. justify-content: center;
  240. cursor: pointer;
  241. color: #8644F2;
  242. }
  243. .commission-order-sn {
  244. cursor: pointer;
  245. color: #8644F2;
  246. }
  247. .table-user-container {
  248. flex-direction: column;
  249. }
  250. [v-cloak] {
  251. display: none
  252. }
  253. </style>
  254. <script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
  255. <script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
  256. <script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
  257. <div id="orderIndex" v-cloak>
  258. <div class="screen-container display-flex" v-if="!searchForm.id">
  259. <div class="shopro-button shopro-refresh-button" @click="reqOrderList">
  260. <i class="el-icon-refresh"></i>
  261. </div>
  262. <div class="screen-item">
  263. <el-input placeholder="请输入内容" v-model="searchForm.form_1_value" class="screen-item-select" size="small">
  264. <el-select v-model="searchForm.form_1_key" slot="prepend" placeholder="请选择">
  265. <el-option label="下单用户ID" value="buyer_id"></el-option>
  266. <el-option label="下单用户昵称" value="buyer_nickname"></el-option>
  267. <el-option label="下单用户手机号" value="buyer_mobile"></el-option>
  268. </el-select>
  269. </el-input>
  270. </div>
  271. <div class="screen-item">
  272. <el-input placeholder="请输入内容" v-model="searchForm.form_2_value" class="screen-item-select" size="small">
  273. <el-select v-model="searchForm.form_2_key" slot="prepend" placeholder="请选择">
  274. <el-option label="分销用户ID" value="agent_id"></el-option>
  275. <el-option label="分销用户昵称" value="agent_nickname"></el-option>
  276. <el-option label="分销用户手机号" value="agent_mobile"></el-option>
  277. </el-select>
  278. </el-input>
  279. </div>
  280. <div class="screen-item">
  281. <div class="screen-item-tip">订单号</div>
  282. <el-input placeholder="请输入订单号" v-model="searchForm.order_sn" class="screen-item-input" size="small">
  283. </el-input>
  284. </div>
  285. <div class="screen-item">
  286. <div class="screen-item-tip">入账状态</div>
  287. <el-select v-model="searchForm.status" placeholder="请选择分佣状态" size="small">
  288. <el-option :label="sitem.label" :value="sitem.value" v-for="sitem in searchStatusOption">
  289. </el-option>
  290. </el-select>
  291. </div>
  292. <div class="screen-item screen-item-time">
  293. <div class="screen-item-tip">分佣时间</div>
  294. <div>
  295. <el-date-picker v-model="searchForm.createtime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
  296. size="small" format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
  297. end-placeholder="结束日期">
  298. </el-date-picker>
  299. </div>
  300. </div>
  301. <div class="screen-item shopro-screen-item-button">
  302. <div class="shopro-button shopro-reset-button" @click="screenEmpty">重置</div>
  303. <div class="shopro-button shopro-screen-button" @click="handleCurrentChange(1)">筛选</div>
  304. </div>
  305. </div>
  306. <div class="order-table" v-loading="isAjax">
  307. <div class="table-dashboard-container">
  308. <div class="table-dashboard-item-container">
  309. <div class="table-dashboard-item">
  310. <div class="table-dashboard-item-tip">
  311. <span class="table-dashboard-item-dot"></span>
  312. 佣金单数:
  313. </div>
  314. <div class="table-dashboard-item-form">
  315. <span class="table-dashboard-item-num">{{dashboard.total}}</span>
  316. <span class="table-dashboard-item-unit">单</span>
  317. </div>
  318. </div>
  319. </div>
  320. <div class="table-dashboard-item-container">
  321. <div class="table-dashboard-item">
  322. <div class="table-dashboard-item-tip">
  323. <span class="table-dashboard-item-dot dot-2"></span>
  324. 累计佣金:
  325. </div>
  326. <div class="table-dashboard-item-form">
  327. <span class="table-dashboard-item-num">{{dashboard.commission_total}}</span>
  328. <span class="table-dashboard-item-unit">元</span>
  329. </div>
  330. </div>
  331. </div>
  332. <div class="table-dashboard-item-container">
  333. <div class="table-dashboard-item">
  334. <div class="table-dashboard-item-tip">
  335. <span class="table-dashboard-item-dot dot-3"></span>
  336. 已到账佣金:
  337. </div>
  338. <div class="table-dashboard-item-form">
  339. <span class="table-dashboard-item-num">{{dashboard.commissioned_total}}</span>
  340. <span class="table-dashboard-item-unit">元</span>
  341. </div>
  342. </div>
  343. </div>
  344. <div class="table-dashboard-item-container">
  345. <div class="table-dashboard-item">
  346. <div class="table-dashboard-item-tip">
  347. <span class="table-dashboard-item-dot dot-4"></span>
  348. 待入账佣金:
  349. </div>
  350. <div class="table-dashboard-item-form">
  351. <span class="table-dashboard-item-num">{{dashboard.delay_total}}</span>
  352. <span class="table-dashboard-item-unit">元</span>
  353. </div>
  354. </div>
  355. </div>
  356. <div class="table-dashboard-item-container">
  357. <div class="table-dashboard-item">
  358. <div class="table-dashboard-item-tip">
  359. <span class="table-dashboard-item-dot dot-5"></span>
  360. 已退回佣金:
  361. </div>
  362. <div class="table-dashboard-item-form">
  363. <span class="table-dashboard-item-num">{{dashboard.commission_back_total}}</span>
  364. <span class="table-dashboard-item-unit">元</span>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. <div>
  370. <el-table :data="orderList" style="width: 100%" ref="multipleTable" tooltip-effect="dark" border stripe
  371. default-expand-all="true" @selection-change="handleSelectionChange">
  372. <el-table-column width="70" label="ID">
  373. <template slot-scope="scope">
  374. {{scope.row.order.id}}
  375. </template>
  376. </el-table-column>
  377. <el-table-column width="220" label="订单号">
  378. <template slot-scope="scope">
  379. <span class="commission-order-sn"
  380. @click="openCommissonOrder(scope.row.order)">{{scope.row.order.order_sn}}</span>
  381. </template>
  382. </el-table-column>
  383. <el-table-column min-width="160" label="下单用户">
  384. <template slot-scope="scope">
  385. <el-popover placement="bottom" trigger="hover" width="180">
  386. <div class="popover-container">
  387. <div class="display-flex">
  388. <div class="display-flex">
  389. <div class="popover-tip">用户ID</div>:
  390. </div>
  391. <div class="active-cursor-line">
  392. {{scope.row.buyer.id}}
  393. </div>
  394. </div>
  395. <div class="display-flex" v-if="scope.row.buyer && scope.row.buyer.mobile">
  396. <div class="display-flex">
  397. <div class="popover-tip">手机号</div>:
  398. </div>
  399. <div>{{scope.row.buyer.mobile}}</div>
  400. </div>
  401. </div>
  402. <div slot="reference" class="table-user-container display-flex">
  403. <div class="commission-avatar">
  404. <el-image :src="Fast.api.cdnurl(scope.row.buyer.avatar)" fit="contain">
  405. <div slot="error" class="image-slot">
  406. <i class="el-icon-picture-outline"></i>
  407. </div>
  408. </el-image>
  409. </div>
  410. <div class="ellipsis-item commission-nickname">{{scope.row.buyer.nickname}}</div>
  411. </div>
  412. </el-popover>
  413. </template>
  414. </el-table-column>
  415. <el-table-column min-width="160" label="分销用户">
  416. <template slot-scope="scope">
  417. <el-popover placement="bottom" trigger="hover" width="180">
  418. <div class="popover-container">
  419. <div class="display-flex">
  420. <div class="display-flex">
  421. <div class="popover-tip">用户ID</div>:
  422. </div>
  423. <div class="active-cursor-line">
  424. {{scope.row.agent.id}}
  425. </div>
  426. </div>
  427. <div class="display-flex" v-if="scope.row.agent && scope.row.agent.mobile">
  428. <div class="display-flex">
  429. <div class="popover-tip">手机号</div>:
  430. </div>
  431. <div>{{scope.row.agent.mobile}}</div>
  432. </div>
  433. </div>
  434. <div class="table-user-container display-flex" slot="reference">
  435. <div class="commission-avatar">
  436. <el-image :src="Fast.api.cdnurl(scope.row.agent.avatar)" fit="contain">
  437. <div slot="error" class="image-slot">
  438. <i class="el-icon-picture-outline"></i>
  439. </div>
  440. </el-image>
  441. </div>
  442. <div class="ellipsis-item commission-nickname"
  443. @click="operation('edit',scope.row.agent.id)">
  444. {{scope.row.agent.nickname}}
  445. </div>
  446. </div>
  447. </el-popover>
  448. </template>
  449. </el-table-column>
  450. <el-table-column min-width="90" prop="commission" label="分佣金额">
  451. <template slot-scope="scope">
  452. <div class="ellipsis-item">{{scope.row.commission}}元</div>
  453. </template>
  454. </el-table-column>
  455. <el-table-column width="90" label="入账状态">
  456. <template slot-scope="scope">
  457. <div class="display-flex" :class="rewardStatusClass(scope.row.status)">
  458. <span class="shopro-status-dot"></span>
  459. <span>{{scope.row.status_text}}</span>
  460. </div>
  461. </template>
  462. </el-table-column>
  463. <el-table-column width="90" prop="type_text" label="入账方式">
  464. </el-table-column>
  465. <el-table-column min-width="160" label="分佣时间">
  466. <template slot-scope="scope">
  467. {{moment(scope.row.createtime*1000).format('YYYY-MM-DD HH:mm:ss')}}
  468. </template>
  469. </el-table-column>
  470. </el-table>
  471. </div>
  472. <div class="shopro-pagination-container">
  473. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  474. :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="limit"
  475. layout="total, sizes, prev, pager, next, jumper" :total="totalPage">
  476. </el-pagination>
  477. </div>
  478. </div>
  479. </div>