记得上下班打卡 | git大法好,push需谨慎

Commit 2d1b0a7d authored by sangchunxi's avatar sangchunxi

#1999 #2000 bug修复

parent 2086cb02
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
width: 100%; width: 100%;
height: 34px; height: 34px;
border: 1px solid #dfdfdf; border: 1px solid #dfdfdf;
margin-top: 20px;
} }
/* 低部按钮 */ /* 低部按钮 */
#addClassify .bottomBtn { #addClassify .bottomBtn {
...@@ -46,6 +45,21 @@ ...@@ -46,6 +45,21 @@
.layui-layer-shade{ .layui-layer-shade{
opacity: 30%; opacity: 30%;
} }
.picker {
height: 34px;
position: relative;
}
.picker .require-item {
color: red;
position: absolute;
top: 6px;
left: -12px;
font-size: 20px;
}
.show-require-text {
color: red;
height: 18px;
}
</style> </style>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
...@@ -84,8 +98,10 @@ ...@@ -84,8 +98,10 @@
<div class="file-loading"> <div class="file-loading">
<input class="schoolName" type="text" placeholder="学校名称" > <input class="schoolName" type="text" placeholder="学校名称" >
<div class="picker"> <div class="picker">
<div class="require-item">*</div>
<div class="demo" id="demo-1"></div> <div class="demo" id="demo-1"></div>
</div> </div>
<p class="show-require-text" id="requireProvinceText"></p>
<input class="schoolAdress" type="text" placeholder="详细地址输入" > <input class="schoolAdress" type="text" placeholder="详细地址输入" >
</div> </div>
</div> </div>
...@@ -115,39 +131,45 @@ ...@@ -115,39 +131,45 @@
address: schoolAdress, address: schoolAdress,
name: schoolName, name: schoolName,
area: adArr.addressStr[2], area: adArr.addressStr[2],
areaId: adArr.addressIds[2].toString(), areaId: adArr.addressIds[2] + '',
city: adArr.addressStr[1], city: adArr.addressStr[1],
cityId: adArr.addressIds[1].toString(), cityId: adArr.addressIds[1] + '',
province: adArr.addressStr[0], province: adArr.addressStr[0],
provinceId: adArr.addressIds[0].toString() provinceId: adArr.addressIds[0] + ''
}; };
if (editStatus != '') { if (adArr.addressStr[0]) {
postData.id = editStatus; $('#requireProvinceText').val('');
$.ajax({ if (editStatus != '') {
type: 'post', postData.id = editStatus;
url: prefix + '/updateById', $.ajax({
headers:{"Content-Type":"application/json;charset=UTF-8"}, type: 'post',
data: JSON.stringify(postData), url: prefix + '/updateById',
success:function(e) { headers:{"Content-Type":"application/json;charset=UTF-8"},
$("pull-right button[type=refresh]").click(); data: JSON.stringify(postData),
refreshItem(); success:function(e) {
$(".layui-layer-close1").click(); $("pull-right button[type=refresh]").click();
} refreshItem();
}) $(".layui-layer-close1").click();
}
})
} else {
postData.id = 0;
$.ajax({
type: 'post',
url: prefix + '/create',
headers:{"Content-Type":"application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success:function(e) {
$("pull-right button[type=refresh]").click();
refreshItem();
$(".layui-layer-close1").click();
}
})
}
} else { } else {
postData.id = 0; $('#requireProvinceText').text('省为必填项!');
$.ajax({
type: 'post',
url: prefix + '/create',
headers:{"Content-Type":"application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success:function(e) {
$("pull-right button[type=refresh]").click();
refreshItem();
$(".layui-layer-close1").click();
}
})
} }
} }
function closeModal () { function closeModal () {
$(".layui-layer-close1").click(); $(".layui-layer-close1").click();
......
...@@ -67,8 +67,10 @@ ...@@ -67,8 +67,10 @@
<div class="selectClassify"> <div class="selectClassify">
<div class="ibox-content"> <div class="ibox-content">
<div class="form-group"> <div class="form-group">
<span class="require-*">*</span>
<input class="reason_text" type="textarea" placeholder="请输入驳回原因"> <input class="reason_text" type="textarea" placeholder="请输入驳回原因">
</div> </div>
<p class="requireFalseText"></p>
</div> </div>
</div> </div>
<input type="hidden" class="editCon"> <input type="hidden" class="editCon">
...@@ -165,17 +167,25 @@ ...@@ -165,17 +167,25 @@
reason: $('.reason_text').val() reason: $('.reason_text').val()
} }
} }
$.ajax({
type: 'post', // 驳回原因必填
url: smilePrefix + "/check/updateById", if ($('.reason_text').val()) {
headers: {"Content-Type": "application/json;charset=UTF-8"}, $('.requireFalseText').text('')
data: JSON.stringify(postData), $.ajax({
success: function (e) { type: 'post',
$(".layui-layer-close1").click(); url: smilePrefix + "/check/updateById",
alert(e.msg) headers: {"Content-Type": "application/json;charset=UTF-8"},
location.reload(); data: JSON.stringify(postData),
} success: function (e) {
}) $(".layui-layer-close1").click();
alert(e.msg)
location.reload();
}
})
} else {
$('.requireFalseText').text('驳回原因为必填项!')
}
} }
function yes() { function yes() {
...@@ -268,6 +278,14 @@ ...@@ -268,6 +278,14 @@
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
} }
.require-* {
font-size: 20px;
color: red;
margin-right: 10px;
}
.requireFalseText {
color: red;
}
</style> </style>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment