@ -0,0 +1,8 @@ |
|||
$(window).scroll(function () { |
|||
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop; |
|||
if(scrollTop > 200){ |
|||
$("#returnTop").show(); |
|||
}else{ |
|||
$("#returnTop").hide(); |
|||
} |
|||
}); |
|||
@ -0,0 +1,66 @@ |
|||
(function(exports){ |
|||
|
|||
function minigrid(containerSelector, itemSelector, gutter, animate, done) { |
|||
var forEach = Array.prototype.forEach; |
|||
var containerEle = document.querySelector(containerSelector); |
|||
var itemsNodeList = document.querySelectorAll(itemSelector); |
|||
gutter = gutter || 8; |
|||
containerEle.style.width = ''; |
|||
var containerWidth = containerEle.getBoundingClientRect().width; |
|||
var firstChildWidth = itemsNodeList[0].getBoundingClientRect().width + gutter; |
|||
var cols = Math.max(Math.floor((containerWidth - gutter) / firstChildWidth), 1); |
|||
var count = 0; |
|||
containerWidth = (firstChildWidth * cols + gutter) + 'px'; |
|||
containerEle.style.width = containerWidth; |
|||
|
|||
for (var itemsGutter = [], itemsPosX = [], g = 0; g < cols; g++) { |
|||
itemsPosX.push(g * firstChildWidth + gutter); |
|||
itemsGutter.push(gutter); |
|||
} |
|||
|
|||
forEach.call(itemsNodeList, function(item){ |
|||
var itemIndex = itemsGutter.slice(0).sort(function (a, b) { |
|||
return a - b; |
|||
}).shift(); |
|||
itemIndex = itemsGutter.indexOf(itemIndex); |
|||
var posX = itemsPosX[itemIndex]; |
|||
var posY = itemsGutter[itemIndex]; |
|||
var transformProps = [ |
|||
'webkitTransform', |
|||
'MozTransform', |
|||
'msTransform', |
|||
'OTransform', |
|||
'transform' |
|||
]; |
|||
if (!animate) { |
|||
forEach.call(transformProps, function(transform){ |
|||
item.style[transform] = 'translate(' + posX + 'px,' + posY + 'px)'; |
|||
}); |
|||
} |
|||
itemsGutter[itemIndex] += item.getBoundingClientRect().height + gutter; |
|||
count = count + 1; |
|||
if (animate) { |
|||
return animate(item, posX, posY, count); |
|||
} |
|||
}); |
|||
|
|||
var containerHeight = itemsGutter.slice(0).sort(function (a, b) { |
|||
return a - b; |
|||
}).pop(); |
|||
|
|||
containerEle.style.height = containerHeight + 'px'; |
|||
|
|||
if (typeof done === 'function'){ |
|||
done(); |
|||
} |
|||
} |
|||
|
|||
if (typeof define === 'function' && define.amd) { |
|||
define(function() { return minigrid; }); |
|||
} else if (typeof module !== 'undefined' && module.exports) { |
|||
module.exports = minigrid; |
|||
} else { |
|||
exports.minigrid = minigrid; |
|||
} |
|||
|
|||
})(this); |
|||
@ -0,0 +1,228 @@ |
|||
<!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"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
|
|||
<style> |
|||
.inputdiv { |
|||
display: flex; |
|||
background-color: #fff; |
|||
height: 38px; |
|||
line-height: 38px; |
|||
border: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
.layui-form-label { |
|||
padding: 9px 0px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.layui-input-block { |
|||
margin-left: 80px; |
|||
} |
|||
|
|||
.inputdiv .layui-unselect { |
|||
border-style: none; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<form class="layui-form layui-form-pane" action=""> |
|||
|
|||
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">存货编码</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getCode()}" name="code" id="code" readonly |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料名称</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getMname()}" name="mname" readonly |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">规格型号</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getVersion()}" name="version" autocomplete="off" readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">品牌:</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" class="layui-input" th:value="${record.getBrand()}" readonly |
|||
name="brand"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料类型</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" class="layui-input" id="openSonByMateralType" readonly |
|||
th:value="${record.getTypeName()}" |
|||
lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">材质</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getTexture()}" name="texture" autocomplete="off" readonly |
|||
class="layui-input"> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">计量单位</label> |
|||
<div class="layui-input-inline"> |
|||
<select id="unit"> |
|||
<option value="-1" th:text="${record.getUnit()}"></option> |
|||
<option th:each="splitInfo,iterStar:${record.getSplitInfoList()}" |
|||
th:value="${splitInfo?.getNewUnit()}" |
|||
th:text="${splitInfo?.getNewUnit()}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">所处仓库</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getDepositoryName()}" name="depositoryName" required |
|||
autocomplete="off" readonly |
|||
class="layui-input"> |
|||
<input type="text" id="depositoryId" th:value="${record.getDepositoryId()}" style="display: none"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">所处库位</label> |
|||
<div class="layui-input-inline"> |
|||
<button th:each="placeP,iterStar:${record.getPlacePList()}" |
|||
th:attr="id=${record.getMid()}" class="layui-btn layui-btn-customize" |
|||
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}" |
|||
th:text="${placeP.getKingdeecode()}"> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">数量</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getQuantity()}" name="quantity" required autocomplete="off" |
|||
id="quantity" readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">单价</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" id="price" |
|||
readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">总额</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getAmounts()}" name="amounts" required autocomplete="off" id="amounts" |
|||
readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-input-block"> |
|||
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button> |
|||
|
|||
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
|
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
<script> |
|||
function applicationIn() { |
|||
|
|||
} |
|||
|
|||
function applicationOut() { |
|||
|
|||
} |
|||
|
|||
|
|||
// 用于标志是否为第一次提交 |
|||
let flagForForm = false; |
|||
var barCode = []; |
|||
var flag = false; |
|||
layui.use(['form', 'laydate', 'miniTab'], function () { |
|||
var form = layui.form, |
|||
laydate = layui.laydate, |
|||
$ = layui.$, |
|||
miniTab = layui.miniTab; |
|||
|
|||
miniTab.listen(); |
|||
|
|||
form.on('select()', function (data) { |
|||
var id = data.elem.id; //得到select原始DOM对象id |
|||
var req = {}; |
|||
req.id = $("#id").val(); |
|||
req.unit = data.value; |
|||
$.ajax({ |
|||
url: "/material/findSplitInventoryByUnit", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify(req), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
$("#quantity").val(d.data) |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
applicationOut = function () { |
|||
var index = layer.open({ |
|||
title: '出库申请', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/application_out_back?code=' + $("#code").val() + "&depositoryId=" + $("#depositoryId").val() |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
return false; |
|||
}; |
|||
|
|||
applicationIn = function () { |
|||
var index = layer.open({ |
|||
title: '入库申请', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/application_in_back?mid=' + $("#id").val() + "&depositoryId=" + $("#depositoryId").val() |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
return false; |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,232 @@ |
|||
<!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"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
|
|||
<style> |
|||
.inputdiv { |
|||
display: flex; |
|||
background-color: #fff; |
|||
height: 38px; |
|||
line-height: 38px; |
|||
border: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
.layui-form-label { |
|||
padding: 9px 0px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.layui-input-block { |
|||
margin-left: 80px; |
|||
} |
|||
|
|||
.inputdiv .layui-unselect { |
|||
border-style: none; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<form class="layui-form layui-form-pane" action=""> |
|||
|
|||
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">存货编码</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getCode()}" name="code" id="code" readonly |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料名称</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getMname()}" name="mname" readonly |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">规格型号</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getVersion()}" name="version" autocomplete="off" readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">品牌:</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" class="layui-input" th:value="${record.getBrand()}" readonly |
|||
name="brand"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料类型</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" class="layui-input" id="openSonByMateralType" readonly |
|||
th:value="${record.getTypeName()}" |
|||
lay-verify="required"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">材质</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getTexture()}" name="texture" autocomplete="off" readonly |
|||
class="layui-input"> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">计量单位</label> |
|||
<div class="layui-input-inline"> |
|||
<select id="unit"> |
|||
<option value="-1" th:text="${record.getUnit()}"></option> |
|||
<option th:each="splitInfo,iterStar:${record.getSplitInfoList()}" |
|||
th:value="${splitInfo?.getNewUnit()}" |
|||
th:text="${splitInfo?.getNewUnit()}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">所处仓库</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getDepositoryName()}" name="depositoryName" required |
|||
autocomplete="off" readonly |
|||
class="layui-input"> |
|||
<input type="text" id="depositoryId" th:value="${record.getDepositoryId()}" style="display: none"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">所处库位</label> |
|||
<div class="layui-input-inline"> |
|||
<button th:each="placeP,iterStar:${record.getPlacePList()}" |
|||
th:attr="id=${record.getMid()}" class="layui-btn layui-btn-customize" |
|||
onclick="changePlaceCode(this)" th:value="${record.getDepositoryId()}" |
|||
th:text="${placeP.getKingdeecode()}"> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">数量</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getQuantity()}" name="quantity" required autocomplete="off" |
|||
id="quantity" readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">单价</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getPrice()}" name="price" required autocomplete="off" id="price" |
|||
readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">总额</label> |
|||
<div class="layui-input-inline"> |
|||
<input type="text" th:value="${record.getAmounts()}" name="amounts" required autocomplete="off" id="amounts" |
|||
readonly |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-input-block"> |
|||
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationIn()">入库申请</button> |
|||
|
|||
<button class="layui-btn layui-btn-customize" type="button" onclick="applicationOut()">出库申请</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
|
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
<script> |
|||
function applicationIn() { |
|||
|
|||
} |
|||
|
|||
function applicationOut() { |
|||
|
|||
} |
|||
|
|||
|
|||
// 用于标志是否为第一次提交 |
|||
let flagForForm = false; |
|||
var barCode = []; |
|||
var flag = false; |
|||
layui.use(['form', 'laydate', 'miniTab'], function () { |
|||
var form = layui.form, |
|||
laydate = layui.laydate, |
|||
$ = layui.$, |
|||
miniTab = layui.miniTab; |
|||
|
|||
miniTab.listen(); |
|||
|
|||
form.on('select()', function (data) { |
|||
var id = data.elem.id; //得到select原始DOM对象id |
|||
var req = {}; |
|||
req.id = $("#id").val(); |
|||
req.unit = data.value; |
|||
$.ajax({ |
|||
url: "/material/findSplitInventoryByUnit", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify(req), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
$("#quantity").val(d.data) |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
applicationOut = function () { |
|||
$.ajax({ |
|||
url: "/material/temporaryValue", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify({"id": $("#id").val(),"type":"Out"}), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
miniTab.openNewTabByIframeNew({ |
|||
href: "/application_Out_temporaryValue", |
|||
title: "出库申请" |
|||
}); |
|||
|
|||
} |
|||
}); |
|||
return false; |
|||
}; |
|||
|
|||
applicationIn = function () { |
|||
$.ajax({ |
|||
url: "/material/temporaryValue", |
|||
type: "post", |
|||
dataType: 'json', |
|||
data: JSON.stringify({"id": $("#id").val(),"type":"In"}), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (d) { |
|||
miniTab.openNewTabByIframeNew({ |
|||
href: "/application_In_temporaryValue", |
|||
title: "入库申请" |
|||
}); |
|||
|
|||
} |
|||
}); |
|||
return false; |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,266 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">申请时间</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" style="display:inline;width: 101px;" id="startDate" |
|||
name="startDate" autocomplete="off" placeholder="开始日期" |
|||
class="layui-input"> |
|||
- |
|||
<input type="text" style="display:inline;width: 101px;" id="endDate" |
|||
name="endDate" autocomplete="off" placeholder="结束日期" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">仓库:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择仓库" class="layui-input" |
|||
id="openSonByDepository" readonly onclick="openDepositoryTree(this)" |
|||
/> |
|||
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" |
|||
style="display: none"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料名称:</label> |
|||
<div class="layui-input-block"> |
|||
<input id="mname" name="mname" type="text" placeholder="请填写物料名称" |
|||
class="layui-input"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mcode" autocomplete="off" class="layui-input" |
|||
placeholder="请填写物料编码"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">型号</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="version" name="version" |
|||
autocomplete="off" placeholder="请填写物料型号"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">记录编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="code" name="code" autocomplete="off" |
|||
placeholder="请填写申请记录编码"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<ul class="flow-default" id="LAY_applicationIn"></ul> |
|||
|
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
// 用于加载仓库菜单 |
|||
function openDepositoryTree(obj) { |
|||
} |
|||
|
|||
function showDetail() { |
|||
|
|||
} |
|||
|
|||
layui.use(['form', 'flow', 'laydate'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow, |
|||
laydate = layui.laydate; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
|
|||
flow.load({ |
|||
elem: '#LAY_applicationIn' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
$.get('/depositoryRecord/applicationInView?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
let brandItem ='<p>' + "物料品牌:"+result[i].mbrand + '</p>'; |
|||
if(result[i].mbrand === ""){ |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].applicantName + "的入库申请" + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + "物料名称:"+ result[i].mname + '</p>' |
|||
+ '<p>' + "物料型号:"+result[i].mversion + '</p>' |
|||
+ brandItem |
|||
+ '<p>' + "入库数量:"+result[i].quantity + " : " + result[i].airUnit + '</p>' |
|||
+ '<p>' + "入库位置:"+result[i].depositoryName+"-"+result[i].pkingdeecode + '</p>' |
|||
+ '<p style="text-align: right">' + "申请时间:"+ result[i].applicantTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
// 用于打开仓库树形菜单 |
|||
openDepositoryTree = function (obj) { |
|||
var parent = obj.parentNode.parentNode.parentNode; |
|||
var parentId = parent.id; |
|||
layer.open({ |
|||
type: 2, |
|||
title: '仓库列表', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/selectDepository?type=1&clickObj=' + parentId, |
|||
}); |
|||
}; |
|||
|
|||
|
|||
//日期 |
|||
laydate.render({ |
|||
elem: '#startDate' |
|||
}); //日期 |
|||
laydate.render({ |
|||
elem: '#endDate' |
|||
}); |
|||
|
|||
|
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
if (data.mname !== '') { |
|||
req.mname = data.mname.trim(); |
|||
} |
|||
if (data.depositoryId !== '') { |
|||
req.depositoryId = data.depositoryId; |
|||
} |
|||
if (data.startDate !== '') { |
|||
req.startDate = data.startDate; |
|||
} |
|||
if (data.endDate !== '') { |
|||
req.endDate = data.endDate; |
|||
} |
|||
if (data.code !== '') { |
|||
req.code = data.code.trim(); |
|||
} |
|||
if (data.mcode !== '') { |
|||
req.mcode = data.mcode.trim(); |
|||
} |
|||
if (data.version !== '') { |
|||
req.version = data.version.trim(); |
|||
} |
|||
|
|||
updateFlow(req); |
|||
//执行搜索重载 |
|||
return false; |
|||
|
|||
}); |
|||
|
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_applicationIn").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_applicationIn' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result = []; |
|||
let lis = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/depositoryRecord/applicationInView", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
|
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].applicantName + "的入库申请" + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + result[i].mname + '</p>' |
|||
+ '<p>' + result[i].mversion + '</p>' |
|||
+ '<p>' + result[i].mbrand + '</p>' |
|||
+ '<p>' + result[i].quantity + " : " + result[i].airUnit + '</p>' |
|||
+ '<p>' + result[i].depositoryName + '</p>' |
|||
+ '<p style="text-align: right">' + result[i].applicantTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
|
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '入库信息详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/form_step_look?id=' + obj, |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
return false; |
|||
} |
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,297 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">申请时间</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" style="display:inline;width: 101px;" id="startDate" |
|||
name="startDate" |
|||
autocomplete="off" placeholder="开始日期" class="layui-input"> |
|||
- |
|||
<input type="text" style="display:inline;width: 101px;" id="endDate" |
|||
name="endDate" |
|||
autocomplete="off" placeholder="结束日期" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">仓库</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择仓库" class="layui-input" |
|||
id="openSonByDepository" |
|||
readonly/> |
|||
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" |
|||
style="display: none"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">记录编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="code" name="code" autocomplete="off" |
|||
placeholder="请输入申请记录编码"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料名称:</label> |
|||
<div class="layui-input-block"> |
|||
<input id="mname" name="mname" type="text" placeholder="请填写物料名称" |
|||
class="layui-input"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mcode" autocomplete="off" class="layui-input" |
|||
placeholder="请填写物料编码"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">型号</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="version" name="version" |
|||
autocomplete="off" |
|||
placeholder="请填写物料型号"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<ul class="flow-default" id="LAY_applicationOut"></ul> |
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
var data; |
|||
|
|||
function showDetail() { |
|||
|
|||
} |
|||
|
|||
|
|||
// 用于加载仓库菜单 |
|||
function selectMaterialByName(obj) { |
|||
} |
|||
|
|||
layui.use(['form', 'flow', 'laydate', 'element'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow, |
|||
laydate = layui.laydate, |
|||
element = layui.element; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
|
|||
|
|||
flow.load({ |
|||
elem: '#LAY_applicationOut' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
|
|||
$.get('/depositoryRecord/applicationOutView?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].applicantName + "的出库申请" + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + "物料名称:"+ result[i].mname + '</p>' |
|||
+ '<p>' + "物料型号:" +result[i].mversion + '</p>' |
|||
+ '<p>' + "申请总数:" + result[i].quantity + '</p>' |
|||
+ '<p>' + "所处仓库:" + result[i].depositoryName + '</p>' |
|||
+ '<p style="text-align: right">' + "申请时间:"+ result[i].applicantTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
$('#openSonByDepository').on('click', function () { |
|||
layer.open({ |
|||
type: 2, |
|||
title: '弹窗内容', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/selectDepository?type=2', |
|||
success: function (layero, index) { |
|||
var children = layero.children(); |
|||
var content = $(children[1]); |
|||
var iframeChildren = $(content.children()); |
|||
content.css('height', '100%'); |
|||
iframeChildren.css('height', '100%'); |
|||
} |
|||
}); |
|||
}); |
|||
//用于实现物料名称搜索 |
|||
selectMaterialByName = function (obj) { |
|||
// 输入code |
|||
var data = obj.value; |
|||
// 获取对应元素 |
|||
var req = {}; |
|||
layer.open({ |
|||
type: 2, |
|||
title: '弹窗内容', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
content: '/getMaterialAll?type=1&mname=""', |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
success: function (layero, index) { |
|||
var children = layero.children(); |
|||
var content = $(children[1]); |
|||
var iframeChildren = $(content.children()); |
|||
content.css('height', '100%'); |
|||
iframeChildren.css('height', '100%'); |
|||
} |
|||
|
|||
}); |
|||
}; |
|||
|
|||
//日期 |
|||
laydate.render({ |
|||
elem: '#startDate' |
|||
}); //日期 |
|||
laydate.render({ |
|||
elem: '#endDate' |
|||
}); |
|||
|
|||
|
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
if (data.mid !== '') { |
|||
req.mid = data.mid; |
|||
} |
|||
if (data.depositoryId !== '') { |
|||
req.depositoryId = data.depositoryId; |
|||
} |
|||
if (data.startDate !== '') { |
|||
req.startDate = data.startDate; |
|||
} |
|||
if (data.endDate !== '') { |
|||
req.endDate = data.endDate; |
|||
} |
|||
if (data.mcode !== '') { |
|||
req.mcode = data.mcode.trim(); |
|||
} |
|||
if (data.code !== '') { |
|||
req.code = data.code.trim(); |
|||
} |
|||
if (data.mname !== '') { |
|||
req.mname = data.mname.trim(); |
|||
} |
|||
|
|||
if (data.version !== '') { |
|||
req.version = data.version.trim(); |
|||
} |
|||
//执行搜索重载 |
|||
updateFlow(req); |
|||
return false; |
|||
}); |
|||
|
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_applicationOut").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_applicationOut' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result = []; |
|||
let lis = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/depositoryRecord/applicationOutView", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].applicantName + "的出库申请" + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + result[i].mname + '</p>' |
|||
+ '<p>' + result[i].mversion + '</p>' |
|||
+ '<p>' + result[i].mbrand + '</p>' |
|||
+ '<p>' + result[i].depositoryName + '</p>' |
|||
+ '<p style="text-align: right">' + result[i].applicantTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '出库信息详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/ApplicationOutView?id=' + obj, |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,328 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all"> |
|||
</head> |
|||
<body> |
|||
<style> |
|||
.clearfix:after, .clearfix:before { |
|||
content: ""; |
|||
display: table; |
|||
} |
|||
|
|||
.clearfix:after { |
|||
clear: both; |
|||
} |
|||
|
|||
.clearfix { |
|||
*zoom: 1; |
|||
} |
|||
</style> |
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<input style="display: none" th:value="${number}" id="number"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">仓库</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择仓库" class="layui-input" |
|||
id="openSonByDepository" |
|||
readonly/> |
|||
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" |
|||
style="display: none"/> |
|||
<input type="text" name="placeId" id="placeId" style="display: none"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">类型</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择物料类型" class="layui-input" |
|||
id="openSonByMateralType" |
|||
readonly/> |
|||
<input type="text" id="materialTypeId" placeholder="请选择物料类型" |
|||
name="materialTypeId" |
|||
class="layui-input" style="display: none"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料名称</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mname" autocomplete="off" class="layui-input" |
|||
placeholder="请填写物料名称"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">存货编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="code" autocomplete="off" class="layui-input" |
|||
placeholder="请填写物料编码"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">型号</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="version" name="version" |
|||
autocomplete="off" |
|||
placeholder="请填写物料型号"/> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<ul class="flow-default" id="LAY_Inventory"></ul> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
var data; |
|||
|
|||
function changePlaceCode() { |
|||
} |
|||
|
|||
function changeUnit() { |
|||
} |
|||
|
|||
function closeShowDataMessage() { |
|||
|
|||
} |
|||
|
|||
function showDetail() { |
|||
|
|||
} |
|||
|
|||
function updateFlow() { |
|||
|
|||
} |
|||
|
|||
let socket = null; |
|||
|
|||
let newIndexShade; |
|||
|
|||
|
|||
layui.use(['form', 'upload', 'flow', 'element'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow, |
|||
element = layui.element; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
|
|||
|
|||
flow.load({ |
|||
elem: '#LAY_Inventory' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
|
|||
$.get('/material/findInventory?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
|
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
let brandItem = '<p>' + "物料品牌:" + result[i].brand + '</p>'; |
|||
if (result[i].brand === "") { |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p>' + "物料编码:" + result[i].code + '</p>' |
|||
+ '<p>' + "物料型号:" + result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '<p>' + "物料类型:" + result[i].typeName + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
|
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
$('#openSonByDepository').on('click', function () { |
|||
layer.open({ |
|||
type: 2, |
|||
title: '弹窗内容', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/selectDepository?type=1', |
|||
success: function (layero, index) { |
|||
var children = layero.children(); |
|||
var content = $(children[1]); |
|||
var iframeChildren = $(content.children()); |
|||
content.css('height', '100%'); |
|||
iframeChildren.css('height', '100%'); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
$('#openSonByMateralType').on('click', function () { |
|||
layer.open({ |
|||
type: 2, |
|||
title: '弹窗内容', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/selectType', |
|||
success: function (layero, index) { |
|||
var children = layero.children(); |
|||
var content = $(children[1]); |
|||
var iframeChildren = $(content.children()); |
|||
content.css('height', '100%'); |
|||
iframeChildren.css('height', '100%'); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
|
|||
// 用于进行渲染库位编码 |
|||
form.on('switch(createPlaceCode)', function (obj) { |
|||
console.log(obj) |
|||
}); |
|||
|
|||
// 监听库位修改操作 |
|||
|
|||
|
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
if (data.mname !== '') { |
|||
req.mname = data.mname.trim(); |
|||
} |
|||
if (data.depositoryId !== '') { |
|||
req.depositoryId = data.depositoryId; |
|||
} |
|||
if (data.placeId !== '') { |
|||
req.placeId = data.placeId; |
|||
} |
|||
if (data.code !== '') { |
|||
req.mcode = data.code.trim(); |
|||
} |
|||
if (data.version !== '') { |
|||
req.version = data.version.trim(); |
|||
} |
|||
if (data.materialTypeId !== '') { |
|||
req.materialTypeId = data.materialTypeId; |
|||
} |
|||
updateFlow(req); |
|||
//执行搜索重载 |
|||
return false; |
|||
}); |
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_Inventory").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_Inventory' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let lis = []; |
|||
let result = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/material/findInventory", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p>' + result[i].code + '</p>' |
|||
+ '<p>' + result[i].version + '</p>' |
|||
+ '<p>' + "品牌:" + result[i].brand + '</p>' |
|||
+ '<p>' + result[i].typeName + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
|
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
|
|||
} |
|||
}) |
|||
}; |
|||
|
|||
|
|||
closeShowDataMessage = function () { |
|||
$("#layui-layer-shade-x" + newIndexShade).remove(); |
|||
$("#showImportData").hide(); |
|||
$("#showDataContent").empty(); |
|||
if (socket !== null) { |
|||
socket.close(); |
|||
} |
|||
}; |
|||
|
|||
|
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '库存信息详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/InventoryView?id=' + obj, |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
return false; |
|||
} |
|||
|
|||
}); |
|||
|
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,211 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
|
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">创建日期</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="createTime" id="date" placeholder="请选择创建日期" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">组合名称</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="name" autocomplete="off" class="layui-input" |
|||
placeholder="请输入组合名称"> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">组合编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="code" autocomplete="off" class="layui-input" |
|||
placeholder="请输入组合编码"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">状态</label> |
|||
<div class="layui-input-block"> |
|||
<select id="state" name="state"> |
|||
<option value="" selected>请选择状态</option> |
|||
<option value="1">启用</option> |
|||
<option value="2">禁用</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<ul class="flow-default" id="LAY_group"></ul> |
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
// 用于查看并修改组合中的物料信息 |
|||
function showDetail() { |
|||
|
|||
} |
|||
|
|||
layui.use(['form', 'flow', 'laydate'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow, |
|||
laydate = layui.laydate; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
//日期 |
|||
laydate.render({ |
|||
elem: '#date' |
|||
}); |
|||
|
|||
flow.load({ |
|||
elem: '#LAY_group' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
|
|||
$.get('/group/findAllGroup?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].gname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' +"组合编码:"+ result[i].code + '</p>' |
|||
+ '<p>' + "包含物料:"+Object.keys(result[i].materialSimple).toString() + '</p>' |
|||
+ '<p>' + "备注说明:"+result[i].remark + '</p>' |
|||
+ '<p style="text-align: right">' +"创建时间:"+ result[i].createTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
if (data.code !== '') { |
|||
req.code = data.code; |
|||
} |
|||
if (data.createTime !== '') { |
|||
req.createTime = data.createTime; |
|||
} |
|||
if (data.state !== '') { |
|||
req.state = data.state; |
|||
} |
|||
if (data.name !== '') { |
|||
req.gname = data.name; |
|||
} |
|||
|
|||
updateFlow(req); |
|||
return false; |
|||
}); |
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_group").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_group' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/group/findAllGroup", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + result[i].gname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + result[i].code + '</p>' |
|||
+ '<p>' + Object.keys(result[i].materialSimple).toString() + '</p>' |
|||
+ '<p>' + result[i].remark + '</p>' |
|||
+ '<p style="text-align: right">' + result[i].createTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
|
|||
//用于查看并修改组合中的物料信息 |
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '组合详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/group_edit?id=' + obj, |
|||
end: function () { |
|||
} |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
|
|||
}; |
|||
|
|||
}) |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,200 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<input id="id" th:value="${id}" style="display:none;"> |
|||
|
|||
<fieldset class="table-search-fieldset"> |
|||
<legend>基本信息</legend> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">组合名称</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="gname" id="gname" placeholder="请输入组合名称" |
|||
th:value="${record.getGname()}" onblur="editGroupName(this)" |
|||
autocomplete="off" class="layui-input"> |
|||
<input type="text" name="gid" id="gid" placeholder="请输入组合名称" |
|||
th:value="${record.getId()}" style="display:none;" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">备注说明</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="applyRemark" id="applyRemark" placeholder="请输入备注说明" |
|||
th:value="${record.getRemark()}" onblur="editGroupRemark(this)" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">组合编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="gcode" id="gcode" placeholder="请输入组合编码" |
|||
th:value="${record.getCode()}" readonly |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
</fieldset> |
|||
|
|||
<ul class="flow-default" id="LAY_group"></ul> |
|||
</div> |
|||
</div> |
|||
|
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
// 用于通过编码查询物料 |
|||
function selectMaterialByCode(obj) { |
|||
} |
|||
|
|||
// 用于点击搜索按钮 |
|||
function selectMaterial(obj) { |
|||
} |
|||
|
|||
// 用于修改组合名称 |
|||
function editGroupName(obj) { |
|||
} |
|||
|
|||
// 用于修改组合备注 |
|||
function editGroupRemark(obj) { |
|||
} |
|||
|
|||
// 用于创建二维码 |
|||
function createQrCode(obj) { |
|||
} |
|||
|
|||
layui.use(['form', 'flow'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow; |
|||
// 加载表格 |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
let id = $("#id").val(); |
|||
flow.load({ |
|||
elem: '#LAY_group' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
|
|||
$.get('/group/findGroupInfo?page=' + page + '&size=' + size + '&gid=' + id, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
|
|||
let brandItem = '<p>' + "物料品牌:" + result[i].brand + '</p>'; |
|||
if (result[i].brand === "") { |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].mid + ')"><div class="layui-card-header"><h2>' + result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + "物料编码:" + result[i].mcode + '</p>' |
|||
+ '<p>' + "物料型号:" + result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '<p>' + "包含数量:" + result[i].quantity + ":" + result[i].showUnit + '</p>' |
|||
+ '<p style="text-align: right">' + "创建时间:" + result[i].showCreateTime + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
|
|||
// 用于修改组合名称 |
|||
editGroupName = function (obj) { |
|||
let gid = $("#gid").val(); |
|||
let gname = obj.value; |
|||
let req = {}; |
|||
req.id = gid; |
|||
req.gname = gname; |
|||
$.ajax({ |
|||
url: '/group/editGroupInfo', |
|||
dataType: "json", |
|||
type: "post", |
|||
data: JSON.stringify(req), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (data) { |
|||
if (data.status >= 300) { |
|||
layer.msg(data.statusInfo.message);//失败的表情 |
|||
|
|||
} else { |
|||
|
|||
} |
|||
} |
|||
|
|||
}); |
|||
}; |
|||
|
|||
// 用于修改组合备注 |
|||
editGroupRemark = function (obj) { |
|||
let gid = $("#gid").val(); |
|||
let applyRemark = obj.value; |
|||
let req = {}; |
|||
req.id = gid; |
|||
req.applyRemark = applyRemark; |
|||
$.ajax({ |
|||
url: '/group/editGroupInfo', |
|||
dataType: "json", |
|||
type: "post", |
|||
data: JSON.stringify(req), |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (data) { |
|||
if (data.status >= 300) { |
|||
layer.msg(data.statusInfo.message);//失败的表情 |
|||
|
|||
} else { |
|||
|
|||
} |
|||
} |
|||
|
|||
}); |
|||
}; |
|||
|
|||
showDetail = function (obj) { |
|||
layer.open({ |
|||
type: 2, |
|||
title: "物料明细", |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['100%', '100%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/materialForGroup?mid=' + obj + '&gid=' + id, |
|||
end: function () { |
|||
} |
|||
}); |
|||
} |
|||
|
|||
|
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,279 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all"> |
|||
</head> |
|||
<body> |
|||
|
|||
|
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<input style="display:none;" id="nowDay" th:value="${nowDay}"> |
|||
<input style="display:none;" id="display" th:value="${display}"> |
|||
<input style="display: none" th:value="${number}" id="number"> |
|||
|
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
|
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">种类</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" placeholder="请选择物料类型" class="layui-input" |
|||
id="openSonByMateralType" |
|||
readonly/> |
|||
<input type="text" id="materialTypeId" placeholder="请选择物料类型" |
|||
name="materialTypeId" |
|||
class="layui-input" style="display: none"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料名称</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mname" autocomplete="off" class="layui-input" |
|||
placeholder="请输入物料名称"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">型号</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="version" name="version" |
|||
autocomplete="off" |
|||
placeholder="请输入物料型号"/> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="code" autocomplete="off" class="layui-input" |
|||
placeholder="请输入物料编码"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">状态</label> |
|||
<div class="layui-input-block"> |
|||
<select name="state"> |
|||
<option value="">请选择状态</option> |
|||
<option value="1">启用</option> |
|||
<option value="2">禁用</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<ul class="flow-default" id="LAY_material"></ul> |
|||
|
|||
<div id="showImportData" |
|||
style="height: 500px;width: 500px;position: absolute;overflow: auto;top: 10%;left: 25%;background: #ffffff;z-index: 1231234;display: none"> |
|||
<div onclick="closeShowDataMessage()" style="position: absolute; right: 0; top: 2%; cursor: pointer;"> |
|||
<i class="fa fa-window-close-o"></i> |
|||
</div> |
|||
<div id="showDataContent"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
|
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
function bindTableToolbarFunction() { |
|||
|
|||
} |
|||
|
|||
function showDetail() { |
|||
|
|||
} |
|||
|
|||
function closeShowDataMessage() { |
|||
|
|||
} |
|||
|
|||
let socket = null; |
|||
|
|||
let newIndexShade; |
|||
|
|||
|
|||
layui.use(['form', 'table', 'upload', 'flow'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
table = layui.table, |
|||
flow = layui.flow, |
|||
upload = layui.upload; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
|
|||
$('#openSonByMateralType').on('click', function () { |
|||
layer.open({ |
|||
type: 2, |
|||
title: '弹窗内容', |
|||
skin: 'layui-layer-rim', |
|||
maxmin: true, |
|||
shadeClose: true, //点击遮罩关闭层 |
|||
area: ['70%', '70%'], |
|||
move: '.layui-layer-title', |
|||
fixed: false, |
|||
content: '/selectType', |
|||
success: function (layero, index) { |
|||
var children = layero.children(); |
|||
var content = $(children[1]); |
|||
var iframeChildren = $(content.children()); |
|||
content.css('height', '100%'); |
|||
iframeChildren.css('height', '100%'); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
|
|||
flow.load({ |
|||
elem: '#LAY_material' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
$.get('/material/material?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
let brandItem ='<p>' + "物料品牌:"+result[i].brand + '</p>'; |
|||
if(result[i].brand === ""){ |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + "物料名称:"+result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p>' + "物料编码:"+result[i].code + '</p>' |
|||
+ '<p>' +"物料型号:"+ result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
|
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
req.type = 1; |
|||
if (data.mname !== '') { |
|||
req.mname = data.mname; |
|||
} |
|||
if (data.version !== '') { |
|||
req.version = data.version; |
|||
} |
|||
if (data.materialTypeId !== '') { |
|||
req.materialTypeId = data.materialTypeId; |
|||
} |
|||
if (data.state !== '') { |
|||
req.state = data.state; |
|||
} |
|||
if (data.code !== '') { |
|||
req.code = data.code |
|||
} |
|||
updateFlow(req); |
|||
return false; |
|||
}); |
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_material").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_material' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/material/material", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
let brandItem ='<p>' + "物料品牌:"+result[i].brand + '</p>'; |
|||
if(result[i].brand === ""){ |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + "物料名称:"+result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p>' + "物料编码:"+result[i].code + '</p>' |
|||
+ '<p>' +"物料型号:"+ result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
|
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '物料信息详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/material_view?id=' + obj, |
|||
end: function () { |
|||
//执行搜索重载 |
|||
table.reload('currentTableId', { |
|||
url: '/material/material', |
|||
page: { |
|||
curr: 1 |
|||
} |
|||
}, 'data'); |
|||
} |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
return false; |
|||
} |
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,247 @@ |
|||
<!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"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
<link rel="stylesheet" href="/static/css/inputTag.css"> |
|||
<style> |
|||
.inputdiv { |
|||
display: flex; |
|||
background-color: #fff; |
|||
height: 38px; |
|||
line-height: 38px; |
|||
border: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
.layui-card-body { |
|||
padding: 0px; |
|||
} |
|||
|
|||
.layui-form-label { |
|||
padding: 9px 0px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.layui-input-block { |
|||
margin-left: 80px; |
|||
} |
|||
|
|||
.layui-form-select { |
|||
width: 100%; |
|||
height: 38px; |
|||
|
|||
} |
|||
|
|||
.lay-step { |
|||
display: none; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
|
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<div class="layui-fluid"> |
|||
<div class="layui-tab-content"> |
|||
<div class="layui-tab-item layui-show"> |
|||
<div carousel-item style="overflow: inherit"> |
|||
<div> |
|||
<form class="layui-form" |
|||
style="margin: 0 auto;max-width: 700px;" |
|||
id="form1"> |
|||
<div class="layui-card-body" id="takingHeader" style="padding-right: 0px"> |
|||
<input th:value="${id}" style="display: none" id="id"> |
|||
<input th:value="${type}" style="display: none" id="type"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">查看位置</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="localtion" id="localtion" autocomplete="off" |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
<table class="layui-hide" id="currentTableForLocation" |
|||
lay-filter="currentTableFilterForLocation" |
|||
style="margin-top: 123px"></table> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<script id="changeUnit" type="text/html"> |
|||
<a class="layui-btn layui-btn-xs" lay-event="more">{{d.unit}}<i class="layui-icon layui-icon-down"></i></a> |
|||
</script> |
|||
|
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
<script> |
|||
|
|||
function updateTableShowForLocation() { |
|||
|
|||
} |
|||
|
|||
var depositoryId = "-1"; |
|||
var placeId = "0"; |
|||
|
|||
layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () { |
|||
var $ = layui.$, |
|||
table = layui.table, |
|||
inputTag = layui.inputTag, |
|||
dropdown = layui.dropdown, //下拉菜单 |
|||
step = layui.step; |
|||
let id = $("#id").val(); |
|||
let type = $("#type").val(); |
|||
|
|||
$(function () { |
|||
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|||
$.ajax({ |
|||
url: "/place/findLocationById", |
|||
data: JSON.stringify({"id": id, "type": type}), |
|||
type: 'post', |
|||
dataType: 'json', |
|||
contentType: "application/json;charset=utf-8", |
|||
beforeSend: function () { |
|||
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
|||
}, |
|||
success: function (res) { |
|||
layer.close(this.layerIndex); |
|||
let location = res.data; |
|||
if (location === null) { |
|||
layer.msg("该位置不存在,请重试", { |
|||
icon: 5, |
|||
time: 1000 |
|||
}, function () { |
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
}) |
|||
} else { |
|||
if ("d" === type) { |
|||
depositoryId = id; |
|||
$("#localtion").val(location.dname); |
|||
} else { |
|||
placeId = id; |
|||
depositoryId = location.did; |
|||
$("#localtion").val(location.depositoryName + "-" + location.kingdeecode); |
|||
} |
|||
updateTableShowForLocation(); |
|||
} |
|||
} |
|||
}); |
|||
layer.close(loading2); |
|||
}); |
|||
|
|||
table.render({ |
|||
elem: "#currentTableForLocation", |
|||
url: '/material/findInventoryForStockTaking', |
|||
parseData: function (res) { //res 即为原始返回的数据 |
|||
return { |
|||
"status": res.status, //解析接口状态 |
|||
"message": res.statusInfo.message, //解析提示文本 |
|||
"count": res.count, //解析数据长度 |
|||
"data": res.data //解析数据列表 |
|||
}; |
|||
}, |
|||
request: { |
|||
pageName: 'page', //页码的参数名称,默认:page |
|||
limitName: 'size' //每页数据量的参数名,默认:limit |
|||
}, |
|||
response: { |
|||
statusName: 'status' //规定数据状态的字段名称,默认:code |
|||
, statusCode: 200 //规定成功的状态码,默认:0 |
|||
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
|||
, countName: 'count' //规定数据总数的字段名称,默认:count |
|||
, dataName: 'data' //规定数据列表的字段名称,默认:data |
|||
}, |
|||
where: { |
|||
depositoryId: "-1" |
|||
}, |
|||
height: 'full-255',//固定高度-即固定表头固定第一行首行 |
|||
cols: [ |
|||
[ |
|||
{field: 'mcode', width: 150, title: '存货编码', fixed: 'left'}, |
|||
{field: 'mname', width: 150, title: '物料名称'}, |
|||
{field: 'typeName', width: 100, title: '物料种类'}, |
|||
{field: 'version', width: 150, title: '规格型号',}, |
|||
{field: 'kingdeecode', width: 150, title: '所处库位',}, |
|||
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|||
{field: 'inventory', width: 100, title: '库存数'}, |
|||
] |
|||
], |
|||
limits: [10, 15, 20, 25, 50, 100], |
|||
limit: 10, |
|||
page: true, |
|||
skin: 'line', |
|||
done: function (res, curr, count) { |
|||
$.each(res['data'], function (i, j) { |
|||
let takingUnit = j["takingUnit"]; |
|||
if (takingUnit !== null) { |
|||
let parentItem = $("[lay-id='currentTableForLocation'] tr:eq(" + (i + 1) + ")"); |
|||
let unitHandleItem = parentItem.children()[5]; |
|||
let quantityHandleItem = parentItem.children()[6]; |
|||
unitHandleItem.childNodes[0].childNodes[1].childNodes[0].data = takingUnit; |
|||
quantityHandleItem.childNodes[0].innerText = j["splitInventory"][takingUnit]; |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
updateTableShowForLocation = function () { |
|||
let req = {}; |
|||
req.depositoryId = depositoryId; |
|||
req.placeId = placeId; |
|||
table.reload('currentTableForLocation', { |
|||
url: '/material/findInventoryForStockTaking', |
|||
page: { |
|||
curr: 1 |
|||
}, |
|||
where: req |
|||
}, 'data'); |
|||
}; |
|||
|
|||
// 用于监听下拉菜单 |
|||
table.on('tool(currentTableFilter)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值" |
|||
var data = obj.data //获得当前行数据 |
|||
, layEvent = obj.event; //获得 lay-event 对应的值 |
|||
if (layEvent === 'more') { |
|||
let splitInfoList = obj.data.splitInfoList; |
|||
if (splitInfoList.length > 0) { |
|||
let dropDownDataList = []; |
|||
for (var i = 0; i < splitInfoList.length; i++) { |
|||
let dropDownData = {}; |
|||
dropDownData.title = splitInfoList[i].newUnit; |
|||
dropDownData.id = obj.data.id; |
|||
dropDownDataList.push(dropDownData); |
|||
} |
|||
dropdown.render({ |
|||
elem: this //触发事件的 DOM 对象 |
|||
, show: true //外部事件触发即显示 |
|||
, data: dropDownDataList |
|||
, click: function (unit) { |
|||
this.elem[0].childNodes[0].data = unit.title; |
|||
obj.tr[0].childNodes[6].childNodes[0].innerText = obj.data.splitInventory[unit.title]; |
|||
} |
|||
, align: 'right' //右对齐弹出(v2.6.8 新增) |
|||
, style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式 |
|||
}) |
|||
} |
|||
//下拉菜单 |
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,260 @@ |
|||
<!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"> |
|||
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all"> |
|||
<link rel="stylesheet" href="/static/css/inputTag.css"> |
|||
<style> |
|||
.inputdiv { |
|||
display: flex; |
|||
background-color: #fff; |
|||
height: 38px; |
|||
line-height: 38px; |
|||
border: 1px solid rgb(238, 238, 238); |
|||
} |
|||
|
|||
.layui-card-body { |
|||
padding: 0px; |
|||
} |
|||
|
|||
.layui-form-label { |
|||
padding: 9px 0px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.layui-input-block { |
|||
margin-left: 80px; |
|||
} |
|||
|
|||
.layui-form-select { |
|||
width: 100%; |
|||
height: 38px; |
|||
|
|||
} |
|||
|
|||
.lay-step { |
|||
display: none; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
|
|||
<div class="layuimini-container"> |
|||
<div class="layuimini-main"> |
|||
<div class="layui-fluid"> |
|||
<div class="layui-tab-content"> |
|||
<div class="layui-tab-item layui-show"> |
|||
<div carousel-item style="overflow: inherit"> |
|||
<div> |
|||
<form class="layui-form" |
|||
style="margin: 0 auto;max-width: 700px;" |
|||
id="form1"> |
|||
<div class="layui-card-body" id="takingHeader" style="padding-right: 0px"> |
|||
<input th:value="${id}" style="display: none" id="id"> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料编码</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mcode" id="mcode" autocomplete="off" |
|||
class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料名称</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mname" id="mname" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料型号</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="version" id="version" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料类型</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="mtype" id="mtype" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
<div class="layui-form-item"> |
|||
<label class="layui-form-label">物料材质</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" name="texture" id="texture" |
|||
autocomplete="off" class="layui-input"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
<table class="layui-hide" id="currentTableForMaterial" |
|||
lay-filter="currentTableFilterForMaterial" |
|||
style="margin-top: 123px"></table> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<script id="changeUnit" type="text/html"> |
|||
<a class="layui-btn layui-btn-xs" lay-event="more">{{d.unit}}<i class="layui-icon layui-icon-down"></i></a> |
|||
</script> |
|||
|
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> |
|||
<script> |
|||
|
|||
function updateTableShowForMaterial() { |
|||
|
|||
} |
|||
|
|||
layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () { |
|||
var $ = layui.$, |
|||
table = layui.table, |
|||
inputTag = layui.inputTag, |
|||
dropdown = layui.dropdown, //下拉菜单 |
|||
step = layui.step; |
|||
let id = $("#id").val(); |
|||
|
|||
$(function () { |
|||
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|||
$.ajax({ |
|||
url: "/material/findOnlyMaterialById", |
|||
data: JSON.stringify({"id": id}), |
|||
type: 'post', |
|||
dataType: 'json', |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
|
|||
let material = res.data; |
|||
if (material === null) { |
|||
layer.msg("该物料不存在,请重试", { |
|||
icon: 5, |
|||
time: 1000 |
|||
}, function () { |
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
}) |
|||
} else { |
|||
$("#mname").val(material.mname); |
|||
$("#mcode").val(material.code); |
|||
$("#version").val(material.version); |
|||
$("#mtype").val(material.typeName); |
|||
$("#texture").val(material.texture); |
|||
} |
|||
} |
|||
}); |
|||
updateTableShowForMaterial(); |
|||
layer.close(loading2); |
|||
}); |
|||
|
|||
table.render({ |
|||
elem: "#currentTableForMaterial", |
|||
url: '/material/findMaterialByConditionForStockTaking', |
|||
parseData: function (res) { //res 即为原始返回的数据 |
|||
return { |
|||
"status": res.status, //解析接口状态 |
|||
"message": res.statusInfo.message, //解析提示文本 |
|||
"count": res.count, //解析数据长度 |
|||
"data": res.data //解析数据列表 |
|||
}; |
|||
}, |
|||
request: { |
|||
pageName: 'page', //页码的参数名称,默认:page |
|||
limitName: 'size' //每页数据量的参数名,默认:limit |
|||
}, |
|||
response: { |
|||
statusName: 'status' //规定数据状态的字段名称,默认:code |
|||
, statusCode: 200 //规定成功的状态码,默认:0 |
|||
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
|||
, countName: 'count' //规定数据总数的字段名称,默认:count |
|||
, dataName: 'data' //规定数据列表的字段名称,默认:data |
|||
}, |
|||
where: { |
|||
depositoryId: "-1" |
|||
}, |
|||
height: 'full-255',//固定高度-即固定表头固定第一行首行 |
|||
cols: [ |
|||
[ |
|||
{field: 'dname', width: 150, title: '所处仓库'}, |
|||
{field: 'kingdeecode', width: 80, title: '所处库位',}, |
|||
{title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|||
{field: 'inventory', width: 100, title: '库存数'} |
|||
] |
|||
], |
|||
limits: [10, 15, 20, 25, 50, 100], |
|||
limit: 10, |
|||
page: true, |
|||
skin: 'line', |
|||
done: function (res, curr, count) { |
|||
$.each(res['data'], function (i, j) { |
|||
let takingUnit = j["takingUnit"]; |
|||
if (takingUnit !== null) { |
|||
let parentItem = $("[lay-id='currentTableForMaterial'] tr:eq(" + (i + 1) + ")"); |
|||
let unitHandleItem = parentItem.children()[6]; |
|||
let quantityHandleItem = parentItem.children()[7]; |
|||
unitHandleItem.childNodes[0].childNodes[1].childNodes[0].data = takingUnit; |
|||
quantityHandleItem.childNodes[0].innerText = j["splitInventory"][takingUnit]; |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
updateTableShowForMaterial = function () { |
|||
let req = {}; |
|||
req.mid = id; |
|||
table.reload('currentTableForMaterial', { |
|||
url: '/material/findMaterialByConditionForStockTaking', |
|||
page: { |
|||
curr: 1 |
|||
}, |
|||
where: req |
|||
}, 'data'); |
|||
}; |
|||
|
|||
// 用于监听下拉菜单 |
|||
table.on('tool(currentTableFilter)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值" |
|||
var data = obj.data //获得当前行数据 |
|||
, layEvent = obj.event; //获得 lay-event 对应的值 |
|||
if (layEvent === 'more') { |
|||
let splitInfoList = obj.data.splitInfoList; |
|||
if (splitInfoList.length > 0) { |
|||
let dropDownDataList = []; |
|||
for (var i = 0; i < splitInfoList.length; i++) { |
|||
let dropDownData = {}; |
|||
dropDownData.title = splitInfoList[i].newUnit; |
|||
dropDownData.id = obj.data.id; |
|||
dropDownDataList.push(dropDownData); |
|||
} |
|||
dropdown.render({ |
|||
elem: this //触发事件的 DOM 对象 |
|||
, show: true //外部事件触发即显示 |
|||
, data: dropDownDataList |
|||
, click: function (unit) { |
|||
this.elem[0].childNodes[0].data = unit.title; |
|||
obj.tr[0].childNodes[6].childNodes[0].innerText = obj.data.splitInventory[unit.title]; |
|||
} |
|||
, align: 'right' //右对齐弹出(v2.6.8 新增) |
|||
, style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式 |
|||
}) |
|||
} |
|||
//下拉菜单 |
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,211 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>layui</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"> |
|||
<div class="layui-collapse"> |
|||
<div class="layui-colla-item"> |
|||
<h2 class="layui-colla-title">搜索</h2> |
|||
<div class="layui-colla-content"> |
|||
<div style="margin: 10px 10px 10px 10px"> |
|||
<form class="layui-form layui-form-pane" action=""> |
|||
<div class="layui-form-item"> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料名称:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="mname" name="mname" |
|||
autocomplete="off" placeholder="请输入物料名称"/> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料型号:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="version" name="version" |
|||
autocomplete="off" placeholder="请输入物料型号"/> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">物料编码:</label> |
|||
<div class="layui-input-block"> |
|||
<input type="text" class="layui-input" id="mcode" name="mcode" |
|||
autocomplete="off" placeholder="请输入物料编码"/> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="layui-inline"> |
|||
<label class="layui-form-label">状态</label> |
|||
<div class="layui-input-inline"> |
|||
<select name="state"> |
|||
<option value="">请选择状态</option> |
|||
<option value="1">启用</option> |
|||
<option value="2">禁用</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="layui-inline"> |
|||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit |
|||
lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<ul class="flow-default" id="LAY_splitInfo"></ul> |
|||
</div> |
|||
</div> |
|||
<a id="returnTop" style="display:none;" class="layui-return-top" href="#top"><i class="fa fa-level-up"></i></a> |
|||
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
|||
<script src="/static/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script> |
|||
<script src="/static/js/Customize/public.js"></script> |
|||
<script> |
|||
layui.use(['form', 'flow'], function () { |
|||
var $ = layui.jquery, |
|||
form = layui.form, |
|||
flow = layui.flow; |
|||
|
|||
let takingPre = 0; |
|||
let size = 8; |
|||
|
|||
|
|||
// 监听搜索操作 |
|||
form.on('submit(data-search-btn)', function (data) { |
|||
var req = {}; |
|||
data = data.field; |
|||
if (data.mname !== '') { |
|||
req.mname = data.mname; |
|||
} |
|||
if (data.state !== '') { |
|||
req.sstate = data.state; |
|||
} |
|||
if (data.mcode !== '') { |
|||
req.mcode = data.mcode |
|||
} |
|||
if (data.version !== '') { |
|||
req.version = data.version |
|||
} |
|||
|
|||
updateFlow(req); |
|||
return false; |
|||
}); |
|||
|
|||
flow.load({ |
|||
elem: '#LAY_splitInfo' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
|
|||
$.get('/split/split_out?page=' + page + '&size=' + size, function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
let brandItem ='<p>' + "物料品牌:"+result[i].brand + '</p>'; |
|||
if(result[i].brand === ""){ |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + "物料名称:"+result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + "物料编码:"+result[i].mcode + '</p>' |
|||
+ '<p>' + "物料型号:"+result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '<p>' + "旧单位:" + result[i].oldUnit + '</p>' |
|||
+ '<p>' + "新单位:" + result[i].newUnit + '</p>' |
|||
+ '<p>' + "对应关系:" + result[i].quantity + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
updateFlow = function (req) { |
|||
$("#LAY_splitInfo").empty(); |
|||
takingPre = 0; |
|||
flow.load({ |
|||
elem: '#LAY_splitInfo' //流加载容器 |
|||
, done: function (page, next) { //执行下一页的回调 |
|||
let result; |
|||
let lis = []; |
|||
req.page = page; |
|||
req.size = size; |
|||
$.ajax({ |
|||
url: "/split/split_out", |
|||
type: "get", |
|||
data: req, |
|||
dataType: "json", |
|||
contentType: "application/json;charset=utf-8", |
|||
success: function (res) { |
|||
result = res.data; |
|||
lis.push("<div class='clearfix'>"); |
|||
for (let i = 0; i < result.length; i++) { |
|||
let brandItem ='<p>' + "物料品牌:"+result[i].brand + '</p>'; |
|||
if(result[i].brand === ""){ |
|||
brandItem = ""; |
|||
} |
|||
lis.push('<li style="width:100%;margin-top: 10px;float:left;border: 1px solid #9999996e;"><div class="layui-card my-shadow my-card flow1" onclick="showDetail(' |
|||
+ result[i].id + ')"><div class="layui-card-header"><h2>' + "物料名称:"+result[i].mname + '</h2></div>'); |
|||
lis.push('<div class="layui-col-md4 my-info" style="margin-left: 15px; color: #999;font-size: 15px;">' |
|||
+ '<p style="font-size: large">' + "物料编码:"+result[i].mcode + '</p>' |
|||
+ '<p>' + "物料型号:"+result[i].version + '</p>' |
|||
+ brandItem |
|||
+ '<p>' + "旧单位:" + result[i].oldUnit + '</p>' |
|||
+ '<p>' + "新单位:" + result[i].newUnit + '</p>' |
|||
+ '<p>' + "对应关系:" + result[i].quantity + '</p>' |
|||
+ '</div></div></li>'); |
|||
} |
|||
lis.push('</div>'); |
|||
takingPre += result.length; |
|||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|||
next(lis.join(''), takingPre < res.count); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
|
|||
showDetail = function (obj) { |
|||
var index = layer.open({ |
|||
title: '拆单详情', |
|||
type: 2, |
|||
shade: 0.2, |
|||
maxmin: true, |
|||
shadeClose: true, |
|||
area: ['100%', '100%'], |
|||
content: '/split_edit?id=' + obj, |
|||
end: function () { |
|||
|
|||
} |
|||
}); |
|||
$(window).on("resize", function () { |
|||
layer.full(index); |
|||
}); |
|||
} |
|||
|
|||
}); |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,4 @@ |
|||
Manifest-Version: 1.0 |
|||
Main-Class: com.dreamchaser.depository_manage.DepositoryManageApplicatio |
|||
n |
|||
|
|||
@ -0,0 +1,17 @@ |
|||
{ |
|||
"groups": [ |
|||
{ |
|||
"name": "file", |
|||
"type": "com.dreamchaser.depository_manage.config.FileConfig", |
|||
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig" |
|||
} |
|||
], |
|||
"properties": [ |
|||
{ |
|||
"name": "file.upload-path", |
|||
"type": "java.lang.String", |
|||
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig" |
|||
} |
|||
], |
|||
"hints": [] |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
#开启健康检查、审计、统计和监控,即可通过访问/actuator/beans等查看状态 |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
include: beans,health |
|||
spring: |
|||
mobile: |
|||
sitepreference: |
|||
enabled:true |
|||
|
|||
servlet: |
|||
multipart: |
|||
enabled: true |
|||
max-file-size: 100MB # 单个文件上传的最大上限 |
|||
max-request-size: 100MB # 一次请求总大小上限 |
|||
|
|||
##数据库设置 |
|||
datasource: |
|||
username: depository |
|||
password: NhE47edekBHxhjYk |
|||
url: jdbc:mysql://localhost:3306/depository?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8 |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
type: com.alibaba.druid.pool.DruidDataSource |
|||
initialSize: 5 |
|||
minIdle: 5 |
|||
maxActive: 10 |
|||
maxWait: 60000 |
|||
timeBetweenEvictionRunsMillis: 60000 |
|||
minEvictableIdleTimeMillis: 300000 |
|||
validationQuery: SELECT 1 FROM DUAL |
|||
useGlobalDataSourceStat: true |
|||
server: |
|||
port: 9090 |
|||
testWhileIdle: true |
|||
testOnReturn: false |
|||
testOnBorrow: false |
|||
poolPreparedStatements: true |
|||
maxPoolPreparedStatementPerConnectionSize: 20 |
|||
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙 |
|||
filters: stat, wall, log4j |
|||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|||
#超时回收机制 |
|||
removeAbandoned: true |
|||
removeAbandonedTimeout: 1800 |
|||
logAbandoned: true |
|||
banner: |
|||
location: banner.txt |
|||
thymeleaf: |
|||
cache: false |
|||
mode: HTML |
|||
mvc: |
|||
hiddenmethod: |
|||
filter: |
|||
enabled: true |
|||
view: |
|||
prefix: /templates/ |
|||
suffix: .html |
|||
static-path-pattern: /static/** |
|||
redis: |
|||
port: 6379 |
|||
host: 127.0.0.1 |
|||
database: 0 |
|||
jedis: |
|||
pool: |
|||
min-idle: 10 |
|||
max-idle: 20 |
|||
max-wait: -1ms |
|||
max-active: 200 |
|||
timeout: 2000ms |
|||
|
|||
|
|||
|
|||
|
|||
server: |
|||
mybatis: |
|||
type-aliases-package: com.dreamchaser.depository_manage.entity |
|||
configuration: |
|||
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl |
|||
log-prefix: mapper. |
|||
|
|||
#mybatis-plus: |
|||
# configuration: |
|||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
|||
|
|||
file: |
|||
uploadPath: D:/upLoad |
|||
@ -0,0 +1,5 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
server: |
|||
port: 11111 |
|||
@ -0,0 +1,14 @@ |
|||
,---, ____ ,---, |
|||
.' .' `\ ,' , `. ,--.' | |
|||
,---.' \ __ ,-. ,-+-,.' _ | | | : __ ,-. |
|||
| | .`\ |,' ,'/ /| ,-+-. ; , || : : : .--.--. ,' ,'/ /| |
|||
: : | ' |' | |' | ,---. ,--.--. ,--.'|' | || ,---. : | |,--. ,--.--. / / ' ,---. ' | |' | |
|||
| ' ' ; :| | ,'/ \ / \ | | ,', | |,/ \ | : ' | / \ | : /`./ / \ | | ,' |
|||
' | ; . |' : / / / | .--. .-. | | | / | |--'/ / ' | | /' :.--. .-. | | : ;_ / / |' : / |
|||
| | : | '| | ' . ' / | \__\/: . . | : | | , . ' / ' : | | | \__\/: . . \ \ `. . ' / || | ' |
|||
' : | / ; ; : | ' ; /| ," .--.; | | : | |/ ' ; :__ | | ' | : ," .--.; | `----. \' ; /|; : | |
|||
| | '` ,/ | , ; ' | / | / / ,. | | | |`-' ' | '.'|| : :_:,'/ / ,. | / /`--' /' | / || , ; |
|||
; : .' ---' | : |; : .' \| ;/ | : :| | ,' ; : .' \'--'. / | : | ---' |
|||
| ,.' \ \ / | , .-./'---' \ \ / `--'' | , .-./ `--'---' \ \ / |
|||
'---' `----' `--`---' `----' `--`---' `----' |
|||
|
|||
@ -0,0 +1,108 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- depository --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.AccesstoAddressMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="accesstoAddress" type="com.dreamchaser.depository_manage.entity.AccesstoAddress"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="name" property="name" jdbcType="VARCHAR" /> |
|||
<result column="url" property="url" jdbcType="VARCHAR" /> |
|||
<result column="type" property="type" jdbcType="INTEGER" /> |
|||
<result column="role_id" property="role_id" jdbcType="INTEGER" /> |
|||
<result column="menuparent" property="menuparent" jdbcType="INTEGER" /> |
|||
<result column="state" property="state" jdbcType="INTEGER" /> |
|||
<result column="icon" property="icon" jdbcType="VARCHAR"/> |
|||
<result column="target" property="target" jdbcType="VARCHAR"/> |
|||
<result column="ischild" property="ischild" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|||
|
|||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
a.id,a.name,a.url ,a.`type` ,a.role_id ,a.menuparent ,a.state,a.icon,a.target,a.ischild |
|||
</sql> |
|||
|
|||
<select id="findAllMenus" resultMap="accesstoAddress"> |
|||
select |
|||
<include refid="allColumns"></include> |
|||
from accesstoaddress a |
|||
where a.state != 3 |
|||
</select> |
|||
|
|||
<select id="findAccessstoAddressByParentAndRole" resultMap="accesstoAddress" parameterType="map"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from accesstoaddress a |
|||
where 1 = 1 |
|||
<if test="roleId != null and roleId != ''"> |
|||
and a.role_id = #{roleId} |
|||
</if> |
|||
<if test="menuparent != null and menuparent != ''"> |
|||
and a.menuparent = #{menuparent} |
|||
</if> |
|||
and a.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<select id="findMenusByRole" resultMap="accesstoAddress" parameterType="map"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from accesstoaddress a |
|||
where 1 = 1 |
|||
<if test="type != null and type != ''"> |
|||
and type = #{type} |
|||
</if> |
|||
<if test="roleId != null and roleId != ''"> |
|||
and a.role_id = #{roleId} |
|||
</if> |
|||
<if test="menuparent != null and menuparent != ''"> |
|||
and a.menuparent = #{menuparent} |
|||
</if> |
|||
and a.state != 3 |
|||
</select> |
|||
|
|||
<select id="findMenusByNoParent" resultMap="accesstoAddress"> |
|||
select |
|||
<include refid="allColumns"></include> |
|||
from accesstoaddress a |
|||
where 1 = 1 |
|||
and a.menuparent = 0 |
|||
</select> |
|||
|
|||
|
|||
<select id="findAccessstoAddressByParent" resultMap="accesstoAddress" parameterType="INTEGER"> |
|||
select |
|||
<include refid="allColumns"></include> |
|||
from accesstoaddress a |
|||
where 1 = 1 |
|||
and a.menuparent = #{id} |
|||
</select> |
|||
|
|||
|
|||
<select id="findAccessToAddressByUser" resultMap="accesstoAddress" parameterType="map"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from |
|||
AccessToAddressByUser a |
|||
where authority = #{roleId} |
|||
<if test="userId != '' and userId != null "> |
|||
and uid = #{userId} |
|||
</if> |
|||
<if test="menuparent != null and menuparent != ''"> |
|||
and menuparent = #{menuparent} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findAccessToAddressByList" resultMap="accesstoAddress" parameterType="list"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from accesstoaddress a |
|||
where a.id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- depository --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.CallBackLogMapper"> |
|||
<resultMap id="callBackMap" type="com.dreamchaser.depository_manage.entity.CallBackLog"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="msg_signature" property="msg_signature" jdbcType="VARCHAR" /> |
|||
<result column="timestamp" property="timestamp" jdbcType="INTEGER" /> |
|||
<result column="nonce" property="nonce" jdbcType="VARCHAR" /> |
|||
<result column="echostr" property="echostr" jdbcType="VARCHAR" /> |
|||
<result column="xmlstr" property="xmlstr" jdbcType="VARCHAR" /> |
|||
<result column="jsonstr" property="jsonstr" jdbcType="VARCHAR" /> |
|||
<result column="reqdata" property="reqdata" jdbcType="VARCHAR"/> |
|||
<result column="addtime" property="addtime" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<insert id="addCallBackLog"> |
|||
|
|||
INSERT INTO callback_log ( |
|||
id, msg_signature, timestamp,nonce,echostr,xmlstr,jsonstr,reqdata,addtime |
|||
) VALUES ( |
|||
#{id}, |
|||
#{msg_signature}, |
|||
#{timestamp}, |
|||
#{nonce}, |
|||
#{echostr}, |
|||
#{xmlstr}, |
|||
#{jsonstr}, |
|||
#{reqdata}, |
|||
#{addtime} |
|||
) |
|||
|
|||
</insert> |
|||
</mapper> |
|||
@ -0,0 +1,168 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- depository --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.CompanyMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="companyMap" type="com.dreamchaser.depository_manage.entity.Company"> |
|||
<id column="cid" property="cid" jdbcType="INTEGER" /> |
|||
<result column="cname" property="cname" jdbcType="VARCHAR" /> |
|||
<result column="state" property="state" jdbcType="INTEGER"/> |
|||
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
|||
<result column="introduce" property="introduce" jdbcType="VARCHAR"/> |
|||
</resultMap> |
|||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|||
|
|||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
c.cid, c.cname ,c.state , c.parentId,c.introduce |
|||
</sql> |
|||
|
|||
<!-- 查询所有数据 --> |
|||
<select id="findCompanyAll" resultMap="companyMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM company c |
|||
Where c.state != 3 |
|||
</select> |
|||
|
|||
<select id="findcompanyById" resultMap="companyMap" parameterType="int"> |
|||
select <include refid="allColumns"/> |
|||
from company c |
|||
where c.cid = #{id} |
|||
</select> |
|||
|
|||
<!-- 根据条件查询公司--> |
|||
<select id="findCompanyByCondition" resultMap="companyMap" parameterType="map"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from company c |
|||
where 1 = 1 |
|||
<if test="id != null and id !=''"> |
|||
and c.cid = #{id} |
|||
</if> |
|||
<if test="cname != null and cname != ''"> |
|||
and c.cname LIKE CONCAT('%', #{cname}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce !=''"> |
|||
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="parentId != null"> |
|||
AND c.parentId = #{parentId} |
|||
</if> |
|||
<if test="state != null"> |
|||
and c.state = #{state} |
|||
</if> |
|||
and c.state != 3 |
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询数据列表数目 --> |
|||
<select id="findCountByCondition" resultType="int" parameterType="map"> |
|||
SELECT count(*) |
|||
from company c |
|||
where 1 = 1 |
|||
<if test="id != null and id !=''"> |
|||
and c.cid = #{id} |
|||
</if> |
|||
<if test="cname != null and cname != ''"> |
|||
and c.cname LIKE CONCAT('%', #{cname}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce !=''"> |
|||
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="parentId != null"> |
|||
AND c.parentId = #{parentId} |
|||
</if> |
|||
and c.state != 3 |
|||
</select> |
|||
|
|||
<!--根据父级查询公司信息--> |
|||
<select id="findCompanyByParentId" resultMap="companyMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from company c |
|||
where c.state != 3 and c.parentId = #{parentId} |
|||
</select> |
|||
|
|||
<!-- 根据主键删除数据 --> |
|||
<delete id="deleteCompanyById" parameterType="int"> |
|||
DELETE FROM company WHERE cid = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据主键批量删除数据 --> |
|||
<delete id="deleteCompanyByIds" parameterType="list"> |
|||
DELETE FROM company WHERE cid IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<!-- 修改数据 --> |
|||
<update id="updateCompany" parameterType="map"> |
|||
UPDATE company |
|||
<set> |
|||
<if test="cname != null"> |
|||
cname = #{cname}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce = #{introduce}, |
|||
</if> |
|||
<if test="state != null"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parentId = #{parentId} |
|||
</if> |
|||
</set> |
|||
WHERE cid = #{id} |
|||
</update> |
|||
|
|||
<!--插入数据--> |
|||
<insert id="insertCompany" parameterType="map"> |
|||
INSERT INTO company ( |
|||
cid, cname, introduce,parentId |
|||
) VALUES ( |
|||
#{id}, |
|||
#{cname}, |
|||
#{introduce}, |
|||
#{parentId} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 根据主键将状态改为删除--> |
|||
<update id="changeStateToDeletedById" parameterType="int"> |
|||
update company |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where cid = #{id} |
|||
</update> |
|||
|
|||
|
|||
<!-- 根据主键批量将状态改为删除--> |
|||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|||
update company |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where cid in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
|
|||
<update id="updateStateByParam" parameterType="map"> |
|||
update company |
|||
<set> |
|||
state = #{state} |
|||
</set> |
|||
where cid = #{cid} |
|||
<if test="oldState != null"> |
|||
and state = #{oldState} |
|||
</if> |
|||
and state != 3 |
|||
</update> |
|||
</mapper> |
|||
@ -0,0 +1,130 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.ConstructionUnitMapper"> |
|||
<resultMap id="constructionUnitMap" type="com.dreamchaser.depository_manage.entity.ConstructionUnit"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="name" property="name" jdbcType="VARCHAR" /> |
|||
<result column="state" property="state" jdbcType="INTEGER" /> |
|||
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
|||
<result column="address" property="address" jdbcType="VARCHAR" /> |
|||
<result column="createTime" property="createTime" jdbcType="INTEGER" /> |
|||
</resultMap> |
|||
<sql id="allColumns"> |
|||
id,`name`,state,introduce,address,createTime |
|||
</sql> |
|||
|
|||
<insert id="addConstructionUnit"> |
|||
insert into constructionunit(id,`name`,state,introduce,address,createTime) |
|||
values ( |
|||
#{id}, |
|||
#{name}, |
|||
#{state}, |
|||
#{introduce}, |
|||
#{address}, |
|||
#{createTime} |
|||
) |
|||
</insert> |
|||
|
|||
<select id="findConstructionUnitAll" resultMap="constructionUnitMap"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from constructionunit |
|||
where state = 1 |
|||
</select> |
|||
|
|||
<select id="findConstructionUnitByCondition" parameterType="map" resultMap="constructionUnitMap"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from constructionunit |
|||
where 1 = 1 |
|||
<if test="name != null and name != ''"> |
|||
and `name` like CONCAT('%',#{name},'%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and state = #{state} |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
and introduce like concat('%',#{introduce},'%') |
|||
</if> |
|||
<if test="address != null and address != ''"> |
|||
and address like concat('%',#{address},'%') |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findConstructionUnitCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
COUNT(*) |
|||
from constructionunit |
|||
where 1 = 1 |
|||
<if test="name != null and name != ''"> |
|||
and `name` like CONCAT('%',#{name},'%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and state = #{state} |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
and introduce like concat('%',#{introduce},'%') |
|||
</if> |
|||
<if test="address != null and address != ''"> |
|||
and address like concat('%',#{address},'%') |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findConstructionUnitById" resultMap="constructionUnitMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from constructionunit |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<update id="updateConstructionUnit"> |
|||
update constructionunit |
|||
<set> |
|||
<if test="name != null and name != ''"> |
|||
name = #{name}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
introduce = #{introduce}, |
|||
</if> |
|||
<if test="address != null and address != ''"> |
|||
address = #{address} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
|
|||
<update id="updateConstructionUnitState"> |
|||
update constructionunit |
|||
<set> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state}, |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteConstructionUnitById" parameterType="int"> |
|||
delete from constructionunit where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteConstructionUnitByIds" parameterType="list"> |
|||
delete from constructionunit where id in |
|||
<foreach collection="list" item="id" index="index" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,390 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- depository --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.DepositoryMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="depositoryMap" type="com.dreamchaser.depository_manage.entity.Depository"> |
|||
<id column="id" property="id" jdbcType="INTEGER"/> |
|||
<result column="dname" property="dname" jdbcType="VARCHAR"/> |
|||
<result column="address" property="address" jdbcType="VARCHAR"/> |
|||
<result column="introduce" property="introduce" jdbcType="VARCHAR"/> |
|||
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
|||
<result column="cid" property="cid" jdbcType="INTEGER"/> |
|||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|||
<result column="adminorg" property="adminorg" jdbcType="VARCHAR"/> |
|||
<result column="minNumber" property="minNumber" jdbcType="INTEGER"/> |
|||
<result column="maxNumber" property="maxNumber" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<resultMap id="inventoryByDname" type="com.dreamchaser.depository_manage.pojo.InventoryByDname"> |
|||
<result column="inventory" property="inventory" jdbcType="INTEGER"/> |
|||
<result column="dname" property="dname" jdbcType="VARCHAR"/> |
|||
</resultMap> |
|||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|||
|
|||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
d.id, d.dname, d.address, d.introduce,d.state,d.parentId,d.cid,d.code,d.adminorg,d.maxNumber,d.minNumber |
|||
</sql> |
|||
<!-- 视图查询字段--> |
|||
<sql id="depositoryAndCompany"> |
|||
id,dname,address,introduce,state,parentId,cid,cname,code,adminorg,minNumber,maxNumber |
|||
</sql> |
|||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|||
|
|||
<!-- 根据id获取仓库名称 --> |
|||
<select id="findDepositoryNameById" resultType="string" parameterType="int"> |
|||
SELECT |
|||
d.dname |
|||
FROM depository d where d.id=#{id} |
|||
</select> |
|||
|
|||
<!-- <!– 查询所有数据 –> |
|||
<select id="findDepositoryAll" resultMap="depositoryMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM depository d |
|||
Where d.state != 3 |
|||
</select>--> |
|||
|
|||
<!-- 查询所有数据 --> |
|||
<select id="findDepositoryAll" resultMap="depositoryMap"> |
|||
SELECT |
|||
<include refid="depositoryAndCompany"/> |
|||
FROM depositoryandcompany dc |
|||
Where dc.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<select id="findDepositoryByParent" resultMap="depositoryMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="depositoryAndCompany"/> |
|||
FROM depositoryandcompany dc |
|||
Where dc.state != 3 and dc.parentId = #{did} |
|||
</select> |
|||
|
|||
<select id="findDepositoryByParents" resultMap="depositoryMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="depositoryAndCompany"/> |
|||
FROM depositoryandcompany dc |
|||
Where dc.state != 3 and dc.parentId in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
|
|||
<!-- 获取当前部门仓库以及公共仓库--> |
|||
<select id="findDepositoryByAdminorg" resultMap="depositoryMap" parameterType="string"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE 1 = 1 and d.state = 1 |
|||
<if test="adminorg != null and adminorg != ''"> |
|||
and d.adminorg = #{adminorg} |
|||
</if> |
|||
or d.adminorg = '' |
|||
</select> |
|||
|
|||
<!-- 根据仓库编码获取仓库--> |
|||
<select id="findDepositoryByCode" resultMap="depositoryMap" parameterType="string"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE 1 = 1 and d.state != 3 |
|||
<if test="depositoryCode != null and depositoryCode !=''"> |
|||
and d.code = #{depositoryCode} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findDepositoryByAdminorgAndParent" resultMap="depositoryMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE 1 = 1 |
|||
<if test="adminorg != null and adminorg != ''"> |
|||
and (d.adminorg = #{adminorg} or d.adminorg = 361) |
|||
</if> |
|||
<if test="parentId != null"> |
|||
AND d.parentId = #{parentId} |
|||
</if> |
|||
or d.adminorg = '' and d.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据主键查询多个数据--> |
|||
<select id="selectDepositoryByIds" parameterType="list" resultMap="depositoryMap"> |
|||
select |
|||
<include refid="allColumns"></include> |
|||
FROM depository d WHERE d.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
<!-- 根据条件查询数据列表 --> |
|||
<select id="findDepositoryByCondition" resultMap="depositoryMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE 1 = 1 |
|||
<if test="depositoryId != null"> |
|||
AND d.id = #{depositoryId} |
|||
</if> |
|||
<if test="dname != null and dname != ''"> |
|||
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
|||
</if> |
|||
<if test="address != null and address != ''"> |
|||
AND d.address LIKE CONCAT('%', #{address}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="state != null and state != '' "> |
|||
AND d.state = #{state} |
|||
</if> |
|||
<if test="parentId != null"> |
|||
AND d.parentId = #{parentId} |
|||
</if> |
|||
<if test="cid != null"> |
|||
and d.cid = #{cid} |
|||
</if> |
|||
<if test="adminorg != null"> |
|||
and (d.adminorg = #{adminorg} or d.adminorg = '') |
|||
</if> |
|||
AND d.state != 3 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据条件参数查询数据列表数目 --> |
|||
<select id="findCountByCondition" resultType="int" parameterType="map"> |
|||
SELECT count(*) |
|||
FROM depository d WHERE 1 = 1 |
|||
<if test="dname != null and dname != ''"> |
|||
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
|||
</if> |
|||
<if test="address != null and address != ''"> |
|||
AND d.address LIKE CONCAT('%', #{address}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="state != null and state != '' "> |
|||
AND d.state = #{state} |
|||
</if> |
|||
<if test="parentId != null"> |
|||
AND d.parentId = #{parentId} |
|||
</if> |
|||
<if test="cid != null"> |
|||
and d.cid = #{cid} |
|||
</if> |
|||
<if test="adminorg != null"> |
|||
and d.adminorg = #{adminorg} |
|||
</if> |
|||
AND d.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<select id="getParentByDepository" resultMap="depositoryMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE d.parentId = #{parentId} |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据主键查询数据--> |
|||
<select id="findDepositoryById" resultMap="depositoryMap" parameterType="Integer"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE d.id = #{id} |
|||
</select> |
|||
|
|||
|
|||
<select id="findDepositoryByIds" resultMap="depositoryMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM depository d WHERE d.id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
|
|||
<!-- 插入数据 --> |
|||
<insert id="insertDepository" parameterType="map"> |
|||
INSERT INTO depository ( |
|||
id, dname, address, introduce,parentId,cid,code,adminorg,maxNumber,minNumber |
|||
) VALUES ( |
|||
#{id}, |
|||
#{dname}, |
|||
#{address}, |
|||
#{introduce}, |
|||
#{parentId}, |
|||
#{cid}, |
|||
#{code}, |
|||
#{adminorg}, |
|||
#{maxNumber}, |
|||
#{minNumber} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 批量插入数据 |
|||
<insert id="insertDepositorys" parameterType="list"> |
|||
INSERT INTO depository ( |
|||
id, dname, address, introduce |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.dname}, |
|||
#{item.address}, |
|||
#{item.introduce} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
--> |
|||
|
|||
<!-- 修改数据 --> |
|||
<update id="updateDepository" parameterType="map"> |
|||
UPDATE depository |
|||
<set> |
|||
<if test="dname != null"> |
|||
dname = #{dname}, |
|||
</if> |
|||
<if test="address != null"> |
|||
address = #{address}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce = #{introduce}, |
|||
</if> |
|||
<if test="state != null"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parentId = #{parentId}, |
|||
</if> |
|||
<if test="cid != null"> |
|||
cid = #{cid}, |
|||
</if> |
|||
<if test="adminorg != null"> |
|||
adminorg = #{adminorg}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code}, |
|||
</if> |
|||
<if test="minNumber != null and minNumber != ''"> |
|||
minNumber = #{minNumber}, |
|||
</if> |
|||
<if test="maxNumber != null and maxNumber != ''"> |
|||
maxNumber = #{maxNumber} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
|
|||
<!-- 批量修改数据 |
|||
<update id="updateDepositorys" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE depository |
|||
<set> |
|||
<if test="item.dname != null"> |
|||
dname = #{item.dname}, |
|||
</if> |
|||
<if test="item.address != null"> |
|||
address = #{item.address}, |
|||
</if> |
|||
<if test="item.introduce != null"> |
|||
introduce = #{item.introduce} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{item.id} |
|||
</foreach> |
|||
</update>--> |
|||
|
|||
|
|||
<!-- 根据主键删除数据 --> |
|||
<delete id="deleteDepositoryRecordById" parameterType="int"> |
|||
DELETE FROM depository WHERE id = #{id} |
|||
</delete> |
|||
|
|||
|
|||
<!-- 根据主键批量删除数据--> |
|||
<delete id="deleteDepositoryRecordByIds" parameterType="list"> |
|||
DELETE FROM depository WHERE id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<!-- 根据主键将状态改为删除--> |
|||
<update id="changeStateToDeletedById" parameterType="int"> |
|||
UPDATE depository |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
<update id="updateStateByParam" parameterType="map"> |
|||
UPDATE depository |
|||
<set> |
|||
state = #{state} |
|||
</set> |
|||
|
|||
where id = #{id} |
|||
<if test="oldState != null"> |
|||
and state = #{oldState} |
|||
</if> |
|||
and state != 3 |
|||
</update> |
|||
|
|||
<!-- 根据主键批量将状态改为删除--> |
|||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|||
update depository |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
|
|||
<!-- 获取仓库总数--> |
|||
<select id="findAllCountByState" resultType="int"> |
|||
select count(*) |
|||
from depository d |
|||
where d.state != 3 |
|||
</select> |
|||
|
|||
<select id="getToDayInventoryByDName" resultType="int" parameterType="map"> |
|||
select ifnull(sum(quantity),0.0) |
|||
from depositoryandinventory |
|||
where 1 = 1 |
|||
<if test="dname != null and dname !=''"> |
|||
and dname = #{dname} |
|||
</if> |
|||
<if test="dcode != null and dcode !=''"> |
|||
and dcode = #{dcode} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="getToDayInventoryByDNameTest" resultMap="inventoryByDname"> |
|||
select ifnull(sum(quantity),0.0) as inventory ,dname |
|||
from depositoryandinventory |
|||
where 1 = 1 |
|||
GROUP BY dname |
|||
</select> |
|||
|
|||
|
|||
<select id="findUserNameByDepositoryId" resultType="string" parameterType="int"> |
|||
select uname |
|||
from depositoryanduser |
|||
where did = #{depositoryId} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,395 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.GroupMapper"> |
|||
|
|||
<!-- 字段映射 (用于视图)--> |
|||
<resultMap id="groupInfoMap" type="com.dreamchaser.depository_manage.entity.GroupInfo"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER"/> |
|||
<result column="gid" property="gid" jdbcType="INTEGER"/> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER"/> |
|||
<result column="mtid" property="mtid" jdbcType="INTEGER"/> |
|||
<result column="shelfLife" property="shelfLife" jdbcType="INTEGER"/> |
|||
<result column="gcode" property="gcode" jdbcType="VARCHAR"/> |
|||
<result column="mname" property="mname" jdbcType="VARCHAR"/> |
|||
<result column="tname" property="tname" jdbcType="VARCHAR"/> |
|||
<result column="mcode" property="mcode" jdbcType="VARCHAR"/> |
|||
<result column="version" property="version" jdbcType="VARCHAR"/> |
|||
<result column="munit" property="munit" jdbcType="VARCHAR"/> |
|||
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
|||
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
|||
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/> |
|||
<result column="brand" property="brand" jdbcType="VARCHAR"/> |
|||
<result column="mremark" property="mremark" jdbcType="VARCHAR"/> |
|||
<result column="gremark" property="gremark" jdbcType="VARCHAR"/> |
|||
<result column="gname" property="gname" jdbcType="VARCHAR"/> |
|||
<result column="createTime" property="createTime" jdbcType="INTEGER"/> |
|||
<result column="gstate" property="gstate" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<!-- 用于组合映射--> |
|||
<resultMap id="groupMap" type="com.dreamchaser.depository_manage.entity.Group"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|||
<result column="gname" property="gname" jdbcType="VARCHAR"/> |
|||
<result column="remark" property="remark" jdbcType="VARCHAR"/> |
|||
<result column="createTime" property="createTime" jdbcType="INTEGER"/> |
|||
<result column="state" property="state" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<!-- 用于组合与物料的映射--> |
|||
<resultMap id="materialForGroupMap" type="com.dreamchaser.depository_manage.entity.MaterialForGroup"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER"/> |
|||
<result column="gid" property="gid" jdbcType="INTEGER"/> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER"/> |
|||
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
|||
|
|||
</resultMap> |
|||
|
|||
<!-- 用于视图--> |
|||
<sql id="allColumnsForView"> |
|||
id,mid,gid,quantity,mtid,shelfLife,gcode,mname,tname,mcode,version,munit,texture,productionPlace,brand,mremark,createTime,gstate,gname,unit,gremark |
|||
</sql> |
|||
|
|||
<!-- 用于组合--> |
|||
<sql id="allColumnsForGroup"> |
|||
id,code,createTime,state,gname,remark |
|||
</sql> |
|||
|
|||
<!-- 用于物料对于组合的映射--> |
|||
<sql id="allColumnsForMaterialForGroup"> |
|||
id,mid,gid,quantity,unit |
|||
</sql> |
|||
|
|||
|
|||
|
|||
<select id="findAllGroup" resultMap="groupInfoMap"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
from materialforgroup |
|||
</select> |
|||
|
|||
<select id="findGroupOnlyByCondition" resultMap="groupMap" parameterType="map"> |
|||
select |
|||
<include refid="allColumnsForGroup"/> |
|||
from `group` |
|||
where 1 = 1 |
|||
<if test="code != null and code !=''"> |
|||
and code = #{code} |
|||
</if> |
|||
<if test="gid != null and gid != ''"> |
|||
and id = #{gid} |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
and createTime = #{createTime} |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and state = #{state} |
|||
</if> |
|||
<if test="gname != null and gname != ''"> |
|||
and gname like concat('%',#{gname},'%') |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
|
|||
<select id="findGroupOnlyById" resultMap="groupMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumnsForGroup"/> |
|||
from `group` |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<select id="findAllGroupOnly" resultMap="groupMap" parameterType="string"> |
|||
select |
|||
<include refid="allColumnsForGroup"/> |
|||
from `group` |
|||
where state = 1 |
|||
<if test="gname != null and gname != ''"> |
|||
and gname like concat('%',#{gname},'%') |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findAllGroupOnlyCount" resultType="int" parameterType="map"> |
|||
select |
|||
Count(*) |
|||
from `group` |
|||
where 1 = 1 |
|||
<if test="code != null and code !=''"> |
|||
and code = #{code} |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
and createTime = #{createTime} |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and state = #{state} |
|||
</if> |
|||
<if test="gname != null and gname != ''"> |
|||
and gname like concat('%',#{gname},'%') |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findGroupById" resultMap="groupInfoMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
from materialforgroup |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
|
|||
|
|||
<insert id="addGroup" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO `group` ( |
|||
id, code, createTime, state,gname,remark |
|||
) VALUES ( |
|||
#{id}, |
|||
#{code}, |
|||
#{createTime}, |
|||
#{state}, |
|||
#{gname}, |
|||
#{remark} |
|||
) |
|||
</insert> |
|||
|
|||
<insert id="addGroupForMaterial"> |
|||
INSERT INTO groupformaterial ( |
|||
id, mid, gid, quantity,unit |
|||
) VALUES ( |
|||
#{id}, |
|||
#{mid}, |
|||
#{gid}, |
|||
#{quantity}, |
|||
#{unit} |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
|
|||
<select id="findGroupByCondition" resultMap="groupInfoMap" parameterType="map"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
from materialforgroup |
|||
where 1 = 1 |
|||
<if test="mid != null and mid != ''"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="gid != null and gid != ''"> |
|||
and gid = #{gid} |
|||
</if> |
|||
<if test="quantity != null"> |
|||
and quantity = #{quantity} |
|||
</if> |
|||
<if test="gcode != null and gcode !=''"> |
|||
and gcode = #{gcode} |
|||
</if> |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like CONCAT('%', #{mname}, '%') |
|||
</if> |
|||
<if test="mtid != null and mtid != ''"> |
|||
and mtid = #{mtid} |
|||
</if> |
|||
<if test="tname != null and tname != ''"> |
|||
and tname like CONCAT('%',#{tname},'%') |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="version != null and version != ''"> |
|||
and version like CONCAT('%',#{version},'%') |
|||
</if> |
|||
<if test="unit != null and unit != ''"> |
|||
and unit like CONCAT('%',#{unit},'%') |
|||
</if> |
|||
<if test="texture != null and texture != ''"> |
|||
and texture like CONCAT('%',#{texture},'%') |
|||
</if> |
|||
<if test="shelfLife != null and shelfLife != ''"> |
|||
and shelfLife = #{shelfLife} |
|||
</if> |
|||
<if test="productionPlace != null and productionPlace!= ''"> |
|||
and productionPlace like CONCAT('%',#{productionPlace},'%') |
|||
</if> |
|||
<if test="brand != null and brand != ''"> |
|||
and brand like CONCAT('%',#{brand},'%') |
|||
</if> |
|||
<if test="remark != null and remark != ''"> |
|||
and remark like CONCAT('%',remark,'%') |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
and createTime = #{createTime} |
|||
</if> |
|||
<if test="gstate != null and gstate != ''"> |
|||
and gstate = #{gstate} |
|||
</if> |
|||
<if test="gname != null and gname != ''"> |
|||
and gname = #{gname} |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findGroupInfoByGid" resultMap="groupInfoMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
from materialforgroup |
|||
where gid = #{gid} |
|||
</select> |
|||
|
|||
<select id="findGroupByGids" resultMap="groupMap" parameterType="list"> |
|||
select |
|||
<include refid="allColumnsForGroup"/> |
|||
from `group` |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<select id="findGroupCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
count(*) |
|||
from materialforgroup |
|||
where 1 = 1 |
|||
<if test="mid != null and mid != ''"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="gid != null and gid != ''"> |
|||
and gid = #{gid} |
|||
</if> |
|||
<if test="quantity != null"> |
|||
and quantity = #{quantity} |
|||
</if> |
|||
<if test="gcode != null and gcode !=''"> |
|||
and gcode = #{gcode} |
|||
</if> |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like CONCAT('%', #{mname}, '%') |
|||
</if> |
|||
<if test="mtid != null and mtid != ''"> |
|||
and mtid = #{mtid} |
|||
</if> |
|||
<if test="tname != null and tname != ''"> |
|||
and tname like CONCAT('%',#{tname},'%') |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="version != null and version != ''"> |
|||
and version like CONCAT('%',#{version},'%') |
|||
</if> |
|||
<if test="unit != null and unit != ''"> |
|||
and unit like CONCAT('%',#{unit},'%') |
|||
</if> |
|||
<if test="texture != null and texture != ''"> |
|||
and texture like CONCAT('%',#{texture},'%') |
|||
</if> |
|||
<if test="shelfLife != null and shelfLife != ''"> |
|||
and shelfLife = #{shelfLife} |
|||
</if> |
|||
<if test="productionPlace != null and productionPlace!= ''"> |
|||
and productionPlace like CONCAT('%',#{productionPlace},'%') |
|||
</if> |
|||
<if test="brand != null and brand != ''"> |
|||
and brand like CONCAT('%',#{brand},'%') |
|||
</if> |
|||
<if test="remark != null and remark != ''"> |
|||
and remark like CONCAT('%',remark,'%') |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
and createTime = #{createTime} |
|||
</if> |
|||
<if test="gstate != null and gstate != ''"> |
|||
and gstate = #{gstate} |
|||
</if> |
|||
</select> |
|||
|
|||
<update id="updateMaterialForGroup"> |
|||
update |
|||
groupformaterial |
|||
<set> |
|||
<if test="gid != null and gid != ''"> |
|||
gid = #{gid}, |
|||
</if> |
|||
<if test="mid != null and mid != ''"> |
|||
mid = #{mid}, |
|||
</if> |
|||
<if test="quantity != null and quantity != ''"> |
|||
quantity = #{quantity}, |
|||
</if> |
|||
<if test="unit != null"> |
|||
unit = #{unit} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<select id="findQrCodeByGid" parameterType="int" resultType="String"> |
|||
select code |
|||
from gidandcode |
|||
where gid = #{gid} |
|||
</select> |
|||
|
|||
<insert id="addQrCodeByGroup"> |
|||
insert into gidandcode(id,gid,code) |
|||
values ( |
|||
#{id}, |
|||
#{gid}, |
|||
#{code} |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
<update id="updateGroupOnly"> |
|||
update |
|||
`group` |
|||
<set> |
|||
<if test="code != null and code != ''"> |
|||
code = #{code}, |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
createTime = #{createTime}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="gname != null and gname !=''"> |
|||
gname = #{gname}, |
|||
</if><if test="applyRemark != null and applyRemark !=''"> |
|||
remark = #{applyRemark} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="delMaterialForGroupById" parameterType="int"> |
|||
delete from groupformaterial where id = #{id} |
|||
</delete> |
|||
|
|||
|
|||
<delete id="delMaterialForGroupByIds" parameterType="list"> |
|||
delete from groupformaterial where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="delGroup" parameterType="int"> |
|||
delete from `group` where id = #{id} |
|||
</delete> |
|||
|
|||
<select id="findGroupByCode" parameterType="String" resultMap="groupMap"> |
|||
select |
|||
<include refid="allColumnsForGroup"/> |
|||
from `group` |
|||
where code = #{code} |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,265 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- material_type --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialTypeMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="materialTypeMap" type="com.dreamchaser.depository_manage.entity.MaterialType"> |
|||
<id column="id" property="id" jdbcType="INTEGER"/> |
|||
<result column="tname" property="tname" jdbcType="VARCHAR"/> |
|||
<result column="introduce" property="introduce" jdbcType="VARCHAR"/> |
|||
<result column="state" property="state" jdbcType="INTEGER"/> |
|||
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
|||
<result column="oldId" property="oldId" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
mt.id, mt.tname, mt.introduce, mt.state,mt.parentId,mt.oldId |
|||
</sql> |
|||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|||
|
|||
<!-- 查询所有数据 --> |
|||
<select id="findMaterialTypeAll" resultMap="materialTypeMap"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt |
|||
where mt.state != 3 and mt.state != 4 |
|||
</select> |
|||
<!-- 查询所有顶级父类 --> |
|||
<select id="findMaterialTypeNoParent" resultMap="materialTypeMap"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt |
|||
where mt.state = 1 and mt.parentId = 0 |
|||
</select> |
|||
|
|||
<select id="findMaterialTypeCountByCondition" resultType="int" parameterType="map"> |
|||
select count(*) |
|||
FROM material_type mt WHERE 1 = 1 |
|||
<if test="tname != null and tname != ''"> |
|||
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and mt.state = #{state} |
|||
</if> |
|||
<if test="parentId != null"> |
|||
and mt.parentId = #{parentId} |
|||
</if> |
|||
<if test="oldId != null"> |
|||
and mt.oldId = #{oldId} |
|||
</if> |
|||
and mt.state != 3 and mt.state != 4 |
|||
</select> |
|||
<!-- 根据条件参数查询数据列表 --> |
|||
<select id="findMaterialTypeByCondition" resultMap="materialTypeMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt WHERE 1 = 1 |
|||
<if test="tname != null and tname != ''"> |
|||
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
|||
</if> |
|||
<if test="introduce != null and introduce != ''"> |
|||
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and mt.state = #{state} |
|||
</if> |
|||
<if test="parentId != null"> |
|||
and mt.parentId = #{parentId} |
|||
</if> |
|||
<if test="oldId != null"> |
|||
and mt.oldId = #{oldId} |
|||
</if> |
|||
|
|||
and mt.state != 3 and mt.state != 4 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<!-- 根据主键查询数据 --> |
|||
<select id="findMaterialTypeNameById" resultType="string" parameterType="integer"> |
|||
SELECT |
|||
mt.tname |
|||
FROM material_type mt WHERE mt.id = #{id} |
|||
</select> |
|||
|
|||
<!-- 根据物料类型id查询数据 --> |
|||
<select id="findMaterialTypeNameByOldId" resultType="string" parameterType="long"> |
|||
SELECT |
|||
mt.tname |
|||
FROM material_type mt WHERE mt.oldId = #{oldId} |
|||
</select> |
|||
|
|||
<!-- 根据父类查询数据 --> |
|||
<select id="findMaterialTypeByParent" resultMap="materialTypeMap" parameterType="long"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt |
|||
WHERE mt.parentId = #{parentId} |
|||
</select> |
|||
|
|||
<!-- 根据主键批量获取数据 --> |
|||
<select id="findMaterialTypeByOldIds" resultMap="materialTypeMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt |
|||
WHERE mt.oldId in |
|||
<foreach collection="list" index="index" item="item" open="(" |
|||
separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据主键查询数据 --> |
|||
<select id="findMaterialTypeById" resultMap="materialTypeMap" parameterType="integer"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt WHERE mt.oldId = #{id} and mt.state != 3 and mt.state != 4 |
|||
</select> |
|||
<select id="findMaterialTypeByName" resultMap="materialTypeMap" parameterType="string"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt WHERE mt.tname = #{name} and mt.state != 3 and mt.state != 4 group by tname |
|||
</select> |
|||
|
|||
<!-- 根据主键查询数据 --> |
|||
<select id="findMaterialTypeByOldId" resultMap="materialTypeMap" parameterType="long"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM material_type mt WHERE mt.oldId = #{oldId} and mt.state != 3 and mt.state != 4 |
|||
</select> |
|||
<!-- 根据主键查询数据 |
|||
<select id="findMaterialTypeByIds" resultMap="materialTypeMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM material_type mt WHERE mt.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select>--> |
|||
|
|||
|
|||
<!-- 插入数据 --> |
|||
<insert id="insertMaterialType" parameterType="map"> |
|||
INSERT INTO material_type ( |
|||
id, tname, introduce,parentId,oldId |
|||
) VALUES ( |
|||
#{id}, |
|||
#{tname}, |
|||
#{introduce}, |
|||
#{parentId}, |
|||
#{oldId} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 批量插入数据 |
|||
<insert id="insertMaterialTypes" parameterType="list"> |
|||
INSERT INTO material_type ( |
|||
id, tname, introduce |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.tname}, |
|||
#{item.introduce} |
|||
) |
|||
</foreach> |
|||
</insert>--> |
|||
|
|||
|
|||
<!-- 修改数据 --> |
|||
<update id="updateMaterialType" parameterType="map"> |
|||
UPDATE material_type |
|||
<set> |
|||
<if test="tname != null"> |
|||
tname = #{tname}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce = #{introduce}, |
|||
</if> |
|||
<if test="state != null"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parentId = #{parentId} |
|||
</if> |
|||
</set> |
|||
WHERE oldId = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量修改数据 --> |
|||
<update id="updateMaterialTypes" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE material_type |
|||
<set> |
|||
<if test="item.tname != null"> |
|||
tname = #{item.tname}, |
|||
</if> |
|||
<if test="item.introduce != null"> |
|||
introduce = #{item.introduce} |
|||
</if> |
|||
<if test="state != null"> |
|||
state = #{state} |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parentId = #{parentId} |
|||
</if> |
|||
</set> |
|||
WHERE oldId = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
|
|||
<!-- 根据主键删除数据 --> |
|||
<delete id="deleteMaterialTypeById" parameterType="int"> |
|||
DELETE FROM material_type WHERE oldId = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据主键批量删除数据--> |
|||
<delete id="deleteMaterialTypeByIds" parameterType="list"> |
|||
DELETE FROM material_type WHERE oldId IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<!-- 根据主键将状态改为删除--> |
|||
<update id="changeStateToDeletedById" parameterType="int"> |
|||
update material_type |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where oldId = #{id} |
|||
</update> |
|||
|
|||
|
|||
<!-- 根据主键批量将状态改为删除--> |
|||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|||
update material_type |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where oldId in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
<update id="updateStateByParam" parameterType="map"> |
|||
update material_type |
|||
<set> |
|||
state = #{state} |
|||
</set> |
|||
where id = #{id} |
|||
<if test="oldState != null"> |
|||
and state = #{oldState} |
|||
</if> |
|||
and state != 3 and state != 4 |
|||
</update> |
|||
</mapper> |
|||
@ -0,0 +1,170 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- notice --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.NoticeMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="noticeMap" type="com.dreamchaser.depository_manage.entity.Notice"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="title" property="title" jdbcType="VARCHAR" /> |
|||
<result column="content" property="content" jdbcType="VARCHAR" /> |
|||
<result column="viewRangeId" property="viewRangeId" jdbcType="VARCHAR" /> |
|||
<result column="time" property="time" jdbcType="INTEGER" /> |
|||
<result column="state" property="state" jdbcType="INTEGER" /> |
|||
<result column="userId" property="userId" jdbcType="INTEGER" /> |
|||
</resultMap> |
|||
|
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
n.id, n.title, n.content, n.time,n.state,n.userId,n.viewRangeId |
|||
</sql> |
|||
|
|||
<!-- 查询所有 --> |
|||
<select id="findNoticeAll" resultMap="noticeMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM notice n |
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询列表 --> |
|||
<select id="findNoticeByCondition" resultMap="noticeMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM notice n WHERE 1 = 1 |
|||
<if test="title != null and title != ''"> |
|||
AND n.title LIKE CONCAT('%', #{title}, '%') |
|||
</if> |
|||
<if test="content != null and content != ''"> |
|||
AND n.content LIKE CONCAT('%', #{content}, '%') |
|||
</if> |
|||
<if test="startDate != null and startDate != ''"> |
|||
AND n.time >= #{startDate} |
|||
</if> |
|||
<if test="endDate != null and endDate != ''"> |
|||
AND n.time <= #{endDate} |
|||
</if> |
|||
<if test="userId != null and userId != ''"> |
|||
and n.userId = #{userId} |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and n.state = #{state} |
|||
</if> |
|||
order by n.time DESC |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findNoticeById" resultMap="noticeMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM notice n WHERE n.id = #{id} |
|||
</select> |
|||
|
|||
<!-- 根据主键查询信息 --> |
|||
<select id="findNoticeByIds" resultMap="noticeMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM notice n WHERE n.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<!-- 新增信息 --> |
|||
<insert id="addNotice" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO notice ( |
|||
title, content, time,userId,state,viewRangeId |
|||
) VALUES ( |
|||
#{title}, |
|||
#{content}, |
|||
#{time}, |
|||
#{userId}, |
|||
#{state}, |
|||
#{viewRangeId} |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
|
|||
<!-- 批量新增信息 --> |
|||
<insert id="addNotices" parameterType="list"> |
|||
INSERT INTO notice ( |
|||
id, title, content, time,userId,state,viewRangeId |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.title}, |
|||
#{item.content}, |
|||
#{item.time}, |
|||
#{item.userId}, |
|||
#{item.state}, |
|||
#{item.viewRangeId} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
|
|||
<!-- 修改信息--> |
|||
<update id="updateNotice"> |
|||
update notice |
|||
<set> |
|||
<if test="title != null and title !=''"> |
|||
title = #{title}, |
|||
</if> |
|||
<if test="content != null"> |
|||
content = #{content}, |
|||
</if> |
|||
<if test="time != null and time != ''"> |
|||
time = #{time}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="viewRangeId != null and viewRangeId != ''"> |
|||
viewRangeId = #{viewRangeId} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量修改信息 --> |
|||
<update id="updateNotices" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE notice |
|||
<set> |
|||
<if test="item.title != null"> |
|||
title = #{item.title}, |
|||
</if> |
|||
<if test="item.content != null"> |
|||
content = #{item.content}, |
|||
</if> |
|||
<if test="item.time != null"> |
|||
time = #{item.time}, |
|||
</if> |
|||
<if test="item.state != null and item.state != ''"> |
|||
state = #{item.state}, |
|||
</if> |
|||
<if test="item.viewRangeId != null and item.viewRangeId != ''"> |
|||
viewRangeId = #{item.viewRangeId} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
<!-- 根据主键删除 --> |
|||
<delete id="deleteNoticeById" parameterType="int"> |
|||
DELETE FROM notice WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据主键批量删除 --> |
|||
<delete id="deleteNoticeByIds" parameterType="list"> |
|||
DELETE FROM notice WHERE id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
|||
@ -0,0 +1,500 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- notice --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.PlaceMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="placeMap" type="com.dreamchaser.depository_manage.entity.Place"> |
|||
<id column="id" property="id" jdbcType="INTEGER"/> |
|||
<result column="x" property="x" jdbcType="INTEGER"/> |
|||
<result column="y" property="y" jdbcType="INTEGER"/> |
|||
<result column="z" property="z" jdbcType="INTEGER"/> |
|||
<result column="mid" property="mid" jdbcType="INTEGER"/> |
|||
<result column="did" property="did" jdbcType="INTEGER"/> |
|||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|||
<result column="kingdeecode" property="kingdeecode" jdbcType="VARCHAR"/> |
|||
<result column="min" property="min" jdbcType="INTEGER"/> |
|||
<result column="max" property="max" jdbcType="INTEGER"/> |
|||
<result column="state" property="state" jdbcType="INTEGER"/> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER"/> |
|||
<result column="flagForType" property="flagForType" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<resultMap id="materialAndPlaceMap" type="com.dreamchaser.depository_manage.entity.MaterialAndPlace"> |
|||
<id column="id" property="id" jdbcType="INTEGER"/> |
|||
<result column="mid" property="mid" jdbcType="INTEGER"/> |
|||
<result column="pid" property="pid" jdbcType="INTEGER"/> |
|||
<result column="did" property="did" jdbcType="INTEGER"/> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER"/> |
|||
<result column="max" property="max" jdbcType="INTEGER"/> |
|||
<result column="min" property="min" jdbcType="INTEGER"/> |
|||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|||
<result column="kingdeecode" property="kingdeecode" jdbcType="VARCHAR"/> |
|||
</resultMap> |
|||
|
|||
<resultMap id="MaterialAndPlaceForViewMap" type="com.dreamchaser.depository_manage.pojo.MaterialAndPlaceForViewP"> |
|||
<id column="id" property="id" jdbcType="INTEGER"/> |
|||
<result column="mid" property="mid" jdbcType="INTEGER"/> |
|||
<result column="pid" property="pid" jdbcType="INTEGER"/> |
|||
<result column="type_id" property="type_id" jdbcType="INTEGER"/> |
|||
<result column="iid" property="iid" jdbcType="INTEGER"/> |
|||
<result column="depository_id" property="depository_id" jdbcType="INTEGER"/> |
|||
<result column="inventory" property="inventory" jdbcType="INTEGER"/> |
|||
<result column="price" property="price" jdbcType="INTEGER"/> |
|||
<result column="dcode" property="dcode" jdbcType="VARCHAR"/> |
|||
<result column="dname" property="dname" jdbcType="VARCHAR"/> |
|||
<result column="pcode" property="pcode" jdbcType="VARCHAR"/> |
|||
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
|||
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
|||
<result column="version" property="version" jdbcType="VARCHAR"/> |
|||
<result column="mcode" property="mcode" jdbcType="VARCHAR"/> |
|||
<result column="tname" property="tname" jdbcType="VARCHAR"/> |
|||
<result column="mname" property="mname" jdbcType="VARCHAR"/> |
|||
<result column="adminorg" property="adminorg" jdbcType="VARCHAR"/> |
|||
<result column="kingdeecode" property="kingdeecode" jdbcType="VARCHAR"/> |
|||
</resultMap> |
|||
|
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
p.id,p.x,p.y,p.z,p.code,p.mid,p.did,p.min,p.max,p.state,p.quantity,p.flagForType,p.kingdeecode |
|||
</sql> |
|||
|
|||
<sql id="allColumnsByMaterialAndPlace"> |
|||
mp.id,mp.mid,mp.pid,mp.quantity,p.code,p.max,p.min,p.did |
|||
</sql> |
|||
|
|||
<sql id="allColumnsForView"> |
|||
depository_id,mname,type_id,tname,mcode,version,price,unit,texture,pcode,dname,adminorg,dcode,iid,inventory,id,pid,mid,kingdeecode |
|||
</sql> |
|||
|
|||
|
|||
<!-- 查询所有 --> |
|||
<select id="findPlaceAll" resultMap="placeMap"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p |
|||
where p.state != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceByMidAndDid" resultMap="placeMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
from materialandplace mp left join place p on p.id = mp.pid |
|||
where 1 = 1 |
|||
|
|||
<if test="mid != null and mid != ''"> |
|||
and mp.mid = #{mid} |
|||
</if> |
|||
<if test="did != null and did != ''"> |
|||
and ( p.did = #{did} or p.did = 0) |
|||
</if> |
|||
and p.state != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceByDidAndCode" resultMap="placeMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p WHERE 1 = 1 |
|||
<if test="code != '' and code != null"> |
|||
and p.code = #{code} |
|||
</if> |
|||
<if test="kingdeecode != '' and kingdeecode != null"> |
|||
and p.kingdeecode = #{kingdeecode} |
|||
</if> |
|||
<if test="did != '' and did != null"> |
|||
and p.did = #{did} |
|||
</if> |
|||
and p.state != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceAndMaterialByDidAndMid" resultMap="MaterialAndPlaceForViewMap" parameterType="map"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
FROM materialandplaceinfo WHERE 1 = 1 |
|||
<if test="mid != '' and mid != null"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and depository_id = #{depositoryId} |
|||
</if> |
|||
and pstate != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceAndMaterialByDidsAndMid" resultMap="MaterialAndPlaceForViewMap" parameterType="map"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
FROM materialandplaceinfo WHERE 1 = 1 |
|||
<if test="mid != '' and mid != null"> |
|||
and mid = #{mid} |
|||
</if> |
|||
and depository_id in |
|||
<foreach collection="list" index="index" item="did" open="(" separator="," close=")"> |
|||
#{did} |
|||
</foreach> |
|||
and pstate != 3 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findPlaceAndMaterialForViewById" resultMap="MaterialAndPlaceForViewMap" parameterType="int"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
FROM materialandplaceinfo WHERE id = #{id} |
|||
</select> |
|||
|
|||
|
|||
<select id="findPlaceAndMaterialCountByDidsAndMid" resultType="int" parameterType="map"> |
|||
select |
|||
COUNT(*) |
|||
FROM materialandplaceinfo WHERE 1 = 1 |
|||
<if test="mid != '' and mid != null"> |
|||
and mid = #{mid} |
|||
</if> |
|||
and depository_id in |
|||
<foreach collection="list" index="index" item="did" open="(" separator="," close=")"> |
|||
#{did} |
|||
</foreach> |
|||
and pstate != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceAndMaterialByCondition" parameterType="map" resultMap="MaterialAndPlaceForViewMap"> |
|||
select |
|||
<include refid="allColumnsForView"/> |
|||
FROM materialandplaceinfo WHERE 1 = 1 |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and depository_id = #{depositoryId} |
|||
</if> |
|||
<if test="placeId != null and placeId != ''"> |
|||
and pid = #{placeId} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like CONCAT('%',#{mname},'%') |
|||
</if> |
|||
and pstate != 3 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findPlaceAndMaterialCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
count(*) |
|||
FROM materialandplaceinfo WHERE 1 = 1 |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and depository_id = #{depositoryId} |
|||
</if> |
|||
<if test="placeId != null and placeId != ''"> |
|||
and pid = #{placeId} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like CONCAT('%',#{mname},'%') |
|||
</if> |
|||
and pstate != 3 |
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询列表 --> |
|||
<select id="findPlaceByCondition" resultMap="placeMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p WHERE 1 = 1 |
|||
<if test="id != null and id != ''"> |
|||
and p.id = #{id} |
|||
</if> |
|||
<if test="x != null and x != ''"> |
|||
AND p.x = #{x} |
|||
</if> |
|||
<if test="y != null and y != ''"> |
|||
AND p.y = #{y} |
|||
</if> |
|||
<if test="z != null and z != ''"> |
|||
AND p.z = #{z} |
|||
</if> |
|||
<if test="code != null and code != ''"> |
|||
AND p.code LIKE CONCAT('%', #{code}, '%') |
|||
</if> |
|||
<if test="kingdeecode != '' and kingdeecode != null"> |
|||
and p.kingdeecode = #{kingdeecode} |
|||
</if> |
|||
<if test="mid != null and mid != ''"> |
|||
AND find_in_set(#{mid},p.mid) |
|||
</if> |
|||
<if test="did != null and did != ''"> |
|||
AND p.did = #{did} |
|||
</if> |
|||
<if test="max != null and max != ''"> |
|||
AND p.max = #{max} |
|||
</if> |
|||
<if test="min != null and min != ''"> |
|||
AND p.min = #{min} |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and p.state = #{state} |
|||
</if> |
|||
and p.state != 3 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findTrayByDepositoryId" resultMap="placeMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p WHERE 1 = 1 |
|||
<if test="did != null and did != ''"> |
|||
AND p.did = #{did} |
|||
</if> |
|||
and p.flagForType = 2 |
|||
</select> |
|||
|
|||
<select id="findPlaceCountByCondition" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count(*) |
|||
FROM place p WHERE 1 = 1 |
|||
<if test="id != null and id != ''"> |
|||
and p.id = #{id} |
|||
</if> |
|||
<if test="x != null and x != ''"> |
|||
AND p.x = #{x} |
|||
</if> |
|||
<if test="y != null and y != ''"> |
|||
AND p.y = #{y} |
|||
</if> |
|||
<if test="code != null and code != ''"> |
|||
AND p.code LIKE CONCAT('%', #{code}, '%') |
|||
</if> |
|||
<if test="kingdeecode != '' and kingdeecode != null"> |
|||
and p.kingdeecode LIKE CONCAT('%', #{kingdeecode}, '%') |
|||
</if> |
|||
<if test="z != null and z != ''"> |
|||
AND p.z = #{z} |
|||
</if> |
|||
<if test="mid != null and mid != ''"> |
|||
AND p.mid = #{mid} |
|||
</if> |
|||
<if test="did != null and did != ''"> |
|||
AND p.did = #{did} |
|||
</if> |
|||
<if test="max != null and max != ''"> |
|||
AND p.max = #{max} |
|||
</if> |
|||
<if test="min != null and min != ''"> |
|||
AND p.min = #{min} |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and p.state = #{state} |
|||
</if> |
|||
and p.state != 3 |
|||
</select> |
|||
|
|||
<select id="findPlaceByDid" parameterType="int" resultMap="placeMap"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p WHERE 1 = 1 and p.did = #{did} and p.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<select id="findPlaceByMid" parameterType="int" resultMap="placeMap"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and mp.mid = #{mid} and p.state != 3 |
|||
</select> |
|||
|
|||
<select id="findQuantityByMidAndPid" parameterType="map" resultType="int"> |
|||
select quantity |
|||
from materialandplace |
|||
where pid = #{pid} and mid = #{mid} |
|||
</select> |
|||
|
|||
<!-- 根据主键查询信息 --> |
|||
<select id="findPlaceById" resultMap="placeMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM place p WHERE p.id = #{id} |
|||
</select> |
|||
|
|||
<select id="findPlaceAndMaterialByPid" resultMap="materialAndPlaceMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumnsByMaterialAndPlace"/> |
|||
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and p.id = #{id} and p.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<select id="findPlaceAndMaterialByMidAndPid" resultMap="materialAndPlaceMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumnsByMaterialAndPlace"/> |
|||
FROM materialandplace mp left join place p on p.id = mp.pid |
|||
where 1 = 1 |
|||
<if test="mid != null"> |
|||
and mp.mid = #{mid} |
|||
</if> |
|||
<if test="pid != null"> |
|||
and mp.pid = #{pid} |
|||
</if> |
|||
and p.state != 3 |
|||
</select> |
|||
<select id="findPlaceAndMaterialById" resultMap="materialAndPlaceMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumnsByMaterialAndPlace"/> |
|||
FROM materialandplace mp left join place p on p.id = mp.pid |
|||
where mp.id = #{id} and p.state != 3 |
|||
</select> |
|||
|
|||
|
|||
<!-- 新增信息 --> |
|||
<insert id="InsertPlace"> |
|||
INSERT INTO place ( |
|||
id,x,y,z,code, mid,did,min,max,state,quantity,flagForType,kingdeecode |
|||
) VALUES ( |
|||
#{id}, |
|||
#{x}, |
|||
#{y}, |
|||
#{z}, |
|||
#{code}, |
|||
#{mid}, |
|||
#{did}, |
|||
#{min}, |
|||
#{max}, |
|||
#{state}, |
|||
#{quantity}, |
|||
#{flagType}, |
|||
#{kingdeecode} |
|||
) |
|||
</insert> |
|||
|
|||
<insert id="addMaterialOnPlace" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into materialandplace(id,mid,pid,quantity) |
|||
values ( |
|||
#{id}, |
|||
#{mid}, |
|||
#{pid}, |
|||
#{quantity} |
|||
) |
|||
</insert> |
|||
|
|||
<delete id="delMaterialOnPlace" parameterType="int"> |
|||
DELETE FROM materialandplace WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 修改信息 --> |
|||
<update id="UpdatePlace"> |
|||
UPDATE place |
|||
<set> |
|||
<if test="x != null"> |
|||
x = #{x}, |
|||
</if> |
|||
<if test="y != null"> |
|||
y = #{y}, |
|||
</if> |
|||
<if test="z != null"> |
|||
z = #{z}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code}, |
|||
</if> |
|||
<if test="kingdeecode != null"> |
|||
kingdeecode = #{kingdeecode}, |
|||
</if> |
|||
<if test="mid != null"> |
|||
mid = #{mid}, |
|||
</if> |
|||
<if test="did != null"> |
|||
did = #{did}, |
|||
</if> |
|||
<if test="min != null"> |
|||
min = #{min}, |
|||
</if> |
|||
<if test="max != null"> |
|||
max = #{max}, |
|||
</if> |
|||
<if test="state != null and state !=''"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="quantity != null"> |
|||
quantity = #{quantity} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
<update id="updateMaterialAndPlace"> |
|||
update materialandplace |
|||
<set> |
|||
<if test="mid != null"> |
|||
mid = #{mid}, |
|||
</if> |
|||
<if test="quantity != null"> |
|||
quantity = #{quantity}, |
|||
</if> |
|||
<if test="pid != null"> |
|||
pid = #{pid} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
|
|||
<!-- 根据主键删除 --> |
|||
<delete id="DelPlace" parameterType="int"> |
|||
DELETE FROM place WHERE id = #{id} |
|||
</delete> |
|||
|
|||
|
|||
<!-- 根据主键批量将状态改为删除--> |
|||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|||
update place |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
<!-- 根据主键将状态改为删除--> |
|||
<update id="changeStateToDeletedById" parameterType="int"> |
|||
UPDATE place |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
<!--获取当前仓库下的行--> |
|||
<select id="findPlaceXByDid" parameterType="int" resultType="int"> |
|||
select DISTINCT x from place where did = #{did} and state != 3 and x is not null ORDER BY x desc |
|||
</select> |
|||
<!--获取当前仓库下的列--> |
|||
<select id="findPlaceYByDid" parameterType="map" resultType="int"> |
|||
select DISTINCT y from place where did = #{did} and x = #{x} and state != 3 ORDER BY y desc |
|||
</select> |
|||
<!--获取当前仓库下的ceng--> |
|||
<select id="findPlaceZByDid" parameterType="map" resultType="int"> |
|||
select DISTINCT z from place where did = #{did} and x = #{x} and state != 3 ORDER BY z desc |
|||
</select> |
|||
<select id="findPlaceCoutnByTypeForFlag" resultType="int" parameterType="map"> |
|||
select |
|||
count(*) |
|||
from place |
|||
where 1 = 1 |
|||
<if test="flag != null and flag != ''"> |
|||
and flagForType = #{flag} |
|||
</if> |
|||
<if test="did != null and did != ''"> |
|||
and did = #{did} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,159 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- 产品信息记录(库存)(material) --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.QrCodeMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
|
|||
<!-- 条形码与物料对应--> |
|||
<resultMap id="QrCodeAndLocationMap" type="com.dreamchaser.depository_manage.entity.PidOrDidAndCode"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|||
<result column="pid" property="pid" jdbcType="INTEGER"/> |
|||
<result column="flag" property="flag" jdbcType="INTEGER"/> |
|||
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/> |
|||
|
|||
</resultMap> |
|||
|
|||
|
|||
|
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
pdac.id,pdac.code,pdac.pid,pdac.flag,pdac.depositoryId |
|||
</sql> |
|||
|
|||
|
|||
<select id="findLocationByCondition" resultType="map" resultMap="QrCodeAndLocationMap"> |
|||
select |
|||
<include refid="allColumns"/> |
|||
from pidordidandcode pdac |
|||
where 1 = 1 |
|||
<if test="id != null and id != ''"> |
|||
and id = #{id} |
|||
</if> |
|||
<if test="pid != null"> |
|||
and pid = #{pid} |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and depositoryId = #{depositoryId} |
|||
</if> |
|||
<if test="flag != null and flag != ''"> |
|||
and flag = #{flag} |
|||
</if> |
|||
<if test="qrCode != null and qrCode!=''"> |
|||
and code = #{qrCode} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
<insert id="addQrCodeAndMaterial" parameterType="map"> |
|||
insert into qrcodeandmaterial(id,barCode,mcode,flag) |
|||
values ( |
|||
#{id}, |
|||
#{qrCode}, |
|||
#{mcode}, |
|||
2 |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
<insert id="addQrCodeAndMaterialForMoreOne" parameterType="map"> |
|||
insert into qrcodeandmaterial(id,mcode,barCode,flag) |
|||
values |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
(#{id}, |
|||
#{code}, |
|||
#{item}, |
|||
2 |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<select id="selectQrCodeByMcode" parameterType="string" resultType="string"> |
|||
select barCode |
|||
from qrcodeandmaterial |
|||
where mcode = #{mcode} and flag = 2 |
|||
</select> |
|||
|
|||
|
|||
<select id="findMaterialCodeByQrCode" parameterType="string" resultType="string"> |
|||
select mcode |
|||
from qrcodeandmaterial |
|||
where barCode = #{qrcode} and flag = 2 |
|||
</select> |
|||
|
|||
|
|||
<!-- 删除映射--> |
|||
<delete id="deleteQrCodeAndMaterial" parameterType="map"> |
|||
delete |
|||
from qrcodeandmaterial |
|||
where 1 = 1 |
|||
<if test="qrCode != null and qrCode != ''"> |
|||
and qrcode = #{qrCode} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="id != null and id != ''"> |
|||
and id = #{id} |
|||
</if> |
|||
<if test="codeFlag != null and codeFlag != ''"> |
|||
and flag = #{codeFlag} |
|||
</if> |
|||
|
|||
</delete> |
|||
|
|||
|
|||
<update id="updateQrCodeType"> |
|||
update qrcodeandmaterial |
|||
<set> |
|||
<if test="codeFlag != null and codeFlag != ''"> |
|||
flag = #{codeFlag} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<select id="selectQrCodeByDepositoryOrPlace" parameterType="map" resultType="string"> |
|||
select code |
|||
from pidordidandcode |
|||
where 1 = 1 |
|||
<if test="pid != null"> |
|||
and pid = #{pid} |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and depositoryId = #{depositoryId} |
|||
</if> |
|||
<if test="flag != null and flag != ''"> |
|||
and flag = #{flag} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<insert id="addQrCodeByPidOrDid" parameterType="map"> |
|||
insert into pidordidandcode(id,pid,depositoryId,flag,code) |
|||
values ( |
|||
#{id}, |
|||
#{pid}, |
|||
#{depositoryId}, |
|||
#{flag}, |
|||
#{qrCode} |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
<insert id="addQrCodeByPidOrDidForMoreOne" parameterType="map"> |
|||
insert into pidordidandcode(id,pid,depositoryId,flag,code) |
|||
values |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( #{id}, |
|||
#{pid}, |
|||
#{depositoryId}, |
|||
#{flag}, |
|||
#{item}) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,269 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- user --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.RoleMapper"> |
|||
<!-- 字段映射(权限) --> |
|||
|
|||
<!-- 权限映射--> |
|||
<resultMap id="postoruserroleMap" type="com.dreamchaser.depository_manage.entity.PostOrUserRole"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="classes" property="classes" jdbcType="INTEGER" /> |
|||
<result column="role" property="role" jdbcType="INTEGER" /> |
|||
<result column="userid" property="userid" jdbcType="INTEGER" /> |
|||
<result column="did" property="did" jdbcType="INTEGER" /> |
|||
</resultMap> |
|||
|
|||
<resultMap id="depositoryAndrole" type="com.dreamchaser.depository_manage.pojo.RoleAndDepository"> |
|||
<result column="prid" property="id" jdbcType="INTEGER"/> |
|||
<result column="userId" property="userId" jdbcType="INTEGER"/> |
|||
<result column="depositoryName" property="depositoryName" jdbcType="VARCHAR"/> |
|||
<result column="depositoryAddress" property="depositoryAddress" jdbcType="VARCHAR"/> |
|||
<result column="depositoryIntroduce" property="depositoryIntroduce" jdbcType="VARCHAR"/> |
|||
<result column="depositoryState" property="depositoryState" jdbcType="VARCHAR"/> |
|||
<result column="did" property="depositoryId" jdbcType="VARCHAR"/> |
|||
<result column="depositoryCode" property="depositoryCode" jdbcType="VARCHAR"/> |
|||
<result column="classes" property="classes" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<resultMap id="materialTypeAndRole" type="com.dreamchaser.depository_manage.pojo.RoleAndMaterialType"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="classes" property="classes" jdbcType="INTEGER"/> |
|||
<result column="mtid" property="mtid" jdbcType="INTEGER"/> |
|||
<result column="uid" property="uid" jdbcType="INTEGER"/> |
|||
<result column="tname" property="tname" jdbcType="VARCHAR"/> |
|||
<result column="mtstate" property="mtstate" jdbcType="INTEGER"/> |
|||
<result column="mtintroduce" property="mtintroduce" jdbcType="VARCHAR"/> |
|||
<result column="mtparentId" property="mtparentId" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<sql id="allColumns"> |
|||
r.id,r.name |
|||
</sql> |
|||
|
|||
<sql id="roleNameAnddepositoryName"> |
|||
prid,userid as userId,dname as depositoryName,address as depositoryAddress ,introduce as depositoryIntroduce,state as depositoryState,did,classes,code as depositoryCode |
|||
</sql> |
|||
|
|||
<sql id="roleNameAndMaterialTypeName"> |
|||
id,classes,mtid,uid,tname,mtstate,mtintroduce,mtparentId |
|||
</sql> |
|||
|
|||
|
|||
|
|||
<update id="updateUserOrPostRoleAndDepository" parameterType="map"> |
|||
update postoruserrole |
|||
<set> |
|||
<if test="authority != null and authority != ''"> |
|||
role = #{authority}, |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
did = #{depositoryId} |
|||
</if> |
|||
</set> |
|||
where userid = #{userid} |
|||
</update> |
|||
|
|||
<update id="UpdateRoleAndDepositoryById" parameterType="map"> |
|||
update postoruserrole |
|||
<set> |
|||
<if test="authority != null and authority != ''"> |
|||
role = #{authority}, |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
did = #{depositoryId}, |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
classes = #{classes} |
|||
</if> |
|||
</set> |
|||
where id = #{roleId} |
|||
</update> |
|||
|
|||
|
|||
<update id="UpdateRoleAndMaterialTypeById" parameterType="map"> |
|||
update mtanduserrole |
|||
<set> |
|||
<if test="mtid != null and mtid != ''"> |
|||
mtid = #{mtid}, |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
classes = #{classes} |
|||
</if> |
|||
</set> |
|||
where id = #{roleId} |
|||
</update> |
|||
|
|||
<insert id="addUserOrPostRoleAndDepository" parameterType="map"> |
|||
INSERT INTO postoruserrole ( |
|||
id, classes, role,userid,did |
|||
) VALUES ( |
|||
#{id}, |
|||
#{classes}, |
|||
#{authority}, |
|||
#{userid}, |
|||
#{depositoryId} |
|||
) |
|||
</insert> |
|||
|
|||
<insert id="addUserOrPostRoleAndDepositorys" parameterType="map"> |
|||
INSERT INTO postoruserrole ( |
|||
id, classes, role,userid,did |
|||
) |
|||
VALUES |
|||
<foreach collection="depositoryIds" index="index" item="did" separator="," > |
|||
(#{id}, |
|||
#{classes}, |
|||
#{authority}, |
|||
#{userid}, |
|||
#{did}) |
|||
</foreach> |
|||
|
|||
</insert> |
|||
|
|||
<insert id="addUserOrPostRoleAndMaterialType" parameterType="map"> |
|||
INSERT INTO mtanduserrole ( |
|||
id, classes,uid,mtid |
|||
) VALUES ( |
|||
#{id}, |
|||
#{classes}, |
|||
#{userid}, |
|||
#{mtid} |
|||
) |
|||
</insert> |
|||
|
|||
<insert id="addUserOrPostRoleAndMaterialTypes" parameterType="map"> |
|||
INSERT INTO mtanduserrole ( |
|||
id, classes,uid,mtid |
|||
) |
|||
VALUES |
|||
<foreach collection="mtIds" index="index" item="mtid" separator="," > |
|||
(#{id}, |
|||
#{classes}, |
|||
#{userid}, |
|||
#{mtid}) |
|||
</foreach> |
|||
|
|||
</insert> |
|||
|
|||
|
|||
|
|||
|
|||
<select id="findDepositoryAndRole" parameterType="int" resultMap="depositoryAndrole"> |
|||
select |
|||
<include refid="roleNameAnddepositoryName"/> |
|||
from userroleanddepository |
|||
where userid = #{userid} and state = 1 |
|||
</select> |
|||
|
|||
<select id="findRoleByUid" parameterType="int" resultType="int"> |
|||
select role from postoruserrole where userid = #{uid} and classes = 1 |
|||
</select> |
|||
|
|||
|
|||
<select id="findUserIdByDid" parameterType="int" resultType="int"> |
|||
select userid from postoruserrole where 1 = 1 and did = #{did} and classes in (1,2) group by userid |
|||
</select> |
|||
|
|||
<select id="findUserIdByMtId" parameterType="long" resultType="int"> |
|||
select uid from mtanduserrole where 1 = 1 and mtid = #{mtId} and classes in (1,2) group by uid |
|||
</select> |
|||
|
|||
<select id="findRoleAndDepositoryByCondition" parameterType="map" resultMap="depositoryAndrole"> |
|||
select |
|||
<include refid="roleNameAnddepositoryName"/> |
|||
from userroleanddepository |
|||
where 1 = 1 |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and did = #{depositoryId} |
|||
</if> |
|||
<if test="userId != null and userId != ''"> |
|||
and userId = #{userId} |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
and classes = #{classes} |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<select id="findRoleAndDepositoryCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
COUNT(*) |
|||
from userroleanddepository |
|||
where 1 = 1 |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and did = #{depositoryId} |
|||
</if> |
|||
<if test="userId != null and userId != ''"> |
|||
and userId = #{userId} |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
and classes = #{classes} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findRoleAndMaterialTypeByCondition" parameterType="map" resultMap="materialTypeAndRole"> |
|||
select |
|||
<include refid="roleNameAndMaterialTypeName"/> |
|||
from materialtypeanduser |
|||
where 1 = 1 |
|||
<if test="mtid != null and mtid != ''"> |
|||
and mtid = #{mtid} |
|||
</if> |
|||
<if test="uid != null and uid != ''"> |
|||
and uid = #{uid} |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
and classes = #{classes} |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
<select id="findRoleAndMaterialTypeCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
COUNT(*) |
|||
from materialtypeanduser |
|||
where 1 = 1 |
|||
<if test="mtid != null and mtid != ''"> |
|||
and mtid = #{mtid} |
|||
</if> |
|||
<if test="uid != null and uid != ''"> |
|||
and uid = #{uid} |
|||
</if> |
|||
<if test="classes != null and classes != ''"> |
|||
and classes = #{classes} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
|
|||
|
|||
<select id="findRoleAndDepositoryById" parameterType="int" resultMap="depositoryAndrole"> |
|||
select |
|||
<include refid="roleNameAnddepositoryName"/> |
|||
from userroleanddepository |
|||
where prid = #{id} |
|||
</select> |
|||
|
|||
<select id="findRoleAndMaterialTypeById" parameterType="int" resultMap="materialTypeAndRole"> |
|||
select |
|||
<include refid="roleNameAndMaterialTypeName"/> |
|||
from materialtypeanduser |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<delete id="deleteRoleAndDepositoryById" parameterType="int"> |
|||
delete from postoruserrole WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteRoleAndMaterialTypeById" parameterType="int"> |
|||
delete from mtanduserrole WHERE id = #{id} |
|||
</delete> |
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,332 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- user --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.SplitUnitMapper"> |
|||
<!-- 字段映射(权限) --> |
|||
|
|||
<!-- 权限映射--> |
|||
<resultMap id="splitInfoMap" type="com.dreamchaser.depository_manage.entity.SplitInfo"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|||
<result column="parentId" property="parentId" jdbcType="INTEGER" /> |
|||
<result column="state" property="state" jdbcType="INTEGER" /> |
|||
<result column="oldUnit" property="oldUnit" jdbcType="VARCHAR" /> |
|||
<result column="newUnit" property="newUnit" jdbcType="VARCHAR" /> |
|||
</resultMap> |
|||
|
|||
<resultMap id="splitInventoryMap" type="com.dreamchaser.depository_manage.entity.SplitInventory"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="iid" property="iid" jdbcType="INTEGER"/> |
|||
<result column="sid" property="sid" jdbcType="INTEGER"/> |
|||
<result column="outQuantity" property="outQuantity" jdbcType="INTEGER"/> |
|||
<result column="inQuantity" property="inQuantity" jdbcType="INTEGER"/> |
|||
<result column="saveQuantity" property="saveQuantity" jdbcType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
|
|||
<resultMap id="splitInfoPMap" type="com.dreamchaser.depository_manage.pojo.SplitInfoP"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|||
<result column="sparentId" property="sparentId" jdbcType="INTEGER" /> |
|||
<result column="sstate" property="sstate" jdbcType="INTEGER" /> |
|||
<result column="mstate" property="mstate" jdbcType="INTEGER" /> |
|||
<result column="oldUnit" property="oldUnit" jdbcType="VARCHAR" /> |
|||
<result column="newUnit" property="newUnit" jdbcType="VARCHAR" /> |
|||
<result column="version" property="version" jdbcType="VARCHAR" /> |
|||
<result column="texture" property="texture" jdbcType="VARCHAR" /> |
|||
<result column="mcode" property="mcode" jdbcType="VARCHAR" /> |
|||
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
|||
<result column="typeName" property="typeName" jdbcType="VARCHAR" /> |
|||
<result column="shelfLife" property="shelfLife" jdbcType="INTEGER"/> |
|||
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/> |
|||
<result column="brand" property="brand" jdbcType="VARCHAR"/> |
|||
<result column="remark" property="remark" jdbcType="VARCHAR"/> |
|||
</resultMap> |
|||
|
|||
<sql id="splitInfoAllColumns"> |
|||
s.id,s.mid,s.oldUnit,s.newUnit,s.quantity,s.parentId,s.state |
|||
</sql> |
|||
|
|||
<sql id="splitInventoryAllColumns"> |
|||
si.id,si.iid,si.sid,si.outQuantity,si.inQuantity,si.saveQuantity |
|||
</sql> |
|||
|
|||
<sql id="splitInfoPAllColumns"> |
|||
id,mid,oldUnit,newUnit,quantity,sparentId,sstate,shelfLife,productionPlace,brand,remark,mname,typeName,mcode,mstate,version,texture |
|||
</sql> |
|||
|
|||
<select id="findSplitInfoByMidAndUnit" parameterType="map" resultMap="splitInfoMap"> |
|||
select |
|||
<include refid="splitInfoAllColumns"/> |
|||
from `split` s |
|||
where 1 = 1 |
|||
<if test="mid != null and mid != ''"> |
|||
and s.mid = #{mid} |
|||
</if> |
|||
<if test="oldUnit != null and oldUnit != ''"> |
|||
and s.oldUnit = #{oldUnit} |
|||
</if> |
|||
<if test="newUnit != null and newUnit != ''"> |
|||
and s.newUnit = #{newUnit} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findSplitInfoById" parameterType="int" resultMap="splitInfoMap"> |
|||
select |
|||
<include refid="splitInfoAllColumns"/> |
|||
from `split` s |
|||
where s.id = #{id} |
|||
</select> |
|||
|
|||
|
|||
<select id="findSplitInfoByMid" parameterType="int" resultMap="splitInfoMap"> |
|||
select |
|||
<include refid="splitInfoAllColumns"/> |
|||
from `split` s |
|||
where s.mid = #{mid} and s.state = 1 |
|||
</select> |
|||
|
|||
|
|||
<select id="findSplitInventoryByIidAndSid" parameterType="map" resultMap="splitInventoryMap"> |
|||
select |
|||
<include refid="splitInventoryAllColumns"/> |
|||
from `split_inventory` si |
|||
where 1 = 1 |
|||
<if test="iid != null "> |
|||
and si.iid = #{iid} |
|||
</if> |
|||
<if test="sid != null "> |
|||
and si.sid = #{sid} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findSplitInventoryByIidAndSids" parameterType="map" resultMap="splitInventoryMap"> |
|||
select |
|||
<include refid="splitInventoryAllColumns"/> |
|||
from `split_inventory` si |
|||
where 1 = 1 |
|||
<if test="iid != null "> |
|||
and si.iid = #{iid} |
|||
</if> |
|||
and si.sid in |
|||
<foreach collection="list" index="index" item="sid" open="(" separator="," close=")"> |
|||
#{sid} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<select id="findSplitInventoryBySid" parameterType="int" resultMap="splitInventoryMap"> |
|||
select |
|||
<include refid="splitInventoryAllColumns"/> |
|||
from `split_inventory` si |
|||
where si.sid = #{sid} |
|||
</select> |
|||
|
|||
<select id="findSplitInventoryByIid" parameterType="int" resultMap="splitInventoryMap"> |
|||
select |
|||
<include refid="splitInventoryAllColumns"/> |
|||
from `split_inventory` si |
|||
where si.iid = #{Iid} |
|||
</select> |
|||
|
|||
<update id="updateSplitInfo"> |
|||
update `split` |
|||
<set> |
|||
<if test="mid != null and mid != ''"> |
|||
mid = #{mid}, |
|||
</if> |
|||
<if test="oldUnit != null and oldUnit != ''"> |
|||
oldUnit = #{oldUnit}, |
|||
</if> |
|||
<if test="newUnit != null and newUnit != ''"> |
|||
newUnit = #{newUnit}, |
|||
</if> |
|||
<if test="quantity != null and quantity != ''"> |
|||
quantity = #{quantity}, |
|||
</if> |
|||
<if test="parentId != null and parentId != ''"> |
|||
parentId = #{parentId}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state} |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<update id="updateSplitInventory"> |
|||
update `split_inventory` |
|||
<set> |
|||
<if test="iid != null and iid != ''"> |
|||
iid = #{iid}, |
|||
</if> |
|||
<if test="sid != null and sid != ''"> |
|||
sid = #{sid}, |
|||
</if> |
|||
<if test="outQuantity != null"> |
|||
outQuantity = #{outQuantity}, |
|||
</if> |
|||
<if test="inQuantity != null"> |
|||
inQuantity = #{inQuantity}, |
|||
</if> |
|||
<if test="saveQuantity != null"> |
|||
saveQuantity = #{saveQuantity}, |
|||
</if> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<insert id="addSplitInfo" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO `split` ( |
|||
id, mid, oldUnit,newUnit,quantity,parentId,state |
|||
) VALUES ( |
|||
#{id}, |
|||
#{mid}, |
|||
#{oldUnit}, |
|||
#{newUnit}, |
|||
#{quantity}, |
|||
#{parentId}, |
|||
#{state} |
|||
) |
|||
</insert> |
|||
|
|||
<insert id="addSplitInventory" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO `split_inventory` ( |
|||
id, iid, sid,outQuantity,inQuantity,saveQuantity |
|||
) VALUES ( |
|||
#{id}, |
|||
#{iid}, |
|||
#{sid}, |
|||
#{outQuantity}, |
|||
#{inQuantity}, |
|||
#{saveQuantity} |
|||
) |
|||
</insert> |
|||
|
|||
<delete id="delSplitInfoById" parameterType="int"> |
|||
delete from `split` WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="delSplitInfoByIds" parameterType="int"> |
|||
delete from `split` |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="delSplitInventoryById" parameterType="int"> |
|||
delete from `split_inventory` WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="delSplitInventoryByIds" parameterType="int"> |
|||
delete from `split_inventory` |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
|
|||
<select id="findSplitInfoPById" parameterType="int" resultMap="splitInfoPMap"> |
|||
select |
|||
<include refid="splitInfoPAllColumns"/> |
|||
from findsplitInfo |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<select id="findSplitInfoPByCondition" parameterType="map" resultMap="splitInfoPMap"> |
|||
select |
|||
<include refid="splitInfoPAllColumns"/> |
|||
from findsplitInfo |
|||
where 1 = 1 |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like concat('%',#{mname},'%') |
|||
</if> |
|||
<if test="oldUnit != null and oldUnit != ''"> |
|||
and oldUnit like concat('%',#{oldUnit},'%') |
|||
</if> |
|||
<if test="newUnit != null and newUnit != ''"> |
|||
and newUnit like concat('%',#{newUnit},'%') |
|||
</if> |
|||
<if test="parent != null and parent != ''"> |
|||
and sparent = #{parent} |
|||
</if> |
|||
<if test="mid != null and mid != ''"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="typeName != null and typeName != ''"> |
|||
and typeName like concat('%',#{typeName},'%') |
|||
</if> |
|||
<if test="version != null and version != ''"> |
|||
and version = #{version} |
|||
</if> |
|||
<if test="texture != null and texture != ''"> |
|||
and texture = #{texture} |
|||
</if> |
|||
<if test="mstate != null and mstate != ''"> |
|||
and mstate = #{mstate} |
|||
</if> |
|||
<if test="sstate != null and sstate != ''"> |
|||
and sstate = #{sstate} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findSplitInfoPCountByCondition" parameterType="map" resultType="int"> |
|||
select |
|||
count(*) |
|||
from findsplitInfo |
|||
where 1 = 1 |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like concat('%',#{mname},'%') |
|||
</if> |
|||
<if test="oldUnit != null and oldUnit != ''"> |
|||
and oldUnit like concat('%',#{oldUnit},'%') |
|||
</if> |
|||
<if test="newUnit != null and newUnit != ''"> |
|||
and newUnit like concat('%',#{newUnit},'%') |
|||
</if> |
|||
<if test="parent != null and parent != ''"> |
|||
and sparent = #{parent} |
|||
</if> |
|||
<if test="mid != null and mid != ''"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="typeName != null and typeName != ''"> |
|||
and typeName like concat('%',#{typeName},'%') |
|||
</if> |
|||
<if test="version != null and version != ''"> |
|||
and version = #{version} |
|||
</if> |
|||
<if test="texture != null and texture != ''"> |
|||
and texture = #{texture} |
|||
</if> |
|||
<if test="mstate != null and mstate != ''"> |
|||
and mstate = #{mstate} |
|||
</if> |
|||
<if test="sstate != null and sstate != ''"> |
|||
and sstate = #{sstate} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findSplitInfoByParentId" parameterType="int" resultMap="splitInfoMap"> |
|||
select |
|||
<include refid="splitInfoAllColumns"/> |
|||
from `split` s |
|||
where s.parentId = #{parentId} |
|||
</select> |
|||
|
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,338 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- notice --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.StockTakingMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="StockTakingMap" type="com.dreamchaser.depository_manage.entity.StockTaking"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="code" property="code" jdbcType="VARCHAR" /> |
|||
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER" /> |
|||
<result column="state" property="state" jdbcType="INTEGER" /> |
|||
<result column="departmentManagerState" property="departmentManagerState" jdbcType="INTEGER" /> |
|||
<result column="createTime" property="createTime" jdbcType="INTEGER" /> |
|||
<result column="completeTime" property="completeTime" jdbcType="INTEGER" /> |
|||
<result column="reviewTime" property="reviewTime" jdbcType="INTEGER" /> |
|||
<result column="originator" property="originator" jdbcType="INTEGER" /> |
|||
<result column="departmentManager" property="departmentManager" jdbcType="VARCHAR" /> |
|||
<result column="auditOpinion" property="auditOpinion" jdbcType="VARCHAR" /> |
|||
</resultMap> |
|||
|
|||
<resultMap id="StockTakingChildMap" type="com.dreamchaser.depository_manage.pojo.StockTakingChildP"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|||
<result column="oldInventory" property="oldInventory" jdbcType="INTEGER" /> |
|||
<result column="newInventory" property="newInventory" jdbcType="INTEGER" /> |
|||
<result column="inventory" property="inventory" jdbcType="INTEGER" /> |
|||
<result column="mainId" property="mainId" jdbcType="INTEGER" /> |
|||
<result column="takingResult" property="takingResult" jdbcType="VARCHAR" /> |
|||
<result column="mtexture" property="mtexture" jdbcType="VARCHAR" /> |
|||
<result column="mversion" property="mversion" jdbcType="VARCHAR" /> |
|||
<result column="munit" property="munit" jdbcType="VARCHAR" /> |
|||
<result column="stcUnit" property="unit" jdbcType="VARCHAR" /> |
|||
<result column="tname" property="tname" jdbcType="VARCHAR" /> |
|||
<result column="mcode" property="mcode" jdbcType="VARCHAR" /> |
|||
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
|||
<result column="mtId" property="mtId" jdbcType="INTEGER" /> |
|||
<result column="pid" property="pid" jdbcType="INTEGER" /> |
|||
<result column="producedDate" property="producedDate" jdbcType="INTEGER" /> |
|||
|
|||
</resultMap> |
|||
|
|||
|
|||
|
|||
<!-- 表查询字段 --> |
|||
<sql id="StockTakingAllColumns"> |
|||
st.id,st.code,st.depositoryId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState |
|||
</sql> |
|||
|
|||
<sql id="StockTakingChildPAllColumns"> |
|||
id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate,stcUnit,pid |
|||
</sql> |
|||
|
|||
<!-- 插入主表--> |
|||
<insert id="insertStockTaking" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO stocktaking (id,code,depositoryId,departmentManager,state,createTime,originator,departmentManagerState) |
|||
values ( |
|||
#{id}, |
|||
#{code}, |
|||
#{depositoryId}, |
|||
#{departmentManager}, |
|||
#{state}, |
|||
#{createTime}, |
|||
#{originator}, |
|||
#{departmentManagerState} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 插入子表--> |
|||
<insert id="insertStockTakingChild" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate,unit,pid) |
|||
values ( |
|||
#{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate},#{unit},#{placeId} |
|||
) |
|||
</insert> |
|||
|
|||
|
|||
<delete id="deleteStockTakingChild" parameterType="int"> |
|||
delete from stocktakingchild where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteStockTakingChilds" parameterType="list"> |
|||
delete from stocktakingchild |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="deleteStockTaking" parameterType="int"> |
|||
delete from stocktaking where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteStockTakings" parameterType="list"> |
|||
delete from stocktaking |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="updateStockTaking"> |
|||
update stocktaking |
|||
<set> |
|||
<if test="code != null and code != ''"> |
|||
code = #{code}, |
|||
</if> |
|||
<if test="depositoryId != null"> |
|||
depositoryId = #{depositoryId}, |
|||
</if> |
|||
<if test="departmentManager != null and departmentManager != ''"> |
|||
departmentManager = #{departmentManager}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state}, |
|||
</if> |
|||
<if test="departmentManagerState != null and departmentManagerState != ''"> |
|||
departmentManagerState = #{departmentManagerState}, |
|||
</if> |
|||
<if test="createTime != null and createTime != ''"> |
|||
createTime = #{createTime}, |
|||
</if> |
|||
<if test="originator != null and originator!=''"> |
|||
originator = #{originator}, |
|||
</if> |
|||
<if test="auditOpinion != null"> |
|||
auditOpinion = #{auditOpinion}, |
|||
</if> |
|||
<if test="completeTime != null and completeTime != ''"> |
|||
completeTime = #{completeTime}, |
|||
</if> |
|||
<if test="reviewTime != null and reviewTime != ''"> |
|||
reviewTime = #{reviewTime} |
|||
</if> |
|||
|
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
|
|||
<update id="updateStockTakingChild"> |
|||
update stocktakingchild |
|||
<set> |
|||
<if test="mid != null and mid != ''"> |
|||
mid = #{mid}, |
|||
</if> |
|||
<if test="oldInventory != null"> |
|||
oldInventory = #{oldInventory}, |
|||
</if> |
|||
<if test="newInventory != null"> |
|||
newInventory = #{newInventory}, |
|||
</if> |
|||
<if test="takingResult != null and takingResult != ''"> |
|||
takingResult = #{takingResult}, |
|||
</if> |
|||
<if test="inventory != null"> |
|||
inventory = #{inventory}, |
|||
</if> |
|||
<if test="mainId != null and mainId != ''"> |
|||
mainId = #{mainId}, |
|||
</if> |
|||
<if test="producedDate != null and producedDate != ''"> |
|||
producedDate = #{producedDate}, |
|||
</if> |
|||
<if test="placeId != null"> |
|||
pid = #{placeId}, |
|||
</if> |
|||
<if test="unit != null and unit != ''"> |
|||
unit = #{unit} |
|||
</if> |
|||
|
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<select id="selectStockTakingChildByMainId" parameterType="int" resultMap="StockTakingChildMap"> |
|||
select |
|||
<include refid="StockTakingChildPAllColumns"/> |
|||
from stocktakingchildinfo |
|||
where mainId = #{mainId} |
|||
</select> |
|||
|
|||
|
|||
<select id="selectStockTakingChildByIds" parameterType="list" resultMap="StockTakingChildMap"> |
|||
select |
|||
<include refid="StockTakingChildPAllColumns"/> |
|||
from stocktakingchildinfo |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<select id="selectStockTakingByCondition" parameterType="map" resultMap="StockTakingMap"> |
|||
select |
|||
<include refid="StockTakingAllColumns"/> |
|||
from stocktaking st |
|||
where 1 = 1 |
|||
<if test="code != null and code != ''"> |
|||
and st.code LIKE CONCAT('%', #{code}, '%') |
|||
</if> |
|||
<if test="depositoryId != null and depositoryId != ''"> |
|||
and st.depositoryId = #{depositoryId} |
|||
</if> |
|||
|
|||
<if test="departmentManagerState != null and departmentManagerState != ''"> |
|||
and st.departmentManagerState = #{departmentManagerState} |
|||
</if> |
|||
<if test="departmentManager != null and departmentManager != ''"> |
|||
and FIND_IN_SET(#{departmentManager},st.departmentManager) != 0 |
|||
</if> |
|||
<if test="originator != null and originator!=''"> |
|||
and st.originator = #{originator} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
|
|||
<select id="selectStockTakingChildPByCondition" parameterType="map" resultMap="StockTakingChildMap"> |
|||
select |
|||
<include refid="StockTakingChildPAllColumns"/> |
|||
from stocktakingchildinfo |
|||
where 1 = 1 |
|||
<if test="mid != null and mid != ''"> |
|||
and mid = #{mid} |
|||
</if> |
|||
<if test="oldInventory != null"> |
|||
and oldInventory = #{oldInventory} |
|||
</if> |
|||
<if test="newInventory != null"> |
|||
and newInventory = #{newInventory} |
|||
</if> |
|||
<if test="placeId != null"> |
|||
and pid = #{placeId} |
|||
</if> |
|||
<if test="takingResult != null and takingResult != ''"> |
|||
and takingResult = #{takingResult} |
|||
</if> |
|||
<if test="inventory != null"> |
|||
and inventory = #{inventory} |
|||
</if> |
|||
<if test="mainId != null and mainId != ''"> |
|||
and mainId = #{mainId} |
|||
</if> |
|||
<if test="mname != null and mname != ''"> |
|||
and mname like CONCAT('%',#{mname},'%') |
|||
</if> |
|||
<if test="mtId != null"> |
|||
and mtId = #{mtId} |
|||
</if> |
|||
<if test="mcode != null and mcode != ''"> |
|||
and mcode = #{mcode} |
|||
</if> |
|||
<if test="mversion != null and mversion != ''"> |
|||
and mversion = #{mversion} |
|||
</if> |
|||
<if test="munit != null and munit != ''"> |
|||
and munit = #{munit} |
|||
</if> |
|||
<if test="mtexture != null and mtexture != ''"> |
|||
and mtexture = #{mtexture} |
|||
</if> |
|||
<if test="producedDate != null"> |
|||
and producedDate = #{producedDate} |
|||
</if> |
|||
<if test="unit != null and unit !=''"> |
|||
and unit = #{unit} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="selectStockTakingById" resultMap="StockTakingMap"> |
|||
select |
|||
<include refid="StockTakingAllColumns"/> |
|||
from stocktaking st |
|||
where st.id = #{id} |
|||
</select> |
|||
|
|||
<select id="selectStockTakingChildPById" resultMap="StockTakingChildMap"> |
|||
select |
|||
<include refid="StockTakingChildPAllColumns"/> |
|||
from stocktakingchildinfo |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<select id="findMyTask" parameterType="map" resultMap="StockTakingMap"> |
|||
select |
|||
<include refid="StockTakingAllColumns"/> |
|||
from stocktaking st |
|||
where 1 = 1 |
|||
<if test='isDone == 0'> |
|||
and (state = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|||
</if> |
|||
<if test='isDone == 1'> |
|||
and (state != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|||
</if> |
|||
ORDER BY st.createTime desc |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findMyTaskCount" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count(*) |
|||
from stocktaking st |
|||
where 1 = 1 |
|||
<if test='isDone == 0'> |
|||
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|||
|
|||
</if> |
|||
<if test='isDone == 1'> |
|||
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) |
|||
|
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
|
|||
<select id="findMyApply" parameterType="map" resultMap="StockTakingMap"> |
|||
select |
|||
<include refid="StockTakingAllColumns"/> |
|||
from stocktaking st |
|||
where 1 = 1 |
|||
and originator = #{userId} |
|||
ORDER BY st.createTime desc |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findMyApplyCount" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count(*) |
|||
from stocktaking st |
|||
where 1 = 1 |
|||
and originator = #{userId} |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,153 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- transfer_record --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.TransferRecordMapper"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="transferRecordMap" type="com.dreamchaser.depository_manage.entity.TransferRecord"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="from_id" property="fromId" jdbcType="INTEGER" /> |
|||
<result column="to_id" property="toId" jdbcType="INTEGER" /> |
|||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|||
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER" /> |
|||
<result column="applicantId" property="applicantId" jdbcType="INTEGER" /> |
|||
<result column="from_place_id" property="fromPlaceId" jdbcType="INTEGER" /> |
|||
<result column="to_place_id" property="toPlaceId" jdbcType="INTEGER" /> |
|||
</resultMap> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
tr.id, tr.from_id, tr.to_id,tr.mid,tr.applicantTime,tr.applicantId,tr.from_place_id,tr.to_place_id |
|||
</sql> |
|||
|
|||
<!-- 查询所有 |
|||
<select id="findTransferRecordAll" resultMap="transferRecordMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM transfer_record tr |
|||
</select>--> |
|||
|
|||
|
|||
<!-- 根据条件参数查询列表--> |
|||
<select id="findTransferRecordByCondition" resultMap="transferRecordMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM transfer_record tr WHERE 1 = 1 |
|||
<if test="fromId != null"> |
|||
AND tr.from_id = #{fromId} |
|||
</if> |
|||
<if test="toId != null"> |
|||
AND tr.to_id = #{toId} |
|||
</if> |
|||
<if test="mid != null"> |
|||
and tr.mid = #{mid} |
|||
</if> |
|||
<if test="applicantTime != null"> |
|||
and tr.applicantTime = #{applicantTime} |
|||
</if> |
|||
<if test="applicantId != null"> |
|||
and tr.applicantId = #{applicantId} |
|||
</if> |
|||
<if test="fromPlaceId != null"> |
|||
and tr.from_place_id = #{fromPlaceId} |
|||
</if> |
|||
<if test="toPlaceId != null"> |
|||
and tr.to_place_id = #{toPlaceId} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据主键查询信息 |
|||
<select id="findTransferRecordByIds" resultMap="transferRecordMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM transfer_record tr WHERE tr.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select>--> |
|||
|
|||
<select id="findTransferRecordById" resultMap="transferRecordMap" parameterType="int"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM transfer_record tr WHERE tr.id = #{id} |
|||
</select> |
|||
<!-- 新增信息 --> |
|||
<insert id="addTransferRecord" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|||
INSERT INTO transfer_record ( |
|||
id, from_id, to_id,quantity,mid,applicantTime,applicantId,from_place_id,to_place_id |
|||
) VALUES ( |
|||
#{id}, |
|||
#{fromId}, |
|||
#{toId}, |
|||
#{quantity}, |
|||
#{mid}, |
|||
#{applicantTime}, |
|||
#{applicantId}, |
|||
#{fromPlaceId}, |
|||
#{toPlaceId} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 批量新增信息 |
|||
<insert id="addTransferRecords" parameterType="list"> |
|||
INSERT INTO transfer_record ( |
|||
id, from_id, to_id |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.fromId}, |
|||
#{item.toId} |
|||
) |
|||
</foreach> |
|||
</insert>--> |
|||
|
|||
|
|||
<!-- 修改信息 |
|||
<update id="updateTransferRecord"> |
|||
UPDATE transfer_record |
|||
<set> |
|||
<if test="fromId != null"> |
|||
from_id = #{fromId}, |
|||
</if> |
|||
<if test="toId != null"> |
|||
to_id = #{toId} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update>--> |
|||
|
|||
|
|||
<!-- 批量修改信息 |
|||
<update id="updateTransferRecords" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE transfer_record |
|||
<set> |
|||
<if test="item.fromId != null"> |
|||
from_id = #{item.fromId}, |
|||
</if> |
|||
<if test="item.toId != null"> |
|||
to_id = #{item.toId} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{item.id} |
|||
</foreach> |
|||
</update>--> |
|||
|
|||
|
|||
<!-- 根据主键删除 |
|||
<delete id="deleteTransferRecordById" parameterType="int"> |
|||
DELETE FROM transfer_record WHERE id = #{id} |
|||
</delete>--> |
|||
|
|||
|
|||
<!-- 根据主键批量删除 |
|||
<delete id="deleteTransferRecordByIds" parameterType="list"> |
|||
DELETE FROM transfer_record WHERE id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete>--> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,381 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- user --> |
|||
<mapper namespace="com.dreamchaser.depository_manage.mapper.UserMapper"> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="userMap" type="com.dreamchaser.depository_manage.entity.User"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
|||
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
|||
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
|||
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
|||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|||
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
|||
<result column="email" property="email" jdbcType="VARCHAR" /> |
|||
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
|||
<result column="state" property="state" javaType="INTEGER"/> |
|||
</resultMap> |
|||
|
|||
<!-- 字段映射(包括角色名)--> |
|||
<resultMap id="userMapWithRoleName" type="com.dreamchaser.depository_manage.entity.User"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="state" property="state" javaType="INTEGER"/> |
|||
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
|||
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
|||
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
|||
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
|||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|||
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
|||
<result column="email" property="email" jdbcType="VARCHAR" /> |
|||
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
|||
<association property="role" javaType="com.dreamchaser.depository_manage.entity.Role"> |
|||
<id property="id" column="authority"/> |
|||
<result property="name" column="name"/> |
|||
</association> |
|||
</resultMap> |
|||
<!-- 表查询字段(不敏感信息) --> |
|||
<sql id="noSensitiveColumns"> |
|||
u.id, u.uname, u.sex, u.entry_date |
|||
</sql> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
u.id, u.uname, u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
|||
u.phone,u.state |
|||
</sql> |
|||
|
|||
<sql id="ColumnsAndRoleName"> |
|||
u.id, u.uname,u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
|||
u.phone,u.state |
|||
</sql> |
|||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|||
<!-- 查询该表的行数 --> |
|||
<select id="findCount" resultType="integer"> |
|||
SELECT |
|||
count(*) |
|||
FROM user u |
|||
</select> |
|||
<!-- 根据条件查询数据的数量 --> |
|||
<select id="findCountByCondition" resultType="integer" parameterType="map"> |
|||
SELECT |
|||
count(*) |
|||
FROM user u WHERE 1 = 1 |
|||
<if test="uname != null and uname != ''"> |
|||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|||
</if> |
|||
<if test="authority != null and authority != ''"> |
|||
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
|||
</if> |
|||
<if test="pwd != null and pwd != ''"> |
|||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|||
</if> |
|||
<if test="sex != null and sex != ''"> |
|||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|||
</if> |
|||
<if test="depositoryId != null"> |
|||
AND u.depository_id = #{depositoryId} |
|||
</if> |
|||
<if test="entryDate != null"> |
|||
AND u.entry_date = #{entryDate} |
|||
</if> |
|||
<if test="email != null and email != ''"> |
|||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and u.state = #{state} |
|||
</if> |
|||
and u.state != 3 |
|||
</select> |
|||
<!-- 查询所有数据 --> |
|||
<!-- <select id="findUserAll" resultMap="userMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM user u |
|||
</select>--> |
|||
|
|||
<!-- 根据id查询数据列表 --> |
|||
<select id="findUserNameById" resultType="string" parameterType="int"> |
|||
SELECT |
|||
u.uname |
|||
FROM user u WHERE u.id=#{id} |
|||
</select> |
|||
|
|||
|
|||
<!-- 根据email查询数据列表 --> |
|||
<select id="findUserByEmail" resultMap="userMap" parameterType="string"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM user u WHERE u.email LIKE CONCAT('%', #{email}, '%') |
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询数据列表 --> |
|||
<select id="findUsersByCondition" resultMap="userMapWithRoleName" parameterType="map"> |
|||
SELECT |
|||
<include refid="ColumnsAndRoleName" /> |
|||
FROM user u WHERE 1 = 1 |
|||
<if test="uname != null and uname != ''"> |
|||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|||
</if> |
|||
<if test="authority != null and authority != ''"> |
|||
AND u.authority = #{authority} |
|||
</if> |
|||
<if test="pwd != null and pwd != ''"> |
|||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|||
</if> |
|||
<if test="sex != null and sex != ''"> |
|||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|||
</if> |
|||
<if test="depositoryId != null"> |
|||
AND u.depository_id = #{depositoryId} or u.depository_id = 0 |
|||
</if> |
|||
<if test="entryDate != null"> |
|||
AND u.entry_date = #{entryDate} |
|||
</if> |
|||
<if test="email != null and email != ''"> |
|||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
And u.state = #{state} |
|||
</if> |
|||
and u.state != 3 |
|||
<if test="begin != null and size != null"> |
|||
LIMIT #{begin},#{size} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询数据列表 --> |
|||
<select id="findUserByCondition" resultMap="userMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM user u WHERE 1 = 1 |
|||
<if test="uname != null and uname != ''"> |
|||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|||
</if> |
|||
<if test="authority != null and authority != ''"> |
|||
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
|||
</if> |
|||
<if test="pwd != null and pwd != ''"> |
|||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|||
</if> |
|||
<if test="sex != null and sex != ''"> |
|||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|||
</if> |
|||
<if test="depositoryId != null"> |
|||
AND u.depository_id = #{depositoryId} |
|||
</if> |
|||
<if test="entryDate != null"> |
|||
AND u.entry_date = #{entryDate} |
|||
</if> |
|||
<if test="email != null and email != ''"> |
|||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
and u.state = #{state} |
|||
</if> |
|||
and u.state != 3 |
|||
</select> |
|||
|
|||
<!-- 根据主键查询数据 --> |
|||
<select id="findUserById" resultMap="userMap" parameterType="integer"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM user u WHERE u.id = #{id} |
|||
</select> |
|||
|
|||
<!-- 根据主键查询数据 |
|||
<select id="findUserByIds" resultMap="userMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM user u WHERE u.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select>--> |
|||
|
|||
|
|||
<!-- 插入数据 --> |
|||
<insert id="insertUser" parameterType="map"> |
|||
INSERT INTO user ( |
|||
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
|||
phone |
|||
) VALUES ( |
|||
#{id}, |
|||
#{uname}, |
|||
#{authority}, |
|||
#{pwd}, |
|||
#{sex}, |
|||
#{depositoryId}, |
|||
#{entryDate}, |
|||
#{email}, |
|||
#{phone} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 批量插入数据 |
|||
<insert id="insertUsers" parameterType="list"> |
|||
INSERT INTO user ( |
|||
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
|||
phone |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.uname}, |
|||
#{item.authority}, |
|||
#{item.pwd}, |
|||
#{item.sex}, |
|||
#{item.depositoryId}, |
|||
#{item.entryDate}, |
|||
#{item.email}, |
|||
#{item.phone} |
|||
) |
|||
</foreach> |
|||
</insert>--> |
|||
|
|||
<!-- 修改不敏感数据(这里由于并未对手机号进行验证所以这个也是非敏感信息可以给用户自己修改) --> |
|||
<update id="updateUserNoSensitive" parameterType="map"> |
|||
UPDATE user |
|||
<set> |
|||
<if test='uname != null and uname!=""'> |
|||
uname = #{uname}, |
|||
</if> |
|||
<if test='sex != null and sex!=""'> |
|||
sex = #{sex}, |
|||
</if> |
|||
<if test="entryDate != null and entryDate!=''"> |
|||
entry_date = #{entryDate}, |
|||
</if> |
|||
<if test="phone != null and phone !=''"> |
|||
phone = #{phone} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
<!-- 修改数据 --> |
|||
<update id="updateUser" parameterType="map"> |
|||
UPDATE user |
|||
<set> |
|||
<if test='uname != null and uname!=""'> |
|||
uname = #{uname}, |
|||
</if> |
|||
<if test='authority != null and authority!=""'> |
|||
authority = #{authority}, |
|||
</if> |
|||
<if test="pwd != null and pwd!=''"> |
|||
pwd = #{pwd}, |
|||
</if> |
|||
<if test='sex != null and sex!=""'> |
|||
sex = #{sex}, |
|||
</if> |
|||
<if test="depositoryId != null and depository!=''"> |
|||
depository_id = #{depositoryId}, |
|||
</if> |
|||
<if test="entryDate != null and entryDate!=''"> |
|||
entry_date = #{entryDate}, |
|||
</if> |
|||
<if test="email != null and email != ''"> |
|||
email = #{email}, |
|||
</if> |
|||
<if test="phone != null and phone !=''"> |
|||
phone = #{phone}, |
|||
</if> |
|||
<if test="state != null and state != ''"> |
|||
state = #{state} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量修改数据 |
|||
<update id="updateUsers" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE user |
|||
<set> |
|||
<if test="item.uname != null"> |
|||
uname = #{item.uname}, |
|||
</if> |
|||
<if test="item.authority != null"> |
|||
authority = #{item.authority}, |
|||
</if> |
|||
<if test="item.pwd != null"> |
|||
pwd = #{item.pwd}, |
|||
</if> |
|||
<if test="item.sex != null"> |
|||
sex = #{item.sex}, |
|||
</if> |
|||
<if test="item.depositoryId != null"> |
|||
depository_id = #{item.depositoryId}, |
|||
</if> |
|||
<if test="item.entryDate != null"> |
|||
entry_date = #{item.entryDate}, |
|||
</if> |
|||
<if test="item.email != null"> |
|||
email = #{item.email}, |
|||
</if> |
|||
<if test="item.phone != null"> |
|||
phone = #{item.phone} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{item.id} |
|||
</foreach> |
|||
</update>--> |
|||
|
|||
|
|||
<!-- 根据主键删除数据 --> |
|||
<delete id="deleteUserById" parameterType="integer"> |
|||
DELETE FROM user WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据主键批量删除数据 --> |
|||
<delete id="deleteUserByIds" parameterType="list"> |
|||
DELETE FROM user WHERE id IN |
|||
<!-- 单参数时,List对象只能为list,数组对象只能为array,多参数用map时,collection参数才为KeyName --> |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<!--根据主键将状态修改为删除--> |
|||
<update id="changeUserStateToDeleteById" parameterType="integer"> |
|||
update user |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
<!--根据主键批量将状态修改为删除--> |
|||
<update id="changeUserStateToDeleteByIds" parameterType="list"> |
|||
update user |
|||
<set> |
|||
state = 3 |
|||
</set> |
|||
where id in |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
|
|||
<update id="updateUserPasswordById" parameterType="map"> |
|||
update user |
|||
<set> |
|||
pwd = #{new_password} |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
|
|||
<select id="FindDepositoryByUserId" parameterType="int" resultType="string"> |
|||
select dname from depositoryanduserbyport where uid = #{id} |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,143 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<!-- standing_book --> |
|||
<mapper namespace="mysql.standingBook"> |
|||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|||
<!-- 字段映射 --> |
|||
<resultMap id="standingBookMap" type="StandingBook"> |
|||
<id column="id" property="id" jdbcType="INTEGER" /> |
|||
<result column="type" property="type" jdbcType="INTEGER" /> |
|||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|||
<result column="price" property="price" jdbcType="INTEGER" /> |
|||
<result column="material_name" property="materialName" jdbcType="VARCHAR" /> |
|||
</resultMap> |
|||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|||
|
|||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|||
<!-- 表查询字段 --> |
|||
<sql id="allColumns"> |
|||
sb.id, sb.type, sb.quantity, sb.price, sb.material_name |
|||
</sql> |
|||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|||
|
|||
<!-- 查询所有数据 --> |
|||
<select id="findStandingBookAll" resultMap="standingBookMap"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM standing_book sb |
|||
</select> |
|||
|
|||
<!-- 根据条件参数查询数据列表 --> |
|||
<select id="findStandingBookByCondition" resultMap="standingBookMap" parameterType="map"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM standing_book sb WHERE 1 = 1 |
|||
<if test="type != null"> |
|||
AND sb.type = #{type} |
|||
</if> |
|||
<if test="quantity != null"> |
|||
AND sb.quantity = #{quantity} |
|||
</if> |
|||
<if test="price != null"> |
|||
AND sb.price = #{price} |
|||
</if> |
|||
<if test="materialName != null and materialName != ''"> |
|||
AND sb.material_name LIKE CONCAT('%', #{materialName}, '%') |
|||
</if> |
|||
</select> |
|||
|
|||
<!-- 根据主键查询数据 --> |
|||
<select id="findStandingBookByIds" resultMap="standingBookMap" parameterType="list"> |
|||
SELECT |
|||
<include refid="allColumns" /> |
|||
FROM standing_book sb WHERE sb.id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<!-- 插入数据 --> |
|||
<insert id="insertStandingBook" parameterType="map"> |
|||
INSERT INTO standing_book ( |
|||
id, type, quantity, price, material_name |
|||
) VALUES ( |
|||
#{id}, |
|||
#{type}, |
|||
#{quantity}, |
|||
#{price}, |
|||
#{materialName} |
|||
) |
|||
</insert> |
|||
|
|||
<!-- 批量插入数据 --> |
|||
<insert id="insertStandingBooks" parameterType="list"> |
|||
INSERT INTO standing_book ( |
|||
id, type, quantity, price, material_name |
|||
) VALUES |
|||
<foreach collection="list" index="index" item="item" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.type}, |
|||
#{item.quantity}, |
|||
#{item.price}, |
|||
#{item.materialName} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<!-- 修改数据 --> |
|||
<update id="updateStandingBook" parameterType="map"> |
|||
UPDATE standing_book |
|||
<set> |
|||
<if test="type != null"> |
|||
type = #{type}, |
|||
</if> |
|||
<if test="quantity != null"> |
|||
quantity = #{quantity}, |
|||
</if> |
|||
<if test="price != null"> |
|||
price = #{price}, |
|||
</if> |
|||
<if test="materialName != null"> |
|||
material_name = #{materialName} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{id} |
|||
</update> |
|||
|
|||
<!-- 批量修改数据 --> |
|||
<update id="updateStandingBooks" parameterType="list"> |
|||
<foreach collection="list" index="index" item="item" separator=";"> |
|||
UPDATE standing_book |
|||
<set> |
|||
<if test="item.type != null"> |
|||
type = #{item.type}, |
|||
</if> |
|||
<if test="item.quantity != null"> |
|||
quantity = #{item.quantity}, |
|||
</if> |
|||
<if test="item.price != null"> |
|||
price = #{item.price}, |
|||
</if> |
|||
<if test="item.materialName != null"> |
|||
material_name = #{item.materialName} |
|||
</if> |
|||
</set> |
|||
WHERE id = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
|
|||
<!-- 根据主键删除数据 --> |
|||
<delete id="deleteStandingBookById" parameterType="int"> |
|||
DELETE FROM standing_book WHERE id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据主键批量删除数据 --> |
|||
<delete id="deleteStandingBookByIds" parameterType="list"> |
|||
DELETE FROM standing_book WHERE id IN |
|||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
|||
@ -0,0 +1,155 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration scan="true" scanPeriod="60 seconds" debug="false"> |
|||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> |
|||
<!-- 应用名称--> |
|||
<property name="appName" value="Dreamchser"/> |
|||
<!-- 日志的存放目录--> |
|||
<!-- debug--> |
|||
<property name="DEBUG_LOG_FILE_NAME_PATTERN" value="logs/${appName}-debug.%d{yyyy-MM-dd}.%i.log"/> |
|||
<property name="INFO_LOG_FILE_NAME_PATTERN" value="logs/${appName}-info.%d{yyyy-MM-dd}.%i.log"/> |
|||
<property name="WARN_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-warn.%d{yyyy-MM-dd}.%i.log"/> |
|||
<property name="ERROR_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-error.%d{yyyy-MM-dd}.%i.log"/> |
|||
<!-- 日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" |
|||
value="%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%c){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
|||
<property name="FILE_LOG_PATTERN" |
|||
value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %c : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
|||
<!--输出到控制台--> |
|||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<encoder> |
|||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
|
|||
</appender> |
|||
|
|||
<!--输出到DEBUG文件--> |
|||
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${DEBUG_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|||
<!-- 日志保留天数 --> |
|||
<maxHistory>30</maxHistory> |
|||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|||
<totalSizeCap>2GB</totalSizeCap> |
|||
<!-- 每个日志文件的最大值 --> |
|||
<timeBasedFileNamingAndTriggeringPolicy |
|||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>50MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
</rollingPolicy> |
|||
<encoder> |
|||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
<!-- 此日志文件只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!--输出到INFO文件--> |
|||
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${INFO_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|||
<!-- 日志保留天数 --> |
|||
<maxHistory>7</maxHistory> |
|||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|||
<totalSizeCap>1GB</totalSizeCap> |
|||
<!-- 每个日志文件的最大值 --> |
|||
<timeBasedFileNamingAndTriggeringPolicy |
|||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>50MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
</rollingPolicy> |
|||
<encoder> |
|||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
<!-- 此日志文件只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!--输出到WARN文件--> |
|||
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${WARN_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|||
<!-- 日志保留天数 --> |
|||
<maxHistory>30</maxHistory> |
|||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|||
<totalSizeCap>1GB</totalSizeCap> |
|||
<!-- 每个日志文件的最大值 --> |
|||
<timeBasedFileNamingAndTriggeringPolicy |
|||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>10MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
</rollingPolicy> |
|||
<encoder> |
|||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
<!-- 此日志文件只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!--输出到ERROR文件--> |
|||
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${ERROR_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|||
<!-- 日志保留天数 --> |
|||
<maxHistory>30</maxHistory> |
|||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|||
<totalSizeCap>1GB</totalSizeCap> |
|||
<!-- 每个日志文件的最大值 --> |
|||
<timeBasedFileNamingAndTriggeringPolicy |
|||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>10MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
</rollingPolicy> |
|||
<encoder> |
|||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
<!-- 此日志文件只记录error级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>error</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
<!-- region 根据不同的环境设置不同的日志输出级别 --> |
|||
<springProfile name="default,local,dev"> |
|||
<root level="info"> |
|||
<appender-ref ref="console"/> |
|||
</root> |
|||
<!-- <logger name="com.dreamchaser" level="debug"/>--> |
|||
|
|||
</springProfile> |
|||
|
|||
|
|||
<springProfile name="prod,pre,test"> |
|||
<root level="info"> |
|||
<appender-ref ref="console"/> |
|||
<appender-ref ref="debug_file"/> |
|||
<appender-ref ref="info_file"/> |
|||
<appender-ref ref="warn_file"/> |
|||
<appender-ref ref="error_file"/> |
|||
</root> |
|||
<logger name="com.ibatis" level="DEBUG" /> |
|||
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" /> |
|||
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" /> |
|||
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" /> |
|||
<logger name="java.sql.Connection" level="DEBUG" /> |
|||
<logger name="java.sql.Statement" level="DEBUG" /> |
|||
<logger name="java.sql.PreparedStatement" level="DEBUG" /> |
|||
<logger name="java.sql.ResultSet" level="DEBUG" /> |
|||
<logger name="com.dreamchaser.dream.depository_manage.mapper" level="DEBUG" /> |
|||
<!-- <logger name="com.dreamchaser.mapper" level="debug"/>--> |
|||
</springProfile> |
|||
<!-- endregion --> |
|||
|
|||
</configuration> |
|||
@ -0,0 +1,26 @@ |
|||
#Redisson配置 |
|||
singleServerConfig: |
|||
address: "redis://127.0.0.1:6379" |
|||
clientName: null |
|||
database: 7 #选择使用哪个数据库0~15 |
|||
idleConnectionTimeout: 10000 |
|||
pingTimeout: 1000 |
|||
connectTimeout: 10000 |
|||
timeout: 3000 |
|||
retryAttempts: 3 |
|||
retryInterval: 1500 |
|||
reconnectionTimeout: 3000 |
|||
failedAttempts: 3 |
|||
subscriptionsPerConnection: 5 |
|||
subscriptionConnectionMinimumIdleSize: 1 |
|||
subscriptionConnectionPoolSize: 50 |
|||
connectionMinimumIdleSize: 32 |
|||
connectionPoolSize: 64 |
|||
dnsMonitoringInterval: 5000 |
|||
#dnsMonitoring: false |
|||
|
|||
threads: 0 |
|||
nettyThreads: 0 |
|||
codec: |
|||
class: "org.redisson.codec.JsonJacksonCodec" |
|||
transportMode: "NIO" |
|||
@ -0,0 +1,4 @@ |
|||
{ |
|||
"code": 1, |
|||
"msg": "服务端清理缓存成功" |
|||
} |
|||
@ -0,0 +1,226 @@ |
|||
{ |
|||
"homeInfo": { |
|||
"title": "首页", |
|||
"href": "/welcome" |
|||
}, |
|||
"logoInfo": { |
|||
"title": "Repository", |
|||
"image": "static/images/logo.png", |
|||
"href": "" |
|||
}, |
|||
"menuInfo": [ |
|||
{ |
|||
"title": "仓库信息概览", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-tachometer", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "首页", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-home", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-lemon-o", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "申请提交", |
|||
"icon": "fa fa-book", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库申请", |
|||
"href": "/application_in", |
|||
"icon": "layui-icon layui-icon-file-b", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库申请", |
|||
"href": "/application_out", |
|||
"icon": "fa fa-file-text", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存转移申请", |
|||
"href": "/application_transfer", |
|||
"icon": "fa fa-exchange", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "入库管理", |
|||
"icon": "fa fa-mail-forward", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库查询", |
|||
"href": "/table_in", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化", |
|||
"href": "/chart_in", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化(测试)", |
|||
"href": "/chart_in_back", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "出库管理", |
|||
"icon": "fa fa-mail-reply", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "出库查询", |
|||
"href": "/table_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库可视化", |
|||
"href": "/chart_out", |
|||
"icon": "fa fa-pie-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "库存管理", |
|||
"icon": "fa fa-server", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "库存查询", |
|||
"href": "/table_stock", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存可视化", |
|||
"href": "/chart_stock", |
|||
"icon": "fa fa-area-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建仓库", |
|||
"href": "/depository_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "仓库查询", |
|||
"href": "/depository-out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料种类管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "物料种类添加", |
|||
"href": "/materialType_add", |
|||
"icon": "layui-icon layui-icon-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料种类查询", |
|||
"href": "/materialType_view", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建物料", |
|||
"href": "/material_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料查询", |
|||
"href": "/material_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "我的任务", |
|||
"icon": "fa fa-tasks", |
|||
"target": "_self", |
|||
"href": "/my_task" |
|||
}, |
|||
{ |
|||
"title": "我的申请", |
|||
"href": "/my_apply", |
|||
"icon": "fa fa-paper-plane", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "辅助管理", |
|||
"icon": "fa fa-slideshare", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "人员管理", |
|||
"href": "/table_user", |
|||
"icon": "fa fa-group", |
|||
"target": "" |
|||
}, |
|||
{ |
|||
"title": "公告发布", |
|||
"href": "/notice_edit", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "个人中心", |
|||
"href": "pages/error.html", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "个人信息", |
|||
"href": "/account_look", |
|||
"icon": "layui-icon layui-icon-friends", |
|||
"target": "" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,220 @@ |
|||
{ |
|||
"homeInfo": { |
|||
"title": "首页", |
|||
"href": "/welcome" |
|||
}, |
|||
"logoInfo": { |
|||
"title": "Repository", |
|||
"image": "static/images/logo.png", |
|||
"href": "" |
|||
}, |
|||
"menuInfo": [ |
|||
{ |
|||
"title": "仓库信息概览", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-tachometer", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "首页", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-home", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-lemon-o", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "申请提交", |
|||
"icon": "fa fa-book", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库申请", |
|||
"href": "/application_in", |
|||
"icon": "layui-icon layui-icon-file-b", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库申请", |
|||
"href": "/application_out", |
|||
"icon": "fa fa-file-text", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存转移申请", |
|||
"href": "application_transfer", |
|||
"icon": "fa fa-exchange", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "入库管理", |
|||
"icon": "fa fa-mail-forward", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库查询", |
|||
"href": "/table_in", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化", |
|||
"href": "/chart_in", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化(测试)", |
|||
"href": "/chart_in_back", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "出库管理", |
|||
"icon": "fa fa-mail-reply", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "出库查询", |
|||
"href": "/table_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库可视化", |
|||
"href": "/chart_out", |
|||
"icon": "fa fa-pie-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "库存管理", |
|||
"icon": "fa fa-server", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "库存查询", |
|||
"href": "/table_stock", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存可视化", |
|||
"href": "/chart_stock", |
|||
"icon": "fa fa-area-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建仓库", |
|||
"href": "/depository_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "仓库查询", |
|||
"href": "/depository-out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料种类管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "物料种类添加", |
|||
"href": "/materialType_add", |
|||
"icon": "layui-icon layui-icon-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料种类查询", |
|||
"href": "/materialType_view", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建物料", |
|||
"href": "/material_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料查询", |
|||
"href": "/material_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "我的任务", |
|||
"icon": "fa fa-tasks", |
|||
"target": "_self", |
|||
"href": "/my_task" |
|||
}, |
|||
{ |
|||
"title": "我的申请", |
|||
"href": "/my_apply", |
|||
"icon": "fa fa-paper-plane", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "辅助管理", |
|||
"icon": "fa fa-slideshare", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "公告发布", |
|||
"href": "/notice_edit", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "个人中心", |
|||
"href": "pages/error.html", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "个人信息", |
|||
"href": "/account_look", |
|||
"icon": "layui-icon layui-icon-friends", |
|||
"target": "" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,226 @@ |
|||
{ |
|||
"homeInfo": { |
|||
"title": "首页", |
|||
"href": "/welcome" |
|||
}, |
|||
"logoInfo": { |
|||
"title": "Repository", |
|||
"image": "static/images/logo.png", |
|||
"href": "" |
|||
}, |
|||
"menuInfo": [ |
|||
{ |
|||
"title": "仓库信息概览", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-tachometer", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "首页", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-home", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-lemon-o", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "申请提交", |
|||
"icon": "fa fa-book", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库申请", |
|||
"href": "/application_in", |
|||
"icon": "layui-icon layui-icon-file-b", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库申请", |
|||
"href": "/application_out", |
|||
"icon": "fa fa-file-text", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存转移申请", |
|||
"href": "application_transfer", |
|||
"icon": "fa fa-exchange", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "入库管理", |
|||
"icon": "fa fa-mail-forward", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库查询", |
|||
"href": "/table_in", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化", |
|||
"href": "/chart_in", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "入库可视化(测试)", |
|||
"href": "/chart_in_back", |
|||
"icon": "fa fa-bar-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "出库管理", |
|||
"icon": "fa fa-mail-reply", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "出库查询", |
|||
"href": "/table_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库可视化", |
|||
"href": "/chart_out", |
|||
"icon": "fa fa-pie-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "库存管理", |
|||
"icon": "fa fa-server", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "库存查询", |
|||
"href": "/table_stock", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存可视化", |
|||
"href": "/chart_stock", |
|||
"icon": "fa fa-area-chart", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建仓库", |
|||
"href": "/depository_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "仓库查询", |
|||
"href": "/depository-out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料种类管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "物料种类添加", |
|||
"href": "/materialType_add", |
|||
"icon": "layui-icon layui-icon-list", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料种类查询", |
|||
"href": "/materialType_view", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "物料管理", |
|||
"icon": "fa fa-wrench", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "创建物料", |
|||
"href": "/material_add", |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "物料查询", |
|||
"href": "/material_out", |
|||
"icon": "fa fa-th-list", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "我的任务", |
|||
"icon": "fa fa-tasks", |
|||
"target": "_self", |
|||
"href": "/my_task" |
|||
}, |
|||
{ |
|||
"title": "我的申请", |
|||
"href": "/my_apply", |
|||
"icon": "fa fa-paper-plane", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "辅助管理", |
|||
"icon": "fa fa-slideshare", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "人员管理", |
|||
"href": "/table_user", |
|||
"icon": "fa fa-group", |
|||
"target": "" |
|||
}, |
|||
{ |
|||
"title": "公告发布", |
|||
"href": "/notice_edit", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "个人中心", |
|||
"href": "pages/error.html", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "个人信息", |
|||
"href": "/account_look", |
|||
"icon": "layui-icon layui-icon-friends", |
|||
"target": "" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
{ |
|||
"homeInfo": { |
|||
"title": "首页", |
|||
"href": "/welcome" |
|||
}, |
|||
"logoInfo": { |
|||
"title": "Repository", |
|||
"image": "static/images/logo.png", |
|||
"href": "" |
|||
}, |
|||
"menuInfo": [ |
|||
{ |
|||
"title": "仓库信息概览", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-tachometer", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "首页", |
|||
"href": "/welcome", |
|||
"icon": "fa fa-home", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "仓库管理", |
|||
"icon": "fa fa-lemon-o", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "申请提交", |
|||
"icon": "fa fa-book", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "入库申请", |
|||
"href": "/application_in", |
|||
"icon": "layui-icon layui-icon-file-b", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "出库申请", |
|||
"href": "/application_out", |
|||
"icon": "fa fa-file-text", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"title": "库存转移申请", |
|||
"href": "application_transfer", |
|||
"icon": "fa fa-exchange", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "我的任务", |
|||
"icon": "fa fa-tasks", |
|||
"target": "_self", |
|||
"href": "/my_task" |
|||
}, |
|||
{ |
|||
"title": "我的申请", |
|||
"href": "/my_apply", |
|||
"icon": "fa fa-paper-plane", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "辅助管理", |
|||
"icon": "fa fa-slideshare", |
|||
"href": "", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "公告发布", |
|||
"href": "/notice_edit", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"title": "个人中心", |
|||
"href": "pages/error.html", |
|||
"icon": "fa fa-superpowers", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"title": "个人信息", |
|||
"href": "/account_look", |
|||
"icon": "layui-icon layui-icon-friends", |
|||
"target": "" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,254 @@ |
|||
{ |
|||
"code": 0, |
|||
"msg": "", |
|||
"count": 19, |
|||
"data": [ |
|||
{ |
|||
"authorityId": 1, |
|||
"authorityName": "系统管理", |
|||
"orderNumber": 1, |
|||
"menuUrl": null, |
|||
"menuIcon": "layui-icon-set", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": null, |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 0, |
|||
"parentId": -1 |
|||
}, |
|||
{ |
|||
"authorityId": 2, |
|||
"authorityName": "用户管理", |
|||
"orderNumber": 2, |
|||
"menuUrl": "system/user", |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": null, |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 0, |
|||
"parentId": 1 |
|||
}, |
|||
{ |
|||
"authorityId": 3, |
|||
"authorityName": "查询用户", |
|||
"orderNumber": 3, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/07/21 13:54:16", |
|||
"authority": "user:view", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/21 13:54:16", |
|||
"isMenu": 1, |
|||
"parentId": 2 |
|||
}, |
|||
{ |
|||
"authorityId": 4, |
|||
"authorityName": "添加用户", |
|||
"orderNumber": 4, |
|||
"menuUrl": null, |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "user:add", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 2 |
|||
}, |
|||
{ |
|||
"authorityId": 5, |
|||
"authorityName": "修改用户", |
|||
"orderNumber": 5, |
|||
"menuUrl": null, |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "user:edit", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 2 |
|||
}, |
|||
{ |
|||
"authorityId": 6, |
|||
"authorityName": "删除用户", |
|||
"orderNumber": 6, |
|||
"menuUrl": null, |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "user:delete", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 2 |
|||
}, |
|||
{ |
|||
"authorityId": 7, |
|||
"authorityName": "角色管理", |
|||
"orderNumber": 7, |
|||
"menuUrl": "system/role", |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": null, |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 0, |
|||
"parentId": 1 |
|||
}, |
|||
{ |
|||
"authorityId": 8, |
|||
"authorityName": "查询角色", |
|||
"orderNumber": 8, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/07/21 13:54:59", |
|||
"authority": "role:view", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/21 13:54:58", |
|||
"isMenu": 1, |
|||
"parentId": 7 |
|||
}, |
|||
{ |
|||
"authorityId": 9, |
|||
"authorityName": "添加角色", |
|||
"orderNumber": 9, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "role:add", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 7 |
|||
}, |
|||
{ |
|||
"authorityId": 10, |
|||
"authorityName": "修改角色", |
|||
"orderNumber": 10, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "role:edit", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 7 |
|||
}, |
|||
{ |
|||
"authorityId": 11, |
|||
"authorityName": "删除角色", |
|||
"orderNumber": 11, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "role:delete", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 7 |
|||
}, |
|||
{ |
|||
"authorityId": 12, |
|||
"authorityName": "角色权限管理", |
|||
"orderNumber": 12, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "role:auth", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 15:27:18", |
|||
"isMenu": 1, |
|||
"parentId": 7 |
|||
}, |
|||
{ |
|||
"authorityId": 13, |
|||
"authorityName": "权限管理", |
|||
"orderNumber": 13, |
|||
"menuUrl": "system/authorities", |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": null, |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 15:45:13", |
|||
"isMenu": 0, |
|||
"parentId": 1 |
|||
}, |
|||
{ |
|||
"authorityId": 14, |
|||
"authorityName": "查询权限", |
|||
"orderNumber": 14, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/07/21 13:55:57", |
|||
"authority": "authorities:view", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/21 13:55:56", |
|||
"isMenu": 1, |
|||
"parentId": 13 |
|||
}, |
|||
{ |
|||
"authorityId": 15, |
|||
"authorityName": "添加权限", |
|||
"orderNumber": 15, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "authorities:add", |
|||
"checked": 0, |
|||
"updateTime": "2018/06/29 11:05:41", |
|||
"isMenu": 1, |
|||
"parentId": 13 |
|||
}, |
|||
{ |
|||
"authorityId": 16, |
|||
"authorityName": "修改权限", |
|||
"orderNumber": 16, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/07/13 09:13:42", |
|||
"authority": "authorities:edit", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/13 09:13:42", |
|||
"isMenu": 1, |
|||
"parentId": 13 |
|||
}, |
|||
{ |
|||
"authorityId": 17, |
|||
"authorityName": "删除权限", |
|||
"orderNumber": 17, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": "authorities:delete", |
|||
"checked": 0, |
|||
"updateTime": "2018/06/29 11:05:41", |
|||
"isMenu": 1, |
|||
"parentId": 13 |
|||
}, |
|||
{ |
|||
"authorityId": 18, |
|||
"authorityName": "登录日志", |
|||
"orderNumber": 18, |
|||
"menuUrl": "system/loginRecord", |
|||
"menuIcon": null, |
|||
"createTime": "2018/06/29 11:05:41", |
|||
"authority": null, |
|||
"checked": 0, |
|||
"updateTime": "2018/06/29 11:05:41", |
|||
"isMenu": 0, |
|||
"parentId": 1 |
|||
}, |
|||
{ |
|||
"authorityId": 19, |
|||
"authorityName": "查询登录日志", |
|||
"orderNumber": 19, |
|||
"menuUrl": "", |
|||
"menuIcon": "", |
|||
"createTime": "2018/07/21 13:56:43", |
|||
"authority": "loginRecord:view", |
|||
"checked": 0, |
|||
"updateTime": "2018/07/21 13:56:43", |
|||
"isMenu": 1, |
|||
"parentId": 18 |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,139 @@ |
|||
{ |
|||
"code": 0, |
|||
"msg": "", |
|||
"count": 1000, |
|||
"data": [ |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 2001, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "无", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10001, |
|||
"applicationId": 3301, |
|||
"materialName": "麒麟980芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "已入库", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2021-10-06 10:05", |
|||
"reviewRemarks": "审核批准!", |
|||
"reviewTime": "2021-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准", |
|||
"checkerName": "李四", |
|||
"checkRemarks": "验收无误,入库!", |
|||
"checkTime": "2021-10-8 15:23" |
|||
}, |
|||
{ |
|||
"id": 10002, |
|||
"applicationId": 409, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 123, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 321, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 456, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 456, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 123, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,136 @@ |
|||
{ |
|||
"code": 0, |
|||
"msg": "", |
|||
"count": 1000, |
|||
"data": [ |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 2001, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "无", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10001, |
|||
"applicationId": 3301, |
|||
"materialName": "麒麟980芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "已入库", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2021-10-06 10:05", |
|||
"reviewRemarks": "审核批准!", |
|||
"reviewTime": "2021-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10002, |
|||
"applicationId": 409, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 123, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 321, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 456, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 456, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "购入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"applicationId": 123, |
|||
"materialName": "骁龙888芯片", |
|||
"depositoryName": "外芯仓库", |
|||
"quantity": "409", |
|||
"price": "205004109", |
|||
"type": "转入", |
|||
"state": "待审核", |
|||
"applicantName": "张三", |
|||
"reviewerName": "King", |
|||
"applyTime": "2020-10-06 10:05", |
|||
"reviewTime": "2020-10-07 11:12", |
|||
"depositoryId": 57, |
|||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
{ |
|||
"code": 0, |
|||
"msg": "", |
|||
"count": 1000, |
|||
"data": [ |
|||
{ |
|||
"id": 10000, |
|||
"uname": "张三", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "外芯仓库", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "李四", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "义乌仓库a", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "King", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "义乌仓库b", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "张三", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "宁波仓库", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "张三", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "宁波仓库", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "boss", |
|||
"sex": "男", |
|||
"authority": "系统管理员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "all", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "张三", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "外芯仓库", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
}, |
|||
{ |
|||
"id": 10000, |
|||
"uname": "张三", |
|||
"sex": "男", |
|||
"authority": "仓管员", |
|||
"phone": "4561348", |
|||
"email": "12345689@qq.com", |
|||
"depositoryName": "外芯仓库", |
|||
"entryDate": "2012-10-06", |
|||
"depositoryId": 1 |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
{ |
|||
"code": 0, |
|||
"msg": "", |
|||
"count": 16, |
|||
"data": [ |
|||
{ |
|||
"id": "001", |
|||
"username": "张玉林", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "002", |
|||
"username": "刘晓军", |
|||
"sex": "男" |
|||
}, |
|||
{ |
|||
"id": "003", |
|||
"username": "张恒", |
|||
"sex": "男" |
|||
}, |
|||
{ |
|||
"id": "004", |
|||
"username": "朱一", |
|||
"sex": "男" |
|||
}, |
|||
{ |
|||
"id": "005", |
|||
"username": "刘佳能", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "006", |
|||
"username": "晓梅", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "007", |
|||
"username": "马冬梅", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "008", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "009", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "010", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "011", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "012", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "013", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "014", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "015", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
}, |
|||
{ |
|||
"id": "016", |
|||
"username": "刘晓庆", |
|||
"sex": "女" |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,225 @@ |
|||
{ |
|||
"homeInfo": { |
|||
"title": "首页", |
|||
"href": "/welcome" |
|||
}, |
|||
"logoInfo": { |
|||
"title": "Repository", |
|||
"image": "static/images/logo.png", |
|||
"href": "" |
|||
}, |
|||
"menuInfo": [ |
|||
{ |
|||
"icon": "fa fa-home", |
|||
"href": "/welcome", |
|||
"title": "仓库信息概览", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "fa fa-home", |
|||
"href": "/welcome", |
|||
"title": "首页", |
|||
"target": "_self", |
|||
"child": [] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/account_look", |
|||
"title": "个人中心", |
|||
"target": "_self", |
|||
"child": [] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-lemon-o", |
|||
"href": "", |
|||
"title": "仓库管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/my_task", |
|||
"title": "我的任务", |
|||
"target": "_self", |
|||
"child": [] |
|||
}, |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/my_apply", |
|||
"title": "我的申请", |
|||
"target": "_self", |
|||
"child": [] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "申请提交", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "layui-icon layui-icon-file-b", |
|||
"href": "/application_in", |
|||
"title": "入库申请", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-file-text", |
|||
"href": "/application_out", |
|||
"title": "出库申请", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-exchange", |
|||
"href": "/application_transfer", |
|||
"title": "库存转移申请", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "入库管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "fa fa-th-list", |
|||
"href": "/table_in", |
|||
"title": "入库查询", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-bar-chart", |
|||
"href": "/chart_in", |
|||
"title": "入库可视化", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "出库管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "fa fa-th-list", |
|||
"href": "/table_out", |
|||
"title": "出库查询", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-pie-chart", |
|||
"href": "/chart_out", |
|||
"title": "出库可视化", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "库存管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "fa fa-th-list", |
|||
"href": "/table_stock", |
|||
"title": "库存查询", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-area-chart", |
|||
"href": "/chart_stock", |
|||
"title": "库存可视化", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "仓库管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/depository_add", |
|||
"title": "创建仓库", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "fa fa-th-list", |
|||
"href": "/depository-out", |
|||
"title": "仓库查询", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "物料种类管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "fa fa-th-list", |
|||
"href": "/materialType_add", |
|||
"title": "物料种类添加", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/materialType_view", |
|||
"title": "物料种类查询", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-mail-forward", |
|||
"href": "", |
|||
"title": "物料管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/material_add", |
|||
"title": "创建物料", |
|||
"target": "_self" |
|||
}, |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/material_out", |
|||
"title": "物料查询", |
|||
"target": "_self" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"icon": "fa fa-slideshare", |
|||
"href": "", |
|||
"title": "辅助管理", |
|||
"target": "_self", |
|||
"child": [ |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/table_user", |
|||
"title": "人员管理", |
|||
"target": "_self", |
|||
"child": [] |
|||
}, |
|||
{ |
|||
"icon": "layui-icon layui-icon-template-1", |
|||
"href": "/notice_edit", |
|||
"title": "公告发布", |
|||
"target": "_self", |
|||
"child": [] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
{ |
|||
"code": 1, |
|||
"msg": "上传成功", |
|||
"data": { |
|||
"url": [ |
|||
"../images/logo.png", |
|||
"../images/captcha.jpg" |
|||
] |
|||
} |
|||
} |
|||
@ -0,0 +1,217 @@ |
|||
body { |
|||
margin: 0; |
|||
padding: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.container { |
|||
width: 900px; |
|||
height: auto; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.header { |
|||
display: flex; |
|||
align-items: center; |
|||
width: 100%; |
|||
height: 100px; |
|||
margin: 10px 0; |
|||
border: 1px solid gray; |
|||
} |
|||
.printer { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-left: 10px; |
|||
} |
|||
.printer span { |
|||
display: block; |
|||
width: 120px; |
|||
} |
|||
.printer select { |
|||
width: 520px; |
|||
height: 26px; |
|||
} |
|||
.printer .reset { |
|||
width: 120px; |
|||
height: 24px; |
|||
margin-left: 10px; |
|||
line-height: 24px; |
|||
text-align: center; |
|||
border: 1px solid #a9a9a9; |
|||
} |
|||
|
|||
.main { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
width: 100%; |
|||
} |
|||
|
|||
.main-left { |
|||
width: 60%; |
|||
} |
|||
.send1{ |
|||
|
|||
width: 90%; |
|||
height: 30px; |
|||
margin: 10px ; |
|||
line-height: 30px; |
|||
text-align: center; |
|||
font-size: 16px; |
|||
/* border: 1px solid gray; */ |
|||
/* border-radius: 5px; */ |
|||
/* margin: 10px 10px; */ |
|||
|
|||
} |
|||
|
|||
.flex-rows { |
|||
padding: 10px 0 10px 10px; |
|||
margin-bottom: 20px; |
|||
border: 1px solid gray; |
|||
} |
|||
|
|||
.flex-rows p { |
|||
font-size: 16px; |
|||
} |
|||
.flex-rows .ex2 { |
|||
display: flex; |
|||
align-items: center; |
|||
height: 40px; |
|||
} |
|||
|
|||
.function .ex2 span, |
|||
.upgrade .ex2 span { |
|||
display: block; |
|||
width: 120px; |
|||
font-size: 14px; |
|||
} |
|||
.parameter .ex2 span { |
|||
display: block; |
|||
width: 160px; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.ex2 .right { |
|||
width: 500px; |
|||
} |
|||
.ex2 .diy-span-class{ |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
|
|||
.ex2 .diy-span-class span { |
|||
display: block; |
|||
width: 30px ; |
|||
margin-left: 6px; |
|||
font-size: 14px; |
|||
} |
|||
.ex2 .diy-span-class span:nth-child(1) { |
|||
margin-left: 0; |
|||
} |
|||
|
|||
.headselect{ |
|||
width: 500px; |
|||
} |
|||
|
|||
.ex2 .right input[type='text'] { |
|||
width: 200px; |
|||
height: 24px; |
|||
} |
|||
|
|||
.ex2 .right input[type='button'], |
|||
.ex2 .right input[type='number'], |
|||
.ex2 .right input[type='reset'], |
|||
.ex2 .right select { |
|||
width: 120px; |
|||
height: 24px; |
|||
} |
|||
|
|||
.ex2 .diy-span-class input[type='number'] { |
|||
width: 60px; |
|||
height: 24px; |
|||
} |
|||
|
|||
|
|||
.ex2 .right input[type='number'] { |
|||
height: 22px; |
|||
} |
|||
|
|||
.ex2 .right select, |
|||
.ex2 .right input[type='button'] { |
|||
height: 28px; |
|||
} |
|||
|
|||
.ex2 .crc input[type='text'] { |
|||
width: 120px; |
|||
height: 24px; |
|||
} |
|||
.file-input { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.select-file { |
|||
position: relative; |
|||
width: 120px; |
|||
height: 28px; |
|||
margin-left: 6px; |
|||
border: 1px solid #a9a9a9; |
|||
} |
|||
|
|||
.select-file span { |
|||
width: 100%; |
|||
height: 100%; |
|||
line-height: 28px; |
|||
text-align: center; |
|||
background-color: #fff; |
|||
} |
|||
.select-file input { |
|||
opacity: 0; |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 100%; |
|||
top: 0; |
|||
left: 0; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.main-right { |
|||
width: 36%; |
|||
height: 860px; |
|||
margin-top: -20px; |
|||
border: 1px solid gray; |
|||
} |
|||
.main-right p { |
|||
padding-left: 5%; |
|||
} |
|||
|
|||
.overflowTest { |
|||
width: 90%; |
|||
height: 320px; |
|||
margin: 0 auto; |
|||
padding: 4px; |
|||
border: 1px solid gray; |
|||
background-color: #fff; |
|||
overflow: scroll; |
|||
} |
|||
#overflowTest1 { |
|||
width: 90%; |
|||
height: 320px; |
|||
margin: 0 auto; |
|||
padding: 4px; |
|||
border: 1px solid gray; |
|||
background-color: #fff; |
|||
overflow: scroll; |
|||
} |
|||
.clear-all { |
|||
width: 90%; |
|||
height: 30px; |
|||
margin: 10px auto 0; |
|||
line-height: 30px; |
|||
text-align: center; |
|||
font-size: 16px; |
|||
border: 1px solid gray; |
|||
border-radius: 5px; |
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
@keyframes fariy-fadein { |
|||
0% { |
|||
opacity: 0; |
|||
} |
|||
100% { |
|||
opacity: 1; |
|||
} |
|||
} |
|||
.fairy-tag-container { |
|||
width: 100%; |
|||
height: 38px; |
|||
border: 1px solid #e6e6e6; |
|||
background-color: #ffffff; |
|||
} |
|||
.fairy-tag-container:hover { |
|||
border-color: #d2d2d2; |
|||
} |
|||
.fairy-tag-container span.fairy-tag { |
|||
float: left; |
|||
font-size: 13px; |
|||
padding: 5px 8px; |
|||
margin-right: 5px; |
|||
margin-bottom: 5px; |
|||
border-radius: 2px; |
|||
line-height: 16px; |
|||
} |
|||
.fairy-tag-container span.fairy-tag a { |
|||
font-size: 11px; |
|||
font-weight: bolder; |
|||
color: #ffffff; |
|||
text-decoration: none; |
|||
margin-left: 6px; |
|||
} |
|||
.fairy-tag-container span.fairy-tag a:hover { |
|||
cursor: pointer; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-red { |
|||
background-color: #FF5722; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-orange { |
|||
background-color: #FFB800; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-green { |
|||
background-color: #009688; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-cyan { |
|||
background-color: #2F4056; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-blue { |
|||
background-color: #1E9FFF; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-black { |
|||
background-color: #393D49; |
|||
} |
|||
.fairy-tag-container span.fairy-bg-red, |
|||
.fairy-tag-container span.fairy-bg-orange, |
|||
.fairy-tag-container span.fairy-bg-green, |
|||
.fairy-tag-container span.fairy-bg-cyan, |
|||
.fairy-tag-container span.fairy-bg-blue, |
|||
.fairy-tag-container span.fairy-bg-black { |
|||
color: #ffffff; |
|||
} |
|||
.fairy-tag-container .fairy-anim-fadein { |
|||
animation: fariy-fadein 0.3s both; |
|||
} |
|||
.fairy-tag-container .fairy-tag-input[type='text'] { |
|||
width: 80px; |
|||
font-size: 13px; |
|||
padding: 6px; |
|||
background: transparent; |
|||
border: 0 none; |
|||
outline: 0; |
|||
} |
|||
.fairy-tag-container .fairy-tag-input[type='text']:focus::-webkit-input-placeholder { |
|||
color: transparent; |
|||
} |
|||
.fairy-tag-container .fairy-tag-input[type='text']:focus:-moz-placeholder { |
|||
color: transparent; |
|||
} |
|||
.fairy-tag-container .fairy-tag-input[type='text']:focus:-moz-placeholder { |
|||
color: transparent; |
|||
} |
|||
.fairy-tag-container .fairy-tag-input[type='text']:focus:-ms-input-placeholder { |
|||
color: transparent; |
|||
} |
|||
/*# sourceMappingURL=inputTag.css.map */ |
|||
@ -0,0 +1,104 @@ |
|||
@keyframes fariy-fadein { |
|||
0% { |
|||
opacity: 0 |
|||
} |
|||
|
|||
100% { |
|||
opacity: 1 |
|||
} |
|||
} |
|||
|
|||
.fairy-tag-container { |
|||
width: auto; |
|||
min-height: 100px; |
|||
padding: 5px; |
|||
border: 1px solid #e6e6e6; |
|||
background-color: #ffffff; |
|||
|
|||
&:hover { |
|||
border-color: #d2d2d2; |
|||
} |
|||
|
|||
span { |
|||
&.fairy-tag { |
|||
float: left; |
|||
font-size: 13px; |
|||
padding: 5px 8px; |
|||
margin-right: 5px; |
|||
margin-bottom: 5px; |
|||
border-radius: 2px; |
|||
line-height: 16px; |
|||
|
|||
a { |
|||
font-size: 11px; |
|||
font-weight: bolder; |
|||
color: #ffffff; |
|||
text-decoration: none; |
|||
margin-left: 6px; |
|||
|
|||
&:hover { |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
} |
|||
|
|||
&.fairy-bg-red { |
|||
background-color: #FF5722; |
|||
} |
|||
|
|||
&.fairy-bg-orange { |
|||
background-color: #FFB800; |
|||
} |
|||
|
|||
&.fairy-bg-green { |
|||
background-color: #009688; |
|||
} |
|||
|
|||
&.fairy-bg-cyan { |
|||
background-color: #2F4056; |
|||
} |
|||
|
|||
&.fairy-bg-blue { |
|||
background-color: #1E9FFF; |
|||
} |
|||
|
|||
&.fairy-bg-black { |
|||
background-color: #393D49; |
|||
} |
|||
|
|||
&.fairy-bg-red, &.fairy-bg-orange, &.fairy-bg-green, &.fairy-bg-cyan, &.fairy-bg-blue, &.fairy-bg-black { |
|||
color: #ffffff; |
|||
} |
|||
} |
|||
|
|||
.fairy-anim-fadein { |
|||
animation: fariy-fadein .3s both; |
|||
} |
|||
|
|||
.fairy-tag-input[type='text'] { |
|||
width: 80px; |
|||
font-size: 13px; |
|||
padding: 6px; |
|||
background: transparent; |
|||
border: 0 none; |
|||
outline: 0; |
|||
|
|||
&:focus { |
|||
&::-webkit-input-placeholder { |
|||
color: transparent; |
|||
} |
|||
|
|||
&:-moz-placeholder { |
|||
color: transparent; |
|||
} |
|||
|
|||
&:-moz-placeholder { |
|||
color: transparent; |
|||
} |
|||
|
|||
&:-ms-input-placeholder { |
|||
color: transparent; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,934 @@ |
|||
/** |
|||
配色方案(如有需要,请自行配置) |
|||
*/ |
|||
/**头部-配色*/ |
|||
.layui-layout-admin .layui-header { |
|||
background-color: #1aa094 !important; |
|||
} |
|||
|
|||
.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|||
background-color: #197971 !important; |
|||
} |
|||
|
|||
.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|||
background-color: #197971 !important; |
|||
} |
|||
|
|||
/**logo-配色*/ |
|||
.layui-layout-admin .layuimini-logo { |
|||
background-color: #243346 !important; |
|||
} |
|||
|
|||
/**左侧-配色*/ |
|||
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul { |
|||
background-color: #2f4056 !important; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) { |
|||
background-color: #3b3f4b; |
|||
} |
|||
|
|||
/**左侧菜单选中-配色*/ |
|||
.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a { |
|||
background-color: #1aa094 !important; |
|||
} |
|||
|
|||
|
|||
/**头部样式 */ |
|||
.layui-layout-admin .header { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
} |
|||
|
|||
.layuimini-header-menu, .layui-header { |
|||
height: 60px !important; |
|||
} |
|||
|
|||
.layuimini-header-menu > .layui-nav-item { |
|||
color: #1b1d21; |
|||
height: 60px !important; |
|||
line-height: 60px !important; |
|||
} |
|||
|
|||
.layui-header > .layui-layout-right > .layui-nav-item { |
|||
height: 60px !important; |
|||
line-height: 60px !important; |
|||
} |
|||
|
|||
.layui-layout-left { |
|||
left: 295px !important; |
|||
} |
|||
|
|||
.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
|||
font-weight: bold; |
|||
transition: all .2s; |
|||
} |
|||
|
|||
|
|||
/**logo演示(通用) */ |
|||
.layui-layout-admin .layuimini-logo { |
|||
font-weight: bold; |
|||
color: #ffffff !important; |
|||
height: 60px !important; |
|||
line-height: 60px !important; |
|||
overflow: hidden; |
|||
line-height: 64px; |
|||
transition: all .2s !important; |
|||
} |
|||
|
|||
.layui-layout-admin .layuimini-logo img { |
|||
display: inline-block; |
|||
height: 40px; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.layui-layout-admin .layuimini-logo h1 { |
|||
display: inline-block; |
|||
margin: 0 0 0 12px; |
|||
color: #ffffff; |
|||
font-weight: 600; |
|||
font-size: 20px; |
|||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
/**缩放工具(通用) */ |
|||
.layuimini-tool { |
|||
position: absolute !important; |
|||
top: 0; |
|||
left: 235px; |
|||
width: 60px; |
|||
height: 100%; |
|||
line-height: 60px; |
|||
text-align: center; |
|||
color: #ffffff !important; |
|||
transition: all .2s; |
|||
} |
|||
|
|||
/**缩放工具(缩放) */ |
|||
.layuimini-tool i { |
|||
display: block; |
|||
color: #bbe3df; |
|||
width: 32px; |
|||
height: 32px; |
|||
line-height: 32px; |
|||
border-radius: 3px; |
|||
text-align: center; |
|||
margin-top: 15px; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
/**tab选项卡 */ |
|||
.layuimini-tab { |
|||
margin: 0px; |
|||
overflow: hidden; |
|||
height: 100% !important; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-content { |
|||
height: calc(100% - 37px) !important; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-content .layui-tab-item { |
|||
height: 100%; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-content { |
|||
padding: 0px; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title { |
|||
border: none; |
|||
border: 1px solid whitesmoke; |
|||
background-color: white; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title li { |
|||
border-right: 1px solid whitesmoke; |
|||
color: dimgray; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-tab-bar { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-this:after { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layuimini-tab-active { |
|||
display: inline-block; |
|||
background-color: lightgray; |
|||
width: 9px; |
|||
height: 9px; |
|||
border-radius: 30px; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
|||
background-color: #1aa094; |
|||
} |
|||
|
|||
.layuimini-tab > .layui-tab-title, .layuimini-tab > .close-box { |
|||
height: 35px !important; |
|||
} |
|||
|
|||
.layuimini-tab > .layui-tab-title li, .layuimini-tab > .close-box li { |
|||
line-height: 35px !important; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title span { |
|||
color: #acafb1; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-this span { |
|||
color: dimgray; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-tab-close { |
|||
font-size: 12px !important; |
|||
width: 14px !important; |
|||
height: 14px !important; |
|||
line-height: 16px !important; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .layui-tab-close:hover { |
|||
border-radius: 4em; |
|||
background: #ff5722; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .disable-close + .layui-tab-close { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-title .able-close + .layui-tab-close { |
|||
display: inline-block; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-control > li { |
|||
position: absolute; |
|||
top: 0px; |
|||
height: 35px; |
|||
line-height: 35px; |
|||
width: 35px; |
|||
text-align: center; |
|||
background-color: white; |
|||
border-top: whitesmoke 1px solid; |
|||
border-bottom: whitesmoke 1px solid; |
|||
} |
|||
|
|||
.layuimini-tab .layuimini-tab-roll-left { |
|||
left: 0px; |
|||
border-right: whitesmoke 1px solid; |
|||
border-left: whitesmoke 1px solid; |
|||
} |
|||
|
|||
.layuimini-tab .layuimini-tab-roll-right { |
|||
right: 35px; |
|||
border-left: 1px solid whitesmoke; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool { |
|||
right: 0px; |
|||
border-left: 1px solid whitesmoke; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-control .layui-tab-tool, |
|||
.layuimini-tab .layui-tab-control .layuimini-tab-roll-left, |
|||
.layuimini-tab .layui-tab-control .layuimini-tab-roll-right { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-left, |
|||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
|||
right: 0px; |
|||
border-right: 1px solid whitesmoke; |
|||
} |
|||
|
|||
.layuimini-tab.layui-tab-roll .layui-tab-title { |
|||
padding-left: 35px; |
|||
padding-right: 35px; |
|||
} |
|||
|
|||
|
|||
.layuimini-tab.layui-tab-tool .layui-tab-control .layui-tab-tool { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-tab.layui-tab-tool .layui-tab-title { |
|||
padding-left: 0px; |
|||
padding-right: 35px; |
|||
} |
|||
|
|||
|
|||
.layuimini-tab.layui-tab-rollTool .layui-tab-title { |
|||
padding-left: 35px; |
|||
padding-right: 80px; |
|||
} |
|||
|
|||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-left, |
|||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-right, |
|||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layui-tab-tool { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool .layui-nav { |
|||
position: absolute; |
|||
height: 43px !important; |
|||
top: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
padding: 0; |
|||
background: 0 0; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool .layui-nav-item { |
|||
height: 35px; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool .layui-nav-bar { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool .layui-nav-child { |
|||
left: auto; |
|||
top: 45px; |
|||
right: 3px; |
|||
width: 120px; |
|||
border: 1px solid whitesmoke; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-tool .layui-this a { |
|||
background-color: #009688; |
|||
} |
|||
|
|||
.layuimini-tab-loading { |
|||
position: absolute; |
|||
display: none; |
|||
width: 100%; |
|||
height: calc(100% - 37px); |
|||
top: 37px; |
|||
z-index: 19; |
|||
background-color: #fff |
|||
} |
|||
|
|||
.layuimini-tab-loading.close { |
|||
animation: close 1s; |
|||
-webkit-animation: close 1s; |
|||
animation-fill-mode: forwards; |
|||
} |
|||
|
|||
/**左侧菜单栏 (通用) */ |
|||
.layui-side.layui-bg-black { |
|||
transition: all .2s; |
|||
} |
|||
|
|||
.layui-side.layui-bg-black > .layuimini-menu-left > ul { |
|||
transition: all .2s; |
|||
} |
|||
|
|||
.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child { |
|||
border-top: 1px solid #4b5461; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-item a { |
|||
height: 40px; |
|||
line-height: 40px; |
|||
padding-right: 30px; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-item > a { |
|||
padding-top: 5px; |
|||
padding-bottom: 5px; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child { |
|||
background: 0 0 !important |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-more { |
|||
right: 15px; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-item a:hover { |
|||
background-color: transparent !important; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav { |
|||
background-color: transparent !important; |
|||
} |
|||
|
|||
|
|||
/**左侧菜单栏 (正常) */ |
|||
.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a { |
|||
padding-left: 35px; |
|||
} |
|||
|
|||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a { |
|||
padding-left: 45px; |
|||
} |
|||
|
|||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a { |
|||
padding-left: 55px; |
|||
} |
|||
|
|||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a { |
|||
padding-left: 65px; |
|||
} |
|||
|
|||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child { |
|||
padding: 5px 0; |
|||
} |
|||
|
|||
/**内容主体(通用) */ |
|||
.layui-layout-admin .layui-body { |
|||
overflow: hidden; |
|||
bottom: 0px !important; |
|||
top: 60px !important; |
|||
transition: all .2s; |
|||
} |
|||
|
|||
/**选择配色方案 */ |
|||
.layuimini-color .color-title { |
|||
padding: 10px 0 10px 20px; |
|||
border-bottom: 1px solid #d9dada; |
|||
margin-bottom: 8px; |
|||
} |
|||
|
|||
.layuimini-color .color-content { |
|||
padding: 10px 5px 0 5px; |
|||
} |
|||
|
|||
.layuimini-color .color-content ul { |
|||
list-style: none; |
|||
text-align: center; |
|||
} |
|||
|
|||
.layuimini-color .color-content ul li { |
|||
position: relative; |
|||
display: inline-block; |
|||
vertical-align: top; |
|||
width: 80px; |
|||
height: 50px; |
|||
margin: 0 15px 15px 0; |
|||
padding: 2px 2px 4px 2px; |
|||
background-color: #f2f2f2; |
|||
cursor: pointer; |
|||
font-size: 12px; |
|||
color: #666; |
|||
} |
|||
|
|||
.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { |
|||
width: 100%; |
|||
height: 100%; |
|||
padding: 4px; |
|||
top: -5px; |
|||
left: -5px; |
|||
border-color: #d8d8d8; |
|||
opacity: 1; |
|||
} |
|||
|
|||
.layuimini-color .color-content li:after { |
|||
content: ''; |
|||
position: absolute; |
|||
z-index: 20; |
|||
top: 50%; |
|||
left: 50%; |
|||
width: 1px; |
|||
height: 0; |
|||
border: 1px solid #f2f2f2; |
|||
transition: all .3s; |
|||
-webkit-transition: all .3s; |
|||
opacity: 0; |
|||
} |
|||
|
|||
|
|||
/**其它 */ |
|||
.layui-tab-item { |
|||
width: 100% !important; |
|||
height: 100% !important; |
|||
} |
|||
|
|||
.layui-nav-item.layui-this { |
|||
background-color: #1b1d21; |
|||
} |
|||
|
|||
.layui-width-height { |
|||
width: 100%; |
|||
height: 95%; |
|||
} |
|||
|
|||
.layui-tab { |
|||
margin: 0 0 0 0; |
|||
z-index: 99999; |
|||
} |
|||
|
|||
.text-center { |
|||
height: 30px !important; |
|||
line-height: 30px !important; |
|||
text-align: center !important; |
|||
} |
|||
|
|||
.layui-nav { |
|||
padding: 0 !important; |
|||
} |
|||
|
|||
.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { |
|||
width: 0 !important; |
|||
height: 0 !important; |
|||
} |
|||
|
|||
.layui-layout-admin .layui-side { |
|||
top: 60px !important; |
|||
} |
|||
|
|||
.layui-tab-card { |
|||
box-shadow: 0px 0px 0px #888888; |
|||
border-bottom: 0; |
|||
} |
|||
|
|||
|
|||
/**自定义滚动条样式 */ |
|||
::-webkit-scrollbar { |
|||
display: none |
|||
} |
|||
|
|||
|
|||
/*移动端遮罩层*/ |
|||
.layuimini-make { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
top: 0; |
|||
z-index: 1000; |
|||
background: rgba(0, 0, 0, .5); |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-mini .layui-header { |
|||
z-index: 1001; |
|||
} |
|||
|
|||
/**初始化加载层*/ |
|||
.layuimini-loader { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
background-color: #ffffff; |
|||
z-index: 999999; |
|||
} |
|||
|
|||
.layuimini-loader .layuimini-loader-inner { |
|||
display: block; |
|||
position: relative; |
|||
left: 50%; |
|||
top: 50%; |
|||
width: 150px; |
|||
height: 150px; |
|||
margin: -75px 0 0 -75px; |
|||
border-radius: 50%; |
|||
border: 3px solid transparent; |
|||
border-top-color: #1E9FFF; |
|||
animation: spin 2s linear infinite; |
|||
} |
|||
|
|||
.layuimini-loader .layuimini-loader-inner:before { |
|||
content: ""; |
|||
position: absolute; |
|||
top: 5px; |
|||
left: 5px; |
|||
right: 5px; |
|||
bottom: 5px; |
|||
border-radius: 50%; |
|||
border: 3px solid transparent; |
|||
border-top-color: #1E9FFF; |
|||
animation: spin 3s linear infinite; |
|||
} |
|||
|
|||
.layuimini-loader .layuimini-loader-inner:after { |
|||
content: ""; |
|||
position: absolute; |
|||
top: 15px; |
|||
left: 15px; |
|||
right: 15px; |
|||
bottom: 15px; |
|||
border-radius: 50%; |
|||
border: 3px solid transparent; |
|||
border-top-color: #1E9FFF; |
|||
animation: spin 1.5s linear infinite; |
|||
} |
|||
|
|||
@keyframes spin { |
|||
0% { |
|||
transform: rotate(0deg); |
|||
} |
|||
to { |
|||
transform: rotate(1turn); |
|||
} |
|||
} |
|||
|
|||
/*系统设置*/ |
|||
|
|||
.layuimini-color .layui-word-aux { |
|||
position: absolute; |
|||
left: 60px; |
|||
top: 12px; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.layuimini-color .layui-input-block { |
|||
margin-left: 15px; |
|||
min-height: 36px; |
|||
} |
|||
|
|||
.layuimini-color .more-menu-list { |
|||
width: 100%; |
|||
margin-top: 30px; |
|||
} |
|||
|
|||
|
|||
.layuimini-color .more-menu-item:first-child { |
|||
border-top: 1px solid #e8e8e8; |
|||
} |
|||
|
|||
.layuimini-color .more-menu-item .layui-icon { |
|||
font-size: 18px; |
|||
padding-right: 10px; |
|||
} |
|||
|
|||
.layuimini-color .more-menu-item { |
|||
color: #595959; |
|||
height: 50px; |
|||
line-height: 50px; |
|||
font-size: 16px; |
|||
padding: 0 25px; |
|||
border-bottom: 1px solid #e8e8e8; |
|||
font-style: normal; |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-color .more-menu-item:hover { |
|||
background-color: whitesmoke; |
|||
} |
|||
|
|||
.layuimini-color .more-menu-item:after { |
|||
color: #8c8c8c; |
|||
right: 16px; |
|||
content: "\e602"; |
|||
position: absolute; |
|||
font-family: layui-icon !important; |
|||
} |
|||
|
|||
/** |
|||
鼠标右键 |
|||
*/ |
|||
.layuimini-tab-mousedown { |
|||
display: none; |
|||
width: 80px; |
|||
position: absolute; |
|||
top: 0px !important; |
|||
left: 0px !important; |
|||
} |
|||
|
|||
.layuimini-tab-mousedown dd a { |
|||
padding: 0 15px; |
|||
color: #484545; |
|||
} |
|||
|
|||
.layuimini-tab-make { |
|||
position: absolute; |
|||
top: 36px; |
|||
bottom: 0px; |
|||
width: 100%; |
|||
background: rgb(255, 255, 255, 0); |
|||
padding: 0px; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
/** |
|||
菜单缩放 |
|||
*/ |
|||
.popup-tips .layui-layer-TipsG { |
|||
display: none; |
|||
} |
|||
|
|||
.popup-tips.layui-layer-tips .layui-layer-content { |
|||
padding: 0; |
|||
} |
|||
|
|||
.popup-tips .layui-nav-tree { |
|||
width: 150px; |
|||
border-radius: 10px; |
|||
} |
|||
|
|||
/**左侧菜单字体间距*/ |
|||
.layuimini-menu-left .layui-nav-item a span { |
|||
letter-spacing: 1px; |
|||
} |
|||
|
|||
/**头部菜单字体间距*/ |
|||
.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show, .layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show { |
|||
letter-spacing: 1px; |
|||
} |
|||
|
|||
|
|||
/**左侧菜单更多下拉样式*/ |
|||
.layuimini-menu-left .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-more { |
|||
font-family: layui-icon !important; |
|||
font-size: 12px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
overflow: hidden; |
|||
width: auto; |
|||
height: auto; |
|||
line-height: normal; |
|||
border: none; |
|||
display: inline-block; |
|||
margin-top: -6px !important; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav-child .layui-nav-more { |
|||
margin-top: -6px !important; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more { |
|||
margin-top: -9px !important; |
|||
} |
|||
|
|||
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { |
|||
margin-top: -9px !important; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-more:before { |
|||
content: "\e61a"; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more { |
|||
transform: rotate(180deg); |
|||
-ms-transform: rotate(180deg); |
|||
-moz-transform: rotate(180deg); |
|||
-webkit-transform: rotate(180deg); |
|||
-o-transform: rotate(180deg); |
|||
width: 12px; |
|||
text-align: center; |
|||
border-style: none; |
|||
} |
|||
|
|||
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before { |
|||
content: '\e61a'; |
|||
background-color: transparent; |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
/**修复左侧菜单字体不对齐的问题*/ |
|||
.layuimini-menu-left .layui-nav-item a .fa, .layuimini-menu-left .layui-nav-item a .layui-icon { |
|||
width: 20px; |
|||
} |
|||
|
|||
|
|||
/** |
|||
PC版样式 |
|||
*/ |
|||
@media screen and (min-width: 1025px) { |
|||
/**头部样式(缩放) */ |
|||
.layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
|||
left: 155px !important; |
|||
} |
|||
|
|||
/**logo演示(缩放) */ |
|||
.layuimini-mini .layui-layout-admin .layuimini-logo { |
|||
width: 60px !important; |
|||
} |
|||
|
|||
.layuimini-mini .layui-layout-admin .layuimini-logo h1 { |
|||
display: none; |
|||
} |
|||
|
|||
/**左侧菜单栏(缩放) */ |
|||
.layuimini-mini .layuimini-menu-left { |
|||
width: 80px !important; |
|||
} |
|||
|
|||
.layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i { |
|||
width: 60px !important; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-menu-left > ul li span:first-child { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-menu-left > ul li span:last-child { |
|||
float: right; |
|||
right: 7px; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a { |
|||
height: 40px; |
|||
line-height: 40px; |
|||
padding-right: 0px !important; |
|||
} |
|||
|
|||
/**内容主体(缩放) */ |
|||
.layuimini-mini .layui-layout-admin .layui-body { |
|||
left: 60px !important; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-tool { |
|||
left: 95px !important; |
|||
} |
|||
|
|||
.layuimini-pc-show { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-mobile-show { |
|||
display: none; |
|||
} |
|||
|
|||
/**菜单缩放*/ |
|||
.layuimini-mini .layuimini-menu-left .layui-nav-more, .layuimini-mini .layuimini-menu-left .layui-nav-child { |
|||
display: none; |
|||
!important; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
手机自适应样式 |
|||
*/ |
|||
@media screen and (max-width: 1024px) { |
|||
|
|||
/** |
|||
todo 修复低版本IOS不能滑动问题, 但还是有问题, 低版本IOS部分情况下子页面无法自适应 |
|||
*/ |
|||
.layuimini-tab .layui-tab-content .layui-tab-item { |
|||
-webkit-overflow-scrolling: touch; |
|||
overflow: scroll; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.layuimini-tab .layui-tab-content .layui-tab-item iframe { |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
|||
|
|||
.layuimini-pc-show { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-mobile-show { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-header-content { |
|||
left: 0; |
|||
} |
|||
|
|||
.layui-layout-admin .layui-body .layui-tab-item.layui-show { |
|||
border-top: 1px solid #e2e2e2; |
|||
} |
|||
|
|||
.layuimini-all .layui-layout-left.layuimini-header-menu { |
|||
left: 15px !important |
|||
} |
|||
|
|||
.layuimini-mini .layui-layout-left.layuimini-header-menu { |
|||
left: 205px !important |
|||
} |
|||
|
|||
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) { |
|||
width: 40px !important; |
|||
} |
|||
|
|||
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a { |
|||
padding: 0 15px; |
|||
} |
|||
|
|||
.layuimini-all .layui-layout-admin .layui-body { |
|||
left: 0px !important; |
|||
} |
|||
|
|||
.layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo { |
|||
left: 0; |
|||
transition: left .2s; |
|||
z-index: 1001 !important; |
|||
} |
|||
|
|||
.layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo { |
|||
left: -200px; |
|||
transition: left .2s; |
|||
top: 0; |
|||
z-index: 1002; |
|||
} |
|||
|
|||
.layuimini-mini .layui-layout-admin .layui-body { |
|||
left: 0 !important; |
|||
transition: left .2s; |
|||
top: 0; |
|||
z-index: 998; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-make { |
|||
display: block; |
|||
} |
|||
|
|||
.layuimini-multi-module .layuimini-header-content .layuimini-tool { |
|||
display: none; |
|||
} |
|||
|
|||
.layuimini-single-module .layuimini-header-content .layuimini-tool { |
|||
left: 15px; |
|||
} |
|||
|
|||
.layuimini-mini .layuimini-site-mobile { |
|||
display: none !important; |
|||
} |
|||
|
|||
.layuimini-site-mobile { |
|||
display: block !important; |
|||
position: fixed; |
|||
z-index: 100000; |
|||
bottom: 15px; |
|||
left: 15px; |
|||
width: 40px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
border-radius: 2px; |
|||
text-align: center; |
|||
background-color: rgba(0, 0, 0, .7); |
|||
color: #fff; |
|||
} |
|||
|
|||
.layuimini-header-content { |
|||
z-index: 997; |
|||
} |
|||
|
|||
/*修复UC之类的浏览器点击无效*/ |
|||
.layuimini-make { |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.layuimini-site-mobile { |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
|
|||
@media screen and (max-width: 550px) { |
|||
|
|||
/**头部右侧数据*/ |
|||
.layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right { |
|||
display: none; |
|||
} |
|||
} |
|||
@ -0,0 +1,165 @@ |
|||
body { |
|||
background: #f2f2f2; |
|||
} |
|||
|
|||
.layuimini-container { |
|||
border: 1px solid #f2f2f2; |
|||
border-radius: 5px; |
|||
background-color: #ffffff |
|||
} |
|||
|
|||
.layuimini-main { |
|||
margin: 10px 10px 10px 10px; |
|||
} |
|||
|
|||
/**必填红点 */ |
|||
.layuimini-form > .layui-form-item > .required:after { |
|||
content: '*'; |
|||
color: red; |
|||
position: absolute; |
|||
margin-left: 4px; |
|||
font-weight: bold; |
|||
line-height: 1.8em; |
|||
top: 6px; |
|||
right: 5px; |
|||
} |
|||
|
|||
.layuimini-form > .layui-form-item > .layui-form-label { |
|||
width: 120px ; |
|||
} |
|||
|
|||
.layuimini-form > .layui-form-item > .layui-input-block { |
|||
margin-left: 150px !important; |
|||
} |
|||
|
|||
.layuimini-form > .layui-form-item > .layui-input-block > tip { |
|||
display: inline-block; |
|||
margin-top: 10px; |
|||
line-height: 10px; |
|||
font-size: 10px; |
|||
color: #a29c9c; |
|||
} |
|||
|
|||
/**搜索框*/ |
|||
.layuimini-container .table-search-fieldset { |
|||
margin: 0; |
|||
border: 1px solid #e6e6e6; |
|||
padding: 10px 20px 5px 20px; |
|||
color: #6b6b6b; |
|||
/*position: sticky;*/ |
|||
/*top: 0;*/ |
|||
/*z-index: 999;*/ |
|||
background: #ffffff; |
|||
} |
|||
|
|||
/**自定义滚动条样式 */ |
|||
::-webkit-scrollbar { |
|||
width: 6px; |
|||
height: 6px |
|||
} |
|||
|
|||
::-webkit-scrollbar-track { |
|||
background-color: transparent; |
|||
-webkit-border-radius: 2em; |
|||
-moz-border-radius: 2em; |
|||
border-radius: 2em; |
|||
} |
|||
|
|||
::-webkit-scrollbar-thumb { |
|||
background-color: #9c9da0; |
|||
-webkit-border-radius: 2em; |
|||
-moz-border-radius: 2em; |
|||
border-radius: 2em |
|||
} |
|||
|
|||
.my-shadow:hover { |
|||
box-shadow: 2px 0 4px rgba(0, 21, 41, .35); |
|||
} |
|||
|
|||
.my-card { |
|||
cursor: pointer; |
|||
width: 100%; |
|||
display: inline-block; |
|||
border-top-left-radius: 4px; |
|||
border-top-right-radius: 4px; |
|||
} |
|||
|
|||
.my-card-context{ |
|||
margin-left: 15px; |
|||
font-size: 18px; |
|||
margin-top: 5px; |
|||
font-weight:normal; |
|||
} |
|||
|
|||
.my-time { |
|||
margin-top: 40px; |
|||
margin-bottom: 20px; |
|||
} |
|||
|
|||
.my-info{ |
|||
margin-top: 10px; |
|||
margin-bottom: 20px; |
|||
} |
|||
|
|||
body { |
|||
font-family: 华文楷体; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
|
|||
|
|||
.waterfall-demo { |
|||
position: relative; |
|||
opacity: 0; |
|||
transition: .2s ease; |
|||
margin-bottom: 60px; |
|||
} |
|||
|
|||
.waterfall-grid { |
|||
position: relative; |
|||
/* fluffy */ |
|||
margin: 0 auto; |
|||
width: 98%; |
|||
/* end fluffy */ |
|||
} |
|||
|
|||
.waterfall-grid-item { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
/* fluffy */ |
|||
width: 45%; |
|||
/*height: 120px;*/ |
|||
border-radius: 3px; |
|||
background-color: #EDEDED; |
|||
/* end fluffy */ |
|||
-webkit-transition: .3s ease-in-out; |
|||
-o-transition: .3s ease-in-out; |
|||
transition: .3s ease-in-out; |
|||
border: 1px solid #ADADAD; |
|||
} |
|||
|
|||
/* mq */ |
|||
|
|||
@media (max-width: 600px) { |
|||
.grid-item { |
|||
width: 120px; |
|||
height: 80px; |
|||
} |
|||
} |
|||
|
|||
|
|||
.layui-return-top{ |
|||
position: fixed; |
|||
z-index: 100000; |
|||
bottom: 15px; |
|||
right: 15px; |
|||
width: 40px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
border-radius: 2px; |
|||
text-align: center; |
|||
background-color: rgba(0, 0, 0, .7); |
|||
color: #fff; |
|||
cursor: pointer; |
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/*头部右侧背景色 headerRightBg */ |
|||
.layui-layout-admin .layui-header { |
|||
background-color: #ffffff !important; |
|||
} |
|||
|
|||
/*头部右侧选中背景色 headerRightBgThis */ |
|||
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|||
background-color: #e4e4e4 !important; |
|||
} |
|||
|
|||
/*头部右侧字体颜色 headerRightColor */ |
|||
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { |
|||
color: rgba(107, 107, 107, 0.7); |
|||
} |
|||
|
|||
/**头部右侧下拉字体颜色 headerRightChildColor */ |
|||
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { |
|||
color: rgba(107, 107, 107, 0.7) !important; |
|||
} |
|||
|
|||
/*头部右侧鼠标选中 headerRightColorThis */ |
|||
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { |
|||
color: #565656 !important; |
|||
} |
|||
|
|||
/*头部右侧更多下拉颜色 headerRightNavMore */ |
|||
.layui-header .layui-nav .layui-nav-more { |
|||
border-top-color: rgba(160, 160, 160, 0.7) !important; |
|||
} |
|||
|
|||
/*头部右侧更多下拉颜色 headerRightNavMore */ |
|||
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { |
|||
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; |
|||
} |
|||
|
|||
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ |
|||
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { |
|||
background-color: #1E9FFF !important; |
|||
color: #ffffff !important; |
|||
} |
|||
|
|||
/*头部缩放按钮样式 headerRightToolColor */ |
|||
.layui-layout-admin .layui-header .layuimini-tool i { |
|||
color: #565656; |
|||
} |
|||
|
|||
/*logo背景颜色 headerLogoBg */ |
|||
.layui-layout-admin .layuimini-logo { |
|||
background-color: #192027 !important; |
|||
} |
|||
|
|||
/*logo字体颜色 headerLogoColor */ |
|||
.layui-layout-admin .layuimini-logo h1 { |
|||
color: rgb(191, 187, 187); |
|||
} |
|||
|
|||
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
|||
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { |
|||
border-top-color: rgb(191, 187, 187); |
|||
} |
|||
|
|||
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
|||
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { |
|||
border-color: transparent transparent rgb(191, 187, 187) !important; |
|||
} |
|||
|
|||
/*左侧菜单背景 leftMenuBg */ |
|||
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { |
|||
background-color: #28333E !important; |
|||
} |
|||
|
|||
/*左侧菜单选中背景 leftMenuBgThis */ |
|||
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { |
|||
background-color: #1E9FFF !important |
|||
} |
|||
|
|||
/*左侧菜单子菜单背景 leftMenuChildBg */ |
|||
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { |
|||
background-color: #0c0f13 !important; |
|||
} |
|||
|
|||
/*左侧菜单字体颜色 leftMenuColor */ |
|||
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { |
|||
color: rgb(191, 187, 187) !important; |
|||
} |
|||
|
|||
/*左侧菜单选中字体颜色 leftMenuColorThis */ |
|||
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { |
|||
color: #ffffff !important; |
|||
} |
|||
|
|||
/**tab选项卡选中颜色 tabActiveColor */ |
|||
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
|||
background-color: #1e9fff; |
|||
} |
|||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 671 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,8 @@ |
|||
$(window).scroll(function () { |
|||
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop; |
|||
if(scrollTop > 200){ |
|||
$("#returnTop").show(); |
|||
}else{ |
|||
$("#returnTop").hide(); |
|||
} |
|||
}); |
|||
@ -0,0 +1,14 @@ |
|||
|
|||
|
|||
var DrawLableBarCodeParam = { |
|||
"x": 20.0, |
|||
"y": 10.0, |
|||
"height": 10, |
|||
"width": 50, |
|||
"value": '12345678', |
|||
"codeType": 20, |
|||
"rotate": 0, |
|||
"fontSize": 4.0, |
|||
"textHeight": 0, |
|||
"textPosition": 0, |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
var DrawLableGraphParam = { |
|||
"x": 2.0, |
|||
"y": 5.0, |
|||
"height": 30, |
|||
"width": 40, |
|||
"rotate": 0, |
|||
"graphType": 3, |
|||
"cornerRadius": 0, |
|||
"lineWidth": 4, |
|||
"lineType":2, |
|||
"dashwidth": [1,1], |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
var DrawLableLineParam = { |
|||
"x": 2.0, |
|||
"y": 2.0, |
|||
"height": 2, |
|||
"width": 50, |
|||
"rotate": 0, |
|||
"lineType": 2, |
|||
"dashwidth": [1,1], |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
var DrawLableQrCodeParam = { |
|||
"x": 20.0, |
|||
"y": 10.0, |
|||
"height": 10, |
|||
"width": 10, |
|||
"value": "精臣SDK", |
|||
"rotate": 0, |
|||
"codeType": 31, |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
|
|||
var DrawLableTextParam = { |
|||
"x": 20.0, |
|||
"y": 10.0, |
|||
"height": 10, |
|||
"width": 50, |
|||
"value": "精臣SDK", |
|||
"fontFamily": "宋体", |
|||
"rotate": 0, |
|||
"fontSize": 4.0, |
|||
"textAlignHorizonral": 0, |
|||
"textAlignVertical": 0, |
|||
"letterSpacing": 1.0, |
|||
"lineSpacing": 1.0, |
|||
"lineMode":0, |
|||
"fontStyle": [false, false, false,false], |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
|
|||
var InitDrawingBoardParam={ |
|||
"width":70, |
|||
"height":50, |
|||
"rotate":0, |
|||
"path":"ZT001.ttf", |
|||
"verticalShift":0, |
|||
"HorizontalShift":0}; |
|||
@ -0,0 +1,3 @@ |
|||
var generateImagePreviewImageParam = { |
|||
"displayScale":8 |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
var initSdkParam = { |
|||
"fontDir":"", |
|||
|
|||
} |
|||
@ -0,0 +1,369 @@ |
|||
{ |
|||
"0020-007F": { |
|||
"description":"Basic_Latin", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"00A0-00FF":{ |
|||
"description":"Latin-1_Supplement", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"0100-017F":{ |
|||
"description":"Latin Extended-A", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"0370-03FF": { |
|||
"description":"Greek and Coptic", |
|||
"fontFile":"" |
|||
}, |
|||
"10A0-10FF": { |
|||
"description":"Georgian", |
|||
"fontFile":"NotoSansGeorgian-Regular.otf" |
|||
}, |
|||
"0400-04FF": { |
|||
"description":"Cyrillic", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"0500-052F": { |
|||
"description":"Cyrillic Supplementary", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"0530-058F": { |
|||
"description":"Armenian", |
|||
"fontFile":"NotoSansArmenian-Regular.otf" |
|||
}, |
|||
"0590-05FF":{ |
|||
"description":"Hebrew", |
|||
"fontFile":"NotoSansHebrew-Regular.ttf" |
|||
}, |
|||
"0600-06FF":{ |
|||
"description":"Arabic", |
|||
"fontFile":"NotoNaskhArabic-Regular.ttf" |
|||
}, |
|||
"0700-074F":{ |
|||
"description":"Syriac", |
|||
"fontFile":"NotoSansSyriacEstrangela-Regular.ttf" |
|||
}, |
|||
"0780-07BF":{ |
|||
"description":"Thaana", |
|||
"fontFile":"NotoSansThaana-Regular.ttf" |
|||
}, |
|||
"0900-097F":{ |
|||
"description":"Devanagari", |
|||
"fontFile":"NotoSansDevanagari-Regular.otf" |
|||
}, |
|||
"0980-09FF":{ |
|||
"description":"Bengali", |
|||
"fontFile":"NotoSansBengali-Regular.otf" |
|||
}, |
|||
"0A00-0A7F":{ |
|||
"description":"Gurmukhi", |
|||
"fontFile":"NotoSansGurmukhi-Regular.ttf" |
|||
}, |
|||
"0B00-0B7F":{ |
|||
"description":"Oriya", |
|||
"fontFile":"NotoSansOriya-Regular.ttf" |
|||
}, |
|||
"0B80-0BFF":{ |
|||
"description":"Tamil", |
|||
"fontFile":"NotoSansTamil-Regular.otf" |
|||
}, |
|||
"0C00-0C7F":{ |
|||
"description":"Telugu", |
|||
"fontFile":"NotoSansTelugu-Regular.ttf" |
|||
}, |
|||
"0C80-0CFF":{ |
|||
"description":"Kannada", |
|||
"fontFile":"NotoSansKannada-Regular.ttf" |
|||
}, |
|||
"0D00-0D7F":{ |
|||
"description":"Malayalam", |
|||
"fontFile":"NotoSansMalayalam-Regular.otf" |
|||
}, |
|||
"0D80-0DFF":{ |
|||
"description":"Sinhala", |
|||
"fontFile":"NotoSansSinhala-Regular.otf" |
|||
}, |
|||
"0E00-0E7F":{ |
|||
"description":"Thai", |
|||
"fontFile":"NotoSansThai-Regular.ttf" |
|||
}, |
|||
"0E80-0EFF":{ |
|||
"description":"Lao", |
|||
"fontFile":"NotoSansLao-Regular.ttf" |
|||
}, |
|||
"0F00-0FFF":{ |
|||
"description":"Tibetan", |
|||
"fontFile":"NotoSansTibetan-Regular.ttf" |
|||
}, |
|||
"1000-109F":{ |
|||
"description":"Myanmar", |
|||
"fontFile":"NotoSansMyanmar-Regular-ZawDecode.ttf" |
|||
}, |
|||
"10000-1007F":{ |
|||
"description":"Linear B Syllabary", |
|||
"fontFile":"NotoSansLinearB-Regular.ttf" |
|||
}, |
|||
"10080-100FF":{ |
|||
"description":"Linear B Ideograms", |
|||
"fontFile":"NotoSansLinearB-Regular.ttf" |
|||
}, |
|||
"10380-1039F":{ |
|||
"description":"Ugaritic", |
|||
"fontFile":"NotoSansUgaritic-Regular.ttf" |
|||
}, |
|||
"10450-1047F":{ |
|||
"description":"Shavian", |
|||
"fontFile":"NotoSansShavian-Regular.ttf" |
|||
}, |
|||
"10400-1044F":{ |
|||
"description":"Deseret", |
|||
"fontFile":"NotoSansDeseret-Regular.ttf" |
|||
}, |
|||
"10480-104AF":{ |
|||
"description":"Osmanya", |
|||
"fontFile":"NotoSansOsmanya-Regular.ttf" |
|||
}, |
|||
"10800-1083F":{ |
|||
"description":"Cypriot ", |
|||
"fontFile":"NotoSansCypriot-Regular.ttf" |
|||
}, |
|||
"1200-137F":{ |
|||
"description":"Ethiopic", |
|||
"fontFile":"NotoSansEthiopic-Regular.ttf" |
|||
}, |
|||
"13A0-13FF":{ |
|||
"description":"Cherokee", |
|||
"fontFile":"NotoSansCherokee-Regular.ttf" |
|||
}, |
|||
"1400-167F":{ |
|||
"description":"Unified Canadian Aboriginal Syllabics", |
|||
"fontFile":"NotoSansCanadianAboriginal-Regular.ttf" |
|||
}, |
|||
"1680-169F":{ |
|||
"description":"Ogham", |
|||
"fontFile":"NotoSansOgham-Regular.ttf" |
|||
}, |
|||
"16A0-16FF":{ |
|||
"description":"Runic", |
|||
"fontFile":"NotoSansRunic-Regular.ttf" |
|||
}, |
|||
"1700-171F":{ |
|||
"description":"Tagalog", |
|||
"fontFile":"NotoSansTagalog-Regular.ttf" |
|||
}, |
|||
"1720-173F":{ |
|||
"description":"Hanunoo", |
|||
"fontFile":"NotoSansHanunoo-Regular.ttf" |
|||
}, |
|||
"1740-175F":{ |
|||
"description":"Buhid", |
|||
"fontFile":"NotoSansBuhid-Regular.ttf" |
|||
}, |
|||
"1760-177F":{ |
|||
"description":"Tagbanwa", |
|||
"fontFile":"NotoSansTagbanwa-Regular.ttf" |
|||
}, |
|||
"1780-17FF":{ |
|||
"description":"Khmer", |
|||
"fontFile":"NotoSansKhmer-VF.ttf" |
|||
}, |
|||
"1800-18AF":{ |
|||
"description":"Mongolian", |
|||
"fontFile":"NotoSansMongolian-Regular.ttf" |
|||
}, |
|||
"1900-194F":{ |
|||
"description":"Limbu", |
|||
"fontFile":"NotoSansLimbu-Regular.ttf" |
|||
}, |
|||
"1950-197F":{ |
|||
"description":"Tai Le", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"19E0-19FF":{ |
|||
"description":"Khmer Symbols", |
|||
"fontFile":"NotoSansKhmer-VF.ttf" |
|||
}, |
|||
"1D000-1D0FF":{ |
|||
"description":"Byzantine Musical Symbols", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"1D300-1D35F":{ |
|||
"description":"Tai Xuan Jing Symbols", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"1E00-1EFF":{ |
|||
"description":"Latin Extended Additional", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"1F00-1FFF":{ |
|||
"description":"Greek Extended", |
|||
"fontFile":"NotoSansSylotiNagri-Regular.ttf" |
|||
}, |
|||
"2000-206F":{ |
|||
"description":"General Punctuation", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"20000-2A6DF":{ |
|||
"description":"CJK", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"20A0-20CF":{ |
|||
"description":"Currency Symbols", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted2.ttf" |
|||
}, |
|||
"20D0-20FF":{ |
|||
"description":"Combining Diacritical Marks for Symbols", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted2.ttf" |
|||
}, |
|||
"2100-214F":{ |
|||
"description":"Letterlike Symbols", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"2200-22FF":{ |
|||
"description":"Tai Le", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"2300-23FF":{ |
|||
"description":"Miscellaneous Technical", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"2400-243F":{ |
|||
"description":"Control Pictures", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"2440-245F":{ |
|||
"description":"Optical Character Recognition", |
|||
"fontFile":"NotoSansGujarati-Regular.ttf" |
|||
}, |
|||
"2460-24FF":{ |
|||
"description":"Enclosed Alphanumerics", |
|||
"fontFile":"NotoSansGujarati-Regular.ttf" |
|||
}, |
|||
"2500-257F":{ |
|||
"description":"Box Drawing", |
|||
"fontFile":"NotoSansGujarati-Regular.ttf" |
|||
}, |
|||
"2580-259F":{ |
|||
"description":"Block Elements", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"25A0-25FF":{ |
|||
"description":"Geometric Shapes", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"2600-26FF":{ |
|||
"description":"Miscellaneous Symbols", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"2700-27BF":{ |
|||
"description":"Dingbats", |
|||
"fontFile":"NotoSansTaiLe-Regular.ttf" |
|||
}, |
|||
"27C0-27EF":{ |
|||
"description":"@Miscellaneous Mathematical Symbols-A", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted.ttf" |
|||
}, |
|||
"27F0-27FF":{ |
|||
"description":"@Supplemental Arrows-A", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2800-28FF":{ |
|||
"description":"Braille Patterns", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2900-297F":{ |
|||
"description":"@Supplemental Arrows-B", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2980-29FF":{ |
|||
"description":"Miscellaneous Mathematical Symbols-B", |
|||
"fontFile":"NotoSansSymbols-Regular-Subsetted2.ttf" |
|||
}, |
|||
"2A00-2AFF":{ |
|||
"description":"@Supplemental Mathematical Operators", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2B00-2BFF":{ |
|||
"description":"@Miscellaneous Symbols and Arrows", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2E80-2EFF":{ |
|||
"description":"CJK Radicals Supplement", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"2F800-2FA1F":{ |
|||
"description":"Tai Le", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"3040-309F":{ |
|||
"description":"Hiragana", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"30A0-30FF":{ |
|||
"description":"Katakana", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"3100-312F":{ |
|||
"description":"Bopomofo", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"3130-318F":{ |
|||
"description":"Hangul Compatibility Jamo", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"3190-319F":{ |
|||
"description":"Kanbun", |
|||
"fontFile":"NotoSansKannada-Regular.ttf" |
|||
}, |
|||
"31A0-31BF":{ |
|||
"description":"Tai Le", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"31F0-31FF":{ |
|||
"description":"Katakana Phonetic Extensions", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
},"3200-32FF":{ |
|||
"description":"Enclosed CJK Letters and Months", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"3300-33FF":{ |
|||
"description":"CJK Compatibility", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"4DC0-4DFF":{ |
|||
"description":"Yijing Hexagram Symbols", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"4E00-9FFF":{ |
|||
"description":"CJK Unified Ideographs", |
|||
"fontFile":"ZT001.ttf" |
|||
}, |
|||
"FB00-FB4F":{ |
|||
"description":"Alphabetic Presentation Forms", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FB50-FDFF":{ |
|||
"description":"Arabic Presentation Forms-A", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FE00-FE0F":{ |
|||
"description":"Variation Selectors", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FE20-FE2F":{ |
|||
"description":"Combining Half Marks", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FE30-FE4F":{ |
|||
"description":"CJK Compatibility Forms", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FE50-FE6F":{ |
|||
"description":"Small Form Variants", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
}, |
|||
"FF00-FFEF":{ |
|||
"description":"Halfwidth and Fullwidth Forms", |
|||
"fontFile":"NotoSansCJK-Regular.ttc" |
|||
} |
|||
} |
|||
@ -0,0 +1,847 @@ |
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/jquery.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/layer/layer.js' ></script>" |
|||
); |
|||
|
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/jcPrinterSdk_api_third.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/InitDrawingBoard.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/initSdk.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableText.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableQrCode.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableLine.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableImage.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableGraph.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/DrawLableBarCode.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/generateImagePreviewImage.js'></script>" |
|||
); |
|||
|
|||
document.write( |
|||
"<script src='/static/js/JcPrinter/drawParameter/picturePrint.js'></script>" |
|||
); |
|||
|
|||
|
|||
var bCanclePrint = false; |
|||
var allPrinters; |
|||
var pageIndex = 1; |
|||
|
|||
|
|||
var app = new Vue({ |
|||
el: '#app', |
|||
data: { |
|||
form: { |
|||
paperType: '1', |
|||
density: '3', |
|||
pageCount: '1', |
|||
quantityCount: '2', |
|||
printMode: '1' |
|||
}, |
|||
formLabelWidth: "120px", |
|||
options: [], |
|||
tags: [], |
|||
isBarCode:false, |
|||
isInit: false, |
|||
versionInit: false, |
|||
isVersion:false, |
|||
isInitApi: false, |
|||
isDraw: false, |
|||
isEditTag: false, |
|||
editIndex: 0, |
|||
dialogInitDrawingBoardParam: false, |
|||
dialogDrawLableNameTextParam: false, |
|||
dialogDrawLableVersionTextParam: false, |
|||
dialogDrawLableBarCodeParam: false, |
|||
dialogDrawLableQrCodeParam: false, |
|||
dialogDrawLableLineParam: false, |
|||
dialogDrawLableGraphParam: false, |
|||
dialogDrawLableImageParam: false, |
|||
value: '', |
|||
imgSrc: '', |
|||
initSdkParam: {//初始化数据
|
|||
"fontDir": "", |
|||
}, |
|||
// 画布初始化参数
|
|||
InitDrawingBoardParam: { |
|||
"width": 50, |
|||
"height": 30, |
|||
"rotate": 0, |
|||
"path": "ZT001.ttf", |
|||
"verticalShift": 0, |
|||
"HorizontalShift": 0 |
|||
}, |
|||
// 初始化名称文本参数
|
|||
DrawLableNameTextParam: { |
|||
"x": 20.0, |
|||
"y": 1.0, |
|||
"height": 10, |
|||
"width": 50, |
|||
"value": document.getElementById("name").value, |
|||
"fontFamily": "宋体", |
|||
"rotate": 0, |
|||
"fontSize": 4.0, |
|||
"textAlignHorizonral": 0, |
|||
"textAlignVertical": 0, |
|||
"letterSpacing": 1.0, |
|||
"lineSpacing": 1.0, |
|||
"lineMode": 0, |
|||
"fontStyle": [false, false, false, false], |
|||
}, |
|||
// 初始化型号
|
|||
DrawLableVersionTextParam: { |
|||
"x": 10.0, |
|||
"y": 8.0, |
|||
"height": 10, |
|||
"width": 50, |
|||
"value": document.getElementById("version").value, |
|||
"fontFamily": "宋体", |
|||
"rotate": 0, |
|||
"fontSize": 4.0, |
|||
"textAlignHorizonral": 0, |
|||
"textAlignVertical": 0, |
|||
"letterSpacing": 1.0, |
|||
"lineSpacing": 1.0, |
|||
"lineMode": 0, |
|||
"fontStyle": [false, false, false, false], |
|||
}, |
|||
// 初始化条形码参数
|
|||
DrawLableBarCodeParam: { |
|||
"x": 5.0, |
|||
"y": 10.0, |
|||
"height": 10, |
|||
"width": 40, |
|||
"value": document.getElementById("materialQrCode").value,// 获取当前打印的码值
|
|||
"codeType": 20, |
|||
"rotate": 0, |
|||
"fontSize": 4.0, |
|||
"textHeight": 0, |
|||
"textPosition": 0, |
|||
}, |
|||
// 初始化二维码参数
|
|||
DrawLableQrCodeParam: { |
|||
"x": 20.0, |
|||
"y": 10.0, |
|||
"height": 10, |
|||
"width": 10, |
|||
"value": document.getElementById("materialQrCode").value, //获取当前打印的码值
|
|||
"rotate": 0, |
|||
"codeType": 31, |
|||
}, |
|||
// 初始化线条参数
|
|||
DrawLableLineParam: { |
|||
"x": 2.0, |
|||
"y": 2.0, |
|||
"height": 2, |
|||
"width": 50, |
|||
"rotate": 0, |
|||
"lineType": 2, |
|||
"dashwidth": [1, 1], |
|||
}, |
|||
// 初始化图形参数
|
|||
DrawLableGraphParam: { |
|||
"x": 2.0, |
|||
"y": 5.0, |
|||
"height": 30, |
|||
"width": 40, |
|||
"rotate": 0, |
|||
"graphType": 3, |
|||
"cornerRadius": 0, |
|||
"lineWidth": 4, |
|||
"lineType": 2, |
|||
"dashwidth": [1, 1], |
|||
}, |
|||
// 初始化图片参数
|
|||
DrawLableImageParam: { |
|||
"x": 2.0, |
|||
"y": 2.0, |
|||
"height": 10, |
|||
"width": 50, |
|||
"rotate": 0, |
|||
"imageProcessingType": 0, |
|||
"imageProcessingValue": 127, |
|||
"imageData": "", |
|||
"imgSrc": '' |
|||
}, |
|||
DrawLableGraphParamDemo: { |
|||
"x": 2.0, |
|||
"y": 2.0, |
|||
"width": 46, |
|||
"height": 26, |
|||
"rotate": 0, |
|||
"graphType": 3, |
|||
"cornerRadius": 0, |
|||
"lineWidth": 0.5, |
|||
"lineType": 1, |
|||
"dashwidth": [1, 1], |
|||
}, |
|||
|
|||
}, |
|||
mounted() { |
|||
// 初始化打印服务
|
|||
let instance = getInstance(); |
|||
if (!instance) { |
|||
// 如果失败
|
|||
this.$alert('初始化打印服务失败,请重试', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => { |
|||
// 关闭当前页
|
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
methods: { |
|||
// sdk重新初始化
|
|||
initSdkApi() { |
|||
initSdk(this.initSdkParam); |
|||
this.isInitApi = true |
|||
}, |
|||
// 选择打印机
|
|||
selectPrinterApi() { |
|||
let printerName = ''; |
|||
for (let index = 0; index < this.options.length; index++) { |
|||
if (this.value === this.options[index].value) printerName = this.options[index].label |
|||
} |
|||
// 选中打印设备(默认选中第一个)
|
|||
selectPrinter(printerName, parseInt(this.value), (data => { |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (!arrParse.resultAck.result) { |
|||
this.$alert('打印设备选择失败,请重试', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => { |
|||
// 关闭当前页
|
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
} |
|||
}); |
|||
} else if (isJSON(arrParse.resultAck.info)) { |
|||
//选择成功,打印机连接成功
|
|||
// console.log(data)
|
|||
} |
|||
|
|||
})); |
|||
}, |
|||
// 用于重新获取打印机
|
|||
refreshPrinters() { |
|||
getAllPrinters(data => { |
|||
// 返回结果规范化
|
|||
let arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (!arrParse.resultAck.result || arrParse.resultAck.result === 'false') { |
|||
this.$alert('打印机获取失败,请重试', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => { |
|||
// 关闭当前页
|
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
} |
|||
}); |
|||
} else if (isJSON(arrParse.resultAck.info)) { |
|||
// 获取所有打印设备
|
|||
allPrinters = JSON.parse(arrParse.resultAck.info); |
|||
// 所有设备名称
|
|||
let allPrintersName = Object.keys(allPrinters); |
|||
// 所有设备对应值
|
|||
let allPrintersValue = Object.values(allPrinters); |
|||
// 下拉框值
|
|||
this.options = []; |
|||
for (i = 0; i < allPrintersName.length; i++) { |
|||
// 选择项
|
|||
let newopt = {}; |
|||
// 选择项标题
|
|||
newopt.label = allPrintersName[i]; |
|||
// 选择项值
|
|||
newopt.value = allPrintersValue[i]; |
|||
// 添加选择项
|
|||
this.options.push(newopt) |
|||
} |
|||
// 选中打印设备(默认选中第一个)
|
|||
selectPrinter(allPrintersName[0], parseInt(allPrintersValue[0]), (data => { |
|||
// 返回结果规范化
|
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (!arrParse.resultAck.result || arrParse.resultAck.result === 'false') { |
|||
this.$alert('打印设备选择失败,请重试', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => { |
|||
// 关闭当前页
|
|||
var index = parent.layer.getFrameIndex(window.name); |
|||
parent.layer.close(index); |
|||
} |
|||
}); |
|||
} else if (isJSON(arrParse.resultAck.info)) { |
|||
//选择成功,打印机连接成功
|
|||
// console.log(data)
|
|||
} |
|||
|
|||
})); |
|||
} |
|||
}); |
|||
}, |
|||
// 初始化画板
|
|||
InitDrawingBoardApi() { |
|||
// 用于弹出“初始化绘图板参数”对话框
|
|||
this.dialogInitDrawingBoardParam = true; |
|||
this.isDraw = false; |
|||
this.imgSrc = ""; |
|||
}, |
|||
handleClose(index) { |
|||
this.tags.splice(index, 1); |
|||
}, |
|||
clickTag(tag, index) { |
|||
this.isEditTag = true; |
|||
this.editIndex = index; |
|||
switch (tag.name) { |
|||
case "名称": |
|||
this.DrawLableNameTextParam = {...tag}; |
|||
this.dialogDrawLableNameTextParam = true; |
|||
break; |
|||
case "型号": |
|||
this.DrawLableVersionTextParam = {...tag}; |
|||
this.dialogDrawLableVersionTextParam = true; |
|||
break; |
|||
case "一维码": |
|||
this.DrawLableBarCodeParam = {...tag}; |
|||
this.dialogDrawLableBarCodeParam = true; |
|||
break; |
|||
case "二维码": |
|||
this.DrawLableQrCodeParam = {...tag}; |
|||
this.dialogDrawLableQrCodeParam = true; |
|||
break; |
|||
case "线条": |
|||
this.DrawLableLineParam = {...tag}; |
|||
this.dialogDrawLableLineParam = true; |
|||
break; |
|||
case "形状": |
|||
this.DrawLableGraphParam = {...tag}; |
|||
this.dialogDrawLableGraphParam = true; |
|||
break; |
|||
case "图片": |
|||
this.DrawLableImageParam = {...tag}; |
|||
this.dialogDrawLableImageParam = true; |
|||
break; |
|||
} |
|||
}, |
|||
// 初始化画布
|
|||
InitDrawingBoardPar(callbackFunction) { |
|||
// 如果没有填写高度或者宽度
|
|||
if (!this.InitDrawingBoardParam.width || !this.InitDrawingBoardParam.height) { |
|||
this.$message({ |
|||
message: '请选填写画板宽高', |
|||
type: 'warning' |
|||
}); |
|||
return |
|||
} |
|||
// 设置宽度
|
|||
this.InitDrawingBoardParam.width = Number(this.InitDrawingBoardParam.width); |
|||
// 设置高度
|
|||
this.InitDrawingBoardParam.height = Number(this.InitDrawingBoardParam.height); |
|||
// 创建画板
|
|||
/** |
|||
* 1.绘制元素前,必须先初始化画板,否则会引起崩溃! |
|||
2.初始化画板时会清空画板上次绘制的内容! |
|||
*/ |
|||
InitDrawingBoard(this.InitDrawingBoardParam, res => { |
|||
// 返回结果规范化
|
|||
var arrParse = JSON.parse(JSON.stringify(res)); |
|||
if (arrParse.resultAck.result !== 0) { |
|||
// 如果初始化失败
|
|||
this.isInit = false; // 隐藏生成按钮
|
|||
this.$message({ // 发起提示
|
|||
message: '初始化画布失败,请重试', |
|||
type: 'warning' |
|||
}); |
|||
|
|||
} else { |
|||
// 展示生成按钮
|
|||
this.isInit = true; |
|||
let version = $("#version").val(); |
|||
if ("noMaterial" !== version) { |
|||
this.versionInit = true; |
|||
} |
|||
} |
|||
}); |
|||
// 关闭弹窗
|
|||
this.dialogInitDrawingBoardParam = false; |
|||
|
|||
}, |
|||
// 文本
|
|||
DrawLableNameTextApi() { |
|||
this.DrawLableNameTextParam.width = Number(this.DrawLableNameTextParam.width); |
|||
this.DrawLableNameTextParam.height = Number(this.DrawLableNameTextParam.height); |
|||
this.DrawLableNameTextParam.x = Number(this.DrawLableNameTextParam.x); |
|||
this.DrawLableNameTextParam.y = Number(this.DrawLableNameTextParam.y); |
|||
this.DrawLableNameTextParam.fontSize = Number(this.DrawLableNameTextParam.fontSize); |
|||
this.DrawLableNameTextParam.textAlignHorizonral = Number(this.DrawLableNameTextParam.textAlignHorizonral); |
|||
this.DrawLableNameTextParam.lineSpacing = Number(this.DrawLableNameTextParam.lineSpacing); |
|||
DrawLableText(this.DrawLableNameTextParam, res => { |
|||
var arrParse = JSON.parse(JSON.stringify(res)); |
|||
//⼀维码绘制失败,退出绘制
|
|||
if (arrParse.resultAck.result !== 0) { |
|||
this.$message({ // 发起提示
|
|||
message: '绘制失败,请重试', |
|||
type: 'warning' |
|||
}); |
|||
} |
|||
}); |
|||
this.DrawLableNameTextParam.name = "名称"; |
|||
if (this.isEditTag) { |
|||
this.$set(this.tags, this.editIndex, this.DrawLableNameTextParam); |
|||
} else { |
|||
this.tags.push(this.DrawLableNameTextParam) |
|||
} |
|||
this.dialogDrawLableNameTextParam = false; |
|||
this.isDraw = true |
|||
}, |
|||
// 型号
|
|||
DrawLableVersionTextApi() { |
|||
this.DrawLableVersionTextParam.width = Number(this.DrawLableVersionTextParam.width); |
|||
this.DrawLableVersionTextParam.height = Number(this.DrawLableVersionTextParam.height); |
|||
this.DrawLableVersionTextParam.x = Number(this.DrawLableVersionTextParam.x); |
|||
this.DrawLableVersionTextParam.y = Number(this.DrawLableVersionTextParam.y); |
|||
this.DrawLableVersionTextParam.fontSize = Number(this.DrawLableVersionTextParam.fontSize); |
|||
this.DrawLableVersionTextParam.textAlignHorizonral = Number(this.DrawLableVersionTextParam.textAlignHorizonral); |
|||
this.DrawLableVersionTextParam.lineSpacing = Number(this.DrawLableVersionTextParam.lineSpacing); |
|||
DrawLableText(this.DrawLableVersionTextParam, res => { |
|||
var arrParse = JSON.parse(JSON.stringify(res)); |
|||
//⼀维码绘制失败,退出绘制
|
|||
if (arrParse.resultAck.result !== 0) { |
|||
this.$message({ // 发起提示
|
|||
message: '绘制失败,请重试', |
|||
type: 'warning' |
|||
}); |
|||
} |
|||
}); |
|||
this.DrawLableVersionTextParam.name = "型号"; |
|||
if (this.isEditTag) { |
|||
this.$set(this.tags, this.editIndex, this.DrawLableVersionTextParam); |
|||
} else { |
|||
this.tags.push(this.DrawLableVersionTextParam) |
|||
} |
|||
this.dialogDrawLableVersionTextParam = false; |
|||
this.isVersion = true; |
|||
this.isDraw = true |
|||
}, |
|||
// 一维码
|
|||
DrawLableBarCodeApi() { |
|||
this.DrawLableBarCodeParam.width = Number(this.DrawLableBarCodeParam.width); |
|||
this.DrawLableBarCodeParam.height = Number(this.DrawLableBarCodeParam.height); |
|||
this.DrawLableBarCodeParam.x = Number(this.DrawLableBarCodeParam.x); |
|||
this.DrawLableBarCodeParam.y = Number(this.DrawLableBarCodeParam.y); |
|||
this.DrawLableBarCodeParam.textHeight = Number(this.DrawLableBarCodeParam.textHeight); |
|||
if (this.isVersion) { |
|||
this.DrawLableBarCodeParam.y = Number(this.DrawLableBarCodeParam.y) + (Number(this.DrawLableVersionTextParam.y) * 0.8); |
|||
} |
|||
this.DrawLableBarCodeParam.name = "条形码"; |
|||
if (this.isEditTag) { |
|||
this.$set(this.tags, this.editIndex, this.DrawLableBarCodeParam); |
|||
} else { |
|||
this.tags.push(this.DrawLableBarCodeParam) |
|||
} |
|||
this.isBarCode = true; |
|||
this.dialogDrawLableBarCodeParam = false; |
|||
this.isDraw = true |
|||
}, |
|||
// 二维码
|
|||
DrawLableQrCodeApi() { |
|||
|
|||
this.DrawLableQrCodeParam.width = Number(this.DrawLableQrCodeParam.width); |
|||
this.DrawLableQrCodeParam.height = Number(this.DrawLableQrCodeParam.width); |
|||
this.DrawLableQrCodeParam.x = Number(this.DrawLableQrCodeParam.x); |
|||
this.DrawLableQrCodeParam.y = Number(this.DrawLableQrCodeParam.y); |
|||
this.DrawLableQrCodeParam.name = "二维码"; |
|||
if (this.isVersion) { |
|||
this.DrawLableQrCodeParam.y = Number(this.DrawLableQrCodeParam.y) + (Number(this.DrawLableVersionTextParam.y) * 0.8); |
|||
} |
|||
if (this.isEditTag) { |
|||
this.$set(this.tags, this.editIndex, this.DrawLableQrCodeParam); |
|||
} else { |
|||
this.tags.push(this.DrawLableQrCodeParam) |
|||
} |
|||
this.dialogDrawLableQrCodeParam = false; |
|||
this.isDraw = true; |
|||
this.isBarCode = false; |
|||
}, |
|||
DragList(List) { |
|||
List.forEach(res => { |
|||
|
|||
}) |
|||
}, |
|||
// 预览时进行绘制
|
|||
generateImagePreviewImagepi() { |
|||
let List = [...this.tags]; |
|||
// 创建画布
|
|||
InitDrawingBoard(this.InitDrawingBoardParam, (data => { |
|||
List.forEach(res => { |
|||
switch (res.name) { |
|||
case "名称": |
|||
DrawLableText(res); |
|||
break; |
|||
case "型号": |
|||
DrawLableText(res); |
|||
break; |
|||
case "条形码": |
|||
DrawLableBarCode(res); |
|||
break; |
|||
case "二维码": |
|||
DrawLableQrCode(res); |
|||
break; |
|||
case "线条": |
|||
DrawLableLine(res); |
|||
break; |
|||
case "形状": |
|||
DrawLableGraph(res); |
|||
break; |
|||
case "图片": |
|||
DrawLableImage(res); |
|||
break; |
|||
} |
|||
}); |
|||
// 标签预览
|
|||
generateImagePreviewImage(generateImagePreviewImageParam['displayScale'], |
|||
(data => { |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
//var Epc = document.getElementById('searchRfidBox');
|
|||
var base64Data = arrParse.resultAck.info; |
|||
var obj = JSON.parse(base64Data); |
|||
var data = obj.ImageData; |
|||
var errorCode = obj.errorCode; |
|||
this.imgSrc = "data:image/jpeg;base64," + data; |
|||
// self.isInit = false
|
|||
})) |
|||
})); |
|||
}, |
|||
//清空
|
|||
emptyImagePreviewImage() { |
|||
this.imgSrc = ""; |
|||
this.tags = []; |
|||
this.isDraw = false |
|||
}, |
|||
DrawLableTextNameApiDemo(DrawLableTextParamDemo, callbackFunction) { |
|||
DrawLableText(DrawLableTextParamDemo, callbackFunction); |
|||
}, |
|||
DrawLableTextVersionNameApiDemo(DrawLableTextParamDemo, callbackFunction) { |
|||
DrawLableText(DrawLableTextParamDemo, callbackFunction); |
|||
}, |
|||
DrawLableGraphApiDemo(callbackFunction) { |
|||
DrawLableGraph(this.DrawLableGraphParamDemo, callbackFunction); |
|||
}, |
|||
DrawLableLineApiDemo(DrawLableLineParamDemo, callbackFunction) { |
|||
DrawLableLine(DrawLableLineParamDemo, callbackFunction); |
|||
}, |
|||
DrawLableBarCodeApiDemo(drawLableBarCodeParamDemo, callableFunction) { |
|||
DrawLableBarCode(drawLableBarCodeParamDemo, callableFunction) |
|||
}, |
|||
DrawLableQrCodeApiDemo(drawLableQrCodeParamDemo, callableFunction) { |
|||
DrawLableQrCode(drawLableQrCodeParamDemo, callableFunction) |
|||
}, |
|||
|
|||
downLoadServer(){ |
|||
window.open("/download/zipDownload","_self"); |
|||
}, |
|||
/** |
|||
* 开始打印任务 |
|||
* @param {*} pageCount 打印页数 |
|||
* @param {*} quantityCount 打印份数 |
|||
* @param {*} density 浓度 |
|||
* @param {*} paperType 纸张类型 |
|||
* @param {*} paperType 材质 |
|||
* @param {*} paperType 打印模式 |
|||
*/ |
|||
startPrintJob(index) { |
|||
let { |
|||
pageCount = "1", |
|||
quantityCount = "1", |
|||
density = "3", |
|||
paperType = "1", |
|||
printMode = "1" |
|||
} = this.form; |
|||
const self = this; |
|||
switch (index) { |
|||
case 1: |
|||
quantityCount = 1; |
|||
break; |
|||
case 2: |
|||
quantityCount = 1; |
|||
pageCount = 2; |
|||
break; |
|||
case 4: |
|||
pageCount = 2; |
|||
break; |
|||
} |
|||
if (this.value === "") { |
|||
self.$message({ |
|||
message: '请选择连接打印机', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
if (!this.form.quantityCount && (index === 3 || index === 4)) { |
|||
self.$message({ |
|||
message: '请选填写打印份数', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
// 为了防止打印时未生成对应图像事先初始化
|
|||
|
|||
|
|||
// 初始化画板
|
|||
|
|||
if (this.isBarCode) { |
|||
// 如果打印条形码
|
|||
|
|||
|
|||
if (this.isVersion) { |
|||
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { |
|||
this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { |
|||
this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam, (data => { |
|||
this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => { |
|||
// 提交数据
|
|||
var totalCount = parseInt(pageCount) * parseInt(quantityCount); |
|||
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { |
|||
bCanclePrint = false; |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (arrParse.resultAck.result !== 0) { |
|||
self.$message({ |
|||
message: '打印失败!', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
var intPageCount = parseInt(pageCount); |
|||
var intQuantityCount = parseInt(quantityCount); |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); |
|||
}); |
|||
})) |
|||
})) |
|||
})) |
|||
})) |
|||
} else { |
|||
// 不打印型号
|
|||
|
|||
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { |
|||
this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { |
|||
this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => { |
|||
// 提交数据
|
|||
var totalCount = parseInt(pageCount) * parseInt(quantityCount); |
|||
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { |
|||
bCanclePrint = false; |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (arrParse.resultAck.result !== 0) { |
|||
self.$message({ |
|||
message: '打印失败!', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
var intPageCount = parseInt(pageCount); |
|||
var intQuantityCount = parseInt(quantityCount); |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); |
|||
}); |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
} |
|||
else { |
|||
// 如果打印二维码
|
|||
|
|||
if (this.isVersion) { |
|||
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { |
|||
this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { |
|||
this.DrawLableTextVersionNameApiDemo(this.DrawLableVersionTextParam, (data => { |
|||
this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => { |
|||
// 提交数据
|
|||
var totalCount = parseInt(pageCount) * parseInt(quantityCount); |
|||
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { |
|||
bCanclePrint = false; |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (arrParse.resultAck.result !== 0) { |
|||
self.$message({ |
|||
message: '打印失败!', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
var intPageCount = parseInt(pageCount); |
|||
var intQuantityCount = parseInt(quantityCount); |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); |
|||
}); |
|||
})) |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
else { |
|||
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => { |
|||
this.DrawLableTextNameApiDemo(this.DrawLableNameTextParam, (data => { |
|||
this.DrawLableQrCodeApiDemo(this.DrawLableQrCodeParam, (data => { |
|||
// 提交数据
|
|||
var totalCount = parseInt(pageCount) * parseInt(quantityCount); |
|||
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) { |
|||
bCanclePrint = false; |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (arrParse.resultAck.result !== 0) { |
|||
self.$message({ |
|||
message: '打印失败!', |
|||
type: 'warning' |
|||
}); |
|||
return; |
|||
} |
|||
var intPageCount = parseInt(pageCount); |
|||
var intQuantityCount = parseInt(quantityCount); |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount); |
|||
}); |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
}, |
|||
/** |
|||
* 提交打印数据 |
|||
* @param {string} printData 打印数据 |
|||
* @param {string} printerInfo 打印机信息 |
|||
* @param {number} pageIndex 页序号 |
|||
* @param {number} pageCount 页数 |
|||
* @param {number} quantityCount 单页的份数 |
|||
*/ |
|||
sendCommitJob(printData, pageIndex, pageCount, quantityCount) { |
|||
if (bCanclePrint) { |
|||
return; |
|||
} |
|||
const self = this; |
|||
var jsonObj = {"printerImageProcessingInfo": {"printQuantity": quantityCount}}; |
|||
commitJob(null, JSON.stringify(jsonObj), function (data) { |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
var resultInfo = "commitJob ok"; |
|||
if (arrParse.resultAck.printQuantity === pageCount && arrParse.resultAck.onPrintPageCompleted === quantityCount) { |
|||
//所有⻚数据的所有份数打印完成
|
|||
endJob(function (data) { |
|||
// 停止打印
|
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (String(arrParse.resultAck.info).indexOf("endJob ok") > -1) { |
|||
// document.getElementById("printId").disabled = false;
|
|||
} |
|||
}); |
|||
return; |
|||
} |
|||
|
|||
//异常导致打印取消
|
|||
if (arrParse.resultAck.errorCode !== 0 && (arrParse.resultAck.cacheStatus === "cancel")) { |
|||
// document.getElementById("printId").disabled = false;
|
|||
return; |
|||
} |
|||
|
|||
//异常导致打印暂停
|
|||
if (arrParse.resultAck.errorCode !== 0 && (arrParse.resultAck.cacheStatus === "pause")) { |
|||
cancleJobApi(); |
|||
return; |
|||
} |
|||
|
|||
//当前⻚所有份数打印完成,但是未打印完所有⻚数据,继续发送下⼀⻚数据
|
|||
if (String(arrParse.resultAck.info).indexOf(resultInfo) > -1 && pageIndex !== pageCount) { |
|||
pageIndex++; |
|||
setTimeout(function () { |
|||
// 初始化画板
|
|||
|
|||
|
|||
if (this.isBarCode) { |
|||
// 如果绘制条形码
|
|||
|
|||
|
|||
if (self.isVersion) { |
|||
// 如果绘制型号
|
|||
|
|||
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { |
|||
self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { |
|||
// 添加型号
|
|||
self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam, (data => { |
|||
self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => { |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); |
|||
})) |
|||
})) |
|||
})) |
|||
})) |
|||
} else { |
|||
// 如果不绘制型号
|
|||
|
|||
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { |
|||
self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { |
|||
self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => { |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
|
|||
} |
|||
else { |
|||
// 如果绘制二维码
|
|||
|
|||
// 如果绘制型号
|
|||
if (self.isVersion) { |
|||
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { |
|||
self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { |
|||
// 添加型号
|
|||
self.DrawLableTextVersionNameApiDemo(self.DrawLableVersionTextParam, (data => { |
|||
self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => { |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); |
|||
})) |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
else { |
|||
// 如果不绘制型号
|
|||
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => { |
|||
self.DrawLableTextNameApiDemo(self.DrawLableNameTextParam, (data => { |
|||
self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => { |
|||
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount); |
|||
})) |
|||
})) |
|||
})) |
|||
} |
|||
|
|||
|
|||
} |
|||
// 提交数据
|
|||
}, 500); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
}); |
|||
@ -0,0 +1,638 @@ |
|||
//websocket
|
|||
var g_websocket; |
|||
|
|||
/* //响应数据 */ |
|||
var ackJsonData; |
|||
|
|||
/** websocket(打印服务)连接状态*/ |
|||
var websocketConnectStatus = false; |
|||
/**SDK初始化状态 */ |
|||
var initSdkStatus =false; |
|||
/**设备状态 */ |
|||
var deviceStatus =false; |
|||
/**消息列表 */ |
|||
var MessageList = {}; |
|||
|
|||
/**通过websocket发送消息 */ |
|||
function sendMsg(msg, callback) { |
|||
// console.log('sendMsg', msg.apiName);
|
|||
MessageList[msg.apiName] = callback; |
|||
|
|||
var data = JSON.stringify(msg); |
|||
var tryTimes = 10; |
|||
|
|||
for (var i = 0; i < tryTimes; i++) { |
|||
if (g_websocket.readyState === 1) { |
|||
g_websocket.send(data); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
//初始化打印服务
|
|||
//1.1 获取接口实例JCAPI.getInstance(单例模式)
|
|||
function getInstance() { |
|||
if ('WebSocket' in window) { |
|||
g_websocket = websocketLifePeriod(); |
|||
} else { |
|||
console.log('unsupported websocket'); |
|||
//return false;
|
|||
g_websocket = null; |
|||
return false; |
|||
} |
|||
|
|||
//保持在线
|
|||
setInterval(function () { |
|||
if (g_websocket.readyState === 2 || g_websocket.readyState === 3) { |
|||
getInstance(); |
|||
} |
|||
}, 3000); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
//1.1.1 打开链接及回调
|
|||
function websocketLifePeriod() { |
|||
|
|||
var websocket; |
|||
websocket = new WebSocket('ws://127.0.0.1:37989'); |
|||
//websocket.binaryType = 'arraybuffer';
|
|||
websocket.onerror = function (evt) {//since there is an error, sockets will close so...
|
|||
sok.onclose = function (e) { |
|||
console.log("WebSocket Error: ", e); |
|||
} |
|||
}; |
|||
|
|||
websocket.proxy_read_timeout = 10000; |
|||
websocket.binaryType = "arraybuffer"; |
|||
|
|||
websocket.onopen = connectCallback; |
|||
|
|||
websocket.onclose = closeCallback; |
|||
|
|||
websocket.onmessage = readCallback; |
|||
|
|||
websocket.onerror = errorCallback; |
|||
|
|||
//console.log(websocket);
|
|||
|
|||
return websocket; |
|||
} |
|||
|
|||
//1.1.2 websocket连接回调
|
|||
function connectCallback(e) { |
|||
ackJsonData = ''; |
|||
console.log('success'); |
|||
websocketConnectStatus=true; |
|||
init(); |
|||
} |
|||
|
|||
//1.1.3 关闭连接回调
|
|||
function closeCallback(e) { |
|||
websocketConnectStatus=false; |
|||
console.log( |
|||
'websocket closed: ' + e.code + ' ' + e.reason + ' ' + e.wasClean |
|||
); |
|||
// globalwebsocket = websocket;
|
|||
g_websocket.close(); |
|||
//websocketLifePeriod();
|
|||
if (e.code === 1005) { |
|||
// globalwebsocket = websocket;
|
|||
} |
|||
console.log('closed'); |
|||
ackJsonData = ''; |
|||
} |
|||
|
|||
|
|||
//1.1.4 读回调
|
|||
function readCallback(e) { |
|||
var callBackInfo = e.data; |
|||
//console.log('readCallback', callBackInfo);
|
|||
ackJsonData = callBackInfo; |
|||
|
|||
var callbackName; |
|||
|
|||
if (isJSON(ackJsonData)) { |
|||
var arrParse = JSON.parse(ackJsonData); |
|||
|
|||
//接口回调
|
|||
if (!!MessageList[arrParse.apiName]) { |
|||
MessageList[arrParse.apiName](arrParse); |
|||
} |
|||
|
|||
//回调分发
|
|||
if(arrParse.apiName==='printStatus'){ |
|||
if(arrParse['resultAck']['online']==='online'){ |
|||
deviceStatus=true; |
|||
}else{ |
|||
deviceStatus=false; |
|||
} |
|||
}else{ |
|||
if (arrParse['resultAck']['callback'] != undefined) { |
|||
callbackName = arrParse['resultAck']['callback']['name']; |
|||
|
|||
if (callbackName == 'onConnectSuccess') { |
|||
var printerName = arrParse['resultAck']['callback']['printerName']; |
|||
onConnectSuccess(printerName); |
|||
} else if (callbackName == 'onDisConnect') { |
|||
var printerName = arrParse['resultAck']['callback']['printerName']; |
|||
onDisConnect(printerName); |
|||
} else if (callbackName == 'onCoverStatusChange') { |
|||
var coverStatus = arrParse['resultAck']['callback']['coverStatus']; |
|||
onCoverStatusChange(coverStatus); |
|||
} else if (callbackName == 'onElectricityChange') { |
|||
var powerLever = arrParse['resultAck']['callback']['powerLever']; |
|||
onElectricityChange(powerLever); |
|||
} else if (callbackName == 'onPaperStatusChange') { |
|||
var paperStatus = arrParse['resultAck']['callback']['paperStatus']; |
|||
onPaperStatusChange(paperStatus); |
|||
} else if (callbackName == 'onPrintPageCompleted') { |
|||
onPrintPageCompleted(); |
|||
} else if (callbackName == 'onPrintProgress') { |
|||
onPrintProgress(); |
|||
} else if (callbackName == 'onAbnormalResponse') { |
|||
onAbnormalResponse(); |
|||
} |
|||
else { |
|||
console.log('unknow callback api!'); |
|||
} |
|||
} |
|||
} |
|||
|
|||
ackJsonData = ''; |
|||
} |
|||
} |
|||
//1.1.5 错误回调
|
|||
function errorCallback(e) { |
|||
//如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
|
|||
console.log(e.data); |
|||
} |
|||
|
|||
//封装初始化SDK/获取打印机列表/选择打印机
|
|||
function init() { |
|||
initSdk(this.initSdkParam, function (data) { |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
if (arrParse.resultAck.result != 0) { |
|||
return; |
|||
} |
|||
|
|||
getAllPrinters(function (data) { |
|||
var arrParse = JSON.parse(JSON.stringify(data)); |
|||
|
|||
if (!arrParse.resultAck.result ) { |
|||
return; |
|||
} else if (isJSON(arrParse.resultAck.info)) { |
|||
allPrinters = JSON.parse(arrParse.resultAck.info) |
|||
let allPrintersName = Object.keys(allPrinters); |
|||
let allPrintersValue = Object.values(allPrinters); |
|||
|
|||
selectPrinter(allPrintersName[0],parseInt(allPrintersValue[0]),(data=>{ |
|||
initSdkStatus=true; |
|||
})) |
|||
} |
|||
}) |
|||
|
|||
}) |
|||
} |
|||
|
|||
//1.2 断开websocket连接
|
|||
function unInitPrintInstance() { |
|||
g_websocket.close(); |
|||
} |
|||
|
|||
//2.1 打印机连接成功回调onConnectSuccess
|
|||
function onConnectSuccess(printerName) { |
|||
console.log('打印机连接成功!'); |
|||
initSdkStatus=true; |
|||
deviceStatus=true; |
|||
} |
|||
|
|||
//2.2 打印机断开回调onDisConnect
|
|||
function onDisConnect(printerName) { |
|||
console.log('打印机断开!'); |
|||
initSdkStatus=false; |
|||
} |
|||
|
|||
//2.3 打印机上盖变化回调onCoverStatusChange
|
|||
function onCoverStatusChange(coverStatus) { |
|||
console.log('打印机盒盖有变化!'); |
|||
} |
|||
|
|||
//2.4 打印机电量变化回调onElectricityChange()
|
|||
function onElectricityChange(powerLever) { |
|||
console.log('打印机电量有变化!'); |
|||
} |
|||
|
|||
//2.5 打印机纸张状态变化回调onPaperStatusChange
|
|||
function onPaperStatusChange(paperStatus) { |
|||
console.log('打印机纸张状态有变化!'); |
|||
} |
|||
|
|||
//3.1 页打印成功回调onPrintPageCompleted
|
|||
function onPrintPageCompleted() { |
|||
console.log('页打印状态有变化!'); |
|||
} |
|||
|
|||
//3.2 打印进度回调onPrintProgress
|
|||
function onPrintProgress() { |
|||
console.log('打印进度有变化!'); |
|||
} |
|||
|
|||
//3.3 打印异常回调onAbnormalResponse
|
|||
function onAbnormalResponse() { |
|||
console.log('打印异常!'); |
|||
} |
|||
|
|||
//获取所有当前PC上连接的精臣打印机
|
|||
//4.1 获取打印机列表getAllPrinters()
|
|||
function getAllPrinters(callbackFunction) { |
|||
//刷新设备时,关闭设备
|
|||
//closePrinter();
|
|||
var jsonObj = { apiName: 'getAllPrinters' }; |
|||
var allDevice = {}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//5. 图片打印
|
|||
/*base64Data--图片base64数据 |
|||
nPrintCount--打印数量 |
|||
bDenoise--降噪*/ |
|||
function picturePrint(base64Data, nPrintCount, bDenoise, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'picturePrint', |
|||
parameter: { |
|||
data: base64Data, |
|||
nPrintCount: nPrintCount, |
|||
bDenoise: bDenoise |
|||
} |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//6.选择并打开需要使用的打印机名称,及端口号
|
|||
function selectPrinter(printerName, port, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'selectPrinter', |
|||
parameter: { printerName: printerName, port: port } |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//7.停止打印
|
|||
function stopPrint(callbackFunction) { |
|||
var jsonObj = { apiName: 'stopPrint' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//8.关闭打印端口
|
|||
function closePrinter(callbackFunction) { |
|||
var jsonObj = { apiName: 'closePrinter' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//9.设置打印浓度
|
|||
//nDensity--范围为getDensityScopeApi查询范围
|
|||
function setPrintDensity(nDensity, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'setPrintDensity', |
|||
parameter: { nDensity: nDensity } |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//10.设置打印速度
|
|||
//nSpeed--范围为getSpeedScopeApi查询的范围
|
|||
function setPrintSpeed(nSpeed, callbackFunction) { |
|||
var jsonObj = { apiName: 'setPrintSpeed', parameter: { nSpeed: nSpeed } }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//11.设置打印标贴类型
|
|||
//nType--间隙:01,黑标:02,连续纸:03,定位孔:04,透明纸:05,随机打印:06
|
|||
function setPrintLabelType(nType, callbackFunction) { |
|||
var jsonObj = { apiName: 'setPrintLabelType', parameter: { nType: nType } }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
|
|||
//12.设置关机时间
|
|||
//nType--1:15分钟,2:30分钟,3:60分钟,4:never
|
|||
function setPrinterAutoShutDownTime(nType, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'setPrinterAutoShutDownTime', |
|||
parameter: { nType: nType } |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//13.复位打印机
|
|||
function setPrinterReset(callbackFunction) { |
|||
var jsonObj = { apiName: 'setPrinterReset' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//14. 纸张标定
|
|||
function setPrintPaperPos(nType, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'setPrintPaper', |
|||
parameter: { nType: nType } |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//15.获取打印速度
|
|||
function getPrintSpeed(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrintSpeed' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//15.获取打印机电量
|
|||
function getPower(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPower' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//16.获取标贴类型
|
|||
function getPrintLabelType(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrintLabelType' }; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//17.获取打印浓度
|
|||
function getPrintDensity(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrintDensity' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//18.获取打印机语言
|
|||
function getPrinterLanguageType(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterLanguageType' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//19.查询关机时间
|
|||
function getPrinterAutoShutDownTime(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterAutoShutDownTime' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//20.获取打印机序列号
|
|||
function getPrinterSn(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterSn' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//21.获取硬件版本
|
|||
function getPrinterHardwareVersion(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterHardwareVersion' }; |
|||
var responseData = {}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//22.获取软件版本
|
|||
function getPrinterSoftwareVersion(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterSoftwareVersion' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//23. 获取打印机语言
|
|||
function setPrinterLanguageType(nType, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'setPrinterLanguageType', |
|||
parameter: { nType: nType } |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//24.获取打速度印范围
|
|||
function getSpeedScope(callbackFunction) { |
|||
var jsonObj = { apiName: 'getSpeedScope' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
return getResult(5, 'getSpeedScope', 'set printer language timeout!'); |
|||
} |
|||
|
|||
//25. 获取已开启的打印机
|
|||
function getConnectPrinter(callbackFunction) { |
|||
var jsonObj = { apiName: 'getConnectPrinter' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
return getResult(5, 'getConnectPrinter', 'get connect printer timeout!'); |
|||
} |
|||
|
|||
//26.获取打印机型号
|
|||
function getPrinterType(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrinterType' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//27.获取浓度范围
|
|||
function getDensityScope(callbackFunction) { |
|||
var jsonObj = { apiName: 'getDensityScope' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//28. 获取打印模式 1-热敏 2-热转印
|
|||
function getPrinterMode(callbackFunction) { |
|||
var jsonObj = { apiName: 'getPrintMode' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//29.获取打印机mac地址
|
|||
function getMacAddress(callbackFunction) { |
|||
var jsonObj = { apiName: 'getMacAddress' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//30.设置打印模式
|
|||
//nType-1热敏,2碳带
|
|||
function setPrintMode(nType, callbackFunction) { |
|||
var jsonObj = { apiName: 'setPrintMode', parameter: { nType: nType } }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
/** |
|||
* 31.开始打印任务 |
|||
* @param {number} printDensity 打印浓度 |
|||
* @param {number} printLabelType 纸张类型 |
|||
* @param {number} printMaterial 材质 |
|||
* @param {number} printMode 打印模式 |
|||
* @param {number} count 总打印张数 |
|||
* @param {*} callbackFunction 回调函数 |
|||
*/ |
|||
function startJob(printDensity, printLabelType, printMode, count, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'startJob', |
|||
parameter: { |
|||
printDensity: printDensity, |
|||
printLabelType: printLabelType, |
|||
printMode: printMode, |
|||
count: count |
|||
} |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//32.提交打印任务commitJob
|
|||
function commitJob(printData, printerImageProcessingInfo, callbackFunction) { |
|||
var printDataJson = eval('(' + printData + ')'); |
|||
var printerImageProcessingInfoJson = eval('(' + printerImageProcessingInfo + ')'); |
|||
var jsonObj = { |
|||
apiName: 'commitJob', |
|||
parameter: { |
|||
printData: printDataJson, |
|||
printerImageProcessingInfo: printerImageProcessingInfoJson['printerImageProcessingInfo'], |
|||
} |
|||
}; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//33.结束打印任务endJob
|
|||
function endJob(callbackFunction) { |
|||
var jsonObj = { apiName: 'endJob' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//33.取消打印任务cancleJob
|
|||
function cancleJob(callbackFunction) { |
|||
var jsonObj = { apiName: 'stopPrint' }; |
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.1 创建画板
|
|||
function InitDrawingBoard(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'InitDrawingBoard', |
|||
parameter: json |
|||
}; |
|||
// console.log("宽度:" + json.width)
|
|||
// console.log("高度:" + json.height)
|
|||
// console.log("旋转角度:" + json.rotate)
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.2 绘制文本
|
|||
function DrawLableText(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableText', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.3 绘制一维码
|
|||
function DrawLableBarCode(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableBarCode', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.4 绘制二维码
|
|||
function DrawLableQrCode(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableQrCode', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.5 绘制线条
|
|||
function DrawLableLine(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableLine', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.6 绘制图形
|
|||
function DrawLableGraph(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableGraph', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.7 绘制图像
|
|||
function DrawLableImage(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'DrawLableImage', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//34.8 生成预览图
|
|||
function generateImagePreviewImage(displayScale, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'generateImagePreviewImage', |
|||
displayScale: displayScale |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
//35. 初始化SDK
|
|||
function initSdk(json, callbackFunction) { |
|||
var jsonObj = { |
|||
apiName: 'initSdk', |
|||
parameter: json |
|||
}; |
|||
|
|||
sendMsg(jsonObj, callbackFunction); |
|||
} |
|||
|
|||
|
|||
//36. 获取调用结果
|
|||
function getResult(tryTime, apiName, errInfo) { |
|||
tryTimes = tryTime; |
|||
|
|||
let result = {}; |
|||
while (tryTimes--) { |
|||
if (!isJSON(ackJsonData)) continue; |
|||
|
|||
var arrParse = JSON.parse(ackJsonData); |
|||
if (arrParse['apiName'] === apiName) { |
|||
result = arrParse['resultAck']; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
if (tryTimes <= 0) { |
|||
result['result'] = false; |
|||
result['errorCode'] = 0x12; |
|||
result['info'] = errInfo; |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
//37. 判断字符串是否为JSON
|
|||
function isJSON(str) { |
|||
if (typeof str == 'string') { |
|||
try { |
|||
var obj = JSON.parse(str); |
|||
if (typeof obj == 'object' && obj) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
|
|||
} catch (e) { |
|||
//console.log('error:'+str+'!!!'+e);
|
|||
return false; |
|||
} |
|||
|
|||
} |
|||
|
|||
console.log('It is not a string!'); |
|||
} |
|||
@ -0,0 +1,530 @@ |
|||
/*! layer-v3.5.1 Web 通用弹出层组件 MIT License */ |
|||
;!function (e, t) { |
|||
"use strict"; |
|||
var i, n, a = e.layui && layui.define, o = { |
|||
getPath: function () { |
|||
var t = document.currentScript ? document.currentScript.src : function () { |
|||
for (var e, t = document.scripts, i = t.length - 1, n = i; n > 0; n--) if ("interactive" === t[n].readyState) { |
|||
e = t[n].src; |
|||
break |
|||
} |
|||
return e || t[i].src |
|||
}(), i = e.LAYUI_GLOBAL || {}; |
|||
return i.layer_dir || t.substring(0, t.lastIndexOf("/") + 1) |
|||
}(), |
|||
config: {}, |
|||
end: {}, |
|||
minIndex: 0, |
|||
minLeft: [], |
|||
btn: ["确定", "取消"], |
|||
type: ["dialog", "page", "iframe", "loading", "tips"], |
|||
getStyle: function (t, i) { |
|||
var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null); |
|||
return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i) |
|||
}, |
|||
link: function (t, i, n) { |
|||
if (r.path) { |
|||
var a = document.getElementsByTagName("head")[0], s = document.createElement("link"); |
|||
"string" == typeof i && (n = i); |
|||
var l = (n || t).replace(/\.|\//g, ""), f = "layuicss-" + l, c = "creating", u = 0; |
|||
s.rel = "stylesheet", s.href = r.path + t, s.id = f, document.getElementById(f) || a.appendChild(s), "function" == typeof i && !function d(t) { |
|||
var n = 100, a = document.getElementById(f); |
|||
return ++u > 1e4 / n ? e.console && console.error(l + ".css: Invalid") : void (1989 === parseInt(o.getStyle(a, "width")) ? (t === c && a.removeAttribute("lay-status"), a.getAttribute("lay-status") === c ? setTimeout(d, n) : i()) : (a.setAttribute("lay-status", c), setTimeout(function () { |
|||
d(c) |
|||
}, n))) |
|||
}() |
|||
} |
|||
} |
|||
}, r = { |
|||
v: "3.5.1", ie: function () { |
|||
var t = navigator.userAgent.toLowerCase(); |
|||
return !!(e.ActiveXObject || "ActiveXObject" in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11") |
|||
}(), index: e.layer && e.layer.v ? 1e5 : 0, path: o.getPath, config: function (e, t) { |
|||
return e = e || {}, r.cache = o.config = i.extend({}, o.config, e), r.path = o.config.path || r.path, "string" == typeof e.extend && (e.extend = [e.extend]), o.config.path && r.ready(), e.extend ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend), this) : this |
|||
}, ready: function (e) { |
|||
var t = "layer", i = "", n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i; |
|||
return a ? layui.addcss(n, e, t) : o.link(n, e, t), this |
|||
}, alert: function (e, t, n) { |
|||
var a = "function" == typeof t; |
|||
return a && (n = t), r.open(i.extend({content: e, yes: n}, a ? {} : t)) |
|||
}, confirm: function (e, t, n, a) { |
|||
var s = "function" == typeof t; |
|||
return s && (a = n, n = t), r.open(i.extend({content: e, btn: o.btn, yes: n, btn2: a}, s ? {} : t)) |
|||
}, msg: function (e, n, a) { |
|||
var s = "function" == typeof n, f = o.config.skin, c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg", |
|||
u = l.anim.length - 1; |
|||
return s && (a = n), r.open(i.extend({ |
|||
content: e, |
|||
time: 3e3, |
|||
shade: !1, |
|||
skin: c, |
|||
title: !1, |
|||
closeBtn: !1, |
|||
btn: !1, |
|||
resize: !1, |
|||
end: a |
|||
}, s && !o.config.skin ? {skin: c + " layui-layer-hui", anim: u} : function () { |
|||
return n = n || {}, (n.icon === -1 || n.icon === t && !o.config.skin) && (n.skin = c + " " + (n.skin || "layui-layer-hui")), n |
|||
}())) |
|||
}, load: function (e, t) { |
|||
return r.open(i.extend({type: 3, icon: e || 0, resize: !1, shade: .01}, t)) |
|||
}, tips: function (e, t, n) { |
|||
return r.open(i.extend({ |
|||
type: 4, |
|||
content: [e, t], |
|||
closeBtn: !1, |
|||
time: 3e3, |
|||
shade: !1, |
|||
resize: !1, |
|||
fixed: !1, |
|||
maxWidth: 260 |
|||
}, n)) |
|||
} |
|||
}, s = function (e) { |
|||
var t = this, a = function () { |
|||
t.creat() |
|||
}; |
|||
t.index = ++r.index, t.config.maxWidth = i(n).width() - 30, t.config = i.extend({}, t.config, o.config, e), document.body ? a() : setTimeout(function () { |
|||
a() |
|||
}, 30) |
|||
}; |
|||
s.pt = s.prototype; |
|||
var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"]; |
|||
l.anim = ["layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"], l.SHADE = "layui-layer-shade", l.MOVE = "layui-layer-move", s.pt.config = { |
|||
type: 0, |
|||
shade: .3, |
|||
fixed: !0, |
|||
move: l[1], |
|||
title: "信息", |
|||
offset: "auto", |
|||
area: "auto", |
|||
closeBtn: 1, |
|||
time: 0, |
|||
zIndex: 19891014, |
|||
maxWidth: 360, |
|||
anim: 0, |
|||
isOutAnim: !0, |
|||
minStack: !0, |
|||
icon: -1, |
|||
moveType: 1, |
|||
resize: !0, |
|||
scrollbar: !0, |
|||
tips: 2 |
|||
}, s.pt.vessel = function (e, t) { |
|||
var n = this, a = n.index, r = n.config, s = r.zIndex + a, f = "object" == typeof r.title, |
|||
c = r.maxmin && (1 === r.type || 2 === r.type), |
|||
u = r.title ? '<div class="layui-layer-title" style="' + (f ? r.title[1] : "") + '">' + (f ? r.title[0] : r.title) + "</div>" : ""; |
|||
return r.zIndex = s, t([r.shade ? '<div class="' + l.SHADE + '" id="' + l.SHADE + a + '" times="' + a + '" style="' + ("z-index:" + (s - 1) + "; ") + '"></div>' : "", '<div class="' + l[0] + (" layui-layer-" + o.type[r.type]) + (0 != r.type && 2 != r.type || r.shade ? "" : " layui-layer-border") + " " + (r.skin || "") + '" id="' + l[0] + a + '" type="' + o.type[r.type] + '" times="' + a + '" showtime="' + r.time + '" conType="' + (e ? "object" : "string") + '" style="z-index: ' + s + "; width:" + r.area[0] + ";height:" + r.area[1] + ";position:" + (r.fixed ? "fixed;" : "absolute;") + '">' + (e && 2 != r.type ? "" : u) + '<div id="' + (r.id || "") + '" class="layui-layer-content' + (0 == r.type && r.icon !== -1 ? " layui-layer-padding" : "") + (3 == r.type ? " layui-layer-loading" + r.icon : "") + '">' + (0 == r.type && r.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico' + r.icon + '"></i>' : "") + (1 == r.type && e ? "" : r.content || "") + '</div><span class="layui-layer-setwin">' + function () { |
|||
var e = c ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : ""; |
|||
return r.closeBtn && (e += '<a class="layui-layer-ico ' + l[7] + " " + l[7] + (r.title ? r.closeBtn : 4 == r.type ? "1" : "2") + '" href="javascript:;"></a>'), e |
|||
}() + "</span>" + (r.btn ? function () { |
|||
var e = ""; |
|||
"string" == typeof r.btn && (r.btn = [r.btn]); |
|||
for (var t = 0, i = r.btn.length; t < i; t++) e += '<a class="' + l[6] + t + '">' + r.btn[t] + "</a>"; |
|||
return '<div class="' + l[6] + " layui-layer-btn-" + (r.btnAlign || "") + '">' + e + "</div>" |
|||
}() : "") + (r.resize ? '<span class="layui-layer-resize"></span>' : "") + "</div>"], u, i('<div class="' + l.MOVE + '" id="' + l.MOVE + '"></div>')), n |
|||
}, s.pt.creat = function () { |
|||
var e = this, t = e.config, a = e.index, s = t.content, f = "object" == typeof s, c = i("body"); |
|||
if (!t.id || !i("#" + t.id)[0]) { |
|||
switch ("string" == typeof t.area && (t.area = "auto" === t.area ? ["", ""] : [t.area, ""]), t.shift && (t.anim = t.shift), 6 == r.ie && (t.fixed = !1), t.type) { |
|||
case 0: |
|||
t.btn = "btn" in t ? t.btn : o.btn[0], r.closeAll("dialog"); |
|||
break; |
|||
case 2: |
|||
var s = t.content = f ? t.content : [t.content || "", "auto"]; |
|||
t.content = '<iframe scrolling="' + (t.content[1] || "auto") + '" allowtransparency="true" id="' + l[4] + a + '" name="' + l[4] + a + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + t.content[0] + '"></iframe>'; |
|||
break; |
|||
case 3: |
|||
delete t.title, delete t.closeBtn, t.icon === -1 && 0 === t.icon, r.closeAll("loading"); |
|||
break; |
|||
case 4: |
|||
f || (t.content = [t.content, "body"]), t.follow = t.content[1], t.content = t.content[0] + '<i class="layui-layer-TipsG"></i>', delete t.title, t.tips = "object" == typeof t.tips ? t.tips : [t.tips, !0], t.tipsMore || r.closeAll("tips") |
|||
} |
|||
if (e.vessel(f, function (n, r, u) { |
|||
c.append(n[0]), f ? function () { |
|||
2 == t.type || 4 == t.type ? function () { |
|||
i("body").append(n[1]) |
|||
}() : function () { |
|||
s.parents("." + l[0])[0] || (s.data("display", s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]), i("#" + l[0] + a).find("." + l[5]).before(r)) |
|||
}() |
|||
}() : c.append(n[1]), i("#" + l.MOVE)[0] || c.append(o.moveElem = u), e.layero = i("#" + l[0] + a), e.shadeo = i("#" + l.SHADE + a), t.scrollbar || l.html.css("overflow", "hidden").attr("layer-full", a) |
|||
}).auto(a), e.shadeo.css({ |
|||
"background-color": t.shade[1] || "#000", |
|||
opacity: t.shade[0] || t.shade |
|||
}), 2 == t.type && 6 == r.ie && e.layero.find("iframe").attr("src", s[0]), 4 == t.type ? e.tips() : function () { |
|||
e.offset(), parseInt(o.getStyle(document.getElementById(l.MOVE), "z-index")) || function () { |
|||
e.layero.css("visibility", "hidden"), r.ready(function () { |
|||
e.offset(), e.layero.css("visibility", "visible") |
|||
}) |
|||
}() |
|||
}(), t.fixed && n.on("resize", function () { |
|||
e.offset(), (/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(a), 4 == t.type && e.tips() |
|||
}), t.time <= 0 || setTimeout(function () { |
|||
r.close(e.index) |
|||
}, t.time), e.move().callback(), l.anim[t.anim]) { |
|||
var u = "layer-anim " + l.anim[t.anim]; |
|||
e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function () { |
|||
i(this).removeClass(u) |
|||
}) |
|||
} |
|||
t.isOutAnim && e.layero.data("isOutAnim", !0) |
|||
} |
|||
}, s.pt.auto = function (e) { |
|||
var t = this, a = t.config, o = i("#" + l[0] + e); |
|||
"" === a.area[0] && a.maxWidth > 0 && (r.ie && r.ie < 8 && a.btn && o.width(o.innerWidth()), o.outerWidth() > a.maxWidth && o.width(a.maxWidth)); |
|||
var s = [o.innerWidth(), o.innerHeight()], f = o.find(l[1]).outerHeight() || 0, |
|||
c = o.find("." + l[6]).outerHeight() || 0, u = function (e) { |
|||
e = o.find(e), e.height(s[1] - f - c - 2 * (0 | parseFloat(e.css("padding-top")))) |
|||
}; |
|||
switch (a.type) { |
|||
case 2: |
|||
u("iframe"); |
|||
break; |
|||
default: |
|||
"" === a.area[1] ? a.maxHeight > 0 && o.outerHeight() > a.maxHeight ? (s[1] = a.maxHeight, u("." + l[5])) : a.fixed && s[1] >= n.height() && (s[1] = n.height(), u("." + l[5])) : u("." + l[5]) |
|||
} |
|||
return t |
|||
}, s.pt.offset = function () { |
|||
var e = this, t = e.config, i = e.layero, a = [i.outerWidth(), i.outerHeight()], |
|||
o = "object" == typeof t.offset; |
|||
e.offsetTop = (n.height() - a[1]) / 2, e.offsetLeft = (n.width() - a[0]) / 2, o ? (e.offsetTop = t.offset[0], e.offsetLeft = t.offset[1] || e.offsetLeft) : "auto" !== t.offset && ("t" === t.offset ? e.offsetTop = 0 : "r" === t.offset ? e.offsetLeft = n.width() - a[0] : "b" === t.offset ? e.offsetTop = n.height() - a[1] : "l" === t.offset ? e.offsetLeft = 0 : "lt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = 0) : "lb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = 0) : "rt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = n.width() - a[0]) : "rb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = n.width() - a[0]) : e.offsetTop = t.offset), t.fixed || (e.offsetTop = /%$/.test(e.offsetTop) ? n.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop), e.offsetLeft = /%$/.test(e.offsetLeft) ? n.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft), e.offsetTop += n.scrollTop(), e.offsetLeft += n.scrollLeft()), i.attr("minLeft") && (e.offsetTop = n.height() - (i.find(l[1]).outerHeight() || 0), e.offsetLeft = i.css("left")), i.css({ |
|||
top: e.offsetTop, |
|||
left: e.offsetLeft |
|||
}) |
|||
}, s.pt.tips = function () { |
|||
var e = this, t = e.config, a = e.layero, o = [a.outerWidth(), a.outerHeight()], r = i(t.follow); |
|||
r[0] || (r = i("body")); |
|||
var s = {width: r.outerWidth(), height: r.outerHeight(), top: r.offset().top, left: r.offset().left}, |
|||
f = a.find(".layui-layer-TipsG"), c = t.tips[0]; |
|||
t.tips[1] || f.remove(), s.autoLeft = function () { |
|||
s.left + o[0] - n.width() > 0 ? (s.tipLeft = s.left + s.width - o[0], f.css({ |
|||
right: 12, |
|||
left: "auto" |
|||
})) : s.tipLeft = s.left |
|||
}, s.where = [function () { |
|||
s.autoLeft(), s.tipTop = s.top - o[1] - 10, f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", t.tips[1]) |
|||
}, function () { |
|||
s.tipLeft = s.left + s.width + 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", t.tips[1]) |
|||
}, function () { |
|||
s.autoLeft(), s.tipTop = s.top + s.height + 10, f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", t.tips[1]) |
|||
}, function () { |
|||
s.tipLeft = s.left - o[0] - 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", t.tips[1]) |
|||
}], s.where[c - 1](), 1 === c ? s.top - (n.scrollTop() + o[1] + 16) < 0 && s.where[2]() : 2 === c ? n.width() - (s.left + s.width + o[0] + 16) > 0 || s.where[3]() : 3 === c ? s.top - n.scrollTop() + s.height + o[1] + 16 - n.height() > 0 && s.where[0]() : 4 === c && o[0] + 16 - s.left > 0 && s.where[1](), a.find("." + l[5]).css({ |
|||
"background-color": t.tips[1], |
|||
"padding-right": t.closeBtn ? "30px" : "" |
|||
}), a.css({left: s.tipLeft - (t.fixed ? n.scrollLeft() : 0), top: s.tipTop - (t.fixed ? n.scrollTop() : 0)}) |
|||
}, s.pt.move = function () { |
|||
var e = this, t = e.config, a = i(document), s = e.layero, l = s.find(t.move), |
|||
f = s.find(".layui-layer-resize"), c = {}; |
|||
return t.move && l.css("cursor", "move"), l.on("mousedown", function (e) { |
|||
e.preventDefault(), t.move && (c.moveStart = !0, c.offset = [e.clientX - parseFloat(s.css("left")), e.clientY - parseFloat(s.css("top"))], o.moveElem.css("cursor", "move").show()) |
|||
}), f.on("mousedown", function (e) { |
|||
e.preventDefault(), c.resizeStart = !0, c.offset = [e.clientX, e.clientY], c.area = [s.outerWidth(), s.outerHeight()], o.moveElem.css("cursor", "se-resize").show() |
|||
}), a.on("mousemove", function (i) { |
|||
if (c.moveStart) { |
|||
var a = i.clientX - c.offset[0], o = i.clientY - c.offset[1], l = "fixed" === s.css("position"); |
|||
if (i.preventDefault(), c.stX = l ? 0 : n.scrollLeft(), c.stY = l ? 0 : n.scrollTop(), !t.moveOut) { |
|||
var f = n.width() - s.outerWidth() + c.stX, u = n.height() - s.outerHeight() + c.stY; |
|||
a < c.stX && (a = c.stX), a > f && (a = f), o < c.stY && (o = c.stY), o > u && (o = u) |
|||
} |
|||
s.css({left: a, top: o}) |
|||
} |
|||
if (t.resize && c.resizeStart) { |
|||
var a = i.clientX - c.offset[0], o = i.clientY - c.offset[1]; |
|||
i.preventDefault(), r.style(e.index, { |
|||
width: c.area[0] + a, |
|||
height: c.area[1] + o |
|||
}), c.isResize = !0, t.resizing && t.resizing(s) |
|||
} |
|||
}).on("mouseup", function (e) { |
|||
c.moveStart && (delete c.moveStart, o.moveElem.hide(), t.moveEnd && t.moveEnd(s)), c.resizeStart && (delete c.resizeStart, o.moveElem.hide()) |
|||
}), e |
|||
}, s.pt.callback = function () { |
|||
function e() { |
|||
var e = a.cancel && a.cancel(t.index, n); |
|||
e === !1 || r.close(t.index) |
|||
} |
|||
|
|||
var t = this, n = t.layero, a = t.config; |
|||
t.openLayer(), a.success && (2 == a.type ? n.find("iframe").on("load", function () { |
|||
a.success(n, t.index) |
|||
}) : a.success(n, t.index)), 6 == r.ie && t.IE6(n), n.find("." + l[6]).children("a").on("click", function () { |
|||
var e = i(this).index(); |
|||
if (0 === e) a.yes ? a.yes(t.index, n) : a.btn1 ? a.btn1(t.index, n) : r.close(t.index); else { |
|||
var o = a["btn" + (e + 1)] && a["btn" + (e + 1)](t.index, n); |
|||
o === !1 || r.close(t.index) |
|||
} |
|||
}), n.find("." + l[7]).on("click", e), a.shadeClose && t.shadeo.on("click", function () { |
|||
r.close(t.index) |
|||
}), n.find(".layui-layer-min").on("click", function () { |
|||
var e = a.min && a.min(n, t.index); |
|||
e === !1 || r.min(t.index, a) |
|||
}), n.find(".layui-layer-max").on("click", function () { |
|||
i(this).hasClass("layui-layer-maxmin") ? (r.restore(t.index), a.restore && a.restore(n, t.index)) : (r.full(t.index, a), setTimeout(function () { |
|||
a.full && a.full(n, t.index) |
|||
}, 100)) |
|||
}), a.end && (o.end[t.index] = a.end) |
|||
}, o.reselect = function () { |
|||
i.each(i("select"), function (e, t) { |
|||
var n = i(this); |
|||
n.parents("." + l[0])[0] || 1 == n.attr("layer") && i("." + l[0]).length < 1 && n.removeAttr("layer").show(), n = null |
|||
}) |
|||
}, s.pt.IE6 = function (e) { |
|||
i("select").each(function (e, t) { |
|||
var n = i(this); |
|||
n.parents("." + l[0])[0] || "none" === n.css("display") || n.attr({layer: "1"}).hide(), n = null |
|||
}) |
|||
}, s.pt.openLayer = function () { |
|||
var e = this; |
|||
r.zIndex = e.config.zIndex, r.setTop = function (e) { |
|||
var t = function () { |
|||
r.zIndex++, e.css("z-index", r.zIndex + 1) |
|||
}; |
|||
return r.zIndex = parseInt(e[0].style.zIndex), e.on("mousedown", t), r.zIndex |
|||
} |
|||
}, o.record = function (e) { |
|||
var t = [e.width(), e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))]; |
|||
e.find(".layui-layer-max").addClass("layui-layer-maxmin"), e.attr({area: t}) |
|||
}, o.rescollbar = function (e) { |
|||
l.html.attr("layer-full") == e && (l.html[0].style.removeProperty ? l.html[0].style.removeProperty("overflow") : l.html[0].style.removeAttribute("overflow"), l.html.removeAttr("layer-full")) |
|||
}, e.layer = r, r.getChildFrame = function (e, t) { |
|||
return t = t || i("." + l[4]).attr("times"), i("#" + l[0] + t).find("iframe").contents().find(e) |
|||
}, r.getFrameIndex = function (e) { |
|||
return i("#" + e).parents("." + l[4]).attr("times") |
|||
}, r.iframeAuto = function (e) { |
|||
if (e) { |
|||
var t = r.getChildFrame("html", e).outerHeight(), n = i("#" + l[0] + e), |
|||
a = n.find(l[1]).outerHeight() || 0, o = n.find("." + l[6]).outerHeight() || 0; |
|||
n.css({height: t + a + o}), n.find("iframe").css({height: t}) |
|||
} |
|||
}, r.iframeSrc = function (e, t) { |
|||
i("#" + l[0] + e).find("iframe").attr("src", t) |
|||
}, r.style = function (e, t, n) { |
|||
var a = i("#" + l[0] + e), r = a.find(".layui-layer-content"), s = a.attr("type"), |
|||
f = a.find(l[1]).outerHeight() || 0, c = a.find("." + l[6]).outerHeight() || 0; |
|||
a.attr("minLeft"); |
|||
s !== o.type[3] && s !== o.type[4] && (n || (parseFloat(t.width) <= 260 && (t.width = 260), parseFloat(t.height) - f - c <= 64 && (t.height = 64 + f + c)), a.css(t), c = a.find("." + l[6]).outerHeight(), s === o.type[2] ? a.find("iframe").css({height: parseFloat(t.height) - f - c}) : r.css({height: parseFloat(t.height) - f - c - parseFloat(r.css("padding-top")) - parseFloat(r.css("padding-bottom"))})) |
|||
}, r.min = function (e, t) { |
|||
t = t || {}; |
|||
var a = i("#" + l[0] + e), s = i("#" + l.SHADE + e), f = a.find(l[1]).outerHeight() || 0, |
|||
c = a.attr("minLeft") || 181 * o.minIndex + "px", u = a.css("position"), |
|||
d = {width: 180, height: f, position: "fixed", overflow: "hidden"}; |
|||
o.record(a), o.minLeft[0] && (c = o.minLeft[0], o.minLeft.shift()), t.minStack && (d.left = c, d.top = n.height() - f, a.attr("minLeft") || o.minIndex++, a.attr("minLeft", c)), a.attr("position", u), r.style(e, d, !0), a.find(".layui-layer-min").hide(), "page" === a.attr("type") && a.find(l[4]).hide(), o.rescollbar(e), s.hide() |
|||
}, r.restore = function (e) { |
|||
var t = i("#" + l[0] + e), n = i("#" + l.SHADE + e), a = t.attr("area").split(","); |
|||
t.attr("type"); |
|||
r.style(e, { |
|||
width: parseFloat(a[0]), |
|||
height: parseFloat(a[1]), |
|||
top: parseFloat(a[2]), |
|||
left: parseFloat(a[3]), |
|||
position: t.attr("position"), |
|||
overflow: "visible" |
|||
}, !0), t.find(".layui-layer-max").removeClass("layui-layer-maxmin"), t.find(".layui-layer-min").show(), "page" === t.attr("type") && t.find(l[4]).show(), o.rescollbar(e), n.show() |
|||
}, r.full = function (e) { |
|||
var t, a = i("#" + l[0] + e); |
|||
o.record(a), l.html.attr("layer-full") || l.html.css("overflow", "hidden").attr("layer-full", e), clearTimeout(t), t = setTimeout(function () { |
|||
var t = "fixed" === a.css("position"); |
|||
r.style(e, { |
|||
top: t ? 0 : n.scrollTop(), |
|||
left: t ? 0 : n.scrollLeft(), |
|||
width: n.width(), |
|||
height: n.height() |
|||
}, !0), a.find(".layui-layer-min").hide() |
|||
}, 100) |
|||
}, r.title = function (e, t) { |
|||
var n = i("#" + l[0] + (t || r.index)).find(l[1]); |
|||
n.html(e) |
|||
}, r.close = function (e, t) { |
|||
var n = i("#" + l[0] + e), a = n.attr("type"), s = "layer-anim-close"; |
|||
if (n[0]) { |
|||
var f = "layui-layer-wrap", c = function () { |
|||
if (a === o.type[1] && "object" === n.attr("conType")) { |
|||
n.children(":not(." + l[5] + ")").remove(); |
|||
for (var r = n.find("." + f), s = 0; s < 2; s++) r.unwrap(); |
|||
r.css("display", r.data("display")).removeClass(f) |
|||
} else { |
|||
if (a === o.type[2]) try { |
|||
var c = i("#" + l[4] + e)[0]; |
|||
c.contentWindow.document.write(""), c.contentWindow.close(), n.find("." + l[5])[0].removeChild(c) |
|||
} catch (u) { |
|||
} |
|||
n[0].innerHTML = "", n.remove() |
|||
} |
|||
"function" == typeof o.end[e] && o.end[e](), delete o.end[e], "function" == typeof t && t() |
|||
}; |
|||
n.data("isOutAnim") && n.addClass("layer-anim " + s), i("#layui-layer-moves, #" + l.SHADE + e).remove(), 6 == r.ie && o.reselect(), o.rescollbar(e), n.attr("minLeft") && (o.minIndex--, o.minLeft.push(n.attr("minLeft"))), r.ie && r.ie < 10 || !n.data("isOutAnim") ? c() : setTimeout(function () { |
|||
c() |
|||
}, 200) |
|||
} |
|||
}, r.closeAll = function (e, t) { |
|||
"function" == typeof e && (t = e, e = null); |
|||
var n = i("." + l[0]); |
|||
i.each(n, function (a) { |
|||
var o = i(this), s = e ? o.attr("type") === e : 1; |
|||
s && r.close(o.attr("times"), a === n.length - 1 ? t : null), s = null |
|||
}), 0 === n.length && "function" == typeof t && t() |
|||
}; |
|||
var f = r.cache || {}, c = function (e) { |
|||
return f.skin ? " " + f.skin + " " + f.skin + "-" + e : "" |
|||
}; |
|||
r.prompt = function (e, t) { |
|||
var a = ""; |
|||
if (e = e || {}, "function" == typeof e && (t = e), e.area) { |
|||
var o = e.area; |
|||
a = 'style="width: ' + o[0] + "; height: " + o[1] + ';"', delete e.area |
|||
} |
|||
var s, l = 2 == e.formType ? '<textarea class="layui-layer-input"' + a + "></textarea>" : function () { |
|||
return '<input type="' + (1 == e.formType ? "password" : "text") + '" class="layui-layer-input">' |
|||
}(), f = e.success; |
|||
return delete e.success, r.open(i.extend({ |
|||
type: 1, |
|||
btn: ["确定", "取消"], |
|||
content: l, |
|||
skin: "layui-layer-prompt" + c("prompt"), |
|||
maxWidth: n.width(), |
|||
success: function (t) { |
|||
s = t.find(".layui-layer-input"), s.val(e.value || "").focus(), "function" == typeof f && f(t) |
|||
}, |
|||
resize: !1, |
|||
yes: function (i) { |
|||
var n = s.val(); |
|||
"" === n ? s.focus() : n.length > (e.maxlength || 500) ? r.tips("最多输入" + (e.maxlength || 500) + "个字数", s, {tips: 1}) : t && t(n, i, s) |
|||
} |
|||
}, e)) |
|||
}, r.tab = function (e) { |
|||
e = e || {}; |
|||
var t = e.tab || {}, n = "layui-this", a = e.success; |
|||
return delete e.success, r.open(i.extend({ |
|||
type: 1, |
|||
skin: "layui-layer-tab" + c("tab"), |
|||
resize: !1, |
|||
title: function () { |
|||
var e = t.length, i = 1, a = ""; |
|||
if (e > 0) for (a = '<span class="' + n + '">' + t[0].title + "</span>"; i < e; i++) a += "<span>" + t[i].title + "</span>"; |
|||
return a |
|||
}(), |
|||
content: '<ul class="layui-layer-tabmain">' + function () { |
|||
var e = t.length, i = 1, a = ""; |
|||
if (e > 0) for (a = '<li class="layui-layer-tabli ' + n + '">' + (t[0].content || "no content") + "</li>"; i < e; i++) a += '<li class="layui-layer-tabli">' + (t[i].content || "no content") + "</li>"; |
|||
return a |
|||
}() + "</ul>", |
|||
success: function (t) { |
|||
var o = t.find(".layui-layer-title").children(), r = t.find(".layui-layer-tabmain").children(); |
|||
o.on("mousedown", function (t) { |
|||
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0; |
|||
var a = i(this), o = a.index(); |
|||
a.addClass(n).siblings().removeClass(n), r.eq(o).show().siblings().hide(), "function" == typeof e.change && e.change(o) |
|||
}), "function" == typeof a && a(t) |
|||
} |
|||
}, e)) |
|||
}, r.photos = function (t, n, a) { |
|||
function o(e, t, i) { |
|||
var n = new Image; |
|||
return n.src = e, n.complete ? t(n) : (n.onload = function () { |
|||
n.onload = null, t(n) |
|||
}, void (n.onerror = function (e) { |
|||
n.onerror = null, i(e) |
|||
})) |
|||
} |
|||
|
|||
var s = {}; |
|||
if (t = t || {}, t.photos) { |
|||
var l = !("string" == typeof t.photos || t.photos instanceof i), f = l ? t.photos : {}, u = f.data || [], |
|||
d = f.start || 0; |
|||
s.imgIndex = (0 | d) + 1, t.img = t.img || "img"; |
|||
var y = t.success; |
|||
if (delete t.success, l) { |
|||
if (0 === u.length) return r.msg("没有图片") |
|||
} else { |
|||
var p = i(t.photos), h = function () { |
|||
u = [], p.find(t.img).each(function (e) { |
|||
var t = i(this); |
|||
t.attr("layer-index", e), u.push({ |
|||
alt: t.attr("alt"), |
|||
pid: t.attr("layer-pid"), |
|||
src: t.attr("layer-src") || t.attr("src"), |
|||
thumb: t.attr("src") |
|||
}) |
|||
}) |
|||
}; |
|||
if (h(), 0 === u.length) return; |
|||
if (n || p.on("click", t.img, function () { |
|||
h(); |
|||
var e = i(this), n = e.attr("layer-index"); |
|||
r.photos(i.extend(t, {photos: {start: n, data: u, tab: t.tab}, full: t.full}), !0) |
|||
}), !n) return |
|||
} |
|||
s.imgprev = function (e) { |
|||
s.imgIndex--, s.imgIndex < 1 && (s.imgIndex = u.length), s.tabimg(e) |
|||
}, s.imgnext = function (e, t) { |
|||
s.imgIndex++, s.imgIndex > u.length && (s.imgIndex = 1, t) || s.tabimg(e) |
|||
}, s.keyup = function (e) { |
|||
if (!s.end) { |
|||
var t = e.keyCode; |
|||
e.preventDefault(), 37 === t ? s.imgprev(!0) : 39 === t ? s.imgnext(!0) : 27 === t && r.close(s.index) |
|||
} |
|||
}, s.tabimg = function (e) { |
|||
if (!(u.length <= 1)) return f.start = s.imgIndex - 1, r.close(s.index), r.photos(t, !0, e) |
|||
}, s.event = function () { |
|||
s.bigimg.find(".layui-layer-imgprev").on("click", function (e) { |
|||
e.preventDefault(), s.imgprev(!0) |
|||
}), s.bigimg.find(".layui-layer-imgnext").on("click", function (e) { |
|||
e.preventDefault(), s.imgnext(!0) |
|||
}), i(document).on("keyup", s.keyup) |
|||
}, s.loadi = r.load(1, {shade: !("shade" in t) && .9, scrollbar: !1}), o(u[d].src, function (n) { |
|||
r.close(s.loadi), a && (t.anim = -1), s.index = r.open(i.extend({ |
|||
type: 1, |
|||
id: "layui-layer-photos", |
|||
area: function () { |
|||
var a = [n.width, n.height], o = [i(e).width() - 100, i(e).height() - 100]; |
|||
if (!t.full && (a[0] > o[0] || a[1] > o[1])) { |
|||
var r = [a[0] / o[0], a[1] / o[1]]; |
|||
r[0] > r[1] ? (a[0] = a[0] / r[0], a[1] = a[1] / r[0]) : r[0] < r[1] && (a[0] = a[0] / r[1], a[1] = a[1] / r[1]) |
|||
} |
|||
return [a[0] + "px", a[1] + "px"] |
|||
}(), |
|||
title: !1, |
|||
shade: .9, |
|||
shadeClose: !0, |
|||
closeBtn: !1, |
|||
move: ".layui-layer-phimg img", |
|||
moveType: 1, |
|||
scrollbar: !1, |
|||
moveOut: !0, |
|||
anim: 5, |
|||
isOutAnim: !1, |
|||
skin: "layui-layer-photos" + c("photos"), |
|||
content: '<div class="layui-layer-phimg"><img src="' + u[d].src + '" alt="' + (u[d].alt || "") + '" layer-pid="' + u[d].pid + '">' + function () { |
|||
return u.length > 1 ? '<div class="layui-layer-imgsee"><span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span><div class="layui-layer-imgbar" style="display:' + (a ? "block" : "") + '"><span class="layui-layer-imgtit"><a href="javascript:;">' + (u[d].alt || "") + "</a><em>" + s.imgIndex + " / " + u.length + "</em></span></div></div>" : "" |
|||
}() + "</div>", |
|||
success: function (e, i) { |
|||
s.bigimg = e.find(".layui-layer-phimg"), s.imgsee = e.find(".layui-layer-imgbar"), s.event(e), t.tab && t.tab(u[d], e), "function" == typeof y && y(e) |
|||
}, |
|||
end: function () { |
|||
s.end = !0, i(document).off("keyup", s.keyup) |
|||
} |
|||
}, t)) |
|||
}, function () { |
|||
r.close(s.loadi), r.msg("当前图片地址异常<br>是否继续查看下一张?", { |
|||
time: 3e4, |
|||
btn: ["下一张", "不看了"], |
|||
yes: function () { |
|||
u.length > 1 && s.imgnext(!0, !0) |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
}, o.run = function (t) { |
|||
i = t, n = i(e), l.html = i("html"), r.open = function (e) { |
|||
var t = new s(e); |
|||
return t.index |
|||
} |
|||
}, e.layui && layui.define ? (r.ready(), layui.define("jquery", function (t) { |
|||
r.path = layui.cache.dir, o.run(layui.$), e.layer = r, t("layer", r) |
|||
})) : "function" == typeof define && define.amd ? define(["jquery"], function () { |
|||
return o.run(e.jQuery), r |
|||
}) : function () { |
|||
r.ready(), o.run(e.jQuery) |
|||
}() |
|||
}(window); |
|||