发票删除bug修正

This commit is contained in:
hdm 2022-07-20 23:30:09 +08:00
parent 8aac6c2b50
commit e53a5098f8
3 changed files with 26 additions and 21 deletions

View File

@ -118,6 +118,7 @@ class Invoice extends BaseController
$where[] = ['i.create_time', 'between', [$start_time, $end_time]];
}
$where[] = ['i.admin_id','=',$this->uid];
$where[] = ['i.status','=',1];
$list = $this->get_list($where,$param);
return table_assign(0, '', $list);
} else {
@ -136,7 +137,9 @@ class Invoice extends BaseController
$map1 = [];
$map2 = [];
$map1[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',i.check_admin_ids)")];
$map1[] = ['i.status','=',1];
$map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',i.flow_admin_ids)")];
$map2[] = ['i.status','=',1];
if($status == 0){
$list = $this->get_list([$map1,$map2],$param,'or');
@ -164,10 +167,11 @@ class Invoice extends BaseController
$start_time = !empty($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0;
$end_time = !empty($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0;
if ($start_time > 0 && $end_time > 0) {
$where[] = ['expense_time', 'between', [$start_time, $end_time]];
$where[] = ['i.expense_time', 'between', [$start_time, $end_time]];
}
$map[] = ['check_status', '=', 2];
$map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',copy_uids)")];
$map[] = ['i.status','=',1];
$map[] = ['i.check_status', '=', 2];
$map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',i.copy_uids)")];
$expense = $this->get_list($map, $param);
return table_assign(0, '', $expense);
} else {
@ -193,6 +197,7 @@ class Invoice extends BaseController
if ($start_time > 0 && $end_time > 0) {
$where[] = ['i.create_time', 'between', [$start_time, $end_time]];
}
$where[] = ['i.status','=',1];
$list = $this->get_list($where,$param);
return table_assign(0, '', $list);
} else {
@ -598,7 +603,7 @@ class Invoice extends BaseController
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$param['check_admin_ids'] ='';
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids,check_remark')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -633,7 +638,7 @@ class Invoice extends BaseController
$param['check_status'] = 4;
$param['check_admin_ids'] ='';
$param['check_step_sort'] =0;
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids,check_remark')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -642,7 +647,7 @@ class Invoice extends BaseController
'type' => 3,
'check_time' => time(),
'status' => $param['status'],
'content' => $param['content'],
'content' => $param['check_remark'],
'create_time' => time()
);
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);

View File

@ -60,21 +60,21 @@
</td>
<td class="layui-td-gray">开票抬头<font>*</font></td>
<td><input type="text" name="invoice_title" class="layui-input" value="" lay-verify="required" lay-reqText="请输入开票抬头"></td>
<td class="layui-td-gray">电话号码<font>*</font></td>
<td><input type="text" name="invoice_phone" class="layui-input" value="" lay-verify="required" lay-reqText="请输入电话号码"></td>
<td class="layui-td-gray">电话号码</td>
<td><input type="text" name="invoice_phone" class="layui-input" value=""></td>
</tr>
<tr class="invoice-type">
<td class="layui-td-gray-2">纳税人识别号<font>*</font></td>
<td class="layui-td-gray-2">纳税人识别号</td>
<td><input type="text" name="invoice_tax" class="layui-input" value=""></td>
<td class="layui-td-gray">开户行<font>*</font></td>
<td class="layui-td-gray">开户行</td>
<td><input type="text" name="invoice_bank" class="layui-input" value=""></td>
<td class="layui-td-gray">银行账号<font>*</font></td>
<td class="layui-td-gray">银行账号</td>
<td><input type="text" name="invoice_account" class="layui-input" value=""></td>
</tr>
<tr class="invoice-type">
<td class="layui-td-gray-2">银行营业网点<font>*</font></td>
<td class="layui-td-gray-2">银行营业网点</td>
<td><input type="text" name="invoice_banking" class="layui-input" value=""></td>
<td class="layui-td-gray">地址<font>*</font></td>
<td class="layui-td-gray">地址</td>
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value=""></td>
</tr>
<tr>
@ -147,21 +147,21 @@
</td>
<td class="layui-td-gray">开票抬头<font>*</font></td>
<td><input type="text" name="invoice_title" class="layui-input" value="{$detail.invoice_title}"></td>
<td class="layui-td-gray">电话号码<font>*</font></td>
<td class="layui-td-gray">电话号码</td>
<td><input type="text" name="invoice_phone" class="layui-input" value="{$detail.invoice_phone}"></td>
</tr>
<tr class="invoice-type" {eq name="$detail.type" value="2"}style="display:none"{/eq}>
<td class="layui-td-gray-2">纳税人识别号<font>*</font></td>
<td class="layui-td-gray-2">纳税人识别号</td>
<td><input type="text" name="invoice_tax" class="layui-input" value="{$detail.invoice_tax}"></td>
<td class="layui-td-gray">开户行<font>*</font></td>
<td class="layui-td-gray">开户行</td>
<td><input type="text" name="invoice_bank" class="layui-input" value="{$detail.invoice_bank}"></td>
<td class="layui-td-gray">银行账号<font>*</font></td>
<td class="layui-td-gray">银行账号</td>
<td><input type="text" name="invoice_account" class="layui-input" value="{$detail.invoice_account}"></td>
</tr>
<tr class="invoice-type" {eq name="$detail.type" value="2"}style="display:none"{/eq}>
<td class="layui-td-gray-2">银行营业网点<font>*</font></td>
<td class="layui-td-gray-2">银行营业网点</td>
<td><input type="text" name="invoice_banking" class="layui-input" value="{$detail.invoice_banking}"></td>
<td class="layui-td-gray">地址<font>*</font></td>
<td class="layui-td-gray">地址</td>
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value="{$detail.invoice_address}"></td>
</tr>
<tr>

View File

@ -445,7 +445,7 @@ const moduleInit = ['tool','employeepicker'];
check_node:check_node,
check_admin_ids:check_admin_ids,
status:check_status,
content:content
check_remark:content
},
success: function (e) {
layer.msg(e.msg);
@ -470,7 +470,7 @@ const moduleInit = ['tool','employeepicker'];
data:{
id:id,
status:check_status,
content:value
check_remark:value
},
success: function (e) {
layer.msg(e.msg);