style:填报信息页面
Showing
3 changed files
with
85 additions
and
96 deletions
... | @@ -5,37 +5,19 @@ layui.use('element', function () { | ... | @@ -5,37 +5,19 @@ layui.use('element', function () { |
5 | $(function () { | 5 | $(function () { |
6 | addTabs('#wssq'); | 6 | addTabs('#wssq'); |
7 | setFristStepPageFLow(GetQueryString('ywid'), GetQueryString('businessno')); | 7 | setFristStepPageFLow(GetQueryString('ywid'), GetQueryString('businessno')); |
8 | // 业务 | ||
9 | layui.use(['form'], function () { | ||
10 | var form = layui.form | ||
11 | //自定义验证规则 | ||
12 | form.verify({ | ||
13 | title: function (value) { | ||
14 | if (value.length == 0) { | ||
15 | return '权利人不能为空'; | ||
16 | } else if (value.length < 2) { | ||
17 | return '权利人至少得2个字符啊'; | ||
18 | } | ||
19 | } | ||
20 | }); | ||
21 | |||
22 | //监听提交 | ||
23 | form.on('submit(check)', function (data) { | ||
24 | bdcqlVerify(data.field); | ||
25 | // layer.alert(JSON.stringify(data.field), { | ||
26 | // title: '最终的提交信息' | ||
27 | // }) | ||
28 | return false; | ||
29 | }); | ||
30 | }) | ||
31 | // 结果弹框 | ||
32 | $('.reset').click(function () { | ||
33 | |||
34 | // seizureResult() | ||
35 | }) | ||
36 | SetCheckContent(); | 8 | SetCheckContent(); |
9 | fetchDataReview(); | ||
37 | }) | 10 | }) |
38 | 11 | // 初始化渲染数据 | |
12 | function fetchDataReview(){ | ||
13 | console.log(getCookie('myCookie')) | ||
14 | let userInfo = getCookie('myCookie'); | ||
15 | $('#sqrxm').text(userInfo.username); | ||
16 | if(userInfo.zjzl=='1') { | ||
17 | $('#zjzl').text('身份证'); | ||
18 | } | ||
19 | $('#zjhm').text(userInfo.zjhm); | ||
20 | } | ||
39 | //设置查询条件内容 | 21 | //设置查询条件内容 |
40 | function SetCheckContent() { | 22 | function SetCheckContent() { |
41 | layui.use(['form', 'upload', 'layer'], function () { | 23 | layui.use(['form', 'upload', 'layer'], function () { | ... | ... |
... | @@ -38,28 +38,32 @@ $(function () { | ... | @@ -38,28 +38,32 @@ $(function () { |
38 | loadSqrDetail() | 38 | loadSqrDetail() |
39 | //读取邮寄信息 | 39 | //读取邮寄信息 |
40 | loadMailDetail(); | 40 | loadMailDetail(); |
41 | // 读取权利人 | ||
42 | authorityPerson(); | ||
43 | applicationMethod(); | ||
44 | }); | ||
45 | // 区分单方申请和双方申请 | ||
46 | function applicationMethod() { | ||
41 | // 在这里页面显示进行处理 | 47 | // 在这里页面显示进行处理 |
42 | if (slsqxx.sqrlb == '1' && slsqxx.sqfs == '2') { | 48 | if (slsqxx.sqrlb == '1') { |
43 | $('.obtaining_license').hide(); | 49 | $('.obtaining_license').show(); |
44 | $('#obligeeInformation').text('权利人信息'); | 50 | $('#obligeeInformation').text('权利人信息'); |
45 | $('.nextSubmitButton').append('<div class="next_button">' + | ||
46 | '<button type="button" lay-submit="" lay-filter="submit1" class="layui-btn layui-btn-normal">' + | ||
47 | '<a onclick="skipClick()">下一步</a>' + | ||
48 | '</button>' + | ||
49 | '</div>') | ||
50 | } else { | 51 | } else { |
52 | $('.obtaining_license').hide(); | ||
51 | $('#obligeeInformation').text('义务人信息'); | 53 | $('#obligeeInformation').text('义务人信息'); |
52 | $('.nextSubmitButton').empty(); | 54 | $('.nextSubmitButton').empty(); |
55 | $('.nextSubmitButton').append('<div class="next_button">'+ | ||
56 | '<button type="button" lay-submit="" lay-filter="submit1" class="layui-btn layui-btn-normal">'+ | ||
57 | '<a onclick="skipClick()">下一步</a></button></div>') | ||
53 | } | 58 | } |
54 | // | 59 | if (slsqxx.sqfs == '1' && slsqxx.sqrlb == '1') { |
55 | if (slsqxx.sqfs == '1') { | ||
56 | $('.folkObligee').show(); | 60 | $('.folkObligee').show(); |
57 | } | 61 | } |
58 | // 动态设置样式 | 62 | // 动态设置样式 |
59 | for(var i=0;i<$('.conImageUpdate').length;i++) { | 63 | for(var i=0;i<$('.conImageUpdate').length;i++) { |
60 | $('.conImageUpdate').eq(i).find('.imageUpdateTitle').css('height', $('.conImageUpdate').eq(i).height()-60); | 64 | $('.conImageUpdate').eq(i).find('.imageUpdateTitle').css('height', $('.conImageUpdate').eq(i).height()-60); |
61 | } | 65 | } |
62 | }); | 66 | } |
63 | 67 | ||
64 | //读取受理信息 | 68 | //读取受理信息 |
65 | function loadAcceptDetail() { | 69 | function loadAcceptDetail() { |
... | @@ -140,7 +144,7 @@ function loadSqrDetail() { | ... | @@ -140,7 +144,7 @@ function loadSqrDetail() { |
140 | function loadMailDetail() { | 144 | function loadMailDetail() { |
141 | // 领证方式 | 145 | // 领证方式 |
142 | lzfs = slsqxx.lzfs; | 146 | lzfs = slsqxx.lzfs; |
143 | if (lzfs == 2) { | 147 | if (lzfs == '2') { |
144 | $('.shipping_method').show(); | 148 | $('.shipping_method').show(); |
145 | $('.submitButton').hide(); | 149 | $('.submitButton').hide(); |
146 | } else { | 150 | } else { |
... | @@ -158,65 +162,68 @@ function loadMailDetail() { | ... | @@ -158,65 +162,68 @@ function loadMailDetail() { |
158 | } | 162 | } |
159 | } | 163 | } |
160 | 164 | ||
161 | $('.radioInfo').click(function () { | 165 | // 权利人添加 |
162 | let index = $(this).attr("value") | 166 | function authorityPerson() { |
163 | if ($('#layui-form .layui-form-item').length > 1) { | 167 | $('.radioInfo').click(function () { |
164 | return false | 168 | let index = $(this).attr("value") |
165 | } else { | 169 | if ($('#layui-form .layui-form-item').length > 1) { |
166 | if (index == 2 || index == 3) { | 170 | return false |
167 | $('.add_form').show() | ||
168 | } else { | 171 | } else { |
169 | $('.add_form').hide() | 172 | if (index == 2 || index == 3) { |
173 | $('.add_form').show() | ||
174 | } else { | ||
175 | $('.add_form').hide() | ||
176 | } | ||
170 | } | 177 | } |
171 | } | ||
172 | }) | ||
173 | // form 添加 | ||
174 | $('.add_form').click(function () { | ||
175 | $('#layui-form').append( | ||
176 | '<div class="layui-form-item">' + | ||
177 | '<div class="layui-inline">' + | ||
178 | '<label class="layui-form-label">姓名</label>' + | ||
179 | '<div class="layui-input-block">' + | ||
180 | '<input type="text" name="name" required lay-verify="name" placeholder="请输权利人" class="layui-input">' + | ||
181 | '</div>' + | ||
182 | '</div>' + | ||
183 | '<div class="layui-inline idCard">' + | ||
184 | '<label class="layui-form-label">身份证类型</label>' + | ||
185 | '<div class="layui-input-block">' + | ||
186 | '<select lay-filter="typeId">' + | ||
187 | '<option value="1">身份证</option>' + | ||
188 | '<option value="2">军官证</option>' + | ||
189 | '</select>' + | ||
190 | '</div>' + | ||
191 | '</div>' + | ||
192 | '<div class="layui-inline">' + | ||
193 | '<label class="layui-form-label">证件号码</label>' + | ||
194 | '<div class="layui-input-block">' + | ||
195 | '<input type="tel" name="card" maxlength="18" required lay-verify="card" placeholder="请输证件号码" class="layui-input">' + | ||
196 | '</div>' + | ||
197 | '</div>' + | ||
198 | '<div class="layui-inline">' + | ||
199 | '<label class="layui-form-label">联系方式</label>' + | ||
200 | '<div class="layui-input-block">' + | ||
201 | '<input type="tel" name="phone" maxlength="11" required lay-verify="phone" placeholder="请输联系方式" class="layui-input">' + | ||
202 | '</div>' + | ||
203 | '</div>' + | ||
204 | '<i class="layui-icon layui-icon-reduce-circle"></i>' + | ||
205 | '</div>' | ||
206 | ) | ||
207 | |||
208 | layui.use('form', function () { | ||
209 | var form = layui.form; | ||
210 | form.render('select'); | ||
211 | form.on('select(typeId)', function (data) { | ||
212 | console.log(data.value); | ||
213 | }); | ||
214 | }) | 178 | }) |
215 | // 编辑 | 179 | // form 添加 |
216 | $(document).on("click", ".layui-icon-reduce-circle", function (e) { | 180 | $('.add_form').click(function () { |
217 | $(this).parent().remove() | 181 | $('#layui-form').append( |
182 | '<div class="layui-form-item">' + | ||
183 | '<div class="layui-inline">' + | ||
184 | '<label class="layui-form-label">姓名</label>' + | ||
185 | '<div class="layui-input-block">' + | ||
186 | '<input type="text" name="name" required lay-verify="name" placeholder="请输权利人" class="layui-input">' + | ||
187 | '</div>' + | ||
188 | '</div>' + | ||
189 | '<div class="layui-inline idCard">' + | ||
190 | '<label class="layui-form-label">身份证类型</label>' + | ||
191 | '<div class="layui-input-block">' + | ||
192 | '<select lay-filter="typeId">' + | ||
193 | '<option value="1">身份证</option>' + | ||
194 | '<option value="2">军官证</option>' + | ||
195 | '</select>' + | ||
196 | '</div>' + | ||
197 | '</div>' + | ||
198 | '<div class="layui-inline">' + | ||
199 | '<label class="layui-form-label">证件号码</label>' + | ||
200 | '<div class="layui-input-block">' + | ||
201 | '<input type="tel" name="card" maxlength="18" required lay-verify="card" placeholder="请输证件号码" class="layui-input">' + | ||
202 | '</div>' + | ||
203 | '</div>' + | ||
204 | '<div class="layui-inline">' + | ||
205 | '<label class="layui-form-label">联系方式</label>' + | ||
206 | '<div class="layui-input-block">' + | ||
207 | '<input type="tel" name="phone" maxlength="11" required lay-verify="phone" placeholder="请输联系方式" class="layui-input">' + | ||
208 | '</div>' + | ||
209 | '</div>' + | ||
210 | '<i class="layui-icon layui-icon-reduce-circle"></i>' + | ||
211 | '</div>' | ||
212 | ) | ||
213 | |||
214 | layui.use('form', function () { | ||
215 | var form = layui.form; | ||
216 | form.render('select'); | ||
217 | form.on('select(typeId)', function (data) { | ||
218 | console.log(data.value); | ||
219 | }); | ||
220 | }) | ||
221 | // 编辑 | ||
222 | $(document).on("click", ".layui-icon-reduce-circle", function (e) { | ||
223 | $(this).parent().remove() | ||
224 | }) | ||
218 | }) | 225 | }) |
219 | }) | 226 | } |
220 | // 图片上传 | 227 | // 图片上传 |
221 | // 询问笔录 | 228 | // 询问笔录 |
222 | $('.record').click(function (event) { | 229 | $('.record').click(function (event) { | ... | ... |
... | @@ -52,7 +52,7 @@ | ... | @@ -52,7 +52,7 @@ |
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | <div class="layui-form-item"> | 54 | <div class="layui-form-item"> |
55 | <div style="float: left;width: 220px;"> | 55 | <div style="float: left;width: 220px;margin-right:20px"> |
56 | <select id="bdcqzType" lay-verify="required" lay-filter="xmFilter"> | 56 | <select id="bdcqzType" lay-verify="required" lay-filter="xmFilter"> |
57 | </select> | 57 | </select> |
58 | </div> | 58 | </div> | ... | ... |
-
Please register or sign in to post a comment