|
@@ -5,6 +5,7 @@ use common\helpers\Cache;
|
|
|
use common\helpers\Tool;
|
|
use common\helpers\Tool;
|
|
|
use common\libs\dataList\DataListInterface;
|
|
use common\libs\dataList\DataListInterface;
|
|
|
use common\models\DecOrder;
|
|
use common\models\DecOrder;
|
|
|
|
|
+use common\models\Order;
|
|
|
use common\models\User;
|
|
use common\models\User;
|
|
|
use common\libs\dataList\column\DateTime;
|
|
use common\libs\dataList\column\DateTime;
|
|
|
|
|
|
|
@@ -24,7 +25,7 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
|
|
|
public function dataHandle()
|
|
public function dataHandle()
|
|
|
{
|
|
{
|
|
|
$this->listData = DecOrder::lists($this->condition, $this->params, [
|
|
$this->listData = DecOrder::lists($this->condition, $this->params, [
|
|
|
- 'select' => 'DO.*,U.USER_NAME USER_NAME,TU.USER_NAME TO_USER_NAME,TU.REAL_NAME,TU.ID_CARD,TU.MOBILE,TU.DEC_LV,DU.USER_NAME DEC_USER_NAME,DU.REAL_NAME DEC_REAL_NAME,RU.USER_NAME REC_USER_NAME,RU.REAL_NAME REC_REAL_NAME,CU.USER_NAME CON_USER_NAME,CU.REAL_NAME CON_REAL_NAME',
|
|
|
|
|
|
|
+ 'select' => 'DO.*,U.USER_NAME USER_NAME,TU.USER_NAME TO_USER_NAME,TU.REAL_NAME,TU.ID_CARD,TU.MOBILE,TU.DEC_LV,DU.USER_NAME DEC_USER_NAME,DU.REAL_NAME DEC_REAL_NAME,RU.USER_NAME REC_USER_NAME,RU.REAL_NAME REC_REAL_NAME,CU.USER_NAME CON_USER_NAME,CU.REAL_NAME CON_REAL_NAME,O.*',
|
|
|
'orderBy' => 'DO.CREATED_AT DESC, DO.ID DESC',
|
|
'orderBy' => 'DO.CREATED_AT DESC, DO.ID DESC',
|
|
|
'from' => DecOrder::tableName() . ' AS DO',
|
|
'from' => DecOrder::tableName() . ' AS DO',
|
|
|
'join' => [
|
|
'join' => [
|
|
@@ -33,6 +34,7 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
|
|
|
['LEFT JOIN', User::tableName() . ' AS DU', 'DO.DEC_ID=DU.ID'],
|
|
['LEFT JOIN', User::tableName() . ' AS DU', 'DO.DEC_ID=DU.ID'],
|
|
|
['LEFT JOIN', User::tableName() . ' AS RU', 'DO.REC_USER_ID=RU.ID'],
|
|
['LEFT JOIN', User::tableName() . ' AS RU', 'DO.REC_USER_ID=RU.ID'],
|
|
|
['LEFT JOIN', User::tableName() . ' AS CU', 'DO.CON_USER_ID=CU.ID'],
|
|
['LEFT JOIN', User::tableName() . ' AS CU', 'DO.CON_USER_ID=CU.ID'],
|
|
|
|
|
+ ['LEFT JOIN', Order::tableName() . ' AS O', 'DO.ORDER_SN=O.SN']
|
|
|
],
|
|
],
|
|
|
'page' => $this->page,
|
|
'page' => $this->page,
|
|
|
'pageSize' => $this->pageSize,
|
|
'pageSize' => $this->pageSize,
|
|
@@ -45,6 +47,7 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
|
|
|
*/
|
|
*/
|
|
|
public function getColumn(){
|
|
public function getColumn(){
|
|
|
$decLevelConfig = Cache::getDecLevelConfig();
|
|
$decLevelConfig = Cache::getDecLevelConfig();
|
|
|
|
|
+ $regionConfig = Cache::getRegionConfig();
|
|
|
if(!$this->columns){
|
|
if(!$this->columns){
|
|
|
$this->columns = [
|
|
$this->columns = [
|
|
|
'ID' => null,
|
|
'ID' => null,
|
|
@@ -161,6 +164,40 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
|
|
|
'header' => '报单时上级姓名',
|
|
'header' => '报单时上级姓名',
|
|
|
'headerOther' => ['width' => '150'],
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
],
|
|
|
|
|
+ 'PROVINCE' => [
|
|
|
|
|
+ 'header' => '省',
|
|
|
|
|
+ 'headerOther' => ['width' => '120'],
|
|
|
|
|
+ 'value' => function ($row) use($regionConfig) {
|
|
|
|
|
+ return $regionConfig[$row['PROVINCE']]['REGION_NAME'] ?? '';
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'CITY' => [
|
|
|
|
|
+ 'header' => '市',
|
|
|
|
|
+ 'headerOther' => ['width' => '120'],
|
|
|
|
|
+ 'value' => function ($row) use($regionConfig) {
|
|
|
|
|
+ return $regionConfig[$row['CITY']]['REGION_NAME'] ?? '';
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'COUNTY' => [
|
|
|
|
|
+ 'header' => '区',
|
|
|
|
|
+ 'headerOther' => ['width' => '120'],
|
|
|
|
|
+ 'value' => function ($row) use($regionConfig) {
|
|
|
|
|
+ return $regionConfig[$row['COUNTY']]['REGION_NAME'] ?? '';
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'ADDRESS' => [
|
|
|
|
|
+ 'header' => '详细地址',
|
|
|
|
|
+ 'headerOther' => [
|
|
|
|
|
+ 'width' => '300',
|
|
|
|
|
+ ],
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'EXPRESS_TYPE' => [
|
|
|
|
|
+ 'header' => '发货方式',
|
|
|
|
|
+ 'headerOther' => ['width' => '150'],
|
|
|
|
|
+ 'value' => function ($row) {
|
|
|
|
|
+ return $row['EXPRESS_TYPE']==0 ? '邮寄' : '自提';
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
'PERIOD_NUM' => [
|
|
'PERIOD_NUM' => [
|
|
|
'header' => '期数',
|
|
'header' => '期数',
|
|
|
],
|
|
],
|