You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
3.7 KiB
103 lines
3.7 KiB
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>打印初始页面</title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
|
|
<link rel="stylesheet" href="/static/css/public.css" media="all">
|
|
</head>
|
|
<body>
|
|
<div class="layuimini-container">
|
|
<div class="layuimini-main">
|
|
<fieldset class="table-search-fieldset">
|
|
<legend>打印</legend>
|
|
<form class="layui-form layui-form-pane"
|
|
style="margin: 0 auto;max-width: 700px;padding-top: 5px; padding-bottom: 50px" lay-filter="form1">
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">打印机:</label>
|
|
<div class="layui-input-inline">
|
|
<select name="printer" id="printer">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">打印设置:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="button" class="layui-btn layui-btn-primary" onclick="print_setting()" value="设置" style="width: 100%">
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
|
|
<script>
|
|
function print_setting(){
|
|
|
|
}
|
|
|
|
layui.use(['form','dropdown'],function () {
|
|
var $ = layui.jquery,
|
|
form = layui.form,
|
|
dropdown = layui.dropdown;
|
|
layui.$(function () {
|
|
$.ajax({
|
|
url:"/Epson/GetPrinterInfoList",
|
|
type:"post",
|
|
dataType:"json",
|
|
contentType: "application/json;charset=utf-8",
|
|
beforeSend: function () {
|
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
|
|
},
|
|
success:function (data) {
|
|
layer.close(this.layerIndex);
|
|
data = data.data;
|
|
if(data === null){
|
|
layer.msg("暂未查询到爱普生打印机,请确认",{
|
|
icon:0,
|
|
time:1000
|
|
},function () {
|
|
var index = parent.layer.getFrameIndex(window.name);
|
|
parent.layer.close(index);//关闭当前页
|
|
})
|
|
}else{
|
|
let printer_list = $("#printer");
|
|
printer_list.empty();
|
|
$.each(data,function (index,item) {
|
|
printer_list.append(new Option(item,index))
|
|
});
|
|
form.render();
|
|
}
|
|
}
|
|
})
|
|
});
|
|
|
|
|
|
print_setting = function () {
|
|
layer.open({
|
|
type: 2,
|
|
title: '打印设置',
|
|
skin: 'layui-layer-rim',
|
|
maxmin: true,
|
|
shadeClose: true, //点击遮罩关闭层
|
|
area: ['100%', '100%'],
|
|
move: '.layui-layer-title',
|
|
fixed: false,
|
|
content: '/printSetting?index='+$("#printer").val(),
|
|
})
|
|
}
|
|
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|