PeriodBonusList.php 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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_STAR_LV_NAME'] = Cache::getStarCrownLevelConfig()[$value['LAST_STAR_LV']]['LEVEL_NAME'] ?? $value['LAST_STAR_LV'];
  57. $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'];
  58. $this->listData['list'][$key]['LAST_REC_USER_NAME'] = Info::getUserNameByUserId($value['REC_UID']);
  59. $this->listData['list'][$key]['LAST_REC_REAL_NAME'] = Info::getUserRealNameByUserId($value['REC_UID']);
  60. $this->listData['list'][$key]['LAST_CON_USER_NAME'] = Info::getUserNameByUserId($value['CON_UID']);
  61. $this->listData['list'][$key]['LAST_CON_REAL_NAME'] = Info::getUserRealNameByUserId($value['CON_UID']);
  62. }
  63. }
  64. }
  65. /**
  66. * 要展示和导出的所有字段
  67. * @return array
  68. */
  69. // public function getColumn(){
  70. // if(!$this->columns){
  71. // $this->columns = [
  72. // 'ID' => null,
  73. // 'PERIOD_NUM' => [
  74. // 'header' => 'Pay Cycle(PC)', // 结算期数
  75. // 'headerOther' => [
  76. // 'width' => '150',
  77. // ],
  78. // 'valueOther' => [
  79. // 'tag'=>['type'=>'', 'size' => 'small', 'class'=>'no-border'],
  80. // ],
  81. // ],
  82. // 'CALCULATED_AT' => [
  83. // 'header' => 'Date', // 结算时间
  84. // 'value' => function($row) {
  85. // return (new DateTime([
  86. // 'value' => $row['CALCULATED_AT'],
  87. // ]))->result();
  88. // },
  89. // 'headerOther' => ['width' => '170'],
  90. // ],
  91. // 'LAST_USER_NAME' => [
  92. // 'header' => 'Member code',//会员编号
  93. // 'headerOther' => [
  94. // 'width' => '150',
  95. // ],
  96. // 'valueOther' => [
  97. // 'tag'=>['type'=>'info', 'size' => 'small', 'class'=>'no-border']
  98. // ],
  99. // ],
  100. // 'LAST_REAL_NAME' => [
  101. // 'header' => 'Member name',//会员姓名
  102. // 'headerOther' => [
  103. // 'width' => '120',
  104. // ],
  105. // 'valueOther' => [
  106. // 'tag'=>['type'=>'success', 'size' => 'small', 'class'=>'no-border']
  107. // ],
  108. // ],
  109. // 'LAST_DEC_LV_NAME' => [
  110. // 'header' => 'Member level at settlement',//结算时会员级别
  111. // 'headerOther' => [
  112. // 'width' => '120',
  113. // ],
  114. // ],
  115. // 'LAST_EMP_LV_NAME' => [
  116. // 'header' => 'Member rank at settlement',//结算时会员聘级
  117. // 'headerOther' => [
  118. // 'width' => '140',
  119. // ],
  120. // ],
  121. // 'LAST_STAR_LV_NAME' => [
  122. // 'header' => 'Member star at settlement',//结算时会员聘级
  123. // 'headerOther' => [
  124. // 'width' => '140',
  125. // ],
  126. // ],
  127. // 'LAST_MOBILE' => [
  128. // 'header' => 'Phone Number',//手机号码
  129. // 'headerOther' => [
  130. // 'width' => '120',
  131. // ],
  132. // ],
  133. // 'LAST_PERIOD_AT' => [
  134. // 'header' => 'Joining Period', // 加入期数
  135. // 'headerOther' => [
  136. // 'width' => '100',
  137. // ],
  138. // ],
  139. // 'LAST_CREATED_AT' => [
  140. // 'header' => 'Joining Date', // 加入时间
  141. // 'value' => function($row) {
  142. // return (new DateTime([
  143. // 'value' => $row['LAST_CREATED_AT'],
  144. // ]))->result();
  145. // },
  146. // 'headerOther' => ['width' => '170'],
  147. // ],
  148. // 'LAST_REC_USER_NAME' => [
  149. // 'header' => 'Sponsor No',//开拓者编号
  150. // 'headerOther' => [
  151. // 'width' => '150',
  152. // ],
  153. // ],
  154. // 'LAST_REC_REAL_NAME' => [
  155. // 'header' => 'Sponsor Name',//开拓者姓名
  156. // 'headerOther' => [
  157. // 'width' => '120',
  158. // ],
  159. // ],
  160. // 'LAST_CON_USER_NAME' => [
  161. // 'header' => 'Superior code',//上级编号
  162. // 'headerOther' => [
  163. // 'width' => '150',
  164. // ],
  165. // ],
  166. // 'LAST_CON_REAL_NAME' => [
  167. // 'header' => 'Superior name',//上级姓名
  168. // 'headerOther' => [
  169. // 'width' => '120',
  170. // ],
  171. // ],
  172. //// 'PV_1L' => [
  173. //// 'header' => '一市场新增业绩',
  174. //// 'value' => function($row) {
  175. //// return (new Price([
  176. //// 'value' => $row['PV_1L'],
  177. //// ]))->result();
  178. //// },
  179. //// 'headerOther' => [
  180. //// 'width' => '120',
  181. //// 'prop'=>'PV_1L',
  182. //// ],
  183. //// ],
  184. //// 'SURPLUS_1L' => [
  185. //// 'header' => '一市场结余业绩',
  186. //// 'value' => function($row) {
  187. //// return (new Price([
  188. //// 'value' => $row['SURPLUS_1L'],
  189. //// ]))->result();
  190. //// },
  191. //// 'headerOther' => [
  192. //// 'width' => '120',
  193. //// 'prop'=>'SURPLUS_1L',
  194. //// ],
  195. //// ],
  196. //// 'UP_SURPLUS_1L' => [
  197. //// 'header' => '当前一市场结余业绩',
  198. //// 'value' => function($row) {
  199. //// return (new Price([
  200. //// 'value' => $row['UP_SURPLUS_1L'],
  201. //// ]))->result();
  202. //// },
  203. //// 'headerOther' => [
  204. //// 'width' => '120',
  205. //// 'prop'=>'UP_SURPLUS_1L',
  206. //// ],
  207. //// ],
  208. //// 'PV_2L' => [
  209. //// 'header' => '二市场新增业绩',
  210. //// 'value' => function($row) {
  211. //// return (new Price([
  212. //// 'value' => $row['PV_2L'],
  213. //// ]))->result();
  214. //// },
  215. //// 'headerOther' => [
  216. //// 'width' => '120',
  217. //// 'prop'=>'PV_2L',
  218. //// ],
  219. //// ],
  220. //// 'SURPLUS_2L' => [
  221. //// 'header' => '二市场结余业绩',
  222. //// 'value' => function($row) {
  223. //// return (new Price([
  224. //// 'value' => $row['SURPLUS_2L'],
  225. //// ]))->result();
  226. //// },
  227. //// 'headerOther' => [
  228. //// 'width' => '120',
  229. //// 'prop'=>'SURPLUS_2L',
  230. //// ],
  231. //// ],
  232. //// 'UP_SURPLUS_2L' => [
  233. //// 'header' => '当前二市场结余业绩',
  234. //// 'value' => function($row) {
  235. //// return (new Price([
  236. //// 'value' => $row['UP_SURPLUS_2L'],
  237. //// ]))->result();
  238. //// },
  239. //// 'headerOther' => [
  240. //// 'width' => '120',
  241. //// 'prop'=>'UP_SURPLUS_2L',
  242. //// ],
  243. //// ],
  244. //// 'PV_3L' => [
  245. //// 'header' => '三市场新增业绩',
  246. //// 'value' => function($row) {
  247. //// return (new Price([
  248. //// 'value' => $row['PV_3L'],
  249. //// ]))->result();
  250. //// },
  251. //// 'headerOther' => [
  252. //// 'width' => '120',
  253. //// 'prop'=>'PV_3L',
  254. //// ],
  255. //// ],
  256. //// 'SURPLUS_3L' => [
  257. //// 'header' => '三市场结余业绩',
  258. //// 'value' => function($row) {
  259. //// return (new Price([
  260. //// 'value' => $row['SURPLUS_3L'],
  261. //// ]))->result();
  262. //// },
  263. //// 'headerOther' => [
  264. //// 'width' => '120',
  265. //// 'prop'=>'SURPLUS_3L',
  266. //// ],
  267. //// ],
  268. //// 'UP_SURPLUS_3L' => [
  269. //// 'header' => '当前三市场结余业绩',
  270. //// 'value' => function($row) {
  271. //// return (new Price([
  272. //// 'value' => $row['UP_SURPLUS_3L'],
  273. //// ]))->result();
  274. //// },
  275. //// 'headerOther' => [
  276. //// 'width' => '120',
  277. //// 'prop'=>'UP_SURPLUS_3L',
  278. //// ],
  279. //// ],
  280. // 'BONUS_TG' => [
  281. // 'header' => 'Welcome Bonus',//销售奖金
  282. // 'value' => function($row) {
  283. // return (new Price([
  284. // 'value' => $row['BONUS_TG'],
  285. // ]))->result();
  286. // },
  287. // 'headerOther' => [
  288. // 'width' => '130',
  289. // 'prop'=>'BONUS_TG',
  290. // ],
  291. // ],
  292. // 'ORI_BONUS_TG' => [
  293. // 'header' => 'Original amount of Welcome Bonus',//销售奖金原金额
  294. // 'value' => function($row) {
  295. // return (new Price([
  296. // 'value' => $row['ORI_BONUS_TG'],
  297. // ]))->result();
  298. // },
  299. // 'headerOther' => [
  300. // 'width' => '120',
  301. // 'prop'=>'ORI_BONUS_TG',
  302. // ],
  303. // ],
  304. // 'BONUS_QY' => [
  305. // 'header' => 'Team Bonus',//绩效奖金
  306. // 'value' => function($row) {
  307. // return (new Price([
  308. // 'value' => $row['BONUS_QY'],
  309. // ]))->result();
  310. // },
  311. // 'headerOther' => [
  312. // 'width' => '120',
  313. // 'prop'=>'BONUS_QY',
  314. // ],
  315. // ],
  316. // 'ORI_BONUS_QY' => [
  317. // 'header' => 'Original amount of Team Bonus',//绩效奖金原金额
  318. // 'value' => function($row) {
  319. // return (new Price([
  320. // 'value' => $row['ORI_BONUS_QY'],
  321. // ]))->result();
  322. // },
  323. // 'headerOther' => [
  324. // 'width' => '120',
  325. // 'prop'=>'ORI_BONUS_QY',
  326. // ],
  327. // ],
  328. // 'ORI_CAPPED_BONUS_QY' => [
  329. // 'header' => 'Uncapped amount of Team Award',//绩效奖未封顶金额
  330. // 'value' => function($row) {
  331. // return (new Price([
  332. // 'value' => $row['ORI_CAPPED_BONUS_QY'],
  333. // ]))->result();
  334. // },
  335. // 'headerOther' => [
  336. // 'width' => '120',
  337. // 'prop'=>'ORI_CAPPED_BONUS_QY',
  338. // ],
  339. // ],
  340. //// 'ORI_BONUS_QY_BD' => [
  341. //// 'header' => 'Original amount of declaration Team Award',//报单团队奖原金额
  342. //// 'value' => function($row) {
  343. //// return (new Price([
  344. //// 'value' => $row['ORI_BONUS_QY_BD'],
  345. //// ]))->result();
  346. //// },
  347. //// 'headerOther' => [
  348. //// 'width' => '120',
  349. //// 'prop'=>'ORI_BONUS_QY_BD',
  350. //// ],
  351. //// ],
  352. // 'BONUS_BS' => [
  353. // 'header' => 'Director Bonus',// 管理奖/蓝星奖
  354. // 'value' => function($row) {
  355. // return (new Price([
  356. // 'value' => $row['BONUS_BS'],
  357. // ]))->result();
  358. // },
  359. // 'headerOther' => [
  360. // 'width' => '120',
  361. // 'prop'=>'BONUS_BS',
  362. // ],
  363. // ],
  364. // 'ORI_BONUS_BS' => [
  365. // 'header' => 'Original amount of Director Bonus',
  366. // 'value' => function($row) {
  367. // return (new Price([
  368. // 'value' => $row['ORI_BONUS_BS'],
  369. // ]))->result();
  370. // },
  371. // 'headerOther' => [
  372. // 'width' => '120',
  373. // 'prop'=>'ORI_BONUS_BS',
  374. // ],
  375. // ],
  376. // // 'REAL_BONUS_BS' => [
  377. // // 'header' => '实发蓝星管理奖',
  378. // // 'value' => function($row) {
  379. // // return (new Price([
  380. // // 'value' => $row['REAL_BONUS_BS'],
  381. // // ]))->result();
  382. // // },
  383. // // 'headerOther' => [
  384. // // 'width' => '120',
  385. // // 'prop'=>'REAL_BONUS_BS',
  386. // // ],
  387. // // ],
  388. //// 'BONUS_BS_MNT' => [
  389. //// 'header' => 'Bluestar Management Award',//蓝星管理奖
  390. //// 'value' => function($row) {
  391. //// return (new Price([
  392. //// 'value' => $row['BONUS_BS_MNT'],
  393. //// ]))->result();
  394. //// },
  395. //// 'headerOther' => [
  396. //// 'width' => '120',
  397. //// 'prop' => 'BONUS_BS_MNT',
  398. //// ],
  399. //// ],
  400. //// 'ORI_BONUS_BS_MNT' => [
  401. //// 'header' => 'Original amount of Bluestar Management Award',//蓝星管理奖原金额
  402. //// 'value' => function($row) {
  403. //// return (new Price([
  404. //// 'value' => $row['ORI_BONUS_BS_MNT'],
  405. //// ]))->result();
  406. //// },
  407. //// 'headerOther' => [
  408. //// 'width' => '120',
  409. //// 'prop' => 'ORI_BONUS_BS_MNT',
  410. //// ],
  411. //// ],
  412. //// 'BONUS_BS_ABBR' => [
  413. //// 'header' => 'Blue star performance award',//蓝星业绩奖
  414. //// 'value' => function($row) {
  415. //// return (new Price([
  416. //// 'value' => $row['BONUS_BS_ABBR'],
  417. //// ]))->result();
  418. //// },
  419. //// 'headerOther' => [
  420. //// 'width' => '120',
  421. //// 'prop' => 'BONUS_BS_ABBR',
  422. //// ],
  423. //// ],
  424. //// 'ORI_BONUS_BS_ABBR' => [
  425. //// 'header' => 'Original amount of blue star performance award',//蓝星业绩奖原金额
  426. //// 'value' => function($row) {
  427. //// return (new Price([
  428. //// 'value' => $row['ORI_BONUS_BS_ABBR'],
  429. //// ]))->result();
  430. //// },
  431. //// 'headerOther' => [
  432. //// 'width' => '120',
  433. //// 'prop' => 'ORI_BONUS_BS_ABBR',
  434. //// ],
  435. //// ],
  436. //// 'BONUS_GX' => [
  437. //// 'header' => '共享奖',
  438. //// 'value' => function($row) {
  439. //// return (new Price([
  440. //// 'value' => $row['BONUS_GX'],
  441. //// ]))->result();
  442. //// },
  443. //// 'headerOther' => [
  444. //// 'width' => '120',
  445. //// 'prop'=>'BONUS_GX',
  446. //// ],
  447. //// ],
  448. //// 'ORI_BONUS_GX' => [
  449. //// 'header' => '共享奖原金额',
  450. //// 'value' => function($row) {
  451. //// return (new Price([
  452. //// 'value' => $row['ORI_BONUS_GX'],
  453. //// ]))->result();
  454. //// },
  455. //// 'headerOther' => [
  456. //// 'width' => '120',
  457. //// 'prop'=>'ORI_BONUS_GX',
  458. //// ],
  459. //// ],
  460. //// 'REAL_BONUS_GX' => [
  461. //// 'header' => '实发共享奖',
  462. //// 'value' => function($row) {
  463. //// return (new Price([
  464. //// 'value' => $row['REAL_BONUS_GX'],
  465. //// ]))->result();
  466. //// },
  467. //// 'headerOther' => [
  468. //// 'width' => '120',
  469. //// 'prop'=>'REAL_BONUS_GX',
  470. //// ],
  471. //// ],
  472. // 'BONUS_BD' => [
  473. // 'header' => 'Stockist Commission',// 服务奖
  474. // 'value' => function($row) {
  475. // return (new Price([
  476. // 'value' => $row['BONUS_BD'],
  477. // ]))->result();
  478. // },
  479. // 'headerOther' => [
  480. // 'width' => '120',
  481. // 'prop'=>'BONUS_BD',
  482. // ],
  483. // ],
  484. // 'ORI_BONUS_BD' => [
  485. // 'header' => 'Original amount of Stockist Commission',//服务奖原金额
  486. // 'value' => function($row) {
  487. // return (new Price([
  488. // 'value' => $row['ORI_BONUS_BD'],
  489. // ]))->result();
  490. // },
  491. // 'headerOther' => [
  492. // 'width' => '120',
  493. // 'prop'=>'ORI_BONUS_BD',
  494. // ],
  495. // ],
  496. // 'REAL_BONUS_QUARTER' => [
  497. // 'header' => 'Quarterly Bonus',// 季度分红
  498. // 'value' => function($row) {
  499. // return (new Price([
  500. // 'value' => $row['REAL_BONUS_QUARTER'],
  501. // ]))->result();
  502. // },
  503. // 'headerOther' => [
  504. // 'width' => '120',
  505. // 'prop'=>'REAL_BONUS_QUARTER',
  506. // ],
  507. // ],
  508. // 'ORI_BONUS_QUARTER' => [
  509. // 'header' => 'Original amount of Quarterly Bonus',//季度分红原金额
  510. // 'value' => function($row) {
  511. // return (new Price([
  512. // 'value' => $row['ORI_BONUS_QUARTER'],
  513. // ]))->result();
  514. // },
  515. // 'headerOther' => [
  516. // 'width' => '120',
  517. // 'prop'=>'ORI_BONUS_QUARTER',
  518. // ],
  519. // ],
  520. // 'BONUS_REAL' => [
  521. // 'header' => 'Actual Bonus',//实发奖金
  522. // 'value' => function($row) {
  523. // return (new Price([
  524. // 'value' => $row['BONUS_REAL'],
  525. // ]))->result();
  526. // },
  527. // 'headerOther' => [
  528. // 'width' => '120',
  529. // 'prop'=>'BONUS_REAL',
  530. // ],
  531. // ],
  532. // 'BONUS_TOTAL' => [
  533. // 'header' => 'Total Bonus',//总奖金
  534. // 'value' => function($row) {
  535. // return (new Price([
  536. // 'value' => $row['BONUS_TOTAL'],
  537. // ]))->result();
  538. // },
  539. // 'headerOther' => [
  540. // 'width' => '120',
  541. // 'prop'=>'BONUS_TOTAL',
  542. // ],
  543. // ],
  544. //// 'MANAGE_TAX' => [
  545. //// 'header' => 'Management Expense',//管理费
  546. //// 'value' => function($row) {
  547. //// return (new Price([
  548. //// 'value' => $row['MANAGE_TAX'],
  549. //// ]))->result();
  550. //// },
  551. //// 'headerOther' => [
  552. //// 'width' => '120',
  553. //// 'prop'=>'MANAGE_TAX',
  554. //// ],
  555. //// ],
  556. //// 'RECONSUME_POINTS' => [
  557. //// 'header' => '复销积分',
  558. //// 'value' => function($row) {
  559. //// return (new Price([
  560. //// 'value' => $row['RECONSUME_POINTS'],
  561. //// ]))->result();
  562. //// },
  563. //// 'headerOther' => [
  564. //// 'width' => '120',
  565. //// 'prop'=>'RECONSUME_POINTS',
  566. //// ],
  567. //// ],
  568. // 'BONUS_INCOME' => [
  569. // 'header' => 'Total revenue',//总收入
  570. // 'value' => function($row) {
  571. // return (new Price([
  572. // 'value' => $row['BONUS_INCOME'],
  573. // ]))->result();
  574. // },
  575. // 'headerOther' => [
  576. // 'width' => '120',
  577. // 'prop'=>'BONUS_INCOME',
  578. // ],
  579. // ],
  580. //// 'ORI_BONUS_STANDARD' => [
  581. //// 'header' => '团队成长奖',
  582. //// 'value' => function($row) {
  583. //// return (new Price([
  584. //// 'value' => $row['ORI_BONUS_STANDARD'],
  585. //// ]))->result();
  586. //// },
  587. //// 'headerOther' => [
  588. //// 'width' => '120',
  589. //// 'prop'=>'ORI_BONUS_STANDARD',
  590. //// ],
  591. //// ],
  592. // 'CALC_MONTH' => [
  593. // 'header' => 'Bonus Month',//结算月
  594. // 'headerOther' => [
  595. // 'width' => '100',
  596. // ],
  597. // ],
  598. //// 'BONUS_XF' => [
  599. //// 'header' => '消费奖',
  600. //// 'value' => function($row) {
  601. //// return (new Price([
  602. //// 'value' => $row['BONUS_XF'],
  603. //// ]))->result();
  604. //// },
  605. //// 'headerOther' => [
  606. //// 'width' => '120',
  607. //// 'prop'=>'BONUS_XF',
  608. //// ],
  609. //// ],
  610. //// 'ORI_BONUS_XF' => [
  611. //// 'header' => '消费奖原金额',
  612. //// 'value' => function($row) {
  613. //// return (new Price([
  614. //// 'value' => $row['ORI_BONUS_XF'],
  615. //// ]))->result();
  616. //// },
  617. //// 'headerOther' => [
  618. //// 'width' => '120',
  619. //// 'prop'=>'ORI_BONUS_XF',
  620. //// ],
  621. //// ],
  622. //// 'BONUS_YJ' => [
  623. //// 'header' => '业绩奖',
  624. //// 'value' => function($row) {
  625. //// return (new Price([
  626. //// 'value' => $row['BONUS_YJ'],
  627. //// ]))->result();
  628. //// },
  629. //// 'headerOther' => [
  630. //// 'width' => '120',
  631. //// 'prop'=>'BONUS_YJ',
  632. //// ],
  633. //// ],
  634. //// 'ORI_BONUS_YJ' => [
  635. //// 'header' => '业绩奖原金额',
  636. //// 'value' => function($row) {
  637. //// return (new Price([
  638. //// 'value' => $row['ORI_BONUS_YJ'],
  639. //// ]))->result();
  640. //// },
  641. //// 'headerOther' => [
  642. //// 'width' => '120',
  643. //// 'prop'=>'ORI_BONUS_YJ',
  644. //// ],
  645. //// ],
  646. //// 'BONUS_YC' => [
  647. //// 'header' => '荣衔奖',
  648. //// 'value' => function($row) {
  649. //// return (new Price([
  650. //// 'value' => $row['BONUS_YC'],
  651. //// ]))->result();
  652. //// },
  653. //// 'headerOther' => [
  654. //// 'width' => '120',
  655. //// 'prop'=>'BONUS_YC',
  656. //// ],
  657. //// ],
  658. //// 'ORI_BONUS_YC' => [
  659. //// 'header' => '荣衔奖原金额',
  660. //// 'value' => function($row) {
  661. //// return (new Price([
  662. //// 'value' => $row['ORI_BONUS_YC'],
  663. //// ]))->result();
  664. //// },
  665. //// 'headerOther' => [
  666. //// 'width' => '120',
  667. //// 'prop'=>'ORI_BONUS_YC',
  668. //// ],
  669. //// ],
  670. //// 'BONUS_VIP' => [
  671. //// 'header' => 'VIP奖',
  672. //// 'value' => function($row) {
  673. //// return (new Price([
  674. //// 'value' => $row['BONUS_VIP'],
  675. //// ]))->result();
  676. //// },
  677. //// 'headerOther' => [
  678. //// 'width' => '120',
  679. //// 'prop'=>'BONUS_VIP',
  680. //// ],
  681. //// ],
  682. //// 'ORI_BONUS_VIP' => [
  683. //// 'header' => 'VIP奖原金额',
  684. //// 'value' => function($row) {
  685. //// return (new Price([
  686. //// 'value' => $row['ORI_BONUS_VIP'],
  687. //// ]))->result();
  688. //// },
  689. //// 'headerOther' => [
  690. //// 'width' => '120',
  691. //// 'prop'=>'ORI_BONUS_VIP',
  692. //// ],
  693. //// ],
  694. //// 'BONUS_GL' => [
  695. //// 'header' => '管理奖',
  696. //// 'value' => function($row) {
  697. //// return (new Price([
  698. //// 'value' => $row['BONUS_GL'],
  699. //// ]))->result();
  700. //// },
  701. //// 'headerOther' => [
  702. //// 'width' => '120',
  703. //// 'prop'=>'BONUS_GL',
  704. //// ],
  705. //// ],
  706. //// 'ORI_BONUS_GL' => [
  707. //// 'header' => '管理奖原金额',
  708. //// 'value' => function($row) {
  709. //// return (new Price([
  710. //// 'value' => $row['ORI_BONUS_GL'],
  711. //// ]))->result();
  712. //// },
  713. //// 'headerOther' => [
  714. //// 'width' => '120',
  715. //// 'prop'=>'ORI_BONUS_GL',
  716. //// ],
  717. //// ],
  718. //// 'REAL_BONUS_GL' => [
  719. //// 'header' => '实发管理奖',
  720. //// 'value' => function($row) {
  721. //// return (new Price([
  722. //// 'value' => $row['REAL_BONUS_GL'],
  723. //// ]))->result();
  724. //// },
  725. //// 'headerOther' => [
  726. //// 'width' => '120',
  727. //// 'prop'=>'REAL_BONUS_GL',
  728. //// ],
  729. //// ],
  730. //// 'BONUS_FW' => [
  731. //// 'header' => '服务奖',
  732. //// 'value' => function($row) {
  733. //// return (new Price([
  734. //// 'value' => $row['BONUS_FW'],
  735. //// ]))->result();
  736. //// },
  737. //// 'headerOther' => [
  738. //// 'width' => '120',
  739. //// 'prop'=>'BONUS_FW',
  740. //// ],
  741. //// ],
  742. //// 'ORI_BONUS_FW' => [
  743. //// 'header' => '服务奖原金额',
  744. //// 'value' => function($row) {
  745. //// return (new Price([
  746. //// 'value' => $row['ORI_BONUS_FW'],
  747. //// ]))->result();
  748. //// },
  749. //// 'headerOther' => [
  750. //// 'width' => '120',
  751. //// 'prop'=>'ORI_BONUS_FW',
  752. //// ],
  753. //// ],
  754. //
  755. //
  756. // ];
  757. // }
  758. // return $this->columns;
  759. // }
  760. /**
  761. * 前台用于筛选的类型集合
  762. * @return mixed
  763. */
  764. public function getFilterTypes()
  765. {
  766. if(!$this->filterTypes){
  767. $this->filterTypes = [
  768. 'LAST_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Member code'],//会员编号
  769. 'LAST_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Member name'],//会员姓名
  770. 'LAST_DEC_LV_NAME'=> ['isUserTable'=> false, 'name'=> 'Member level at settlement', 'other'=> 'decLevel'],//结算时会员级别
  771. 'LAST_EMP_LV_NAME'=> ['isUserTable'=> false, 'name'=> 'Member rank at settlement', 'other'=> 'empLevel'],//结算时会员聘级
  772. 'LAST_MOBILE'=> ['isUserTable'=> false, 'name'=> 'Phone Number'],//手机号
  773. 'LAST_PERIOD_AT'=> ['isUserTable'=> false, 'name'=> 'Joining Period'], // 加入期数
  774. 'LAST_CREATED_AT'=> ['isUserTable'=> false, 'name'=> 'Joining Date', 'other'=> 'date'], // 加入时间
  775. 'CALCULATED_AT'=> ['isUserTable'=> false, 'name'=> 'Date', 'other'=> 'date'], // 备份时间
  776. 'LAST_REC_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor No'],//开拓者编号
  777. 'LAST_REC_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Sponsor Name'],//开拓者姓名
  778. 'LAST_CON_USER_NAME'=> ['isUserTable'=> false, 'name'=> 'Superior Number'],//上级编号
  779. 'LAST_CON_REAL_NAME'=> ['isUserTable'=> false, 'name'=> 'Name of superior'],//上级姓名
  780. 'PV_1L'=> ['isUserTable'=> false, 'name'=> 'I. new market performance'],//一市场新增业绩
  781. 'SURPLUS_1L'=> ['isUserTable'=> false, 'name'=> 'I. market balance performance'],//一市场结余业绩
  782. 'PV_2L'=> ['isUserTable'=> false, 'name'=> 'II. new market performance'],//二市场新增业绩
  783. 'SURPLUS_2L'=> ['isUserTable'=> false, 'name'=> 'II. market balance performance'],//二市场结余业绩
  784. // 'PV_3L'=> ['isUserTable'=> false, 'name'=> 'III. new market performance'],//三市场新增业绩
  785. // 'SURPLUS_3L'=> ['isUserTable'=> false, 'name'=> 'III. market balance performance'],//三市场结余业绩
  786. 'BONUS_BD'=> ['isUserTable'=> false, 'name'=> 'Stockist Commission'],//服务奖
  787. // 'BONUS_TG'=> ['isUserTable'=> false, 'name'=> 'Promotion Award'],//推广奖
  788. // 'BONUS_XF'=> ['isUserTable'=> false, 'name'=> 'Consumption Award'],//消费奖
  789. // 'BONUS_YJ'=> ['isUserTable'=> false, 'name'=> 'Performance Award'],//业绩奖
  790. // 'BONUS_GX'=> ['isUserTable'=> false, 'name'=> 'Sharing Award'],//共享奖
  791. 'BONUS_GL'=> ['isUserTable'=> false, 'name'=> 'Management Award'],//管理奖
  792. 'BONUS_QY'=> ['isUserTable'=> false, 'name'=> 'Team award'],//团队奖
  793. // 'BONUS_YC'=> ['isUserTable'=> false, 'name'=> 'Honor Award'],//荣衔奖
  794. // 'ORI_BONUS_STANDARD'=> ['isUserTable'=> false, 'name'=> 'Team growth Award'],//团队成长奖
  795. 'CALC_MONTH'=> ['isUserTable'=> false, 'name'=> 'Bonus Month'],//结算月
  796. ];
  797. }
  798. return $this->filterTypes;
  799. }
  800. }