加油包

This commit is contained in:
邓皓元 2019-02-14 11:10:19 +08:00
parent 7aa72601a5
commit f00242cfec
15 changed files with 55 additions and 32 deletions

View File

@ -44,6 +44,7 @@ class CompanyReportDetailExport extends AbstractExport implements FromQuery, Wit
'package_id',
'order_id',
'type',
'count',
'unit_price'
];
@ -56,13 +57,16 @@ class CompanyReportDetailExport extends AbstractExport implements FromQuery, Wit
public function headings(): array
{
return [
$headings = [
'SIM',
'运营商',
'企业名称',
'套餐名称',
'数量',
'套餐单价(元/月)',
];
return $headings;
}
/**

View File

@ -59,7 +59,7 @@ class CompanyReportExport extends AbstractExport implements FromCollection, With
'套餐周期(月)',
'套餐价格(元/周期)',
'套餐单价(元/月)',
'收费用户数',
'收费数',
'收费总价(元)',
'收费类型'
];

View File

@ -66,6 +66,8 @@ class OrderController extends Controller
{
$conditions = $this->request->all();
$conditions['order_id'] = $this->request->ids('order_id');
$res = $this->orderService->detail($conditions);
return res($res, '统计明细', 201);

View File

@ -13,7 +13,7 @@ class CompanyReportService extends Service
{
protected $orderCardPartitionRepository;
protected static $typeNames = ['首年', '非首年', '续费包', '流量包'];
protected static $typeNames = ['首年', '非首年', '续费包', '加油包'];
/**
* 构造函数
@ -41,7 +41,7 @@ class CompanyReportService extends Service
'package_id',
'type',
'unit_price',
DB::raw('count(*) as counts'),
DB::raw('CASE "type" WHEN 3 THEN SUM(counts) ELSE count(*) END AS counts'),
];
$query = $this->orderCardPartitionRepository->select($select)
@ -80,6 +80,8 @@ class CompanyReportService extends Service
'package_id',
'order_id',
'type',
'counts',
'unit_price'
];
$query = $this->orderCardPartitionRepository->select($select)

View File

@ -26,6 +26,7 @@ class CreateVirtualCompaniesTable extends Migration
$table->string('address')->default('')->comment('地址');
$table->text('remark')->nullable()->comment('订单备注');
$table->text('extends')->nullable()->comment('扩展信息');
$table->tinyInteger('status')->unsigned()->default(0)->comment('状态 0:正常 1:禁用');
$table->timestamps();
$table->softDeletes();

View File

@ -38,6 +38,7 @@ class CreateVirtualPackagesTable extends Migration
$table->tinyInteger('effect_months')->unsigned()->default(0)->comment('生效延迟周期(月)');
$table->tinyInteger('delay_months')->unsigned()->default(0)->comment('服务延长周期(月)');
$table->text('description')->nullable()->comment('描述');
$table->tinyInteger('status')->unsigned()->default(0)->comment('状态 0:正常 1:禁用');
$table->timestamps();
$table->softDeletes();

View File

@ -28,7 +28,7 @@ class CreateVirtualCompanyAccountsTable extends Migration
$table->tinyInteger('status')->unsigned()->default(0)->comment('状态 0未激活 1正常 2禁用');
$table->timestamps();
$table->softDeletes();
$table->unique(['mobile', 'deleted_at']);
$table->comment('VD企业账号表');
});

View File

@ -26,6 +26,7 @@ class CreateVirtualProductsTable extends Migration
$table->integer('base_price')->unsigned()->default(0)->comment('基础价格');
$table->integer('renewal_price')->unsigned()->default(0)->comment('续费价格');
$table->text('remark')->nullable()->comment('备注');
$table->tinyInteger('status')->unsigned()->default(0)->comment('状态 0:正常 1:禁用');
$table->timestamps();
$table->softDeletes();

View File

@ -32,30 +32,36 @@ export default {
return {
my_show: false,
list_data: null,
columns: [{
title: 'SIM',
key: 'sim',
width: 150
},
{
title: '运营商',
key: 'carrier_operator_name',
width: 120
},
{
title: '企业名称',
key: 'company_name',
width: 300
},
{
title: '套餐名称',
key: 'package_name'
},
{
title: '套餐单价(元/月)',
key: 'month_price',
width: 150
}
columns: [
{
title: 'SIM',
key: 'sim',
width: 150
},
{
title: '运营商',
key: 'carrier_operator_name',
width: 120
},
{
title: '企业名称',
key: 'company_name',
width: 300
},
{
title: '套餐名称',
key: 'package_name'
},
{
title: '数量',
key: 'counts',
width: 75
},
{
title: '套餐单价(元/月)',
key: 'month_price',
width: 150
}
]
};
},

View File

@ -56,7 +56,7 @@ export default {
width: 150
},
{
title: '收费用户数',
title: '收费数',
key: 'counts',
width: 130
},
@ -98,7 +98,7 @@ export default {
limit: 10,
type: row.type,
company_id: row.company_id,
month: this.options.month,
month: this.moment(this.options.month).format('YYYY-MM'),
package_id: row.package_id,
unit_price: Number(row.unit_price * 100)
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-7b1dff40.ca5cf5af.css rel=prefetch><link href=/js/chunk-00ae0766.9e6b7bf3.js rel=prefetch><link href=/js/chunk-7b1dff40.b2804b14.js rel=prefetch><link href=/css/app.36043160.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.f82ee341.js rel=preload as=script><link href=/js/chunk-vendors.02a4e5bc.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.36043160.css rel=stylesheet></head><body><noscript><strong>很抱歉如果没有启用JavaScript程序不能正常工作若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.02a4e5bc.js></script><script src=/js/app.f82ee341.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-7b1dff40.ca5cf5af.css rel=prefetch><link href=/js/chunk-00ae0766.9e6b7bf3.js rel=prefetch><link href=/js/chunk-7b1dff40.ad11022a.js rel=prefetch><link href=/css/app.36043160.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.6fe3ea07.js rel=preload as=script><link href=/js/chunk-vendors.02a4e5bc.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.36043160.css rel=stylesheet></head><body><noscript><strong>很抱歉如果没有启用JavaScript程序不能正常工作若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.02a4e5bc.js></script><script src=/js/app.6fe3ea07.js></script></body></html>