文件
mashangyoujiu/Application/Retail/View/Flow/flowmoneylist.html

157 行
5.7 KiB
HTML
可执行文件

<!DOCTYPE html>
<html>
<!--[1.3.63]-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui-v2.4.3/layui/css/layui.css"/>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/layui-v2.4.3/layui/layui.js"></script>
<link rel="stylesheet" href="__PUBLIC__/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/goodsList.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Retail/css/myscroll.css"/>
<style>
.mybtn {
margin: 10px 30px;
}
.mybtn:hover {
color: white;
background-color: #3f4c73;
}
.goods_table th {
text-align: center;
}
</style>
</head>
<div class="goodsBox">
<div class="goods_title">
<div class="goods_title_inner">
货流单据出入账
</div>
</div>
<div class="goods_edit">
<form id="select_serach">
<div class="goods_edit_select">
<select name="goods_class_id" id="goods_class_id">
<option value="0">--所有类型--</option>
<option value="1">进货单</option>
<option value="2">门店调拨单</option>
<option value="3">退货单</option>
<option value="4">报损单</option>
</select>
</div>
</form>
<div class="goods_edit_add" id="serach_icon" style="margin-left: -10px;
">搜索
</div>
<if condition="$global_store_jurisdiction && ($global_store_jurisdiction['data_export'] eq '2')">
<else/>
<if condition="$authArr['exportflowmoney']">
<div class="goods_edit_add" id="exportbtn" style="margin-left: 30px;">导出货流账单</div>
</if>
</if>
</div>
<div class="goods_table">
<table class="layui-table" lay-even lay-skin="nob" lay-size="lg">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th rowspan="2">总进货单(元)</th>
<th colspan="2">总调拨单(元)</th>
<th rowspan="2">总退货单(元)</th>
<th rowspan="2">总报损单(元)</th>
</tr>
<tr>
<th>调入</th>
<th>调出</th>
</tr>
</thead>
<tbody>
<tr>
<th id="type1">0</th>
<th id="type21">0</th>
<th id="type22">0</th>
<th id="type3">0</th>
<th id="type4">0</th>
</tr>
</tbody>
</table>
</div>
<div class="goods_table">
<table class="layui-hide" id="test"></table>
</div>
</div>
<script type="text/javascript">
layui.use(['table', 'layer'], function () {
var table = layui.table;
//展示已知数据
table.render({
elem: '#test',
url: "{:U('Retail/flow/flowmoneylistinfo')}",
cols: [
[{field: 'index', title: '序号', width: 60, align: 'center'}
, {field: 'type', title: '单据类型', align: 'center'}
, {field: 'ctime', title: '制单时间', align: 'center'}
, {field: 'ordernum', title: '单据号', align: 'center'}
, {field: 'adminname', title: '制单人', align: 'center'}
, {field: 'allnum', title: '操作数量', align: 'center'}
, {field: 'allmoney', title: '最终金额', align: 'center'}
]
],
page: {
layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
}, //是否开启分页
id: 'idTest'
});
$.ajax({
url: "{:U('Retail/flow/money')}",
type: "post",
success: function (res) {
$("#type1").text(res.type1)
$("#type21").text(res.type21)
$("#type22").text(res.type22)
$("#type3").text(res.type3)
$("#type4").text(res.type4)
}
})
$("#serach_icon").click(function () {
var type = $('#goods_class_id').val();
//同步请求会员统计
$.ajax({
url: "{:U('Retail/flow/money')}",
type: "post",
success: function (res) {
$("#type1").text(res.type1)
$("#type21").text(res.type21)
$("#type22").text(res.type22)
$("#type3").text(res.type3)
$("#type4").text(res.type4)
}
})
table.reload('idTest', {
where: { //设定异步数据接口的额外参数,任意设
type: type
}
, page: {
curr: 1 //重新从第 1 页开始
}
});
})
$('#exportbtn').click(function () {
var type = $('#goods_class_id').val();
console.log(type);
if (type == 0) {
layer.msg('请选择一种单据类型再导出', {time: 1500});
return;
}
window.location.href = "{:U('exportflowmoney')}?type=" + type;
})
});
</script>