fix: 1.后台工资统计 30% 2.离职变更状态完善
							parent
							
								
									c5548e7c92
								
							
						
					
					
						commit
						36a61f46b6
					
				| 
						 | 
				
			
			@ -792,6 +792,7 @@ class Manager extends Base
 | 
			
		|||
            Account::whereIn('id', $accountIds)->where('role', Account::ROLE_WORKER)->update([
 | 
			
		||||
                'role'        => Account::ROLE_NORMAL,
 | 
			
		||||
                'worksite_id' => Account::COMMON_OFF,
 | 
			
		||||
                'checking'    => Account::COMMON_OFF,
 | 
			
		||||
            ]);
 | 
			
		||||
            return $this->json();
 | 
			
		||||
        } catch (Exception $e) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,12 +74,13 @@ class Pay extends Base
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        $all = PayMonthLog::where('account_id', $info['account_id'])->where('time', $info['time'])
 | 
			
		||||
            ->fieldRaw('sum(amount) as amount,sum(base_amount) as base_amount,sum(overtime_amount) as overtime_amount')
 | 
			
		||||
            ->fieldRaw('sum(amount) as amount,sum(base_amount) as base_amount,sum(overtime_amount) as overtime_amount,sum(paid_amount) as paid_amount')
 | 
			
		||||
            ->find();
 | 
			
		||||
 | 
			
		||||
        $info['amount']          = $all['amount'];
 | 
			
		||||
        $info['base_amount']     = $all['base_amount'];
 | 
			
		||||
        $info['overtime_amount'] = $all['overtime_amount'];
 | 
			
		||||
        $info['paid_amount']     = $all['paid_amount'];
 | 
			
		||||
 | 
			
		||||
        if ($this->request->isPost()) {
 | 
			
		||||
            $item     = input('post.');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,8 +45,8 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
 | 
			
		|||
            page: true,
 | 
			
		||||
            cols: [[
 | 
			
		||||
                {type: 'checkbox'},
 | 
			
		||||
                {field: 'id', minWidth: 80, title: '用户ID'},
 | 
			
		||||
                {field: 'time_text', minWidth: 120, title: '月份'},
 | 
			
		||||
                {field: 'id', minWidth: 80, title: '记录ID'},
 | 
			
		||||
                {field: 'time_text', minWidth: 120, title: '时间'},
 | 
			
		||||
                {field: 'nickname', minWidth: 80, title: '昵称'},
 | 
			
		||||
                {field: 'real_name', minWidth: 100, title: '姓名'},
 | 
			
		||||
                {field: 'mobile', minWidth: 120, title: '电话'},
 | 
			
		||||
| 
						 | 
				
			
			@ -279,8 +279,8 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
 | 
			
		|||
            page: false,
 | 
			
		||||
            cols: [[
 | 
			
		||||
                {type: 'checkbox'},
 | 
			
		||||
                {field: 'id', minWidth: 80, title: '用户ID'},
 | 
			
		||||
                {field: 'time_text', minWidth: 120, title: '月份'},
 | 
			
		||||
                {field: 'id', minWidth: 80, title: '记录ID'},
 | 
			
		||||
                {field: 'time_text', minWidth: 120, title: '时间'},
 | 
			
		||||
                {field: 'nickname', minWidth: 80, title: '昵称'},
 | 
			
		||||
                // {field: 'real_name', minWidth: 100, title: '姓名'},
 | 
			
		||||
                // {field: 'mobile', minWidth: 120, title: '电话'},
 | 
			
		||||
| 
						 | 
				
			
			@ -289,6 +289,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
 | 
			
		|||
                {field: 'amount', minWidth: 100, title: '总计'},
 | 
			
		||||
                {field: 'base_amount', minWidth: 100, title: '基本工资'},
 | 
			
		||||
                {field: 'overtime_amount', minWidth: 100, title: '加班工资'},
 | 
			
		||||
                {field: 'paid_amount', minWidth: 100, title: '已发工资'},
 | 
			
		||||
                {field: 'status_text', minWidth: 100, title: '状态'},
 | 
			
		||||
            ]],
 | 
			
		||||
            done: function () {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,8 +33,10 @@
 | 
			
		|||
            <div class="layui-form-item">
 | 
			
		||||
                <label class="layui-form-label">状态</label>
 | 
			
		||||
                <div class="layui-input-block">
 | 
			
		||||
                    <input type="radio" name="status" value="0" title="待发放" {if $item.status == '0'} checked {/if}>
 | 
			
		||||
                    <input type="radio" name="status" value="1" title="已发放" {if $item.status == '1'} checked {/if}>
 | 
			
		||||
<!--                    <input type="radio" name="status" value="0" title="待发放" {if $item.status == '0'} checked {/if}>-->
 | 
			
		||||
<!--                    <input type="radio" name="status" value="1" title="全部发放" {if $item.status == '1'} checked {/if}>-->
 | 
			
		||||
<!--                    <input type="radio" name="status" value="2" title="部分发放" {if $item.status == '2'} checked {/if}>-->
 | 
			
		||||
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -43,7 +45,8 @@
 | 
			
		|||
            <div class="layui-form-item" style="margin-bottom: -20px;">
 | 
			
		||||
                <label class="layui-form-label"></label>
 | 
			
		||||
                <div class="layui-input-block">
 | 
			
		||||
                    <h3>{$item.time} 总计:{$item.amount} 基本工资:{$item.base_amount} 加班工资:{$item.overtime_amount}</h3>
 | 
			
		||||
                    <h3>【时间:{$item.time}】 【总计:{$item.amount}】 【基本工资:{$item.base_amount}】 【加班工资:{$item.overtime_amount}】 【已发工资:{$item.paid_amount}】</h3>
 | 
			
		||||
                    <h4 style="color: red"> 注:下列每条数据为工人在不同工地工作的工资,外层的工资列表是工人所有工地工资的汇总</h4>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue