审批模块新增附件上传功能、新增抄送人功能、新增审核自动发动消息通知功能
This commit is contained in:
parent
24f5280126
commit
97895e1b8e
@ -98,6 +98,8 @@ class Index extends BaseController
|
||||
$res['filepath'] = $data['filepath'];
|
||||
$res['name'] = $data['name'];
|
||||
$res['filename'] = $data['filename'];
|
||||
$res['filesize'] = $data['filesize'];
|
||||
$res['fileext'] = $data['fileext'];
|
||||
add_log('upload', $data['user_id'], $data);
|
||||
if($sourse == 'editormd'){
|
||||
//editormd编辑器上传返回
|
||||
@ -200,10 +202,22 @@ class Index extends BaseController
|
||||
//获取部门所有员工
|
||||
public function get_employee_select()
|
||||
{
|
||||
$keyword = get_params('keyword');
|
||||
$selected = [];
|
||||
if(!empty($keyword)){
|
||||
$selected = explode(",",$keyword);
|
||||
}
|
||||
$employee = Db::name('admin')
|
||||
->field('id as value,name')
|
||||
->where(['status' => 1])
|
||||
->select();
|
||||
->select()->toArray();
|
||||
|
||||
foreach($employee as $k => &$v){
|
||||
$v['selected'] = '';
|
||||
if(in_array($v['value'],$selected)){
|
||||
$v['selected'] = 'selected';
|
||||
}
|
||||
}
|
||||
return to_assign(0, '', $employee);
|
||||
}
|
||||
|
||||
@ -361,7 +375,9 @@ class Index extends BaseController
|
||||
foreach ($flowData as $key => &$val) {
|
||||
$val['user_id_info'] = Db::name('Admin')->field('id,name,thumb')->where('id','in',$val['flow_uids'])->select()->toArray();
|
||||
}
|
||||
return to_assign(0, '', $flowData);
|
||||
$data['copy_uids'] = $flow['copy_uids'];
|
||||
$data['flow_data'] = $flowData;
|
||||
return to_assign(0, '', $data);
|
||||
}
|
||||
|
||||
//获取审核流程节点
|
||||
|
@ -5,10 +5,10 @@
|
||||
<h3 class="pb-3">新增知识文章</h3>
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">文章标题 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文章标题<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="title" lay-verify="required" lay-reqText="请输入文章标题" autocomplete="off" placeholder="请输入文章标题"
|
||||
class="layui-input"></td>
|
||||
<td class="layui-td-gray">文章分类<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文章分类<font>*</font></td>
|
||||
<td>
|
||||
<select name="article_cate_id" lay-verify="required" lay-reqText="请选择分类">
|
||||
<option value="">请选择分类</option>
|
||||
@ -19,7 +19,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">关键字<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">关键字<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<input type="text" id="keyword_name" name="keyword_names" autocomplete="off" lay-verify="required" lay-reqText="请选择关键字" placeholder="请选择关键字"
|
||||
class="layui-input" readonly>
|
||||
@ -68,7 +68,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">文章内容<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">文章内容<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入内容" class="layui-textarea" id="container" style="border:0;padding:0"></textarea>
|
||||
</td>
|
||||
|
@ -5,10 +5,10 @@
|
||||
<h3 class="pb-3">编辑知识文章</h3>
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">文章标题 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文章标题<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="title" lay-verify="required" lay-reqText="请输入文章标题" autocomplete="off" placeholder="请输入文章标题"
|
||||
class="layui-input" value="{$article.title}"></td>
|
||||
<td class="layui-td-gray">文章分类<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文章分类<font>*</font></td>
|
||||
<td>
|
||||
<select name="article_cate_id" lay-verify="required" lay-reqText="请选择分类">
|
||||
<option value="">请选择分类</option>
|
||||
@ -19,7 +19,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">关键字<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">关键字<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<input type="text" id="keyword_name" name="keyword_names" autocomplete="off" lay-verify="required" lay-reqText="请选择关键字" placeholder="请选择关键字"
|
||||
class="layui-input" value="{$article.keyword_names}" readonly>
|
||||
@ -36,7 +36,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">是否共享<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">是否共享<font>*</font></td>
|
||||
<td>
|
||||
<input type="radio" name="is_share" value="1" title="是" {eq name="$article.is_share" value="1" }checked{/eq}>
|
||||
<input type="radio" name="is_share" value="0" title="否" {eq name="$article.is_share" value="0" }checked{/eq}>
|
||||
@ -68,7 +68,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">文章内容<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">文章内容<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入内容" class="layui-textarea" id="container" lay-verify="required" lay-reqText="请完善文章内容"
|
||||
style="border:0;padding:0">{$article.content}</textarea>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div class="p-4">
|
||||
<h1>{$detail.title}</h1>
|
||||
<div class="text-detial-ops">
|
||||
<span>发表于:{$detail.create_time | date='Y-m-d m:i:s'}</span>
|
||||
<span>发表于:{$detail.create_time | date='Y-m-d H:i:s'}</span>
|
||||
<span>发布人:{$detail.user}</span>
|
||||
<span>部门:{$detail.department}</span>
|
||||
<span>阅读量:{$detail.read}</span>
|
||||
|
@ -313,6 +313,10 @@ function add_log($type, $param_id = '', $param = [])
|
||||
$data['function'] = strtolower(app('request')->action());
|
||||
$parameter = $data['module'] . '/' . $data['controller'] . '/' . $data['function'];
|
||||
$rule_menu = Db::name('AdminRule')->where(array('src' => $parameter))->find();
|
||||
if($type == 'upload'){
|
||||
$data['title'] = $param['name'];
|
||||
$data['subject'] = '文件';
|
||||
}
|
||||
if($rule_menu){
|
||||
$data['title'] = $rule_menu['title'];
|
||||
$data['subject'] = $rule_menu['name'];
|
||||
@ -338,11 +342,14 @@ function add_log($type, $param_id = '', $param = [])
|
||||
*/
|
||||
function sendMessage($user_id, $template, $data=[])
|
||||
{
|
||||
$content = get_config('message.template')[$template]['template'];
|
||||
$title = get_config('message.template')[$template]['title'];
|
||||
$content = get_config('message.template')[$template]['content'];
|
||||
foreach ($data as $key => $val) {
|
||||
$title = str_replace('{' . $key . '}', $val, $title);
|
||||
$content = str_replace('{' . $key . '}', $val, $content);
|
||||
}
|
||||
if(isSet($data['from_uid'])){
|
||||
$title = str_replace('{from_user}', get_admin($data['from_uid'])['name'], $title);
|
||||
$content = str_replace('{from_user}', get_admin($data['from_uid'])['name'], $content);
|
||||
}
|
||||
$content = str_replace('{date}', date('Y-m-d'), $content);
|
||||
@ -350,7 +357,7 @@ function sendMessage($user_id, $template, $data=[])
|
||||
if (!$user_id) return false;
|
||||
if (!$content) return false;
|
||||
if (!is_array($user_id)) {
|
||||
$users[] = $user_id;
|
||||
$users = explode(",", strval($user_id));
|
||||
} else {
|
||||
$users = $user_id;
|
||||
}
|
||||
@ -361,7 +368,7 @@ function sendMessage($user_id, $template, $data=[])
|
||||
$send_data[] = array(
|
||||
'to_uid' => $value,//接收人
|
||||
'action_id' => $data['action_id'],
|
||||
'title' => $data['title'],
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'template' => $template,
|
||||
'module_name' => strtolower(app('http')->getName()),
|
||||
@ -375,6 +382,15 @@ function sendMessage($user_id, $template, $data=[])
|
||||
return $res;
|
||||
}
|
||||
|
||||
function getMessageLink($template,$action_id){
|
||||
$content='';
|
||||
if(isset(get_config('message.template')[$template]['link'])){
|
||||
$link = get_config('message.template')[$template]['link'];
|
||||
$content = str_replace('{action_id}', $action_id, $link);
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 邮件发送
|
||||
* @param $to 接收人
|
||||
|
@ -223,11 +223,23 @@ class Expense extends BaseController
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
if($flow[0]['flow_type'] == 1){
|
||||
//部门负责人
|
||||
$param['check_admin_ids'] = get_department_leader($admin_id);
|
||||
$leader = get_department_leader($this->uid);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $leader;
|
||||
}
|
||||
}
|
||||
else if($flow[0]['flow_type'] == 2){
|
||||
//上级部门负责人
|
||||
$param['check_admin_ids'] = get_department_leader($admin_id,1);
|
||||
$leader = get_department_leader($this->uid,1);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $leader;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $flow[0]['flow_uids'];
|
||||
@ -282,6 +294,13 @@ class Expense extends BaseController
|
||||
}
|
||||
}
|
||||
add_log('edit', $exid, $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'action_id'=>$param['id']
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,31,$msg);
|
||||
Db::commit();
|
||||
$dbRes = true;
|
||||
} else {
|
||||
@ -306,11 +325,23 @@ class Expense extends BaseController
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
if($flow[0]['flow_type'] == 1){
|
||||
//部门负责人
|
||||
$param['check_admin_ids'] = get_department_leader($admin_id);
|
||||
$leader = get_department_leader($this->uid);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $leader;
|
||||
}
|
||||
}
|
||||
else if($flow[0]['flow_type'] == 2){
|
||||
//上级部门负责人
|
||||
$param['check_admin_ids'] = get_department_leader($admin_id,1);
|
||||
$leader = get_department_leader($this->uid,1);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $leader;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$param['check_admin_ids'] = $flow[0]['flow_uids'];
|
||||
@ -358,6 +389,13 @@ class Expense extends BaseController
|
||||
}
|
||||
}
|
||||
add_log('add', $exid, $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'action_id'=>$exid
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,31,$msg);
|
||||
Db::commit();
|
||||
$dbRes = true;
|
||||
} else {
|
||||
@ -378,6 +416,10 @@ class Expense extends BaseController
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
if ($id > 0) {
|
||||
$expense = $this->detail($id);
|
||||
if($expense['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$expense['file_ids'])->select();
|
||||
$expense['fileArray'] = $fileArray;
|
||||
}
|
||||
View::assign('expense', $expense);
|
||||
}
|
||||
$department = get_login_admin('did');
|
||||
@ -415,6 +457,14 @@ class Expense extends BaseController
|
||||
$detail['check_user'] = implode(',',$check_user);
|
||||
}
|
||||
}
|
||||
if($detail['copy_uids'] !=''){
|
||||
$copy_user = Db::name('Admin')->where('id','in',$detail['copy_uids'])->column('name');
|
||||
$detail['copy_user'] = implode(',',$copy_user);
|
||||
}
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
|
||||
$is_check_admin = 0;
|
||||
$is_create_admin = 0;
|
||||
@ -468,6 +518,10 @@ class Expense extends BaseController
|
||||
{
|
||||
$param = get_params();
|
||||
$detail = Db::name('Expense')->where(['id' => $param['id']])->find();
|
||||
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
|
||||
if (!in_array($this->uid, $check_admin_ids)){
|
||||
return to_assign(1,'您没权限审核该审批');
|
||||
}
|
||||
//当前审核节点详情
|
||||
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
||||
//审核通过
|
||||
@ -490,6 +544,9 @@ class Expense extends BaseController
|
||||
$param['check_status'] = 2;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$param['check_status'] = 1;
|
||||
}
|
||||
}
|
||||
else if($step['flow_type'] == 0){
|
||||
//自由人审批
|
||||
@ -556,6 +613,20 @@ class Expense extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('check', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$detail['admin_id'],
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
if($param['check_status'] == 1){
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,31,$msg);
|
||||
}
|
||||
if($param['check_status'] == 2){
|
||||
$users = $detail['admin_id'];
|
||||
sendMessage($users,32,$msg);
|
||||
}
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
@ -582,6 +653,13 @@ class Expense extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('refue', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
$users = $detail['admin_id'];
|
||||
sendMessage($users,33,$msg);
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
@ -628,6 +706,14 @@ class Expense extends BaseController
|
||||
$param['pay_time'] = time();
|
||||
$res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param);
|
||||
if ($res !== false) {
|
||||
//发送消息通知
|
||||
$detail = Db::name('Expense')->where(['id' => $param['id']])->find();
|
||||
$msg=[
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
$users = $detail['admin_id'];
|
||||
sendMessage($users,34,$msg);
|
||||
return to_assign();
|
||||
} else {
|
||||
return to_assign(1, "操作失败");
|
||||
|
@ -201,7 +201,7 @@ class Invoice extends BaseController
|
||||
return to_assign(1, '银行营业网点不能为空');
|
||||
}
|
||||
if (!$param['invoice_address']) {
|
||||
return to_assign(1, '银地址不能为空');
|
||||
return to_assign(1, '银行地址不能为空');
|
||||
}
|
||||
}
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
@ -263,6 +263,13 @@ class Invoice extends BaseController
|
||||
$res = InvoiceList::where('id', $param['id'])->strict(false)->field(true)->update($param);
|
||||
if ($res !== false) {
|
||||
add_log('edit', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'action_id'=>$param['id']
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,41,$msg);
|
||||
return to_assign();
|
||||
} else {
|
||||
return to_assign(1, '操作失败');
|
||||
@ -323,11 +330,17 @@ class Invoice extends BaseController
|
||||
);
|
||||
//增加审核流程
|
||||
Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($exid) {
|
||||
add_log('apply', $exid, $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'action_id'=>$exid
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,41,$msg);
|
||||
return to_assign();
|
||||
} else {
|
||||
return to_assign(1, '操作失败');
|
||||
@ -337,6 +350,10 @@ class Invoice extends BaseController
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
if ($id > 0) {
|
||||
$detail = $this->detail($id);
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
View::assign('detail', $detail);
|
||||
}
|
||||
$department = get_login_admin('did');
|
||||
@ -373,6 +390,15 @@ class Invoice extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
if($detail['copy_uids'] !=''){
|
||||
$copy_user = Db::name('Admin')->where('id','in',$detail['copy_uids'])->column('name');
|
||||
$detail['copy_user'] = implode(',',$copy_user);
|
||||
}
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
|
||||
$is_check_admin = 0;
|
||||
$is_create_admin = 0;
|
||||
if($detail['admin_id'] == $this->uid){
|
||||
@ -424,6 +450,10 @@ class Invoice extends BaseController
|
||||
{
|
||||
$param = get_params();
|
||||
$detail = Db::name('Invoice')->where(['id' => $param['id']])->find();
|
||||
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
|
||||
if (!in_array($this->uid, $check_admin_ids)){
|
||||
return to_assign(1,'您没权限审核该审批');
|
||||
}
|
||||
//当前审核节点详情
|
||||
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
||||
//审核通过
|
||||
@ -446,6 +476,9 @@ class Invoice extends BaseController
|
||||
$param['check_status'] = 2;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$param['check_status'] = 1;
|
||||
}
|
||||
}
|
||||
else if($step['flow_type'] == 0){
|
||||
//自由人审批
|
||||
@ -512,6 +545,20 @@ class Invoice extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('check', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$detail['admin_id'],
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
if($param['check_status'] == 1){
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,41,$msg);
|
||||
}
|
||||
if($param['check_status'] == 2){
|
||||
$users = $detail['admin_id'];
|
||||
sendMessage($users,42,$msg);
|
||||
}
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
@ -538,6 +585,13 @@ class Invoice extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('refue', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
$users = $detail['admin_id'];
|
||||
sendMessage($users,43,$msg);
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
|
@ -9,6 +9,21 @@
|
||||
.select-1,.select-2{display:none;}
|
||||
.layui-table-min th{font-size:13px; text-align:center; background-color:#f8f8f8;}
|
||||
.layui-table-min td{font-size:13px; padding:6px;text-align:center;}
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 110px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
@ -28,21 +43,21 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">报销凭证编号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">报销凭证编号<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="code" autocomplete="off" lay-verify="required" placeholder="报销凭证编号" lay-reqText="请填写报销凭证编号" class="layui-input" value="">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">原始单据日期<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">原始单据日期<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" id="expense_time" name="expense_time" lay-verify="required" placeholder="请选择原始单据日期" lay-reqText="请选择原始单据日期" readonly value="">
|
||||
</td>
|
||||
<td class="layui-td-gray">入账月份<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入账月份<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" id="income_month" name="income_month" lay-verify="required" placeholder="请选择入账月份" lay-reqText="请选择入账月份" readonly value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">报销选项<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">报销选项<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<div>
|
||||
<table id="interfix" class="layui-table layui-table-min">
|
||||
@ -70,6 +85,14 @@
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" type="button" id="addInterfix">+报销选项</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -87,6 +110,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table">
|
||||
@ -97,21 +126,21 @@
|
||||
<td colspan="3">{$expense.department}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">报销凭证编号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">报销凭证编号<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="code" autocomplete="off" lay-verify="required" placeholder="报销凭证编号" lay-reqText="请填写报销凭证编号" class="layui-input" value="{$expense.code}">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">原始单据日期<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">原始单据日期<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" id="expense_time" name="expense_time" lay-verify="required" placeholder="请选择原始单据日期" lay-reqText="请选择原始单据日期" readonly value="{$expense.expense_time}">
|
||||
</td>
|
||||
<td class="layui-td-gray">入账月份<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入账月份<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" id="income_month" name="income_month" lay-verify="required" placeholder="请选择入账月份" lay-reqText="请选择入账月份" readonly value="{$expense.income_month}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">报销选项<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">报销选项<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<div>
|
||||
<table id="interfix" class="layui-table layui-table-min">
|
||||
@ -141,6 +170,28 @@
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" type="button" id="addInterfix">+报销选项</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -158,6 +209,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
@ -181,9 +238,76 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
laydate.render({
|
||||
elem: '#income_month',
|
||||
type:'month',
|
||||
@ -241,11 +365,18 @@
|
||||
});
|
||||
})
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -254,28 +385,32 @@
|
||||
else{
|
||||
$.ajax({
|
||||
url: "/api/index/get_flow_users",
|
||||
type:'get',
|
||||
type:'post',
|
||||
data:{id:data.value},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -285,8 +420,7 @@
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -296,8 +430,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
//添加报销信息表格
|
||||
$('#addInterfix').on('click',function(){
|
||||
|
@ -47,6 +47,22 @@
|
||||
|
||||
.layui-table-min th{font-size:13px; text-align:center; background-color:#f8f8f8;}
|
||||
.layui-table-min td{font-size:13px; padding:6px;text-align:center;}
|
||||
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 80px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
@ -99,6 +115,26 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
<tr>
|
||||
<td class="layui-td-gray">审核状态</td>
|
||||
<td>{eq name="$detail.check_status" value="0"}<span style="color:#666666">待审批</span>{/eq}
|
||||
@ -110,7 +146,9 @@
|
||||
<span id="showRecord" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-normal" style="margin-left:10px;">查看审批记录</span>
|
||||
</td>
|
||||
<td class="layui-td-gray-2">当前审核人</td>
|
||||
<td colspan="3">{$detail.check_user}</td>
|
||||
<td>{$detail.check_user}</td>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td>{$detail.copy_user}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程</td>
|
||||
|
@ -5,6 +5,21 @@
|
||||
.layui-table-min td{font-size:13px; padding:6px;text-align:center;}
|
||||
.layui-form-radio{margin-right:6px}
|
||||
.layui-form-radio>i{margin-right:3px; }
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 110px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
@ -14,11 +29,11 @@
|
||||
{if condition="($id == 0)"}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开票金额<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票金额<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" name="amount" lay-verify="required|number" placeholder="请输入开票金额" lay-reqText="请输入开票金额" value="">
|
||||
</td>
|
||||
<td class="layui-td-gray">开票类型<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票类型<font>*</font></td>
|
||||
<td>
|
||||
<select name="invoice_type" lay-verify="required" lay-reqText="请选择开票类型">
|
||||
<option value="">请选择开票类型</option>
|
||||
@ -26,7 +41,7 @@
|
||||
<option value="2">增值税普通发票</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">开票主体<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票主体<font>*</font></td>
|
||||
<td>
|
||||
<select name="invoice_subject" lay-verify="required" lay-reqText="请选择开票主体">
|
||||
<option value="">请选择开票主体</option>
|
||||
@ -37,34 +52,42 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抬头类型<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">抬头类型<font>*</font></td>
|
||||
<td>
|
||||
<input type="radio" name="type" lay-filter="type" value="1" title="企业" checked>
|
||||
<input type="radio" name="type" lay-filter="type" value="2" title="个人">
|
||||
</td>
|
||||
<td class="layui-td-gray">开票抬头<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票抬头<font>*</font></td>
|
||||
<td><input type="text" name="invoice_title" class="layui-input" value="" lay-verify="required" lay-reqText="请输入开票抬头"></td>
|
||||
<td class="layui-td-gray">电话号码<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">电话号码<font>*</font></td>
|
||||
<td><input type="text" name="invoice_phone" class="layui-input" value="" lay-verify="required" lay-reqText="请输入电话号码"></td>
|
||||
</tr>
|
||||
<tr class="invoice-type">
|
||||
<td class="layui-td-gray-2">纳税人识别号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">纳税人识别号<font>*</font></td>
|
||||
<td><input type="text" name="invoice_tax" class="layui-input" value=""></td>
|
||||
<td class="layui-td-gray">开户行<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开户行<font>*</font></td>
|
||||
<td><input type="text" name="invoice_bank" class="layui-input" value=""></td>
|
||||
<td class="layui-td-gray">银行账号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="invoice_account" class="layui-input" value=""></td>
|
||||
</tr>
|
||||
<tr class="invoice-type">
|
||||
<td class="layui-td-gray-2">银行营业网点<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">银行营业网点<font>*</font></td>
|
||||
<td><input type="text" name="invoice_banking" class="layui-input" value=""></td>
|
||||
<td class="layui-td-gray">地址<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">地址<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">备注信息</td>
|
||||
<td colspan="5"><textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -82,15 +105,21 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开票金额<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票金额<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" name="amount" lay-verify="required|number" placeholder="请输入开票金额" lay-reqText="请输入开票金额" value="{$detail.amount}">
|
||||
</td>
|
||||
<td class="layui-td-gray">开票类型<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票类型<font>*</font></td>
|
||||
<td>
|
||||
<select name="invoice_type" lay-verify="required" lay-reqText="请选择开票类型">
|
||||
<option value="">请选择开票类型</option>
|
||||
@ -98,7 +127,7 @@
|
||||
<option value="2" {eq name="$detail.invoice_type" value="2"}selected{/eq}>增值税普通发票</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">开票主体<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票主体<font>*</font></td>
|
||||
<td>
|
||||
<select name="invoice_subject" lay-verify="required" lay-reqText="请选择开票主体">
|
||||
<option value="">请选择开票主体</option>
|
||||
@ -109,34 +138,56 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抬头类型<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">抬头类型<font>*</font></td>
|
||||
<td>
|
||||
<input type="radio" name="type" lay-filter="type" value="1" title="企业" {eq name="$detail.type" value="1"}checked{/eq}>
|
||||
<input type="radio" name="type" lay-filter="type" value="2" title="个人" {eq name="$detail.type" value="2"}checked{/eq}>
|
||||
</td>
|
||||
<td class="layui-td-gray">开票抬头<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开票抬头<font>*</font></td>
|
||||
<td><input type="text" name="invoice_title" class="layui-input" value="{$detail.invoice_title}"></td>
|
||||
<td class="layui-td-gray">电话号码<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">电话号码<font>*</font></td>
|
||||
<td><input type="text" name="invoice_phone" class="layui-input" value="{$detail.invoice_phone}"></td>
|
||||
</tr>
|
||||
<tr class="invoice-type" {eq name="$detail.type" value="2"}style="display:none"{/eq}>
|
||||
<td class="layui-td-gray-2">纳税人识别号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">纳税人识别号<font>*</font></td>
|
||||
<td><input type="text" name="invoice_tax" class="layui-input" value="{$detail.invoice_tax}"></td>
|
||||
<td class="layui-td-gray">开户行<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开户行<font>*</font></td>
|
||||
<td><input type="text" name="invoice_bank" class="layui-input" value="{$detail.invoice_bank}"></td>
|
||||
<td class="layui-td-gray">银行账号<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="invoice_account" class="layui-input" value="{$detail.invoice_account}"></td>
|
||||
</tr>
|
||||
<tr class="invoice-type" {eq name="$detail.type" value="2"}style="display:none"{/eq}>
|
||||
<td class="layui-td-gray-2">银行营业网点<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">银行营业网点<font>*</font></td>
|
||||
<td><input type="text" name="invoice_banking" class="layui-input" value="{$detail.invoice_banking}"></td>
|
||||
<td class="layui-td-gray">地址<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">地址<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value="{$detail.invoice_address}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">备注信息</td>
|
||||
<td colspan="5"><textarea name="remark" placeholder="请输入备注信息" class="layui-textarea">{$detail.remark}</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -154,6 +205,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
@ -169,9 +226,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, table = layui.table, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//选择收件人类型
|
||||
form.on('radio(type)', function (data) {
|
||||
@ -200,11 +323,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
});
|
||||
})
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -218,23 +348,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -244,8 +378,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -255,7 +388,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//监听提交
|
||||
|
@ -47,6 +47,22 @@
|
||||
|
||||
.layui-table-min th{font-size:13px; text-align:center; background-color:#f8f8f8;}
|
||||
.layui-table-min td{font-size:13px; padding:6px;text-align:center;}
|
||||
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 80px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
@ -103,6 +119,26 @@
|
||||
<td colspan="5">{$detail.remark}</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
<tr>
|
||||
<td class="layui-td-gray">发票状态</td>
|
||||
<td colspan="3">
|
||||
@ -124,7 +160,9 @@
|
||||
<span id="showRecord" class="layui-btn layui-btn-xs layui-btn-radius layui-btn-normal" style="margin-left:10px;">查看审批记录</span>
|
||||
</td>
|
||||
<td class="layui-td-gray-2">当前审核人</td>
|
||||
<td colspan="3">{$detail.check_user}</td>
|
||||
<td>{$detail.check_user}</td>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td>{$detail.copy_user}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程</td>
|
||||
|
@ -44,7 +44,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">应用部门</td>
|
||||
<td colspan="5">
|
||||
<select name="department_ids" xm-selected="" xm-select="select1" xm-select-skin="default"></select>
|
||||
<select id="department_ids" name="department_ids" xm-selected="" xm-select="select1" xm-select-skin="default"></select>
|
||||
<p style="padding:6px 0 0; font-size:12px; color:#999">不选,默认是全公司</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -96,6 +96,12 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table">
|
||||
@ -188,6 +194,12 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="{$detail.copy_uids}" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div class="py-3">
|
||||
@ -227,6 +239,12 @@
|
||||
url: '/api/index/get_department_select',
|
||||
keyword: selcted,
|
||||
});
|
||||
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
//监听提交
|
||||
form.on('submit(webform)', function(data){
|
||||
let callback = function (e) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
<a href="javascript:;" gg-event="shrink" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
|
||||
</span>
|
||||
<span class="gg-head-item gg-head-cache">
|
||||
<a href="javascript:;" gg-event="cache" title="清空缓存"><i class="layui-icon layui-icon-fonts-clear"></i></a>
|
||||
<a href="javascript:;" gg-event="cache" data-href="/api/index/cache_clear" title="清空缓存"><i class="layui-icon layui-icon-fonts-clear"></i></a>
|
||||
</span>
|
||||
<span class="gg-head-item gg-head-home">
|
||||
<a href="https://www.gougucms.com/home/pages/detail/s/gouguoa.html" target="_blank" title="前台首页"><i class="layui-icon layui-icon-website"></i></a>
|
||||
|
@ -66,7 +66,7 @@ CREATE TABLE `oa_admin_group` (
|
||||
-- ----------------------------
|
||||
-- Records of cms_admin_group
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (2, '人事总监权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,3,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,4,78,79,80,81,82,83,84,85,86,87,5,88,89,90,91,6,92,93,94,95,96,7,97,99,100,101,98,8,102,104,105,106,103,107,109,110,111,112,108,113,114,115,116,117,9,118,119,120,122,123,124,125,127,128,129,131,132,133,134', '人力资源部门领导的最高管理权限', 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
@ -273,57 +273,58 @@ INSERT INTO `oa_admin_rule` VALUES (96, 93, 'article/index/view', '查看', '知
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (97, 7, 'oa/approve/index', '我发起的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (98, 7, 'oa/approve/list', '我处理的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (99, 97, 'oa/approve/add', '新建/编辑', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (100, 97, 'oa/approve/view', '查看', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (101, 97, 'oa/approve/check', '审核', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (99, 7, 'oa/approve/copy', '抄送给我的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (100, 97, 'oa/approve/add', '新建/编辑', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (101, 97, 'oa/approve/view', '查看', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (102, 97, 'oa/approve/check', '审核', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (102, 8, 'oa/plan/calendar', '日程日历', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (103, 8, 'oa/plan/index', '日程安排', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (104, 102, 'oa/plan/add', '新建/编辑', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (105, 102, 'oa/plan/delete', '删除', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (106, 102, 'oa/plan/detail', '查看', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (103, 8, 'oa/plan/calendar', '日程日历', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (104, 8, 'oa/plan/index', '日程安排', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (105, 103, 'oa/plan/add', '新建/编辑', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (106, 103, 'oa/plan/delete', '删除', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (107, 103, 'oa/plan/detail', '查看', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (107, 8, 'oa/schedule/calendar', '工作日历', '工作日历', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (108, 8, 'oa/schedule/index', '工作记录', '工作记录', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (109, 107, 'oa/schedule/add', '新建/编辑', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (110, 107, 'oa/schedule/delete', '删除', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (111, 107, 'oa/schedule/detail', '查看', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (112, 107, 'oa/schedule/update_labor_time', '更改工时', '工时', 'OA', '', 0, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (108, 8, 'oa/schedule/calendar', '工作日历', '工作日历', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (109, 8, 'oa/schedule/index', '工作记录', '工作记录', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (110, 108, 'oa/schedule/add', '新建/编辑', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (111, 108, 'oa/schedule/delete', '删除', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (112, 108, 'oa/schedule/detail', '查看', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (113, 108, 'oa/schedule/update_labor_time', '更改工时', '工时', 'OA', '', 0, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (113, 8, 'oa/work/index', '工作汇报', '工作汇报', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (114, 113, 'oa/work/add', '新建/编辑', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (115, 113, 'oa/work/send', '发送', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (116, 113, 'oa/work/read', '查看', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (117, 113, 'oa/work/delete', '删除', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (114, 8, 'oa/work/index', '工作汇报', '工作汇报', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (115, 114, 'oa/work/add', '新建/编辑', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (116, 114, 'oa/work/send', '发送', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (117, 114, 'oa/work/read', '查看', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (118, 114, 'oa/work/delete', '删除', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (118, 9, '', '报销管理', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (119, 118, 'finance/expense/index', '我申请的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (120, 118, 'finance/expense/list', '我处理的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (121, 118, 'finance/expense/checkedlist', '报销打款', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (119, 9, '', '报销管理', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (120, 119, 'finance/expense/index', '我申请的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (121, 119, 'finance/expense/list', '我处理的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (122, 119, 'finance/expense/checkedlist', '报销打款', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (122, 118, 'finance/expense/add', '新建/编辑', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (123, 118, 'finance/expense/delete', '删除', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (124, 118, 'finance/expense/view', '查看', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (125, 118, 'finance/expense/check', '审核', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (126, 118, 'finance/expense/topay', '打款', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (123, 119, 'finance/expense/add', '新建/编辑', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (124, 119, 'finance/expense/delete', '删除', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (125, 119, 'finance/expense/view', '查看', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (126, 119, 'finance/expense/check', '审核', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (127, 119, 'finance/expense/topay', '打款', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (127, 9, '', '发票管理', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (128, 127, 'finance/invoice/index', '我申请的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (129, 127, 'finance/invoice/list', '我处理的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (130, 127, 'finance/invoice/checkedlist', '发票开具', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (128, 9, '', '发票管理', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (129, 128, 'finance/invoice/index', '我申请的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (130, 128, 'finance/invoice/list', '我处理的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (131, 128, 'finance/invoice/checkedlist', '发票开具', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (131, 127, 'finance/invoice/add', '新建/编辑', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (132, 127, 'finance/invoice/delete', '删除', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (133, 127, 'finance/invoice/view', '查看', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (134, 127, 'finance/invoice/check', '审核', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (135, 127, 'finance/invoice/open', '开具', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (136, 127, 'finance/invoice/tovoid', '作废', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (132, 128, 'finance/invoice/add', '新建/编辑', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (133, 128, 'finance/invoice/delete', '删除', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (134, 128, 'finance/invoice/view', '查看', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (135, 128, 'finance/invoice/check', '审核', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (136, 128, 'finance/invoice/open', '开具', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (137, 128, 'finance/invoice/tovoid', '作废', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (137, 9, 'finance/income/index', '到账管理', '到账记录', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (138, 137, 'finance/income/add', '新建/编辑', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (139, 137, 'finance/income/view', '查看', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (140, 137, 'finance/income/delete', '删除', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (141, 10, 'business/analysis/index', '智能分析', '智能分析', 'BI', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (138, 9, 'finance/income/index', '到账管理', '到账记录', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (139, 138, 'finance/income/add', '新建/编辑', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (140, 138, 'finance/income/view', '查看', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (141, 138, 'finance/income/delete', '删除', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (142, 10, 'business/analysis/index', '智能分析', '智能分析', 'BI', '', 1, 1, 1, 0, 0);
|
||||
|
||||
---------------------------------
|
||||
-- Table structure for oa_article
|
||||
@ -554,7 +555,7 @@ CREATE TABLE `oa_flow` (
|
||||
`type` tinyint(4) NOT NULL COMMENT '应用模块,1假勤,2行政,3财务,4人事,5其他,6报销,7发票,8合同',
|
||||
`flow_cate` tinyint(11) NOT NULL DEFAULT 0 COMMENT '应用审批类型id',
|
||||
`department_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '应用部门ID(0为全部)1,2,3',
|
||||
`user_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '员工ID',
|
||||
`copy_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '抄送人ID',
|
||||
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '流程说明',
|
||||
`flow_list` varchar(1000) NULL DEFAULT '' COMMENT '流程数据序列化',
|
||||
`admin_id` int(11) NOT NULL COMMENT '创建人ID',
|
||||
@ -588,7 +589,7 @@ INSERT INTO `oa_flow` VALUES (16, '入职申请审批', 2, 4, 16, '', '', '入
|
||||
INSERT INTO `oa_flow` VALUES (17, '转正申请审批', 2, 4, 17, '', '', '转正申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402812, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (18, '离职申请审批', 2, 4, 18, '', '', '离职申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402834, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (19, '转岗申请审批', 2, 4, 19, '', '', '转岗申请审核流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1654681954, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (20, '招聘需求审批', 2, 4, 21, '', '', '招聘需求审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402855, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (20, '招聘需求审批', 2, 4, 20, '', '', '招聘需求审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402855, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (21, '通用审批', 2, 5, 21, '', '', '通用审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1654686338, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (22, '报销审批', 2, 6, 22, '', '', '报销审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490024, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (23, '发票审批', 2, 7, 23, '', '', '发票审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490053, 0, 1, 0, 0);
|
||||
@ -675,8 +676,10 @@ CREATE TABLE `oa_expense` (
|
||||
`ptid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预定字段:关联项目ID',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3',
|
||||
`copy_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '抄送人ID,如:1,2,3',
|
||||
`file_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '附件ID,如:1,2,3',
|
||||
`check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态(0待审、1审批中、2通过、3失败、4撤销、5已打款)',
|
||||
`last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人',
|
||||
`pay_admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '打款人ID',
|
||||
@ -800,8 +803,10 @@ CREATE TABLE `oa_invoice` (
|
||||
`invoice_banking` varchar(100) NOT NULL DEFAULT '' COMMENT '银行营业网点',
|
||||
`invoice_address` varchar(100) NOT NULL DEFAULT '' COMMENT '地址',
|
||||
`check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3',
|
||||
`copy_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '抄送人ID,如:1,2,3',
|
||||
`file_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '附件ID,如:1,2,3',
|
||||
`check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '发票状态(0待审、1审批中、2通过、3失败、4撤销、5已开具、10已作废)',
|
||||
`last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人',
|
||||
`check_remark` text NULL COMMENT '审核不通过/撤销的理由',
|
||||
@ -877,7 +882,7 @@ DROP TABLE IF EXISTS `oa_message`;
|
||||
CREATE TABLE `oa_message` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '消息主题',
|
||||
`template` tinyint(2) NOT NULL DEFAULT 0 COMMENT '消息模板,用于前端拼接消息',
|
||||
`template` tinyint(2) NOT NULL DEFAULT 0 COMMENT '消息模板,用于前端拼接消息0私人消息,1公告,2办公审批,3报销审批,4发票审批,5合同审批',
|
||||
`content` text NULL COMMENT '消息内容',
|
||||
`from_uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送人id',
|
||||
`to_uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '接收人id',
|
||||
@ -1079,8 +1084,10 @@ CREATE TABLE `oa_approve` (
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,',
|
||||
`check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3',
|
||||
`flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3',
|
||||
`copy_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '抄送人ID,如:1,2,3',
|
||||
`file_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '附件ID,如:1,2,3',
|
||||
`check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态(0待审、1审批中、2通过、3失败、4撤销)',
|
||||
`last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人',
|
||||
`detail_type` int(11) NOT NULL DEFAULT 0 COMMENT '假期类型:1事假,2年假,3调休假,4病假,5婚假,6丧假,7产假,8陪产假,9其他',
|
||||
@ -1105,7 +1112,7 @@ CREATE TABLE `oa_flow_step` (
|
||||
`flow_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0自由指定,1当前部门负责人,2上一级部门负责人,3指定用户(任意一人),4指定用户(多人会签)',
|
||||
`flow_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '审批人ID (使用逗号隔开) 1,2,3',
|
||||
`sort` tinyint(4) NOT NULL DEFAULT 0 COMMENT '排序ID',
|
||||
`type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批类型:1日常审批,2报销审批,3发票审批',
|
||||
`type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批类型:1日常审批,2报销审批,3发票审批,4合同审批',
|
||||
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`delete_time` int(11) NOT NULL DEFAULT 0 COMMENT '删除时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
|
@ -17,7 +17,7 @@ CREATE TABLE `oa_admin_group` (
|
||||
-- ----------------------------
|
||||
-- Records of cms_admin_group
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0);
|
||||
INSERT INTO `oa_admin_group` VALUES (2, '人事总监权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,3,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,4,78,79,80,81,82,83,84,85,86,87,5,88,89,90,91,6,92,93,94,95,96,7,97,99,100,101,98,8,102,104,105,106,103,107,109,110,111,112,108,113,114,115,116,117,9,118,119,120,122,123,124,125,127,128,129,131,132,133,134', '人力资源部门领导的最高管理权限', 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
@ -198,57 +198,58 @@ INSERT INTO `oa_admin_rule` VALUES (96, 93, 'article/index/view', '查看', '知
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (97, 7, 'oa/approve/index', '我发起的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (98, 7, 'oa/approve/list', '我处理的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (99, 97, 'oa/approve/add', '新建/编辑', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (100, 97, 'oa/approve/view', '查看', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (101, 97, 'oa/approve/check', '审核', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (99, 7, 'oa/approve/copy', '抄送给我的', '办公审批', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (100, 97, 'oa/approve/add', '新建/编辑', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (101, 97, 'oa/approve/view', '查看', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (102, 97, 'oa/approve/check', '审核', '办公审批', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (102, 8, 'oa/plan/calendar', '日程日历', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (103, 8, 'oa/plan/index', '日程安排', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (104, 102, 'oa/plan/add', '新建/编辑', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (105, 102, 'oa/plan/delete', '删除', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (106, 102, 'oa/plan/detail', '查看', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (103, 8, 'oa/plan/calendar', '日程日历', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (104, 8, 'oa/plan/index', '日程安排', '日程安排', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (105, 103, 'oa/plan/add', '新建/编辑', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (106, 103, 'oa/plan/delete', '删除', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (107, 103, 'oa/plan/detail', '查看', '日程安排', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (107, 8, 'oa/schedule/calendar', '工作日历', '工作日历', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (108, 8, 'oa/schedule/index', '工作记录', '工作记录', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (109, 107, 'oa/schedule/add', '新建/编辑', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (110, 107, 'oa/schedule/delete', '删除', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (111, 107, 'oa/schedule/detail', '查看', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (112, 107, 'oa/schedule/update_labor_time', '更改工时', '工时', 'OA', '', 0, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (108, 8, 'oa/schedule/calendar', '工作日历', '工作日历', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (109, 8, 'oa/schedule/index', '工作记录', '工作记录', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (110, 108, 'oa/schedule/add', '新建/编辑', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (111, 108, 'oa/schedule/delete', '删除', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (112, 108, 'oa/schedule/detail', '查看', '工作记录', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (113, 108, 'oa/schedule/update_labor_time', '更改工时', '工时', 'OA', '', 0, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (113, 8, 'oa/work/index', '工作汇报', '工作汇报', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (114, 113, 'oa/work/add', '新建/编辑', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (115, 113, 'oa/work/send', '发送', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (116, 113, 'oa/work/read', '查看', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (117, 113, 'oa/work/delete', '删除', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (114, 8, 'oa/work/index', '工作汇报', '工作汇报', 'OA', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (115, 114, 'oa/work/add', '新建/编辑', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (116, 114, 'oa/work/send', '发送', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (117, 114, 'oa/work/read', '查看', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (118, 114, 'oa/work/delete', '删除', '工作汇报', 'OA', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (118, 9, '', '报销管理', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (119, 118, 'finance/expense/index', '我申请的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (120, 118, 'finance/expense/list', '我处理的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (121, 118, 'finance/expense/checkedlist', '报销打款', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (119, 9, '', '报销管理', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (120, 119, 'finance/expense/index', '我申请的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (121, 119, 'finance/expense/list', '我处理的', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (122, 119, 'finance/expense/checkedlist', '报销打款', '报销', 'CF', '', 1, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (122, 118, 'finance/expense/add', '新建/编辑', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (123, 118, 'finance/expense/delete', '删除', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (124, 118, 'finance/expense/view', '查看', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (125, 118, 'finance/expense/check', '审核', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (126, 118, 'finance/expense/topay', '打款', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (123, 119, 'finance/expense/add', '新建/编辑', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (124, 119, 'finance/expense/delete', '删除', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (125, 119, 'finance/expense/view', '查看', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (126, 119, 'finance/expense/check', '审核', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (127, 119, 'finance/expense/topay', '打款', '报销', 'CF', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (127, 9, '', '发票管理', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (128, 127, 'finance/invoice/index', '我申请的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (129, 127, 'finance/invoice/list', '我处理的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (130, 127, 'finance/invoice/checkedlist', '发票开具', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (128, 9, '', '发票管理', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (129, 128, 'finance/invoice/index', '我申请的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (130, 128, 'finance/invoice/list', '我处理的', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (131, 128, 'finance/invoice/checkedlist', '发票开具', '发票', 'CF', '', 1, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (131, 127, 'finance/invoice/add', '新建/编辑', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (132, 127, 'finance/invoice/delete', '删除', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (133, 127, 'finance/invoice/view', '查看', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (134, 127, 'finance/invoice/check', '审核', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (135, 127, 'finance/invoice/open', '开具', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (136, 127, 'finance/invoice/tovoid', '作废', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (132, 128, 'finance/invoice/add', '新建/编辑', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (133, 128, 'finance/invoice/delete', '删除', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (134, 128, 'finance/invoice/view', '查看', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (135, 128, 'finance/invoice/check', '审核', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (136, 128, 'finance/invoice/open', '开具', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (137, 128, 'finance/invoice/tovoid', '作废', '发票', 'CF', '', 2, 1, 1, 0, 0);
|
||||
|
||||
INSERT INTO `oa_admin_rule` VALUES (137, 9, 'finance/income/index', '到账管理', '到账记录', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (138, 137, 'finance/income/add', '新建/编辑', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (139, 137, 'finance/income/view', '查看', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (140, 137, 'finance/income/delete', '删除', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (141, 10, 'business/analysis/index', '智能分析', '智能分析', 'BI', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (138, 9, 'finance/income/index', '到账管理', '到账记录', 'CF', '', 1, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (139, 138, 'finance/income/add', '新建/编辑', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (140, 138, 'finance/income/view', '查看', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (141, 138, 'finance/income/delete', '删除', '到账记录', 'CF', '', 2, 1, 1, 0, 0);
|
||||
INSERT INTO `oa_admin_rule` VALUES (142, 10, 'business/analysis/index', '智能分析', '智能分析', 'BI', '', 1, 1, 1, 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_article_cate
|
||||
@ -444,7 +445,7 @@ CREATE TABLE `oa_flow` (
|
||||
`type` tinyint(4) NOT NULL COMMENT '应用模块,1假勤,2行政,3财务,4人事,5其他,6报销,7发票,8合同',
|
||||
`flow_cate` tinyint(11) NOT NULL DEFAULT 0 COMMENT '应用审批类型id',
|
||||
`department_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '应用部门ID(0为全部)1,2,3',
|
||||
`user_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '员工ID',
|
||||
`copy_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '抄送人ID,如:1,2,3,',
|
||||
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '流程说明',
|
||||
`flow_list` varchar(1000) NULL DEFAULT '' COMMENT '流程数据序列化',
|
||||
`admin_id` int(11) NOT NULL COMMENT '创建人ID',
|
||||
@ -478,7 +479,7 @@ INSERT INTO `oa_flow` VALUES (16, '入职申请审批', 2, 4, 16, '', '', '入
|
||||
INSERT INTO `oa_flow` VALUES (17, '转正申请审批', 2, 4, 17, '', '', '转正申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402812, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (18, '离职申请审批', 2, 4, 18, '', '', '离职申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402834, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (19, '转岗申请审批', 2, 4, 19, '', '', '转岗申请审核流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1654681954, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (20, '招聘需求审批', 2, 4, 21, '', '', '招聘需求审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402855, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (20, '招聘需求审批', 2, 4, 20, '', '', '招聘需求审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402855, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (21, '通用审批', 2, 5, 21, '', '', '通用审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1654686338, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (22, '报销审批', 2, 6, 22, '', '', '报销审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490024, 0, 1, 0, 0);
|
||||
INSERT INTO `oa_flow` VALUES (23, '发票审批', 2, 7, 23, '', '', '发票审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490053, 0, 1, 0, 0);
|
||||
@ -508,7 +509,6 @@ INSERT INTO `oa_cost_cate` VALUES (5, '通讯费', 1, 1639898564, 0);
|
||||
INSERT INTO `oa_cost_cate` VALUES (6, '采购付款', 1, 1639898564, 0);
|
||||
INSERT INTO `oa_cost_cate` VALUES (7, '其他', 1, 1639898564, 0);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_seal_cate
|
||||
-- ----------------------------
|
||||
|
@ -314,19 +314,22 @@ class Index extends BaseController
|
||||
$user_names=[];
|
||||
//已读回执
|
||||
$read_user_names = [];
|
||||
|
||||
if($detail['from_uid'] == $this->uid){
|
||||
$mails= Db::name('Message')->where(['pid' => $id])->select()->toArray();
|
||||
$read_mails= Db::name('Message')->where([['pid','=',$id],['read_time','>',2]])->select()->toArray();
|
||||
$read_user_ids = array_column($read_mails, 'to_uid');
|
||||
$read_users = Db::name('Admin')->where('status', 1)->where('id', 'in', $read_user_ids)->select()->toArray();
|
||||
$read_user_names = array_column($read_users, 'name');
|
||||
|
||||
$user_ids = array_column($mails, 'to_uid');
|
||||
$users = Db::name('Admin')->where('status', 1)->where('id', 'in', $user_ids)->select()->toArray();
|
||||
$user_names = array_column($users, 'name');
|
||||
}
|
||||
else{
|
||||
$mails= Db::name('Message')->where(['pid' => $detail['pid']])->select()->toArray();
|
||||
}
|
||||
$user_ids = array_column($mails, 'to_uid');
|
||||
$users = Db::name('Admin')->where('status', 1)->where('id', 'in', $user_ids)->select()->toArray();
|
||||
$user_names = array_column($users, 'name');
|
||||
else{
|
||||
$users = Db::name('Admin')->where('id', $detail['to_uid'])->value('name');
|
||||
array_push($user_names,$users);
|
||||
}
|
||||
|
||||
$detail['users'] = implode(",", $user_names);
|
||||
$detail['read_users'] = implode(",", $read_user_names);
|
||||
|
@ -15,7 +15,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr id ="person">
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<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="hidden" name="uids" value="">
|
||||
@ -24,12 +24,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">主题<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">主题<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray">发送内容<span style="color: red">*</span></td>
|
||||
<tr><td class="layui-td-gray">发送内容<font>*</font></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容"></textarea>
|
||||
</td>
|
||||
@ -67,7 +67,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">收件人<font>*</font></td>
|
||||
<td>
|
||||
{eq name="$detail.type" value="3"}
|
||||
<input type="text" name="person_name" value="0" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
@ -80,12 +80,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">主题<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">主题<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray">发送内容<span style="color: red">*</span></td>
|
||||
<tr><td class="layui-td-gray">发送内容<font>*</font></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容">{$detail.content}</textarea>
|
||||
{if condition="($detail.fid > 0)"}
|
||||
|
@ -29,37 +29,41 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">消息内容</td>
|
||||
<td colspan="5">
|
||||
{$detail.content}
|
||||
{if condition="($detail.fid > 0)"}
|
||||
<table class="layui-table" style="margin-top:10px;">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">引用消息内容</td>
|
||||
<td style="color:#999">{$detail.from_content}</td>
|
||||
</tr>
|
||||
{notempty name="$detail.from_file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray-2" style="vertical-align:top">引用消息附件</td>
|
||||
<td>
|
||||
<table class="layui-table" style="max-width: 680px;">
|
||||
<thead>
|
||||
<th width="70%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="10%" style="text-align:center">操作</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="$detail.from_file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;"><a class="layui-btn layui-btn-xs layui-btn-normal" href="{$vo.filepath}" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{if condition="($detail.template == 0)"}
|
||||
{$detail.content}
|
||||
{if condition="($detail.fid > 0)"}
|
||||
<table class="layui-table" style="margin-top:10px;">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">引用消息内容</td>
|
||||
<td style="color:#999">{$detail.from_content}</td>
|
||||
</tr>
|
||||
{notempty name="$detail.from_file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray-2" style="vertical-align:top">引用消息附件</td>
|
||||
<td>
|
||||
<table class="layui-table" style="max-width: 680px;">
|
||||
<thead>
|
||||
<th width="70%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="10%" style="text-align:center">操作</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="$detail.from_file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;"><a class="layui-btn layui-btn-xs layui-btn-normal" href="{$vo.filepath}" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{/if}
|
||||
{else/}
|
||||
{$detail.content}{:getMessageLink($detail.template,$detail.action_id)}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
@ -102,4 +106,9 @@
|
||||
{/if}
|
||||
</form>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
<!-- /主体 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
</script>
|
||||
{/block}
|
@ -19,7 +19,7 @@
|
||||
</tr>
|
||||
{if condition="$type eq 1"}
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">收件人<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="person_name" value="{$detail.person_name}" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
<input type="hidden" name="uids" value="{$detail.from_uid}">
|
||||
@ -28,14 +28,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">主题<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">主题<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="回复:{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
{else/}
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<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="hidden" name="uids" value="">
|
||||
@ -44,14 +44,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">主题<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">主题<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="转发:{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">内容<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">内容<font>*</font></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容"></textarea>
|
||||
|
||||
|
@ -77,7 +77,12 @@ class Index extends BaseController
|
||||
if ($sid) {
|
||||
add_log('add', $sid, $param);
|
||||
$users= Db::name('Admin')->field('id as from_uid')->where(['status' => 1])->column('id');
|
||||
sendMessage($users,1,['title'=>$param['title'],'action_id'=>$sid]);
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'title' => $param['title'],
|
||||
'action_id'=>$sid
|
||||
];
|
||||
sendMessage($users,1,$msg);
|
||||
}
|
||||
|
||||
return to_assign();
|
||||
|
@ -14,7 +14,7 @@
|
||||
<input type="text" name="title" lay-verify="required" lay-reqText="请输入公告标题" placeholder="请输入公告标题" class="layui-input"
|
||||
{notempty name="$note.title" }value="{$note.title}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray">公告分类<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">公告分类<font>*</font></td>
|
||||
<td>
|
||||
<select name="cate_id" lay-verify="required" lay-reqText="请选择分类">
|
||||
<option value="">请选择分类</option>
|
||||
@ -31,7 +31,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">展示期间<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">展示期间<font>*</font></td>
|
||||
<td id="date">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="start_time" name="start_time" readonly lay-verify="required" lay-reqText="请选择公告展示开始时间" placeholder="请选择时间" class="layui-input" {notempty name="$note.start_time" }value="{$note.start_time | date='Y-m-d'}" {/notempty}>
|
||||
@ -41,7 +41,7 @@
|
||||
<input type="text" id="end_time" name="end_time" readonly lay-verify="required" lay-reqText="请选择公告展示结束时间" placeholder="请选择时间" class="layui-input" {notempty name="$note.end_time" }value="{$note.end_time | date='Y-m-d'}" {/notempty}>
|
||||
</div>
|
||||
</td>
|
||||
<td class="layui-td-gray">状态<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">状态<font>*</font></td>
|
||||
<td>
|
||||
{if condition="$id eq 0"}
|
||||
<input type="radio" name="status" value="1" title="正常" checked>
|
||||
@ -65,7 +65,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">公告内容<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">公告内容<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="content" placeholder="请输入内容" class="layui-textarea" id="container" style="border:0;padding:0">{notempty name="$note.content" }{$note.content}{/notempty}</textarea>
|
||||
</td>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<form class="layui-form p-4">
|
||||
<h1>{$note.title}</h1>
|
||||
<div class="text-detial-ops">
|
||||
<span>发表于:{$note.create_time | date='Y-m-d m:i:s'}</span><span>公告分类:{$note.cate_title}</span>
|
||||
<span>发表于:{$note.create_time | date='Y-m-d H:i:s'}</span><span>公告分类:{$note.cate_title}</span>
|
||||
<span>展示期间:{$note.start_time | date='Y-m-d'} - {$note.end_time | date='Y-m-d'}</span>
|
||||
</div>
|
||||
<div class="text-detial-content">
|
||||
|
@ -102,7 +102,7 @@ class Approve extends BaseController
|
||||
->join('Admin a', 'a.id = f.create_admin_id', 'left')
|
||||
->join('Department d', 'd.id = f.department_id', 'left')
|
||||
->join('FlowType t', 't.id = f.type', 'left')
|
||||
->whereOr($map1)
|
||||
->where($map1)
|
||||
->order('f.id desc')
|
||||
->group('f.id')
|
||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||
@ -139,8 +139,41 @@ class Approve extends BaseController
|
||||
}
|
||||
return table_assign(0, '', $list);
|
||||
} else {
|
||||
$list = Db::name('FlowType')->where(['status'=>1])->select()->toArray();
|
||||
View::assign('list', $list);
|
||||
return view();
|
||||
}
|
||||
}
|
||||
|
||||
public function copy()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
$param = get_params();
|
||||
$user_id = $this->uid;
|
||||
//查询条件
|
||||
$map = [];
|
||||
$map[] = ['check_status', '=', 2];
|
||||
$map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',copy_uids)")];
|
||||
$rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
||||
$list = Db::name('Approve')
|
||||
->field('f.*,a.name,d.title as department_name,t.title as flow_type')
|
||||
->alias('f')
|
||||
->join('Admin a', 'a.id = f.create_admin_id', 'left')
|
||||
->join('Department d', 'd.id = f.department_id', 'left')
|
||||
->join('FlowType t', 't.id = f.type', 'left')
|
||||
->where($map)
|
||||
->order('f.id desc')
|
||||
->group('f.id')
|
||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||
->each(function($item, $key){
|
||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
||||
$item['check_user'] = '-';
|
||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||
$item['check_user'] = implode(',',$check_user);
|
||||
}
|
||||
return $item;
|
||||
});
|
||||
return table_assign(0, '', $list);
|
||||
} else {
|
||||
return view();
|
||||
}
|
||||
}
|
||||
@ -177,6 +210,7 @@ class Approve extends BaseController
|
||||
$param['update_time'] = time();
|
||||
$param['check_status'] = 0;
|
||||
$param['check_step_sort'] = 0;
|
||||
//删除原来的审核流程和审核记录
|
||||
Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>1,'delete_time'=>0])->update(['delete_time'=>time()]);
|
||||
Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>1,'delete_time'=>0])->update(['delete_time'=>time()]);
|
||||
|
||||
@ -222,6 +256,14 @@ class Approve extends BaseController
|
||||
$res = Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step);
|
||||
}
|
||||
add_log('edit', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'title' => Db::name('FlowType')->where('id',$param['type'])->value('title'),
|
||||
'action_id'=>$param['id']
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,21,$msg);
|
||||
} else {
|
||||
$param['create_admin_id'] = $this->uid;
|
||||
$param['department_id'] = get_login_admin('did');
|
||||
@ -269,6 +311,14 @@ class Approve extends BaseController
|
||||
$res = Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step);
|
||||
}
|
||||
add_log('add', $aid, $param);
|
||||
//给审核人发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$this->uid,
|
||||
'title' => Db::name('FlowType')->where('id',$param['type'])->value('title'),
|
||||
'action_id'=>$aid
|
||||
];
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,21,$msg);
|
||||
}
|
||||
return to_assign();
|
||||
} else {
|
||||
@ -285,6 +335,10 @@ class Approve extends BaseController
|
||||
$detail['days'] = floor($detail['duration']*10/75);
|
||||
$detail['hours'] = (($detail['duration']*10)%75)/10;
|
||||
$type = $detail['type'];
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
View::assign('detail', $detail);
|
||||
}
|
||||
$department = get_login_admin('did');
|
||||
@ -329,6 +383,7 @@ class Approve extends BaseController
|
||||
$detail['create_user'] = Db::name('Admin')->where('id',$detail['create_admin_id'])->value('name');
|
||||
$flows = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>1,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
||||
$detail['check_user'] = '-';
|
||||
$detail['copy_user'] = '-';
|
||||
$check_user_ids = [];
|
||||
if($detail['check_status']<2){
|
||||
if($flows['flow_type']==1){
|
||||
@ -345,6 +400,14 @@ class Approve extends BaseController
|
||||
$detail['check_user'] = implode(',',$check_user);
|
||||
}
|
||||
}
|
||||
if($detail['copy_uids'] !=''){
|
||||
$copy_user = Db::name('Admin')->where('id','in',$detail['copy_uids'])->column('name');
|
||||
$detail['copy_user'] = implode(',',$copy_user);
|
||||
}
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
|
||||
$is_check_admin = 0;
|
||||
$is_create_admin = 0;
|
||||
@ -383,6 +446,10 @@ class Approve extends BaseController
|
||||
{
|
||||
$param = get_params();
|
||||
$detail = Db::name('Approve')->where('id',$param['id'])->find();
|
||||
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
|
||||
if (!in_array($this->uid, $check_admin_ids)){
|
||||
return to_assign(1,'您没权限审核该审批');
|
||||
}
|
||||
//当前审核节点详情
|
||||
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>1,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
||||
//审核通过
|
||||
@ -408,6 +475,9 @@ class Approve extends BaseController
|
||||
$param['check_admin_ids'] ='';
|
||||
}
|
||||
}
|
||||
else{
|
||||
$param['check_status'] = 1;
|
||||
}
|
||||
}
|
||||
else if($step['flow_type'] == 0){
|
||||
//自由人审批
|
||||
@ -471,6 +541,22 @@ class Approve extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('check', $param['id'], $param);
|
||||
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'from_uid'=>$detail['create_admin_id'],
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'title' => Db::name('FlowType')->where('id',$detail['type'])->value('title'),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
if($param['check_status'] == 1){
|
||||
$users = $param['check_admin_ids'];
|
||||
sendMessage($users,21,$msg);
|
||||
}
|
||||
if($param['check_status'] == 2){
|
||||
$users = $detail['create_admin_id'];
|
||||
sendMessage($users,22,$msg);
|
||||
}
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
@ -496,6 +582,14 @@ class Approve extends BaseController
|
||||
);
|
||||
$aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData);
|
||||
add_log('refue', $param['id'], $param);
|
||||
//发送消息通知
|
||||
$msg=[
|
||||
'create_time'=>date('Y-m-d H:i:s',$detail['create_time']),
|
||||
'title' => Db::name('FlowType')->where('id',$detail['type'])->value('title'),
|
||||
'action_id'=>$detail['id']
|
||||
];
|
||||
$users = $detail['create_admin_id'];
|
||||
sendMessage($users,23,$msg);
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
|
@ -190,7 +190,7 @@ class Work extends BaseController
|
||||
}
|
||||
$sender = get_admin($detail['admin_id']);
|
||||
$detail['person_name'] = $sender['name'];
|
||||
$detail['send_time'] = date('Y-m-d h:i:s',$detail['create_time']);
|
||||
$detail['send_time'] = date('Y-m-d H:i:s',$detail['create_time']);
|
||||
//当前消息的附件
|
||||
$file_array = Db::name('WorkFileInterfix')
|
||||
->field('wf.id,wf.wid,wf.file_id,f.name,f.filesize,f.filepath')
|
||||
@ -206,7 +206,7 @@ class Work extends BaseController
|
||||
$detail['read_users'] = implode(",", $read_user_names);
|
||||
$detail['type_title'] = WorkRecord::$Type[$detail['type']];
|
||||
if($detail['update_time']>0){
|
||||
$detail['update_time_str'] = date('Y-m-d h:i:s',$detail['update_time']);
|
||||
$detail['update_time_str'] = date('Y-m-d H:i:s',$detail['update_time']);
|
||||
}
|
||||
View::assign('detail', $detail);
|
||||
return view();
|
||||
|
@ -33,7 +33,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -59,7 +59,7 @@
|
||||
<option value="18:00">18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -116,6 +116,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -137,7 +143,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -163,7 +169,7 @@
|
||||
<option value="18:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -220,6 +226,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -402,6 +414,13 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -420,23 +439,27 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -446,8 +469,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -457,7 +479,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">物品名称<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入物品名称" lay-verify="required" lay-reqText="请输入物品名称" class="layui-input"></td>
|
||||
<td class="layui-td-gray-2">期望交互日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">期望交互日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -34,6 +34,14 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -51,13 +59,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">物品名称<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入物品名称" lay-verify="required" lay-reqText="请输入物品名称" class="layui-input"></td>
|
||||
<td class="layui-td-gray-2">期望交互日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">期望交互日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -80,6 +94,28 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$detail.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -97,6 +133,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -112,9 +154,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#detail_time',
|
||||
@ -161,11 +269,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -179,23 +294,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -205,8 +324,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -216,7 +334,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{eq name="$id" value="0"}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -41,7 +41,7 @@
|
||||
<option value="20:00">20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -85,6 +85,14 @@
|
||||
<textarea name="content" placeholder="请输入出差事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入出差事由"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -102,11 +110,17 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -138,7 +152,7 @@
|
||||
<option value="20:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -182,6 +196,28 @@
|
||||
<textarea name="content" placeholder="请输入出差事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入出差事由">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -199,6 +235,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -214,9 +256,30 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time_a',
|
||||
@ -232,6 +295,50 @@ const moduleInit = ['tool','employeepicker'];
|
||||
format: 'yyyy-MM-dd',
|
||||
showBottom: false
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
@ -269,11 +376,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -287,23 +401,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -313,8 +431,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -324,9 +441,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<option value="7">其他</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">付款日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">付款日期<font>*</font></td>
|
||||
<td>
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -32,11 +32,11 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">收款人全称<font>*</font></td>
|
||||
<td><input type="text" name="name" value="" autocomplete="off" placeholder="请输入收款人全称" lay-verify="required" lay-reqText="请输入收款人全称" class="layui-input"></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="bank" value="" autocomplete="off" placeholder="请输入银行账号" lay-verify="required|number" lay-reqText="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">银行账号</td>
|
||||
<td><input type="text" name="bank" value="" autocomplete="off" placeholder="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行</td>
|
||||
<td>
|
||||
<input name="address" autocomplete="off" class="layui-input" value="" lay-verify="required" placeholder="请输入开户行" lay-reqText="请输入开户行">
|
||||
<input name="address" autocomplete="off" class="layui-input" value="" placeholder="请输入开户行">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -51,6 +51,14 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -68,6 +76,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -87,7 +101,7 @@
|
||||
<option value="7" {eq name="$detail.detail_type" value="7"}selected=""{/eq}>其他</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">付款日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">付款日期<font>*</font></td>
|
||||
<td>
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -95,11 +109,11 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">收款人全称<font>*</font></td>
|
||||
<td><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入收款人全称" lay-verify="required" lay-reqText="请输入收款人全称" class="layui-input"></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="bank" value="{$detail.bank}" autocomplete="off" placeholder="请输入银行账号" lay-verify="required|number" lay-reqText="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">银行账号</td>
|
||||
<td><input type="text" name="bank" value="{$detail.bank}" autocomplete="off" placeholder="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行</td>
|
||||
<td>
|
||||
<input name="address" autocomplete="off" class="layui-input" value="{$detail.address}" lay-verify="required" placeholder="请输入开户行" lay-reqText="请输入开户行">
|
||||
<input name="address" autocomplete="off" class="layui-input" value="{$detail.address}" placeholder="请输入开户行">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -114,6 +128,28 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$detail.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -131,6 +167,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -146,9 +188,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -196,11 +304,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -214,23 +329,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -240,8 +359,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -251,9 +369,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">来文单位<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="address" value="" autocomplete="off" placeholder="请输入来文单位" lay-verify="required" lay-reqText="请输入来文单位" class="layui-input"></td>
|
||||
<td class="layui-td-gray">来文日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">来文日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -57,6 +57,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -76,7 +82,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">来文单位<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="address" value="{$detail.address}" autocomplete="off" placeholder="请输入来文单位" lay-verify="required" lay-reqText="请输入来文单位" class="layui-input"></td>
|
||||
<td class="layui-td-gray">来文日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">来文日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" readonly autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -108,6 +114,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -123,9 +135,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -171,11 +183,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -189,23 +208,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -215,8 +238,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -226,9 +248,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{eq name="$id" value="0"}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -41,7 +41,7 @@
|
||||
<option value="20:00">20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -102,11 +102,17 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -138,7 +144,7 @@
|
||||
<option value="20:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -199,6 +205,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -214,9 +226,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -270,11 +282,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -288,23 +307,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -314,8 +337,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -325,7 +347,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -21,7 +21,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -53,7 +53,7 @@
|
||||
<option value="20:00">20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -93,6 +93,14 @@
|
||||
<textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -110,6 +118,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -126,7 +140,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -158,7 +172,7 @@
|
||||
<option value="20:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>20:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" readonly class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -198,6 +212,28 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$detail.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -215,6 +251,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -230,9 +272,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -288,11 +396,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -306,23 +421,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -332,8 +451,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -343,9 +461,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{eq name="$id" value="0"}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -64,7 +64,7 @@
|
||||
<option value="23:30">23:30</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -148,11 +148,17 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -207,7 +213,7 @@
|
||||
<option value="23:30" {eq name="$detail.start_time_b" value="23:30"}selected=""{/eq}>23:30</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -291,6 +297,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -331,9 +343,9 @@ function leaveTime() {
|
||||
}
|
||||
|
||||
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time_a',
|
||||
@ -419,6 +431,13 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -437,23 +456,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -463,8 +486,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -474,9 +496,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">奖励金额<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="amount" value="" autocomplete="off" placeholder="请输入奖励金额" lay-verify="required|number" lay-reqText="请输入奖励金额" class="layui-input"></td>
|
||||
<td class="layui-td-gray">奖励日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">奖励日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -28,6 +28,14 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -45,13 +53,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">奖励金额<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="amount" value="{$detail.amount}" autocomplete="off" placeholder="请输入奖励金额" lay-verify="required|number" lay-reqText="请输入奖励金额" class="layui-input"></td>
|
||||
<td class="layui-td-gray">奖励日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">奖励日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -68,6 +82,28 @@
|
||||
<textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$detail.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -85,6 +121,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -100,9 +142,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#detail_time',
|
||||
@ -149,11 +257,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -167,23 +282,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -193,8 +312,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -204,7 +322,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -20,7 +20,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">申请日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">申请日期<font>*</font></td>
|
||||
<td>
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -30,7 +30,7 @@
|
||||
<td><input type="text" name="name" value="" autocomplete="off" placeholder="请输入借款人" lay-verify="required" lay-reqText="请输入借款人" class="layui-input"></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="bank" value="" autocomplete="off" placeholder="请输入银行账号" lay-verify="required|number" lay-reqText="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开户行<font>*</font></td>
|
||||
<td>
|
||||
<input name="address" autocomplete="off" class="layui-input" value="" lay-verify="required" placeholder="请输入开户行" lay-reqText="请输入开户行">
|
||||
</td>
|
||||
@ -64,6 +64,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -79,7 +85,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">申请日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">申请日期<font>*</font></td>
|
||||
<td>
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -89,7 +95,7 @@
|
||||
<td><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入借款人" lay-verify="required" lay-reqText="请输入借款人" class="layui-input"></td>
|
||||
<td class="layui-td-gray">银行账号<font>*</font></td>
|
||||
<td><input type="text" name="bank" value="{$detail.bank}" autocomplete="off" placeholder="请输入银行账号" lay-verify="required|number" lay-reqText="请输入银行账号" class="layui-input"></td>
|
||||
<td class="layui-td-gray">开户行 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开户行<font>*</font></td>
|
||||
<td>
|
||||
<input name="address" autocomplete="off" class="layui-input" value="{$detail.address}" lay-verify="required" placeholder="请输入开户行" lay-reqText="请输入开户行">
|
||||
</td>
|
||||
@ -123,6 +129,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -138,9 +150,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -188,11 +200,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -206,23 +225,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -232,8 +255,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -243,7 +265,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -50,6 +50,14 @@
|
||||
<textarea name="content" placeholder="请输入离职原因" class="layui-textarea" lay-verify="required" lay-reqText="请输入离职原因"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -67,13 +75,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -112,6 +126,28 @@
|
||||
<textarea name="content" placeholder="请输入离职原因" class="layui-textarea" lay-verify="required" lay-reqText="请输入离职原因">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -129,6 +165,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -144,9 +186,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//日期时间
|
||||
laydate.render({
|
||||
elem: '#detail_time,#start_time,#end_time',
|
||||
@ -191,11 +299,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -209,23 +324,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -235,8 +354,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -246,9 +364,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -26,7 +26,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -52,7 +52,7 @@
|
||||
<option value="18:00">18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -92,6 +92,14 @@
|
||||
<textarea name="content" placeholder="请输入请假事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入请假事由"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -109,6 +117,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -130,7 +144,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -156,7 +170,7 @@
|
||||
<option value="18:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -196,6 +210,28 @@
|
||||
<textarea name="content" placeholder="请输入请假事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入请假事由">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -213,6 +249,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -292,9 +334,31 @@ function leaveTime() {
|
||||
return hour;
|
||||
}
|
||||
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time_a',
|
||||
@ -318,6 +382,50 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
}
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#end_time_a',
|
||||
@ -372,8 +480,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
$('[name="check_admin_name"]').val(names);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
})
|
||||
//监听提交
|
||||
form.on('submit(webform)', function(data){
|
||||
console.log(data.field);
|
||||
@ -395,6 +502,13 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -413,23 +527,27 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -439,8 +557,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -450,9 +567,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -68,13 +68,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -131,6 +137,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -146,9 +158,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -194,11 +206,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -212,23 +231,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -238,8 +261,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -249,7 +271,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -5,4 +5,19 @@
|
||||
.layui-form-item .layui-btn-danger{display:none; margin-top:-8px}
|
||||
.layui-form-item:hover .layui-btn-danger{display:inline-block;}
|
||||
.select-1,.select-2{display:none;}
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 110px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
@ -22,11 +22,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">审批详细描述<font>*</font></td>
|
||||
<td class="layui-td-gray">详细描述<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入审批详细描述" class="layui-textarea" lay-verify="required" lay-reqText="请输入审批详细描述"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -44,6 +52,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -61,11 +75,33 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">审批详细描述<font>*</font></td>
|
||||
<td class="layui-td-gray">详细描述<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入审批详细描述" class="layui-textarea" lay-verify="required" lay-reqText="请输入审批详细描述">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -83,6 +119,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -98,9 +140,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
if($('[name="flow_id"]').val()==''){
|
||||
@ -137,11 +245,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -155,23 +270,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -181,8 +300,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -192,7 +310,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<td colspan="5"><input type="text" name="address" value="" autocomplete="off" placeholder="请输入外出地点" lay-verify="required" lay-reqText="请输入外出地点" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -39,7 +39,7 @@
|
||||
<option value="18:00">18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -79,6 +79,14 @@
|
||||
<textarea name="content" placeholder="请输入外出事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入外出事由"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -96,6 +104,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -104,7 +118,7 @@
|
||||
<td colspan="5"><input type="text" name="address" value="{$detail.address}" autocomplete="off" placeholder="请输入外出地点" lay-verify="required" lay-reqText="请输入外出地点" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -130,7 +144,7 @@
|
||||
<option value="18:00" {eq name="$detail.start_time_b" value="18:00"}selected=""{/eq}>18:00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -170,6 +184,28 @@
|
||||
<textarea name="content" placeholder="请输入外出事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入外出事由">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -187,6 +223,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -266,10 +308,31 @@ function leaveTime() {
|
||||
return hour;
|
||||
}
|
||||
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time_a',
|
||||
@ -331,6 +394,50 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
$('[name="duration"]').val(hours/10);
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
@ -368,6 +475,13 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -386,23 +500,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -412,8 +530,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -423,7 +540,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">预计维修费用<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="amount" value="" autocomplete="off" placeholder="请输入预计维修费用" lay-verify="required|number" lay-reqText="请输入预计维修费用" class="layui-input"></td>
|
||||
<td class="layui-td-gray">报修日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">报修日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -35,6 +35,14 @@
|
||||
<textarea name="content" placeholder="请输入故障描述" class="layui-textarea" lay-verify="required" lay-reqText="请输入故障描述"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -52,6 +60,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -71,7 +85,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">预计维修费用<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="amount" value="{$detail.amount}" autocomplete="off" placeholder="请输入预计维修费用" lay-verify="required|number" lay-reqText="请输入预计维修费用" class="layui-input"></td>
|
||||
<td class="layui-td-gray">报修日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">报修日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -82,6 +96,28 @@
|
||||
<textarea name="content" placeholder="请输入故障描述" class="layui-textarea" lay-verify="required" lay-reqText="请输入故障描述">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -99,6 +135,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -114,9 +156,31 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#detail_time',
|
||||
@ -124,6 +188,50 @@ const moduleInit = ['tool','employeepicker'];
|
||||
format: 'yyyy-MM-dd',
|
||||
showBottom: false
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
@ -161,11 +269,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -179,23 +294,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -205,8 +324,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -216,7 +334,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{eq name="$id" value="0"}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -64,7 +64,7 @@
|
||||
<option value="23:30">23:30</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -161,11 +161,17 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">开始时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">开始时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="start_time_a" name="start_time_a" autocomplete="off" class="layui-input" value="{$detail.start_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -220,7 +226,7 @@
|
||||
<option value="23:30" {eq name="$detail.start_time_b" value="23:30"}selected=""{/eq}>23:30</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">结束时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">结束时间<font>*</font></td>
|
||||
<td>
|
||||
<input id="end_time_a" name="end_time_a" autocomplete="off" class="layui-input" value="{$detail.end_time_a}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -317,6 +323,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -356,9 +368,9 @@ function leaveTime() {
|
||||
return hours;
|
||||
}
|
||||
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -443,6 +455,13 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -461,23 +480,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -487,8 +510,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -498,7 +520,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -18,7 +18,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">归还时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">归还时间<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -52,6 +52,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -65,7 +71,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">归还时间 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">归还时间<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -99,6 +105,12 @@
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -114,9 +126,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,tool=layui.tool, formSelects = layui.formSelects, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -162,6 +174,13 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
@ -180,23 +199,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -206,8 +229,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -217,7 +239,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{eq name="$id" value="0"}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">用印日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">用印日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -40,7 +40,7 @@
|
||||
<option value="6">其他</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">文件份数 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文件份数<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input name="num" autocomplete="off" class="layui-input" value="" lay-verify="required|number" placeholder="请填写文件份数" lay-reqText="请填写文件份数">
|
||||
</td>
|
||||
@ -51,6 +51,14 @@
|
||||
<textarea name="content" placeholder="请输入用印事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入用印事由"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -68,11 +76,17 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">用印日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">用印日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -103,7 +117,7 @@
|
||||
<option value="6" {eq name="$detail.other_type" value="6"}selected=""{/eq}>其他</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">文件份数 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">文件份数<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input name="num" autocomplete="off" class="layui-input" value="{$detail.num}" lay-verify="required|number" placeholder="请填写文件份数" lay-reqText="请填写文件份数">
|
||||
</td>
|
||||
@ -114,6 +128,28 @@
|
||||
<textarea name="content" placeholder="请输入用印事由" class="layui-textarea" lay-verify="required" lay-reqText="请输入用印事由">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -131,6 +167,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -146,9 +188,31 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -157,7 +221,49 @@ const moduleInit = ['tool','employeepicker'];
|
||||
format: 'yyyy-MM-dd',
|
||||
showBottom: false
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
if($('[name="flow_id"]').val()==''){
|
||||
@ -194,11 +300,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -212,23 +325,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -238,8 +355,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -249,7 +365,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -18,7 +18,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray-2">期望到岗日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">期望到岗日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -33,23 +33,31 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">招聘人数 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">招聘人数<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input name="num" autocomplete="off" class="layui-input" value="" lay-verify="required" placeholder="请输入招聘人数" lay-reqText="请输入招聘人数">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">岗位职责 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">岗位职责<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入岗位职责" class="layui-textarea" lay-verify="required" lay-reqText="请输入岗位职责"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">任职要求 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">任职要求<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="remark" placeholder="请输入任职要求" class="layui-textarea" lay-verify="required" lay-reqText="请输入任职要求"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -67,6 +75,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
@ -80,7 +94,7 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray-2">期望到岗日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">期望到岗日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -95,23 +109,45 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray">招聘人数 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">招聘人数<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input name="num" autocomplete="off" class="layui-input" value="{$detail.num}" lay-verify="required" placeholder="请输入招聘人数" lay-reqText="请输入招聘人数">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">岗位职责 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">岗位职责<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入岗位职责" class="layui-textarea" lay-verify="required" lay-reqText="请输入岗位职责">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">任职要求 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">任职要求<font>*</font></td>
|
||||
<td colspan="5">
|
||||
<textarea name="remark" placeholder="请输入任职要求" class="layui-textarea" lay-verify="required" lay-reqText="请输入任职要求">{$detail.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -129,6 +165,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -144,9 +186,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -192,11 +300,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -210,23 +325,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -236,8 +355,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -247,7 +365,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -70,6 +70,14 @@
|
||||
<textarea name="content" placeholder="请输入转岗原因" class="layui-textarea" lay-verify="required" lay-reqText="请输入转岗原因"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -87,13 +95,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">入职日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">入职日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -152,6 +166,28 @@
|
||||
<textarea name="content" placeholder="请输入转岗原因" class="layui-textarea" lay-verify="required" lay-reqText="请输入转岗原因">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -169,6 +205,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -184,9 +226,75 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
//日期时间
|
||||
laydate.render({
|
||||
elem: '#detail_time,#start_time,#end_time',
|
||||
@ -231,11 +339,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -249,23 +364,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -275,8 +394,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -286,9 +404,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">转正日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">转正日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -42,6 +42,14 @@
|
||||
<textarea name="content" placeholder="请输入备注" class="layui-textarea" lay-verify="required" lay-reqText="请输入试用期评价"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -59,13 +67,19 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">员工姓名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入员工姓名" lay-verify="required" lay-reqText="请输入员工姓名" class="layui-input"></td>
|
||||
<td class="layui-td-gray">转正日期 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">转正日期<font>*</font></td>
|
||||
<td colspan="2">
|
||||
<input id="detail_time" name="detail_time" autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
|
||||
</td>
|
||||
@ -96,6 +110,28 @@
|
||||
<textarea name="content" placeholder="请输入备注" class="layui-textarea" lay-verify="required" lay-reqText="请输入试用期评价">{$detail.content}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray"><div class="layui-input-inline">附件</div> <div class="layui-input-inline"><button type="button" class="layui-btn layui-btn-xs" id="upFile"><i class="layui-icon"></i></button></div></td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row" id="fileList">
|
||||
<input type="hidden" name="file_ids" value="{$detail.file_ids}">
|
||||
{notempty name="$detail.file_ids"}
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3" id="uploadImg{$vo.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="{$vo.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程<font>*</font></td>
|
||||
<td colspan="5">
|
||||
@ -113,6 +149,12 @@
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td colspan="5">
|
||||
<select id="copy_uids" name="copy_uids" xm-selected="" xm-select="selectcopy" xm-select-skin="default"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/eq}
|
||||
<div style="padding: 10px 0">
|
||||
@ -128,9 +170,31 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
// 查找指定的元素在数组中的位置
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
// 通过索引删除数组元素
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const moduleInit = ['tool','formSelects','employeepicker'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;
|
||||
var form = layui.form,
|
||||
upload = layui.upload,
|
||||
tool=layui.tool,
|
||||
formSelects = layui.formSelects,
|
||||
employeepicker = layui.employeepicker,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
@ -139,6 +203,50 @@ const moduleInit = ['tool','employeepicker'];
|
||||
format: 'yyyy-MM-dd',
|
||||
showBottom: false
|
||||
});
|
||||
|
||||
//多附件上传
|
||||
upload.render({
|
||||
elem: '#upFile'
|
||||
,url: "/api/index/upload"
|
||||
,multiple: true
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'png|jpg|gif|jpeg|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件格式
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if (res.code == 1) {
|
||||
layer.msg('上传失败')
|
||||
return false;
|
||||
}
|
||||
//上传成功
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.push(res.data.id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
let temp = `<div class="layui-col-md3" id="uploadImg${res.data.id}">
|
||||
<div class="file-card">
|
||||
<i class="file-icon layui-icon layui-icon-file"></i>
|
||||
<div class="file-title">${res.data.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="${res.data.filepath}" download="${res.data.name}" title="下载查看" target="_blank"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
<i class="btn-delete layui-icon layui-icon-delete" data-id="${res.data.id}" style="color: #FF5722;" title="删除"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#fileList').append(temp);
|
||||
}
|
||||
});
|
||||
$('#fileList').on('click', '.btn-delete', function () {
|
||||
var _id = $(this).data('id');
|
||||
var idsStr = $('#fileList input').val(),idsArray = [];
|
||||
if (idsStr != '') {
|
||||
idsArray = idsStr.split(",");
|
||||
}
|
||||
idsArray.remove(_id);
|
||||
$('#fileList input').attr('value', idsArray.join(','));
|
||||
$('#uploadImg' + _id).remove();
|
||||
})
|
||||
|
||||
//选择人员
|
||||
$('.layui-form').on('click','[name="check_admin_name"]',function(){
|
||||
@ -176,11 +284,18 @@ const moduleInit = ['tool','employeepicker'];
|
||||
return false;
|
||||
});
|
||||
|
||||
//选择抄送人员
|
||||
var copy_uids = $('#copy_uids').attr('xm-selected');
|
||||
formSelects.data('selectcopy', 'server', {
|
||||
url: '/api/index/get_employee_select',
|
||||
keyword: copy_uids,
|
||||
});
|
||||
|
||||
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>\
|
||||
<td colspan="5">\
|
||||
<input type="hidden" name="check_admin_ids" value="" readonly><input type="text" name="check_admin_name" value="" autocomplete="off" placeholder="请选择审核人" lay-verify="required" lay-reqText="请选择审核人" class="layui-input" readonly>\
|
||||
<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">\
|
||||
</td>';
|
||||
if(check_type == 2){
|
||||
$('#flow_tr').html(formHtml);
|
||||
@ -194,23 +309,27 @@ const moduleInit = ['tool','employeepicker'];
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var flowLi='';
|
||||
for(var a=0;a<e.data.length;a++){
|
||||
var flow_data = e.data.flow_data;
|
||||
if(e.data.copy_uids && e.data.copy_uids !=''){
|
||||
formSelects.value('selectcopy', e.data.copy_uids.split(','));
|
||||
}
|
||||
for(var a=0;a<flow_data.length;a++){
|
||||
var userList='',sign_type = '';
|
||||
if(e.data[a].flow_type==1){
|
||||
if(flow_data[a].flow_type==1){
|
||||
userList+= '<li style="padding:3px 0">当前部门负责人</li>';
|
||||
}
|
||||
else if(e.data[a].flow_type==2){
|
||||
else if(flow_data[a].flow_type==2){
|
||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||
}
|
||||
else{
|
||||
if(e.data[a].flow_type==3){
|
||||
if(flow_data[a].flow_type==3){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>'
|
||||
}
|
||||
if(e.data[a].flow_type==4){
|
||||
if(flow_data[a].flow_type==4){
|
||||
sign_type= ' <span class="layui-badge layui-bg-blue">会签</span>'
|
||||
}
|
||||
for(var b=0;b<e.data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+e.data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+e.data[a].user_id_info[b].name+'</li>';
|
||||
for(var b=0;b<flow_data[a].user_id_info.length;b++){
|
||||
userList+= '<li style="padding:3px 0"><img src="'+flow_data[a].user_id_info[b].thumb+'" style="width:24px; height:24px; border-radius:50%; margin-right:8px;" />'+flow_data[a].user_id_info[b].name+'</li>';
|
||||
}
|
||||
}
|
||||
flowLi+='<li class="layui-timeline-item">\
|
||||
@ -220,8 +339,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
<ul>'+userList+'</ul>\
|
||||
</div>\
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
formHtml = '<td class="layui-td-gray">审批流程</td>\
|
||||
<td colspan="5">\
|
||||
<ul id="flowList" class="layui-timeline">'+flowLi+'</ul>\
|
||||
@ -231,7 +349,7 @@ const moduleInit = ['tool','employeepicker'];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
53
app/oa/view/approve/copy.html
Normal file
53
app/oa/view/approve/copy.html
Normal file
@ -0,0 +1,53 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="p-3">
|
||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||
</div>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<h3 class="h3-title" style="height:28px;">审批列表</h3>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var table = layui.table, tool = layui.tool;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,title:'审批列表'
|
||||
,url: "/oa/approve/copy"
|
||||
,page: true //开启分页
|
||||
,limit: 20
|
||||
,cellMinWidth: 60
|
||||
,cols: [[
|
||||
{field:'id',width:80, title: 'ID号', align:'center'}
|
||||
,{field:'name',title: '申请人',width:90,align:'center'}
|
||||
,{field:'create_time',title: '申请时间',width:132,align:'center'}
|
||||
,{field:'flow_type',title: '审批类型',width:100, align:'center'}
|
||||
,{field:'department_name',title: '所属部门',width:100,align:'center'}
|
||||
,{field:'check_user',title: '当前审批人'}
|
||||
,{field:'check_status', title: '审批状态',width:80,align:'center',templet: function(d){
|
||||
var htmlArray = ['<span style="color:#666666">待审批</span>','<span style="color:#4285f4">审批中</span>','<span style="color:#34a853">已通过</span>','<span style="color:#FF5722">已拒绝</span>','<span style="color:#fbbc05">已撤销</span>'];
|
||||
return htmlArray[d.check_status];
|
||||
}}
|
||||
,{width:60,title: '操作', align:'center',templet: function(d){
|
||||
var btn='<a class="layui-btn layui-btn-xs" lay-event="view">详情</a>';
|
||||
return btn;
|
||||
}}
|
||||
]]
|
||||
});
|
||||
|
||||
table.on('tool(test)',function (obj) {
|
||||
if(obj.event === 'view'){
|
||||
tool.side('/oa/approve/view?id='+obj.data.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -87,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<h3 class="h3-title" style="height:32px;">审批列表</h3>
|
||||
<h3 class="h3-title" style="height:28px;">审批列表</h3>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<h3 class="h3-title" style="height:32px;">审批列表</h3>
|
||||
<h3 class="h3-title" style="height:28px;">审批列表</h3>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
@ -10,7 +10,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">物品名称</td>
|
||||
<td>{$detail.amount}</td>
|
||||
<td class="layui-td-gray2">期望交互日期</td>
|
||||
<td class="layui-td-gray-2">期望交互日期</td>
|
||||
<td>{$detail.detail_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -27,8 +27,27 @@
|
||||
<td class="layui-td-gray">备注</td>
|
||||
<td colspan="3">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -19,8 +19,27 @@
|
||||
<td class="layui-td-gray">出差事由</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<td>{$detail.detail_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">收款人全称</td>
|
||||
<td class="layui-td-gray-2">收款人全称</td>
|
||||
<td>{$detail.name}</td>
|
||||
<td class="layui-td-gray">银行账号</td>
|
||||
<td>{$detail.bank}</td>
|
||||
@ -39,8 +39,27 @@
|
||||
<td class="layui-td-gray">备注</td>
|
||||
<td colspan="5">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -31,8 +31,27 @@
|
||||
<td class="layui-td-gray">备注</td>
|
||||
<td colspan="3">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -23,8 +23,27 @@
|
||||
<td class="layui-td-gray">备注</td>
|
||||
<td colspan="5">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="5">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -21,8 +21,27 @@
|
||||
<td class="layui-td-gray">备注</td>
|
||||
<td colspan="5">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -28,17 +28,36 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">申请离职日期</td>
|
||||
<td class="layui-td-gray-2">申请离职日期</td>
|
||||
<td>{$detail.start_time}</td>
|
||||
<td class="layui-td-gray">预计离职日期</td>
|
||||
<td class="layui-td-gray-2">预计离职日期</td>
|
||||
<td>{$detail.end_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">申请离职原因</td>
|
||||
<td class="layui-td-gray-2">申请离职原因</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -33,6 +33,26 @@
|
||||
<td class="layui-td-gray">请假事由</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
|
@ -10,10 +10,14 @@
|
||||
</td>
|
||||
<td class="layui-td-gray-2">当前审核人</td>
|
||||
<td>{$detail.check_user}</td>
|
||||
<td class="layui-td-gray">抄送人</td>
|
||||
<td>
|
||||
{$detail.copy_user}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批流程</td>
|
||||
<td colspan="3">
|
||||
<td colspan="5">
|
||||
<div class="flow-flexbox check-items flow-flex-row" id="flowList">
|
||||
<div class="flow-flexbox check-item flow-flex-row">
|
||||
<i class="layui-icon layui-icon-add-circle" data-ok=""></i>
|
||||
@ -28,7 +32,7 @@
|
||||
{eq name="$flows.flow_type" value="0"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批节点 <font>*</font></td>
|
||||
<td colspan="3">
|
||||
<td colspan="5">
|
||||
<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">
|
||||
@ -39,7 +43,7 @@
|
||||
{/eq}
|
||||
<tr>
|
||||
<td class="layui-td-gray">审批意见 <font>*</font></td>
|
||||
<td colspan="3">
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入审批意见" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -40,4 +40,19 @@
|
||||
.layui-timeline-content ul{font-size:12px;}
|
||||
.check-status{color:#999; margin-left:5px;}
|
||||
.check-remark{padding:6px; margin-top:6px; margin-bottom:10px; border-radius:4px; background-color:#f5f5f5;}
|
||||
.file-card {background: #fff;border: 1px solid #f1f1f1;border-radius: 2px; padding:8px 0; margin:4px 8px 4px 0;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.file-card .file-icon{font-size:36px; color:#646464; margin-right: 4px;}
|
||||
.file-card .file-title {font-size: 12px; letter-spacing: 0; margin-right: 8px; line-height: 16px; word-break: break-all; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;width: calc(100% - 80px);
|
||||
}
|
||||
.file-card .file-tool .layui-icon{font-size:22px; padding:2px; cursor:pointer;}
|
||||
</style>
|
@ -21,8 +21,27 @@
|
||||
<td class="layui-td-gray-2">审批详细描述</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -25,8 +25,27 @@
|
||||
<td class="layui-td-gray">外出事由</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -27,8 +27,27 @@
|
||||
<td class="layui-td-gray">故障描述</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -38,8 +38,27 @@
|
||||
<td class="layui-td-gray">用印事由</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -35,8 +35,27 @@
|
||||
<td class="layui-td-gray">任职要求</td>
|
||||
<td colspan="3">{$detail.remark}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -51,8 +51,27 @@
|
||||
<td class="layui-td-gray-2">申请转岗原因</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -31,8 +31,27 @@
|
||||
<td class="layui-td-gray">试用期评价</td>
|
||||
<td colspan="3">{$detail.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{notempty name="$detail.file_ids"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">相关附件</td>
|
||||
<td colspan="3">
|
||||
<div class="layui-row">
|
||||
{volist name="$detail.fileArray" id="vo"}
|
||||
<div class="layui-col-md3">
|
||||
<div class="file-card">
|
||||
<i class="file-icon iconfont icon-renwuguanli"></i>
|
||||
<div class="file-title">{$vo.name}</div>
|
||||
<div class="file-tool">
|
||||
<a href="{$vo.filepath}" download="{$vo.name}" target="_blank" title="下载查看"><i class="layui-icon layui-icon-download-circle" style="color: #12bb37;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{include file="/approve/view_step" /}
|
||||
</div>
|
||||
{/block}
|
||||
|
@ -128,19 +128,19 @@ user-select: none;}
|
||||
var content='<form class="layui-form" style="width:828px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">日程时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">日程时间范围<font>*</font></td>\
|
||||
<td>\
|
||||
<input id="start_time_a" name="start_time_a" style="width:120px; display:inline-block;" autocomplete="off" class="layui-input" value="'+detail.start_time_a+'" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间"><div style="display: inline-block; margin-left:3px; width: 86px;"><select lay-filter="start_time_b" id="start_time_b"></select></div> 至 <input id="end_time_a" name="end_time_a" style="width:120px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间"><div style="display: inline-block; margin-left:3px; width: 86px;"><select lay-filter="end_time_b" id="end_time_b"></select></div>\
|
||||
</td>\
|
||||
<td class="layui-td-gray">提醒 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">提醒<font>*</font></td>\
|
||||
<td>\
|
||||
<div class="layui-input" id="remind_type" style="width:120px; line-height:35px;">'+remind_type+'</div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="layui-td-gray">日程内容 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">日程内容<font>*</font></td>\
|
||||
<td><input name="title" class="layui-input" value="'+detail.title+'" lay-verify="required" placeholder="请完成日程内容" lay-reqText="请完成日程内容"></td>\
|
||||
<td class="layui-td-gray">优先级 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">优先级<font>*</font></td>\
|
||||
<td>\
|
||||
<div class="layui-input" id="type" style="width:120px; line-height:35px;">'+type+'</div>\
|
||||
</td>\
|
||||
|
@ -274,19 +274,19 @@
|
||||
var content='<form class="layui-form" style="width:828px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">日程时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">日程时间范围<font>*</font></td>\
|
||||
<td>\
|
||||
<input id="start_time_a" name="start_time_a" style="width:120px; display:inline-block;" autocomplete="off" class="layui-input" value="'+detail.start_time_a+'" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间"><div style="display: inline-block; margin-left:3px; width: 86px;"><select lay-filter="start_time_b" id="start_time_b"></select></div> 至 <input id="end_time_a" name="end_time_a" style="width:120px; display:inline-block;" autocomplete="off" class="layui-input" value="'+detail.end_time_a+'" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间"><div style="display: inline-block; margin-left:3px; width: 86px;"><select lay-filter="end_time_b" id="end_time_b"></select></div>\
|
||||
</td>\
|
||||
<td class="layui-td-gray">优先级 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">优先级<font>*</font></td>\
|
||||
<td>\
|
||||
<div class="layui-input" id="type" style="width:120px; line-height:35px;">'+type+'</div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="layui-td-gray">日程内容 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">日程内容<font>*</font></td>\
|
||||
<td><input name="title" class="layui-input" value="'+detail.title+'" lay-verify="required" placeholder="请完成日程内容" lay-reqText="请完成日程内容"></td>\
|
||||
<td class="layui-td-gray">提醒 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">提醒<font>*</font></td>\
|
||||
<td>\
|
||||
<div class="layui-input" id="remind_type" style="width:120px; line-height:35px;">'+remind_type+'</div>\
|
||||
</td>\
|
||||
|
@ -94,17 +94,17 @@ user-select: none;}
|
||||
var content='<form class="layui-form" style="width:868px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">工作时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">工作时间范围<font>*</font></td>\
|
||||
<td>\
|
||||
<input id="start_time_a" name="start_time_a" value="'+detail.start_time_a+'" style="width:100px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:3px; width: 80px;"><select lay-filter="start_time_b" id="start_time_b"></select></div> 至 <input id="end_time_a" name="end_time_a" value="'+detail.end_time_a+'" style="width:100px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:3px; width: 80px;"><select lay-filter="end_time_b" id="end_time_b"></select></div>\
|
||||
</td>\
|
||||
<td class="layui-td-gray">工作类型 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作类型<font>*</font></td>\
|
||||
<td>\
|
||||
<input type="radio" name="labor_type" lay-filter="labor_type" value="1" title="案头工作"><input type="radio" name="labor_type" value="2" lay-filter="labor_type" title="外勤工作">\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="layui-td-gray">工作内容 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作内容<font>*</font></td>\
|
||||
<td colspan="3"><input name="title" class="layui-input" value="" lay-verify="required" lay-reqText="请完成工作内容"></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
|
@ -130,7 +130,7 @@
|
||||
var content='<form class="layui-form" style="width:568px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">工作时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">工作时间范围<font>*</font></td>\
|
||||
<td>\
|
||||
<input id="start_time_a" name="start_time_a" style="width:110px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:5px; width: 80px;"><select lay-filter="start_time_b" id="start_time_b"></select></div> 至 <input id="end_time_a" name="end_time_a" style="width:110px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:5px; width: 80px;"><select lay-filter="end_time_b" id="end_time_b"></select></div>\
|
||||
</td>\
|
||||
@ -262,15 +262,15 @@
|
||||
var content='<form class="layui-form" style="width:868px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">工作时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">工作时间范围<font>*</font></td>\
|
||||
<td>'+data.start_time+' '+data.start_time_1+' 至 '+data.end_time_1+'</td>\
|
||||
<td class="layui-td-gray">工作类型 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作类型<font>*</font></td>\
|
||||
<td>\
|
||||
<input type="radio" name="labor_type" lay-filter="labor_type" value="1" title="案头工作"><input type="radio" name="labor_type" value="2" lay-filter="labor_type" title="外勤工作">\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="layui-td-gray">工作内容 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作内容<font>*</font></td>\
|
||||
<td colspan="3"><input name="title" class="layui-input" value="'+data.title+'" lay-verify="required" lay-reqText="请完成工作内容"></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
@ -391,17 +391,17 @@
|
||||
var content='<form class="layui-form" style="width:868px">\
|
||||
<table class="layui-table" style="margin:15px 15px 0;">\
|
||||
<tr>\
|
||||
<td class="layui-td-gray-2">工作时间范围 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray-2">工作时间范围<font>*</font></td>\
|
||||
<td>\
|
||||
<input id="start_time_a" name="start_time_a" style="width:100px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:3px; width: 80px;"><select lay-filter="start_time_b" id="start_time_b"></select></div> 至 <input id="end_time_a" name="end_time_a" style="width:100px; display:inline-block;" autocomplete="off" class="layui-input" value="" readonly lay-verify="required" lay-reqText="请选择"><div style="display: inline-block; margin-left:3px; width: 80px;"><select lay-filter="end_time_b" id="end_time_b"></select></div>\
|
||||
</td>\
|
||||
<td class="layui-td-gray">工作类型 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作类型<font>*</font></td>\
|
||||
<td>\
|
||||
<input type="radio" name="labor_type" lay-filter="labor_type" value="1" title="案头工作"><input type="radio" name="labor_type" value="2" lay-filter="labor_type" title="外勤工作">\
|
||||
</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="layui-td-gray">工作内容 <span style="color: red">*</span></td>\
|
||||
<td class="layui-td-gray">工作内容<font>*</font></td>\
|
||||
<td colspan="3"><input name="title" class="layui-input" value="" lay-verify="required" lay-reqText="请完成工作内容"></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
|
@ -5,7 +5,7 @@
|
||||
{if condition="$id eq 0"}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">接收人<span style="color: red">*</span></td>
|
||||
<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="hidden" name="uids" value="">
|
||||
@ -19,7 +19,7 @@
|
||||
</tr>
|
||||
{if condition="($type == 1)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">今日工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">今日工作<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="works" placeholder="请输入今日工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入今日工作内容"></textarea>
|
||||
</td>
|
||||
@ -31,7 +31,7 @@
|
||||
</tr>
|
||||
{elseif condition="($type == 2)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">本周工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">本周工作<font>*</font></td>
|
||||
<td colspan="3"
|
||||
<textarea name="works" placeholder="请输入本周工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入本周工作内容"></textarea>
|
||||
</td>
|
||||
@ -43,7 +43,7 @@
|
||||
</tr>
|
||||
{elseif condition="($type == 3)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">本月工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">本月工作<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="works" placeholder="请输入本月工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入本月工作内容"></textarea>
|
||||
</td>
|
||||
@ -101,7 +101,7 @@
|
||||
</tr>
|
||||
{if condition="($type == 1)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">今日工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">今日工作<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="works" placeholder="请输入今日工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入今日工作内容">{$detail.works}</textarea>
|
||||
</td>
|
||||
@ -113,7 +113,7 @@
|
||||
</tr>
|
||||
{elseif condition="($type == 2)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">本周工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">本周工作<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="works" placeholder="请输入本周工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入本周工作内容">{$detail.works}</textarea>
|
||||
</td>
|
||||
@ -125,7 +125,7 @@
|
||||
</tr>
|
||||
{elseif condition="($type == 3)"}
|
||||
<tr>
|
||||
<td class="layui-td-gray">本月工作<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">本月工作<font>*</font></td>
|
||||
<td colspan="3">
|
||||
<textarea name="works" placeholder="请输入本月工作内容" class="layui-textarea" style="height: 120px;" lay-verify="required" lay-reqText="请输入本月工作内容">{$detail.works}</textarea>
|
||||
</td>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<h3 class="pb-3">重置密码</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">旧密码<span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">旧密码<font>*</font></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="old_pwd" placeholder="请输入旧密码" lay-reqText="请输入旧密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
@ -16,11 +16,11 @@
|
||||
<td>{$admin.username}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">新密码 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray">新密码<font>*</font></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="pwd" placeholder="请输入新密码" lay-reqText="请输入新密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">确认新密码 <span style="color: red">*</span></td>
|
||||
<td class="layui-td-gray-2">确认新密码<font>*</font></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="pwd_confirm" placeholder="请再次输入新密码" lay-reqText="请再次输入新密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
|
@ -8,40 +8,59 @@ return [
|
||||
// 系统消息模板
|
||||
'template' => [
|
||||
1 => [
|
||||
'name' => '公告',
|
||||
'template' => '您有一个新公告:{title} ,请及时查看。',
|
||||
'title' => '{from_user}发了一个新『公告』,请及时查看',
|
||||
'content' => '您有一个新公告:{title}。',
|
||||
'link' => '<a class="link-a" data-href="/note/index/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
2 => [
|
||||
'type' => '报销审批',
|
||||
'template' => '{from_user} 提交 {title} 报销审批,请及时处理。',
|
||||
21 => [
|
||||
'title' => '{from_user}提交了一个『{title}申请』,请及时审批',
|
||||
'content' => '您有一个新的『{title}审批』需要处理。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">去审批</a>',
|
||||
],
|
||||
3 => [
|
||||
'type' => '报销审批',
|
||||
'template' => '{from_user} 拒绝您的 {title} 报销审批,拒绝理由:{remark},请及时处理。',
|
||||
22 => [
|
||||
'title' => '您提交的『{title}申请』已被审批通过',
|
||||
'content' => '您在{create_time}提交的『{title}申请』已于{date}被审批通过。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
4 => [
|
||||
'type' => '报销审批',
|
||||
'template' => '您的 {title} 报销已经审批通过,请及时查看。',
|
||||
23 => [
|
||||
'title' => '您提交的『{title}申请』已被驳回拒绝',
|
||||
'content' => '您在{create_time}提交的『{title}申请』已于{date}被驳回拒绝。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
5 => [
|
||||
'type' => '报销发放',
|
||||
'template' => '您的 {title} 报销已经发放,请查看是否到账。',
|
||||
31 => [
|
||||
'title' => '{from_user}提交了一个『报销申请』,请及时审批',
|
||||
'content' => '您有一个新的『报销审批』需要处理。',
|
||||
'link' => '<a class="link-a" data-href="/finance/expense/view/id/{action_id}">去审批</a>',
|
||||
],
|
||||
6 => [
|
||||
'type' => '发票审批',
|
||||
'template' => '{from_user} 提交 {title} 发票审批待您处理,请及时查看。',
|
||||
32 => [
|
||||
'title' => '您提交的『报销申请』已被审批通过',
|
||||
'content' => '您在{create_time}提交的『报销申请』已于{date}被审批通过。',
|
||||
'link' => '<a class="link-a" data-href="/finance/expense/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
7 => [
|
||||
'type' => '发票审批',
|
||||
'template' => '{from_user} 拒绝您的 {title} 发票审批,请及时处理。',
|
||||
33 => [
|
||||
'title' => '您提交的『报销申请』已被驳回拒绝',
|
||||
'content' => '您在{create_time}提交的『报销申请』已于{date}被驳回拒绝。',
|
||||
'link' => '<a class="link-a" data-href="/finance/expense/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
8 => [
|
||||
'type' => '发票审批',
|
||||
'template' => '您的 {title} 发票已经审批通过,请及时查看。',
|
||||
34 => [
|
||||
'title' => '您提交的『报销申请』已发放',
|
||||
'content' => '您在{create_time}提交的『报销申请』已经发放,请查看是否到账。',
|
||||
'link' => '<a class="link-a" data-href="/finance/expense/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
9 => [
|
||||
'type' => '发票审批',
|
||||
'template' => '您的 {title} 发票已经开票成功,请及时查看。',
|
||||
41 => [
|
||||
'title' => '{from_user}提交了一个『发票申请』,请及时审批',
|
||||
'content' => '您有一个新的『发票申请』需要处理。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">去审批</a>',
|
||||
],
|
||||
],
|
||||
42 => [
|
||||
'title' => '您提交的『发票申请』已被审批通过',
|
||||
'content' => '您在{create_time}提交的『发票申请』已于{date}被审批通过。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
43 => [
|
||||
'title' => '您提交的『发票申请』已被驳回拒绝',
|
||||
'content' => '您在{create_time}提交的『发票申请』已于{date}被驳回拒绝。',
|
||||
'link' => '<a class="link-a" data-href="/oa/approve/view/id/{action_id}">查看详情</a>',
|
||||
],
|
||||
]
|
||||
];
|
||||
|
@ -53,8 +53,8 @@
|
||||
html {background-color: #F6F8FA; color: #162a48}
|
||||
html,body{height:100%;}
|
||||
body.right-open{overflow:hidden;}
|
||||
a.tab-a,a.open-a,a.open-link,a.right-a{color:#1E9FFF; cursor:pointer;}
|
||||
a.tab-a:hover,a:hover,a.open-a:hover,a.open-link:hover,a.right-a:hover{color:#1E9FFF; opacity:0.8}
|
||||
a.tab-a,a.open-a,a.link-a,a.right-a{color:#1E9FFF; cursor:pointer;}
|
||||
a.tab-a:hover,a:hover,a.open-a:hover,a.link-a:hover,a.right-a:hover{color:#1E9FFF; opacity:0.8}
|
||||
.left{float:left;}
|
||||
.right{float:right;}
|
||||
.h1,h1{font-size:24px; font-weight: 600;}
|
||||
|
@ -195,7 +195,8 @@ layui.define(['element'], function (exports) {
|
||||
|
||||
//左上角清除缓存
|
||||
$('#GouguApp').on('click', '[gg-event="cache"]', function (e) {
|
||||
var that = $(this);
|
||||
let that = $(this);
|
||||
let url = $(this).data('href');
|
||||
if (that.attr('class') === 'clearThis') {
|
||||
layer.tips('正在努力清理中...', this);
|
||||
return false;
|
||||
@ -203,7 +204,7 @@ layui.define(['element'], function (exports) {
|
||||
layer.tips('正在清理系统缓存...', this);
|
||||
that.attr('class', 'clearThis');
|
||||
$.ajax({
|
||||
url: "/admin/api/cache_clear",
|
||||
url: url,
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
setTimeout(function () {
|
||||
|
@ -3,7 +3,7 @@ layui.define([], function (exports) {
|
||||
var tool = {
|
||||
loading: false,
|
||||
side: function (url, width) {
|
||||
var sideWidth = window.innerWidth > 1280 ? '1200px' : '960px';
|
||||
var sideWidth = window.innerWidth > 1280 ? '1200px' : '996px';
|
||||
if (width && width > 0) {
|
||||
sideWidth = width + 'px';
|
||||
}
|
||||
@ -30,7 +30,7 @@ layui.define([], function (exports) {
|
||||
})
|
||||
})
|
||||
$(window).resize(function () {
|
||||
width = window.innerWidth > 1280 ? '1200' : '960';
|
||||
width = window.innerWidth > 1280 ? '1200' : '996';
|
||||
$('.layui-anim-rl').width(width);
|
||||
})
|
||||
}
|
||||
@ -231,5 +231,12 @@ layui.define([], function (exports) {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('body').on('click', '.link-a', function () {
|
||||
let url = $(this).data('href');
|
||||
if (url && url !== '') {
|
||||
window.location.href=url;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
exports(MOD_NAME, tool);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user