PeriodBonusList.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. <?php
  2. namespace backendApi\modules\v1\models\lists\bonus;
  3. use backendApi\modules\v1\models\Admin;
  4. use common\helpers\Cache;
  5. use common\helpers\user\Info;
  6. use common\libs\dataList\column\Price;
  7. use common\libs\dataList\column\YesNo;
  8. use common\libs\dataList\DataListInterface;
  9. use common\models\CalcBonus;
  10. use common\models\PerfOrder;
  11. use common\models\Period;
  12. use common\models\Region;
  13. use common\models\User as modelUser;
  14. use common\models\UserBind;
  15. use common\models\UserBonus;
  16. use common\models\UserInfo;
  17. use common\libs\dataList\column\DateTime;
  18. use common\models\UserPerf;
  19. use common\models\UserSystem;
  20. use common\models\Withdraw;
  21. use Yii;
  22. class PeriodBonusList extends \common\libs\dataList\DataList implements DataListInterface
  23. {
  24. /**
  25. * 列表名称
  26. * @return string
  27. */
  28. public function getListName(){
  29. return '奖金列表';
  30. }
  31. /**
  32. * 列表筛选到的数据
  33. * @throws \yii\base\Exception
  34. */
  35. public function dataHandle()
  36. {
  37. $yearMonth = $this->others['yearMonth'];
  38. $this->listData = CalcBonus::lists($this->condition, $this->params, [
  39. // 'select'=>'CB.*, UP.SURPLUS_1L AS UP_SURPLUS_1L, UP.SURPLUS_2L AS UP_SURPLUS_2L, UP.SURPLUS_3L AS UP_SURPLUS_3L,UI.CON_UID,UI.REC_UID',
  40. 'select'=>'CB.*,UI.CON_UID,UI.REC_UID',
  41. 'from' => CalcBonus::tableName().' AS CB',
  42. 'join' => [
  43. // ['LEFT JOIN', UserPerf::tableName() . ' AS UP', 'CB.USER_ID=UP.USER_ID'],
  44. ['LEFT JOIN', UserInfo::tableName() . ' AS UI', 'CB.USER_ID=UI.USER_ID'],
  45. ],
  46. 'yearMonth' => $yearMonth,
  47. 'orderBy' => 'CB.CREATED_AT DESC, CB.ID DESC',
  48. 'page' => $this->page,
  49. 'pageSize' => $this->pageSize,
  50. ]);
  51. unset($yearMonth);
  52. if ($this->listData['list']) {
  53. foreach ($this->listData['list'] as $key => $value) {
  54. $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'];
  55. $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'];
  56. $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'];
  57. $this->listData['list'][$key]['LAST_REC_USER_NAME'] = Info::getUserNameByUserId($value['REC_UID']);
  58. $this->listData['list'][$key]['LAST_REC_REAL_NAME'] = Info::getUserRealNameByUserId($value['REC_UID']);
  59. $this->listData['list'][$key]['LAST_CON_USER_NAME'] = Info::getUserNameByUserId($value['CON_UID']);
  60. $this->listData['list'][$key]['LAST_CON_REAL_NAME'] = Info::getUserRealNameByUserId($value['CON_UID']);
  61. }
  62. }
  63. }
  64. /**
  65. * 要展示和导出的所有字段
  66. * @return array
  67. */
  68. public function getColumn(){
  69. if(!$this->columns){
  70. $this->columns = [
  71. 'ID' => null,
  72. 'PERIOD_NUM' => [
  73. 'header' => '结算期数',
  74. 'headerOther' => [
  75. 'width' => '150',
  76. ],
  77. 'valueOther' => [
  78. 'tag'=>['type'=>'', 'size' => 'small', 'class'=>'no-border'],
  79. ],
  80. ],
  81. 'CALCULATED_AT' => [
  82. 'header' => '结算时间',
  83. 'value' => function($row) {
  84. return (new DateTime([
  85. 'value' => $row['CALCULATED_AT'],
  86. ]))->result();
  87. },
  88. 'headerOther' => ['width' => '170'],
  89. ],
  90. 'LAST_USER_NAME' => [
  91. 'header' => '会员编号',
  92. 'headerOther' => [
  93. 'width' => '150',
  94. ],
  95. 'valueOther' => [
  96. 'tag'=>['type'=>'info', 'size' => 'small', 'class'=>'no-border']
  97. ],
  98. ],
  99. 'LAST_REAL_NAME' => [
  100. 'header' => '会员姓名',
  101. 'headerOther' => [
  102. 'width' => '120',
  103. ],
  104. 'valueOther' => [
  105. 'tag'=>['type'=>'success', 'size' => 'small', 'class'=>'no-border']
  106. ],
  107. ],
  108. 'LAST_DEC_LV_NAME' => [
  109. 'header' => '结算时会员级别',
  110. 'headerOther' => [
  111. 'width' => '120',
  112. ],
  113. ],
  114. 'LAST_EMP_LV_NAME' => [
  115. 'header' => '结算时会员聘级',
  116. 'headerOther' => [
  117. 'width' => '140',
  118. ],
  119. ],
  120. 'LAST_MOBILE' => [
  121. 'header' => '手机号码',
  122. 'headerOther' => [
  123. 'width' => '120',
  124. ],
  125. ],
  126. 'LAST_PERIOD_AT' => [
  127. 'header' => '加入期数',
  128. 'headerOther' => [
  129. 'width' => '100',
  130. ],
  131. ],
  132. 'LAST_CREATED_AT' => [
  133. 'header' => '加入时间',
  134. 'value' => function($row) {
  135. return (new DateTime([
  136. 'value' => $row['LAST_CREATED_AT'],
  137. ]))->result();
  138. },
  139. 'headerOther' => ['width' => '170'],
  140. ],
  141. 'LAST_REC_USER_NAME' => [
  142. 'header' => '开拓者编号',
  143. 'headerOther' => [
  144. 'width' => '150',
  145. ],
  146. ],
  147. 'LAST_REC_REAL_NAME' => [
  148. 'header' => '开拓者姓名',
  149. 'headerOther' => [
  150. 'width' => '100',
  151. ],
  152. ],
  153. 'LAST_CON_USER_NAME' => [
  154. 'header' => '上级编号',
  155. 'headerOther' => [
  156. 'width' => '150',
  157. ],
  158. ],
  159. 'LAST_CON_REAL_NAME' => [
  160. 'header' => '上级姓名',
  161. 'headerOther' => [
  162. 'width' => '100',
  163. ],
  164. ],
  165. // 'PV_1L' => [
  166. // 'header' => '一市场新增业绩',
  167. // 'value' => function($row) {
  168. // return (new Price([
  169. // 'value' => $row['PV_1L'],
  170. // ]))->result();
  171. // },
  172. // 'headerOther' => [
  173. // 'width' => '120',
  174. // 'prop'=>'PV_1L',
  175. // ],
  176. // ],
  177. // 'SURPLUS_1L' => [
  178. // 'header' => '一市场结余业绩',
  179. // 'value' => function($row) {
  180. // return (new Price([
  181. // 'value' => $row['SURPLUS_1L'],
  182. // ]))->result();
  183. // },
  184. // 'headerOther' => [
  185. // 'width' => '120',
  186. // 'prop'=>'SURPLUS_1L',
  187. // ],
  188. // ],
  189. // 'UP_SURPLUS_1L' => [
  190. // 'header' => '当前一市场结余业绩',
  191. // 'value' => function($row) {
  192. // return (new Price([
  193. // 'value' => $row['UP_SURPLUS_1L'],
  194. // ]))->result();
  195. // },
  196. // 'headerOther' => [
  197. // 'width' => '120',
  198. // 'prop'=>'UP_SURPLUS_1L',
  199. // ],
  200. // ],
  201. // 'PV_2L' => [
  202. // 'header' => '二市场新增业绩',
  203. // 'value' => function($row) {
  204. // return (new Price([
  205. // 'value' => $row['PV_2L'],
  206. // ]))->result();
  207. // },
  208. // 'headerOther' => [
  209. // 'width' => '120',
  210. // 'prop'=>'PV_2L',
  211. // ],
  212. // ],
  213. // 'SURPLUS_2L' => [
  214. // 'header' => '二市场结余业绩',
  215. // 'value' => function($row) {
  216. // return (new Price([
  217. // 'value' => $row['SURPLUS_2L'],
  218. // ]))->result();
  219. // },
  220. // 'headerOther' => [
  221. // 'width' => '120',
  222. // 'prop'=>'SURPLUS_2L',
  223. // ],
  224. // ],
  225. // 'UP_SURPLUS_2L' => [
  226. // 'header' => '当前二市场结余业绩',
  227. // 'value' => function($row) {
  228. // return (new Price([
  229. // 'value' => $row['UP_SURPLUS_2L'],
  230. // ]))->result();
  231. // },
  232. // 'headerOther' => [
  233. // 'width' => '120',
  234. // 'prop'=>'UP_SURPLUS_2L',
  235. // ],
  236. // ],
  237. // 'PV_3L' => [
  238. // 'header' => '三市场新增业绩',
  239. // 'value' => function($row) {
  240. // return (new Price([
  241. // 'value' => $row['PV_3L'],
  242. // ]))->result();
  243. // },
  244. // 'headerOther' => [
  245. // 'width' => '120',
  246. // 'prop'=>'PV_3L',
  247. // ],
  248. // ],
  249. // 'SURPLUS_3L' => [
  250. // 'header' => '三市场结余业绩',
  251. // 'value' => function($row) {
  252. // return (new Price([
  253. // 'value' => $row['SURPLUS_3L'],
  254. // ]))->result();
  255. // },
  256. // 'headerOther' => [
  257. // 'width' => '120',
  258. // 'prop'=>'SURPLUS_3L',
  259. // ],
  260. // ],
  261. // 'UP_SURPLUS_3L' => [
  262. // 'header' => '当前三市场结余业绩',
  263. // 'value' => function($row) {
  264. // return (new Price([
  265. // 'value' => $row['UP_SURPLUS_3L'],
  266. // ]))->result();
  267. // },
  268. // 'headerOther' => [
  269. // 'width' => '120',
  270. // 'prop'=>'UP_SURPLUS_3L',
  271. // ],
  272. // ],
  273. 'BONUS_TG' => [
  274. 'header' => '销售奖金',
  275. 'value' => function($row) {
  276. return (new Price([
  277. 'value' => $row['BONUS_TG'],
  278. ]))->result();
  279. },
  280. 'headerOther' => [
  281. 'width' => '120',
  282. 'prop'=>'BONUS_TG',
  283. ],
  284. ],
  285. 'ORI_BONUS_TG' => [
  286. 'header' => '销售奖金原金额',
  287. 'value' => function($row) {
  288. return (new Price([
  289. 'value' => $row['ORI_BONUS_TG'],
  290. ]))->result();
  291. },
  292. 'headerOther' => [
  293. 'width' => '120',
  294. 'prop'=>'ORI_BONUS_TG',
  295. ],
  296. ],
  297. 'BONUS_QY' => [
  298. 'header' => '绩效奖金',
  299. 'value' => function($row) {
  300. return (new Price([
  301. 'value' => $row['BONUS_QY'],
  302. ]))->result();
  303. },
  304. 'headerOther' => [
  305. 'width' => '120',
  306. 'prop'=>'BONUS_QY',
  307. ],
  308. ],
  309. 'ORI_BONUS_QY' => [
  310. 'header' => '绩效奖金原金额',
  311. 'value' => function($row) {
  312. return (new Price([
  313. 'value' => $row['ORI_BONUS_QY'],
  314. ]))->result();
  315. },
  316. 'headerOther' => [
  317. 'width' => '120',
  318. 'prop'=>'ORI_BONUS_QY',
  319. ],
  320. ],
  321. 'ORI_BONUS_QY_BD' => [
  322. 'header' => '报单团队奖原金额',
  323. 'value' => function($row) {
  324. return (new Price([
  325. 'value' => $row['ORI_BONUS_QY_BD'],
  326. ]))->result();
  327. },
  328. 'headerOther' => [
  329. 'width' => '120',
  330. 'prop'=>'ORI_BONUS_QY_BD',
  331. ],
  332. ],
  333. // 'BONUS_BS' => [
  334. // 'header' => '蓝星管理奖',
  335. // 'value' => function($row) {
  336. // return (new Price([
  337. // 'value' => $row['BONUS_BS'],
  338. // ]))->result();
  339. // },
  340. // 'headerOther' => [
  341. // 'width' => '120',
  342. // 'prop'=>'BONUS_BS',
  343. // ],
  344. // ],
  345. // 'ORI_BONUS_BS' => [
  346. // 'header' => '蓝星管理奖原金额',
  347. // 'value' => function($row) {
  348. // return (new Price([
  349. // 'value' => $row['ORI_BONUS_BS'],
  350. // ]))->result();
  351. // },
  352. // 'headerOther' => [
  353. // 'width' => '120',
  354. // 'prop'=>'ORI_BONUS_BS',
  355. // ],
  356. // ],
  357. // 'REAL_BONUS_BS' => [
  358. // 'header' => '实发蓝星管理奖',
  359. // 'value' => function($row) {
  360. // return (new Price([
  361. // 'value' => $row['REAL_BONUS_BS'],
  362. // ]))->result();
  363. // },
  364. // 'headerOther' => [
  365. // 'width' => '120',
  366. // 'prop'=>'REAL_BONUS_BS',
  367. // ],
  368. // ],
  369. 'BONUS_BS_MNT' => [
  370. 'header' => '蓝星管理奖',
  371. 'value' => function($row) {
  372. return (new Price([
  373. 'value' => $row['BONUS_BS_MNT'],
  374. ]))->result();
  375. },
  376. 'headerOther' => [
  377. 'width' => '120',
  378. 'prop' => 'BONUS_BS_MNT',
  379. ],
  380. ],
  381. 'ORI_BONUS_BS_MNT' => [
  382. 'header' => '蓝星管理奖原金额',
  383. 'value' => function($row) {
  384. return (new Price([
  385. 'value' => $row['ORI_BONUS_BS_MNT'],
  386. ]))->result();
  387. },
  388. 'headerOther' => [
  389. 'width' => '120',
  390. 'prop' => 'ORI_BONUS_BS_MNT',
  391. ],
  392. ],
  393. 'BONUS_BS_ABBR' => [
  394. 'header' => '蓝星业绩奖',
  395. 'value' => function($row) {
  396. return (new Price([
  397. 'value' => $row['BONUS_BS_ABBR'],
  398. ]))->result();
  399. },
  400. 'headerOther' => [
  401. 'width' => '120',
  402. 'prop' => 'BONUS_BS_ABBR',
  403. ],
  404. ],
  405. 'ORI_BONUS_BS_ABBR' => [
  406. 'header' => '蓝星业绩奖原金额',
  407. 'value' => function($row) {
  408. return (new Price([
  409. 'value' => $row['ORI_BONUS_BS_ABBR'],
  410. ]))->result();
  411. },
  412. 'headerOther' => [
  413. 'width' => '120',
  414. 'prop' => 'ORI_BONUS_BS_ABBR',
  415. ],
  416. ],
  417. // 'BONUS_GX' => [
  418. // 'header' => '共享奖',
  419. // 'value' => function($row) {
  420. // return (new Price([
  421. // 'value' => $row['BONUS_GX'],
  422. // ]))->result();
  423. // },
  424. // 'headerOther' => [
  425. // 'width' => '120',
  426. // 'prop'=>'BONUS_GX',
  427. // ],
  428. // ],
  429. // 'ORI_BONUS_GX' => [
  430. // 'header' => '共享奖原金额',
  431. // 'value' => function($row) {
  432. // return (new Price([
  433. // 'value' => $row['ORI_BONUS_GX'],
  434. // ]))->result();
  435. // },
  436. // 'headerOther' => [
  437. // 'width' => '120',
  438. // 'prop'=>'ORI_BONUS_GX',
  439. // ],
  440. // ],
  441. // 'REAL_BONUS_GX' => [
  442. // 'header' => '实发共享奖',
  443. // 'value' => function($row) {
  444. // return (new Price([
  445. // 'value' => $row['REAL_BONUS_GX'],
  446. // ]))->result();
  447. // },
  448. // 'headerOther' => [
  449. // 'width' => '120',
  450. // 'prop'=>'REAL_BONUS_GX',
  451. // ],
  452. // ],
  453. // 'BONUS_BD' => [
  454. // 'header' => '服务奖',
  455. // 'value' => function($row) {
  456. // return (new Price([
  457. // 'value' => $row['BONUS_BD'],
  458. // ]))->result();
  459. // },
  460. // 'headerOther' => [
  461. // 'width' => '120',
  462. // 'prop'=>'BONUS_BD',
  463. // ],
  464. // ],
  465. // 'ORI_BONUS_BD' => [
  466. // 'header' => '服务奖原金额',
  467. // 'value' => function($row) {
  468. // return (new Price([
  469. // 'value' => $row['ORI_BONUS_BD'],
  470. // ]))->result();
  471. // },
  472. // 'headerOther' => [
  473. // 'width' => '120',
  474. // 'prop'=>'ORI_BONUS_BD',
  475. // ],
  476. // ],
  477. 'BONUS_REAL' => [
  478. 'header' => '实发奖金',
  479. 'value' => function($row) {
  480. return (new Price([
  481. 'value' => $row['BONUS_REAL'],
  482. ]))->result();
  483. },
  484. 'headerOther' => [
  485. 'width' => '120',
  486. 'prop'=>'BONUS_REAL',
  487. ],
  488. ],
  489. 'BONUS_TOTAL' => [
  490. 'header' => '总奖金',
  491. 'value' => function($row) {
  492. return (new Price([
  493. 'value' => $row['BONUS_TOTAL'],
  494. ]))->result();
  495. },
  496. 'headerOther' => [
  497. 'width' => '120',
  498. 'prop'=>'BONUS_TOTAL',
  499. ],
  500. ],
  501. 'MANAGE_TAX' => [
  502. 'header' => '管理费',
  503. 'value' => function($row) {
  504. return (new Price([
  505. 'value' => $row['MANAGE_TAX'],
  506. ]))->result();
  507. },
  508. 'headerOther' => [
  509. 'width' => '120',
  510. 'prop'=>'MANAGE_TAX',
  511. ],
  512. ],
  513. // 'RECONSUME_POINTS' => [
  514. // 'header' => '复销积分',
  515. // 'value' => function($row) {
  516. // return (new Price([
  517. // 'value' => $row['RECONSUME_POINTS'],
  518. // ]))->result();
  519. // },
  520. // 'headerOther' => [
  521. // 'width' => '120',
  522. // 'prop'=>'RECONSUME_POINTS',
  523. // ],
  524. // ],
  525. 'BONUS_INCOME' => [
  526. 'header' => '总收入',
  527. 'value' => function($row) {
  528. return (new Price([
  529. 'value' => $row['BONUS_INCOME'],
  530. ]))->result();
  531. },
  532. 'headerOther' => [
  533. 'width' => '120',
  534. 'prop'=>'BONUS_INCOME',
  535. ],
  536. ],
  537. // 'ORI_BONUS_STANDARD' => [
  538. // 'header' => '团队成长奖',
  539. // 'value' => function($row) {
  540. // return (new Price([
  541. // 'value' => $row['ORI_BONUS_STANDARD'],
  542. // ]))->result();
  543. // },
  544. // 'headerOther' => [
  545. // 'width' => '120',
  546. // 'prop'=>'ORI_BONUS_STANDARD',
  547. // ],
  548. // ],
  549. 'CALC_MONTH' => [
  550. 'header' => '结算月',
  551. 'headerOther' => [
  552. 'width' => '100',
  553. ],
  554. ],
  555. // 'BONUS_XF' => [
  556. // 'header' => '消费奖',
  557. // 'value' => function($row) {
  558. // return (new Price([
  559. // 'value' => $row['BONUS_XF'],
  560. // ]))->result();
  561. // },
  562. // 'headerOther' => [
  563. // 'width' => '120',
  564. // 'prop'=>'BONUS_XF',
  565. // ],
  566. // ],
  567. // 'ORI_BONUS_XF' => [
  568. // 'header' => '消费奖原金额',
  569. // 'value' => function($row) {
  570. // return (new Price([
  571. // 'value' => $row['ORI_BONUS_XF'],
  572. // ]))->result();
  573. // },
  574. // 'headerOther' => [
  575. // 'width' => '120',
  576. // 'prop'=>'ORI_BONUS_XF',
  577. // ],
  578. // ],
  579. // 'BONUS_YJ' => [
  580. // 'header' => '业绩奖',
  581. // 'value' => function($row) {
  582. // return (new Price([
  583. // 'value' => $row['BONUS_YJ'],
  584. // ]))->result();
  585. // },
  586. // 'headerOther' => [
  587. // 'width' => '120',
  588. // 'prop'=>'BONUS_YJ',
  589. // ],
  590. // ],
  591. // 'ORI_BONUS_YJ' => [
  592. // 'header' => '业绩奖原金额',
  593. // 'value' => function($row) {
  594. // return (new Price([
  595. // 'value' => $row['ORI_BONUS_YJ'],
  596. // ]))->result();
  597. // },
  598. // 'headerOther' => [
  599. // 'width' => '120',
  600. // 'prop'=>'ORI_BONUS_YJ',
  601. // ],
  602. // ],
  603. // 'BONUS_YC' => [
  604. // 'header' => '荣衔奖',
  605. // 'value' => function($row) {
  606. // return (new Price([
  607. // 'value' => $row['BONUS_YC'],
  608. // ]))->result();
  609. // },
  610. // 'headerOther' => [
  611. // 'width' => '120',
  612. // 'prop'=>'BONUS_YC',
  613. // ],
  614. // ],
  615. // 'ORI_BONUS_YC' => [
  616. // 'header' => '荣衔奖原金额',
  617. // 'value' => function($row) {
  618. // return (new Price([
  619. // 'value' => $row['ORI_BONUS_YC'],
  620. // ]))->result();
  621. // },
  622. // 'headerOther' => [
  623. // 'width' => '120',
  624. // 'prop'=>'ORI_BONUS_YC',
  625. // ],
  626. // ],
  627. // 'BONUS_VIP' => [
  628. // 'header' => 'VIP奖',
  629. // 'value' => function($row) {
  630. // return (new Price([
  631. // 'value' => $row['BONUS_VIP'],
  632. // ]))->result();
  633. // },
  634. // 'headerOther' => [
  635. // 'width' => '120',
  636. // 'prop'=>'BONUS_VIP',
  637. // ],
  638. // ],
  639. // 'ORI_BONUS_VIP' => [
  640. // 'header' => 'VIP奖原金额',
  641. // 'value' => function($row) {
  642. // return (new Price([
  643. // 'value' => $row['ORI_BONUS_VIP'],
  644. // ]))->result();
  645. // },
  646. // 'headerOther' => [
  647. // 'width' => '120',
  648. // 'prop'=>'ORI_BONUS_VIP',
  649. // ],
  650. // ],
  651. // 'BONUS_GL' => [
  652. // 'header' => '管理奖',
  653. // 'value' => function($row) {
  654. // return (new Price([
  655. // 'value' => $row['BONUS_GL'],
  656. // ]))->result();
  657. // },
  658. // 'headerOther' => [
  659. // 'width' => '120',
  660. // 'prop'=>'BONUS_GL',
  661. // ],
  662. // ],
  663. // 'ORI_BONUS_GL' => [
  664. // 'header' => '管理奖原金额',
  665. // 'value' => function($row) {
  666. // return (new Price([
  667. // 'value' => $row['ORI_BONUS_GL'],
  668. // ]))->result();
  669. // },
  670. // 'headerOther' => [
  671. // 'width' => '120',
  672. // 'prop'=>'ORI_BONUS_GL',
  673. // ],
  674. // ],
  675. // 'REAL_BONUS_GL' => [
  676. // 'header' => '实发管理奖',
  677. // 'value' => function($row) {
  678. // return (new Price([
  679. // 'value' => $row['REAL_BONUS_GL'],
  680. // ]))->result();
  681. // },
  682. // 'headerOther' => [
  683. // 'width' => '120',
  684. // 'prop'=>'REAL_BONUS_GL',
  685. // ],
  686. // ],
  687. // 'BONUS_FW' => [
  688. // 'header' => '服务奖',
  689. // 'value' => function($row) {
  690. // return (new Price([
  691. // 'value' => $row['BONUS_FW'],
  692. // ]))->result();
  693. // },
  694. // 'headerOther' => [
  695. // 'width' => '120',
  696. // 'prop'=>'BONUS_FW',
  697. // ],
  698. // ],
  699. // 'ORI_BONUS_FW' => [
  700. // 'header' => '服务奖原金额',
  701. // 'value' => function($row) {
  702. // return (new Price([
  703. // 'value' => $row['ORI_BONUS_FW'],
  704. // ]))->result();
  705. // },
  706. // 'headerOther' => [
  707. // 'width' => '120',
  708. // 'prop'=>'ORI_BONUS_FW',
  709. // ],
  710. // ],
  711. ];
  712. }
  713. return $this->columns;
  714. }
  715. /**
  716. * 前台用于筛选的类型集合
  717. * @return mixed
  718. */
  719. public function getFilterTypes()
  720. {
  721. if(!$this->filterTypes){
  722. $this->filterTypes = [
  723. 'LAST_USER_NAME'=> ['isUserTable'=> false, 'name'=> '会员编号'],
  724. 'LAST_REAL_NAME'=> ['isUserTable'=> false, 'name'=> '会员姓名'],
  725. 'LAST_DEC_LV_NAME'=> ['isUserTable'=> false, 'name'=> '结算时会员级别', 'other'=> 'decLevel'],
  726. 'LAST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> '结算时会员聘级', 'other'=> 'empLevel'],
  727. 'LAST_MOBILE'=> ['isUserTable'=> false, 'name'=> '手机号'],
  728. 'LAST_PERIOD_AT'=> ['isUserTable'=> false, 'name'=> '加入期数'],
  729. 'LAST_CREATED_AT'=> ['isUserTable'=> false, 'name'=> '加入时间', 'other'=> 'date'],
  730. 'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> '开拓者编号'],
  731. 'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> '开拓者姓名'],
  732. 'LAST_CON_USER_NAME'=> ['isUserTable'=> false, 'name'=> '上级编号'],
  733. 'LAST_CON_REAL_NAME'=> ['isUserTable'=> false, 'name'=> '上级姓名'],
  734. 'PV_1L'=> ['isUserTable'=> false, 'name'=> '一市场新增业绩'],
  735. 'SURPLUS_1L'=> ['isUserTable'=> false, 'name'=> '一市场结余业绩'],
  736. 'PV_2L'=> ['isUserTable'=> false, 'name'=> '二市场新增业绩'],
  737. 'SURPLUS_2L'=> ['isUserTable'=> false, 'name'=> '二市场结余业绩'],
  738. 'PV_3L'=> ['isUserTable'=> false, 'name'=> '三市场新增业绩'],
  739. 'SURPLUS_3L'=> ['isUserTable'=> false, 'name'=> '三市场结余业绩'],
  740. 'BONUS_BD'=> ['isUserTable'=> false, 'name'=> '服务奖'],
  741. 'BONUS_TG'=> ['isUserTable'=> false, 'name'=> '推广奖'],
  742. 'BONUS_XF'=> ['isUserTable'=> false, 'name'=> '消费奖'],
  743. 'BONUS_YJ'=> ['isUserTable'=> false, 'name'=> '业绩奖'],
  744. 'BONUS_GX'=> ['isUserTable'=> false, 'name'=> '共享奖'],
  745. 'BONUS_GL'=> ['isUserTable'=> false, 'name'=> '管理奖'],
  746. 'BONUS_QY'=> ['isUserTable'=> false, 'name'=> '团队奖'],
  747. 'BONUS_YC'=> ['isUserTable'=> false, 'name'=> '荣衔奖'],
  748. 'ORI_BONUS_STANDARD'=> ['isUserTable'=> false, 'name'=> '团队成长奖'],
  749. 'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> '结算月'],
  750. ];
  751. }
  752. return $this->filterTypes;
  753. }
  754. }