314 lines
19 KiB
PHP
Executable File
314 lines
19 KiB
PHP
Executable File
<?php
|
||
use yii\helpers\Html;
|
||
use yii\helpers\Url;
|
||
use yii\widgets\LinkPager;
|
||
?>
|
||
|
||
<!--下拉选择、选项框-->
|
||
<?=Html::cssFile('@web/css/plugins/chosen/chosen.css')?>
|
||
<?=Html::jsFile('@web/js/plugins/chosen/chosen.jquery.js')?>
|
||
<style>
|
||
.table-border > td{
|
||
border:1px #bbb solid;
|
||
}
|
||
.table-border{
|
||
border:1px solid #ddd;
|
||
}
|
||
</style>
|
||
<!--日期时间选择器-->
|
||
<?=Html::jsFile('@web/js/plugins/layer/laydate/laydate.js')?>
|
||
<?=Html::cssFile('@web/js/plugins/layer/laydate/need/laydate.css')?>
|
||
<?=Html::cssFile('@web/js/plugins/layer/laydate/skins/molv/laydate.css')?>
|
||
<style>
|
||
.laydate_body .laydate_top{
|
||
padding:0;
|
||
}
|
||
.laydate_body .laydate_ym{
|
||
/*margin:0;
|
||
padding:5px;*/
|
||
}
|
||
.laydate_body .laydate_table{
|
||
border:0;
|
||
border-bottom: 1px solid rgb(204, 204, 204);
|
||
}
|
||
.laydate_body .laydate_bottom {
|
||
border: 0;
|
||
margin-bottom: 10px;
|
||
}
|
||
</style>
|
||
|
||
<div class="wrapper wrapper-content">
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<div class="ibox float-e-margins">
|
||
<div class="ibox-title"><h5>原单据的关联冲红申请</h5> <span class="pull-right">费用单当前金额为: <code><?=isset($detail['money1'])?$detail['money1']:0;?></code><kbd>元</kbd> <code><?=isset($detail['money2'])?$detail['money2']:0;?></code><kbd>角</kbd> <code><?=isset($detail['money3'])?$detail['money3']:0;?></code><kbd>分</kbd></span></div>
|
||
<div class="ibox-content">
|
||
<div class="table-responsive">
|
||
<table class="table table-striped">
|
||
<thead>
|
||
<tr>
|
||
<th>序号</th>
|
||
<th>冲红金额</th>
|
||
<th>备注</th>
|
||
<th>状态</th>
|
||
<th>操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<?php foreach($list as $vo):?>
|
||
<tr>
|
||
<td><?=$vo['id']?></td>
|
||
<td>
|
||
<?php if(isset($vo['fee']) && $vo['fee']<0){ ?>
|
||
<label class="label label-danger"><stron><large><?=isset($vo['fee']) ? round($vo['fee']/100,2):0?></large></stron></label> 元<br>
|
||
<?php }else{?>
|
||
<label class="label label-success"><stron><large><?=isset($vo['fee']) ? round($vo['fee']/100,2):0?></large></stron></label> 元<br>
|
||
<?php }?>
|
||
</td>
|
||
<td>
|
||
<?=$vo['logs']?>
|
||
</td>
|
||
<td>
|
||
<?php if($vo['status_code']<=0){?>
|
||
<label class="btn btn-default btn-xs"><?=$status[$vo['status_code']]?></label>
|
||
<?php }else{?>
|
||
<label class="btn btn-info btn-xs"><?=$status[$vo['status_code']]?></label>
|
||
<?php }?>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<a class="btn btn-danger btn-xs" href="<?=Url::toRoute(['feeorder/delete','id'=>$vo['id']])?>" mini="act"><i class="fa fa-trash"></i> 删除</a>
|
||
<a class="btn btn-success btn-xs" href="<?=Url::toRoute(['feeorder/caiwu','id'=>$vo['id']])?>" w="70%;" h="80%;" title="财务审核" mini="load">财务审核</a>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<?php endforeach;?>
|
||
<tr>
|
||
<td>
|
||
原单据总被冲红金额为:<code><?=isset($detail['totalCh'])?round($detail['totalCh']/100,2):0;?></code><kbd>元</kbd>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="ibox-title">
|
||
<h5>新增费用单冲红<code>请仔细核对填写内容,避免出错!</code></h5>
|
||
<div class="ibox-tools">
|
||
<a class="collapse-link">
|
||
<i class="fa fa-chevron-up"></i>
|
||
</a>
|
||
<a class="close-link">
|
||
<i class="fa fa-times"></i>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
<div class="ibox-content">
|
||
<form role="form" class="form-horizontal m-t" method="post" action="<?=Url::toRoute('feeorder/chonghongsave')?>" >
|
||
<input type="hidden" name="_csrf-backend" value="<?=Yii::$app->getRequest()->getCsrfToken();?>" />
|
||
<input type="hidden" name="chonghong_id" value="<?=isset($detail['chonghong_id'])?$detail['chonghong_id']:0;?>">
|
||
|
||
<div class="alert alert-warning">
|
||
所有费用明细单一经财务确认(不管是否入账),均不能再被修改;请认真检查后再提交
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label"><span class="red">*</span> 支付人:</label>
|
||
<div class="col-sm-3">
|
||
<input class="form-control" type="text" name="pay_from" placeholder="请输入支付方的名称" autocomplete="off" value="<?=isset($detail['pay_from'])?$detail['pay_from']:'';?>" readonly disabled="disabled">
|
||
<span class="help-block m-b-none">(限10个汉字以内)</span>
|
||
</div>
|
||
|
||
<label class="col-sm-1 control-label"><span class="red">*</span> 收款人:</label>
|
||
<div class="col-sm-3">
|
||
<input class="form-control" type="text" name="pay_to" placeholder="请输入收款人的姓名" autocomplete="off" value="<?=isset($detail['pay_to'])?$detail['pay_to']:'';?>" readonly disabled="disabled">
|
||
<span class="help-block m-b-none">(限10个汉字以内)</span>
|
||
</div>
|
||
|
||
<label class="col-sm-1 control-label"><span class="red">*</span> 付款日期:</label>
|
||
<div class="col-sm-3">
|
||
<input class="form-control layer-date" type="text" name="pay_at" placeholder="请选择日期" autocomplete="off" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})" value="<?=isset($detail['pay_at'])?date('Y-m-d',$detail['pay_at']):''?>" readonly disabled="disabled">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label">支付信息:</label>
|
||
<div class="col-sm-5">
|
||
<div class="input-group">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-primary">付款方式</button>
|
||
</span>
|
||
<select data-placeholder="选择..." class="form-control chosen-select" name="paytype" readonly disabled="disabled">
|
||
<option value="">请选择</option>
|
||
<?php foreach($paytypes as $key=>$val){?>
|
||
<option value="<?=$key?>" hassubinfo="true" <?=isset($detail['paytype']) && $detail['paytype']==$key ? 'selected':'';?>><?=$val?></option>
|
||
<?php }?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-sm-6">
|
||
<div class="input-group">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-primary">流水号</button>
|
||
</span>
|
||
<input class="form-control" type="text" name="sn" placeholder="如有,请填写,便于财务核实" autocomplete="off" value="<?=isset($detail['sn'])?$detail['sn']:'';?>" readonly disabled="disabled">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label"></label>
|
||
<div class="col-sm-7">
|
||
<div class="input-group">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-primary"><span class="red">*</span> ¥冲红金额</button>
|
||
</span>
|
||
<?php if(isset($detail['fee'])){?>
|
||
<?php if($detail['fee']<0){?>
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-danger">支出</button>
|
||
</span>
|
||
<?php }elseif($detail['fee']>0){?>
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-success">收入</button>
|
||
</span>
|
||
<?php }}?>
|
||
<input class="form-control" type="number" name="money1" id="money1" autocomplete="off" value="<?=isset($detail['money1'])?$detail['money1']:0;?>" style="text-align: right;">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-default">元</button>
|
||
</span>
|
||
<input class="form-control" type="number" name="money2" id="money2" autocomplete="off" value="<?=isset($detail['money2'])?$detail['money2']:0;?>" style="text-align: right;">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-default">角</button>
|
||
</span>
|
||
<input class="form-control" type="number" name="money3" id="money3" autocomplete="off" value="<?=isset($detail['money3'])?$detail['money3']:0;?>" style="text-align: right;">
|
||
<span class="input-group-btn">
|
||
<button type="button" class="btn btn-default">分</button>
|
||
</span>
|
||
</div>
|
||
<span class="help-block m-b-none">此处填写的是冲红的金额,如原费用为100元,实际上只用了90元,那么冲红金额为10元;原费用单金额为 <code><?=isset($detail['money1'])?$detail['money1']:0;?></code><kbd>元</kbd> <code><?=isset($detail['money2'])?$detail['money2']:0;?></code><kbd>角</kbd> <code><?=isset($detail['money3'])?$detail['money3']:0;?></code><kbd>分</kbd></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label"> 关联凭证截图:</label>
|
||
<div class="col-sm-11">
|
||
<div class="input-group">
|
||
<input type="text" class="form-control" value="" readonly="true" id="thumbs" data-length="<?=isset($detail['thumbs'])? count($detail['thumbs']) : 0?>">
|
||
<span class="input-group-btn"> <button type="button" class="btn btn-primary" data-id="thumbs-value" href="<?= Url::toRoute(['upload/images','multi'=>true,'callback'=>'thumbs']);?>" w="80%;" h="90%;" title="选择或上传图片" mini="load">选择图片</button> </span>
|
||
</div>
|
||
<section id="thumbs-PREVIEWER" style="display: inline-flex;overflow-x: scroll;">
|
||
|
||
</section>
|
||
</div>
|
||
</div>
|
||
<script type="text/javascript" >
|
||
//响应多图点选事件
|
||
function selectImages(imgs,targId){
|
||
layer.closeAll();
|
||
layer.msg('操作成功!');
|
||
targId = !targId ? 'thumbs' : targId;
|
||
var html = '',_html = '',x;
|
||
for(x in imgs){
|
||
_html = '<div onclick="deleteImg(this);" style="width:150px;max-height:200px;margin-right:30px;">'+
|
||
'<div class="input-group " style="margin-top:.5em;">'+
|
||
'<img class="imagePreview '+ targId +'-PREVIEWER" src="<?=Yii::$app->params['attachSrc'].Yii::$app->params['attachDir']?>'+imgs[x]+'" width="150" height="auto" onerror="javascript:this.src=\'<?=Yii::getAlias("@web")?>/img/nopic.jpg\';" style="margin-right:10px;">'+
|
||
'<em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>'+
|
||
'<input type="hidden" name="'+targId+'[]" value="'+imgs[x]+'">'+
|
||
'</div></div>';
|
||
html += _html;
|
||
}
|
||
$('#'+targId+'-PREVIEWER').prepend(html);
|
||
$('#'+targId).val('一共新选择了'+imgs.length+'张图片');
|
||
var l = $('#'+targId).attr('data-length');
|
||
$('#'+targId).attr('data-length',l+imgs.length);
|
||
}
|
||
|
||
//针对多图选择的 图片层删除函数
|
||
function deleteImg(obj){
|
||
$(obj).remove();
|
||
}
|
||
</script>
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label">原单凭证:</label>
|
||
<div class="col-sm-11">
|
||
<section id="thumbs-PREVIEWER" style="display: inline-flex;overflow-x: scroll;">
|
||
<?php if(isset($detail['thumbs'])):?>
|
||
<?php foreach($detail['thumbs'] as $val):?>
|
||
<div onclick="deleteImg(this);" style="width:150px;max-height:200px;margin-right:30px;">
|
||
<div class="input-group " style="margin-top:.5em;">
|
||
<img id="thumbs-preview" src="<?=isset($detail['thumbs'])? Yii::$app->params['attachSrc'].Yii::$app->params['attachDir'].$val: Url::to('@web/img/nopic.jpg');?>" onerror="this.src='<?=Yii::getAlias("@web")?>/img/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbsnail imgs-PREVIEWER" width="150" height="auto">
|
||
<em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
|
||
<input type="hidden" name="thumbs[]" value="<?=$val?>">
|
||
</div>
|
||
</div>
|
||
<?php endforeach;?>
|
||
<?php endif;?>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label">补充说明:</label>
|
||
<div class="col-sm-11">
|
||
<textarea class="form-control" col="3" length="1000" name="logs" id="logs"></textarea>
|
||
<span class="help-block m-b-none red">有必要的情况下,可在此对该笔费用进行补充说明;</span>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label">原单历史备注:</label>
|
||
<div class="col-sm-11">
|
||
<span class="help-block"><?=isset($detail['logs'])?$detail['logs']:''?></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="hr-line-dashed"></div>
|
||
<div class="form-group">
|
||
<div class="col-sm-11 col-sm-offset-1">
|
||
<span class="help-block m-b-none">原费用单创建于:<?=isset($detail['create_at'])?date('Y-m-d H:i:s',$detail['create_at']):'';?>;最近更新时间:<?=isset($detail['update_at'])?date('Y-m-d H:i:s',$detail['update_at']):'';?>; </span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="hr-line-dashed"></div>
|
||
<div class="form-group">
|
||
<div class="col-sm-12 col-sm-offset-3">
|
||
<?php if(isset($detail['create_by']) && $detail['create_by'] != Yii::$app->user->identity->id){ ?>
|
||
<button class="btn btn-white" mini="submit" type="button">该运单不是您创建的</button>
|
||
<?php }else{ ?>
|
||
<button class="btn btn-primary" mini="submit" type="button">新增冲红</button>
|
||
<?php }?>
|
||
<a class="btn btn-white" href="<?=Yii::$app->request->referrer?>">取消并返回</a>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<div class="clearfix"></div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
laydate.skin('molv');
|
||
$(document).ready(function() {
|
||
var config = {
|
||
".chosen-select": {},
|
||
".chosen-select-deselect": {
|
||
allow_single_deselect: !0
|
||
},
|
||
".chosen-select-no-single": {
|
||
disable_search_threshold: 10
|
||
},
|
||
".chosen-select-no-results": {
|
||
no_results_text: "Oops, nothing found!"
|
||
},
|
||
".chosen-select-width": {
|
||
width: "95%"
|
||
}
|
||
};
|
||
for (var selector in config) $(selector).chosen(config[selector]);
|
||
});
|
||
</script>
|