From 99fc5e692e07bf9c971148b8023a103de2fd1bb9 Mon Sep 17 00:00:00 2001 From: zengchaoxin Date: Fri, 1 Nov 2019 13:25:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=BA=E4=BA=8B=E5=B7=A5?= =?UTF-8?q?=E8=B5=84=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/models/PayT.php | 20 - frontend/controllers/PersonnelController.php | 79 ++-- .../views/insurer/non-finance-mng-edit.php | 275 ----------- frontend/views/insurer/non-finance-mng.php | 99 ---- .../non-financial-settlement-detail.php | 283 ----------- .../insurer/non-financial-settlement-list.php | 99 ---- frontend/views/insurer/non-my-return-list.php | 70 --- frontend/views/insurer/print-mng-edit.php | 382 --------------- frontend/views/insurer/print-mng.php | 76 --- frontend/views/personnel/pay-info.php | 440 ++++++++++++------ frontend/views/personnel/pay-list.php | 322 ++++++------- 11 files changed, 457 insertions(+), 1688 deletions(-) delete mode 100644 frontend/views/insurer/non-finance-mng-edit.php delete mode 100644 frontend/views/insurer/non-finance-mng.php delete mode 100644 frontend/views/insurer/non-financial-settlement-detail.php delete mode 100644 frontend/views/insurer/non-financial-settlement-list.php delete mode 100644 frontend/views/insurer/non-my-return-list.php delete mode 100644 frontend/views/insurer/print-mng-edit.php delete mode 100644 frontend/views/insurer/print-mng.php diff --git a/common/models/PayT.php b/common/models/PayT.php index 5602672..c010eac 100644 --- a/common/models/PayT.php +++ b/common/models/PayT.php @@ -166,21 +166,7 @@ class PayT extends \common\models\Base } $ext_day_pay = 0; -// if($group_info) { -// $ext_day_pay = ($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay)/$worktype; -// } else { -// $ext_day_pay = $user_info->ext_pay / $worktype; -// } $ext_day_pay = $this->formal_pay / $worktype; -// var_dump($workday); -// var_dump($this->formal_pay); -// var_dump($worktype); -// var_dump($this->attendance_days); - - - -// die; -// $try_day_pay = $user_info->try_pay / $worktype; $try_day_pay = $this->try_pay / $worktype; $should_pay = 0; @@ -196,12 +182,6 @@ class PayT extends \common\models\Base $should_pay += $this->bonus; $should_pay += $this->get_pass_time_pay; $should_pay += $this->get_full_attendance_pay; -//echo $should_pay; -// $should_pay += $this->turnover; - -// if($group_info){ -// $should_pay += $group_info->base_pay + $group_info->job_pay + $group_info->station_pay; -// } $this->should_pay = $should_pay; $real_pay = $should_pay - $this->late_pay; diff --git a/frontend/controllers/PersonnelController.php b/frontend/controllers/PersonnelController.php index e7294be..43cd827 100644 --- a/frontend/controllers/PersonnelController.php +++ b/frontend/controllers/PersonnelController.php @@ -17,6 +17,8 @@ use common\models\CompanyT; class PersonnelController extends \frontend\controllers\UserBaseController { public $my = null; + public $enableCsrfValidation = false; + public $layout = 'blue-main'; public function init() { @@ -38,79 +40,74 @@ class PersonnelController extends \frontend\controllers\UserBaseController * 人事工资列表 * @return string */ - public function actionPayList() + public function actionPayList() { + $group_items = GroupT::getTree(); + $company_items = CompanyT::find()->all(); + return $this->render('pay-list',[ + 'group_items' => $group_items, + 'company_items' => $company_items + ]); + } + + public function actionPayListJson() { + Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; $username = $request->get('username'); $name = $request->get('name'); $pay_date = $request->get('pay_date',date('Y-m')); $group_id = $request->get('group_id',0); $company_id = $request->get('company_id'); - $page = $request->get('page',1); $is_leave = $request->get('is_leave',0); - $status_id = $request->get('status_id',0); + $offset = $request->get('offset', 0); + $limit = $request->get('limit', 10); + $query = UserT::find() ->leftJoin('pay_t','pay_t.user_id=user_t.id') ->where('user_t.group_id>0 and is_delete=0'); if($username != '') { - $query = $query->andWhere('user_t.username like "'.$username.'"'); + $query->andWhere('user_t.username like "'.$username.'"'); } if($name != '') { - $query = $query->andWhere('user_t.name like "'.$name.'"'); + $query->andWhere('user_t.name like "'.$name.'"'); } if($is_leave != ''){ - $query = $query->andWhere(['user_t.is_leave' => $is_leave]); + $query->andWhere(['user_t.is_leave' => $is_leave]); } if($company_id > 0) { - $query = $query->andWhere('user_t.company_id='.$company_id); + $query->andWhere('user_t.company_id='.$company_id); } if($group_id > 0) { - $query = $query->andWhere('user_t.group_id='.$group_id); + $query->andWhere('user_t.group_id='.$group_id); } if($status_id > 0) { - $query = $query->andWhere('pay_t.status_id='.$status_id); + $query->andWhere('pay_t.status_id='.$status_id); } - $query = $query->orderBy('user_t.username ASC,user_t.id ASC'); + $query->orderBy('user_t.username ASC,user_t.id ASC'); $total = $query->count(); - $pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]); - $pagination->setPage($page-1); - - $query = $query->offset($pagination->offset)->limit($pagination->limit); + $query->offset($offset)->limit($limit); $items = $query->all(); - $page_info = MyLib::getPageInfo($pagination); - $group_items = GroupT::getTree(); - $return_count = UserT::find() - ->leftJoin('pay_t','pay_t.user_id=user_t.id') - ->where('user_t.group_id>0 and is_delete=0') - ->andWhere('pay_t.pay_date="'.$pay_date.'"') - ->andWhere('pay_t.status_id=7') - ->count(); - - - $company_items = CompanyT::find()->all(); - - return $this->render('pay-list',[ - 'group_items' => $group_items, - 'items' => $items, - 'page_info' => $page_info, - 'page' => $page, - 'username' => $username, - 'name' => $name, - 'pay_date' => $pay_date, - 'group_id' => $group_id, - 'company_id' => $company_id, - 'status_id' => $status_id, - 'is_leave' => $is_leave, - 'company_items' => $company_items, + $data = []; + $data['total'] = count($items); + $data['rows'] = []; + foreach($items as $item) { + $row = $item->toArray(); + $row['pay_date'] = $pay_date; + $row['group_name'] = $item->group ? $item->group->path : ''; + $row['is_leave'] = $item->is_leave ? '已离职':''; + $pay_info = $item->getPay($pay_date); + $row['status_name'] = $pay_info ? $pay_info->getStatus($pay_info->status_id) : ''; + $row['real_pay'] = $pay_info ? $pay_info->base_real_pay : 0 ; + $data['rows'][] = $row; + } - 'return_count' => $return_count - ]); + return $data; } /** diff --git a/frontend/views/insurer/non-finance-mng-edit.php b/frontend/views/insurer/non-finance-mng-edit.php deleted file mode 100644 index 12d6f20..0000000 --- a/frontend/views/insurer/non-finance-mng-edit.php +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - -
-
- - - - -
- - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人姓名insurant_name?>证件号insurant_number?>电话insurant_phone?>insurant_phone1): ?>,insurant_phone1?>
投保人姓名policy_holder_name?>证件号policy_holder_number?>电话policy_holder_phone?>policy_holder_phone1): ?>,policy_holder_phone1?>
受益人姓名beneficiary_name?>证件号beneficiary_number?>电话beneficiary_phone?>beneficiary_phone1): ?>,beneficiary_phone1?>
产品方案 - scheme_id?$info->sche->name:''?> - 总保额保险费用
起保日期insurer_date_start?>投保份数num?>座位数seat?>
-
- - - - - - - -
- - - - -
- - - - - - - - - - -
非车险终止日期非车险保单号电子保单发送状态未发el_insurance==1) echo 'checked'?>/>已发el_insurance==2) echo 'checked'?>/>
-
- - - - - - - - - -
- - - - -
- - - - - - op1_id > 0) { - echo ''; - } - ?> - - - - - op1_id > 0) { ?> - - - - - - - - - op1_id > 0) { ?> - - - - - - - - op1_id > 0) { ?> - - - - - - - - op1_id > 0) { ?> - - - - -
非车险销售:user->getShowName()?>核保:'.$order_info->op1->getShowName().'
销售比例核保比例
%%
非车险销售提成核保提成
- - -
- - - - - - - -
- - - - -
-
-
-
-
-
- -    - -    - -    - -
- - - - - - - \ No newline at end of file diff --git a/frontend/views/insurer/non-finance-mng.php b/frontend/views/insurer/non-finance-mng.php deleted file mode 100644 index 6b05a32..0000000 --- a/frontend/views/insurer/non-finance-mng.php +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - -
- - - - 被保险人: - - - - 正本日期: - - -- - - -
- - - - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - $caiwu = $item->caiwu1; - ?> - - - - - - - - - - - - - - - -
序号被保险人保险公司正本日期非车险保单号销售座席状态当前操作操作
id_man,20)?>人保print_date?>insurer_non_no?>user?$item->user->getShowName():''?> status->name?>lock?$caiwu->lock->getShowName():''?> - status_id == 12){ ?> - [解锁] - [详情] - -
diff --git a/frontend/views/insurer/non-financial-settlement-detail.php b/frontend/views/insurer/non-financial-settlement-detail.php deleted file mode 100644 index 88bf2a3..0000000 --- a/frontend/views/insurer/non-financial-settlement-detail.php +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - -
-
- - - - -
- - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人姓名insurant_name?>证件号insurant_number?>电话insurant_phone?>insurant_phone1): ?>,insurant_phone1?>
投保人姓名policy_holder_name?>证件号policy_holder_number?>电话policy_holder_phone?>policy_holder_phone1): ?>,policy_holder_phone1?>
受益人姓名beneficiary_name?>证件号beneficiary_number?>电话beneficiary_phone?>beneficiary_phone1): ?>,beneficiary_phone1?>
产品方案 - scheme_id?$info->sche->name:''?> - 总保额保险费用
起保日期insurer_date_start?>投保份数num?>座位数seat?>
-
- - - - - - - -
- - - - -
- - - - - - - - - - -
非车险终止日期非车险保单号电子保单发送状态未发el_insurance==1) echo 'checked'?>/>已发el_insurance==2) echo 'checked'?>/>
-
- - - - - - - - - -
- - - - -
- - - - - - op1_id > 0) { - echo ''; - } - ?> - - - - - op1_id > 0) { ?> - - - - - - - - - op1_id > 0) { ?> - - - - - - - - op1_id > 0) { ?> - - - - - - - - op1_id > 0) { ?> - - - - -
非车险销售:user->getShowName()?>核保:'.$order_info->op1->getShowName().'
销售比例核保比例
%%
非车险销售提成核保提成
- - -
- - - - - - - -
- - - - -
-
-
-
-
-
- status_id != 10) - { - ?> - -    - -    - - -    - -
- - - - - - - \ No newline at end of file diff --git a/frontend/views/insurer/non-financial-settlement-list.php b/frontend/views/insurer/non-financial-settlement-list.php deleted file mode 100644 index 1ceb94c..0000000 --- a/frontend/views/insurer/non-financial-settlement-list.php +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - -
- - - - 被保险人: - - - - 正本日期: - - -- - - -
- - - - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - $caiwu = $item->caiwu1; - ?> - - - - - - - - - - - - - - - -
序号被保险人保险公司正本日期非车险保单号销售座席状态当前操作操作
id_man,20)?>人保print_date?>insurer_non_no?>user?$item->user->getShowName():''?> status->name?>lock?$caiwu->lock->getShowName():''?> - - [解锁] - [详情] - -
diff --git a/frontend/views/insurer/non-my-return-list.php b/frontend/views/insurer/non-my-return-list.php deleted file mode 100644 index 9be3fa3..0000000 --- a/frontend/views/insurer/non-my-return-list.php +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - -
- 出单日期:从截止 - 退单日期:从截止 - - 车牌: -
- - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - ?> - - - - - - - - - - - - - -
序号车牌号被保险人证件号码退回时间备注操作
car_no?>id_man?>id_number?>return_time)?>return_remark?> - [详情] - -
diff --git a/frontend/views/insurer/print-mng-edit.php b/frontend/views/insurer/print-mng-edit.php deleted file mode 100644 index c7fcb90..0000000 --- a/frontend/views/insurer/print-mng-edit.php +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - -
- - - - -
- - - - - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车牌号car_no?>厂牌型号factory_model?>品牌brand?$car_info->brand->name:''?>车系series?$car_info->series->name:''?>
发动机号engine_no?>车架号car_frame_no?>初登日期register_date?>排量displacement?$car_info->displacement->name:''?>
车辆类型carType?$car_info->carType->name:''?>运营性质carUse?$car_info->carUse->name:''?>座位数seats?>年份car_year?>
车主car_man?>联系电话phone?>证件号码car_man_number?>
备注remark?>业务分组businessGroup ? $order_info->businessGroup->name : ''?>业务员user?$order_info->user->getShowName():''?>联系电话user?$order_info->user->phone:''?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人id_man?>证件号码id_number?>联系人link_man?>联系电话link_phone?>
送单日期send_date?>保险公司company?$order_info->company->name:''?>付款方式payType?$order_info->payType->name:''?>电子邮件email?>
商业起保日期insurer1_begin_date?>交强起保日期insurer2_begin_date?>缴费单号pay_no?>
商业保单号insurer1_no?>交强保单号insurer2_no?>备注remark?>
送单地址 - direction1?$order_info->direction1->name:''?> - range1?$order_info->range1->name:''?> - city1?$order_info->city1->name:''?> - district1?$order_info->district1->name:''?> - send_address1?> -
正本送单地址 - direction2?$order_info->direction2->name:''?> - range2?$order_info->range2->name:''?> - city2?$order_info->city2->name:''?> - district2?$order_info->district2->name:''?> - send_address2?> -
- - - - - - -
- - - - - - - id; - if(!$order_id) - $order_id = 0; - $tmp_row = PriceT::find() - ->where('order_id='.$order_id.' and type_id='.$item->id) - ->one(); - if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue; - ?> - - - - - - -
险种内容不计免赔
name?>(code?>)val?>has_nopay==0) { - echo '是'; - } - ?> -
-
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
商业总净保费total1_clear?>商业含税总保费total1?>
交强总净保费total2_clear?>交强含税总保费total2?>
车船税total3?>共计签单total_all?>
折扣后商业净保费total1_real?>减免金额total1_dis?>
商业折扣率total1_percent?>应收total_real?>
商业手续费total1_rate?>交强手续费total2_rate?>
备注price_remark?>
-
-

免费礼品

- - - 0 && $index%4==0) { - echo ''; - } - $index++; - $sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null; - echo ''; - echo ''; - } - while($index%4!=0) { - echo ''; - echo ''; - $index++; - } - ?> - -
'.$item->name.''; - foreach($item->gifts as $gift) { - if($sel_gift != null && $sel_gift->id == $gift->id) { - echo $gift->name; - } - } - echo '
-

自费礼品

- - - 0 && $index%4==0) { - echo ''; - } - $index++; - $sel_gift = isset($sel_gifts[$item->id])?$sel_gifts[$item->id]->gift:null; - echo ''; - echo ''; - } - while($index%4!=0) { - echo ''; - echo ''; - $index++; - } - ?> - -
'.$item->name.''; - foreach($item->gifts as $gift) { - if($sel_gift != null && $sel_gift->id == $gift->id) { - echo $gift->name; - } - } - echo '
-
-
- - - - - - - -
- - - - -
-
-
-
-
- -    - -    - -    - -    - -
- - - - - - - \ No newline at end of file diff --git a/frontend/views/insurer/print-mng.php b/frontend/views/insurer/print-mng.php deleted file mode 100644 index 961cf49..0000000 --- a/frontend/views/insurer/print-mng.php +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - -
- 被保险人: - 电话: - 车牌: - 商业保单号: - 交强保单号: - -
- - - - - - - - - - - - - - - $item) { - $start_index = ($page-1)*20 + $index; - ?> - - - - - - - - - - - - - - - - - -
序号被保险人联系电话车牌号保险公司商业保单号交强保单号销售座席状态当前操作操作
id_man,30)?>link_phone?>car_no?>company?$item->company->name:''?>insurer1_no?>insurer2_no?>user?$item->user->getShowName():''?> status->name?>lock?$item->lock->getShowName():''?> - [详情] -
diff --git a/frontend/views/personnel/pay-info.php b/frontend/views/personnel/pay-info.php index 81b1280..b214edb 100644 --- a/frontend/views/personnel/pay-info.php +++ b/frontend/views/personnel/pay-info.php @@ -1,166 +1,300 @@ + +beginBlock('header_css'); ?> + +endBlock(); ?> - -
- -

 

-

人事工资

-

应发工资:base_should_pay,2)?>实发工资:base_real_pay,2)?>

-

基本工资

- - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + +
+
+
基本信息
+
+
+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
补助工资
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
应扣工资
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+ status_id < 4 || $pay_info->status_id == 7) { ?> +
+
+
+ +
+
+
+ +
+
+
+
+ +
- -
基本信息
职务姓名入职时间工作制试用工资转正时间转正工资加班天数试用出勤天数转正出勤天数
getPath():''?>getShowName()?>enter_date?>worktype?$user_info->worktype->name:''?>job_date?>
-
-

补助工资

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
试用加班转正加班社保话费公交奖金全勤(钱数)通时(钱数)
-
-

应扣工资

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
应扣
迟到事假病假社保罚款电费离职押金公积金个税全勤(钱数或百分比)通时(钱数或百分比)
-
- status_id < 4 || $pay_info->status_id == 7): ?> - -    - - - -
- - - - - - - - -
- - - - -
-
-
- - - - - - - - - - - - +beginBlock('footer_js'); ?> +endBlock('footer_js'); ?> diff --git a/frontend/views/personnel/pay-list.php b/frontend/views/personnel/pay-list.php index 68b0f69..3b2379f 100644 --- a/frontend/views/personnel/pay-list.php +++ b/frontend/views/personnel/pay-list.php @@ -1,203 +1,145 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 工号: - 真实姓名: - 工资月份: - 是否离职: - 公司: - 分组: - 状态: - -   退回数量: -
- - - - - - - - - - - - - - - $item) { - $pay_info = $item->getPay($pay_date); - $real_pay = 0; - $is_begin = 0; - if($pay_info) { - $is_begin = 1; - $real_pay = $pay_info->base_real_pay; - - } - ?> - - - - - - - - - - - - - - - - -
工号真实姓名工资月份所属岗位工资是否离职状态操作
username?>name?>group?$item->group->name:''?> - 元 - is_leave?'是':''?> - - - getStatus($pay_info->status_id)?> - - - - [详情] -
- - - - - + + + +endBlock(); ?>