提交 18d950fc 编写于 作者: doc_wei's avatar doc_wei

ERP仓库人员选择整改

上级 f89e0c97
var userReturnList = new Array();//选择用户返回的集合或者进行回显的集合
var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含
var chooseOrNotEmail = "1";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
var checkType = "1";//人员选择类型,1.多选;其他。单选
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -48,7 +43,7 @@ layui.config({
}
AjaxPostUtil.request({url: flowableBasePath + "storehouse002", params: params, type: 'json', callback: function(json){
if(json.returnCode == 0){
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
}else{
......@@ -78,30 +73,17 @@ layui.config({
}
});
//仓库负责人选择
$("body").on("click", "#principalUserIdSelPeople", function(e){
userReturnList = [].concat(chooseUser);
_openNewWindows({
url: "../../tpl/common/sysusersel.html",
title: "人员选择",
pageId: "sysuserselpage",
area: ['80vw', '80vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
//移除所有tag
var tags = $('#principal').tagEditor('getTags')[0].tags;
for (i = 0; i < tags.length; i++) {
$('#principal').tagEditor('removeTag', tags[i]);
}
chooseUser = [].concat(userReturnList);
//添加新的tag
$.each(chooseUser, function(i, item){
$('#principal').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
// 仓库负责人选择
$("body").on("click", "#principalUserIdSelPeople", function(e) {
systemCommonUtil.userReturnList = [].concat(chooseUser);
systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil.chooseOrNotEmail = "1"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (staffChooseList) {
chooseUser = [].concat(staffChooseList);
// 重置数据
systemCommonUtil.tagEditorResetData('principal', chooseUser);
});
});
$("body").on("click", "#cancle", function(){
......
var userReturnList = new Array();//选择用户返回的集合或者进行回显的集合
var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含
var chooseOrNotEmail = "1";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
var checkType = "1";//人员选择类型,1.多选;其他。单选
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -23,17 +18,18 @@ layui.config({
url: flowableBasePath + "storehouse003",
params: {rowId: parent.rowId},
pagination: false,
method: 'GET',
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb){
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter:function(json){
ajaxSendAfter: function(json) {
//设置是否默认
$("input:radio[name=isDefault][value=" + json.bean.isDefault + "]").attr("checked", true);
//仓库负责人
var userNames = [];
chooseUser = [].concat(json.bean.chooseUser);
$.each(chooseUser, function(i, item){
$.each(chooseUser, function(i, item) {
userNames.push(item.name);
});
......@@ -78,7 +74,7 @@ layui.config({
};
//仓库负责人
if(chooseUser.length > 0 && !isNull($('#principal').tagEditor('getTags')[0].tags)){
if(chooseUser.length > 0 && !isNull($('#principal').tagEditor('getTags')[0].tags)) {
var userId = "";
$.each(chooseUser, function (i, item) {
userId += item.id + ',';
......@@ -86,11 +82,11 @@ layui.config({
params.principal = userId;
}
AjaxPostUtil.request({url: flowableBasePath + "storehouse005", params: params, type: 'json', callback: function(json){
if(json.returnCode == 0){
AjaxPostUtil.request({url: flowableBasePath + "storehouse005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
}else{
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
......@@ -100,30 +96,16 @@ layui.config({
}
});
//仓库负责人选择
$("body").on("click", "#principalUserIdSelPeople", function(e){
userReturnList = [].concat(chooseUser);
_openNewWindows({
url: "../../tpl/common/sysusersel.html",
title: "人员选择",
pageId: "sysuserselpage",
area: ['80vw', '80vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
//移除所有tag
var tags = $('#principal').tagEditor('getTags')[0].tags;
for (i = 0; i < tags.length; i++) {
$('#principal').tagEditor('removeTag', tags[i]);
}
chooseUser = [].concat(userReturnList);
//添加新的tag
$.each(chooseUser, function(i, item){
$('#principal').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
// 仓库负责人选择
$("body").on("click", "#principalUserIdSelPeople", function(e) {
systemCommonUtil.userReturnList = [].concat(chooseUser);
systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil.chooseOrNotEmail = "1"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (staffChooseList) {
// 重置数据
chooseUser = [].concat(systemCommonUtil.tagEditorResetData('principal', staffChooseList));
});
});
$("body").on("click", "#cancle", function(){
......
......@@ -41,7 +41,7 @@
<label class="layui-form-label">负责人</label>
<div class="layui-input-block ver-center">
{{#each chooseUser}}
{{name}}
<span class="layui-badge layui-bg-blue skyeye-badge">{{name}}</span>
{{/each}}
</div>
</div>
......
......@@ -7,45 +7,45 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">仓库名称</label>
<div class="layui-input-inline">
<input type="text" id="houseName" name="houseName" placeholder="请输入仓库名称" class="layui-input" />
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">仓库名称</label>
<div class="layui-input-inline">
<input type="text" id="houseName" name="houseName" placeholder="请输入仓库名称" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1568523956068"><i class="fa fa-plus" aria-hidden="true"></i>新增仓库</button>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1568523956068"><i class="fa fa-plus" aria-hidden="true"></i>新增仓库</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1568524015623')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1568523987812')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# if(d.isDefault == 2 && auth('1568526024398')){ }}
<a class="layui-btn layui-btn-xs" lay-event="default">设置默认</a>
{{# } }}
<script type="text/html" id="tableBar">
{{# if(auth('1568524015623')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1568523987812')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# if(d.isDefault == 2 && auth('1568526024398')){ }}
<a class="layui-btn layui-btn-xs" lay-event="default">设置默认</a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/storehouse/'}).use('storehouselist');
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/storehouse/'}).use('storehouselist');
</script>
</body>
</html>
\ No newline at end of file
......@@ -283,13 +283,28 @@ var systemCommonUtil = {
*
* @param id 对象id
*/
tagEditorRemoveAll: function(id){
tagEditorRemoveAll: function(id) {
var tags = $('#' + id).tagEditor('getTags')[0].tags;
for (i = 0; i < tags.length; i++) {
$('#' + id).tagEditor('removeTag', tags[i]);
}
},
/**
* tagEditor组件重置数据
*
* @param id 对象id
*/
tagEditorResetData: function(id, data) {
// 移除所有tag
systemCommonUtil.tagEditorRemoveAll(id);
// 添加新的tag
$.each(data, function(i, item){
$('#' + id).tagEditor('addTag', item.name);
});
return data;
},
/**
* 表格禁止指定行数据选择
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册