fb176d9a by 田浩浩
2 parents 76ca1cb6 ec65d24a
......@@ -6,6 +6,8 @@ $(function () {
setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
slsqxx = getApplyRecord(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
LoadClxxDiv();
console.log(111, slsqxx)
})
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
......@@ -96,21 +98,19 @@ $('.add_form').click(function () {
$('.record').click(function (event) {
event.stopPropagation();
})
//config的设置是全局的
layui.config({
base: '../../../staticJs/'
}).extend({ //设定模块别名
common: 'cityCommon'
});
layui.use(['form', 'common'], function () {
var common = layui.common,
form = layui.form;
//三级地址联动
common.showCity('province', 'city', 'district');
//领证方式
form.on('radio(beshared)', function (data) {
if (data.value == 2) {
$('.shipping_method').show()
$('.submitButton').hide()
} else {
$('.shipping_method').hide()
$('.submitButton').show()
}
});
//区域选择
form.on('select(selectCity)', function (data) {
return false;
......@@ -121,7 +121,17 @@ layui.use(['form', 'common'], function () {
// return false;
// });
});
// 领证方式
$('.formRadio').click(function () {
let value = $(this).attr('value')
if (value == 2) {
$('.shipping_method').show()
$('.submitButton').hide()
} else {
$('.shipping_method').hide()
$('.submitButton').show()
}
})
//下一步事件
function skipClick() {
// skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
......@@ -135,7 +145,7 @@ function LoadClxxDiv() {
clxxContent = '<div class="img_update">';
clxxContent += '<div class="fileBox">';
clxxContent += '<div class="fileSpan vm">';
clxxContent += '<input type="file" multiple id="fileInput' + index + '" onchange="handleUpdate(this,' + index + ', '+slsqxx.slclList[index].fs+')"/>';
clxxContent += '<input type="file" multiple id="fileInput' + index + '" onchange="handleUpdate(this,' + index + ', ' + slsqxx.slclList[index].fs + ')"/>';
clxxContent += '<div class="pictureUpload"></div>';
clxxContent += '<div class="file_name">';
clxxContent += '<img class="update" src="../../staticImages/update.png">';
......@@ -154,15 +164,35 @@ function handleUpdate(e, index, sizeNum) {
let name = e.files[0].name;
let fileul = $("#fileULName" + index);
if (fileul.find("li").length >= slsqxx.slclList[index].fs) {
layer.msg('已经完成上传最大限度', { icon: 5 });
return false
} else {
_uploadSlcl(e.files[0], slsqxx.slclList[index].bsmCl, $("#fileULName" + index), sizeNum);
fileul.append('<li class="fileName">' + '<span title="' + name + '">' + name + '</span>' + '<img class="operation" src="../../staticImages/chacha.png">' + '</li>');
}
}
$(document).on("click", ".pictureUpload", function (e) {
layer.msg('已经完成上传最大限度', { icon: 5 });
})
$(document).on("click", ".fileListName .fileName .operation", function (e) {
$(this).parent().remove();
var that = this
$.ajax({
type: "post", //提交方式
url: portal.api_url + "/portal/FillInformation/deleteSlcl",//路径
dataType: "json",
data: {
'bsmSlclmx': $(that).attr('bsmSlclmx')
},
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200) {
$(that).parent().remove();
layer.msg('删除成功!');
} else {
layer.msg('删除失败!');
}
}
});
})
// // 图片上传
function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) {
......@@ -180,11 +210,14 @@ function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) {
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200) {
fileul.parent().find('.fileListName .fileName').eq(fileul.find("li").length - 1).find('.operation').attr('bsmSlclmx', result.data[0].bsmSlclmx)
if (fileul.find('.fileName').length === sizeNum) {
fileul.parent().find('.pictureUpload').show()
layer.msg('上传成功,并且以上传最大限度!');
fileul.parent().find('.file_name').css("z-index","15");
}else {
fileul.parent().find('.file_name').css("z-index", "15");
fileul.parent().find('.updatetext').hide()
fileul.parent().find('.update').attr('src', '../../staticImages/Yes.png')
} else {
layer.msg('上传成功!');
}
}
......
......@@ -113,25 +113,74 @@
<!-----------------资料上传------------------ -->
<div class="data_upload" id="clxx">
<h3>资料上传</h3>
<!-- <div class="img_update">
<div class="fileBox">
<div class="fileSpan vm">
<input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/>
<input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/>
<div class="file_name">
<img class="update" src="../../staticImages/update.png">
<p class="updatetext">点击文件上传</p>
</div>
<!-- 领证方式 -->
<div class="obtaining_license">
<h3>领证方式</h3>
<div class="person_radio">
<input type="radio" class="formRadio" name="level" value="1" checked="">
<p>现场领证</p>
<input type="radio" class="formRadio" name="level" value="2">
<p>快递到家</p>
</div>
<form class="layui-form" lay-filter="example">
<div class="shipping_method">
<div class="layui-form-item item_inline">
<div class="layui-inline">
<label class="layui-form-label">收件人</label>
<div class="layui-input-block">
<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入收件人"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">手机号码</label>
<div class="layui-input-block">
<input type="tel" maxlength="11" name="title" lay-verify="title" autocomplete="off"
placeholder="请输入手机号码" class="layui-input">
</div>
</div>
<div class="fileListName"></div>
</div>
<div class="certificate">登记申请书(2份)</div>
<div class="layui-form-item">
<label class="layui-form-label">所在地区</label>
<div class="layui-input-block ssq">
<h2></h2>
<div class="layui-inline layui-select-default" style="margin-right: 10px;">
<select name="province" class="Pselected" data-area="陕西省"" lay-filter="province">
<option value="">选择省</option>
</select>
</div>
<h2></h2>
<div class="layui-inline selected layui-select-default">
<select name="city" class="Cselected" data-area="西安市">
<option value="">选择市</option>
</select>
</div>
<h2></h2>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">详细地址</label>
<div class="layui-input-block">
<textarea placeholder="请输入详细地址" class="layui-textarea" name="desc"></textarea>
</div>
</div>
<div class="next_button">
<button type="button" lay-submit="" lay-filter="submit1" class="layui-btn layui-btn-normal">
<a>
下一步
</a>
</button>
</div>
</div>
</div> -->
</div>
<div class="next_button submitButton">
<button type="button" class="layui-btn layui-btn-normal" onclick="skipClick()">
下一步
</button>
<div class="next_button submitButton">
<button type="button" class="layui-btn layui-btn-normal">
<a onclick="skipClick()">
下一步
</a>
</button>
</div>
</form>
</div>
</div>
</div>
......@@ -139,7 +188,7 @@
<script type="text/javascript" src="../../staticJs/common.js"></script>
<script type="text/javascript" src="../../staticJs/onlineApply/workFlow.js"></script>
<script type="text/javascript" src="../../staticJs/onlineApply/houseFill.js"></script>
<!-- <script type="text/javascript" src="../../staticJs/imageUpdate.js"></script> -->
<script type="text/javascript" src="../../staticJs/city-picker.js"></script>
<script type="text/javascript" src="../../staticJs/down.js"></script>
</html>
......