提交 7131d87b authored 作者: chengye's avatar chengye

Merge branch 'release'

......@@ -55,6 +55,27 @@ class Invoice extends Base
$this->assign('search_type','');
$this->assign('search_text','');
}
//抄表时间查询条件
$dateStart = strtotime(Request::get('date_start'));
$dateEnd = strtotime(Request::get('date_end'));
//区间查询
if( !empty($dateStart) && !empty($dateEnd) ){
$map[] = ['eu.current_date','between',[$dateStart,$dateEnd]];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end',Request::get('date_end'));
} elseif (!empty($dateStart) && empty($dateEnd)){
$map[] = ['eu.current_date','>',$dateStart];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end','');
} elseif (empty($dateStart) && !empty($dateEnd)){
$map[] = ['eu.current_date','<',$dateEnd];
$this->assign('date_end',Request::get('date_end'));
$this->assign('date_start','');
}else{
$this->assign('date_start','');
$this->assign('date_end','');
}
$page =Request::param('page')?Request::param('page'):1;
$limit = Request::param('limit')?Request::param('limit'):10;
......
......@@ -16,6 +16,7 @@ use app\em\model\EmPaymentInvoiceBalance;
use app\em\model\EmPaymentReceipt;
use app\em\model\Staff;
use app\em\validate\AddPaymentValidate;
use function Sodium\library_version_major;
use think\Exception;
use think\facade\Request;
use think\facade\Session;
......@@ -40,6 +41,8 @@ class Payment extends Base
}
$search_text = Request::get('search_text');
$search_type = Request::get('search_type');
$payment_status = Request::get('payment_status');
if($search_text){
switch ($search_type) {
case '1':
......@@ -63,11 +66,23 @@ class Payment extends Base
$map[]=['em.em_numb','like',"%$search_text%"];
$this->assign('search_type',$search_type);
break;
case '4':
$this->assign('search_text',$search_text);
$map[]=['station.station_name','like',"%$search_text%"];
$this->assign('search_type',$search_type);
break;
}
}else{
$this->assign('search_type','');
$this->assign('search_text','');
}
//缴费状态
if($payment_status !== ''){
$map[]=['pay.status','=',"$payment_status"];
$this->assign('payment_status',$payment_status);
}else{
$this->assign('payment_status','');
}
//区域
$area_id = Request::get('area_id');
if($area_id){
......@@ -81,15 +96,15 @@ class Payment extends Base
$dateEnd = strtotime(Request::get('date_end'));
//区间查询
if( !empty($dateStart) && !empty($dateEnd) ){
$map[] = ['pay.pay_date','between',[$dateStart,$dateEnd]];
$map[] = ['pay.create_time','between',[$dateStart,$dateEnd]];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end',Request::get('date_end'));
} elseif (!empty($dateStart) && empty($dateEnd)){
$map[] = ['pay.pay_date','>',$dateStart];
$map[] = ['pay.create_time','>',$dateStart];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end','');
} elseif (empty($dateStart) && !empty($dateEnd)){
$map[] = ['pay.pay_date','<',$dateEnd];
$map[] = ['pay.create_time','<',$dateEnd];
$this->assign('date_end',Request::get('date_end'));
$this->assign('date_start','');
}else{
......
......@@ -35,6 +35,8 @@ class Settle extends Base
}
$search_text = Request::get('search_text');
$search_type = Request::get('search_type');
$settle_status = Request::get('settle_status');
if($search_text){
switch ($search_type) {
case '1':
......@@ -52,11 +54,24 @@ class Settle extends Base
$map[]=['em.em_numb','like',"%$search_text%"];
$this->assign('search_type',$search_type);
break;
case '4':
$this->assign('search_text',$search_text);
$map[]=['station.station_name','like',"%$search_text%"];
$this->assign('search_type',$search_type);
break;
}
}else{
$this->assign('search_type','');
$this->assign('search_text','');
}
//结算状态
if($settle_status !== ''){
$map[]=['settle.status','=',"$settle_status"];
$this->assign('settle_status',$settle_status);
}else{
$this->assign('settle_status','');
}
//区域
$area_id = Request::get('area_id');
if($area_id){
......@@ -66,10 +81,29 @@ class Settle extends Base
$this->assign('area_id','');
}
//创建时间查询条件
$dateStart = strtotime(Request::get('date_start'));
$dateEnd = strtotime(Request::get('date_end'));
//区间查询
if( !empty($dateStart) && !empty($dateEnd) ){
$map[] = ['settle.create_time','between',[$dateStart,$dateEnd]];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end',Request::get('date_end'));
} elseif (!empty($dateStart) && empty($dateEnd)){
$map[] = ['settle.create_time','>',$dateStart];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end','');
} elseif (empty($dateStart) && !empty($dateEnd)){
$map[] = ['settle.create_time','<',$dateEnd];
$this->assign('date_end',Request::get('date_end'));
$this->assign('date_start','');
}else{
$this->assign('date_start','');
$this->assign('date_end','');
}
$page =Request::param('page')?Request::param('page'):1;
$limit = Request::param('limit')?Request::param('limit'):10;
$region=new ElectricMeter();
$data = (new EmSettle())->getSettleList($map,$page,$limit);
$PaymentCount = (new EmSettle())->getSettleCount($map);
if(Request::param('page')){
......@@ -78,13 +112,6 @@ class Settle extends Base
$region=new ElectricMeter();
$this->assign('regions',getTree($region->regions()));
return $this->fetch();
// $data = (new EmSettle())->getList();
// $page = $data->render();
// $this->assign('data',$data);
// $this->assign('page',$page);
// return $this->fetch();
}
public function createAll(){
......
......@@ -238,10 +238,9 @@ class Useage extends Base
}
$this->assign('em',$em);
$this->assign('useage',$useage);
//判断是否是峰谷表
if($useage->pricing_type == 1){
return $this->fetch('detail');
} else {
if($useage->pricing_type == 2){
//获取峰谷表详情
$useage_detail = (new UseageDetail())->where('useage_id','=',$uid)->select()->toArray();
foreach ($useage_detail as &$ud){
......@@ -265,6 +264,8 @@ class Useage extends Base
}
$this->assign('useage_detail',$useage_detail);
return $this->fetch('detail_special');
} else {
return $this->fetch('detail');
}
}
}
\ No newline at end of file
......@@ -31,17 +31,21 @@ class EmInvoice extends Base
//账单查询+search
public function getInvoiceList($map,$Nowpage,$limits){
$data = self::alias('inv')
->field('inv.*')
->field('station.station_name,em.em_numb')
->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->join(['em'],'em.id=ea.em_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map)
->page($Nowpage, $limits)
->order('inv.id desc')
->field('inv.*')
->field('station.station_name,em.em_numb')
->field('eu.last_sum_numb,eu.current_sum_numb,eu.current_date,FROM_UNIXTIME(eu.current_date,"%Y-%m-%d %H:%i:%S") as now_date')
->join(['em_invoice_useage'=>'eiu'],'eiu.invoice_id = inv.invoice_id')
->join(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id')
->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->join(['em'],'em.id=ea.em_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map)
->page($Nowpage, $limits)
->order('inv.id desc')
->select()
->toarray();
->select()
->toarray();
foreach ($data as &$item){
if($item['payment_balance'] == 0){
$item['paid_amount'] = $item['payment_amount'] ;
......@@ -60,8 +64,12 @@ class EmInvoice extends Base
public function getInvoiceCount($map){
$data = self::alias('inv')
->field('inv.*')
->field('station.station_name,em.em_numb')
->field('eu.last_sum_numb,eu.current_sum_numb,eu.current_date')
->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->join(['em'],'em.id=ea.em_id')
->join(['em_invoice_useage'=>'eiu'],'eiu.invoice_id = inv.invoice_id')
->join(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map)
->count();
......
......@@ -18,27 +18,28 @@ class EmPayment extends Base
//先找到账单
$data = self::alias('pay')
->field('pay.*')
->field('case pay.status
when 0 then "未缴费"
when 1 then "已缴费"
when 2 then "已上传发票"
->field('case pay.status
when 0 then "未缴费"
when 1 then "已缴费"
when 2 then "已上传发票"
when 3 then "凭证完整"
when 4 then "已审核"
end as status')
->field('epi.invoice_id')
->field('em.em_numb')
->field('r.region_name,station.station_name')
->join(['em_account'=>'ea'],'ea.account_id=pay.account_id')
->leftJoin(['em_account'=>'ea'],'ea.account_id=pay.account_id')
->leftJoin(['em_payment_invoice'=>'epi'],'epi.payment_id = pay.payment_id')
->join(['em'],'em.id=ea.em_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->join(['region'=>'r'],'station.area_id = r.id')
->leftJoin(['em'],'em.id=ea.em_id')
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->leftJoin(['region'=>'r'],'station.area_id = r.id')
->where($map)
->order('pay.id desc')
->page($Nowpage, $limits)
->select()
->toarray();
foreach ($data as $k=>$item){
$data[$k]['amount'] = round($data[$k]['amount'],3);
}
......
......@@ -40,7 +40,6 @@ class EmSettle extends Base
->page($Nowpage, $limits)
->select()
->toarray();
return $data;
}
public function getSettleCount($map){
......
......@@ -43,8 +43,8 @@ class Useage extends Base
->field('ue.*')
->field('station.station_name')
->field('em.em_numb')
->leftJoin(['em'],'em.id=ue.em_id')
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->join(['em'],'em.id=ue.em_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map)
->page($Nowpage, $limits)
->order('ue.id desc')
......
......@@ -276,49 +276,50 @@
<!--非包年包月-->
<div id="charge_type_1">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>抄表单单价
</label>
<div class="layui-input-inline">
<input type="text" id="pay_price" name="pay_price" autocomplete="off" class="layui-input" lay-verType="tips">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>抄表单单价
</label>
<div class="layui-input-inline">
<input type="text" id="pay_price" name="pay_price" autocomplete="off" class="layui-input" lay-verType="tips">
</div>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>缴费周期
</label>
<div class="layui-input-inline">
<input type="text" id="pay_cycle" name="pay_cycle" autocomplete="off" class="layui-input" lay-verType="tips">
<!--包年包月-->
<div id="charge_type_2" class="layui-hide">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>承包金额
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_amount" name="cycle_amount" autocomplete="off" class="layui-input" lay-verType="tips">
</div>
</div>
</div>
</div>
</div>
<!--包年包月-->
<div id="charge_type_2" class="layui-hide">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>承包金额
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_amount" name="cycle_amount" autocomplete="off" class="layui-input" lay-verType="tips">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>起始承包日期
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_start_time" name="cycle_start_time"autocomplete="off" class="layui-input" lay-verType="tips">
</div>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>起始承包日期
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_start_time" name="cycle_start_time"autocomplete="off" class="layui-input" lay-verType="tips">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>结束承包日期
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_finish_time" name="cycle_finish_time" autocomplete="off" class="layui-input" lay-verType="tips">
</div>
</div>
</div>
</div>
......@@ -326,14 +327,13 @@
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
<span class="x-red">*</span>结束承包日
<span class="x-red">*</span>缴费周
</label>
<div class="layui-input-inline">
<input type="text" id="cycle_finish_time" name="cycle_finish_time" autocomplete="off" class="layui-input" lay-verType="tips">
<input type="text" id="pay_cycle" name="pay_cycle" autocomplete="off" class="layui-input" lay-verType="tips">
</div>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
......
......@@ -22,6 +22,18 @@
<input type="text" name="search_text"
style="width:150px;" placeholder="搜索内容" autocomplete="off" id="search_text" class="layui-input" value="{$search_text}">
</div>
<div class="layui-input-inline" style="width:150px;">
<select name="cp_date" id="cp_date">
<option value="1">抄表日期</option>
<!--<option value="2">缴费日期</option>-->
</select>
</div>
<div class="layui-input-inline">
<input type="text" name="date_start" id="date_start" placeholder="开始日期" autocomplete="off" class="layui-input" style="width:150px;" value="{$date_start}">
</div>
<div class="layui-input-inline">
<input type="text" name="date_end" style="width:150px;" id="date_end" placeholder="结束日期" autocomplete="off" class="layui-input" value="{$date_end}">
</div>
<div class="layui-input-inline">
<button class="layui-btn" lay-submit="" lay-filter="search">
<i class="layui-icon">&#xe615;</i></button>
......@@ -40,19 +52,20 @@
</div>
<table class="layui-table" lay-filter="demo" lay-data="{ url:'/invoice', page:true, initSort: {field:'wealth', type:'desc'}, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value} }"> <thead>
<table class="layui-table" lay-filter="demo" lay-data="{ url:'/invoice', page:true, initSort: {field:'wealth', type:'desc'}, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value}
}"> <thead>
<tr>
<th lay-data="{type: 'checkbox', fixed: 'left'} "></th>
<th lay-data="{templet: '#invoice_id',sort: true} ">账单号</th>
<th lay-data="{field:'station_name',sort: true}">所属基站名</th>
<th lay-data="{templet:'#em_numb',sort: true} ">所属电表号</th>
<th lay-data="{field:'payment_amount'}">应缴金额</th>
<th lay-data="{field:'paid_amount'}">已缴金额</th>
<th lay-data="{field: 'settle_amount'}">应结金额</th>
<th lay-data="{field:'sett_amount'}">已结金额</th>
<th lay-data="{templet: '#useage'}">抄表度数</th>
<th lay-data="{templet: '#repo_numb'}">用电量</th>
<th lay-data="{templet:'#payment'}">缴费金额</th>
<th lay-data="{templet:'#settle'}">结算金额</th>
<th lay-data="{field: 'status'}">账单状态</th>
<th lay-data="{field: 'create_time',sort: true}">创建时间</th>
<th lay-data="{field: 'now_date',sort: true}">抄表日期</th>
<!--<th lay-data="{fixed: 'right', align:'center', toolbar: '#barDemo'}">操作</th>-->
</tr>
</thead>
......@@ -73,6 +86,19 @@
<script type="text/html" id="em_numb">
<a class="layui-link" title="查看电表" href="/em_edit/{{d.em_id}}">{{d.em_numb}}</a>
</script>
<script type="text/html" id="payment">
应缴: {{ d.payment_amount }} 已缴:{{ d.paid_amount }}
</script>
<script type="text/html" id="settle">
应结: {{ d.settle_amount }} 已结:{{ d.sett_amount }}
</script>
<script type="text/html" id="useage">
上期: {{ d.last_sum_numb }} 本期:{{ d.current_sum_numb }}
</script>
<script type="text/html" id="repo_numb">
{{ d.current_sum_numb - d.last_sum_numb }}
</script>
<script type="text/javascript">
var $list = new Set();
......
{extend name="public:base" /}
{block name="body"}
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<form class="layui-form">
<!--缴费-->
<div class="layui-form-box">
<div class="layui-form-head">
<div class="layui-form-item">
<label class="layui-form-label">
填写缴费信息
</label>
</div>
</div>
<div class="layui-form-body">
<div class="layui-row">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费金额:
</label>
<div class="layui-input-inline">
<input type="text" name="amount" id="paid_totle"
class="layui-input no-border" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费员:
</label>
<div class="layui-input-inline">
<select name="staff_id">
{foreach $staffs as $u}
<option value="{$u['id']}"}>{$u['name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费凭证:
</label>
<div class="layui-input-inline">
<a class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="showCert" οnclick="return false;">查看</a>
<button class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="addCert" οnclick="return false;"><i class="layui-icon layui-icon-add-circle-fine"></i></button>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
发票凭证:
</label>
<div class="layui-input-inline">
<a class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="showReceipt" οnclick="return false;">查看</a>
<button class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="addReceipt" οnclick="return false;"><i class="layui-icon layui-icon-add-circle-fine"></i></button>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-col-md-offset4">
<button class="layui-btn" lay-filter="save" lay-submit="">保存</button>
</div>
</div>
</div>
<!--缴费结束-->
</form>
</div>
</div>
</div>
</div>
{/block}
{block name="js"}
<script>
//限制输入长度
function sliceDom(dom,len){
if(dom.value.length>len)
return dom.value = dom.value.slice(0,len)
}
//初始化Layui控件
layui.use(['form', 'layer', 'laydate', 'upload'],
function () {
$ = layui.jquery;
var form = layui.form,
layer = layui.layer,
laydate = layui.laydate,
upload = layui.upload;
//消息提示
function layMsg(msg,type=6,time=1000){
layer.msg(msg,{
icon: type,
time: time,
});
}
form.on('submit(submit)',
function (data) {
$.ajax({
url: '/payment/update',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//保存信息
form.on('submit(save)',
function (data) {
$.ajax({
url: '/payment/save',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//上传电表照片
var upPhoto = upload.render({
elem: '#up_photo' ,
url: '/up_photo',
field: 'cp_photo',
done: function (res) {
if(res.status == 1){
layMsg(res.message)
//将电表照片的ID填写
var $photoId = $("input[name='photo_id']")
$photoId.val(res.data.id)
var $a = $photoId.next('a');
$a.removeClass('layui-hide')
$a.attr('href',res.data.src);
}
else {
layMsg(res.message,5)
return;
}
}
});
});
</script>
{/block}
\ No newline at end of file
{extend name="public:base" /}
{block name="body"}
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<form class="layui-form">
<!--缴费-->
<div class="layui-form-box">
<div class="layui-form-head">
<div class="layui-form-item">
<label class="layui-form-label">
缴费详情
</label>
</div>
</div>
<div class="layui-form-body">
<div class="layui-row">
<input type="hidden" name="em_id" value="{$em.id}">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
电表号:
</label>
<div class="layui-input-inline">
<input type="text" name="em_numb" autocomplete="off"
class="layui-input no-border" value="{$em.em_numb}" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费单号:
</label>
<div class="layui-input-inline">
<input type="text" name="payment_id" autocomplete="off"
class="layui-input no-border" value="{$payment.payment_id}" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费金额:
</label>
<div class="layui-input-inline">
<input type="text" name="amount" id="amount"
class="layui-input" >
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费日期:
</label>
<div class="layui-input-inline">
<input type="text" name="pay_date" id="pay_date"
class="layui-input" >
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费员:
</label>
<div class="layui-input-inline">
<select name="staff_id">
{foreach $staffs as $u}
<option value="{$u['id']}"}>{$u['name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-col-md-offset4">
<button class="layui-btn" lay-filter="save" lay-submit="">
保存
</button>
</div>
</div>
</div>
<!--缴费结束-->
</form>
</div>
</div>
</div>
</div>
{/block}
{block name="js"}
<script>
//限制输入长度
function sliceDom(dom,len){
if(dom.value.length>len)
return dom.value = dom.value.slice(0,len)
}
//初始化Layui控件
layui.use(['form', 'layer', 'laydate', 'upload'],
function () {
$ = layui.jquery;
var form = layui.form,
layer = layui.layer,
laydate = layui.laydate,
upload = layui.upload;
//消息提示
function layMsg(msg,type=6,time=1000){
layer.msg(msg,{
icon: type,
time: time,
});
}
laydate.render({
elem:'#pay_date',
trigger:'click',
})
//审核通过
form.on('submit(save)',
function (data) {
$.ajax({
url: '/payment/save',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//上传电表照片
var upPhoto = upload.render({
elem: '#up_photo' ,
url: '/up_photo',
field: 'cp_photo',
done: function (res) {
if(res.status == 1){
layMsg(res.message)
//将电表照片的ID填写
var $photoId = $("input[name='photo_id']")
$photoId.val(res.data.id)
var $a = $photoId.next('a');
$a.removeClass('layui-hide')
$a.attr('href',res.data.src);
}
else {
layMsg(res.message,5)
return;
}
}
});
});
</script>
{/block}
\ No newline at end of file
......@@ -16,12 +16,23 @@
<option value="1" selected="selected" {if $search_type eq 1 } selected {/if}>缴费单号</option>
<option value="2" {if $search_type eq 2 } selected {/if}>账单号</option>
<option value="3" {if $search_type eq 3 } selected {/if}>电表识别号</option>
<option value="4" {if $search_type eq 4 } selected {/if}>站名</option>
</select>
</div>
<div class="layui-input-inline">
<input type="text" name="search_text"
style="width:150px;" placeholder="搜索内容" autocomplete="off" id="search_text" class="layui-input" value="{$search_text}">
</div>
<div class="layui-input-inline" style="width:150px;">
<select name="payment_status" id="payment_status">
<option value="" selected="selected" {if $payment_status === '' } selected {/if}>缴费状态</option>
<option value="0" {if $payment_status === 0 || $payment_status === '0'} selected {/if}>未缴费</option>
<option value="1" {if $payment_status == 1 } selected {/if}>已缴费</option>
<option value="4" {if $payment_status == 4 } selected {/if}>已审核</option>
</select>
</div>
<div class="layui-input-inline layui-show-xs-block" style="width:100px;">
<select name="area_id" id="area_id">
<option value="0"> 区域</option>
......@@ -56,7 +67,7 @@
<div class="layui-card-body ">
<table class="layui-table" lay-data="{ url:'/payment', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value,cp_date:document.getElementById('cp_date').value} }"> <thead>
<table class="layui-table" lay-data="{ url:'/payment', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value,payment_status:document.getElementById('payment_status').value} }"> <thead>
<tr>
<th lay-data="{templet: '#payment_id',sort: true} ">缴费单号</th>
<th lay-data="{templet: '#invoice_id',sort: true}">账单号</th>
......
......@@ -16,12 +16,23 @@
<option value="1" selected="selected" {if $search_type eq 1 } selected {/if}>结算单号</option>
<option value="2" {if $search_type eq 2 } selected {/if}>账单号</option>
<option value="3" {if $search_type eq 3 } selected {/if}>电表识别号</option>
<option value="3" {if $search_type eq 4 } selected {/if}>站名</option>
</select>
</div>
<div class="layui-input-inline">
<input type="text" name="search_text"
style="width:150px;" placeholder="搜索内容" autocomplete="off" id="search_text" class="layui-input" value="{$search_text}">
</div>
<div class="layui-input-inline" style="width:150px;">
<select name="settle_status" id="settle_status">
<option value="" selected="selected" {if $settle_status === '' } selected {/if}>结算状态</option>
<option value="0" {if $settle_status === 0 || $settle_status === '0' } selected {/if}>未结算</option>
<option value="1" {if $settle_status == 1 } selected {/if}>已结算</option>
<option value="4" {if $settle_status == 4 } selected {/if}>已审核</option>
</select>
</div>
<div class="layui-input-inline layui-show-xs-block" style="width:150px;">
<select name="area_id" id="area_id">
<option value="0"> 区域</option>
......@@ -34,6 +45,19 @@
{/volist}
</select>
</div>
<div class="layui-input-inline" style="width:100px;">
<select name="cp_date" id="cp_date">
<option value="1">创建日期</option>
</select>
</div>
<div class="layui-input-inline">
<input type="text" name="date_start" id="date_start" placeholder="开始日期" autocomplete="off" class="layui-input" style="width:100px;" value="{$date_start}">
</div>
<div class="layui-input-inline">
<input type="text" name="date_end" style="width:100px;" id="date_end" placeholder="结束日期" autocomplete="off" class="layui-input" value="{$date_end}">
</div>
<div class="layui-input-inline">
<button class="layui-btn" lay-submit="" lay-filter="search">
<i class="layui-icon">&#xe615;</i></button>
......@@ -42,7 +66,7 @@
</div>
<div class="layui-card-body">
<div>
<table class="layui-table" lay-data="{ url:'/settle', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value} }"> <thead>
<table class="layui-table" lay-data="{ url:'/settle', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value,settle_status:document.getElementById('settle_status').value} }"> <thead>
<tr>
<th lay-data="{templet: '#settle_id',sort: true} ">结算单号</th>
<th lay-data="{field:'invoice_id',sort: true}">账单号</th>
......@@ -71,16 +95,18 @@
{{# } }}
</script>
<script type="text/javascript">
layui.use(['form', 'layer', 'laydate', 'upload','table'],
function () {
layui.use(['form', 'layer', 'laydate', 'upload','table'],function () {
$ = layui.jquery;
var form = layui.form,
layer = layui.layer,
table = layui.table,
laydate = layui.laydate,
upload = layui.upload;
var laydate = layui.laydate;
laydate.render({
elem:'#date_end',
trigger:'click',
})
laydate.render({
elem:'#date_start',
trigger:'click',
})
})
function del(obj,id){
......
......@@ -174,9 +174,13 @@
<span class="x-red">*</span>抄表凭证
</label>
<div class="layui-input-inline">
{if $useage.photo.src== ''}
<div style="line-height: 20px;padding: 9px 15px;">未上传凭证</div>
{else /}
<a href="{$useage.photo.src}" target="_blank" class="layui-btn" disabled="disabled">
<i class="layui-icon">&#xe64a;</i>预览
</a>
{/if}
</div>
</div>
</div>
......
......@@ -172,9 +172,13 @@
<span class="x-red">*</span>抄表凭证
</label>
<div class="layui-input-inline">
{if $useage.photo.src== ''}
<div style="line-height: 20px;padding: 9px 15px;">未上传凭证</div>
{else /}
<a href="{$useage.photo.src}" target="_blank" class="layui-btn" disabled="disabled">
<i class="layui-icon">&#xe64a;</i>预览
</a>
{/if}
</div>
</div>
</div>
......
......@@ -82,7 +82,7 @@
{{# } }}
</script>
<script type="text/html" id="repo_numb">
{{# d.current_sum_numb - d.last_sum_numb }}
{{ d.current_sum_numb - d.last_sum_numb }}
</script>
<script type="text/html" id="barDemo">
{{# if(d.status == 1){ }}
......@@ -93,13 +93,12 @@
layui.use(['laydate','form','table'], function(){
var laydate = layui.laydate,
form = layui.form,
table = layui.table
table = layui.table;
laydate.render({
elem:'#date_end',
trigger:'click',
})
laydate.render({
elem:'#date_start',
trigger:'click',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论