发布测试版2.3.3
This commit is contained in:
@@ -29,20 +29,13 @@ class WidgetController extends DefaultController
|
||||
(datediff(dd, getdate(), dateadd(year, datediff(year, head_birthday, getdate())+1, head_birthday)) between 0 and 7)')
|
||||
->selectRaw('id, code, name, head_name, head_phone, head_birthday')
|
||||
->get();
|
||||
} else if($this->dbType == 'pgsql') {
|
||||
$model->whereRaw("
|
||||
(concat(date_part('year', current_date), '-', date_part('month', head_birthday), '-', date_part('day', head_birthday))::date - current_date between 0 and 7)
|
||||
OR
|
||||
(concat(date_part('year', current_date) + 1, '-', date_part('month', head_birthday), '-', date_part('day', head_birthday))::date - current_date between 0 and 7)")
|
||||
->selectRaw("id, code, name, head_name, head_phone, concat(date_part('year', current_date), '-', date_part('month', head_birthday), '-', date_part('day', head_birthday))::date as head_birthday");
|
||||
}
|
||||
|
||||
else if($this->dbType == 'mysql') {
|
||||
$model->whereRaw("
|
||||
(concat(year(now()), DATE_FORMAT(birthday,'-%m-%d')) BETWEEN DATE_FORMAT(now(),'%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(now(), interval 10 day),'%Y-%m-%d'))
|
||||
(concat(year(now()), DATE_FORMAT(head_birthday,'-%m-%d')) BETWEEN DATE_FORMAT(now(),'%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(now(), interval 10 day),'%Y-%m-%d'))
|
||||
OR
|
||||
(concat(year(now()) + 1, DATE_FORMAT(birthday,'-%m-%d')) BETWEEN DATE_FORMAT(now(),'%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(now(), interval 10 day),'%Y-%m-%d'))")
|
||||
->selectRaw("id, code, name, head_name, head_phone, concat(year(now()), DATE_FORMAT(birthday,'-%m-%d')) as head_birthday");
|
||||
(concat(year(now()) + 1, DATE_FORMAT(head_birthday,'-%m-%d')) BETWEEN DATE_FORMAT(now(),'%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(now(), interval 10 day),'%Y-%m-%d'))")
|
||||
->selectRaw("id, code, name, head_name, head_phone, concat(year(now()), DATE_FORMAT(head_birthday,'-%m-%d')) as head_birthday");
|
||||
}
|
||||
|
||||
$rows = $model->get();
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
grid.remoteDataUrl = '{{url()}}';
|
||||
grid.remoteParams = {};
|
||||
var columnDefs = [
|
||||
{suppressMenu: true, field: "code", headerName: '客户编码', width: 120},
|
||||
{suppressMenu: true, field: "name", headerName: '客户名称', minWidth: 160},
|
||||
{suppressMenu: true, field: "head_name", headerName: '法人', width: 120},
|
||||
{suppressMenu: true, field: "head_phone", headerName: '法人手机', width: 120},
|
||||
{suppressMenu: true, field: "head_birthday", headerName: '法人生日', width: 120},
|
||||
{suppressMenu: true, field: "id", headerName: 'ID', width: 80}
|
||||
{suppressMenu: true, cellClass:'text-center', field: "code", headerName: '客户编码', width: 120},
|
||||
{suppressMenu: true, cellClass:'text-center', field: "name", headerName: '客户名称', minWidth: 160},
|
||||
{suppressMenu: true, cellClass:'text-center', field: "head_name", headerName: '法人', width: 120},
|
||||
{suppressMenu: true, cellClass:'text-center', field: "head_phone", headerName: '法人手机', width: 120},
|
||||
{suppressMenu: true, cellClass:'text-center', field: "head_birthday", headerName: '法人生日', width: 120},
|
||||
{suppressMenu: true, cellClass:'text-center', field: "id", headerName: 'ID', width: 80}
|
||||
];
|
||||
|
||||
grid.onRowDoubleClicked = function(row) {
|
||||
|
||||
Reference in New Issue
Block a user