201 行
7.5 KiB
HTML
可执行文件
201 行
7.5 KiB
HTML
可执行文件
<!--[1.3.9]-->
|
|
<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;
|
|
}
|
|
|
|
table {
|
|
border: 1px solid #f1f1f1;
|
|
margin-top: 40px;
|
|
}
|
|
|
|
.funalert {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.layui-form-checkbox[lay-skin=primary] span {
|
|
float: right;
|
|
padding-right: 0;
|
|
line-height: 18px;
|
|
background: 0 0;
|
|
color: #666;
|
|
}
|
|
|
|
.pass-content {
|
|
text-align: center;
|
|
display: none;
|
|
}
|
|
|
|
.pass {
|
|
display: block;
|
|
width: 200px;
|
|
padding: 10px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
.layui-form-label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.layui-form-item .layui-form-checkbox[lay-skin="primary"] {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.pass-wrap {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 20px 0;
|
|
}
|
|
|
|
#getcode {
|
|
box-sizing: border-box;
|
|
padding: 0 15px;
|
|
font-size: 15px;
|
|
background: #009688;
|
|
border: none;
|
|
outline: none;
|
|
color: #fff;
|
|
}
|
|
.layui-input-block {
|
|
margin-left: 110px;
|
|
min-height: 26px;
|
|
}
|
|
</style>
|
|
<div class="funalert">
|
|
<form id="form" class="layui-form" action="">
|
|
<div class="pass-content">
|
|
<div class="pass-wrap">
|
|
<input type="text" name="password" class="pass" id="pass" placeholder="请输入商户验证码">
|
|
<button id="getcode" type="button">获取验证码</button>
|
|
</div>
|
|
</div>
|
|
<span style="color:red;">清空数据将不可恢复,请谨慎操作!</span>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 80px">会员:</label>
|
|
<div class="layui-input-block" style="padding-top: 10px;">
|
|
<input type="checkbox" class="xcx" value="1" name="vip" lay-skin="primary"
|
|
title="会员信息及会员相关所有记录">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 80px">小程序:</label>
|
|
<div class="layui-input-block" style="padding-top: 10px;">
|
|
<input type="checkbox" class="xcx" value="1" name="xcx" lay-skin="primary"
|
|
title="小程序用户及相关所有记录">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 80px">门店订单:</label>
|
|
<div class="layui-input-block" style="padding-top: 10px;">
|
|
<input type="checkbox" class="set" value="store" name="store[]" lay-skin="primary" title="所有店内订单">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 100px;min-height: 26px;">
|
|
<input type="checkbox" class="set" value="online" name="store[]" lay-skin="primary" title="所有商城订单">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 110px;min-height: 26px;">
|
|
<input type="checkbox" class="xcx" value="order_da" name="store[]" lay-skin="primary" title="所有达达订单">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 110px;min-height: 26px;">
|
|
<input type="checkbox" class="xcx" value="order_uu" name="store[]" lay-skin="primary" title="所有UU订单">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 110px;min-height: 26px;">
|
|
<input type="checkbox" class="set" value="sell" name="store[]" lay-skin="primary" title="所有销售明细">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 110px;min-height: 26px;">
|
|
<input type="checkbox" class="set" value="stock" name="store[]" lay-skin="primary" title="所有出入库明细">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 80px">商品:</label>
|
|
<div class="layui-input-block" style="padding-top: 10px;">
|
|
<input type="checkbox" class="set" name="goods[]" value="merchant" lay-skin="primary"
|
|
title="所有商户商品(与门店商品不同)">
|
|
</div>
|
|
<div class="layui-input-block" style="margin-left: 100px;min-height: 26px;">
|
|
<input type="checkbox" class="set" name="goods[]" value="store" lay-skin="primary"
|
|
title="所有门店商品(销售记录与出入库记录也将清除)">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div style="display: flex;justify-content: center;box-sizing: border-box;padding: 30px 0 0 0">
|
|
<button class="layui-btn layui-btn-sm " id="sure">清空</button>
|
|
<button class="layui-btn layui-btn-primary layui-btn-sm" id="cancel">取消</button>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
layui.use(['form', 'layer'], function () {
|
|
var form = layui.form;
|
|
form.render();
|
|
$('#sure').click(function () {
|
|
var index = layer.confirm('数据清空将不能恢复,确定清空?', function () {
|
|
layer.close(index);
|
|
layer.open({
|
|
type: 1,
|
|
content: $('.pass-content'),
|
|
title: "请输入商户验证码",
|
|
area: '450px',
|
|
btn: ['确定', '取消'],
|
|
btnAlign: 'c',
|
|
yes: function () {
|
|
if (!$('#pass').val()) {
|
|
layer.msg('请输入商户验证码', {time: 800});
|
|
return;
|
|
}
|
|
var load = layer.load(1, {
|
|
shade: [0.3, '#000000']
|
|
})
|
|
$.post("{:U('deleteSellData')}", $('#form').serialize(), function (res) {
|
|
layer.close(load);
|
|
if (res.status == 1) {
|
|
$('#pass').val('');
|
|
layer.closeAll()
|
|
layer.msg(res.msg, {time: 1000}, function () {
|
|
MenuApp.refreshWindow();
|
|
});
|
|
} else {
|
|
layer.msg(res.msg, {time: 1000});
|
|
}
|
|
})
|
|
}
|
|
})
|
|
})
|
|
})
|
|
$('#getcode').click(function () {
|
|
$.ajax({
|
|
url: "{:U('verification')}",
|
|
type: "post",
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
layer.msg(res.msg, {time: 1500});
|
|
code()
|
|
} else {
|
|
layer.msg(res.msg, {time: 1500});
|
|
}
|
|
}
|
|
})
|
|
|
|
})
|
|
|
|
var time = 60;
|
|
|
|
function code() {
|
|
var but = $('#getcode');
|
|
if (time == 0) {
|
|
but.attr('disabled', false);
|
|
but.html('获取验证码');
|
|
time = 60;
|
|
return;
|
|
} else {
|
|
but.attr('disabled', true);
|
|
but.html("重新获取(" + time + "s)");
|
|
time--;
|
|
}
|
|
setTimeout(function () {
|
|
code();
|
|
}, 1000)
|
|
}
|
|
})
|
|
</script> |