优化员工选择控件
This commit is contained in:
parent
6d60fcd0f6
commit
9c437e11cd
@ -34,7 +34,7 @@
|
||||
<td class="layui-td-gray">权限人员<font>*</font>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input picker-more">
|
||||
<input type="hidden" id="uids" name="uids" value="{$detail.uids}" lay-verify="required" lay-reqText="请选择权限人员">
|
||||
</td>
|
||||
</tr>
|
||||
@ -57,28 +57,7 @@
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form, tool = layui.tool,employeepicker = layui.employeepicker;
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','#unames',function () {
|
||||
var ids=$('#uids').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('#uids').val(ids);
|
||||
$('#unames').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var form = layui.form, tool = layui.tool;
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
|
@ -117,17 +117,17 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">合同制定人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="prepared_name" autocomplete="off" readonly placeholder="请选择合同制定人" class="layui-input">
|
||||
<input type="text" name="prepared_name" autocomplete="off" readonly placeholder="请选择合同制定人" class="layui-input picker-one">
|
||||
<input type="hidden" name="prepared_uid" lay-verify="required" lay-reqText="请选择合同制定人">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">合同保管人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="keeper_name" autocomplete="off" readonly placeholder="请选择合同保管人" class="layui-input">
|
||||
<input type="text" name="keeper_name" autocomplete="off" readonly placeholder="请选择合同保管人" class="layui-input picker-one">
|
||||
<input type="hidden" name="keeper_uid" lay-verify="required" lay-reqText="请选择合同保管人">
|
||||
</td>
|
||||
<td class="layui-td-gray">合同共享人员</td>
|
||||
<td>
|
||||
<input type="text" name="share_names" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input">
|
||||
<input type="text" name="share_names" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="share_ids">
|
||||
</td>
|
||||
</tr>
|
||||
@ -181,59 +181,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
//选择合同制定人弹窗
|
||||
$('body').on('click','[name="prepared_name"]',function () {
|
||||
var ids=$('[name="prepared_uid"]').val(),names=$('[name="prepared_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="prepared_uid"]').val(ids);
|
||||
$('[name="prepared_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择合同保管人弹窗
|
||||
$('body').on('click','[name="keeper_name"]',function () {
|
||||
var ids=$('[name="keeper_uid"]').val(),names=$('[name="keeper_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="keeper_uid"]').val(ids);
|
||||
$('[name="keeper_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="share_names"]',function () {
|
||||
var ids=$('[name="share_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="share_ids"]').val(ids);
|
||||
$('[name="share_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//radio选择
|
||||
form.on('radio(tax)', function(data){
|
||||
if(data.value == 0){
|
||||
|
@ -113,17 +113,17 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">合同制定人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="prepared_name" value="{$detail.prepared_name}" autocomplete="off" readonly placeholder="请选择合同制定人" class="layui-input">
|
||||
<input type="text" name="prepared_name" value="{$detail.prepared_name}" autocomplete="off" readonly placeholder="请选择合同制定人" class="layui-input picker-one">
|
||||
<input type="hidden" name="prepared_uid" value="{$detail.prepared_uid}" lay-verify="required" lay-reqText="请选择合同制定人">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">合同保管人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="keeper_name" value="{$detail.keeper_name}" autocomplete="off" readonly placeholder="请选择合同保管人" class="layui-input">
|
||||
<input type="text" name="keeper_name" value="{$detail.keeper_name}" autocomplete="off" readonly placeholder="请选择合同保管人" class="layui-input picker-one">
|
||||
<input type="hidden" name="keeper_uid" value="{$detail.keeper_uid}" lay-verify="required" lay-reqText="请选择合同保管人">
|
||||
</td>
|
||||
<td class="layui-td-gray">合同共享人员</td>
|
||||
<td>
|
||||
<input type="text" name="share_names" value="{$detail.share_names}" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input">
|
||||
<input type="text" name="share_names" value="{$detail.share_names}" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="share_ids" value="{$detail.share_ids}">
|
||||
</td>
|
||||
</tr>
|
||||
@ -177,59 +177,6 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择合同制定人弹窗
|
||||
$('body').on('click','[name="prepared_name"]',function () {
|
||||
var ids=$('[name="prepared_uid"]').val(),names=$('[name="prepared_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="prepared_uid"]').val(ids);
|
||||
$('[name="prepared_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择合同保管人弹窗
|
||||
$('body').on('click','[name="keeper_name"]',function () {
|
||||
var ids=$('[name="keeper_uid"]').val(),names=$('[name="keeper_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="keeper_uid"]').val(ids);
|
||||
$('[name="keeper_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="share_names"]',function () {
|
||||
var ids=$('[name="share_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="share_ids"]').val(ids);
|
||||
$('[name="share_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//radio选择
|
||||
form.on('radio(tax)', function(data){
|
||||
|
@ -269,45 +269,6 @@ const moduleInit = ['tool','employeepicker'];
|
||||
if(index == 1){
|
||||
log(layui);
|
||||
}
|
||||
});
|
||||
|
||||
//=================================================
|
||||
//选择单个员工弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('body').on('click','[data-event="check"]',function(){
|
||||
|
@ -26,7 +26,7 @@
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="1" title="审核结束">
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="2" title="下一审批人">
|
||||
<div class="layui-inline">
|
||||
<input type="hidden" name="check_admin_ids" value=""><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input">
|
||||
<input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input picker-one"><input type="hidden" name="check_admin_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -167,22 +167,8 @@
|
||||
$('#flowList').append(flowHtml);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type:0,
|
||||
callback:function(ids,names){
|
||||
$('[name="check_admin_ids"]').val(ids),
|
||||
$('[name="check_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
//监听提交
|
||||
$('#formBtn').on('click','span', function(data){
|
||||
let content=$('[name="content"]').val();
|
||||
|
@ -55,12 +55,12 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">归属人员<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="belong_name" readonly autocomplete="off" placeholder="请选择归属人员" class="layui-input">
|
||||
<input type="text" name="belong_name" readonly autocomplete="off" placeholder="请选择归属人员" class="layui-input picker-one">
|
||||
<input type="hidden" name="belong_uid" lay-verify="required" lay-reqText="请选择归属人员">
|
||||
</td>
|
||||
<td class="layui-td-gray">协助人员</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="assist_names" autocomplete="off" placeholder="请选择协助人员" class="layui-input">
|
||||
<input type="text" name="assist_names" autocomplete="off" placeholder="请选择协助人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="assist_ids">
|
||||
</td>
|
||||
</tr>
|
||||
@ -88,42 +88,6 @@
|
||||
,min: 0
|
||||
});
|
||||
|
||||
//选择归属人人弹窗
|
||||
$('body').on('click','[name="belong_name"]',function () {
|
||||
var ids=$('[name="belong_uid"]').val(),names=$('[name="belong_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="belong_uid"]').val(ids);
|
||||
$('[name="belong_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="assist_names"]',function () {
|
||||
var ids=$('[name="assist_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="assist_ids"]').val(ids);
|
||||
$('[name="assist_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
|
@ -55,12 +55,12 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">归属人员<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="belong_name" value="{$detail.belong_name}" readonly autocomplete="off" placeholder="请选择归属人员" class="layui-input">
|
||||
<input type="text" name="belong_name" value="{$detail.belong_name}" readonly autocomplete="off" placeholder="请选择归属人员" class="layui-input picker-one">
|
||||
<input type="hidden" name="belong_uid" value="{$detail.belong_uid}" lay-verify="required" lay-reqText="请选择归属人员">
|
||||
</td>
|
||||
<td class="layui-td-gray">协助人员</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="assist_names" value="{$detail.assist_names}" autocomplete="off" placeholder="请选择协助人员" class="layui-input">
|
||||
<input type="text" name="assist_names" value="{$detail.assist_names}" autocomplete="off" placeholder="请选择协助人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="assist_ids" value="{$detail.assist_ids}">
|
||||
</td>
|
||||
</tr>
|
||||
@ -88,42 +88,6 @@
|
||||
,min: 0
|
||||
});
|
||||
|
||||
//选择归属人人弹窗
|
||||
$('body').on('click','[name="belong_name"]',function () {
|
||||
var ids=$('[name="belong_uid"]').val(),names=$('[name="belong_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="belong_uid"]').val(ids);
|
||||
$('[name="belong_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="assist_names"]',function () {
|
||||
var ids=$('[name="assist_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="assist_ids"]').val(ids);
|
||||
$('[name="assist_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
|
@ -30,7 +30,7 @@
|
||||
<td class="layui-td-gray">权限人员<font>*</font>
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input picker-more">
|
||||
<input type="hidden" id="uids" name="uids" value="{$detail.uids}" lay-verify="required" lay-reqText="请选择权限人员">
|
||||
</td>
|
||||
</tr>
|
||||
@ -53,27 +53,7 @@
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form, tool = layui.tool,employeepicker = layui.employeepicker;
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','#unames',function () {
|
||||
var ids=$('#uids').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('#uids').val(ids);
|
||||
$('#unames').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
var form = layui.form, tool = layui.tool;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
|
@ -55,7 +55,7 @@
|
||||
</td>
|
||||
<td class="layui-td-gray">共享员工</td>
|
||||
<td>
|
||||
<input type="text" name="share_names" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input">
|
||||
<input type="text" name="share_names" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="share_ids">
|
||||
</td>
|
||||
</tr>
|
||||
@ -142,26 +142,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="share_names"]',function () {
|
||||
var ids=$('[name="share_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="share_ids"]').val(ids);
|
||||
$('[name="share_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
|
@ -54,7 +54,7 @@
|
||||
</td>
|
||||
<td class="layui-td-gray">共享员工</td>
|
||||
<td>
|
||||
<input type="text" name="share_names" value="{$detail.share_names}" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input">
|
||||
<input type="text" name="share_names" value="{$detail.share_names}" autocomplete="off" readonly placeholder="请选择共享人员" class="layui-input picker-more">
|
||||
<input type="hidden" name="share_ids" value="{$detail.share_ids}">
|
||||
</td>
|
||||
</tr>
|
||||
@ -111,26 +111,6 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','[name="share_names"]',function () {
|
||||
var ids=$('[name="share_ids"]').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="share_ids"]').val(ids);
|
||||
$('[name="share_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
|
@ -335,48 +335,6 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择单个员工弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
if($('[name="flow_id"]').val()==''){
|
||||
layer.msg('请先选择审批流程');
|
||||
return false;
|
||||
}
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('select(flowtype)', function(data){
|
||||
var check_type = data.elem[data.elem.selectedIndex].title;
|
||||
var formHtml='<td class="layui-td-gray">审核人<font>*</font></td>\
|
||||
|
@ -60,28 +60,7 @@
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form, tool = layui.tool,employeepicker = layui.employeepicker;
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
var form = layui.form, tool = layui.tool;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
|
@ -186,7 +186,7 @@
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="1" title="审核结束">
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="2" title="下一审批人">
|
||||
<div class="layui-inline">
|
||||
<input type="hidden" name="check_admin_ids" value=""><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input">
|
||||
<input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input picker-one"><input type="hidden" name="check_admin_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -366,20 +366,6 @@ function gouguInit() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type:0,
|
||||
callback:function(ids,names){
|
||||
$('[name="check_admin_ids"]').val(ids),
|
||||
$('[name="check_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
//监听提交
|
||||
$('#formBtn').on('click','span', function(data){
|
||||
|
@ -264,48 +264,6 @@ function gouguInit() {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择单个员工弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
if($('[name="flow_id"]').val()==''){
|
||||
layer.msg('请先选择审批流程');
|
||||
return false;
|
||||
}
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('select(flowtype)', function(data){
|
||||
var check_type = data.elem[data.elem.selectedIndex].title;
|
||||
|
@ -188,7 +188,7 @@
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="1" title="审核结束">
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="2" title="下一审批人">
|
||||
<div class="layui-inline">
|
||||
<input type="hidden" name="check_admin_ids" value=""><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input">
|
||||
<input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input picker-one"><input type="hidden" name="check_admin_ids" value="">
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
@ -383,21 +383,7 @@ function gouguInit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type:0,
|
||||
callback:function(ids,names){
|
||||
$('[name="check_admin_ids"]').val(ids),
|
||||
$('[name="check_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
//监听提交
|
||||
$('#formBtn').on('click','span', function(data){
|
||||
|
@ -358,43 +358,6 @@
|
||||
keyword: selcted,
|
||||
});
|
||||
|
||||
//选择单个员工弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('radio(checktype)', function(data){
|
||||
if(data.value==1){
|
||||
|
@ -50,47 +50,6 @@ Array.prototype.remove = function (val) {
|
||||
|
||||
function flowStep(){
|
||||
let tool=layui.tool,form = layui.form,upload = layui.upload,employeepicker = layui.employeepicker;
|
||||
//选择单个员工弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
if($('[name="flow_id"]').val()==''){
|
||||
layer.msg('请先选择审批流程');
|
||||
return false;
|
||||
}
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择多个员工弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('select(flowtype)', function(data){
|
||||
var check_type = data.elem[data.elem.selectedIndex].title;
|
||||
|
@ -116,19 +116,6 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type:0,
|
||||
callback:function(ids,names){
|
||||
$('[name="check_admin_ids"]').val(ids),
|
||||
$('[name="check_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
//监听提交
|
||||
$('#formBtn').on('click','span', function(data){
|
||||
|
@ -48,7 +48,7 @@
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="1" title="审核结束">
|
||||
<input type="radio" name="check_node" lay-filter="check_node" value="2" title="下一审批人">
|
||||
<div class="layui-inline">
|
||||
<input type="hidden" name="check_admin_ids" value=""><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input">
|
||||
<input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择下一审批人" lay-verify="required" lay-reqText="请选择下一审批人" class="layui-input picker-one"><input type="hidden" name="check_admin_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">接收人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="person_name" value="" lay-verify="required" lay-reqText="请选择接收人" placeholder="请选择接收人" readonly class="layui-input">
|
||||
<input type="text" name="person_name" value="" lay-verify="required" lay-reqText="请选择接收人" placeholder="请选择接收人" readonly class="layui-input picker-more">
|
||||
<input type="hidden" name="uids" value="">
|
||||
</td>
|
||||
<td class="layui-td-gray">汇报类型</td>
|
||||
@ -285,24 +285,6 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
});
|
||||
})
|
||||
|
||||
//选择对应人
|
||||
$('[name="person_name"]').on('click',function(){
|
||||
var ids=$('[name="uids"]').val(),names=$('[name="person_name"]').val(),idsArray=[],namesArray=[];
|
||||
if(ids!=''){
|
||||
idsArray=ids.split(',');
|
||||
namesArray=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
ids:idsArray,
|
||||
names:namesArray,
|
||||
callback:function(ids,names){
|
||||
$('[name="uids"]').val(ids.join(',')),
|
||||
$('[name="person_name"]').val(names.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -164,44 +164,6 @@
|
||||
trigger: 'click'
|
||||
});
|
||||
});
|
||||
|
||||
//选择员工单人弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择员工多人人弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.add-flow').on('click',function(){
|
||||
|
@ -35,7 +35,7 @@
|
||||
<td class="layui-td-gray">权限人员<font>*</font>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input">
|
||||
<input type="text" id="unames" name="unames" value="{$detail.unames}" readonly placeholder="请选择权限人员" autocomplete="off" class="layui-input picker-more">
|
||||
<input type="hidden" id="uids" name="uids" value="{$detail.uids}" lay-verify="required" lay-reqText="请选择权限人员">
|
||||
</td>
|
||||
</tr>
|
||||
@ -58,28 +58,7 @@
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form, tool = layui.tool,employeepicker = layui.employeepicker;
|
||||
|
||||
//选择共享成员弹窗
|
||||
$('body').on('click','#unames',function () {
|
||||
var ids=$('#uids').val(),names=$(this).val(),share_ids_array=[],share_names_array=[];
|
||||
if(ids.length>0){
|
||||
share_ids_array=ids.split(',');
|
||||
share_names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:share_ids_array,
|
||||
names:share_names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('#uids').val(ids);
|
||||
$('#unames').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var form = layui.form, tool = layui.tool;
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
|
@ -99,45 +99,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
//选择员工单人弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择员工多人人弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.add-flow').on('click',function(){
|
||||
let len = $('#flowList').find('.layui-form-item').length;
|
||||
let index = len+1;
|
||||
|
@ -42,14 +42,14 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">负责人</td>
|
||||
<td>
|
||||
<input type="text" name="director_name" placeholder="请选择" readonly class="layui-input picker-one" value="">
|
||||
<input type="hidden" name="director_uid" readonly value="">
|
||||
<input type="text" name="director_name" placeholder="请选择" readonly class="layui-input" value="">
|
||||
</td>
|
||||
{empty name="$project_id"}
|
||||
<td class="layui-td-gray">协作人</td>
|
||||
<td>
|
||||
<input type="text" name="assist_admin_names" placeholder="请选择" readonly class="layui-input picker-more" value="">
|
||||
<input type="hidden" name="assist_admin_ids" readonly value="">
|
||||
<input type="text" name="assist_admin_names" placeholder="请选择" readonly class="layui-input" value="">
|
||||
</td>
|
||||
<td class="layui-td-gray">关联项目</td>
|
||||
<td>
|
||||
@ -105,43 +105,6 @@
|
||||
elem: '#end_time'
|
||||
});
|
||||
|
||||
//选择负责人弹窗
|
||||
$('body').on('click', '[name="director_name"]', function () {
|
||||
var ids = $('[name="director_uid"]').val(), names = $('[name="director_name"]').val();
|
||||
employeepicker.init({
|
||||
ids: ids,
|
||||
names: names,
|
||||
type: 0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback: function (ids, names, dids, departments) {
|
||||
$('[name="director_uid"]').val(ids);
|
||||
$('[name="director_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//选择协作人人弹窗
|
||||
$('body').on('click', '[name="assist_admin_names"]', function () {
|
||||
var ids = $('[name="assist_admin_ids"]').val(), names = $('[name="assist_admin_names"]').val(), assist_admin_id_array = [], assist_admin_name_array = [];
|
||||
if (ids.length > 0) {
|
||||
assist_admin_id_array = ids.split(',');
|
||||
assist_admin_name_array = names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids: assist_admin_id_array,
|
||||
names: assist_admin_name_array,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type: 1,
|
||||
callback: function (ids, names, dids, departments) {
|
||||
$('[name="assist_admin_ids"]').val(ids);
|
||||
$('[name="assist_admin_names"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
data.field.content = tinyMCE.editors['container'].getContent();
|
||||
|
@ -22,14 +22,14 @@
|
||||
</td>
|
||||
<td class="layui-td-gray-2">部门负责人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="lead_admin_name" autocomplete="off" lay-verify="required" placeholder="请选择部门负责人" lay-reqText="请选择部门负责人" readonly class="layui-input">
|
||||
<input type="text" name="lead_admin_name" autocomplete="off" lay-verify="required" placeholder="请选择部门负责人" lay-reqText="请选择部门负责人" readonly class="layui-input picker-one">
|
||||
<input type="hidden" name="lead_admin_id" autocomplete="off" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">交接人员<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="connect_names" autocomplete="off" lay-verify="required" placeholder="请选择交接人员" lay-reqText="请选择交接人员" readonly class="layui-input">
|
||||
<input type="text" name="connect_names" autocomplete="off" lay-verify="required" placeholder="请选择交接人员" lay-reqText="请选择交接人员" readonly class="layui-input picker-more">
|
||||
<input type="hidden" name="connect_uids" class="layui-input">
|
||||
</td>
|
||||
</tr>
|
||||
@ -59,14 +59,14 @@
|
||||
</td>
|
||||
<td class="layui-td-gray-2">部门负责人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="lead_admin_name" autocomplete="off" value="{$detail.lead_admin_name}" lay-verify="required" placeholder="请选择部门负责人" lay-reqText="请选择部门负责人" readonly class="layui-input">
|
||||
<input type="text" name="lead_admin_name" autocomplete="off" value="{$detail.lead_admin_name}" lay-verify="required" placeholder="请选择部门负责人" lay-reqText="请选择部门负责人" readonly class="layui-input picker-one">
|
||||
<input type="hidden" name="lead_admin_id" autocomplete="off" value="{$detail.lead_admin_id}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">交接人员<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="connect_names" autocomplete="off" lay-verify="required" placeholder="请选择交接人员" lay-reqText="请选择交接人员" readonly class="layui-input" value="{$detail.connect_names}">
|
||||
<input type="text" name="connect_names" autocomplete="off" lay-verify="required" placeholder="请选择交接人员" lay-reqText="请选择交接人员" readonly class="layui-input picker-more" value="{$detail.connect_names}">
|
||||
<input type="hidden" name="connect_uids" class="layui-input" value="{$detail.connect_uids}">
|
||||
</td>
|
||||
</tr>
|
||||
@ -124,41 +124,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
//监听部门负责人
|
||||
$('body').on('click','[name="lead_admin_name"]',function () {
|
||||
var ids=$('[name="lead_admin_id"]').val(),names=$('[name="lead_admin_name"]').val();
|
||||
employeepicker.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
type:0,
|
||||
callback:function(ids,names,dids,departments){
|
||||
$('[name="lead_admin_id"]').val(ids);
|
||||
$('[name="lead_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听交接成员
|
||||
$('body').on('click','[name="connect_names"]',function () {
|
||||
var ids=$('[name="connect_uids"]').val(),names=$('[name="connect_names"]').val(),idsArray=[],namesArray=[];
|
||||
if(ids!=''){
|
||||
idsArray=ids.split(',');
|
||||
namesArray=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:idsArray,
|
||||
names:namesArray,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names){
|
||||
$('[name="connect_uids"]').val(ids.join(',')),
|
||||
$('[name="connect_names"]').val(names.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
if(data.field.uid==0){
|
||||
|
@ -19,7 +19,7 @@ if (moduleInit.length > 0) {
|
||||
}
|
||||
layui.config({
|
||||
base: rootPath + "module/",
|
||||
version: "1.0.0"
|
||||
version: "2.7.6"
|
||||
}).extend(module).use(moduleInit, function () {
|
||||
if (typeof gouguInit === 'function') {
|
||||
gouguInit();
|
||||
|
@ -226,6 +226,43 @@ layui.define(['layer','dtree'],function(exports){
|
||||
}
|
||||
layui.link(rootPath+'module/dtree/dtree.css');
|
||||
layui.link(rootPath+'module/dtree/font/dtreefont.css');
|
||||
//输出接口
|
||||
exports('employeepicker', obj);
|
||||
//选择员工单人弹窗
|
||||
$('body').on('click','.picker-one',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'';
|
||||
obj.init({
|
||||
ids:ids,
|
||||
names:names,
|
||||
type:0,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names);
|
||||
that.next().val(ids);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//选择员工多人人弹窗
|
||||
$('body').on('click','.picker-more',function () {
|
||||
let that = $(this);
|
||||
let ids=that.next().val()+'',names = that.val()+'',ids_array=[],names_array=[];
|
||||
if(ids.length>0){
|
||||
ids_array=ids.split(',');
|
||||
names_array=names.split(',');
|
||||
}
|
||||
obj.init({
|
||||
ids:ids_array,
|
||||
names:names_array,
|
||||
type:1,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names,dids,departments){
|
||||
that.val(names.join(','));
|
||||
that.next().val(ids.join(','));
|
||||
}
|
||||
});
|
||||
});
|
||||
//输出接口
|
||||
exports('employeepicker', obj);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user