224 行
9.6 KiB
HTML
可执行文件
224 行
9.6 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;
|
|
}
|
|
|
|
.hide {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<div class="goodsBox">
|
|
<div class="goods_title">
|
|
<div class="goods_title_inner">
|
|
退货单
|
|
</div>
|
|
</div>
|
|
<div class="goods_edit">
|
|
<form class="layui-form" id="select_serach">
|
|
<div class="layui-input-inline">
|
|
<input type="text" class="layui-input" placeholder="单据号" id="ordernum">
|
|
</div>
|
|
<div class="layui-input-inline">
|
|
<select name="supplier_id" id="supplier_id" class="layui-input">
|
|
<option value="">选择供货商</option>
|
|
<volist name="info" id="vo">
|
|
<option value="{$vo.id}">{$vo.supplier_name}</option>
|
|
</volist>
|
|
</select>
|
|
</div>
|
|
<div class="layui-input-inline" style="width: 437px;">
|
|
<input type="text" name="date" id="date" lay-verify="date" placeholder="点击查询指定时间段"
|
|
autocomplete="off"
|
|
class="layui-input">
|
|
<i style="font-size: 28px;color: #009688;" class="layui-icon iconBox"></i>
|
|
</div>
|
|
<div class="layui-input-inline">
|
|
<div class="goods_edit_add" id="serach_icon">搜索</div>
|
|
<if condition="$global_store_jurisdiction && ($global_store_jurisdiction['data_export'] eq '2')">
|
|
<else/>
|
|
<if condition="$authArr['flow_refund_export']">
|
|
<div class="goods_edit_add" id="export">导出</div>
|
|
</if>
|
|
</if>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="goods_table">
|
|
<table class="layui-hide" id="test" lay-filter="demo"></table>
|
|
<script type="text/html" id="barDemo">
|
|
<if condition="$authArr['showrefund']">
|
|
<a class="layui-btn layui-btn-xs" lay-event="showfloworder">查看</a>
|
|
</if>
|
|
<!-- <if condition="$authArr['dorefund']">
|
|
<a class="layui-btn layui-btn-xs {{d.audit == '3'? 'hide':''}}" lay-event="audit">审核</a>
|
|
</if>
|
|
<if condition="$authArr['cancelfloworder']">
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs {{d.audit == '3'? 'hide':''}}"
|
|
lay-event="cancelfloworder">作废</a>
|
|
</if>-->
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
layui.use(['table', 'layer', 'laydate'], function () {
|
|
var table = layui.table;
|
|
var laydate = layui.laydate;
|
|
var form = layui.form;
|
|
form.render();
|
|
//日期
|
|
laydate.render({
|
|
elem: '#date',
|
|
range: '至',
|
|
value: $('#date01').val()
|
|
});
|
|
|
|
//展示已知数据
|
|
table.render({
|
|
elem: '#test',
|
|
url: "{:U('Retail/Flow/refundlist')}",
|
|
cols: [
|
|
[{
|
|
field: 'index',
|
|
title: '序号',
|
|
width: 60
|
|
}, {
|
|
field: 'ordernum',
|
|
title: '进货单号',
|
|
}, {
|
|
field: 'supplier',
|
|
title: '供货商',
|
|
}, {
|
|
field: 'ctime',
|
|
title: '制单时间',
|
|
}, {
|
|
field: 'adminname',
|
|
title: '制单人',
|
|
}, {
|
|
field: 'allnum',
|
|
title: '退货量',
|
|
}, {
|
|
field: 'allmoney',
|
|
title: '总金额',
|
|
}, {
|
|
field: 'dismoney',
|
|
title: '修改金额',
|
|
}, {
|
|
field: 'paymoney',
|
|
title: '支付金额',
|
|
}, {
|
|
field: 'auditname',
|
|
title: '单据状态', width: 100,
|
|
fixed: 'right', align: 'center'
|
|
}, {fixed: 'right', title: '操作', align: 'center', toolbar: '#barDemo', width: 180}
|
|
]
|
|
],
|
|
page: {
|
|
layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
|
|
}, //是否开启分页
|
|
id: 'idTest'
|
|
});
|
|
//监听工具条
|
|
table.on('tool(demo)', function (obj) {
|
|
var data = obj.data;
|
|
var mydata = data;
|
|
if (obj.event === 'showfloworder') {
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('showrefund')}?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('showrefund')}?id=" + data.id;
|
|
} else if (obj.event === 'audit') {
|
|
layer.confirm('确定审核该单据吗?<br>审核后单据商品将从系统商品库存中扣除。', function () {
|
|
$.ajax({
|
|
url: "{:U('dorefund')}",
|
|
data: {id: data.id},
|
|
type: 'post',
|
|
success: function (res) {
|
|
console.log(res);
|
|
if (res.status == 1) {
|
|
layer.msg(res.msg, {time: 2000}, function () {
|
|
table.reload('idTest');
|
|
})
|
|
} else {
|
|
layer.msg(res.msg, {time: 2000}, function () {
|
|
table.reload('idTest');
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else if (obj.event === 'cancelfloworder') {
|
|
layer.confirm('确定作废该单据吗?,作废后该单据将不再展示', function () {
|
|
$.ajax({
|
|
url: "{:U('cancelfloworder')}",
|
|
data: {id: data.id},
|
|
type: 'post',
|
|
success: function (res) {
|
|
// console.log(res);
|
|
if (res.status == 1) {
|
|
layer.msg(res.msg, {time: 2000}, function () {
|
|
table.reload('idTest');
|
|
})
|
|
} else {
|
|
layer.msg(res.msg, {time: 2000}, function () {
|
|
table.reload('idTest');
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
})
|
|
$("#serach_icon").click(function () { // 搜索
|
|
var date = $('#date').val();
|
|
var ordernum = $('#ordernum').val();
|
|
var supplier_id = $('#supplier_id option:selected').val();
|
|
table.reload('idTest', {
|
|
where: { //设定异步数据接口的额外参数,任意设
|
|
ordernum: ordernum,
|
|
supplier_id: supplier_id,
|
|
date: date,
|
|
}
|
|
, page: {
|
|
curr: 1 //重新从第 1 页开始
|
|
}
|
|
});
|
|
})
|
|
//导出
|
|
$('#export').click(function () {
|
|
var date = $('#date').val();
|
|
var ordernum = $('#ordernum').val();
|
|
var supplier_id = $('#supplier_id option:selected').val();
|
|
layer.confirm("默认导出当日退货明细", function () {
|
|
window.location.href = "{:U('flow_refund_export')}?date=" + date + "&ordernum=" + ordernum + "&supplier_id=" + supplier_id;
|
|
layer.closeAll();
|
|
})
|
|
});
|
|
|
|
});
|
|
|
|
</script> |