Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
f47030fd
Commit
f47030fd
authored
Nov 24, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并组织人员
parent
e73b6031
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
460 additions
and
5 deletions
+460
-5
orgunitlist.html
...main/webapp/WEB-INF/views/managerorgunit/orgunitlist.html
+455
-0
qyuseradd.html
...rc/main/webapp/WEB-INF/views/managerqyuser/qyuseradd.html
+5
-5
No files found.
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerorgunit/orgunitlist.html
View file @
f47030fd
...
...
@@ -62,6 +62,29 @@
</h1>
</section>
<!-- 设置峰值弹出窗 -->
<div
id=
"peakButtom"
class=
"modal fade"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
>
设置峰值
</h4>
</div>
<!-- dialog body -->
<div
class=
"modal-body"
>
<input
type=
"number"
class=
"form-control select2"
id=
"peakVal"
name=
"peakVal"
oninput=
"if(value<=0)value=0"
onchange=
"updateCount(this)"
placeholder=
"请输入一个正整数"
></input>
<input
type=
"hidden"
id=
"peakId"
>
</div>
<div
style=
"text-align: center;padding-bottom: 20px;"
>
<button
style=
"width: 100px;"
type=
"button"
class=
"btn btn-primary"
onclick=
"submitPeakVal()"
>
确定
</button>
<button
style=
"width: 100px;"
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
aria-label=
"Close"
>
取消
</button>
</div>
<!-- dialog buttons -->
</div>
</div>
</div>
<!-- Main content -->
<section
class=
"content"
>
...
...
@@ -145,8 +168,101 @@
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- 人员信息 -->
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<form
id=
"seachTableFormPeople"
method=
"get"
action=
"#springUrl('/a/qyuser/exportExcel')"
onkeydown=
"if(event.keyCode==13){return false;}"
>
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
查询窗口
</h3>
<div
class=
"box-tools pull-right"
>
<button
class=
"searchPeople btn btn-primary"
type=
"button"
>
搜索
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
导出
</button>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
class=
"fa fa-minus"
></i>
</button>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"form-group col-md-4"
>
<label
class=
"control-label"
>
人员名称
</label>
<input
type=
"text"
class=
"form-control required"
name=
"name"
placeholder=
"人员名称"
>
</div>
<div
class=
"form-group col-md-4"
>
<label
class=
"control-label"
>
手机号
</label>
<input
type=
"text"
class=
"form-control required"
name=
"mobile"
placeholder=
"手机号"
>
</div>
<div
class=
"form-group col-md-4"
>
<label
class=
"control-label"
>
部门
</label>
<input
type=
"text"
class=
"form-control required"
name=
"description"
placeholder=
"部门"
>
</div>
<div
class=
""
style=
"display: none"
>
<input
type=
"text"
class=
"form-control required"
name=
"orgId"
id=
"orgidPeople"
placeholder=
"组织Id"
>
</div>
</div>
</div>
</form>
</div>
</div>
<input
name=
"bindProId"
id=
"bindProId"
style=
"display:none"
>
<input
name=
"bindProName"
id=
"bindProName"
style=
"display:none"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box box-primary"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
></h3>
<div
class=
"box-tools pull-right"
>
#if($shiro.hasPermission("sys:qyuser:edit"))
<!--<a onclick="syncWx();" class="btn btn-success">同步微信</a>-->
<a
href=
"#springUrl('/a/qyuser/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
</div>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"example2People"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<th>
二维码
</th>
<th>
登录账号
</th>
<th>
姓名
</th>
<th>
手机号
</th>
<th>
邮箱
</th>
<th>
职位
</th>
<th>
峰值
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebodyPeople"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
</div>
<!-- /.row -->
</div>
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
...
...
@@ -275,8 +391,340 @@
});
}
//下面是人员
function
seachTablePeople
()
{
var
sSource
=
"#springUrl('/a/qyuser/listDataNoAuth')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableFormPeople input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
myDataTable
=
$
(
'#example2People'
).
DataTable
({
// scrollX: true,
// "sScrollY" : 400,
// sScrollX: "100%",
// bScrollCollapse: false,
// sScrollXInner: "150%",
// scrollCollapse: true,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[{
"mData"
:
"id"
},
{
"mData"
:
"qrcode"
},{
"mData"
:
"loginName"
},{
"mData"
:
"name"
},{
"mData"
:
"mobile"
},
{
"mData"
:
"email"
},{
"mData"
:
"userType"
},{
"mData"
:
"peakVal"
},
/* {
"mData": "storeName"
},{
"mData": "description"
},{
"mData": "fanssCount"
}, */
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},{
"aTargets"
:
[
1
],
"mData"
:
"qrcode"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示对应mData的值,c表示当前记录行对象
if
(
a
)
{
return
"<img src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="
+
a
+
"' style='width: 80px;height: 80px;'>"
;
}
return
"<font color='red'>未绑定</font>"
;
}
},{
"aTargets"
:
[
6
],
"mData"
:
"userType"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示对应mData的值,c表示当前记录行对象
var
postion
=
null
;
switch
(
a
)
{
case
"0"
:
postion
=
"其他"
;
break
;
case
"1"
:
postion
=
"药师"
;
break
;
case
"2"
:
postion
=
"客服"
;
break
;
case
"3"
:
postion
=
"医生"
;
break
;
case
"4"
:
postion
=
"订单员"
;
break
;
}
return
"<font color='blue'>"
+
postion
+
"</font>"
;
}
},{
"aTargets"
:
[
8
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
var
html
=
'#if($shiro.hasPermission("sys:qyuser:edit"))'
;
//
var
html
=
'<div class="btn-group">
\
n'
+
'<button type="button" class="btn btn-success btn-flat">操作</button>
\
n'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">
\
n'
+
'<span class="caret"></span>
\
n'
+
'<span class="sr-only">Toggle Dropdown</span>
\
n'
+
'</button>
\
n'
+
'<ul class="dropdown-menu" role="menu">
\
n'
;
html
+=
"<li><a href=#springUrl('/a/qyuser/form?id="
+
a
+
"') >修改</a></li>"
;
if
(
c
.
userType
==
'0'
||
c
.
userType
==
'1'
||
c
.
userType
==
'2'
)
{
html
+=
"<li><a href='javascript:bindQrCode("
+
a
+
", "
+
c
.
userType
+
")' >绑定二维码</a></li>"
;
if
(
c
.
qrcode
!=
null
)
html
+=
"<li><a href='javascript:unBindQrCode("
+
a
+
", "
+
c
.
userType
+
")' >取消绑定二维码</a></li>"
;
html
+=
"<li><a href='javascript:peakVal("
+
a
+
")' data-target='#foo'>设置患者分配峰值</a></li>"
;
}
html
+=
'<li><a href="javascript:removeDataPeople('
+
a
+
')" >删除</a></li>#end'
;
html
+=
'</ul></div>'
;
return
html
;
}
}]
});
}
//绑定门店二维码
function
bindQrCode
(
id
,
type
)
{
var
qrCodeUri
=
"#springUrl('/a/wxQrcode/listData?type="
+
type
+
"&isempty=1')"
;
var
bindQrcodeUri
=
"#springUrl('/a/qyuser/bindQrcode')"
;
Cfapp
.
f7
({
dataUrl
:
qrCodeUri
,
//导入的action Url
checkType
:
'single'
,
// 多选为multi
title
:
"绑定二维码"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'描述'
,
'场景值'
,
'创建时间'
],
isSearch
:
'1'
,
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"description"
},
{
"mData"
:
"sceneId"
},
{
"mData"
:
"createTime"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
'<input type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
name
+
'">'
;
}
},
{
"aTargets"
:
[
3
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
],
success
:
function
()
{
var
qrcodeId
=
$
(
'#bindProId'
).
val
();
if
(
qrcodeId
&&
qrcodeId
!==
''
)
{
$
.
ajax
({
"type"
:
"POST"
,
"url"
:
bindQrcodeUri
,
"dataType"
:
"json"
,
"data"
:
{
id
:
id
,
wxQrcodeId
:
qrcodeId
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
)
{
if
(
data
.
errorNo
==
'0'
)
{
Cfapp
.
alert
({
message
:
"绑定二维码成功"
,
btntext
:
"确定"
,
success
:
function
()
{
myDataTable
.
draw
(
false
);
}
})
}
else
{
Cfapp
.
alert
({
message
:
"绑定二维码失败"
,
btntext
:
"确定"
,
success
:
function
()
{
}
})
}
}
});
}
},
cancel
:
function
()
{
},
displayFields
:
'bindProName'
,
//显示的字段
storeFields
:
'bindProId'
// 储存的字段
})
}
//取消绑定二维码
function
unBindQrCode
(
id
,
type
)
{
var
unBindQrcodeUri
=
"#springUrl('/a/qyuser/unBindQrcode?type="
+
type
+
"')"
;
Cfapp
.
confirm
({
message
:
"确定要解除二维码绑定吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
"type"
:
"post"
,
"url"
:
unBindQrcodeUri
,
"dataType"
:
"json"
,
"data"
:
{
userId
:
id
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"解除绑定成功"
,
btntext
:
"确定"
,
success
:
function
()
{
$
(
"#example2"
).
dataTable
().
fnClearTable
();
}
})
}
else
{
Cfapp
.
alert
({
message
:
"解除绑定失败"
,
btntext
:
"确定"
,
success
:
function
()
{
}
})
}
}
});
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
})
}
//设置峰值
function
peakVal
(
id
)
{
$
(
"#peakButtom"
).
modal
(
'show'
);
$
(
"#peakId"
).
val
(
id
);
}
//提交峰值
function
submitPeakVal
()
{
var
setPeakValUrl
=
"#springUrl('/a/qyuser/setPeakVal')"
;
Cfapp
.
confirm
({
message
:
"确认提交峰值?"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
"type"
:
"post"
,
"url"
:
setPeakValUrl
,
"dataType"
:
"json"
,
"data"
:
{
id
:
$
(
"#peakId"
).
val
(),
peakVal
:
$
(
"#peakVal"
).
val
(),
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
//以json格式传递
"success"
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"设置成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/orgunit/list')"
;
}
})
}
else
{
Cfapp
.
alert
({
message
:
"设置失败"
,
btntext
:
"确定"
,
success
:
function
()
{
}
})
}
}
});
},
cancel
:
function
()
{
$
(
"#peakButtom"
).
modal
(
'hide'
);
}
})
}
//人员删除
function
removeDataPeople
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/qyuser/delete')"
,
data
:
{
id
:
data
,
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
myDataTable
.
draw
(
false
);
}
});
}
else
{
Cfapp
.
alert
({
message
:
"删除失败"
,
btntext
:
"确定"
,
success
:
function
()
{
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
jQuery
(
document
).
ready
(
function
()
{
searchTable
();
seachTablePeople
();
//初始化人员信息
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
...
...
@@ -290,6 +738,10 @@
$
(
"#example2"
).
dataTable
().
fnClearTable
();
});
$
(
'.searchPeople'
).
click
(
function
()
{
$
(
"#example2People"
).
dataTable
().
fnClearTable
();
});
initOrgTree
();
});
var
orgTreeUri
=
"#springUrl('/a/orgunit/treeDataNoAuth')"
;
...
...
@@ -313,10 +765,13 @@
var
orgid
=
node
.
id
;
if
(
orgid
==
0
)
{
$
(
'#orgid'
).
val
(
''
);
$
(
'#orgidPeople'
).
val
(
""
);
}
else
{
$
(
'#orgid'
).
val
(
orgid
);
$
(
'#orgidPeople'
).
val
(
orgid
);
}
$
(
"#example2"
).
dataTable
().
fnClearTable
();
$
(
"#example2People"
).
dataTable
().
fnClearTable
();
}
}
};
...
...
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerqyuser/qyuseradd.html
View file @
f47030fd
...
...
@@ -229,7 +229,7 @@
#if($shiro.hasPermission("sys:qyuser:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/
qyuser
/list')"
class=
"btn btn-default"
>
取消
</a>
<a
href=
"#springUrl('/a/
orgunit
/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
...
...
@@ -577,7 +577,7 @@
location
.
href
=
"#springUrl('/a/qyuser/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/
qyuser
/list')"
;
location
.
href
=
"#springUrl('/a/
orgunit
/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
...
...
@@ -585,7 +585,7 @@
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/
qyuser
/list')"
;
location
.
href
=
"#springUrl('/a/
orgunit
/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
3
)
{
...
...
@@ -593,7 +593,7 @@
message
:
"账号重复"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/qyuser
/list')"
;
// location.href = "#springUrl('/a/orgunit
/list')";
}
});
}
else
{
...
...
@@ -601,7 +601,7 @@
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/qyuser
/list')"
;
//location.href = "#springUrl('/a/orgunit
/list')";
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment