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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
| {extend name="../../base/view/common/base" /}
| <!-- 主体 -->
| {block name="body"}
|
| <div class="p-page">
| <div class="layui-card border-x border-t" style="margin-bottom:0; box-shadow:0 0 0 0 rgb(5 32 96 / 0%)">
| <div class="body-table layui-tab layui-tab-brief" lay-filter="tab">
| <ul class="layui-tab-title">
| <li class="layui-this"><a href="/contract/contract/voidlist">销售合同</a></li>
| <li><a href="/contract/purchase/voidlist">采购合同</a></li>
| </ul>
| </div>
| </div>
| <form class="layui-form gg-form-bar border-x">
| <div class="layui-input-inline" style="width:128px;">
| <select name="types">
| <option value="">选择合同性质</option>
| <option value="1">普通合同</option>
| <option value="2">产品合同</option>
| <option value="3">服务合同</option>
| </select>
| </div>
| <div class="layui-input-inline" style="width:128px;">
| <select name="cate_id">
| <option value="">选择合同类别</option>
| {volist name=":get_base_data('ContractCate');" id="vo"}
| <option value="{$vo.id}">{$vo.title}</option>
| {/volist}
| </select>
| </div>
| <div class="layui-input-inline" style="width:175px;">
| <input type="text" class="layui-input" id="sign_time" placeholder="选择合同签订日期" readonly name="sign_time">
| </div>
| <div class="layui-input-inline" style="width:175px;">
| <input type="text" class="layui-input" id="end_time" placeholder="选择合同到期日期" readonly name="end_time">
| </div>
| <div class="layui-input-inline" style="width:220px;">
| <input type="text" name="keywords" placeholder="输入关键字,合同编号/合同名称" class="layui-input" autocomplete="off" />
| </div>
| <div class="layui-input-inline" style="width:150px">
| <input type="hidden" name="tab" value="0" />
| <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="table-search"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
| <button type="reset" class="layui-btn layui-btn-reset" lay-filter="table-reset">清空</button>
| </div>
| </form>
| <table class="layui-hide" id="table_contract" lay-filter="table_contract"></table>
| </div>
|
| <script type="text/html" id="toolbarDemo">
| <div class="layui-btn-container">
| <h3>作废合同</h3>
| </div>
| </script>
|
| {/block}
| <!-- /主体 -->
|
| <!-- 脚本 -->
| {block name="script"}
| <script>
| const moduleInit = ['tool','tablePlus','laydatePlus'];
| function gouguInit() {
| var table = layui.tablePlus,dropdown = layui.dropdown, tool = layui.tool,laydatePlus = layui.laydatePlus;
| //日期范围
| var sign_time = new laydatePlus({'target':'sign_time'});
| var end_time = new laydatePlus({'target':'end_time'});
| layui.pageTable = table.render({
| elem: "#table_contract"
| , toolbar: "#toolbarDemo"
| ,url: "/contract/contract/voidlist"
| ,is_excel: true
| ,page: true
| ,limit: 20
| ,cellMinWidth: 60
| ,height: 'full-152'
| ,cols: [[ //表头
| {
| field: 'id',
| title: 'ID号',
| align: 'center',
| width: 80
| },{
| field: 'code',
| title: '合同编号',
| align: 'center',
| width: 150
| },{
| field: 'name',
| title: '合同名称',
| minWidth:240,
| templet: '<div><a data-href="/contract/contract/view/id/{{d.id}}.html" class="side-a">{{d.name}}</a></div>'
| },{
| field: 'cate_title',
| title: '合同类别',
| align: 'center',
| width: 100
| },{
| field: 'types_name',
| title: '合同性质',
| align: 'center',
| width: 80,
| templet: function (d) {
| var html = '<span class="layui-color-' + d.types + '">' + d.types_name + '</span>';
| return html;
| }
| },{
| field: 'interval_time',
| title: '合同有效时间',
| align: 'center',
| width: 248,
| templet: function (d) {
| var html = d.interval_time;
| if (d.delay > 0 && d.delay < 30) {
| html += '<span class="red ml-1" style="font-size:12px;">' + d.delay + '天后到期</span>';
| }
| if (d.delay == 0) {
| html += '<span class="red ml-1" style="font-size:12px;">已过期</span>';
| }
| return html;
| }
| },{
| field: 'cost',
| title: '合同金额(元)',
| align: 'right',
| width: 100
| },{
| field: 'void_name',
| title: '作废人',
| align: 'center',
| width: 80
| },{
| field: 'void_time',
| title: '作废日期',
| align: 'center',
| width: 90
| },{
| field: 'sign_name',
| title: '签定人',
| align: 'center',
| width: 80
| },{
| field: 'sign_time',
| title: '签订日期',
| align: 'center',
| width: 90
| },{
| field: 'keeper_name',
| title: '保管人',
| align: 'center',
| width: 80
| },{
| field: 'right',
| fixed:'right',
| title: '操作',
| width: 60,
| align: 'center',
| ignoreExport:true,
| templet: function (d) {
| var btn0='<span class="layui-btn layui-btn-normal layui-btn-xs" lay-event="view">详情</span>';
| return btn0;
| }
| }
| ]]
| });
|
| table.on('tool(table_contract)',function (obj) {
| var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
| var data = obj.data;
| if (obj.event === 'view') {
| tool.side("/contract/contract/view?id="+data.id);
| return;
| }
| });
| }
| </script>
| {/block}
| <!-- /脚本 -->
|
|