完成策略管理功能开发

dev
曾超新 5 years ago
parent 22c26ef453
commit d8625c2356
  1. 24
      common/models/PayT.php
  2. 18
      common/models/UserT.php
  3. 62
      common/models/ZhongjiFanxianT.php
  4. 62
      common/models/ZhongjiGiftT.php
  5. 54
      common/models/ZhongjiUserT.php
  6. 1113
      frontend/controllers/FinanceController.php
  7. 362
      frontend/controllers/MarketingStrategyController.php
  8. 167
      frontend/controllers/PersonnelController.php
  9. 184
      frontend/views/finance/budian-list.php
  10. 769
      frontend/views/finance/chuna-gongzi-info.php
  11. 155
      frontend/views/finance/chuna-gongzi-list.php
  12. 724
      frontend/views/finance/gongzi-all-info.php
  13. 159
      frontend/views/finance/gongzi-all-list.php
  14. 604
      frontend/views/finance/pay2-info.php
  15. 66
      frontend/views/finance/pay2-list.php
  16. 289
      frontend/views/finance/receipt-lirun.php
  17. 369
      frontend/views/finance/ticheng-jisuan.php
  18. 1
      frontend/views/layouts/blue-main.php
  19. 28
      frontend/views/marketing-strategy/add.php
  20. 193
      frontend/views/marketing-strategy/edit.php
  21. 153
      frontend/views/marketing-strategy/fanxian.php
  22. 83
      frontend/views/marketing-strategy/gifts.php
  23. 70
      frontend/views/marketing-strategy/users.php
  24. 182
      frontend/views/personnel/pay-info.php
  25. 318
      frontend/views/personnel/pay-list.php
  26. 15
      frontend/web/assets/css/custom.css

@ -338,4 +338,28 @@ class PayT extends \common\models\Base
$bmbaofei = $query->sum('total1_clear'); $bmbaofei = $query->sum('total1_clear');
return round($bmbaofei,2); return round($bmbaofei,2);
} }
public function getStatus($status_id){
$res = '';
if($status_id == 1){
$res = '人事✔';
}elseif ($status_id == 2){
$res = '出纳✔';
}elseif ($status_id == 3){
$res = '人事✔,出纳✔';
}elseif ($status_id == 4){
$res = '财务✔';
}elseif ($status_id == 5){
$res = '老板✔';
}elseif ($status_id == 6){
$res = '已发放';
}elseif ($status_id == 7){
$res = '退回人事';
}elseif ($status_id == 8){
$res = '退回出纳';
}elseif ($status_id == 10){
$res = '退回财务';
}
return $res;
}
} }

@ -270,4 +270,22 @@ class UserT extends \common\models\Base
return $items; return $items;
} }
} }
public function getChunaShouldPay($pay_date){
$user_id = $this->id;
$pay_chexian = PayOrderUserT::find()
->where('pay_date="' . $pay_date . '" and type<>7 and type<>8 and type<>10 and user_id=' . $user_id)
->sum('real_pay');
$pay_nochexian = PayOrderUserT::find()
->where('pay_date="' . $pay_date . '" and type=7 and user_id=' . $user_id)
->orWhere('pay_date="' . $pay_date . '" and type=8 and user_id=' . $user_id)
->sum('real_pay');
$pay_dz = PayOrderUserT::find()
->where('pay_date="' . $pay_date . '" and type=10 and user_id=' . $user_id)
->sum('real_pay');
return $pay_chexian + $pay_nochexian + $pay_dz;
}
} }

@ -0,0 +1,62 @@
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "zhongji_fanxian_t".
*
* @property int $id
* @property int $celuo_id
* @property double $fanxian_rate 返现金额比例
* @property double $max_cashback 最高返现
* @property string $created_at
* @property string $updated_at
*/
class ZhongjiFanxianT extends \common\models\Base
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'zhongji_fanxian_t';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['celuo_id', 'tiaojian_id'], 'integer'],
[['fanxian_rate', 'max_cashback'], 'number'],
[['created_at', 'updated_at'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'celuo_id' => 'Celuo ID',
'fanxian_rate' => 'Fanxian Rate',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
public function getTiaojian() {
return $this->hasOne(ZhongjiTiaojian::className(),['id'=>'tiaojian_id']);
}
public function getCeluo() {
return $this->hasOne(ZhongjiYingxiao::className(), ['id'=>'celuo_id']);
}
}

@ -0,0 +1,62 @@
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "zhongji_gift_t".
*
* @property int $id
* @property int $celuo_id
* @property int $fanxian_id
* @property int $n n值
* @property int $gift_type 1礼品2礼券
* @property int $free_type 1免费2收费
* @property string $gift_ids 礼品
* @property string $gift_price 额度
* @property int $gift_num 礼品数量
* @property string $created_at
* @property string $updated_at
*/
class ZhongjiGiftT extends \common\models\Base
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'zhongji_gift_t';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['celuo_id', 'fanxian_id', 'n', 'gift_type', 'free_type'], 'integer'],
[['gift_ids'], 'string'],
[['created_at', 'updated_at'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'celuo_id' => 'Celuo ID',
'fanxian_id' => 'Fanxian ID',
'n' => 'n',
'gift_type' => 'Gift Type',
'free_type' => 'Free Type',
'gift_ids' => 'Gift Ids',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
}

@ -0,0 +1,54 @@
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "zhongji_user_t".
*
* @property int $id
* @property int $celuo_id
* @property int $user_id
* @property string $created_at
* @property string $updated_at
*/
class ZhongjiUserT extends \common\models\Base
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'zhongji_user_t';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['celuo_id', 'user_id'], 'integer'],
[['created_at', 'updated_at'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'celuo_id' => 'Celuo ID',
'user_id' => 'User ID',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
public function getUser() {
return $this->hasOne(UserT::className(),['id'=>'user_id']);
}
}

File diff suppressed because it is too large Load Diff

@ -4,6 +4,12 @@
namespace frontend\controllers; namespace frontend\controllers;
use common\models\GiftT;
use common\models\UserT;
use common\models\ZhongjiFanxianT;
use common\models\ZhongjiGiftT;
use common\models\ZhongjiTiaojian;
use common\models\ZhongjiUserT;
use common\models\ZhongjiYingxiao; use common\models\ZhongjiYingxiao;
use yii\web\Response; use yii\web\Response;
use Yii; use Yii;
@ -68,16 +74,14 @@ class MarketingStrategyController extends UserBaseController
$op = $request->post('op', 'add'); $op = $request->post('op', 'add');
$name = $request->post('name'); $name = $request->post('name');
$begin_date = $request->post('begin_date'); $begin_date = $request->post('begin_date');
$begin_time = $request->post('begin_time');
$end_date = $request->post('end_date'); $end_date = $request->post('end_date');
$end_time = $request->post('end_time');
$remark = $request->post('remark'); $remark = $request->post('remark');
if($op == 'add') { if($op == 'add') {
$item = new ZhongjiYingxiao(); $item = new ZhongjiYingxiao();
$item->celuo_name = $name; $item->celuo_name = $name;
$item->begin_date = $begin_date.' '.$begin_time.':00'; $item->begin_date = $begin_date;
$item->end_date = $end_date.' '.$end_time.':00'; $item->end_date = $end_date;
$item->is_delete = 0; $item->is_delete = 0;
$item->remark = $remark; $item->remark = $remark;
$item->save(); $item->save();
@ -90,8 +94,8 @@ class MarketingStrategyController extends UserBaseController
$item = ZhongjiYingxiao::findOne(['id'=>$id]); $item = ZhongjiYingxiao::findOne(['id'=>$id]);
if($item) { if($item) {
$item->celuo_name = $name; $item->celuo_name = $name;
$item->begin_date = $begin_date.' '.$begin_time.':00'; $item->begin_date = $begin_date;
$item->end_date = $end_date.' '.$end_time.':00'; $item->end_date = $end_date;
$item->remark = $remark; $item->remark = $remark;
$item->save(); $item->save();
@ -102,6 +106,352 @@ class MarketingStrategyController extends UserBaseController
} }
} }
return $result; return $result;
}
public function actionUsers() {
$request = Yii::$app->request;
$id = $request->get('id');
return $this->render('users',['id'=>$id]);
}
public function actionSearchUser() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有记录';
$key = $request->get('key');
$data = [];
if($key != '') {
$items = UserT::find()->where('username like "'.$key.'%"')->all();
foreach($items as $item) {
$row = [];
$row['id'] = $item->id;
$row['name'] = $item->getShowName();
$data[] = $row;
}
}
$result['success'] = true;
$result['users'] = $data;
$result['msg'] = '共有'.count($items).'条记录';
return $result;
}
public function actionUsersAdd() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '保存失败';
$id = $request->post('id',0);
$ids = $request->post('ids');
foreach($ids as $user_id) {
$item = ZhongjiUserT::findOne(['celuo_id'=>$id,'user_id'=>$user_id]);
if(!$item) {
$item = new ZhongjiUserT();
$item->celuo_id = $id;
$item->user_id = $user_id;
$item->save();
}
}
$result['success'] = true;
$result['msg'] = '保存成功';
return $result;
}
public function actionUsersRead() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有记录';
$id = $request->get('id');
$data = [];
if($id > 0) {
$items = ZhongjiUserT::find()->where('celuo_id='.$id)->all();
foreach($items as $item) {
if(!$item->user) continue;
$row = [];
$row['id'] = $item->user->id;
$row['name'] = $item->user->getShowName();
$data[] = $row;
}
}
$result['success'] = true;
$result['users'] = $data;
$result['msg'] = '共有'.count($items).'条记录';
return $result;
}
public function actionUsersDelete() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '删除失败';
$id = $request->post('id');
$user_id = $request->post('user_id');
$info = ZhongjiUserT::find()
->where(['celuo_id'=>$id,'user_id'=>$user_id])
->one();
if($info) $info->delete();
$result['success'] = true;
$result['msg'] = '删除成功';
return $result;
}
public function actionFanxian() {
$request = Yii::$app->request;
$celuo_id = $request->get('celuo_id');
return $this->render('fanxian',['celuo_id'=>$celuo_id]);
}
public function actionFanxianSave() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '保存失败';
$celuo_id = $request->post('celuo_id',0);
$baofei = $request->post('baofei', 0);
$car_type_id = $request->post('car_type_id',[]);
$company_id = $request->post('company_id', []);
$car_use_id = $request->post('car_use_id', []);
$type_id = $request->post('type_id', []);
$rate = $request->post('rate', 0);
$max_cashback = $request->post('max_cashback', 0);
$tran = ZhongjiTiaojian::getDb()->beginTransaction();
try {
$tiaojian = new ZhongjiTiaojian();
$tiaojian->baofei = floatval($baofei);
$tiaojian->fanxian = 0;
$tiaojian->xianzhong_one = '';
$tiaojian->xianzhong_two = '';
$tiaojian->car_type_id = join(',',$car_type_id);
$tiaojian->car_use_id = join(',',$car_use_id);
$tiaojian->company_ids = join(',',$company_id);
$tiaojian->type_ids = join(',',$type_id);
$tiaojian->type = 1;
$tiaojian->celuo_id = $celuo_id;
if(!$tiaojian->save()) {
throw new \Exception(print_r($tiaojian->getErrors(), true));
}
$fanxian = new ZhongjiFanxianT();
$fanxian->celuo_id = $celuo_id;
$fanxian->tiaojian_id = $tiaojian->id;
$fanxian->fanxian_rate = $rate;
$fanxian->max_cashback = $max_cashback;
$fanxian->save();
$tran->commit();
} catch (\Exception $e) {
$tran->rollBack();
$result['msg'] = $e->getMessage();
return $result;
}
$result['success'] = true;
$result['msg'] = '保存成功';
return $result;
}
public function actionFanxianRead() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '没有记录';
$celuo_id = $request->get('celuo_id');
$data = [];
if($celuo_id > 0) {
$items = ZhongjiFanxianT::find()->where('celuo_id='.$celuo_id)->all();
foreach($items as $item) {
if(!$item->tiaojian) continue;
$row = $item->toArray();
$row['tiaojian']['baofei'] = $item->tiaojian->baofei;
$car_type_ids = explode(',',$item->tiaojian->car_type_id);
$car_type_names = [];
foreach($car_type_ids as $car_type_id) {
if($car_type_id == 1) $car_type_names[] = '京牌';
if($car_type_id == 2) $car_type_names[] = '非京牌';
}
$row['tiaojian']['car_type'] = join(',', $car_type_names);
$car_use_ids = explode(',',$item->tiaojian->car_use_id);
$car_use_names = [];
foreach($car_use_ids as $car_use_id) {
if($car_use_id == 1) $car_use_names[] = '家庭自用车';
if($car_use_id == 2) $car_use_names[] = '党政机关、事业团体';
if($car_use_id == 3) $car_use_names[] = '非营业企业客车';
if($car_use_id == 4) $car_use_names[] = '不区分营业非营业';
if($car_use_id == 5) $car_use_names[] = '出租租赁';
if($car_use_id == 6) $car_use_names[] = '营业货车';
if($car_use_id == 7) $car_use_names[] = '非营业货车';
if($car_use_id == 8) $car_use_names[] = '城市公交';
}
$row['tiaojian']['car_use'] = join(',', $car_use_names);
$company_ids = explode(',',$item->tiaojian->company_ids);
$company_names = [];
foreach($company_ids as $company_id) {
if($company_id == 1) $company_names[] = '人保';
if($company_id == 4) $company_names[] = '太平洋';
if($company_id == 7) $company_names[] = '人寿';
if($company_id == 8) $company_names[] = '平安';
}
$row['tiaojian']['company_name'] = join(',', $company_names);
$type_ids = explode(',',$item->tiaojian->type_ids);
$type_names = [];
foreach($type_ids as $type_id) {
if($type_id == 1) $type_names[] = '新保';
if($type_id == 2) $type_names[] = '续保';
}
//条件
$row['tiaojian']['type_name'] = join(',', $type_names);
//礼品
$row['gifts'] = [];
$gifts = ZhongjiGiftT::find()
->where(['fanxian_id'=>$item->id,'gift_type'=>1])
->all();
foreach($gifts as $gift) {
$tmp_row = [];
$tmp_row['id'] = $gift->id;
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式';
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式';
if($gift->free_type == 3) $tmp_row['free_type'] = 'M选'.$gift->n.'模式';
$tmp_row['gifts'] = json_decode($gift->gift_ids,true);
$row['gifts'][] = $tmp_row;
}
//礼券
$row['quans'] = [];
$gifts = ZhongjiGiftT::find()
->where(['fanxian_id'=>$item->id,'gift_type'=>2])
->all();
foreach($gifts as $gift) {
$tmp_row = [];
$tmp_row['id'] = $gift->id;
if($gift->free_type == 1) $tmp_row['free_type'] = '免费模式';
if($gift->free_type == 2) $tmp_row['free_type'] = '收费模式';
if($gift->free_type == 3) $tmp_row['free_type'] = 'M选'.$gift->n.'模式';
$tmp_row['gifts'] = json_decode($gift->gift_ids,true);
$row['quans'][] = $tmp_row;
}
$data[] = $row;
}
}
$result['success'] = true;
$result['fanxians'] = $data;
$result['msg'] = '共有'.count($items).'条记录';
return $result;
}
public function actionFanxianDelete() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '删除失败';
$fanxin_id = $request->post('fanxin_id');
$user_id = $request->post('user_id');
$info = ZhongjiFanxianT::find()
->where('id='.$fanxin_id)
->one();
if($info) {
$info->tiaojian->delete();
$items = ZhongjiGiftT::find()
->where(['fanxian_id'=>$info->id])
->all();
foreach($items as $item) {
$item->delete();
}
$info->delete();
}
$result['success'] = true;
$result['msg'] = '删除成功';
return $result;
}
public function actionGifts() {
$request = Yii::$app->request;
$celuo_id = $request->get('celuo_id');
$fanxian_id = $request->get('fanxian_id');
$items = GiftT::find()
->where(['type_id'=>1])
->all();
return $this->render('gifts',[
'celuo_id'=>$celuo_id,
'fanxian_id'=>$fanxian_id,
'items'=>$items
]);
}
public function actionGiftSave() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '保存失败';
$celuo_id = $request->post('celuo_id',0);
$fanxian_id = $request->post('fanxian_id',0);
$gift_type = $request->post('gift_type', 1);
$free_type = $request->post('free_type', 0);
$n = $request->post('n', 0);
$gift_ids = $request->post('gift_ids', []);
$gift_prices = $request->post('gift_prices', []);
$gifts = [];
foreach($gift_ids as $gift_id) {
$tmp_gift = GiftT::find()->where(['id'=>$gift_id])->one();
$row = $tmp_gift->toArray();
$row['price'] = $gift_prices[$gift_id];
$gifts[] = $row;
}
$item = new ZhongjiGiftT();
$item->celuo_id = $celuo_id;
$item->fanxian_id = $fanxian_id;
$item->gift_type = $gift_type;
$item->free_type = $free_type;
$item->n = intval($n);
$item->gift_ids = json_encode($gifts);
if(!$item->save()) {
$result['msg'] = print_r($item->getErrors(), true);
return $result;
}
$result['success'] = true;
$result['msg'] = '保存成功';
return $result;
}
public function actionGiftDelete() {
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$result['success'] = false;
$result['msg'] = '删除失败';
$id = $request->post('id');
$celuo_id = $request->post('celuo_id');
$info = ZhongjiGiftT::find()
->where(['id'=>$id,'celuo_id'=>$celuo_id])
->one();
if($info) {
$info->delete();
}
$result['success'] = true;
$result['msg'] = '删除成功';
return $result;
} }
} }

@ -7,16 +7,16 @@ use common\models\GroupT;
use common\models\PayT; use common\models\PayT;
use common\models\UserT; use common\models\UserT;
use common\models\WorkDayT; use common\models\WorkDayT;
use common\models\UserLogT;
use Yii; use Yii;
use yii\data\Pagination; use yii\data\Pagination;
use yii\web\Response; use yii\web\Response;
use yii\web\UploadedFile; use yii\web\UploadedFile;
use common\models\CompanyT;
class PersonnelController extends \frontend\controllers\UserBaseController class PersonnelController extends \frontend\controllers\UserBaseController
{ {
public $my = null; public $my = null;
public $enableCsrfValidation = false;
public $layout = 'blue-main';
public function init() public function init()
{ {
@ -40,60 +40,77 @@ class PersonnelController extends \frontend\controllers\UserBaseController
*/ */
public function actionPayList() public function actionPayList()
{ {
$pay_date = date('Y-m');
$group_items = GroupT::getTree();
return $this->render('pay-list',[
'group_items' => $group_items,
'pay_date' => $pay_date
]);
}
public function actionPayListJson()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request; $request = Yii::$app->request;
$username = $request->get('username'); $username = $request->get('username');
$name = $request->get('name'); $name = $request->get('name');
$pay_date = $request->get('pay_date',date('Y-m')); $pay_date = $request->get('pay_date',date('Y-m'));
$group_id = $request->get('group_id',0); $group_id = $request->get('group_id',0);
$is_leave = $request->get('is_leave'); $company_id = $request->get('company_id');
$offset = $request->get('offset',0); $page = $request->get('page',1);
$limit = $request->get('limit', 10); $is_leave = $request->get('is_leave',0);
$status_id = $request->get('status_id',0);
$query = UserT::find() $query = UserT::find()
->where('group_id>0 and is_delete=0'); ->leftJoin('pay_t','pay_t.user_id=user_t.id')
->where('user_t.group_id>0 and is_delete=0');
if($username != '') { if($username != '') {
$query->andWhere('username like "'.$username.'"'); $query = $query->andWhere('user_t.username like "'.$username.'"');
} }
if($name != '') { if($name != '') {
$query->andWhere('name like "'.$name.'"'); $query = $query->andWhere('user_t.name like "'.$name.'"');
}
if($is_leave != ''){
$query = $query->andWhere(['user_t.is_leave' => $is_leave]);
} }
if($is_leave == 'true'){ if($company_id > 0) {
$query->andWhere(['is_leave' => 1]); $query = $query->andWhere('user_t.company_id='.$company_id);
} }
if($group_id > 0) { if($group_id > 0) {
$query->andWhere('group_id='.$group_id); $query = $query->andWhere('user_t.group_id='.$group_id);
} }
$query->orderBy('username ASC,id ASC'); if($status_id > 0) {
$query = $query->andWhere('pay_t.status_id='.$status_id);
}
$query = $query->orderBy('user_t.username ASC,user_t.id ASC');
$total = $query->count(); $total = $query->count();
$query = $query->offset($offset)->limit($limit); $pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all(); $items = $query->all();
$data = []; $page_info = MyLib::getPageInfo($pagination);
$data['total'] = $total;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
$row['pay_date'] = $pay_date;
$row['group_path'] = $item->group ? $item->group->getPath():'';
$pay = $item->getPay($pay_date);
$row['real_pay'] = $pay ? $pay->real_pay : '0.00';
$row['is_leave'] = $item->is_leave == 1 ? '已离职':'';
$data['rows'][] = $row;
}
return $data; $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,
'return_count' => $return_count
]);
} }
/** /**
@ -116,7 +133,7 @@ class PersonnelController extends \frontend\controllers\UserBaseController
if($user_info->is_double == 1) { if($user_info->is_double == 1) {
$day_num = $work_day ? $work_day->double_break : '0'; $day_num = $work_day ? $work_day->double_break : '0';
}else{ }else{
$day_num = $work_day ? $work_day->single_break : '0'; $day_num = $work_day ? $work_day->single_break : '0';
} }
if($day_num == '0'){ if($day_num == '0'){
@ -131,8 +148,8 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$try_pay = $user_info->worktype?round(($pay_info->try_pay) / $day_num, 2):'0'; $try_pay = $user_info->worktype?round(($pay_info->try_pay) / $day_num, 2):'0';
$true_pay = $user_info->worktype?round(($pay_info->formal_pay) / $day_num, 2):'0'; $true_pay = $user_info->worktype?round(($pay_info->formal_pay) / $day_num, 2):'0';
}else{ }else{
$try_pay = $user_info->worktype?round(($user_info->try_pay) / $day_num, 2):'0'; $try_pay = $user_info->worktype?round(($user_info->try_pay) / $day_num, 2):'0';
$true_pay = $user_info->worktype?round(($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) / $day_num, 2):'0'; $true_pay = $user_info->worktype?round(($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) / $day_num, 2):'0';
} }
@ -158,10 +175,13 @@ class PersonnelController extends \frontend\controllers\UserBaseController
} else { } else {
$pay_info->should_pay = floatval($user_info->ext_pay); $pay_info->should_pay = floatval($user_info->ext_pay);
} }
if(!$pay_info->save()) { if(!$pay_info->save()) {
var_dump($pay_info->errors); var_dump($pay_info->errors);
exit; exit;
} }
$pay_info = PayT::findOne(['user_id'=>$user_id,'pay_date'=>$pay_date]);
// die;
} }
return $this->render('pay-info',[ return $this->render('pay-info',[
@ -205,18 +225,28 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$electricity_pay = $request->post('electricity_pay',0); $electricity_pay = $request->post('electricity_pay',0);
$deposit = $request->post('deposit',0); $deposit = $request->post('deposit',0);
$public_pay = $request->post('public_pay',0); $public_pay = $request->post('public_pay',0);
$extjob_days = $request->post('extjob_days',0);
$attendance_days = $request->post('attendance_days'); $attendance_days = $request->post('attendance_days');
$try_attendance_days = $request->post('try_attendance_days'); $try_attendance_days = $request->post('try_attendance_days');
$try_extjob_pay = $request->post('try_extjob_pay'); $try_extjob_pay = $request->post('try_extjob_pay');
$give_social_pay = $request->post('give_social_pay'); $give_social_pay = $request->post('give_social_pay');
$full_attendance_pay = $request->post('full_attendance_pay'); $full_attendance_pay = $request->post('full_attendance_pay');
$pass_time_pay = $request->post('pass_time_pay'); $pass_time_pay = $request->post('pass_time_pay');
$formulae = $request->post('formulae'); // $formulae = $request->post('formulae');
$get_full_attendance_pay = $request->post('get_full_attendance_pay', 0); $get_full_attendance_pay = $request->post('get_full_attendance_pay', 0);
$get_pass_time_pay = $request->post('get_pass_time_pay', 0); $get_pass_time_pay = $request->post('get_pass_time_pay', 0);
$try_pay = $request->post('try_pay', 0); $try_pay = $request->post('try_pay', 0);
$formal_pay = $request->post('formal_pay', 0); $formal_pay = $request->post('formal_pay', 0);
$calls = $request->post('calls', 0);
$bus = $request->post('bus', 0);
$bonus = $request->post('bonus', 0);
$turnover = $request->post('turnover', 0);
$tax = $request->post('tax', 0);
$pay_info = PayT::findOne(['id'=>$id]); $pay_info = PayT::findOne(['id'=>$id]);
if($pay_info) { if($pay_info) {
$pay_info->assessment_pay = $assessment_pay; $pay_info->assessment_pay = $assessment_pay;
@ -235,22 +265,33 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$pay_info->electricity_pay = $electricity_pay; $pay_info->electricity_pay = $electricity_pay;
$pay_info->deposit = $deposit; $pay_info->deposit = $deposit;
$pay_info->public_pay = $public_pay; $pay_info->public_pay = $public_pay;
$pay_info->extjob_days = $extjob_days;
$pay_info->attendance_days = $attendance_days; $pay_info->attendance_days = $attendance_days;
$pay_info->try_attendance_days = $try_attendance_days; $pay_info->try_attendance_days = $try_attendance_days;
$pay_info->try_extjob_pay = $try_extjob_pay; $pay_info->try_extjob_pay = $try_extjob_pay;
$pay_info->give_social_pay = $give_social_pay; $pay_info->give_social_pay = $give_social_pay;
$pay_info->full_attendance_pay = $full_attendance_pay; $pay_info->full_attendance_pay = $full_attendance_pay;
$pay_info->pass_time_pay = $pass_time_pay; $pay_info->pass_time_pay = $pass_time_pay;
$pay_info->formulae = $formulae; // $pay_info->formulae = $formulae;
$pay_info->get_full_attendance_pay = $get_full_attendance_pay; $pay_info->get_full_attendance_pay = $get_full_attendance_pay;
$pay_info->get_pass_time_pay = $get_pass_time_pay; $pay_info->get_pass_time_pay = $get_pass_time_pay;
$pay_info->try_pay = $try_pay; $pay_info->try_pay = $try_pay;
$pay_info->formal_pay = $formal_pay; $pay_info->formal_pay = $formal_pay;
$pay_info->calls = $calls;
$pay_info->bus = $bus;
$pay_info->bonus = $bonus;
$pay_info->turnover = $turnover;
$pay_info->tax = $tax;
$pay_info->renshi_status_id = 1;
$pay_info->status_id = $pay_info->chuna_status_id + 1;
$pay_info->save(); $pay_info->save();
$pay_info->calPay(); $pay_info->calPay();
$content = $this->my->showName.'修改了本条记录'.$pay_info->pay_date.'工资'; $content = '人事:'.$this->my->showName.'提交'.$pay_info->pay_date.'工资';
$this->addUserLog($pay_info->user_id, $content); $this->addUserLog($pay_info->id, $content);
$result['success'] = true; $result['success'] = true;
$result['msg'] = '保存成功'; $result['msg'] = '保存成功';
@ -413,4 +454,42 @@ class PersonnelController extends \frontend\controllers\UserBaseController
$result['files'][0]['error'] = '上传文件失败'; $result['files'][0]['error'] = '上传文件失败';
return json_encode($result); return json_encode($result);
} }
public function actionAjaxHistoryIndex()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$request = Yii::$app->request;
$pay_id = $request->get('pay_id');
$page = $request->get('page',1);
$result = array();
$result['success'] = false;
$result['msg'] = '读取失败';
$query = UserLogT::find()
->where(['pay_id'=>$pay_id])
// ->andWhere('op_time>='.strtotime("-6 months"))
->orderBy('id DESC');
$total = $query->count();
$pagination = new Pagination(['totalCount' => $total,'pageSize'=>20]);
$pagination->setPage($page-1);
$query = $query->offset($pagination->offset)->limit($pagination->limit);
$items = $query->all();
$page_info = MyLib::getAjaxPageInfo($pagination,'car_history_list');
$html = $this->renderPartial('ajax-history-index',[
'pay_id' => $pay_id,
'items' => $items,
'page' => $page,
'page_info' => $page_info
]);
$result['success'] = true;
$result['msg'] = '读取成功';
$result['html'] = $html;
return $result;
}
} }

@ -0,0 +1,184 @@
<?php
use \common\libs\MyLib;
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<tr>
<td class="td_bg">
<!--新增搜索项-->
保险类型:<select name="insurer_type">
<option value="0" >所有类型</option>
<option value="1" <?= $insurer_type == 1 ? 'selected': ''?>>商业险</option>
<option value="2" <?= $insurer_type == 2 ? 'selected': ''?>>交强险</option>
</select>
车牌类型:<select name="car_no_type">
<option value="0" >所有类型</option>
<option value="1" <?= $car_no_type == 1 ? 'selected': ''?>>京牌</option>
<option value="2" <?= $car_no_type == 2 ? 'selected': ''?>>非京牌</option>
<option value="3" <?= $car_no_type == 3 ? 'selected': ''?>>特殊车辆</option>
</select>
保险公司:<select name="company_id">
<option value="0">所有公司</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<!--日期-->
出单日期:
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" />
--
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" />
&nbsp;&nbsp;商业净保费:
<input type="Text" class="" name="begin_totalclear" " value="<?= $begin_totalclear ?>" />
--
<input type="Text" class="" name="end_totalclear" " value="<?= $end_totalclear?>" />
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td class="td_bg">
<!--新增搜索项-->
<!--完成程度-->
补点比例:<input name="budian_rate" type="text" value="<?=$budian_rate?>">
<input type="button" class="act_btn" id="save-btn" name="jisuan-btn" value="计算">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td align="center" class="bg_tr">车牌号</td>
<td align="center" class="bg_tr">被保险人</td>
<td align="center" class="bg_tr">保险公司</td>
<td align="center" class="bg_tr">保单号</td>
<td align="center" class="bg_tr">出单日期</td>
<td align="center" class="bg_tr">商业净保费</td>
<td align="center" class="bg_tr">保险类型</td>
<td align="center" class="bg_tr">补点比例</td>
<td align="center" class="bg_tr">补点金额</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = $index;
$total_real = $item->total * $item->total_rate/100;
$total_clear_real = $item->total_clear * $item->total_rate/100;
$total_dis = round($total_clear_real - $item->r_total,2);
$order_caiwu_info = $item->orderCaiwu;
$order_info = $item->order;
$car_info = $order_info->car;
?>
<tr style="height:24px;" onMouseOver="overColor(this)" onMouseOut="outColor(this)">
<td align="center" class="td_bg" nowrap><?=$start_index+1?></td>
<td align="center" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="center" class="td_bg" nowrap><?=$item->id_man?></td>
<td align="center" class="td_bg" nowrap><?=$order_info && $order_info->company ? $order_info->company->name:''?></td>
<td align="center" class="td_bg" nowrap><?=$item->insurer_no?></td>
<td align="center" class="td_bg" nowrap><?=$order_info ? $order_info->print_date : ''?></td>
<td align="center" class="td_bg" nowrap><?=$item->total_clear?></td>
<td align="center" class="td_bg" nowrap><?=$item->insurer_type == 1?'商业':'交强'?></td>
<td align="center" class="td_bg" nowrap><?=$item->budian_rate?></td>
<td align="center" class="td_bg" nowrap><?=$item->budian_money?></td>
</tr>
<?php
}
?>
<tr>
<td align="center" class="td_bg" nowrap>合计</td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=$total1_clear_all?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=$total_money_all?></td>
</tr>
<tr>
<td height="25" colspan="10" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
<link href="/css/fSelect.css" rel="stylesheet" type="text/css">
<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>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.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 src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
<script src="/js/fSelect.js"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" language="javascript">
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params);
}
$(function () {
//搜索
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/budian-list?" + params;
});
$("#save-btn").click(function(){
var last_url = '/finance/budian-save';
var params = $("#searchForm").serialize();
$.get(last_url,params,function(obj){
alert(obj.msg);
if(obj.success){
window.location.href = "/finance/budian-list?" + params;
}
},'json');
});
})
</script>

@ -0,0 +1,769 @@
<?php
use \common\libs\MyLib;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<form 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>
<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>
<?php if($my_type1_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>
<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_type1_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_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>
</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>
</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>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
$ticket_all = 0;
$gift_all = 0;
$zifu_all = 0;
foreach($my_type3_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_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>
</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>
</table>
<?php } ?>
<?php if($my_type0_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>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
foreach($my_type0_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;//carwuordert
// $money = $caiwu_info->money1;
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
// $total1_dis += $order_info->total1_dis;
?>
<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_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>
</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>
</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">
<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($my_type5_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->hebao_ticheng;
// $money = $caiwu_info->money4;
$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="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>
</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_type6_query->count() > 0) { ?>
<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($my_type6_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->zhengben_ticheng;
$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="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>
</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($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</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>
</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');
$(function () {
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
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;
}
}, 'json');
});
$("#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>

@ -0,0 +1,155 @@
<?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;
});
});
</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">
<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>';
}
?>
</select>
状态:<select name="status_id">
<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>
</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>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
</tr>
<form id="delFrm">
<?php
foreach($items as $index => $item) {
$pay_info = $item->getPay($pay_date);
$base_real_pay = 0;
$ticheng_real_pay = 0;
$shouldPay = $item->getChunaShouldPay($pay_date);
$is_begin = 0;
if($pay_info) {
$is_begin = 1;
$ticheng_real_pay = $pay_info->ticheng_real_pay;
}
?>
<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;?>
</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>

@ -0,0 +1,724 @@
<?php
use \common\libs\MyLib;
?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<form id="theFrm">
<input type="hidden" name="id" value="<?=$pay_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 + $pay_info->base_should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->ticheng_real_pay + $pay_info->base_real_pay,2)?></span></span></h3>
<br>
<h3>基本工资</h3>
<?php if($pay_info->renshi_status_id == 1):?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
</tr>
<tr>
<td height="25" align="center" class="td_bg"><?=$pay_info->day_formal_pay + $pay_info->day_try_pay?></td>
<td height="25" align="center" class="td_bg"><?=$pay_info->buzhu_pay?></td>
<td height="25" align="center" class="td_bg"><?=$pay_info->kouchu_pay?></td>
<td height="25" align="center" class="td_bg"><?=$pay_info->base_real_pay?></td>
</tr>
</table>
<?php endif;?>
<br>
<h3>提成工资</h3>
<?php if($pay_info->chuna_status_id == 2):?>
<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>
<?php endif;?>
<div align="center">
<!-- <select name="status_id" id="status_id">-->
<!-- <option value="0"></option>-->
<!-- <option value="1">人事管理</option>-->
<!-- <option value="2">出纳管理</option>-->
<!-- <option value="4">财务管理</option>-->
<!-- </select>-->
<input id="return-btn" type=button class="ACT_btn" name=Submit1 value=" 退回 "/>
<?php if($pay_info->chuna_status_id == 2 && $pay_info->renshi_status_id == 1):?>
&nbsp;&nbsp;
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 提交 "/>
<?php endif;?>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
</div>
<?php if($pay_info->renshi_status_id == 1):?>
<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" class="hide-table">
<TR>
<TD vAlign=top>
<h3>基本工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="10" height="25" class="bg_tr">基本信息</td>
</tr>
<tr>
<td height="25" class="bg_tr">职务</td>
<td height="25" class="bg_tr">姓名</td>
<td height="25" class="bg_tr">入职时间</td>
<td height="25" class="bg_tr">工作制</td>
<td height="25" class="bg_tr">试用工资</td>
<td height="25" class="bg_tr">转正时间</td>
<td height="25" class="bg_tr">转正工资</td>
<td height="25" class="bg_tr">试用出勤天数</td>
<td height="25" class="bg_tr">转正出勤天数</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td>
<td height="25" class="td_bg"><?=$user_info->getShowName()?></td>
<td height="25" class="td_bg"><?=$user_info->enter_date?></td>
<td height="25" class="td_bg"><?=$user_info->worktype?$user_info->worktype->name:''?></td>
<td height="25" class="td_bg"><input oninput="tryPay($(this))" type="text" name="try_pay" value="<?=$pay_info->try_pay == '0.00' ? $user_info->try_pay : $pay_info->try_pay?>"></td>
<td height="25" class="td_bg"><?=$user_info->job_date?></td>
<td height="25" class="td_bg"><input oninput="formalPay($(this))" type="text" name="formal_pay" value="<?=$pay_info->formal_pay == '0.00' ? ($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) : $pay_info->formal_pay?>" /></td>
<td height="25" class="td_bg"><input name="try_attendance_days" type="text" value="<?=$pay_info->try_attendance_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="attendance_days" type="text" value="<?=$pay_info->attendance_days?>" style="width:60px;"/></td>
</tr>
</table>
<br>
<h3>补助工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<!-- <tr>-->
<!-- <td align="center" colspan="12" height="25" class="bg_tr">应发</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td height="25" align="center" colspan="2" class="bg_tr try_pay">试用( --><?//=$try_pay?><!-- 元)</td>-->
<!-- <td height="25" align="center" colspan="6" class="bg_tr formal_pay">转正( --><?//=$true_pay?><!-- 元)</td>-->
<!-- <td align="center" colspan="2" height="25" class="bg_tr">应发全勤/通时</td>-->
<!-- </tr>-->
<tr>
<!-- <td height="25" class="bg_tr">出勤天数</td>-->
<td height="25" class="bg_tr">试用加班</td>
<!-- <td height="25" class="bg_tr">出勤天数</td>-->
<td height="25" class="bg_tr">转正加班</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">话费</td>
<td height="25" class="bg_tr">公交</td>
<td height="25" class="bg_tr">奖金</td><td height="25" class="bg_tr">全勤(钱数)</td>
<td height="25" class="bg_tr">通时(钱数)</td>
</tr>
<tr>
<td height="25" class="td_bg"><input name="try_extjob_pay" type="text" value="<?=$pay_info->try_extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="extjob_pay" type="text" value="<?=$pay_info->extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="give_social_pay" type="text" value="<?=$pay_info->give_social_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="calls" type="text" value="<?=$pay_info->calls?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bus" type="text" value="<?=$pay_info->bus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bonus" type="text" value="<?=$pay_info->bonus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="get_full_attendance_pay" type="text" value="<?=$pay_info->get_full_attendance_pay ? $pay_info->get_full_attendance_pay : '0.00'?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="get_pass_time_pay" type="text" value="<?=$pay_info->get_pass_time_pay ? $pay_info->get_pass_time_pay : '0.00'?>" style="width:60px;"/></td>
</tr>
</table>
<br>
<h3>应扣工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="11" height="25" class="bg_tr">应扣</td>
</tr>
<tr>
<td height="25" class="bg_tr">迟到</td>
<td height="25" class="bg_tr">事假</td>
<td height="25" class="bg_tr">病假</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">罚款</td>
<td height="25" class="bg_tr">电费</td>
<td height="25" class="bg_tr">离职押金</td>
<td height="25" class="bg_tr">公积金</td>
<td height="25" class="bg_tr">个税</td>
<td height="25" class="bg_tr">全勤(钱数或百分比)</td>
<td height="25" class="bg_tr">通时(钱数或百分比)</td>
</tr>
<tr>
<td height="25" class="td_bg"><input name="late_pay" type="text" value="<?=$pay_info->late_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="leave_pay" type="text" value="<?=$pay_info->leave_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="sick_pay" type="text" value="<?=$pay_info->sick_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="social_pay" type="text" value="<?=$pay_info->social_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="fine_pay" type="text" value="<?=$pay_info->fine_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="electricity_pay" type="text" value="<?=$pay_info->electricity_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="deposit" type="text" value="<?=$pay_info->deposit?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="public_pay" type="text" value="<?=$pay_info->public_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td>
<td height="25" class="td_bg"><input name="full_attendance_pay" type="text" value="<?=$pay_info->full_attendance_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="pass_time_pay" type="text" value="<?=$pay_info->pass_time_pay?>" style="width:60px;"/></td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<?php endif;?>
<?php if($pay_info->chuna_status_id == 2):?>
<br>
<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>
<h3>保单提成</h3>
<?php if($my_type1_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>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
foreach($my_type1_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;//carwuordert
$money = $caiwu_info->money1;
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
$total1_dis += $order_info->total1_dis;
?>
<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_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_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?>,0,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?>,0,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>
</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($total1_dis,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"></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_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>
</tr>
<?php
$should_pay = 0;
$real_pay = 0;
$total1_clear = 0;
$total1_dis = 0;
foreach($my_type3_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;//carwuordert
$money = $caiwu_info->money1;
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear;
$total1_dis += $order_info->total1_dis;
?>
<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_clear?></td>
<td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_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?>,0,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?>,0,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>
</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"><?=number_format($total1_dis,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"></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($type3_query->count() > 0) { ?>
<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) { ?>
<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($my_type5_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->hebao_ticheng;
// $money = $caiwu_info->money4;
$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="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"><?=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"><?=$send_info?date('Y-m-d H:i:s',$send_info->send_time):''?></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 } ?>
<!-- 内勤正本-->
<?php if($my_type6_query->count() > 0) { ?>
<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($my_type6_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->zhengben_ticheng;
$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="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"><?=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"><?=$send_info?date('Y-m-d H:i:s',$send_info->send_time):''?></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="6" 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>
</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"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->non_rate?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></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?id= <?=$order_info->non_id?> &oid=<?=$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"><?=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="6" 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>
</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"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->non_rate?></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></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?id= <?=$order_info->non_id?> &oid=<?=$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"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
</TD>
</TR>
</TABLE>
<?php endif;?>
<br>
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" >
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
</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');
$(function () {
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
$.post('/finance/gongzi-all-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//提交
$('#return-btn').click(function(){
var status_id = $('#status_id').val();
if(status_id == 0) {
alert('请先选择退回目标');
return;
}
var r = prompt('退回原因', '');
if(r != null && r != '') {
var params = $("#theFrm").serialize() + '&remark='+ r;
$.post('/finance/gongzi-all-return-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
} else {
alert('不填写原因,无法退回');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/finance/gongzi-all-list?<?=$back_params?>';
});
});
</script>

@ -0,0 +1,159 @@
<?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/gongzi-all-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/gongzi-all-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">
<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>';
}
?>
</select>
状态:<select name="status_id">
<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>
</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="工资条">-->
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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>
</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;
}
?>
<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
}
?>
</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>

@ -1,118 +1,154 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<form id="theFrm"> <form id="theFrm">
<input type="hidden" name="id" value="<?=$pay_info->id?>"> <input type="hidden" name="id" value="<?=$pay_info->id?>">
<p>&nbsp;</p> <p>&nbsp;</p>
<h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>财务工资</h2> <h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>财务工资</h2>
<h3 align="center">应发工资:<span><?=number_format($pay_info->should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->real_pay,2)?></span></span></h3> <h3 align="center">应发工资:<span><?=number_format($pay_info->ticheng_should_pay + $pay_info->base_should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->ticheng_real_pay + $pay_info->base_real_pay,2)?></span></span></h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <br>
<td align="center" colspan="11" height="25" class="bg_tr">基本信息</td> <h3>基本工资</h3>
</tr> <?php if($pay_info->renshi_status_id == 1):?>
<tr>
<td height="25" class="bg_tr">职务</td>
<td height="25" class="bg_tr">姓名</td>
<td height="25" class="bg_tr">入职时间</td>
<td height="25" class="bg_tr">工作制</td>
<td height="25" class="bg_tr">试用工资</td>
<td height="25" class="bg_tr">转正时间</td>
<td height="25" class="bg_tr">转正工资</td>
<td height="25" class="bg_tr">基本工资</td>
<td height="25" class="bg_tr">职务工资</td>
<td height="25" class="bg_tr">岗位工资</td>
<td height="25" class="bg_tr">工资调整</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td>
<td height="25" class="td_bg"><?=$user_info->getShowName()?></td>
<td height="25" class="td_bg"><?=$user_info->enter_date?></td>
<td height="25" class="td_bg"><?=$user_info->worktype?$user_info->worktype->name:''?></td>
<td height="25" class="td_bg"><?=$user_info->try_pay?></td>
<td height="25" class="td_bg"><?=$user_info->job_date?></td>
<td height="25" class="td_bg"><?=$group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->base_pay:''?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->job_pay:''?></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->station_pay:''?></td>
<td height="25" class="td_bg"><?=$user_info->ext_pay?></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <tr>
<td align="center" colspan="10" height="25" class="bg_tr">应发</td> <td height="25" align="center" class="bg_tr">基本工资</td>
</tr> <td height="25" align="center" class="bg_tr">补助工资</td>
<tr> <td height="25" align="center" class="bg_tr">扣除工资</td>
<td align="center" colspan="2" height="25" class="bg_tr">试用( <?php <td height="25" align="center" class="bg_tr">合计</td>
echo $user_info->worktype?round($user_info->try_pay / $user_info->worktype->days, 2):'0';
?> 元)</td>
<td align="center" colspan="8" height="25" class="bg_tr">转正( <?php
echo $user_info->worktype?round(($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) / $user_info->worktype->days, 2):'0';
?> 元)</td>
</tr>
<tr>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">提成</td>
<td height="25" class="bg_tr">个人提成</td>
<td height="25" class="bg_tr">个人保费</td>
<td height="25" class="bg_tr">全司保费</td>
<td height="25" class="bg_tr">部门保费</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="td_bg"><?=$pay_info->try_attendance_days?></td> <td height="25" align="center" class="td_bg"><?=$pay_info->day_formal_pay + $pay_info->day_try_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->try_extjob_pay?></td> <td height="25" align="center" class="td_bg"><?=$pay_info->buzhu_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->attendance_days?></td> <td height="25" align="center" class="td_bg"><?=$pay_info->kouchu_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->extjob_pay?></td> <td height="25" align="center" class="td_bg"><?=$pay_info->base_real_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->give_social_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->commission?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrticheng(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrbaofei(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGsbaofei(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calBmbaofei(),2)?></td>
</tr> </tr>
</table> </table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <?php endif;?>
<tr>
<td align="center" colspan="4" height="25" class="bg_tr">财务信息</td>
<td align="center" colspan="2" height="25" class="bg_tr">司机提成</td> <br>
<td align="center" colspan="2" height="25" class="bg_tr">客服提成</td> <h3>提成工资</h3>
</tr> <?php if($pay_info->chuna_status_id == 2):?>
<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> <tr>
<td height="25" class="bg_tr">话费</td> <td height="25" align="center" class="bg_tr">保单提成</td>
<td height="25" class="bg_tr">公交</td> <td height="25" align="center" class="bg_tr">团队长提成</td>
<td height="25" class="bg_tr">奖金</td> <td height="25" align="center" class="bg_tr">非车险提成</td>
<td height="25" class="bg_tr">营业额</td> <td height="25" align="center" class="bg_tr">维修提成</td>
<td height="25" class="bg_tr">车辆台数</td> <td height="25" align="center" class="bg_tr">合计</td>
<td height="25" class="bg_tr">每台提成</td>
<td height="25" class="bg_tr">维修工时费</td>
<td height="25" class="bg_tr">提成比例</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="td_bg"><input name="calls" type="text" value="<?=$pay_info->calls?>" style="width:60px;"/></td> <td height="25" align="center" class="td_bg"><?=$pay_chexian?></td>
<td height="25" class="td_bg"><input name="bus" type="text" value="<?=$pay_info->bus?>" style="width:60px;"/></td> <td height="25" align="center" class="td_bg"><?=$pay_dz?></td>
<td height="25" class="td_bg"><input name="bonus" type="text" value="<?=$pay_info->bonus?>" style="width:60px;"/></td> <td height="25" align="center" class="td_bg"><?=$pay_nochexian?></td>
<td height="25" class="td_bg"><input name="turnover" type="text" value="<?=$pay_info->turnover?>" style="width:60px;"/></td> <td height="25" align="center" class="td_bg"></td>
<td height="25" class="td_bg"><input name="driver_num" type="text" value="<?=$pay_info->driver_num?>" style="width:60px;"/></td> <td height="25" align="center" class="td_bg"><?=$pay_chexian + $pay_nochexian + $pay_dz?></td>
<td height="25" class="td_bg"><input name="driver_price" type="text" value="<?=$pay_info->driver_price?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="fix_total" type="text" value="<?=$pay_info->fix_total?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="fix_rate" type="text" value="<?=$pay_info->fix_rate?>" style="width:60px;"/>%</td>
</tr> </tr>
</table> </table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <br>
<tr> <?php endif;?>
<td align="center" colspan="4" height="25" class="bg_tr">提成计算方式</td> <div align="center">
</tr> <select name="status_id" id="status_id">
<option value="0"></option>
<option value="1">人事管理</option>
<option value="2">出纳管理</option>
</select>
<input id="return-btn" type=button class="ACT_btn" name=Submit1 value=" 退回 "/>
<?php if($pay_info->chuna_status_id == 2 && $pay_info->renshi_status_id == 1):?>
&nbsp;&nbsp;
<input id="submit-btn" type=button class="ACT_btn" name=Submit2 value=" 提交 "/>
<?php endif;?>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" value=" 返回 ">
</div>
<?php if($pay_info->renshi_status_id == 1):?>
<br>
<table>
<tbody>
<tr> <tr>
<td height="25" class="bg_tr">提成计算公式</td> <TD height="30" align="center" class=tab-off id=navcell onclick=open_up(1) name="navcell">▼基本工资详情</TD>
<td height="25" class="td_bg"><?=$pay_info->formulae?></td>
<td height="25" class="bg_tr">备注</td>
<td height="25" class="td_bg">个人提成:grTicheng,个人保费:grBaoFei,全司保费:gsBaoFei,部门保费:bmBaoFei,营业额:yyg。</td>
</tr> </tr>
</tbody>
</table> </table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <TABLE id=tb1 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<h3>基本工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="10" height="25" class="bg_tr">基本信息</td>
</tr>
<tr>
<td height="25" class="bg_tr">职务</td>
<td height="25" class="bg_tr">姓名</td>
<td height="25" class="bg_tr">入职时间</td>
<td height="25" class="bg_tr">工作制</td>
<td height="25" class="bg_tr">试用工资</td>
<td height="25" class="bg_tr">转正时间</td>
<td height="25" class="bg_tr">转正工资</td>
<td height="25" class="bg_tr">试用出勤天数</td>
<td height="25" class="bg_tr">转正出勤天数</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td>
<td height="25" class="td_bg"><?=$user_info->getShowName()?></td>
<td height="25" class="td_bg"><?=$user_info->enter_date?></td>
<td height="25" class="td_bg"><?=$user_info->worktype?$user_info->worktype->name:''?></td>
<td height="25" class="td_bg"><input oninput="tryPay($(this))" type="text" name="try_pay" value="<?=$pay_info->try_pay == '0.00' ? $user_info->try_pay : $pay_info->try_pay?>"></td>
<td height="25" class="td_bg"><?=$user_info->job_date?></td>
<td height="25" class="td_bg"><input oninput="formalPay($(this))" type="text" name="formal_pay" value="<?=$pay_info->formal_pay == '0.00' ? ($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) : $pay_info->formal_pay?>" /></td>
<td height="25" class="td_bg"><input name="try_attendance_days" type="text" value="<?=$pay_info->try_attendance_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="attendance_days" type="text" value="<?=$pay_info->attendance_days?>" style="width:60px;"/></td>
</tr>
</table>
<br>
<h3>补助工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<!-- <tr>-->
<!-- <td align="center" colspan="12" height="25" class="bg_tr">应发</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td height="25" align="center" colspan="2" class="bg_tr try_pay">试用( --><?//=$try_pay?><!-- 元)</td>-->
<!-- <td height="25" align="center" colspan="6" class="bg_tr formal_pay">转正( --><?//=$true_pay?><!-- 元)</td>-->
<!-- <td align="center" colspan="2" height="25" class="bg_tr">应发全勤/通时</td>-->
<!-- </tr>-->
<tr>
<!-- <td height="25" class="bg_tr">出勤天数</td>-->
<td height="25" class="bg_tr">试用加班</td>
<!-- <td height="25" class="bg_tr">出勤天数</td>-->
<td height="25" class="bg_tr">转正加班</td>
<td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">话费</td>
<td height="25" class="bg_tr">公交</td>
<td height="25" class="bg_tr">奖金</td><td height="25" class="bg_tr">全勤(钱数)</td>
<td height="25" class="bg_tr">通时(钱数)</td>
</tr>
<tr>
<td height="25" class="td_bg"><input name="try_extjob_pay" type="text" value="<?=$pay_info->try_extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="extjob_pay" type="text" value="<?=$pay_info->extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="give_social_pay" type="text" value="<?=$pay_info->give_social_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="calls" type="text" value="<?=$pay_info->calls?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bus" type="text" value="<?=$pay_info->bus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="bonus" type="text" value="<?=$pay_info->bonus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="get_full_attendance_pay" type="text" value="<?=$pay_info->get_full_attendance_pay ? $pay_info->get_full_attendance_pay : '0.00'?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="get_pass_time_pay" type="text" value="<?=$pay_info->get_pass_time_pay ? $pay_info->get_pass_time_pay : '0.00'?>" style="width:60px;"/></td>
</tr>
</table>
<br>
<h3>应扣工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <tr>
<td align="center" colspan="11" height="25" class="bg_tr">应扣</td> <td align="center" colspan="11" height="25" class="bg_tr">应扣</td>
</tr> </tr>
@ -125,51 +161,42 @@ use \common\libs\MyLib;
<td height="25" class="bg_tr">电费</td> <td height="25" class="bg_tr">电费</td>
<td height="25" class="bg_tr">离职押金</td> <td height="25" class="bg_tr">离职押金</td>
<td height="25" class="bg_tr">公积金</td> <td height="25" class="bg_tr">公积金</td>
<td height="25" class="bg_tr">个税</td>
<td height="25" class="bg_tr">全勤(钱数或百分比)</td> <td height="25" class="bg_tr">全勤(钱数或百分比)</td>
<td height="25" class="bg_tr">通时(钱数或百分比)</td> <td height="25" class="bg_tr">通时(钱数或百分比)</td>
<td height="25" class="bg_tr">个税</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="td_bg"><?=$pay_info->late_pay?></td> <td height="25" class="td_bg"><input name="late_pay" type="text" value="<?=$pay_info->late_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->leave_pay?></td> <td height="25" class="td_bg"><input name="leave_pay" type="text" value="<?=$pay_info->leave_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->sick_pay?></td> <td height="25" class="td_bg"><input name="sick_pay" type="text" value="<?=$pay_info->sick_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->social_pay?></td> <td height="25" class="td_bg"><input name="social_pay" type="text" value="<?=$pay_info->social_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->fine_pay?></td> <td height="25" class="td_bg"><input name="fine_pay" type="text" value="<?=$pay_info->fine_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->electricity_pay?></td> <td height="25" class="td_bg"><input name="electricity_pay" type="text" value="<?=$pay_info->electricity_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->deposit?></td> <td height="25" class="td_bg"><input name="deposit" type="text" value="<?=$pay_info->deposit?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->public_pay?></td> <td height="25" class="td_bg"><input name="public_pay" type="text" value="<?=$pay_info->public_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$pay_info->full_attendance_pay?></td>
<td height="25" class="td_bg"><?=$pay_info->pass_time_pay?></td>
<td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td> <td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td>
<td height="25" class="td_bg"><input name="full_attendance_pay" type="text" value="<?=$pay_info->full_attendance_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="pass_time_pay" type="text" value="<?=$pay_info->pass_time_pay?>" style="width:60px;"/></td>
</tr> </tr>
</table> </table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> </TD>
<tr> </TR>
<td align="center" colspan="9" height="25" class="bg_tr">财务统计</td> </TABLE>
</tr> <?php endif;?>
<tr> <?php if($pay_info->chuna_status_id == 2):?>
<td height="25" align="center" class="bg_tr">我的新保</td> <br>
<td height="25" align="center" class="bg_tr">我的续保</td>
<td height="25" align="center" class="bg_tr">我的提成</td> <table>
<td height="25" align="center" class="bg_tr">送单合计</td> <tbody>
<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> <tr>
<td height="25" align="center" class="td_bg"><?=$my_type1_query->count()?></td> <TD height="30" align="center" class=tab-off id=navcell onclick=open_up(2) name="navcell">▼提成工资详情</TD>
<td height="25" align="center" class="td_bg"><?=$my_type3_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$type_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$type3_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type5_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type6_query->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type1_query_non->count()?></td>
<td height="25" align="center" class="td_bg"><?=$my_type1_query_hebao->count()?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order_users->count()?></td>
</tr> </tr>
</tbody>
</table> </table>
<TABLE id=tb2 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" class="hide-table">
<TR>
<TD vAlign=top>
<h3>保单提成</h3>
<?php if($my_type1_query->count() > 0) { ?> <?php if($my_type1_query->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <tr>
@ -182,11 +209,11 @@ use \common\libs\MyLib;
<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> <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> </tr>
@ -197,8 +224,7 @@ use \common\libs\MyLib;
$total1_dis = 0; $total1_dis = 0;
foreach($my_type1_query->each() as $index=>$pay_order) { foreach($my_type1_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu; $caiwu_info = $order_info->caiwu;//carwuordert
$rate = $caiwu_info->rate1;
$money = $caiwu_info->money1; $money = $caiwu_info->money1;
$should_pay += $pay_order->should_pay; $should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
@ -208,19 +234,20 @@ use \common\libs\MyLib;
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>"> <input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td> <td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td> <td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td> <td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="my_rate1[]" id="my_rate1_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('my_rate1_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','<?=$pay_order->order->total1_dis?>','<?=$order_info->getGiftPrice(1,1)?>','<?=$order_info->getGiftPrice(1,0)?>','<?=$order_info->getGiftPrice(0,1)?>','<?=$order_info->getGiftPrice(0,0)?>','my_should_pays1_<?=$caiwu_info->id?>','my_real_pays1_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="my_should_pays1[]" id="my_should_pays1_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td> <td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_dis?></td> <td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></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"><?=$pay_order->first_xinbao_ticheng?></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->total1_dis?></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,1)"><?=$order_info->getGiftPrice(0,1)?></a></td> <td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,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?>,0,0)"><?=$order_info->getGiftPrice(0,0)?></a></td> <td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td height="25" align="center" class="td_bg"><input name="my_real_pays1[]" id="my_real_pays1_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></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 height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -233,8 +260,8 @@ use \common\libs\MyLib;
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></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($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"></td> <td height="25" align="center" class="bg_tr"></td>
<td height="25" align="center" class="bg_tr"><?=number_format($total1_dis,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"></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>
@ -256,10 +283,9 @@ use \common\libs\MyLib;
<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>
<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>
@ -267,31 +293,32 @@ use \common\libs\MyLib;
$should_pay = 0; $should_pay = 0;
$real_pay = 0; $real_pay = 0;
$total1_clear = 0; $total1_clear = 0;
$total1_dis = 0;
foreach($my_type3_query->each() as $index=>$pay_order) { foreach($my_type3_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu; $caiwu_info = $order_info->caiwu;//carwuordert
$rate = $caiwu_info->rate3; $money = $caiwu_info->money1;
$money = $caiwu_info->money3;
$should_pay += $pay_order->should_pay; $should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
$total1_clear += $order_info->total1_clear; $total1_clear += $order_info->total1_clear;
$total1_dis += $order_info->total1_dis;
?> ?>
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_my_payids_2[]" value="<?=$pay_order->id?>"> <input type="hidden" name="tc_my_payids_1[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td> <td height="25" align="center" class="td_bg"><?=$order_info->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td> <td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td> <td height="25" align="center" class="td_bg"><?=$order_info->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="my_rate2[]" id="my_rate2_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('my_rate2_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','<?=$pay_order->order->total1_dis?>','<?=$order_info->getGiftPrice(1,1)?>','<?=$order_info->getGiftPrice(1,0)?>','<?=$order_info->getGiftPrice(0,1)?>','<?=$order_info->getGiftPrice(0,0)?>','my_should_pays2_<?=$caiwu_info->id?>','my_real_pays2_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="my_should_pays2[]" id="my_should_pays2_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td> <td height="25" align="center" class="td_bg"><?=$caiwu_info->ticheng_zong_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_dis?></td> <td height="25" align="center" class="td_bg"><?=$pay_order->should_pay?></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"><?=$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,0)"><?=$order_info->getGiftPrice(1,0)?></a></td> <td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,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?>,0,1)"><?=$order_info->getGiftPrice(0,1)?></a></td> <td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,0)"><?=$order_info->getGiftPrice(1,0)?></a></td>
<td height="25" align="center" class="td_bg"><a href="javascript:void(0);" onclick="open_gift_dlg(<?=$order_info->id?>,0,0)"><?=$order_info->getGiftPrice(0,0)?></a></td> <td height="25" align="center" class="td_bg"><?=$order_info->yuangong_money?></td>
<td height="25" align="center" class="td_bg"><input name="my_real_pays2[]" id="my_real_pays2_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></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 height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -304,66 +331,10 @@ use \common\libs\MyLib;
<td height="25" align="center" class="bg_tr"><?=number_format($total1_clear,2)?></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($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"></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"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td>
</tr>
</table>
<?php } ?>
<?php if($type_query->count() > 0){ ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="12" 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
$should_pay = 0;
$real_pay = 0;
foreach($type_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate1;
$money = $caiwu_info->money1;
if($pay_order->type == 2) {
$rate = $caiwu_info->rate2;
$money = $caiwu_info->money2;
}
$should_pay += $pay_order->should_pay;
$real_pay += $pay_order->real_pay;
?>
<tr>
<td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_payids_<?=$pay_order->type?>[]" value="<?=$pay_order->id?>">
<?=$index?>
</td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->car_no?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->total1_clear?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" onblur="cal_pay('rate<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$pay_order->order->total1_clear?>','0','0','0','0','0','should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','real_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>')"/>%</td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" style="width:60px;" readonly/></td>
<td height="25" align="center" class="td_bg"><input name="real_pays<?=$pay_order->type?>[]" id="real_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->real_pay?>" style="width:60px;" readonly/></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"><?=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"><?=number_format($real_pay,2)?></td>
<td height="25" align="center" class="bg_tr"></td> <td height="25" align="center" class="bg_tr"></td>
</tr> </tr>
@ -395,7 +366,7 @@ use \common\libs\MyLib;
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="tc_send_payids[]" value="<?=$pay_order->id?>"> <input type="hidden" name="tc_send_payids[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></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="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
@ -407,7 +378,7 @@ use \common\libs\MyLib;
<?=$order_info->send_address1?> <?=$order_info->send_address1?>
</td> </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" 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->send_money?>" style="width:60px;"/></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> <td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -446,7 +417,7 @@ use \common\libs\MyLib;
foreach($my_type5_query->each() as $index=>$pay_order) { foreach($my_type5_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu; $caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate4; $rate = $caiwu_info->hebao_ticheng;
// $money = $caiwu_info->money4; // $money = $caiwu_info->money4;
$send_info = $order_info->sendLog; $send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
@ -454,16 +425,13 @@ use \common\libs\MyLib;
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="neqi_payids[]" value="<?=$pay_order->id?>"> <input type="hidden" name="neqi_payids[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></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="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"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td> <td height="25" align="center" class="td_bg"><?=$send_info?date('Y-m-d H:i:s',$send_info->send_time):''?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->real_pay?></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" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->total1_clear?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')"style="width:60px;" /></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td> <td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -503,22 +471,20 @@ use \common\libs\MyLib;
foreach($my_type6_query->each() as $index=>$pay_order) { foreach($my_type6_query->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->order;
$caiwu_info = $order_info->caiwu; $caiwu_info = $order_info->caiwu;
$rate = $caiwu_info->rate5; $rate = $caiwu_info->zhengben_ticheng;
$send_info = $order_info->sendLog; $send_info = $order_info->sendLog;
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
?> ?>
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="zhengben[]" value="<?=$pay_order->id?>"> <input type="hidden" name="zhengben[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </td>
<td height="25" align="center" class="td_bg"><?=$order_info->car_no?></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="center" class="td_bg"><?=MyLib::substr_cut($order_info->id_man,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td> <td height="25" align="center" class="td_bg"><?=$rate?></td>
<td height="25" align="center" class="td_bg"><?=$send_info?date('Y-m-d H:i:s',$send_info->send_time):''?></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" class="td_bg"><?=$pay_order->real_pay?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->total1_clear?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td> <td height="25" align="center" class="td_bg">[<a href="/insurer/info?id=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -535,7 +501,8 @@ use \common\libs\MyLib;
</tr> </tr>
</table> </table>
<?php } ?> <?php } ?>
<br>
<h3>非车险提成</h3>
<!-- 非车险销售--> <!-- 非车险销售-->
<?php if($my_type1_query_non->count() > 0) { ?> <?php if($my_type1_query_non->count() > 0) { ?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
@ -554,24 +521,23 @@ use \common\libs\MyLib;
<?php <?php
$real_pay = 0; $real_pay = 0;
foreach($my_type1_query_non->each() as $index=>$pay_order) { foreach($my_type1_query_non->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->nonOrder;
$caiwu_info = $order_info->caiwu1; $non_info = $order_info->nonInsurance;
$rate = $caiwu_info->rate1; $caiwu_info = $order_info->caiwu1;//ordercarwut
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
?> ?>
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_xiaoshou[]" value="<?=$pay_order->id?>"> <input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </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"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td> <td height="25" align="center" class="td_bg"><?=$order_info->non_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->non_baofei?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></td>
<td height="25" align="center" class="td_bg"><?=$order_info->print_date?></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?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td> <td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
<?php <?php
@ -605,8 +571,9 @@ use \common\libs\MyLib;
<?php <?php
$real_pay = 0; $real_pay = 0;
foreach($my_type1_query_hebao->each() as $index=>$pay_order) { foreach($my_type1_query_hebao->each() as $index=>$pay_order) {
$order_info = $pay_order->order; $order_info = $pay_order->nonOrder;
$caiwu_info = $order_info->caiwu1; $non_info = $order_info->nonInsurance;
$caiwu_info = $order_info->caiwu1;//ordercarwut
$rate = $caiwu_info->rate4; $rate = $caiwu_info->rate4;
$real_pay += $pay_order->real_pay; $real_pay += $pay_order->real_pay;
@ -614,14 +581,14 @@ use \common\libs\MyLib;
<tr> <tr>
<td width="50" height="25" align="center" class="td_bg"> <td width="50" height="25" align="center" class="td_bg">
<input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>"> <input type="hidden" name="non_hebao[]" value="<?=$pay_order->id?>">
<?=$index?> <?=$index+1?>
</td> </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"><?=MyLib::substr_cut($non_info->insurant_name,15)?></td>
<td height="25" align="center" class="td_bg"><input name="rate<?=$pay_order->type?>[]" id="rate<?=$pay_order->type?><?=$caiwu_info->id?>" type="text" value="<?=$rate?>" style="width:60px;" />%</td> <td height="25" align="center" class="td_bg"><?=$order_info->non_rate?></td>
<td height="25" align="center" class="td_bg"><?=$pay_order->order->print_date?></td> <td height="25" align="center" class="td_bg"><?=$order_info->print_date?></td>
<td height="25" align="center" class="td_bg"><input name="should_pays<?=$pay_order->type?>[]" id="should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>" type="text" value="<?=$pay_order->should_pay?>" onblur="cal_rate('should_pays<?=$pay_order->type?>_<?=$caiwu_info->id?>','<?=$order_info->non_baofei?>','rate<?=$pay_order->type?><?=$caiwu_info->id?>','0')" style="width:60px;"/></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?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td> <td height="25" align="center" class="td_bg">[<a href="/non-auto-insurance/bd-info-search?id= <?=$order_info->non_id?> &oid=<?=$order_info->id?>" target="_blank">详情</a>]</td>
</tr> </tr>
@ -639,19 +606,39 @@ use \common\libs\MyLib;
</table> </table>
<?php } ?> <?php } ?>
</TD>
</TR>
</TABLE>
<?php endif;?>
<br>
<table>
<tbody>
<tr>
<TD height="30" align="center" class=tab-off id=navcell onclick=open_up(3) name="navcell">▲操作记录</TD>
</tr>
</tbody>
</table>
<TABLE id=tb3 cellSpacing=1 cellPadding=0 width="100%" border=0 name="tb" >
<TR>
<TD vAlign=top>
<div id="car_history_list"></div>
</TD>
</TR>
</TABLE>
<div align="center">
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
&nbsp;&nbsp;
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
</div>
</form> </form>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script> <script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <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/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/js/artDialog/plugins/iframeTools.source.js"></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"> <script type="text/javascript" language="javascript">
function cal_pay(obj1,total,dis,price1,price2,price3,price4,obj2,obj3) { function cal_pay(obj1,total,dis,price1,price2,price3,price4,obj2,obj3) {
var total1 = Number($('#' + obj1).val())/100 * Number(total); var total1 = Number($('#' + obj1).val())/100 * Number(total);
@ -678,6 +665,10 @@ use \common\libs\MyLib;
fixed: true fixed: true
}); });
} }
//操作历史
gotoPage('/personnel/ajax-history-index?pay_id=<?=$pay_info->id?>&page=1','car_history_list');
$(function () { $(function () {
//提交按钮 //提交按钮
$("#submit-btn").click(function(){ $("#submit-btn").click(function(){
@ -692,9 +683,94 @@ use \common\libs\MyLib;
} }
}); });
//提交
$('#return-btn').click(function(){
var status_id = $('#status_id').val();
if(status_id == 0) {
alert('请先选择退回目标');
return;
}
var r = prompt('退回原因', '');
if(r != null && r != '') {
var params = $("#theFrm").serialize() + '&remark='+ r;
$.post('/finance/pay2-return-save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
} else {
alert('不填写原因,无法退回');
}
});
//返回按钮 //返回按钮
$('#back-btn').click(function(){ $('#back-btn').click(function(){
window.location.href='/finance/pay2-list?<?=$back_params?>'; window.location.href='/finance/pay2-list?<?=$back_params?>';
}); });
})
$("#bm_rate").blur(function(){
var is_bm_baohan = $('#is_bm_baohan').val();
var bm_rate = $('#bm_rate').val();
var bm_ticheng = 0;
if(is_bm_baohan == 1){
var bm_ticheng = <?=$pay_info->calBmbaofei()?> * bm_rate / 100;
}else{
var bm_ticheng = <?=$pay_info->calBmbaofei() - $pay_info->calGrbaofei()?> * bm_rate /100;
}
$('#bm_ticheng').val(bm_ticheng);
});
$("#gs_rate").blur(function(){
var is_gs_baohan = $('#is_gs_baohan:checked').val();
var gs_rate = $('#gs_rate').val();
var gs_ticheng = 0;
if(is_gs_baohan == 1){
gs_ticheng = <?=$pay_info->calGsbaofei()?> * gs_rate / 100;
}else{
gs_ticheng = (<?=$pay_info->calGsbaofei() - $pay_info->calGrbaofei()?> * gs_rate / 100);
}
$('#gs_ticheng').val(gs_ticheng);
});
$("#is_bm_baohan").change(function(){
var is_bm_baohan = $('#is_bm_baohan').val();
var bm_rate = $('#bm_rate').val();
var bm_ticheng = 0;
if(is_bm_baohan == 1){
var bm_ticheng = <?=$pay_info->calBmbaofei()?> * bm_rate;
}else{
var bm_ticheng = <?=$pay_info->calBmbaofei() - $pay_info->calGrbaofei()?> * bm_rate;
}
$('#bm_ticheng').val(bm_ticheng);
});
$("#is_gs_baohan").change(function(){
var is_gs_baohan = $('#is_gs_baohan:checked').val();
var gs_rate = $('#gs_rate').val();
var gs_ticheng = 0;
if(is_gs_baohan == 1){
gs_ticheng = <?=$pay_info->calGsbaofei()?> * gs_rate / 100;
}else{
gs_ticheng = (<?=$pay_info->calGsbaofei() - $pay_info->calGrbaofei()?> * gs_rate / 100);
}
$('#gs_ticheng').val(gs_ticheng);
});
});
</script> </script>

@ -3,8 +3,13 @@ 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/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script> <script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<script type="text/javascript" language="javascript" src="/js/func.js"></script> <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"> <script type="text/javascript" language="javascript">
//编辑 //编辑
function edit(id) { function edit(id) {
@ -37,6 +42,11 @@ use \common\libs\MyLib;
},'json'); },'json');
} }
}); });
$("#pay-btn").click(function(){
var params = $('#searchForm').serialize();
window.location.href = "/finance/pay2-tiao?" + params;
});
}); });
@ -60,9 +70,23 @@ use \common\libs\MyLib;
} }
?> ?>
</select> </select>
状态:<select name="status_id">
<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>
</select>
<input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索"> <input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<!-- <span id="reseting" style="display: none;">正在计算中...</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="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> </td>
</tr> </tr>
</form> </form>
@ -73,29 +97,49 @@ use \common\libs\MyLib;
<td align="center" class="bg_tr">真实姓名</td> <td align="center" class="bg_tr">真实姓名</td>
<td width="100" align="center" class="bg_tr">工资月份</td> <td width="100" align="center" class="bg_tr">工资月份</td>
<td 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="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> <td width="30" align="center" class="bg_tr">操作</td>
</tr> </tr>
<form id="delFrm"> <form id="delFrm">
<?php <?php
foreach($items as $index => $item) { foreach($items as $index => $item) {
$pay_info = $item->getPay($pay_date); $pay_info = $item->getPay($pay_date);
$real_pay = 0; $base_real_pay = 0;
if($pay_info) $ticheng_real_pay = 0;
$real_pay = $pay_info->real_pay; $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;
}
?> ?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="left" class="td_bg" nowrap ><?=$item->username?></td> <td align="left" class="td_bg" nowrap ><?=$item->username?></td>
<td class="td_bg" nowrap><?=$item->name?></td> <td class="td_bg" nowrap><?=$item->name?></td>
<td class="td_bg" nowrap><?=$pay_date?></td> <td class="td_bg" nowrap><?=$pay_date?></td>
<td align="left" class="td_bg" nowrap><?=$item->group?$item->group->getPath():''?></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 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?>"> <td align="center" class="td_bg" nowrap data="<?=$item->id?>">
<?=number_format($real_pay,2)?> <?=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>
<td align="center" class="td_bg" nowrap> <td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">维护</a>] <?php if($is_begin == 0):?>
<?php else:?>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
<?php endif;?>
</td> </td>
</tr> </tr>
<?php <?php

@ -0,0 +1,289 @@
<?php
use \common\libs\MyLib;
?>
<script src="/Myfile/lib/layui/layui.js"></script>
<link rel="stylesheet" href="/js/fileupload/css/jquery.fileupload.css">
<table lay-size="sm" class="layui-table ">
<form id="searchForm">
<input type="hidden" id="page" name="page" value="<?=$page?>">
<tr>
<td class="td_bg">
保险类型
<select name="insurer_type" class="insurer_type">
<option value=0>全部</option>
<option value=1 <?= $insurer_type==1?'selected':'' ?>>商业</option>
<option value=2 <?= $insurer_type==2?'selected':'' ?>>交强</option>
</select>
保单号:<input name="insurer_no" type="text" value="<?=$insurer_no?>">
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
工号:<input name="username" type="text" value="<?=$username?>">&nbsp;&nbsp;
<!--日期-->
出单日期:
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" />
--
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" />
<br>
<br>
回单日期:
<input type="Text" class="Wdate" name="r_begin_date" onclick="WdatePicker()" value="<?= $r_begin_date ?>" />
--
<input type="Text" class="Wdate" name="r_end_date" onclick="WdatePicker()" value="<?= $r_end_date ?>" />
<br>保险公司:<select name="company_id">
<option value="0">所有模型</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
级别:<select name="group_id">
<option value="0">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $group_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
排序:
<select name="sort_key">
<option value="0">请选择</option>
<option value="print_date" <?= $sort_key == 'print_date' ? 'selected' : ''?>>出单日期</option>
<option value="total" <?= $sort_key == 'total' ? 'selected' : ''?>>商业总保费</option>
<option value="total_clear" <?= $sort_key == 'total_clear' ? 'selected' : ''?>>商业净保费</option>
<option value="total_rate" <?= $sort_key == 'total_rate' ? 'selected' : ''?>>手续费比例</option>
</select>
<select name="sort_value">
<option value="0">请选择</option>
<option value="ASC" <?= $sort_value == 'ASC' ? 'selected' : ''?>>正序</option>
<option value="DESC" <?= $sort_value == 'DESC' ? 'selected' : ''?>>倒序</option>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<!-- <input type="button" class="act_btn" id="output-btn" name="output-btn" value="导出">-->
</td>
</tr>
</form>
</table>
<table width="100%" class="layui-elip layui-table" lay-filter="demo">
<thead>
<tr>
<th width="24" align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username1',width:30}">序号</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username2'}">车牌号</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username4'}">保险公司</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username5'}">工号</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username6'}">级别</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username10',width:110}">保单号</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username11'}">提单日期</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username12'}">出单日期</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username13'}">保险类型</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username14'}">商业总保费</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username15'}">商业净保费</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username16'}">手续费比例</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username17'}">补点比例</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username18'}">应得金额</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username19'}">实得金额</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username20'}">回款金额</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username22'}">补点金额</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username23'}">回款补点</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username24'}">减免金额</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username25'}">礼品礼券</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username26'}">工资</th>
<th align="center" class="bg_tr" style="font-size:12px;" lay-data="{field:'username28'}">利润</th>
</tr>
</thead>
<tbody>
<?php
foreach($items as $index => $item) {
$start_index = ($page-1)*20+$index;
$order = $item->order;
$users=$item->user->group;
$username=$item->user;
$uname=$username['name'];
$nams=$users['name'];
$total_real = $item->total * $item->total_rate/100;
$total_clear_real = $item->total_clear * $item->total_rate/100;
$total_dis = round($total_clear_real - $item->r_total,2);
$order_info = $item->order;
$total1_dis = $item->insurer_type == 1?($order_info->total1_dis + $order_info->yuangong_money):0;
$gongzi = $item->insurer_type == 1?$item->getPayOrderUser()->sum('real_pay'):0;
$ticket = $item->insurer_type == 1?$order_info->getGiftPrice(1,1):0;
$gift = $item->insurer_type == 1?$order_info->getGiftPrice(1,2):0;
// $bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0;
$bu_dian = $item->budian_rate?$item->budian_rate * $item->total_clear / 100:0;
$r_bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0;
$liwu = $ticket + $gift;
$lirun = $total_clear_real + $bu_dian - $total1_dis - $gongzi - $liwu;
?>
<tr style="height:24px;" onMouseOver="overColor(this)" onMouseOut="outColor(this)">
<td align="center" class="td_bg" style="font-size:12px;" ><?=$start_index+1?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->car_no?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order && $order->company ? $order->company->name:''?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->user->username?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$uname?>-<?=$nams?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->insurer_no?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order ? $order->submit_date : ''?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$order ? $order->print_date : ''?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->insurer_type==1?'商业':'交强'?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total_clear?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->total_rate?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->budian_rate?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$total_real)?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$total_clear_real)?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$item->r_total?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$bu_dian)?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=sprintf("%.2f",$r_bu_dian)?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$total1_dis?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$liwu?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$gongzi?></td>
<td align="center" class="td_bg" style="font-size:12px;" ><?=$lirun?></td>
</tr>
<?php
}
?>
<tr>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=number_format($sum_total,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($sum_total_clear,2)?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=number_format($sum_r_total,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($bu_dian_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($r_bu_dian_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($total1_dis_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($liwu_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($gongzi_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($lirun_all,2)?></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td height="25" colspan="20" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</tbody>
</table>
<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>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.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 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/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params);
}
$(function () {
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
var urlfile = $("#urlfile").val();
var import_type = $(".import_type").val();
if(urlfile == ''){
alert('请先选择文件!');
return false;
}
var last_url = '/finance/receipt-process';
var params = $("#theFrm").serialize();
$.post(last_url,params,function(obj){
alert(obj.msg);
if(obj.success){
$('#theFrm')[0].reset();
window.location.reload();
}
},'json');
}
});
//搜索
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
window.location.href = "/finance/receipt-lirun?" + params;
});
//导出
$("#output-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize();
//window.location.href = "/finance/receipt-output?" + params;
var url = "/finance/receipt-output";
$.get(url,params,function(obj){
alert(obj.msg);
if(obj.success) {
window.location.href = obj.files[0].src;
}
},'json');
});
})
</script>
<style>
input[type="text"] {
width: 134px;
}
</style>
<script>
console.log(layui)
layui.use('table',function(){
var table = layui.table;
var $ = layui.$;
//转换静态表格
table.init('demo', {
limit: 100
});
$('.layui-table-cell').css('padding','0')
$('td').css('padding','0')
})
</script>

@ -0,0 +1,369 @@
<?php
use \common\libs\MyLib;
use common\models\OrderGiftT;
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<tr>
<td class="td_bg">
<!--新增搜索项-->
<!--完成程度-->
业务员:<input name="user_names" id="user_names" user_ids="" type="text" style="width:60%;" value="<?=$user_names?>">
<br>模糊<input name="select_user" id="select_user" type="text" style="width:100px;" value="">
<input type="checkbox" id="all" value="1">全选&nbsp;&nbsp;
<input type="checkbox" id="no_num" value="1">非数字&nbsp;&nbsp;
<input type="button" class="act_btn" id="add-user" name="add-user" value="+工号">
<input type="checkbox" id="is_fan" value="1" <?=$is_fan==1?'checked':''?>>取反&nbsp;&nbsp;
<br>
车牌类型:<select name="car_no_type">
<option value="0" >所有类型</option>
<option value="1" <?= $car_no_type == 1 ? 'selected': ''?>>京牌</option>
<option value="2" <?= $car_no_type == 2 ? 'selected': ''?>>非京牌</option>
<option value="3" <?= $car_no_type == 3 ? 'selected': ''?>>特殊车辆</option>
</select>
险种类型:<select name="insurer_type">
<option value="1" <?= $insurer_type == 1 ? 'selected': ''?>>商业</option>
<option value="2" <?= $insurer_type == 2 ? 'selected': ''?>>商业+交强</option>
</select>
保险公司:<select name="company_id">
<option value="0">所有公司</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
车牌号:<input name="car_no" type="text" value="<?=$car_no?>">
<!--日期-->
出单日期:
<input type="Text" class="Wdate" name="begin_date" onclick="WdatePicker()" value="<?= $begin_date ?>" autocomplete="off" />
--
<input type="Text" class="Wdate" name="end_date" onclick="WdatePicker()" value="<?= $end_date ?>" autocomplete="off"/>
&nbsp;&nbsp;<br>商业净保费:
<input type="Text" class="" name="begin_totalclear" " value="<?= $begin_totalclear ?>" />
--
<input type="Text" class="" name="end_totalclear" " value="<?= $end_totalclear?>" />
级别:<select name="group_id">
<option value="0">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $group_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="导出">
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td class="td_bg">
基本提成比例:<input name="yeji_rate" type="text" value="<?=$yeji_rate?>">%
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
团队长组:
<select name="dz_group">
<option value="0">请选择</option>
<option value="1" <?php if($dz_group == 1){echo 'selected';}?>>团队长组1</option>
<option value="2" <?php if($dz_group == 2){echo 'selected';}?>>团队长组2</option>
<option value="3" <?php if($dz_group == 3){echo 'selected';}?>>团队长组3</option>
<option value="4" <?php if($dz_group == 4){echo 'selected';}?>>团队长组4</option>
<option value="5" <?php if($dz_group == 5){echo 'selected';}?>>团队长组5</option>
</select>
团队长提成比例:<input name="dz_rate" type="text" value="<?=$dz_rate?>">%
&nbsp;&nbsp;
团队长:<input name="dz_names" id="dz_names" type="text" style="width:30%;" value="<?=$dz_names?>">
<input type="button" class="act_btn" id="add-dz" name="add-dz" value="+工号">
</td>
</tr>
<tr>
<td class="td_bg">
<!--新增搜索项-->
<!--完成程度-->
核保提成:<input name="hebao_ticheng" type="text" value="<?=$hebao_ticheng?>">&nbsp;&nbsp;
正本提成:<input name="zhengben_ticheng" type="text" value="<?=$zhengben_ticheng?>">&nbsp;&nbsp;
送单提成:<input name="songdan_ticheng" type="text" value="<?=$songdan_ticheng?>">&nbsp;&nbsp;
原新保提成比例:<input name="first_xinbao_rate" type="text" value="<?=$first_xinbao_rate?>">%
<input type="button" class="act_btn" id="jisuan-btn" name="jisuan-btn" value="计算">
<!-- <input type="button" class="act_btn" id="output-btn" name="output-btn" value="导出">-->
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="24" align="center" class="bg_tr">序号</td>
<td align="center" class="bg_tr">车牌号</td>
<td align="center" class="bg_tr">被保险人</td>
<td align="center" class="bg_tr">保险公司</td>
<td align="center" class="bg_tr">保单号</td>
<td align="center" class="bg_tr">出单日期</td>
<td align="center" class="bg_tr">商业净保费</td>
<td align="center" class="bg_tr">手续费比例</td>
<td align="center" class="bg_tr">基本提成比例</td>
<td align="center" class="bg_tr">基本提成</td>
<td align="center" class="bg_tr">加点提成比例</td>
<td align="center" class="bg_tr">加点提成</td>
<td align="center" class="bg_tr">自费礼品</td>
<td align="center" class="bg_tr">自费礼券</td>
<td align="center" class="bg_tr">自费减免金额</td>
<td align="center" class="bg_tr">提成</td>
<td align="center" class="bg_tr">业务员</td>
<td align="center" class="bg_tr">原新保提成</td>
<td align="center" class="bg_tr">原新保业务员</td>
<td align="center" class="bg_tr">核保提成</td>
<td align="center" class="bg_tr">核保业务员</td>
<td align="center" class="bg_tr">正本提成</td>
<td align="center" class="bg_tr">正本业务员</td>
<td align="center" class="bg_tr">送单提成</td>
<td align="center" class="bg_tr">送单人</td>
<td align="center" class="bg_tr">团队长组1提成</td>
<td align="center" class="bg_tr">团队长组1</td>
<td align="center" class="bg_tr">团队长组2提成</td>
<td align="center" class="bg_tr">团队长组2</td>
<td align="center" class="bg_tr">团队长组3提成</td>
<td align="center" class="bg_tr">团队长组3</td>
<td align="center" class="bg_tr">团队长组4提成</td>
<td align="center" class="bg_tr">团队长组4</td>
<td align="center" class="bg_tr">团队长组5提成</td>
<td align="center" class="bg_tr">团队长组5</td>
</tr>
<?php
foreach($items as $index => $item) {
$start_index = $index;
// $users=$item->user->group;
// $username=$item->user;
// $uname=$username['name'];
// $nams=$users['name'];
$total_real = $item->total * $item->total_rate/100;
$total_clear_real = $item->total_clear * $item->total_rate/100;
$total_dis = round($total_clear_real - $item->r_total,2);
$order_caiwu_info = $item->orderCaiwu;
$order_info = $item->order;
$car_info = $order_info->car;
$is_xinbao = $car_info->op_user3 == ''?1:0;
?>
<tr style="height:24px;" onMouseOver="overColor(this)" onMouseOut="outColor(this)">
<td align="center" class="td_bg" nowrap><?=$start_index+1?></td>
<td align="center" class="td_bg" nowrap><?=$item->car_no?></td>
<td align="center" class="td_bg" nowrap><?=$item->id_man?></td>
<td align="center" class="td_bg" nowrap><?=$order_info && $order_info->company ? $order_info->company->name:''?></td>
<td align="center" class="td_bg" nowrap><?=$item->insurer_no?></td>
<td align="center" class="td_bg" nowrap><?=$order_info ? $order_info->print_date : ''?></td>
<td align="center" class="td_bg" nowrap><?=$item->total_clear?></td>
<td align="center" class="td_bg" nowrap><?=$item->total_rate?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->yeji_rate:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->yeji_ticheng:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info?$order_info->ticheng_zong_rate:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info?$order_info->ticheng_money:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info?$order_info->getGiftPrice(1,1):''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info?$order_info->getGiftPrice(1,2):''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info?$order_info->yuangong_money:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->yewu_ticheng:''?></td>
<?php if($is_xinbao ==1):?>
<td align="center" class="td_bg" nowrap><?=$car_info?$car_info->op_user1:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->first_xinbao_ticheng:''?></td>
<td align="center" class="td_bg" nowrap></td>
<?php else:?>
<td align="center" class="td_bg" nowrap><?=$car_info?$car_info->op_user3:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->first_xinbao_ticheng:''?></td>
<td align="center" class="td_bg" nowrap><?=$car_info?$car_info->op_user1:''?></td>
<?php endif;?>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->hebao_ticheng:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info->op1?$order_info->op1->getShowName():''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->zhengben_ticheng:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info->op2?$order_info->op2->getShowName():''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->songdan_ticheng:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_info->sendLog?$order_info->sendLog->user->getShowName():''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_ticheng1:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_names1:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_ticheng2:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_names2:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_ticheng3:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_names3:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_ticheng4:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_names4:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_ticheng5:''?></td>
<td align="center" class="td_bg" nowrap><?=$order_caiwu_info?$order_caiwu_info->dz_names5:''?></td>
</tr>
<?php
}
?>
<tr>
<td align="center" class="td_bg" nowrap>合计</td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap>总合计保费</td>
<td align="center" class="td_bg" nowrap><?=number_format($total1_clear_all+$total2_clear_all,2)?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=number_format($total1_clear_all,2)?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=number_format($yeji_ticheng_all,2)?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap><?=number_format($ticheng_money_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($lipin_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($liquan_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($yuangong_money_all,2)?></td>
<td align="center" class="td_bg" nowrap><?=number_format($yewu_ticheng_all,2)?></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
<td align="center" class="td_bg" nowrap></td>
</tr>
<tr >
<td height="25" colspan="18" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
<link href="/css/fSelect.css" rel="stylesheet" type="text/css">
<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>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.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 src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
<script src="/js/fSelect.js"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" language="javascript" src="/js/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" language="javascript">
function edit(id) {
var params = $('#searchForm').serialize();
window.location.href = '/finance/receipt-info?id=' + id + '&back_params=' + encodeURIComponent(params);
}
$(function () {
//搜索
$("#search-btn").click(function(){
$('#page').val(0);
var params = $('#searchForm').serialize() + '&user_ids=' + $('.user_names').val() + '&is_fan=' + $('#is_fan:checked').val();
window.location.href = "/finance/ticheng-jisuan?" + params;
});
$("#output-btn").click(function () {
$('#page').val(0);
var params = $('#searchForm').serialize();
//window.location.href = "/finance/receipt-output?" + params;
var url = "/finance/receipt-ticheng-output";
$.get(url, params, function (obj) {
alert(obj.msg);
if (obj.success) {
window.location.href = obj.files[0].src;
}
}, 'json');
});
$("#jisuan-btn").click(function(){
var last_url = '/finance/jisuan-save';
var params = $("#searchForm").serialize() + '&user_ids=' + $('.user_names').val() + '&is_fan=' + $('#is_fan:checked').val();
$.get(last_url,params,function(obj){
alert(obj.msg);
if(obj.success){
window.location.href = "/finance/ticheng-jisuan?" + params;
}
},'json');
});
//提交维修明细
$('#add-user').click(function(){
var params = $("#searchForm").serialize();
art.dialog.open('/finance/add-user?' + '&select_user=' + $('#select_user').val() + '&all=' + $('#all:checked').val() + '&no_num=' + $('#no_num:checked').val(),
{title: '增加工号', width: 1000, height: 350,
close: function () {
var user_names = art.dialog.data('user_names'); // 读取子窗口返回的数据
if( typeof user_names != 'undefined') {
var a = $('#user_names').val();
if (a != '') {
a = a + ',';
}
$('#user_names').val(a + user_names);
}
}
});
});
//提交维修明细
$('#add-dz').click(function(){
var params = $("#searchForm").serialize();
art.dialog.open('/finance/add-user?'+ 'user_names=' + $('#dz_names').val() ,
{title: '增加工号', width: 1000, height: 350,
close: function () {
var user_names = art.dialog.data('user_names'); // 读取子窗口返回的数据
$('#dz_names').val(user_names);
}
});
});
})
</script>

@ -23,6 +23,7 @@ use yii\helpers\Html;
<?php endif; ?> <?php endif; ?>
<link href="/assets/css/animate.css" rel="stylesheet"> <link href="/assets/css/animate.css" rel="stylesheet">
<link href="/assets/css/style.css?v=4.1.1" rel="stylesheet"> <link href="/assets/css/style.css?v=4.1.1" rel="stylesheet">
<link href="/assets/css/custom.css?v=1.0.0" rel="stylesheet">
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<?php $this->beginBody() ?> <?php $this->beginBody() ?>

@ -14,27 +14,21 @@ use \common\libs\MyLib;
<input type="hidden" name="op" value="add" /> <input type="hidden" name="op" value="add" />
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">名称</label> <label class="col-md-1 control-label">名称</label>
<div class="col-md-11"> <div class="col-md-3">
<input type="text" name="name" value="" class="form-control"> <input type="text" name="name" value="" class="form-control">
</div> </div>
</div>
<div class="form-group">
<label class="col-md-1 control-label">开始</label> <label class="col-md-1 control-label">开始</label>
<div class="col-md-5"> <div class="col-md-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="" /> <input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="" />
<span class="input-group-addon">时间</span>
<input type="text" class="form-control clockpicker" data-autoclose="true" id="begin_time" name="begin_time" autocomplete="off" value="" />
</div> </div>
</div> </div>
<label class="col-md-1 control-label">结束</label> <label class="col-md-1 control-label">结束</label>
<div class="col-md-5"> <div class="col-md-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="" /> <input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="" />
<span class="input-group-addon">时间</span>
<input type="text" class="form-control clockpicker" data-autoclose="true" id="end_time" name="end_time" autocomplete="off" value="" />
</div> </div>
</div> </div>
</div> </div>
@ -61,15 +55,19 @@ use \common\libs\MyLib;
</div> </div>
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/clockpicker/clockpicker.js"></script> <script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(function () { $(function () {
$('.input-date').datepicker({ laydate({
keyboardNavigation: false, elem:'#begin_date',
forceParse: false, format: 'YYYY-MM-DD hh:mm:ss',
autoclose: true istime: true
});
laydate({
elem:'#end_date',
format: 'YYYY-MM-DD hh:mm:ss',
istime: true
}); });
$('.clockpicker').clockpicker();
//提交按钮 //提交按钮
$(".btn-save").click(function(){ $(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', { parent.layer.confirm('是否确认提交?', {

@ -10,13 +10,13 @@ use \common\libs\MyLib;
<div class="ibox-title fixed"> <div class="ibox-title fixed">
<h5>营销策略 - 编辑 - <?=$info->celuo_name?></h5> <h5>营销策略 - 编辑 - <?=$info->celuo_name?></h5>
<div class="ibox-tools"> <div class="ibox-tools">
<a class="btn btn-primary btn-xs btn-users" data-id="0" href="javascript:void(0);"> <a class="btn btn-primary btn-xs btn-fanxian" href="javascript:void(0);" onclick="fanxian()">
<i class="fa fa-users"></i> 员工 <i class="fa fa-code-fork"></i> 返现
</a> </a>
<a class="btn btn-primary btn-xs btn-save" data-id="0" href="javascript:void(0);"> <a class="btn btn-primary btn-xs btn-save" href="javascript:void(0);">
<i class="fa fa-save"></i> 保存 <i class="fa fa-save"></i> 保存
</a> </a>
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="history.go(-1)"> <a class="btn btn-primary btn-xs edit-btn" href="javascript:void(0);" onclick="history.go(-1)">
<i class="fa fa-backward"></i> 返回 <i class="fa fa-backward"></i> 返回
</a> </a>
</div> </div>
@ -29,27 +29,21 @@ use \common\libs\MyLib;
<input type="hidden" name="id" value="<?=$info->id?>" /> <input type="hidden" name="id" value="<?=$info->id?>" />
<div class="form-group"> <div class="form-group">
<label class="col-md-1 control-label">名称</label> <label class="col-md-1 control-label">名称</label>
<div class="col-md-11"> <div class="col-md-3">
<input type="text" name="name" value="<?=$info->celuo_name?>" class="form-control"> <input type="text" name="name" value="<?=$info->celuo_name?>" class="form-control">
</div> </div>
</div>
<div class="form-group">
<label class="col-md-1 control-label">开始</label> <label class="col-md-1 control-label">开始</label>
<div class="col-md-5"> <div class="col-md-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="<?=substr($info->begin_date,0,10)?>" /> <input type="text" class="input-date form-control" id="begin_date" name="begin_date" autocomplete="off" value="<?=$info->begin_date?>" />
<span class="input-group-addon">时间</span>
<input type="text" class="form-control clockpicker" data-autoclose="true" id="begin_time" name="begin_time" autocomplete="off" value="<?=substr($info->begin_date,10,6)?>" />
</div> </div>
</div> </div>
<label class="col-md-1 control-label">结束</label> <label class="col-md-1 control-label">结束</label>
<div class="col-md-5"> <div class="col-md-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">日期</span> <span class="input-group-addon">日期</span>
<input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="<?=substr($info->end_date,0,10)?>" /> <input type="text" class="input-date form-control" id="end_date" name="end_date" autocomplete="off" value="<?=$info->end_date?>" />
<span class="input-group-addon">时间</span>
<input type="text" class="form-control clockpicker" data-autoclose="true" id="end_time" name="end_time" autocomplete="off" value="<?=substr($info->end_date,10,6)?>" />
</div> </div>
</div> </div>
</div> </div>
@ -64,22 +58,171 @@ use \common\libs\MyLib;
</div> </div>
</div> </div>
</div> </div>
<div id="fanxians"></div>
<div class="ibox">
<div class="ibox-title">
<label>员工范围</label>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs btn-users" data-id="0" href="javascript:void(0);" onclick="users()">
<i class="fa fa-users"></i> 添加员工
</a>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-md-12" id="users">
</div>
</div>
</div>
</div>
</div> </div>
<?php $this->beginBlock('footer_js'); ?> <?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/clockpicker/clockpicker.js"></script> <script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
function fanxian() {
title = '返现条件';
layer_show(title, '/marketing-strategy/fanxian?celuo_id=<?=$info->id?>');
}
function readFanXians() {
$('#fanxians').html('');
$.get('fanxian-read?celuo_id=<?=$info->id?>',function(obj){
if(obj.success) {
obj.fanxians.forEach(function(item, index) {
var html = '<div class="ibox">';
html += '<div class="ibox-title">';
html += '<label>客户返现:' + item.fanxian_rate + '%,最高返现:' + item.max_cashback + '元</label>';
html += '<div class="ibox-tools">';
html += '<a class="btn btn-primary btn-xs btn-users" data-id="0" href="javascript:void(0);" onclick="gifts(' + item.id + ')">';
html += '<i class="fa fa-users"></i> 添加礼品';
html += '</a>';
html += '<a class="btn btn-primary btn-xs btn-users" data-id="0" href="javascript:void(0);" onclick="users()">';
html += '<i class="fa fa-users"></i> 添加礼券';
html += '</a>';
html += '<button class="btn btn-danger btn-xs" style="margin-left: 8px;" onclick="deleteFanxian(' + item.id + ')">';
html += '<i class="fa fa-trash"></i> 删除返现';
html += '</button>';
html += '</div>';
html += '</div>';
html += '<div class="ibox-content">';
html += '<div class="row">';
html += '<div class="col-md-12">';
html += '<h5>条件:</h5>';
html += '<p>保费:' + item.tiaojian.baofei + '元</p>';
if(item.tiaojian.car_type != '')
html += '<p>车牌类型:' + item.tiaojian.car_type + '</p>';
if(item.tiaojian.car_use != '')
html += '<p>使用性质:' + item.tiaojian.car_use + '</p>';
if(item.tiaojian.company_name != '')
html += '<p>保费公司:' + item.tiaojian.company_name + '</p>';
if(item.tiaojian.type_name != '')
html += '<p>数据类型:' + item.tiaojian.type_name + '</p>';
html += '<hr>';
html += '<h5>礼品:</h5>';
item.gifts.forEach(function(gift_item, sub_index) {
var gift_html = '<p><button class="btn btn-danger btn-xs" onclick="deleteGift(' + gift_item.id + ')">删除</button>' + gift_item.free_type + ':';
gift_item.gifts.forEach(function(sub_gift, thr_index) {
gift_html += '<button type="button" class="btn btn-primary btn-xs btn-rounded">' + sub_gift.name + '</button>';
});
html += gift_html;
});
html += '<hr>';
html += '<h5>礼券</h5>';
item.quans.forEach(function(gift_item, sub_index) {
var gift_html = '<p><button class="btn btn-danger btn-xs" onclick="deleteGift(' + gift_item.id + ')">删除</button>' + gift_item.free_type + ':';
gift_item.gifts.forEach(function(sub_gift, thr_index) {
gift_html += '<button type="button" class="btn btn-primary btn-xs btn-rounded">' + sub_gift.name + '</button>';
});
html += gift_html;
});
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>';
$('#fanxians').html($('#fanxians').html() + html);
});
}
},'json');
}
function deleteFanxian(fanxian_id) {
layer.confirm('是否确认删除返现?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
$.post('/marketing-strategy/fanxian-delete',{celuo_id:<?=$info->id?>, fanxin_id: fanxian_id},function(obj){
layer.msg(obj.msg);
if(obj.success) {
readFanXians();
}
},'json');
}, function(){
//
});
}
function gifts(fanxian_id) {
title = '添加礼品';
layer_show(title, '/marketing-strategy/gifts?celuo_id=<?=$info->id?>&fanxian_id=' + fanxian_id);
}
function deleteGift(id) {
layer.confirm('是否确认删除礼品/礼券?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
$.post('/marketing-strategy/gift-delete',{celuo_id:<?=$info->id?>, id: id},function(obj){
layer.msg(obj.msg);
if(obj.success) {
readFanXians();
}
},'json');
}, function(){
//
});
}
function users() {
title = '员工管理';
layer_show(title, '/marketing-strategy/users?id=<?=$info->id?>');
}
function readUsers() {
$('#users').html('');
$.get('users-read?id=<?=$info->id?>',function(obj){
if(obj.success) {
obj.users.forEach(function(item, index) {
var html = '<button class="btn btn-info btn-rounded btn-sm" style="margin-left: 8px; margin-bottom: 8px;" onclick="deleteUser(' + item.id + ')">';
html += item.name;
html += '</button>';
$('#users').html($('#users').html() + html);
});
}
},'json');
}
function deleteUser(user_id) {
layer.confirm('是否确认删除员工?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
$.post('/marketing-strategy/users-delete',{id:<?=$info->id?>, user_id: user_id},function(obj){
layer.msg(obj.msg);
if(obj.success) {
readUsers();
}
},'json');
}, function(){
//
});
}
$(function () { $(function () {
function create() { laydate({
title = '员工管理'; elem:'#begin_date',
layer_show(title, '/marketing-strategy/users'); format: 'YYYY-MM-DD hh:mm:ss',
} istime: true
$('.input-date').datepicker({ });
keyboardNavigation: false, laydate({
forceParse: false, elem:'#end_date',
autoclose: true format: 'YYYY-MM-DD hh:mm:ss',
istime: true
}); });
$('.clockpicker').clockpicker(); readFanXians();
readUsers();
//提交按钮 //提交按钮
$(".btn-save").click(function(){ $(".btn-save").click(function(){
layer.confirm('是否确认提交?', { layer.confirm('是否确认提交?', {

@ -0,0 +1,153 @@
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form role="form" class="form-horizontal" id="theFrm" onsubmit="return false;">
<input type="hidden" name="celuo_id" value="<?=$celuo_id?>">
<div class="form-group">
<label class="col-sm-2 control-label">保费</label>
<div class="col-sm-4">
<div class="input-group">
<input type="text" id="baofei" name="baofei" class="form-control" autocomplete="off" placeholder="">
<div class="input-group-addon"></div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">车牌类型</label>
<div class="col-sm-4">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_type_id_1" name="car_type_id[]" value="1">
<label for="car_type_id_1">京牌</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_type_id_2" name="car_type_id[]" value="2">
<label for="car_type_id_2">非京牌</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">保费公司</label>
<div class="col-sm-10">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="company_id_1" name="company_id[]" value="1">
<label for="company_id_1">人保</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="company_id_4" name="company_id[]" value="4">
<label for="company_id_4">太平洋</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="company_id_7" name="company_id[]" value="7">
<label for="company_id_7">人寿</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="company_id_8" name="company_id[]" value="8">
<label for="company_id_8">平安</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">车牌使用性质</label>
<div class="col-sm-9">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_1" name="car_use_id[]" value="1">
<label for="car_use_id_1">家庭自用车</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_2" name="car_use_id[]" value="2">
<label for="car_use_id_2">党政机关、事业团体</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_3" name="car_use_id[]" value="3">
<label for="car_use_id_3">非营业企业客车</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_4" name="car_use_id[]" value="4">
<label for="car_use_id_4">不区分营业非营业</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_5" name="car_use_id[]" value="5">
<label for="car_use_id_5">出租租赁</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_6" name="car_use_id[]" value="6">
<label for="car_use_id_6">营业货车</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_7" name="car_use_id[]" value="7">
<label for="car_use_id_7">非营业货车</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="car_use_id_8" name="car_use_id[]" value="8">
<label for="car_use_id_8">城市公交</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">数据类型</label>
<div class="col-sm-4">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="type_id_1" name="type_id[]" value="1">
<label for="type_id_1">新保</label>
</div>
<div class="checkbox checkbox-inline">
<input type="checkbox" id="type_id_2" name="type_id[]" value="2">
<label for="type_id_2">续保</label>
</div>
</div>
</div>
<hr>
<div class="form-group">
<label class="col-sm-2 control-label">客户返现</label>
<div class="col-sm-4">
<div class="input-group">
<input type="text" id="rate" name="rate" class="form-control" autocomplete="off">
<div class="input-group-addon">%</div>
</div>
</div>
<label class="col-sm-2 control-label">最高返现</label>
<div class="col-sm-4">
<div class="input-group">
<input type="text" id="max_cashback" name="max_cashback" class="form-control" autocomplete="off">
<div class="input-group-addon"></div>
</div>
</div>
</div>
<button type="button" class="col-sm-offset-2 btn btn-primary btn-save">保存</button>
</form>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript">
$(function () {
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/marketing-strategy/fanxian-save',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
parent.readFanXians();
layer_close();
} else {
layer.msg(data.msg);
}
},'json');
}, function(){
//
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

@ -0,0 +1,83 @@
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form role="form" class="form-horizontal" id="theFrm" onsubmit="return false;">
<input type="hidden" name="celuo_id" value="<?=$celuo_id?>">
<input type="hidden" name="fanxian_id" value="<?=$fanxian_id?>">
<input type="hidden" name="gift_type" value="1">
<div class="form-group">
<label class="col-sm-2 control-label">礼品类型</label>
<div class="col-sm-4">
<select name="free_type" id="type" class="form-control">
<option value="3">M选N模式</option>
<option value="2">收费模式</option>
<option value="1">免费模式</option>
</select>
</div>
<div class="col-sm-2">
<div class="input-group">
<div class="input-group-addon">N=</div>
<input type="text" name="n" id="n" class="form-control">
<div class="input-group-addon"></div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">选择礼品</label>
<div class="col-sm-9">
<div class="row">
<?php foreach($items as $item) { ?>
<div class="col-sm-2 mb-8">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="gift_id_<?=$item->id?>" name="gift_ids[]" value="<?=$item->id?>">
<label for="gift_id_<?=$item->id?>"><?=$item->name?></label>
</div>
</div>
<div class="col-sm-2 mb-8">
<div class="input-group">
<input type="text" name="gift_prices[<?=$item->id?>]" class="form-control" value="<?=$item->price?>">
<div class="input-group-addon"></div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<button type="button" class="col-sm-offset-2 btn btn-primary btn-save">保存</button>
</form>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript">
$(function () {
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/marketing-strategy/gift-save',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
parent.readFanXians();
layer_close();
} else {
layer.msg(data.msg);
}
},'json');
}, function(){
//
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

@ -0,0 +1,70 @@
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form role="form" class="form-horizontal" id="theFrm" onsubmit="return false;">
<input type="hidden" name="id" value="<?=$id?>">
<div class="form-group">
<label class="col-sm-2 control-label">搜索工号</label>
<div class="col-sm-3">
<input type="text" id="username" name="username" class="form-control" autocomplete="off">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">选择员工</label>
<div class="col-sm-9" id="users"></div>
</div>
<button type="button" class="col-sm-offset-2 btn btn-primary btn-save">添加</button>
</form>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript">
$(function () {
$('#username').change(function() {
var key = $(this).val();
$('#users').html('');
$.get('/marketing-strategy/search-user?key=' + key, function(obj) {
if(obj.success) {
obj.users.forEach(function(item, index) {
var html = '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="user_' + item.id + '" name="ids[]" value="' + item.id + '">';
html += '<label for="user_' + item.id + '"> ' + item.name + ' </label>';
html += '</div>';
$('#users').html( $('#users').html() + html);
});
}
},'json');
});
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/marketing-strategy/users-add',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
parent.readUsers();
layer_close();
} else {
layer.msg(data.msg);
}
},'json');
}, function(){
//
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>

@ -1,8 +1,11 @@
<link href="/css/tabs.css" rel="stylesheet" type="text/css">
<form id="theFrm"> <form id="theFrm">
<input type="hidden" name="id" value="<?=$pay_info->id?>"> <input type="hidden" name="id" value="<?=$pay_info->id?>">
<p>&nbsp;</p> <p>&nbsp;</p>
<h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>人事工资</h2> <h2 align="center"><?=date("Y年m月",strtotime($pay_date.'-01'))?>人事工资</h2>
<h3 align="center">应发工资:<span><?=number_format($pay_info->should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->real_pay,2)?></span></span></h3> <h3 align="center">应发工资:<span><?=number_format($pay_info->base_should_pay,2)?></span><span style="color:#ff0000;">实发工资:<span><?=number_format($pay_info->base_real_pay,2)?></span></span></h3>
<h3>基本工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <tr>
<td align="center" colspan="10" height="25" class="bg_tr">基本信息</td> <td align="center" colspan="10" height="25" class="bg_tr">基本信息</td>
@ -15,9 +18,9 @@
<td height="25" class="bg_tr">试用工资</td> <td height="25" class="bg_tr">试用工资</td>
<td height="25" class="bg_tr">转正时间</td> <td height="25" class="bg_tr">转正时间</td>
<td height="25" class="bg_tr">转正工资</td> <td height="25" class="bg_tr">转正工资</td>
<td height="25" class="bg_tr">基本工资</td> <td height="25" class="bg_tr">加班天数</td>
<td height="25" class="bg_tr">职务工资</td> <td height="25" class="bg_tr">试用出勤天数</td>
<td height="25" class="bg_tr">工资调整</td> <td height="25" class="bg_tr">转正出勤天数</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td> <td height="25" class="td_bg"><?=$group_info?$group_info->getPath():''?></td>
@ -27,90 +30,51 @@
<td height="25" class="td_bg"><input oninput="tryPay($(this))" type="text" name="try_pay" value="<?=$pay_info->try_pay == '0.00' ? $user_info->try_pay : $pay_info->try_pay?>"></td> <td height="25" class="td_bg"><input oninput="tryPay($(this))" type="text" name="try_pay" value="<?=$pay_info->try_pay == '0.00' ? $user_info->try_pay : $pay_info->try_pay?>"></td>
<td height="25" class="td_bg"><?=$user_info->job_date?></td> <td height="25" class="td_bg"><?=$user_info->job_date?></td>
<td height="25" class="td_bg"><input oninput="formalPay($(this))" type="text" name="formal_pay" value="<?=$pay_info->formal_pay == '0.00' ? ($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) : $pay_info->formal_pay?>" /></td> <td height="25" class="td_bg"><input oninput="formalPay($(this))" type="text" name="formal_pay" value="<?=$pay_info->formal_pay == '0.00' ? ($group_info?($group_info->base_pay + $group_info->job_pay + $group_info->station_pay + $user_info->ext_pay):$user_info->ext_pay) : $pay_info->formal_pay?>" /></td>
<td height="25" class="td_bg"><?=$user_info->try_pay?></td> <td height="25" class="td_bg"><input name="extjob_days" type="text" value="<?=$pay_info->extjob_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$group_info?$group_info->job_pay:''?></td> <td height="25" class="td_bg"><input name="try_attendance_days" type="text" value="<?=$pay_info->try_attendance_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=$user_info->ext_pay?></td> <td height="25" class="td_bg"><input name="attendance_days" type="text" value="<?=$pay_info->attendance_days?>" style="width:60px;"/></td>
</tr> </tr>
</table> </table>
<br>
<h3>补助工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<!-- <tr>-->
<!-- <td align="center" colspan="12" height="25" class="bg_tr">应发</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td height="25" align="center" colspan="2" class="bg_tr try_pay">试用( --><?//=$try_pay?><!-- 元)</td>-->
<!-- <td height="25" align="center" colspan="6" class="bg_tr formal_pay">转正( --><?//=$true_pay?><!-- 元)</td>-->
<!-- <td align="center" colspan="2" height="25" class="bg_tr">应发全勤/通时</td>-->
<!-- </tr>-->
<tr> <tr>
<td align="center" colspan="12" height="25" class="bg_tr">应发</td> <!-- <td height="25" class="bg_tr">出勤天数</td>-->
</tr> <td height="25" class="bg_tr">试用加班</td>
<tr> <!-- <td height="25" class="bg_tr">出勤天数</td>-->
<td height="25" align="center" colspan="2" class="bg_tr try_pay">试用( <?=$try_pay?> 元)</td> <td height="25" class="bg_tr">转正加班</td>
<td height="25" align="center" colspan="8" class="bg_tr formal_pay">转正( <?=$true_pay?> 元)</td>
<td align="center" colspan="2" height="25" class="bg_tr">应发全勤/通时</td>
</tr>
<tr>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">出勤天数</td>
<td height="25" class="bg_tr">加班</td>
<td height="25" class="bg_tr">社保</td> <td height="25" class="bg_tr">社保</td>
<td height="25" class="bg_tr">提成</td> <td height="25" class="bg_tr">话费</td>
<td height="25" class="bg_tr">个人提成</td> <td height="25" class="bg_tr">公交</td>
<td height="25" class="bg_tr">个人保费</td> <td height="25" class="bg_tr">奖金</td><td height="25" class="bg_tr">全勤(钱数)</td>
<td height="25" class="bg_tr">全司保费</td>
<td height="25" class="bg_tr">部门保费</td>
<td height="25" class="bg_tr">全勤(钱数)</td>
<td height="25" class="bg_tr">通时(钱数)</td> <td height="25" class="bg_tr">通时(钱数)</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="td_bg"><input name="try_attendance_days" type="text" value="<?=$pay_info->try_attendance_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="try_extjob_pay" type="text" value="<?=$pay_info->try_extjob_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="try_extjob_pay" type="text" value="<?=$pay_info->try_extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="attendance_days" type="text" value="<?=$pay_info->attendance_days?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="extjob_pay" type="text" value="<?=$pay_info->extjob_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="extjob_pay" type="text" value="<?=$pay_info->extjob_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="give_social_pay" type="text" value="<?=$pay_info->give_social_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="give_social_pay" type="text" value="<?=$pay_info->give_social_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="commission" type="text" value="<?=$pay_info->commission?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="calls" type="text" value="<?=$pay_info->calls?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrticheng(),2)?></td> <td height="25" class="td_bg"><input name="bus" type="text" value="<?=$pay_info->bus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGrbaofei(),2)?></td> <td height="25" class="td_bg"><input name="bonus" type="text" value="<?=$pay_info->bonus?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calGsbaofei(),2)?></td>
<td height="25" class="td_bg"><?=number_format($pay_info->calBmbaofei(),2)?></td>
<td height="25" class="td_bg"><input name="get_full_attendance_pay" type="text" value="<?=$pay_info->get_full_attendance_pay ? $pay_info->get_full_attendance_pay : '0.00'?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="get_full_attendance_pay" type="text" value="<?=$pay_info->get_full_attendance_pay ? $pay_info->get_full_attendance_pay : '0.00'?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="get_pass_time_pay" type="text" value="<?=$pay_info->get_pass_time_pay ? $pay_info->get_pass_time_pay : '0.00'?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="get_pass_time_pay" type="text" value="<?=$pay_info->get_pass_time_pay ? $pay_info->get_pass_time_pay : '0.00'?>" style="width:60px;"/></td>
</tr> </tr>
</table> </table>
<br>
<h3>应扣工资</h3>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr> <tr>
<td align="center" colspan="4" height="25" class="bg_tr">财务信息</td> <td align="center" colspan="11" height="25" class="bg_tr">应扣</td>
<td align="center" colspan="2" height="25" class="bg_tr">司机提成</td>
<td align="center" colspan="2" height="25" class="bg_tr">客服提成</td>
</tr>
<tr>
<td height="25" class="bg_tr">话费</td>
<td height="25" class="bg_tr">公交</td>
<td height="25" class="bg_tr">奖金</td>
<td height="25" class="bg_tr">营业额</td>
<td height="25" class="bg_tr">车辆台数</td>
<td height="25" class="bg_tr">每台提成</td>
<td height="25" class="bg_tr">维修工时费</td>
<td height="25" class="bg_tr">提成比例</td>
</tr>
<tr>
<td height="25" class="td_bg"><?=$pay_info->calls?></td>
<td height="25" class="td_bg"><?=$pay_info->bus?></td>
<td height="25" class="td_bg"><?=$pay_info->bonus?></td>
<td height="25" class="td_bg"><?=$pay_info->turnover?></td>
<td height="25" class="td_bg"><?=$pay_info->driver_num?></td>
<td height="25" class="td_bg"><?=$pay_info->driver_price?></td>
<td height="25" class="td_bg"><?=$pay_info->fix_total?></td>
<td height="25" class="td_bg"><?=$pay_info->fix_rate?>%</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="4" height="25" class="bg_tr">提成计算方式</td>
</tr>
<tr>
<td height="25" class="bg_tr">提成计算公式</td>
<td height="25" class="td_bg"><input name="formulae" type="text" value="<?=$pay_info->formulae?>" style="width:320px;"/></td>
<td height="25" class="bg_tr">备注</td>
<td height="25" class="td_bg">个人提成:grTicheng,个人保费:grBaoFei,全司保费:gsBaoFei,部门保费:bmBaoFei,营业额:yyg。</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td align="center" colspan="10" height="25" class="bg_tr">应扣</td>
</tr> </tr>
<tr> <tr>
<td height="25" class="bg_tr">迟到</td> <td height="25" class="bg_tr">迟到</td>
@ -121,6 +85,7 @@
<td height="25" class="bg_tr">电费</td> <td height="25" class="bg_tr">电费</td>
<td height="25" class="bg_tr">离职押金</td> <td height="25" class="bg_tr">离职押金</td>
<td height="25" class="bg_tr">公积金</td> <td height="25" class="bg_tr">公积金</td>
<td height="25" class="bg_tr">个税</td>
<td height="25" class="bg_tr">全勤(钱数或百分比)</td> <td height="25" class="bg_tr">全勤(钱数或百分比)</td>
<td height="25" class="bg_tr">通时(钱数或百分比)</td> <td height="25" class="bg_tr">通时(钱数或百分比)</td>
</tr> </tr>
@ -133,20 +98,51 @@
<td height="25" class="td_bg"><input name="electricity_pay" type="text" value="<?=$pay_info->electricity_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="electricity_pay" type="text" value="<?=$pay_info->electricity_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="deposit" type="text" value="<?=$pay_info->deposit?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="deposit" type="text" value="<?=$pay_info->deposit?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="public_pay" type="text" value="<?=$pay_info->public_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="public_pay" type="text" value="<?=$pay_info->public_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input type="text" name="tax" value="<?=$pay_info->tax?>" /></td>
<td height="25" class="td_bg"><input name="full_attendance_pay" type="text" value="<?=$pay_info->full_attendance_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="full_attendance_pay" type="text" value="<?=$pay_info->full_attendance_pay?>" style="width:60px;"/></td>
<td height="25" class="td_bg"><input name="pass_time_pay" type="text" value="<?=$pay_info->pass_time_pay?>" style="width:60px;"/></td> <td height="25" class="td_bg"><input name="pass_time_pay" type="text" value="<?=$pay_info->pass_time_pay?>" style="width:60px;"/></td>
</tr> </tr>
</table> </table>
<div align="center"> <div align="center">
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/> <?php if($pay_info->status_id < 4 || $pay_info->status_id == 7): ?>
&nbsp;&nbsp; <input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
&nbsp;&nbsp;
<?php endif;?>
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> <input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
</div> </div>
</form> </form>
<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>
<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 type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script> <script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></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" src="/js/common2.js"></script>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
//操作历史
gotoPage('/personnel/ajax-history-index?pay_id=<?=$pay_info->id?>&page=1','car_history_list');
$(function () { $(function () {
//提交按钮 //提交按钮
$("#submit-btn").click(function(){ $("#submit-btn").click(function(){
@ -167,40 +163,4 @@
}); });
}) })
function tryPay(mySelf){
var myVal = new Number(mySelf.val());
var days = <?=$user_info->worktype->days?>;
var try_pay = new Number(myVal / days);
var formal_pay = new Number($('input[name="formal_pay"]').val());
if(try_pay == 0 || formal_pay == 0){
$('#submit-btn').hide();
alert('日均工资不能为零');
return;
}else{
$('#submit-btn').show();
}
var ht = '试用('+ try_pay.toFixed(2) +')';
$('.try_pay').html(ht);
}
function formalPay(mySelf) {
var myVal = new Number(mySelf.val());
var days = <?=$user_info->worktype->days?>;
var formal_pay = new Number(myVal / days);
var try_pay = new Number($('input[name="try_pay"]').val());
if(formal_pay == 0 || try_pay == 0){
$('#submit-btn').hide();
alert('工资不能为零');
return;
}else{
$('#submit-btn').show();
}
var ht = '转正('+ formal_pay.toFixed(2) +')';
$('.formal_pay').html(ht);
}
</script> </script>

@ -1,139 +1,203 @@
<?php <?php
use \common\libs\MyLib; use \common\libs\MyLib;
?> ?>
<?php $this->beginBlock('header_css'); ?> <script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> <script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<?php $this->endBlock(); ?> <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 = '/personnel/pay-info?id=' + id + '&pay_date=<?=$pay_date?>' + '&back_params=' + encodeURIComponent(params);
}
<div class="wrapper wrapper-content animated fadeInRight"> $(function(){
<div class="ibox float-e-margins"> $("#search-btn").click(function(){
<div class="ibox-title"> $('#page').val(0);
<h5>工资管理</h5> var params = $('#searchForm').serialize();
<div class="ibox-tools"> window.location.href = "/personnel/pay-list?" + params;
<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> 刷新 $("#searchForm").submit(function(){
</a> $("#search-btn").click();
</div> return false;
</div> });
<div class="ibox-content"> });
<form role="form" class="form-horizontal" onsubmit="return search();">
<div class="form-group">
<label class="col-sm-1 control-label">工号</label>
<div class="col-sm-2">
<input type="text" name="username" id="username" class="form-control">
</div>
<label class="col-sm-1 control-label">真实姓名</label>
<div class="col-sm-2">
<input type="text" name="name" id="name" class="form-control">
</div>
<label class="col-sm-1 control-label">工资月份</label>
<div class="col-sm-2">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" name="pay_date" id="pay_date" class="form-control" autocomplete="off" value="<?=$pay_date?>">
</div>
</div>
<div class="col-sm-2">
<div class="checkbox checkbox-inline">
<input type="checkbox" id="is_leave" name="is_leave" value="1">
<label for="is_leave"> 是否离职 </label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">分组</label>
<div class="col-sm-2">
<select name="group_id" id="group_id" class="form-control">
<option value="">全部</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'">'.$item->name.'</option>';
}
?>
</select>
</div>
<div class="col-sm-3">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<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_path">所属岗位</th>
<th data-field="real_pay">工资</th>
<th data-field="is_leave">是否离职</th>
<th data-formatter="opFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?> </script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> <!--<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">-->
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> <!-- <form id="theFrm">-->
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> <!-- <tr>-->
<script> <!-- <td align="center" width="100" height="25" class="bg_tr">日期</td>-->
var o = {}; <!-- <td class="td_bg">-->
function opFormatter(value, row, index) { <!-- <input type="text" name="time" onclick="WdatePicker({dateFmt:'yyyy-MM'})" />-->
var opStr = []; <!-- </td>-->
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); <!-- <td height="25" class="td_bg">-->
opStr.push('<i class="fa fa-edit" title="维护"></i>'); <!-- <input type="text" name="urlfile" id="urlfile" style="width: 300px;">-->
opStr.push('</a>'); <!-- <input id="fileupload" type="file" name="file">-->
return opStr.join(' '); <!-- </td>-->
} <!-- </tr>-->
function edit(id) { <!-- <tr>-->
var title = '编辑工资'; <!-- <td height="22" colspan="3" align="center" class="td_bg">-->
layer_show(title, '/personnel/pay-info?id=' + id); <!-- <input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>-->
} <!-- &nbsp;&nbsp;-->
<!-- <input type="button" class="ACT_btn" name="Submit3" value=" 刷新 " onclick="window.location.reload();">-->
<!-- </td>-->
<!-- </tr>-->
<!-- </form>-->
<!--</table>-->
<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="is_leave">
<option value="">全部</option>
<option value="1" <?= $is_leave == '1' ? 'selected' : ''?>></option>
<option value="0" <?= $is_leave == '0' ? 'selected' : ''?>></option>
</select>
公司:<select name="company_id">
<option value="0">全部</option>
<?php
foreach($company_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $company_id)
echo ' selected ';
echo '>'.$item->name.'</option>';
}
?>
</select>
分组:<select name="group_id">
<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>';
}
?>
</select>
状态:<select name="status_id">
<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="7" <?=$status_id == 7?'selected':''?>>退回</option>
function refreshList() { </select>
$('#listTable').bootstrapTable('refresh'); <input type="submit" class="act_btn" id="search-btn" name="search-btn" value="搜索">
} &nbsp;&nbsp;退回数量:<span style="color: red"><?=$return_count?></span>
</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<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 align="left" 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>
</tr>
<form id="delFrm">
<?php
foreach($items as $index => $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;
function search() {
$('.input-group.date').datepicker({
minViewMode: 1,
keyboardNavigation: false,
forceParse: false,
autoclose: true,
todayHighlight: true,
format: "yyyy-mm"
});
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/personnel/pay-list-json",
pagination: true,
sidePagination: 'server',
multipleSelectRow: true,
queryParams: function(params) {
o['username'] = $('#username').val();
o['name'] = $('#name').val();
o['pay_date'] = $('#pay_date').val();
o['is_leave'] = $('#is_leave').prop("checked");
o['group_id'] = $('#group_id').val();
o['limit'] = params['limit'];
o['offset'] = params['offset'];
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($real_pay,2)?>
</td>
<td align="center" class="td_bg" nowrap><?=$item->is_leave?'是':''?></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() { </td>
search(); <td align="center" class="td_bg" nowrap>
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">详情</a>]
</td>
</tr>
<?php
}
?>
</form>
<tr >
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
</tr>
</table>
<script type="text/javascript" language="javascript" src="/js/common2.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script>
<script type="text/javascript">
//上传文件
$('#fileupload').fileupload({
url: '/personnel/upload',
dataType: 'json',
done: function (e, data) {
var file_info = data.result.files[0];
$('#urlfile').val(file_info.url);
$('#submit-btn').removeAttr('disabled');
}
}); });
//提交
$('#submit-btn').click(function(){
if(confirm('是否确认提交?')){
var file_path = $('#urlfile').val();
var time = $("input[name='time']").val();
if(file_path == ''){
alert('请先选择文件!');
return;
}
if(time == ''){
alert('请选择时间!');
return;
}
var params = $('#theFrm').serialize();
$.post('/personnel/import', params, function(obj){
alert(obj.msg);
});
}
});
mySearch('username', 'search-btn');
mySearch('name', 'search-btn');
</script> </script>
<?php $this->endBlock(); ?>

@ -0,0 +1,15 @@
.mb-8 {
margin-bottom: 8px;
}
.mr-8 {
margin-right: 8px;
}
.mt-8 {
margin-top: 8px;
}
.ml-8 {
margin-left: 8px;
}
.m-8 {
margin: 8px;
}
Loading…
Cancel
Save