文件

137 行
4.4 KiB
HTML
可执行文件

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<!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>
* {
margin: 0;
padding: 0;
}
.Promotion, blockquote {
box-sizing: border-box;
/*margin: 0;*/
padding: 0;
padding-left: 15px;
border-left: 2px solid #3D4357;
font-size: 14px;
}
table {
border: 1px solid #f1f1f1;
margin-top: 40px;
}
.Preservation {
background: #3E4C72;
color: #fff;
}
.del {
color: #E44849;
}
.see {
color: #5A76C9;
}
.form-group {
margin-top: 10px;
}
</style>
</head>
<div class="goodsBox">
<div class="goods_title">
<div class="goods_title_inner">
盘点单据 <span style="color:#009688">(因每个商品进货价不同,盈亏数量和盈亏金额不一定同时为正或者为负)</span>
</div>
</div>
</div>
<div class="goodsBox">
</div>
<table class="layui-hide" id="test" lay-filter="demo"></table>
<script type="text/html" id="barDemo">
<if condition="$authArr['orderdetail']">
<button class="layui-btn layui-btn-xs" lay-event="detail">查看</button>
</if>
</script>
<script>
layui.use(['form', 'layedit', 'laydate', 'table'], function () {
// 日期
var laydate = layui.laydate;
var table = layui.table;
// 日期
lay('.test-item').each(function () {
laydate.render({
elem: this,
trigger: 'click'
});
});
table.on('tool(demo)', function (obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
var tr = obj.tr; //获得当前行 tr 的DOM对象
if (layEvent === 'detail') { //查看
//do somehing
layer.open({
title: '',
type: 2,
content: "{:U('orderdetail')}?id=" + data.id,
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
end: function () {
MenuApp.refreshWindow();
//window.location.reload();
}
})
//window.location.href = "{:U('orderdetail')}?id=" + data.id;
} else if (layEvent === 'del') { //删除
} else if (layEvent === 'edit') { //编辑
}
});
//展示已知数据
table.render({
elem: '#test',
url: "{:U('Check/ordermsg')}",
cols: [
[ //标题栏
{
field: 'index',
title: '序号',
width: 60
}, {
field: 'pl_num',
title: '盈亏数量'
}, {
field: 'pl_jiner',
title: '盈亏金额(元)'
}, {
field: 'adminid',
title: '盘点审核人姓名'
}, {
field: 'addtime',
title: '盘点时间'
}, {
field: 'right',
title: '操作',
align: 'center',
toolbar: '#barDemo',
width: 180
}]
],
page: {
layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
}, //是否开启分页
});
})
</script>