|
@@ -141,6 +141,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
|
|
|
$(document).on('click', '.btn-replace', function () {
|
|
|
console.log($(".other_replace").val());
|
|
|
+ if($(".other_replace").val()=='[{"fault_id":"","request_status":"0"}]'){
|
|
|
+ Layer.alert('请先填写更换件');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$.ajax({
|
|
|
url: "student/collection/replace/ids/"+Config.ids,
|
|
|
type: 'post',
|
|
@@ -150,8 +154,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
},
|
|
|
success: function (data) {
|
|
|
if(data.code==1){
|
|
|
- Layer.alert(data.msg);
|
|
|
- window.location.reload();
|
|
|
+ Layer.alert(data.msg, {
|
|
|
+ btn: ['确定'], // 或者直接使用默认的确定按钮
|
|
|
+ yes: function(index, layero){
|
|
|
+ // 刷新页面
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
if(data.code==0){
|
|
|
Layer.alert(data.msg);
|