Commit fd91f39a by 叶明星

Merge branch 'ymx-账期管理-2018091009' into development

parents c56dd8ca 4164ebaf
...@@ -16,11 +16,11 @@ class PaymentDaysModel extends Model ...@@ -16,11 +16,11 @@ class PaymentDaysModel extends Model
$collert=Request::only('user_id','ac_id','status','limit','p','Export'); $collert=Request::only('user_id','ac_id','status','limit','p','Export');
$limit=!empty($collert['limit'])?$collert['limit']:10; $limit=!empty($collert['limit'])?$collert['limit']:10;
$p=!empty($collert['p'])?$collert['p']:1; $p=!empty($collert['p'])?$collert['p']:1;
$Select=['id','lie_payment_days.user_id','add_time','com_name','lie_payment_days.mobile','ac_id','lie_payment_days.status','lie_user_main.mobile as usmobile','email']; $Select=['id','auth_cause','lie_payment_days.user_id','add_time','com_name','lie_payment_days.mobile','ac_id','lie_payment_days.status','lie_user_main.mobile as usmobile','email'];
$list=$this->where(function($query) use ($collert){ $list=$this->where(function($query) use ($collert){
if(!empty($collert['ac_id'])) $query->where('ac_id','=',$collert['ac_id']); if(!empty($collert['ac_id'])) $query->where('ac_id','=',$collert['ac_id']);
if(!empty($collert['status'])) $query->whereIn('lie_payment_days.status',explode(',',rtrim($collert['status'],','))); if(!empty($collert['status'])) $query->whereIn('lie_payment_days.status',explode(',',rtrim($collert['status'],',')));
})->leftJoin('lie_user_main',function($join) use($collert){ })->join('lie_user_main',function($join) use($collert){
if(!empty($collert['user_id'])){ if(!empty($collert['user_id'])){
$join->on('lie_payment_days.user_id','=','lie_user_main.user_id') $join->on('lie_payment_days.user_id','=','lie_user_main.user_id')
->where('lie_user_main.mobile','=',$collert['user_id'])->orWhere('lie_user_main.email','=',$collert['user_id']); ->where('lie_user_main.mobile','=',$collert['user_id'])->orWhere('lie_user_main.email','=',$collert['user_id']);
...@@ -51,7 +51,7 @@ class PaymentDaysModel extends Model ...@@ -51,7 +51,7 @@ class PaymentDaysModel extends Model
$collert=Request::only('id'); $collert=Request::only('id');
$Select=['lie_payment_days.id','lie_payment_days.status','lie_payment_days.com_name','lie_payment_days.user_id','lie_payment_days.mobile','add_time', $Select=['lie_payment_days.id','lie_payment_days.status','lie_payment_days.com_name','lie_payment_days.user_id','lie_payment_days.mobile','add_time',
'lie_user_main.mobile as usmobile','email','company_id','com_telphone','tax_no','bank_name','com_area_id','com_address', 'lie_user_main.mobile as usmobile','email','company_id','com_telphone','tax_no','bank_name','com_area_id','com_address',
'com_city_id','com_province_id']; 'com_city_id','com_province_id','auth_cause'];
$info=$this->where('id','=',$collert['id']) $info=$this->where('id','=',$collert['id'])
->leftJoin('lie_user_main','lie_payment_days.user_id','=','lie_user_main.user_id') ->leftJoin('lie_user_main','lie_payment_days.user_id','=','lie_user_main.user_id')
->leftJoin('lie_user_company','lie_user_main.company_id','=','lie_user_company.com_id') ->leftJoin('lie_user_company','lie_user_main.company_id','=','lie_user_company.com_id')
...@@ -66,9 +66,9 @@ class PaymentDaysModel extends Model ...@@ -66,9 +66,9 @@ class PaymentDaysModel extends Model
} }
public function ApiAuthPaymentDays($AdminId){ public function ApiAuthPaymentDays($AdminId){
$collert=Request::only('id','status'); $collert=Request::only('id','status','auth_cause');
if(empty($collert['id']) || empty($collert['status'])) return [10002,'审核失败']; if(empty($collert['id']) || empty($collert['status'])) return [10002,'审核失败'];
$result=$this->where('id','=',$collert['id'])->update(['status'=>$collert['status'],'auth_id'=>$AdminId,'update_time'=>time()]); $result=$this->where('id','=',$collert['id'])->update(['auth_cause'=>$collert['auth_cause'],'status'=>$collert['status'],'auth_id'=>$AdminId,'update_time'=>time()]);
if(!$result) return [10001,'审核失败']; if(!$result) return [10001,'审核失败'];
return [0,'审核成功']; return [0,'审核成功'];
} }
......
...@@ -5,7 +5,9 @@ layui.use('form', function() { ...@@ -5,7 +5,9 @@ layui.use('form', function() {
var form=layui.form; var form=layui.form;
form.on('submit(load)', function(data) { form.on('submit(load)', function(data) {
layer.prompt({formType: 2,maxlength:100,title:'填写原因'},function(val, index){ layer.prompt({formType: 2,maxlength:100,title:'填写原因'},function(val, index){
if(!val) layer.msg('请填写原因',{icon:5}); if(!val) {
return layer.msg('请填写原因',{icon:5});
}
layer.msg('提交中', { layer.msg('提交中', {
icon: 16 icon: 16
,shade: 0.01 ,shade: 0.01
......
...@@ -28,6 +28,7 @@ layui.use(['table','form','laydate','layer'], function() { ...@@ -28,6 +28,7 @@ layui.use(['table','form','laydate','layer'], function() {
,{field:'ac_id', title: '活动ID'} ,{field:'ac_id', title: '活动ID'}
,{field:'add_time', title: '申请时间',templet:'#add_time'} ,{field:'add_time', title: '申请时间',templet:'#add_time'}
,{field:'status', title: '申请状态',templet:'#status'} ,{field:'status', title: '申请状态',templet:'#status'}
,{field:'auth_cause', title: '原因'}
,{field:'experience', title: '操作',templet:'#edit',fixed:'right'} ,{field:'experience', title: '操作',templet:'#edit',fixed:'right'}
]] ]]
,id:'list' ,id:'list'
......
...@@ -70,19 +70,26 @@ ...@@ -70,19 +70,26 @@
</tbody> </tbody>
</table> </table>
</fieldset> </fieldset>
@if($info['status']==1) <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;padding-bottom: 200px">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>审核</legend> <legend>审核</legend>
<input type="hidden" name="id" value="{{$info['id'] or ''}}"> <input type="hidden" name="id" value="{{$info['id'] or ''}}">
<div class="layui-form-item"> <div class="layui-form-item" style="margin-top: 20px">
<div class="layui-input-block"> <div class="layui-input-inline" style="width: auto">
<input type="radio" lay-verify="required" name="status" value="2" title="审核通过" checked> <label class="layui-form-label">审核结果:</label>
<input type="radio" lay-verify="required" name="status" value="3" title="审核不通过"> <input type="radio" lay-verify="required" name="status" value="2" title="审核通过" @if($info['status']==1 || $info['status']==2) checked @endif @if($info['status']!=1) disabled @endif>
</div> <input type="radio" lay-verify="required" name="status" value="3" title="审核不通过" @if($info['status']==3) checked @endif @if($info['status']!=1) disabled @endif>
<div class="layui-input-block" style="text-align: center">
<button class="layui-btn" lay-submit lay-filter="load">立即提交</button>
</div> </div>
@if($info['status']==1)
{{--<div class="layui-input-block" style="text-align: center">--}}
{{--<button class="layui-btn" lay-submit lay-filter="load">立即提交</button>--}}
{{--</div>--}}
@else
<div class="layui-input-inline" style="width: auto">
<label class="layui-form-label">审核原因:</label>
<div class="layui-form-mid">{{$info['auth_cause'] or ''}}</div>
</div>
@endif
</div> </div>
</fieldset> </fieldset>
@endif
</div> </div>
\ No newline at end of file
...@@ -52,5 +52,5 @@ ...@@ -52,5 +52,5 @@
@{{# if(d.usmobile){ }} @{{ d.usmobile }} @{{# }else{ }} @{{ d.email }} @{{# } }} @{{# if(d.usmobile){ }} @{{ d.usmobile }} @{{# }else{ }} @{{ d.email }} @{{# } }}
</script> </script>
<script type="text/html" id="add_time"> <script type="text/html" id="add_time">
@{{ date('Y-m-d H:i',1539072714)}} @{{ date('Y-m-d H:i',d.add_time)}}
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment