优化选择母协议弹层操作
This commit is contained in:
parent
cfc22c30d3
commit
35c8470db6
@ -14,7 +14,7 @@ use think\facade\View;
|
||||
|
||||
class Api extends BaseController
|
||||
{
|
||||
//获取项目概况数据
|
||||
//获取合同协议
|
||||
public function get_contract()
|
||||
{
|
||||
$param = get_params();
|
||||
@ -23,14 +23,17 @@ class Api extends BaseController
|
||||
$where[] = ['id|name', 'like', '%' . $param['keywords'] . '%'];
|
||||
}
|
||||
$where[] = ['delete_time', '=', 0];
|
||||
$list = Db::name('Contract')->field('id,name,sign_uid,sign_time')->order('end_time asc')->where($where)->select()->toArray();
|
||||
if (!empty($list)) {
|
||||
foreach ($list as $k => &$v) {
|
||||
$v['sign_name'] = Db::name('Admin')->where('id',$v['sign_uid'])->value('name');
|
||||
$v['sign_time'] = date('Y-m-d', $v['sign_time']);
|
||||
}
|
||||
}
|
||||
to_assign(0, '', $list);
|
||||
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
||||
$list = Db::name('Contract')
|
||||
->field('id,name,sign_uid,sign_time')
|
||||
->order('end_time asc')
|
||||
->where($where)
|
||||
->paginate($rows, false)->each(function($item, $key){
|
||||
$item['sign_name'] = Db::name('Admin')->where('id',$item['sign_uid'])->value('name');
|
||||
$item['sign_time'] = date('Y-m-d', $item['sign_time']);
|
||||
return $item;
|
||||
});
|
||||
table_assign(0, '', $list);
|
||||
}
|
||||
|
||||
//添加附件
|
||||
|
@ -232,14 +232,16 @@
|
||||
function selectCharge(type){
|
||||
layer.open({
|
||||
title:'选择母合同',
|
||||
area:['680px','556px'],
|
||||
area:['680px','580px'],
|
||||
type:1,
|
||||
content:'<div style="padding:12px 10px 0;">\
|
||||
<form class="layui-form">\
|
||||
<input type="text" name="keywords" placeholder="合同名称" class="layui-input" autocomplete="off" style="max-width: 240px;display: inline-block;margin-right:10px; height:32px" />\
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-submit="" lay-filter="submit_form">提交搜索</button>\
|
||||
content:'<div class="picker-table">\
|
||||
<form class="layui-form pb-2">\
|
||||
<div class="layui-input-inline" style="width:500px;">\
|
||||
<input type="text" name="keywords" placeholder="合同名称" class="layui-input" autocomplete="off" />\
|
||||
</div>\
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="search_form">提交搜索</button>\
|
||||
</form>\
|
||||
<div id="boxcontract" class="pt-2"></div></div>',
|
||||
<div id="boxcontract"></div></div>',
|
||||
success:function(){
|
||||
table_b=table.render({
|
||||
elem: '#boxcontract'
|
||||
|
Loading…
x
Reference in New Issue
Block a user