95 lines
2.8 KiB
PHP
95 lines
2.8 KiB
PHP
<?php
|
|
|
|
namespace app\admin\logic\statistic;
|
|
|
|
use app\common\logic\BaseLogic;
|
|
use app\common\model\store_order\StoreOrder;
|
|
use app\common\model\user\User;
|
|
use app\common\model\user\UserVisit;
|
|
use app\common\model\user_recharge\UserRecharge;
|
|
use Exception;
|
|
/**
|
|
* Class 仓库统计
|
|
* @package app\services\statistic
|
|
*/
|
|
class WarehouseLogic extends BaseLogic
|
|
{
|
|
|
|
public static function total_warehouse(){
|
|
$topData[] = [
|
|
'title' => '总采购金额',
|
|
'desc' => '平台采购商品总支付金额',
|
|
'total_money' => 22,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
|
|
|
|
$topData[] = [
|
|
'title' => '已结算金额',
|
|
'desc' => '平台支付给供应商的金额',
|
|
'total_money' => 6565,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '未结算金额',
|
|
'desc' => '平台未支付给供应商的金额',
|
|
'total_money' => 6565,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '总商品库存',
|
|
'desc' => '平台统计商品总库存、含门店仓库',
|
|
'total_money' => 6565,
|
|
'cash_title' => 12322,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '总仓库库存',
|
|
'desc' => '平台统计仓库库存',
|
|
'total_money' => 6565,
|
|
'cash_title' => 12322,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '海吉星仓库库存',
|
|
'desc' => '平台统计海吉星仓库库存',
|
|
'total_money' => 6565,
|
|
'cash_title' => 12322,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '泸县集采集配库存',
|
|
'desc' => '平台统计泸县集采集配库存',
|
|
'total_money' => 6565,
|
|
'cash_title' => 12322,
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$topData[] = [
|
|
'title' => '总门店库存',
|
|
'desc' => '平台统计门店库存',
|
|
'total_money' => 6565,
|
|
'cash_title' => 12322,
|
|
|
|
'value' => [],
|
|
'type' => 1,
|
|
];
|
|
$data['series'] = [];
|
|
foreach ($topData as $k => $v) {
|
|
// $data['x'] = $Chain['out']['x'];
|
|
$data['series'][$k]['name'] = $v['title'];
|
|
$data['series'][$k]['desc'] = $v['desc'];
|
|
$data['series'][$k]['total_value'] = $v['total_money'];
|
|
$data['series'][$k]['total_money'] = $v['cash_title']??'';
|
|
|
|
$data['series'][$k]['type'] = $v['type'];
|
|
}
|
|
return $data;
|
|
}
|
|
} |