完成出纳功能更新

完成财务功能更新
dev
曾超新 5 years ago
parent b9c44b7fc5
commit 022e293ea5
  1. 13
      common/models/PayT.php
  2. 354
      frontend/controllers/FinanceController.php
  3. 12
      frontend/controllers/PersonnelController.php
  4. 871
      frontend/views/finance/chuna-gongzi-info.php
  5. 259
      frontend/views/finance/chuna-gongzi-list.php
  6. 1061
      frontend/views/finance/pay2-info.php
  7. 272
      frontend/views/finance/pay2-list.php
  8. 2
      frontend/views/finance/receipt2.php

@ -154,14 +154,18 @@ class PayT extends \common\models\Base
}else{
$this->should_pay = 0;
$this->real_pay = 0;
$this->save();
if(!$this->save()) {
throw new \Exception(print_r($this->getErrors(), true));
}
return;
}
if($worktype == 0){
$this->should_pay = 0;
$this->real_pay = 0;
$this->save();
if(!$this->save()) {
throw new \Exception(print_r($this->getErrors(), true));
}
return;
}
@ -208,7 +212,10 @@ class PayT extends \common\models\Base
$this->real_pay = $real_pay;
$this->save();
if(!$this->save()) {
throw new \Exception(print_r($this->getErrors(), true));
}
return true;
}
/**

@ -57,7 +57,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
public $layout = 'blue-main';
public function actionReceipt() {
$insurer_company_items = InsurerCompanyT::find()->all();
$insurer_company_items = InsurerCompany2T::find()->all();
return $this->render('receipt',[
'insurer_company_items' => $insurer_company_items
@ -127,7 +127,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$query = $query->orderBy($sort);
if( $company_id > 0) {
$query->andWhere('order_t.company_id='.$company_id);
$query->andWhere('order_t.company2_id='.$company_id);
}
if ($username != "") {
$userdata = UserT::findOne(['username'=>$username]);
@ -5098,57 +5098,62 @@ class FinanceController extends \frontend\controllers\UserBaseController
* 财务工资列表
* @return string
*/
public function actionPay2List()
public function actionPay2List() {
$group_items = GroupT::getTree();
return $this->render('pay2-list',[
'group_items' => $group_items
]);
}
public function actionPay2ListJson()
{
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);
$page = $request->get('page', 1);
$is_leave = $request->get('is_leave');
$offset = $request->get('offset', 0);
$limit = $request->get('limit', 10);
$user_id = $this->my->id;
// var_dump($user_id);
$query = UserT::find()
->where('group_id>0 and is_delete=0');
if ($username != '') {
$query = $query->andWhere('username like "' . $username . '"');
$query->andWhere('username like "' . $username . '"');
}
if ($name != '') {
$query = $query->andWhere('name like "' . $name . '"');
$query->andWhere('name like "' . $name . '"');
}
if ($group_id > 0) {
$query = $query->andWhere('group_id=' . $group_id);
$query->andWhere('group_id=' . $group_id);
}
$query = $query->orderBy('username ASC,id ASC');
$total = $query->count();
$total_real_pay = 0;
foreach ($query->each() as $item) {
$pay_info = $item->getPay($pay_date);
if ($pay_info)
$total_real_pay += $pay_info->real_pay;
if($is_leave != '' ) {
$query->andWhere('is_leave='.$is_leave);
}
$query->orderBy('username ASC,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();
$data = [];
$data['total'] = $total;
$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->base_real_pay;
$row['should_pay'] = $pay_info->ticheng_real_pay;
$row['is_show'] = ($pay_info->renshi_status_id > 0 && $pay_info->chuna_status_id > 0 && $pay_info->status_id != 7 && $pay_info->status_id != 8) ? 1 : 0;
$data['rows'][] = $row;
}
return $this->render('pay2-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,
'total_real_pay' => $total_real_pay
]);
return $data;
}
/**
@ -5210,7 +5215,10 @@ class FinanceController extends \frontend\controllers\UserBaseController
->where('pay_date="' . $pay_date . '" and is_own=2 and type=8 and user_id=' . $user_id)
->orderBy('created_at asc');
//原新保
$my_type0_query = PayOrderUserT::find()
->where('pay_date="' . $pay_date . '" and type=1 and user_id=' . $user_id.' and is_own =0')
->orderBy('created_at asc');
@ -5237,6 +5245,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
'user_info' => $user_info,
'group_info' => $group_info,
'pay_info' => $pay_info,
'my_type0_query' => $my_type0_query,
'my_type1_query' => $my_type1_query,
'my_type3_query' => $my_type3_query,
'my_type5_query' => $my_type5_query,
@ -5249,6 +5258,33 @@ class FinanceController extends \frontend\controllers\UserBaseController
'pay_order_users' => $pay_order_users
]);
}
public function actionPay2ReturnSave()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '保存失败';
$id = $request->post('id',0);
$status_id = $request->post('status_id',0);
$remark = $request->post('remark','');
$pay_info = PayT::findOne($id);
$pay_info->status_id = $status_id + 6;
$content = '财务:'.$this->my->showName.'退回'.$pay_info->pay_date.'工资';
$this->addUserLog($pay_info->id, $content,$remark);
if($pay_info->save()){
$result['success'] = true;
$result['msg'] = '保存成功';
}
return $result;
}
/**
* 工资管理详情保存
* @return array
@ -5287,26 +5323,10 @@ class FinanceController extends \frontend\controllers\UserBaseController
$neqi_payids = $request->post('neqi_payids', array());
$should_pays5 = $request->post('should_pays5', array());
$rate5 = $request->post('rate5', array());
// var_dump($rate5);
//
// var_dump($should_pays5);
// die;
// echo '<br>';
//内勤正本
$zhengben = $request->post('zhengben', array());
$should_pays6 = $request->post('should_pays6', array());
$rate6 = $request->post('rate6', array());
//非车险销售
$non_xiaoshou = $request->post('non_xiaoshou', array());
$should_pays7 = $request->post('should_pays7', array());
$rate7 = $request->post('rate7', array());
//非车险核保
$non_hebao = $request->post('non_hebao', array());
$should_pays8 = $request->post('should_pays8', array());
$rate8 = $request->post('rate8', array());
// var_dump($zhengben);
// var_dump($should_pays6);
// die;
@ -5337,11 +5357,15 @@ class FinanceController extends \frontend\controllers\UserBaseController
if ($caiwu_info) {
$caiwu_info->rate1 = $rate;
$caiwu_info->money1 = $my_should_pays1[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $my_should_pays1[$index];
$pay_order->real_pay = $my_real_pays1[$index];
$pay_order->save();
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
}
//我的续保
foreach ($tc_my_payids_2 as $index => $id) {
@ -5356,11 +5380,15 @@ class FinanceController extends \frontend\controllers\UserBaseController
if ($caiwu_info) {
$caiwu_info->rate3 = $rate;
$caiwu_info->money3 = $my_should_pays2[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $my_should_pays2[$index];
$pay_order->real_pay = $my_real_pays2[$index];
$pay_order->save();
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
}
//我的提成
foreach ($tc_payids_1 as $index => $id) {
@ -5374,11 +5402,15 @@ class FinanceController extends \frontend\controllers\UserBaseController
if ($caiwu_info) {
$caiwu_info->rate1 = $rate1[$index];
$caiwu_info->money1 = $should_pays1[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $should_pays1[$index];
$pay_order->real_pay = $real_pays1[$index];
$pay_order->save();
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
}
foreach ($tc_payids_2 as $index => $id) {
$pay_order = PayOrderUserT::findOne(['id' => $id]);
@ -5391,36 +5423,16 @@ class FinanceController extends \frontend\controllers\UserBaseController
if ($caiwu_info) {
$caiwu_info->rate2 = $rate2[$index];
$caiwu_info->money2 = $should_pays2[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $should_pays2[$index];
$pay_order->real_pay = $real_pays2[$index];
$pay_order->save();
}
//送单提成
foreach ($tc_send_payids as $index => $id) {
$send_money = $send_moneys[$index];
$pay_order = PayOrderUserT::findOne(['id' => $id]);
if (!$pay_order) {
$result['msg'] = '送单提成错误:' . $id . '=>' . $send_money;
return $result;
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
if ($caiwu_info) {
if ($order_info->total1_clear == 0) {
$caiwu_info->send_rate = 0;
} else {
$caiwu_info->send_rate = round($send_money / $order_info->total1_clear * 100, 2);
}
$caiwu_info->send_money = $send_money;
$caiwu_info->save();
}
$pay_order->should_pay = $send_money;
$pay_order->real_pay = $send_money;
$pay_order->save();
}
//核保
foreach ($neqi_payids as $index => $id) {
$pay_order = PayOrderUserT::findOne(['id' => $id]);
@ -5434,11 +5446,15 @@ class FinanceController extends \frontend\controllers\UserBaseController
if(!isset($rate5[$index])) continue;
$caiwu_info->rate4 = $rate5[$index];
$caiwu_info->money4 = $should_pays5[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $should_pays5[$index];
$pay_order->real_pay = $should_pays5[$index];
$pay_order->save();
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
}
//正本$neqi_payids1
foreach ($zhengben as $index => $id) {
@ -5453,58 +5469,16 @@ class FinanceController extends \frontend\controllers\UserBaseController
if(!isset($rate6[$index])) continue;
$caiwu_info->rate5 = $rate6[$index];
$caiwu_info->money5 = $should_pays6[$index];
$caiwu_info->save();
if(!$caiwu_info->save()) {
throw new \Exception(print_r($caiwu_info->getErrors(), true));
}
}
$pay_order->should_pay = $should_pays6[$index];
$pay_order->real_pay = $should_pays6[$index];
$pay_order->save();
}
//非车险销售
foreach ($non_xiaoshou as $index => $id) {
$pay_order = PayOrderUserT::findOne(['id' => $id]);
if (!$pay_order) {
$result['msg'] = '我的提成错误2:' . $id . '=>' . $rate7[$index];
return $result;
if(!$pay_order->save()) {
throw new \Exception(print_r($pay_order->getErrors(), true));
}
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu1;
if ($caiwu_info) {
if(!isset($rate7[$index])) continue;
$caiwu_info->rate1 = $rate7[$index];
$caiwu_info->money1 = $should_pays7[$index];
$caiwu_info->save();
}
$pay_order->should_pay = $should_pays7[$index];
$pay_order->real_pay = $should_pays7[$index];
$pay_order->save();
}
// dd($non_hebao);
foreach ($non_hebao as $index => $id) {
$pay_order = PayOrderUserT::findOne(['id' => $id]);
if (!$pay_order) {
$result['msg'] = '我的提成错误2:' . $id . '=>' . $rate8[$index];
return $result;
}
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu1;
if ($caiwu_info) {
if(!isset($rate8[$index])) continue;
$caiwu_info->rate4 = $rate8[$index];
$caiwu_info->money4 = $should_pays8[$index];
$caiwu_info->save();
}
$pay_order->should_pay = $should_pays8[$index];
$pay_order->real_pay = $should_pays8[$index];
$pay_order->save();
}
$pay_info->calls = $calls;
$pay_info->bus = $bus;
@ -5515,7 +5489,11 @@ class FinanceController extends \frontend\controllers\UserBaseController
$pay_info->fix_total = $fix_total;
$pay_info->fix_rate = $fix_rate;
$pay_info->tax = $tax;
$pay_info->save();
$pay_info->caiwu_status_id = 1;
$pay_info->status_id = $pay_info->renshi_status_id + $pay_info->chuna_status_id + $pay_info->caiwu_status_id;
if(!$pay_info->save()) {
throw new \Exception(print_r($pay_info->getErrors(), true));
}
$pay_info->calPay();
// $pay_info->save();
@ -5525,7 +5503,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
throw $e;
$result['msg'] = $e->getMessage();
}
$result['success'] = true;
@ -7356,16 +7334,26 @@ class FinanceController extends \frontend\controllers\UserBaseController
* 出纳工资列表
* @return string
*/
public function actionChunaGongziList()
public function actionChunaGongziList() {
$group_items = GroupT::getTree();
return $this->render('chuna-gongzi-list',[
'group_items' => $group_items
]);
}
public function actionChunaGongziListJson()
{
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);
$page = $request->get('page', 1);
$status_id = $request->get('status_id',0);
$is_leave = $request->get('is_leave',0);
$offset = $request->get('offset', 0);
$limit = $request->get('limit', 10);
$user_id = $this->my->id;
// var_dump($user_id);
@ -7373,56 +7361,41 @@ class FinanceController extends \frontend\controllers\UserBaseController
->leftJoin('pay_t','pay_t.user_id=user_t.id')
->where('group_id>0 and is_delete=0');
if ($username != '') {
$query = $query->andWhere('username like "' . $username . '"');
$query->andWhere('username like "' . $username . '"');
}
if ($name != '') {
$query = $query->andWhere('name like "' . $name . '"');
$query->andWhere('name like "' . $name . '"');
}
if($is_leave != ''){
$query->andWhere(['is_leave' => $is_leave]);
}
if ($group_id > 0) {
$query = $query->andWhere('group_id=' . $group_id);
$query->andWhere('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('username ASC,id ASC');
$query->orderBy('username ASC,id ASC');
$total = $query->count();
$total_real_pay = 0;
foreach ($query->each() as $item) {
$pay_info = $item->getPay($pay_date);
if ($pay_info)
$total_real_pay += $pay_info->real_pay;
}
$pagination = new Pagination(['totalCount' => $total, 'pageSize' => 20]);
$pagination->setPage($page - 1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$query = $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=8')
->count();
$data = [];
$data['total'] = $total;
$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['should_pay'] = $item->getChunaShouldPay($pay_date);
$data['rows'][] = $row;
}
return $this->render('chuna-gongzi-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,
'total_real_pay' => $total_real_pay,
'status_id'=>$status_id,
'return_count' => $return_count
]);
return $data;
}
/**
* 出纳工资-详情
@ -7433,7 +7406,6 @@ class FinanceController extends \frontend\controllers\UserBaseController
$request = Yii::$app->request;
$user_id = $request->get('id', 0);
$pay_date = $request->get('pay_date', date('Y-m'));
$back_params = $request->get('back_params');
$user_info = UserT::findOne(['id' => $user_id]);
$group_info = $user_info->group;
@ -7554,6 +7526,40 @@ class FinanceController extends \frontend\controllers\UserBaseController
'pay_dz' => $pay_dz
]);
}
public function actionChunaGongziSave()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result = array();
$result['success'] = false;
$result['msg'] = '保存失败';
$id = $request->post('id',0);
$pay_chexian = $request->post('pay_chexian',0);
$pay_nochexian = $request->post('pay_nochexian',0);
$pay_dz = $request->post('pay_dz',0);
$pay_info = PayT::findOne($id);
$pay_dz = $pay_dz?$pay_dz:0;
$pay_nochexian = $pay_nochexian?$pay_nochexian:0;
$pay_chexian = $pay_chexian?$pay_chexian:0;
$pay_info->ticheng_real_pay = $pay_chexian + $pay_nochexian + $pay_dz;
$pay_info->chuna_status_id = 2;
$pay_info->status_id = $pay_info->renshi_status_id + 2;
$content = '出纳:'.$this->my->showName.'提交'.$pay_info->pay_date.'工资';
$this->addUserLog($pay_info->id, $content);
if($pay_info->save()){
$result['success'] = true;
$result['msg'] = '保存成功';
}
return $result;
}
/**
* 财务工资列表
* @return string

@ -42,10 +42,8 @@ class PersonnelController extends \frontend\controllers\UserBaseController
*/
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
'group_items' => $group_items
]);
}
@ -57,7 +55,6 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$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');
$is_leave = $request->get('is_leave',0);
$status_id = $request->get('status_id',0);
@ -76,9 +73,6 @@ class PersonnelController extends \frontend\controllers\UserBaseController
if($is_leave != ''){
$query->andWhere(['user_t.is_leave' => $is_leave]);
}
if($company_id > 0) {
$query->andWhere('user_t.company_id='.$company_id);
}
if($group_id > 0) {
$query->andWhere('user_t.group_id='.$group_id);
}
@ -91,10 +85,8 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$query->offset($offset)->limit($limit);
$items = $query->all();
$group_items = GroupT::getTree();
$data = [];
$data['total'] = count($items);
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();

@ -1,82 +1,94 @@
<?php
use \common\libs\MyLib;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<form id="theFrm">
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=$pay_info->id?>">
<input type="hidden" name="pay_chexian" value="<?=$pay_chexian?>">
<input type="hidden" name="pay_nochexian" value="<?=$pay_nochexian?>">
<input type="hidden" name="pay_dz" value="<?=$pay_dz?>">
<input type="hidden" name="pay_date" value="<?=$pay_date?>">
<input type="hidden" name="user_id" value="<?=$user_info->id?>">
<p>&nbsp;</p>
<h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>提成工资部分</h2>
<h3 align="center">应提成工资:<span><?=number_format($pay_info->ticheng_should_pay,2)?></span><span style="color:#ff0000;">实提成工资:<span><?=number_format($pay_info->ticheng_real_pay,2)?></span></span></h3>
<br>
<h3>提成工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<!-- <tr>-->
<!-- <td align="center" colspan="9" height="25" class="bg_tr">财务统计</td>-->
<!-- </tr>-->
<tr>
<td height="25" align="center" class="bg_tr">保单提成</td>
<td height="25" align="center" class="bg_tr">团队长提成</td>
<td height="25" align="center" class="bg_tr">非车险提成</td>
<td height="25" align="center" class="bg_tr">维修提成</td>
<td height="25" align="center" class="bg_tr">合计</td>
</tr>
<tr>
<td height="25" align="center" class="td_bg"><?=$pay_chexian?></td>
<td height="25" align="center" class="td_bg"><?=$pay_dz?></td>
<td height="25" align="center" class="td_bg"><?=$pay_nochexian?></td>
<td height="25" align="center" class="td_bg"></td>
<td height="25" align="center" class="td_bg"><?=$pay_chexian + $pay_nochexian + $pay_dz?></td>
</tr>
</table>
<br>
<div align="center">
<?php if($pay_info->status_id < 4 || $pay_info->status_id == 8): ?>
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 提交 "/>
&nbsp;&nbsp;
<?php endif;?>
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>提成工资</h5>
</div>
<br>
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(1) name="navcell">▼详情</TD>
</tr>
</tbody>
</table>
<TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb">
<TR>
<TD vAlign=top>
<h3>保单提成</h3>
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="col-sm-1 control-label">职务</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$user_info->group?$user_info->group->getPath():''?></label>
</div>
<label class="col-sm-1 control-label">姓名</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$user_info->getShowName()?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">保单提成</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$pay_chexian?></label>
</div>
<label class="col-sm-1 control-label">团队长提成</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$pay_dz?></label>
</div>
<label class="col-sm-1 control-label">合计</label>
<div class="col-sm-3">
<label class="form-control-static"><?=$pay_chexian + $pay_dz?></label>
</div>
</div>
<?php if($pay_info->status_id < 4 || $pay_info->status_id == 8) { ?>
<div>
<div class="row">
<div class="col-md-5 col-md-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>保 存</strong>
</button>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保单提成</h5>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<?php if($my_type1_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<table class="table table-bordered">
<thead>
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">我的新保</td>
<th colspan="13">我的新保</th>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">加点比例</td>
<td height="25" align="center" class="bg_tr">基本比例</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<th>序号</th>
<th>车牌号</th>
<th>正本日期</th>
<th>商业净保费</th>
<th>加点比例</th>
<th>基本比例</th>
<th>应提金额</th>
<!-- <td height="25" align="center" class="bg_tr">原新保提成</td>-->
<td height="25" align="center" class="bg_tr">减免金额</td>
<td height="25" align="center" class="bg_tr">自费礼品</td>
<td height="25" align="center" class="bg_tr">自费礼券</td>
<td height="25" align="center" class="bg_tr">业务自付</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<th>减免金额</th>
<th>自费礼品</th>
<th>自费礼券</th>
<th>业务自付</th>
<th>实提金额</th>
<th>详情</th>
</tr>
</thead>
<tbody>
<?php
$should_pay = 0;
$real_pay = 0;
@ -102,65 +114,70 @@ use \common\libs\MyLib;
}
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<td>
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_rate?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->yeji_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></td>
<!-- <td height="25" align="center" class="td_bg">--//=$pay_order->first_xinbao_ticheng?><!--</td>-->
<td height="25" align="center" class="td_bg"><?=$order_info->total1_dis?></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$ticket?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$gift?></a></td>
<td height="25" align="center" class="td_bg"><?=$order_info->yuangong_money?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
<td><?=$order_info->car_no?></td>
<td><?=$order_info->print_date?></td>
<td><?=$order_info->total1_clear?></td>
<td><?=$caiwu_info->ticheng_zong_rate?></td>
<td><?=$caiwu_info->yeji_rate?></td>
<td><?=$pay_order->should_pay?></td>
<td><?=$order_info->total1_dis?></td>
<td><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$ticket?></a></td>
<td><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$gift?></a></td>
<td><?=$order_info->yuangong_money?></td>
<td><?=$pay_order->real_pay?></td>
<td>[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_dis,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($ticket_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($gift_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($zifu_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td><?=number_format($total1_clear,2)?></td>
<td></td>
<td></td>
<td><?=number_format($should_pay,2)?></td>
<td><?=number_format($total1_dis,2)?></td>
<td><?=number_format($ticket_all,2)?></td>
<td><?=number_format($gift_all,2)?></td>
<td><?=number_format($zifu_all,2)?></td>
<td><?=number_format($real_pay,2)?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php } ?>
<?php if($my_type3_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">我的续保</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">加点比例</td>
<td height="25" align="center" class="bg_tr">基本比例</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">优惠金额</td>
<td height="25" align="center" class="bg_tr">自费礼品</td>
<td height="25" align="center" class="bg_tr">自费礼券</td>
<td height="25" align="center" class="bg_tr">自付减免</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<table class="table table-bordered">
<thead>
<tr>
<th colspan="13">我的续保</th>
</tr>
<tr>
<th>序号</th>
<th>车牌号</th>
<th>正本日期</th>
<th>商业净保费</th>
<th>加点比例</th>
<th>基本比例</th>
<th>应提金额</th>
<th>优惠金额</th>
<th>自费礼品</th>
<th>自费礼券</th>
<th>自付减免</th>
<th>实提金额</th>
<th>详情</th>
</tr>
</thead>
<tbody>
<?php
$should_pay = 0;
$real_pay = 0;
@ -187,60 +204,66 @@ use \common\libs\MyLib;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<td>
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_rate?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->yeji_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1_dis?></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$order_info->getGiftPrice(1,1)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td height="25" align="center" class="td_bg"><?=$order_info->yuangong_money?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
<td><?=$order_info->car_no?></td>
<td><?=$order_info->print_date?></td>
<td><?=$order_info->total1_clear?></td>
<td><?=$caiwu_info->ticheng_zong_rate?></td>
<td><?=$caiwu_info->yeji_rate?></td>
<td><?=$pay_order->should_pay?></td>
<td><?=$order_info->total1_dis?></td>
<td><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,1)"><?=$order_info->getGiftPrice(1,1)?></a></td>
<td><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,1,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td><?=$order_info->yuangong_money?></td>
<td><?=$pay_order->real_pay?></td>
<td>[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_dis,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($ticket_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($gift_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($zifu_all,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td><?=number_format($total1_clear,2)?></td>
<td></td>
<td></td>
<td><?=number_format($should_pay,2)?></td>
<td><?=number_format($total1_dis,2)?></td>
<td><?=number_format($ticket_all,2)?></td>
<td><?=number_format($gift_all,2)?></td>
<td><?=number_format($zifu_all,2)?></td>
<td><?=number_format($real_pay,2)?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php } ?>
<?php if($my_type0_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<table class="table table-bordered">
<thead>
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">我的原新保</td>
<th colspan="9">我的原新保</th>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">基本比例</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">原新保提成</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
<th>序号</th>
<th>车牌号</th>
<th>正本日期</th>
<th>商业净保费</th>
<th>基本比例</th>
<th>应提金额</th>
<th>原新保提成</th>
<th>实提金额</th>
<th>详情</th>
</tr>
</thead>
<tbody>
<?php
$should_pay = 0;
$real_pay = 0;
@ -256,112 +279,59 @@ use \common\libs\MyLib;
// $total1_dis += $order_info->total1_dis;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<td>
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td><?=$order_info->car_no?></td>
<td><?=$order_info->print_date?></td>
<td><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->first_xinbao_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->first_xinbao_ticheng?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
<td><?=$caiwu_info->first_xinbao_rate?></td>
<td><?=$pay_order->should_pay?></td>
<td><?=$pay_order->first_xinbao_ticheng?></td>
<td><?=$pay_order->real_pay?></td>
<td>[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td><?=number_format($total1_clear,2)?></td>
<td></td>
<td><?=number_format($should_pay,2)?></td>
<td></td>
<td><?=number_format($real_pay,2)?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php } ?>
<?php if($type3_query->count() > 0) { ?>
<input type="button" class="act_btn" id="output-send-btn" name="output-btn" value="导出">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">送单统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">送单地址</td>
<td height="25" align="center" class="bg_tr">时间</td>
<td height="25" align="center" class="bg_tr">送单提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($type3_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_send_payids[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="left" class="td_bg">
<?=$order_info->direction1?$order_info->direction1->name:''?>
<?=$order_info->range1?$order_info->range1->name:''?>
<?=$order_info->city1?$order_info->city1->name:''?>
<?=$order_info->district1?$order_info->district1->name:''?>
<?=$order_info->send_address1?>
</td>
<td height="25" align="center" class="td_bg"><?=date('Y-m-d H:i:s',$send_info->send_time)?></td>
<td height="25" align="center" nowrap class="td_bg"><input name="send_moneys[]" type="text" value="<?=$caiwu_info->songdan_ticheng?>" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 内勤核保-->
<?php if($my_type5_query->count() > 0) { ?>
<input type="button" class="act_btn" id="output-hebao-btn" name="output-btn" value="导出">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<table class="table table-bordered">
<thead>
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">核保统计</td>
<th colspan="7">核保统计</th>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">核保比例</td>
<td height="25" align="center" class="bg_tr">核保提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
<th>序号</th>
<th>车牌号</th>
<th>正本日期</th>
<th>被保险人</th>
<th>核保比例</th>
<th>核保提成</th>
<th>详情</th>
</tr>
</thead>
<tbody>
<?php
$real_pay = 0;
foreach($my_type5_query->each() as $index=>$pay_order) {
@ -373,49 +343,53 @@ use \common\libs\MyLib;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<td>
<input type="hidden" name="neqi_payids[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><?=$rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
<td><?=$order_info->car_no?></td>
<td><?=$order_info->print_date?></td>
<td><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td><?=$rate?></td>
<td><?=$pay_order->real_pay?></td>
<td>[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><?=number_format($real_pay,2)?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php } ?>
<!-- 内勤正本-->
<?php if($my_type6_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<table class="table table-bordered">
<thead>
<tr>
<td align="center" colspan="7" height="25" class="bg_tr">正本统计</td>
<th colspan="7">正本统计</th>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本时间</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">正本比例</td>
<td height="25" align="center" class="bg_tr">正本提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
<th>序号</th>
<th>车牌号</th>
<th>正本时间</th>
<th>被保险人</th>
<th>正本比例</th>
<th>正本提成</th>
<th>详情</th>
</tr>
</thead>
<tbody>
<?php
$real_pay = 0;
foreach($my_type6_query->each() as $index=>$pay_order) {
@ -426,344 +400,71 @@ use \common\libs\MyLib;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<td>
<input type="hidden" name="zhengben[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><?=$rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<br>
<h3>非车险提成</h3>
<!-- 非车险销售-->
<?php if($my_type1_query_non->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="9" height="25" class="bg_tr">非车险销售统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本时间</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">险种</td>
<td height="25" align="center" class="bg_tr">保费</td>
<td height="25" align="center" class="bg_tr">提成比例</td>
<td height="25" align="center" class="bg_tr">提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type1_query_non->each() as $index=>$pay_order) {
$order_info = $pay_order->nonOrder;
$non_info = $order_info->nonInsurance;
$caiwu_info = $order_info->caiwu1;//ordercarwut
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->sche->name?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->payer1_money?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->jiben_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?non_id= <?=$order_info->non_id?> &order_id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!-- 非车险核保-->
<?php if($my_type1_query_hebao->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="9" height="25" class="bg_tr">非车险核保统计</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本时间</td>
<td height="25" align="center" class="bg_tr">被保险人</td>
<td height="25" align="center" class="bg_tr">险种</td>
<td height="25" align="center" class="bg_tr">保费</td>
<td height="25" align="center" class="bg_tr">提成比例</td>
<td height="25" align="center" class="bg_tr">提成</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$real_pay = 0;
foreach($my_type1_query_hebao->each() as $index=>$pay_order) {
$order_info = $pay_order->nonOrder;
$non_info = $order_info->nonInsurance;
$caiwu_info = $order_info->caiwu1;//ordercarwut
$rate = $caiwu_info->rate4;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->sche->name?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->payer1_money?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->hebao_ticheng?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->hebao_ticheng?></td>
<td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?non_id= <?=$order_info->non_id?> &order_id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<!--外区--><br>
<h3>外区车险提成</h3>
<?php if($my_out_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="13" height="25" class="bg_tr">外区车险</td>
</tr>
<tr>
<td width="50" height="25" align="center" class="bg_tr">序号</td>
<td height="25" align="center" class="bg_tr">车牌号</td>
<td height="25" align="center" class="bg_tr">正本日期</td>
<td height="25" align="center" class="bg_tr">商业总保费</td>
<td height="25" align="center" class="bg_tr">交强总保费</td>
<td height="25" align="center" class="bg_tr">商业净保费</td>
<td height="25" align="center" class="bg_tr">交强净保费</td>
<td height="25" align="center" class="bg_tr">总保费比例</td>
<td height="25" align="center" class="bg_tr">净保费比例</td>
<td height="25" align="center" class="bg_tr">应提金额</td>
<td height="25" align="center" class="bg_tr">实提金额</td>
<td height="25" align="center" class="bg_tr">详情</td>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
$ticket_all = 0;
$gift_all = 0;
$zifu_all = 0;
foreach($my_out_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;//carwuordert
$money = $caiwu_info->money1;
$ticket = $order_info->getGiftPrice(1,1);
$gift = $order_info->getGiftPrice(1,0);
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
$total1_dis += $order_info->total1_dis;
$ticket_all += $ticket;
$gift_all += $gift;
if($order_info->yuangong_money > 0){
$zifu_all += $order_info->yuangong_money;
}
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index+1?>
</td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total2?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->total2_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->zong_bf_rate?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->jing_bf_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
<td><?=$order_info->car_no?></td>
<td><?=$order_info->print_date?></td>
<td><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td><?=$rate?></td>
<td><?=$pay_order->real_pay?></td>
<td>[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<td width="50" height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($should_pay,2)?></td>
<td height="25" align="center" class="bg_tr"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><?=number_format($real_pay,2)?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php } ?>
</TD>
</TR>
</TABLE>
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" src="/js/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
<script type="text/javascript" language="javascript">
function cal_pay(obj1,total,dis,price1,price2,price3,price4,obj2,obj3) {
var total1 = Number($('#' + obj1).val())/100 * Number(total);
var total2 = total1 - Number(dis) - Number(price1) - Number(price2) - Number(price3) - Number(price4);
$('#' + obj2).val(total1.toFixed(2));
$('#' + obj3).val(total2.toFixed(2));
}
function cal_money(obj1,val,obj2) {
var total = Number($('#' + obj1).val())/100 * Number(val);
$('#' + obj2).val(total.toFixed(2));
}
function cal_rate(obj1,val,obj3,dis) {
if(Number(val) == 0) {
$('#' + obj3).val('0.00');
return;
}
var rate = (Number($('#' + obj1).val()))/Number(val) * 100 ;
$('#' + obj3).val(rate.toFixed(2));
}
function open_gift_dlg(order_id,is_free,type) {
$.dialog.open('/finance/pay2-gift-info?user_id=<?=$user_info->id?>&pay_date=<?=$pay_date?>&order_id=' + order_id + '&is_free=' + is_free + '&type=' + type,{
left: '40%',
top: '0%',
fixed: true
});
}
//操作历史
gotoPage('/personnel/ajax-history-index?pay_id=<?=$pay_info->id?>&page=1','car_history_list');
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript">
$(function () {
$('.date').datepicker({
todayBtn: "linked",
keyboardNavigation: false,
forceParse: false,
calendarWeeks: true,
autoclose: true
});
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/finance/chuna-gongzi-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/finance/chuna-gongzi-list?<?=$back_params?>';
});
$("#output-hebao-btn").click(function () {
$('#page').val(0);
var params = $("#theFrm").serialize();
//window.location.href = "/finance/receipt-output?" + params;
var url = "/finance/receipt-hebao-output";
$.post(url, params, function (obj) {
alert(obj.msg);
if(obj.success) {
window.location.href = obj.files[0].src;
parent.layer.msg('保存成功');
parent.refreshList();
layer_close();
} else {
parent.layer.msg(data.msg);
}
},'json');
}, function(){
//
});
$("#output-send-btn").click(function () {
$('#page').val(0);
var params = $("#theFrm").serialize();
//window.location.href = "/finance/receipt-output?" + params;
var url = "/finance/receipt-send-output";
$.post(url, params, function (obj) {
alert(obj.msg);
if (obj.success) {
window.location.href = obj.files[0].src;
}
}, 'json');
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

@ -1,155 +1,146 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
//编辑
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/chuna-gongzi-info?id=' + id + '&pay_date=<?=$pay_date?>' + '&back_params=' + encodeURIComponent(params);
}
$(function(){
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/chuna-gongzi-list?" + params;
});
$('#searchForm').submit(function(){
$('#search-btn').click();
return false;
});
$("#reset-btn").click(function(){
var pay_date = $('#pay_date').val();
if(confirm('是否对'+ pay_date + '月份的工资进行重新计算?')) {
$('#reseting').show();
$(this).hide();
$.post('/finance/pay2-reset',{pay_date:pay_date},function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
$('#reseting').hide();
$(this).show();
},'json');
}
});
$("#pay-btn").click(function(){
var params = $('#searchForm').serialize();
window.location.href = "/finance/pay2-tiao?" + params;
});
});
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
</script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
工号:<input name="username" type="text" value="<?=$username?>">
真实姓名:<input name="name" type="text" value="<?=$name?>">
工资月份:<input name="pay_date" id="pay_date" class="Wdate" type="text" value="<?=$pay_date?>" onClick="WdatePicker({dateFmt:'yyyy-MM'})">
分组:<select name="group_id">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>出纳工资管理</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label>工号</label>
<input type="text" name="username" id="username" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>真实姓名</label>
<input type="text" name="name" id="name" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>工资月份</label>
<input type="text" name="pay_date" id="pay_date" class="form-control date" value="<?=date('Y-m')?>" autocomplete="off">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>是否离职</label>
<select name="is_leave" class="form-control">
<option value="">全部</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>分组</label>
<select name="group_id" class="form-control">
<option value="0">全部</option>
<?php
foreach($group_items as $group) {
echo '<option value="'.$group->id.'"';
if($group->id == $group_id)
echo ' selected ';
echo '>'.$group->name.'</option>';
echo '<option value="'.$group->id.'">'.$group->name.'</option>';
}
?>
</select>
状态:<select name="status_id">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>状态</label>
<select name="status_id" class="form-control">
<option value="0">全部</option>
<option value="1" <?=$status_id == 1?'selected':''?>>人事✔</option>
<option value="2" <?=$status_id == 2?'selected':''?>>出纳✔</option>
<option value="3" <?=$status_id == 3?'selected':''?>>人事✔,出纳✔</option>
<option value="4" <?=$status_id == 4?'selected':''?>>财务✔</option>
<option value="5" <?=$status_id == 5?'selected':''?>>老板✔</option>
<option value="6" <?=$status_id == 6?'selected':''?>>已发放</option>
<option value="8" <?=$status_id == 7?'selected':''?>>退回</option>
<option value="1">人事✔</option>
<option value="2">出纳✔</option>
<option value="3">人事✔,出纳✔</option>
<option value="4">财务✔</option>
<option value="5">老板✔</option>
<option value="6">已发放</option>
<option value="7">退回</option>
</select>
<input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索">
&nbsp;&nbsp;退回数量:<span style="color: red"><?=$return_count?></span>
<!-- <span id="reseting" style="display: none;">正在计算中...</span>-->
<!-- <input type="button" class="act_btn" id="reset-btn" name="reset-btn" value="重新计算">-->
<!-- <input type="button" class="act_btn" id="pay-btn" name="pay-btn" value="工资条">-->
</td>
</tr>
</div>
<button type="submit" class="btn btn-primary mb-8">搜索</button>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<td width="100" align="center" align="center" class="bg_tr">工号</td>
<td align="center" class="bg_tr">真实姓名</td>
<td width="100" align="center" class="bg_tr">工资月份</td>
<td align="center" class="bg_tr">所属岗位</td>
<td width="60" align="center" class="bg_tr">提成工资</td>
<td width="60" align="center" class="bg_tr">状态</td>
<td width="30" align="center" class="bg_tr">操作</td>
<th width="50" data-field="id">ID</th>
<th data-field="username">工号</th>
<th data-field="name">真实姓名</th>
<th data-field="pay_date">工资月份</th>
<th data-field="group_name">所属岗位</th>
<th data-field="should_pay">提成工资</th>
<th data-field="is_leave">是否离职</th>
<th data-field="status_name">状态</th>
<th data-formatter="opFormatter">操作</th>
</tr>
<form id="delFrm">
<?php
foreach($items as $index => $item) {
$pay_info = $item->getPay($pay_date);
$base_real_pay = 0;
$ticheng_real_pay = 0;
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
$shouldPay = $item->getChunaShouldPay($pay_date);
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
opStr.push('<i class="fa fa-edit" title="详情"></i>');
opStr.push('</a>');
$is_begin = 0;
if($pay_info) {
$is_begin = 1;
$ticheng_real_pay = $pay_info->ticheng_real_pay;
return opStr.join(' ');
}
function edit(id) {
var title = '详情';
var pay_date = $('#pay_date').val();
layer_show(title, '/finance/chuna-gongzi-info?id=' + id + '&pay_date=' + pay_date);
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/finance/chuna-gongzi-list-json",
pagination: false,
sidePagination: 'server',
queryParams: function(params) {
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
}
});
return false;
}
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="left" class="td_bg" nowrap ><?=$item->username?></td>
<td class="td_bg" nowrap><?=$item->name?></td>
<td class="td_bg" nowrap><?=$pay_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->group?$item->group->name:''?></td>
<!-- <td class="td_bg" nowrap><=$item->role?$item->role->name:''?></td>-->
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?=number_format($shouldPay,2)?>
</td>
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?php if($is_begin == 0):?>
<?php else:?>
<?=$pay_info->getStatus($pay_info->status_id)?>
<?php endif;?>
$(function() {
search();
</td>
<td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</form>
<tr>
<td width="100" align="center" align="center" class="bg_tr"></td>
<td align="center" class="bg_tr"></td>
<td width="100" align="center" class="bg_tr"></td>
<td align="center" class="bg_tr"></td>
<td width="60" align="center" class="bg_tr"><?=number_format($total_real_pay,2)?></td>
<td width="60" align="center" class="bg_tr"></td>
<td width="30" align="center" class="bg_tr"></td>
</tr>
<tr >
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
$('.date').datepicker({
minViewMode: 1,
keyboardNavigation: false,
forceParse: false,
autoclose: true,
todayHighlight: true,
format: "yyyy-mm"
});
});
</script>
<?php $this->endBlock(); ?>

File diff suppressed because it is too large Load Diff

@ -1,161 +1,149 @@
<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js?v=2019"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
//编辑
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/pay2-info?id=' + id + '&pay_date=<?=$pay_date?>' + '&back_params=' + encodeURIComponent(params);
}
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
$(function(){
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/pay2-list?" + params;
});
$('#searchForm').submit(function(){
$('#search-btn').click();
return false;
});
$("#reset-btn").click(function(){
var pay_date = $('#pay_date').val();
if(confirm('是否对'+ pay_date + '月份的工资进行重新计算?')) {
$('#reseting').show();
$(this).hide();
$.post('/finance/pay2-reset',{pay_date:pay_date},function(obj){
alert(obj.msg);
if(obj.success) {
window.location.reload();
}
$('#reseting').hide();
$(this).show();
},'json');
}
});
$("#pay-btn").click(function(){
var params = $('#searchForm').serialize();
window.location.href = "/finance/pay2-tiao?" + params;
});
});
</script>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
工号:<input name="username" type="text" value="<?=$username?>">
真实姓名:<input name="name" type="text" value="<?=$name?>">
工资月份:<input name="pay_date" id="pay_date" class="Wdate" type="text" value="<?=$pay_date?>" onClick="WdatePicker({dateFmt:'yyyy-MM'})">
分组:<select name="group_id">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>出纳工资管理</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label>工号</label>
<input type="text" name="username" id="username" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>真实姓名</label>
<input type="text" name="name" id="name" class="form-control">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>工资月份</label>
<input type="text" name="pay_date" id="pay_date" class="form-control date" value="<?=date('Y-m')?>" autocomplete="off">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>是否离职</label>
<select name="is_leave" class="form-control">
<option value="">全部</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>分组</label>
<select name="group_id" class="form-control">
<option value="0">全部</option>
<?php
foreach($group_items as $group) {
echo '<option value="'.$group->id.'"';
if($group->id == $group_id)
echo ' selected ';
echo '>'.$group->name.'</option>';
echo '<option value="'.$group->id.'">'.$group->name.'</option>';
}
?>
</select>
状态:<select name="status_id">
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label>状态</label>
<select name="status_id" class="form-control">
<option value="0">全部</option>
<option value="1" <?=$status_id == 1?'selected':''?>>人事✔</option>
<option value="2" <?=$status_id == 2?'selected':''?>>出纳✔</option>
<option value="3" <?=$status_id == 3?'selected':''?>>人事✔,出纳✔</option>
<option value="4" <?=$status_id == 4?'selected':''?>>财务✔</option>
<option value="5" <?=$status_id == 5?'selected':''?>>老板✔</option>
<option value="6" <?=$status_id == 6?'selected':''?>>已发放</option>
<option value="10" <?=$status_id == 10?'selected':''?>>退回</option>
<option value="1">人事✔</option>
<option value="2">出纳✔</option>
<option value="3">人事✔,出纳✔</option>
<option value="4">财务✔</option>
<option value="5">老板✔</option>
<option value="6">已发放</option>
<option value="7">退回</option>
</select>
<input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<!-- <span id="reseting" style="display: none;">正在计算中...</span>-->
<!-- <input type="button" class="act_btn" id="reset-btn" name="reset-btn" value="重新计算">-->
<!-- <input type="button" class="act_btn" id="pay-btn" name="pay-btn" value="工资条">-->
&nbsp;&nbsp;退回数量:<span style="color: red"><?=$return_count?></span>
</td>
</tr>
</div>
<button type="submit" class="btn btn-primary mb-8">搜索</button>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<td width="100" align="center" align="center" class="bg_tr">工号</td>
<td align="center" class="bg_tr">真实姓名</td>
<td width="100" align="center" class="bg_tr">工资月份</td>
<td align="center" class="bg_tr">所属岗位</td>
<!-- <td width="60" align="center" class="bg_tr">角色</td>-->
<td width="60" align="center" class="bg_tr">基本工资</td>
<td width="60" align="center" class="bg_tr">提成工资</td>
<td width="60" align="center" class="bg_tr">状态</td>
<td width="30" align="center" class="bg_tr">操作</td>
<th width="50" data-field="id">ID</th>
<th data-field="username">工号</th>
<th data-field="name">真实姓名</th>
<th data-field="pay_date">工资月份</th>
<th data-field="group_name">所属岗位</th>
<th data-field="real_pay">基本工资</th>
<th data-field="should_pay">提成工资</th>
<th data-field="is_leave">是否离职</th>
<th data-field="status_name">状态</th>
<th data-formatter="opFormatter">操作</th>
</tr>
<form id="delFrm">
<?php
foreach($items as $index => $item) {
$pay_info = $item->getPay($pay_date);
$base_real_pay = 0;
$ticheng_real_pay = 0;
$is_begin = 0;
if($pay_info) {
$is_begin = 1;
$base_real_pay = $pay_info->base_real_pay;
$ticheng_real_pay = $pay_info->ticheng_real_pay;
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
var o = {};
function opFormatter(value, row, index) {
var opStr = [];
if(row.is_show == 1) {
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">');
opStr.push('<i class="fa fa-edit" title="详情"></i>');
opStr.push('</a>');
}
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="left" class="td_bg" nowrap ><?=$item->username?></td>
<td class="td_bg" nowrap><?=$item->name?></td>
<td class="td_bg" nowrap><?=$pay_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->group?$item->group->name:''?></td>
<!-- <td class="td_bg" nowrap><=$item->role?$item->role->name:''?></td>-->
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?=number_format($base_real_pay,2)?>
</td>
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?=number_format($ticheng_real_pay,2)?>
</td>
<td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?php if($is_begin == 0):?>
<?php else:?>
<?=$pay_info->getStatus($pay_info->status_id)?>
<?php endif;?>
</td>
<td align="center" class="td_bg" nowrap>
<?php if($is_begin == 0):?>
<?php else:?>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
<?php endif;?>
</td>
</tr>
<?php
return opStr.join(' ');
}
?>
</form>
<tr>
<td width="100" align="center" align="center" class="bg_tr"></td>
<td align="center" class="bg_tr"></td>
<td width="100" align="center" class="bg_tr"></td>
<td align="center" class="bg_tr"></td>
<td width="60" align="center" class="bg_tr"></td>
<td width="60" align="center" class="bg_tr"><?=number_format($total_real_pay,2)?></td>
<td width="30" align="center" class="bg_tr"></td>
</tr>
<tr >
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
function edit(id) {
var title = '详情';
var pay_date = $('#pay_date').val();
layer_show(title, '/finance/pay2-info?id=' + id + '&pay_date=' + pay_date);
}
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/finance/pay2-list-json",
pagination: false,
sidePagination: 'server',
queryParams: function(params) {
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
}
});
return false;
}
$(function() {
search();
$('.date').datepicker({
minViewMode: 1,
keyboardNavigation: false,
forceParse: false,
autoclose: true,
todayHighlight: true,
format: "yyyy-mm"
});
});
</script>
<?php $this->endBlock(); ?>

@ -22,7 +22,7 @@ use \common\libs\MyLib;
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">匹配程度</label>
<select name="status" class="status" class="form-control">
<select name="status" id="status" class="form-control">
<option value=0>全部</option>
<option value=1>未匹配</option>
<option value=2>已完成</option>

Loading…
Cancel
Save