办公审批、发票审批、报销审批流程错误bug,添加工作记录时工作类型必选修改

This commit is contained in:
hdm 2022-03-02 09:59:52 +08:00
parent 7876175bb4
commit a1a9803977
5 changed files with 48 additions and 25 deletions

View File

@ -71,9 +71,9 @@ class Expense extends BaseController
$expense['create_user'] = Db::name('Admin')->where(['id' => $expense['admin_id']])->value('name');
$expense['department'] = Db::name('Department')->where(['id' => $expense['did']])->value('title');
$expense['amount'] = Db::name('ExpenseInterfix')->where(['exid' => $expense['id']])->sum('amount');
$expense['pay_admin'] = Db::name('Admin')->where(['id' => $expense['pay_admin_id']])->value('name');
if ($expense['pay_time'] > 0) {
$expense['pay_time'] = date('Y-m-d H:i:s', $expense['pay_time']);
$expense['pay_admin'] = Db::name('Admin')->where(['id' => $expense['pay_admin_id']])->value('name');
}
else{
$expense['pay_time'] = '-';
@ -621,6 +621,7 @@ class Expense extends BaseController
{
$param = get_params();
if (request()->isAjax()) {
//打款,数据操作
$param['check_status'] = 5;
$param['pay_admin_id'] = $this->uid;
$param['pay_time'] = time();

View File

@ -105,9 +105,10 @@
<td class="layui-td-gray">审核状态</td>
<td>{eq name="$detail.check_status" value="0"}<span style="color:#666666">待审批</span>{/eq}
{eq name="$detail.check_status" value="1"}<span style="color:#4285f4">审批中</span>{/eq}
{eq name="$detail.check_status" value="2"}<span style="color:#34a853">已通过</span>{/eq}
{eq name="$detail.check_status" value="2"}<span style="color:#34a853">已通过,待打款</span>{/eq}
{eq name="$detail.check_status" value="3"}<span style="color:#FF5722">已拒绝</span>{/eq}
{eq name="$detail.check_status" value="4"}<span style="color:#fbbc05">已撤销</span>{/eq}
{eq name="$detail.check_status" value="5"}<span style="color:#34a853">已通过</span>{/eq}
<span id="showRecord" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-normal" style="margin-left:10px;">查看审批记录</span>
</td>
<td class="layui-td-gray">当前审核人</td>
@ -148,19 +149,33 @@
</td>
</tr>
{/if}
{if ( $detail.check_status eq 5)}
<tr>
<td class="layui-td-gray">报销状态</td>
<td><span style="color:#34a853">已打款</span></td>
<td class="layui-td-gray">打款人</td>
<td>{$detail.pay_admin}</td>
<td class="layui-td-gray">打款时间</td>
<td>{$detail.pay_time}</td>
</tr>
{/if}
</table>
<input type="hidden" name="id" value="{$detail.id}">
<input type="hidden" name="flow_type" value="{$flows.flow_type}">
<div id="formBtn" style="padding: 10px 0">
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) }
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
<div id="formBtn" style="padding: 10px 0">
{if ( $detail.check_status lt 2)}
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{eq name="$is_create_admin" value='1'}
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
{/eq}
{/if}
{if ( $detail.check_status gt 2) AND ( $is_create_admin eq 1) }
<a class="layui-btn" href="/finance/expense/add?id={$detail.id}">重新编辑</a>
{if ( $detail.check_status eq 3) OR ( $detail.check_status eq 4 ) }
{eq name="$is_create_admin" value='1'}
<a class="layui-btn" href="/finance/expense/add?id={$detail.id}">重新编辑</a>
{/eq}
{/if}
</div>
{/block}

View File

@ -180,15 +180,19 @@
<input type="hidden" name="id" value="{$detail.id}">
<input type="hidden" name="flow_type" value="{$flows.flow_type}">
<div id="formBtn" style="padding: 10px 0">
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) }
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
{if ( $detail.check_status lt 2)}
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{eq name="$is_create_admin" value='1'}
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
{/eq}
{/if}
{if ( $detail.check_status eq 4) AND ( $is_create_admin eq 1) }
<a class="layui-btn" href="/finance/invoice/add?id={$detail.id}">重新编辑</a>
{if ( $detail.check_status eq 3) OR ( $detail.check_status eq 4 ) }
{eq name="$is_create_admin" value='1'}
<a class="layui-btn" href="/finance/invoice/add?id={$detail.id}">重新编辑</a>
{/eq}
{/if}
</div>
</div>

View File

@ -48,12 +48,14 @@
<input type="hidden" name="id" value="{$detail.id}">
<input type="hidden" name="flow_type" value="{$flows.flow_type}">
<div id="formBtn" style="padding: 10px 0">
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) }
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
{if ( $detail.check_status lt 2)}
{eq name="$is_check_admin" value='1'}
<span class="layui-btn layui-btn-normal" data-status="1"><i class="layui-icon layui-icon-ok"></i> 通过</span>
<span class="layui-btn layui-btn-danger" data-status="2"><i class="layui-icon layui-icon-close"></i> 拒绝</span>
{/eq}
{eq name="$is_create_admin" value='1'}
<span class="layui-btn layui-btn-primary" data-status="3"><i class="layui-icon layui-icon-reduce-circle"></i> 撤回</span>
{/eq}
{/if}
{if ( $detail.check_status gt 2) AND ( $is_create_admin eq 1) }
<a class="layui-btn" href="/oa/approve/add?id={$detail.id}">重新编辑</a>

View File

@ -350,6 +350,7 @@ user-select: none;}
var detail={};
detail['id']=0;
detail['title']='';
detail['labor_type']=0;
detail['start_time_a']=dateStr;
detail['end_time_a']=dateStr;
detail['start_time_b']='08:30';