fb176d9a by 田浩浩
2 parents 76ca1cb6 ec65d24a
...@@ -6,6 +6,8 @@ $(function () { ...@@ -6,6 +6,8 @@ $(function () {
6 setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno')); 6 setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
7 slsqxx = getApplyRecord(GetQueryString('bsm_slsq'), GetQueryString('businessno')); 7 slsqxx = getApplyRecord(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
8 LoadClxxDiv(); 8 LoadClxxDiv();
9
10 console.log(111, slsqxx)
9 }) 11 })
10 layui.use('element', function () { 12 layui.use('element', function () {
11 let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 13 let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
...@@ -96,21 +98,19 @@ $('.add_form').click(function () { ...@@ -96,21 +98,19 @@ $('.add_form').click(function () {
96 $('.record').click(function (event) { 98 $('.record').click(function (event) {
97 event.stopPropagation(); 99 event.stopPropagation();
98 }) 100 })
101
102 //config的设置是全局的
103 layui.config({
104 base: '../../../staticJs/'
105 }).extend({ //设定模块别名
106 common: 'cityCommon'
107 });
99 layui.use(['form', 'common'], function () { 108 layui.use(['form', 'common'], function () {
100 var common = layui.common, 109 var common = layui.common,
101 form = layui.form; 110 form = layui.form;
111
102 //三级地址联动 112 //三级地址联动
103 common.showCity('province', 'city', 'district'); 113 common.showCity('province', 'city', 'district');
104 //领证方式
105 form.on('radio(beshared)', function (data) {
106 if (data.value == 2) {
107 $('.shipping_method').show()
108 $('.submitButton').hide()
109 } else {
110 $('.shipping_method').hide()
111 $('.submitButton').show()
112 }
113 });
114 //区域选择 114 //区域选择
115 form.on('select(selectCity)', function (data) { 115 form.on('select(selectCity)', function (data) {
116 return false; 116 return false;
...@@ -121,7 +121,17 @@ layui.use(['form', 'common'], function () { ...@@ -121,7 +121,17 @@ layui.use(['form', 'common'], function () {
121 // return false; 121 // return false;
122 // }); 122 // });
123 }); 123 });
124 124 // 领证方式
125 $('.formRadio').click(function () {
126 let value = $(this).attr('value')
127 if (value == 2) {
128 $('.shipping_method').show()
129 $('.submitButton').hide()
130 } else {
131 $('.shipping_method').hide()
132 $('.submitButton').show()
133 }
134 })
125 //下一步事件 135 //下一步事件
126 function skipClick() { 136 function skipClick() {
127 // skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno')); 137 // skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
...@@ -135,7 +145,7 @@ function LoadClxxDiv() { ...@@ -135,7 +145,7 @@ function LoadClxxDiv() {
135 clxxContent = '<div class="img_update">'; 145 clxxContent = '<div class="img_update">';
136 clxxContent += '<div class="fileBox">'; 146 clxxContent += '<div class="fileBox">';
137 clxxContent += '<div class="fileSpan vm">'; 147 clxxContent += '<div class="fileSpan vm">';
138 clxxContent += '<input type="file" multiple id="fileInput' + index + '" onchange="handleUpdate(this,' + index + ', '+slsqxx.slclList[index].fs+')"/>'; 148 clxxContent += '<input type="file" multiple id="fileInput' + index + '" onchange="handleUpdate(this,' + index + ', ' + slsqxx.slclList[index].fs + ')"/>';
139 clxxContent += '<div class="pictureUpload"></div>'; 149 clxxContent += '<div class="pictureUpload"></div>';
140 clxxContent += '<div class="file_name">'; 150 clxxContent += '<div class="file_name">';
141 clxxContent += '<img class="update" src="../../staticImages/update.png">'; 151 clxxContent += '<img class="update" src="../../staticImages/update.png">';
...@@ -154,15 +164,35 @@ function handleUpdate(e, index, sizeNum) { ...@@ -154,15 +164,35 @@ function handleUpdate(e, index, sizeNum) {
154 let name = e.files[0].name; 164 let name = e.files[0].name;
155 let fileul = $("#fileULName" + index); 165 let fileul = $("#fileULName" + index);
156 if (fileul.find("li").length >= slsqxx.slclList[index].fs) { 166 if (fileul.find("li").length >= slsqxx.slclList[index].fs) {
157 layer.msg('已经完成上传最大限度', { icon: 5 });
158 return false 167 return false
159 } else { 168 } else {
160 _uploadSlcl(e.files[0], slsqxx.slclList[index].bsmCl, $("#fileULName" + index), sizeNum); 169 _uploadSlcl(e.files[0], slsqxx.slclList[index].bsmCl, $("#fileULName" + index), sizeNum);
161 fileul.append('<li class="fileName">' + '<span title="' + name + '">' + name + '</span>' + '<img class="operation" src="../../staticImages/chacha.png">' + '</li>'); 170 fileul.append('<li class="fileName">' + '<span title="' + name + '">' + name + '</span>' + '<img class="operation" src="../../staticImages/chacha.png">' + '</li>');
162 } 171 }
163 } 172 }
173 $(document).on("click", ".pictureUpload", function (e) {
174 layer.msg('已经完成上传最大限度', { icon: 5 });
175 })
176
164 $(document).on("click", ".fileListName .fileName .operation", function (e) { 177 $(document).on("click", ".fileListName .fileName .operation", function (e) {
165 $(this).parent().remove(); 178 var that = this
179 $.ajax({
180 type: "post", //提交方式
181 url: portal.api_url + "/portal/FillInformation/deleteSlcl",//路径
182 dataType: "json",
183 data: {
184 'bsmSlclmx': $(that).attr('bsmSlclmx')
185 },
186 //数据,这里使用的是Json格式进行传输
187 success: function (result) {//返回数据根据结果进行相应的处理
188 if (result.code == 200) {
189 $(that).parent().remove();
190 layer.msg('删除成功!');
191 } else {
192 layer.msg('删除失败!');
193 }
194 }
195 });
166 }) 196 })
167 // // 图片上传 197 // // 图片上传
168 function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) { 198 function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) {
...@@ -180,11 +210,14 @@ function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) { ...@@ -180,11 +210,14 @@ function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) {
180 //数据,这里使用的是Json格式进行传输 210 //数据,这里使用的是Json格式进行传输
181 success: function (result) {//返回数据根据结果进行相应的处理 211 success: function (result) {//返回数据根据结果进行相应的处理
182 if (result.code == 200) { 212 if (result.code == 200) {
213 fileul.parent().find('.fileListName .fileName').eq(fileul.find("li").length - 1).find('.operation').attr('bsmSlclmx', result.data[0].bsmSlclmx)
183 if (fileul.find('.fileName').length === sizeNum) { 214 if (fileul.find('.fileName').length === sizeNum) {
184 fileul.parent().find('.pictureUpload').show() 215 fileul.parent().find('.pictureUpload').show()
185 layer.msg('上传成功,并且以上传最大限度!'); 216 layer.msg('上传成功,并且以上传最大限度!');
186 fileul.parent().find('.file_name').css("z-index","15"); 217 fileul.parent().find('.file_name').css("z-index", "15");
187 }else { 218 fileul.parent().find('.updatetext').hide()
219 fileul.parent().find('.update').attr('src', '../../staticImages/Yes.png')
220 } else {
188 layer.msg('上传成功!'); 221 layer.msg('上传成功!');
189 } 222 }
190 } 223 }
......
...@@ -113,25 +113,74 @@ ...@@ -113,25 +113,74 @@
113 <!-----------------资料上传------------------ --> 113 <!-----------------资料上传------------------ -->
114 <div class="data_upload" id="clxx"> 114 <div class="data_upload" id="clxx">
115 <h3>资料上传</h3> 115 <h3>资料上传</h3>
116 <!-- <div class="img_update"> 116 </div>
117 <div class="fileBox"> 117 <!-- 领证方式 -->
118 <div class="fileSpan vm"> 118 <div class="obtaining_license">
119 <input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/> 119 <h3>领证方式</h3>
120 <input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/> 120 <div class="person_radio">
121 <div class="file_name"> 121 <input type="radio" class="formRadio" name="level" value="1" checked="">
122 <img class="update" src="../../staticImages/update.png"> 122 <p>现场领证</p>
123 <p class="updatetext">点击文件上传</p> 123 <input type="radio" class="formRadio" name="level" value="2">
124 <p>快递到家</p>
125 </div>
126 <form class="layui-form" lay-filter="example">
127 <div class="shipping_method">
128 <div class="layui-form-item item_inline">
129 <div class="layui-inline">
130 <label class="layui-form-label">收件人</label>
131 <div class="layui-input-block">
132 <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入收件人"
133 class="layui-input">
134 </div>
135 </div>
136 <div class="layui-inline">
137 <label class="layui-form-label">手机号码</label>
138 <div class="layui-input-block">
139 <input type="tel" maxlength="11" name="title" lay-verify="title" autocomplete="off"
140 placeholder="请输入手机号码" class="layui-input">
141 </div>
124 </div> 142 </div>
125 <div class="fileListName"></div>
126 </div> 143 </div>
127 <div class="certificate">登记申请书(2份)</div> 144 <div class="layui-form-item">
145 <label class="layui-form-label">所在地区</label>
146 <div class="layui-input-block ssq">
147 <h2></h2>
148 <div class="layui-inline layui-select-default" style="margin-right: 10px;">
149 <select name="province" class="Pselected" data-area="陕西省"" lay-filter="province">
150 <option value="">选择省</option>
151 </select>
152 </div>
153 <h2></h2>
154 <div class="layui-inline selected layui-select-default">
155 <select name="city" class="Cselected" data-area="西安市">
156 <option value="">选择市</option>
157 </select>
158 </div>
159 <h2></h2>
160 </div>
161 </div>
162 <div class="layui-form-item layui-form-text">
163 <label class="layui-form-label">详细地址</label>
164 <div class="layui-input-block">
165 <textarea placeholder="请输入详细地址" class="layui-textarea" name="desc"></textarea>
166 </div>
167 </div>
168 <div class="next_button">
169 <button type="button" lay-submit="" lay-filter="submit1" class="layui-btn layui-btn-normal">
170 <a>
171 下一步
172 </a>
173 </button>
174 </div>
128 </div> 175 </div>
129 </div> --> 176 <div class="next_button submitButton">
130 </div> 177 <button type="button" class="layui-btn layui-btn-normal">
131 <div class="next_button submitButton"> 178 <a onclick="skipClick()">
132 <button type="button" class="layui-btn layui-btn-normal" onclick="skipClick()"> 179 下一步
133 下一步 180 </a>
134 </button> 181 </button>
182 </div>
183 </form>
135 </div> 184 </div>
136 </div> 185 </div>
137 </div> 186 </div>
...@@ -139,7 +188,7 @@ ...@@ -139,7 +188,7 @@
139 <script type="text/javascript" src="../../staticJs/common.js"></script> 188 <script type="text/javascript" src="../../staticJs/common.js"></script>
140 <script type="text/javascript" src="../../staticJs/onlineApply/workFlow.js"></script> 189 <script type="text/javascript" src="../../staticJs/onlineApply/workFlow.js"></script>
141 <script type="text/javascript" src="../../staticJs/onlineApply/houseFill.js"></script> 190 <script type="text/javascript" src="../../staticJs/onlineApply/houseFill.js"></script>
142 <!-- <script type="text/javascript" src="../../staticJs/imageUpdate.js"></script> --> 191 <script type="text/javascript" src="../../staticJs/city-picker.js"></script>
143 <script type="text/javascript" src="../../staticJs/down.js"></script> 192 <script type="text/javascript" src="../../staticJs/down.js"></script>
144 </html> 193 </html>
145 194
......