修改現有bug

This commit is contained in:
b110212000 2021-07-15 10:43:19 +08:00
parent 7291f4c59d
commit 5cf44a8035
5 changed files with 24 additions and 11 deletions

View File

@ -1069,6 +1069,7 @@
$("#power_station_select_modal_exc").attr("disabled", true);
selected_id = $(this).parents('tr').attr('data-id');
errortoID = $(this).parents('tr').attr('data-error');
$("input[name=status_modal][value='" + 0 + "']").prop('checked', true); //狀態
$("#error_code_modal_exc").val(selected_id);
$("#error_code_modal_exc").attr("disabled", true);
$("#exception-form-modal").modal();
@ -1251,7 +1252,7 @@
} else if (recode.status == 1 || recode.status == 3) {
status = 1;
}
$("input[name=status_modal][value='" + status + "']").prop('checked', true); //狀態
$("input[name=status_modal_opRecord][value='" + status + "']").prop('checked', true); //狀態
$('#work_person_select_modal').val(recode.workPersonId);
if (work_type != 2) {
$(".fix-div").hide();
@ -1337,7 +1338,7 @@
formData.append("WorkType", selected_work_type);
formData.append("ErrorCode", $("#error_code_modal").val());
formData.append("FixDo", $("#fix_do_modal").val());
formData.append("Status", $("input[name=status_modal]:checked").val());
formData.append("Status", $("input[name=status_modal_opRecord]:checked").val());
formData.append("WorkPersonId", $("#work_person_select_modal").val());
formData.append("WorkTime", $("#work_time_modal").val());
formData.append("Notice", $("#notice_textarea_modal").val());
@ -1919,8 +1920,12 @@
document.getElementById("DateGet").style.display = "";//隱藏
document.getElementById("MonthGet").style.display = "none";//隱藏
document.getElementById("YearGet").style.display = "none";//隱藏
$('#DateGet').val('');
var today = new Date();
var today_format = today.toISOString().slice(0, 10).replace(/-/g, "-");
$('#DateGet').val(today_format);
historyRange = $('#DateGet').val();
groupType = type;
getTable();
break;
case 1:
document.getElementById("Today").style.display = "none";//隱藏
@ -1930,8 +1935,12 @@
document.getElementById("DateGet").style.display = "none";//隱藏
document.getElementById("MonthGet").style.display = "";//隱藏
document.getElementById("YearGet").style.display = "none";//隱藏
$('#MonthGet').val('');
var today = new Date();
var today_format = today.toISOString().slice(0, 7).replace(/-/g, "-");
$('#MonthGet').val(today_format);
groupType = type;
historyRange = $('#MonthGet').val();
getTable();
break;
case 2:
document.getElementById("Today").style.display = "none";//隱藏
@ -1941,8 +1950,12 @@
document.getElementById("DateGet").style.display = "none";//隱藏
document.getElementById("MonthGet").style.display = "none";//隱藏
document.getElementById("YearGet").style.display = "";//隱藏
$('#YearGet').val('');
var today = new Date();
var today_format = today.toISOString().slice(0, 4).replace(/-/g, "-");
$('#YearGet').val(today_format);
groupType = type;
historyRange = $('#YearGet').val();
getTable();
break;
case 3:
document.getElementById("Today").style.display = "none";//隱藏
@ -2029,7 +2042,7 @@
});
$('#YearGet').on('change', function () {
$('#YearGet').val(today_format);
historyRange = $('#YearGet').val();
getTable();
});

View File

@ -10,7 +10,7 @@
</div>
<div class="pr-6">
<div class="form-group">
<input class="form-control" id="date-range-exception" type="text" name="date" value="">
<input class="form-control" id="date-range-exception" type="text" name="date" value="" style="width:205px;">
</div>
</div>
</div>
@ -30,7 +30,7 @@
<th>發生時間</th>
<th>異常類別</th>
<th>設備編號</th>
<th>異常原因</th>
<th>異常訊息</th>
<th>派工/維運單號</th>
</tr>
</thead>

View File

@ -12,7 +12,7 @@
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="getday(1)">昨日</button>
</div>
<div class="pr-3" id="ToMonth" style="display:none">
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="getmonth(0)">這個月</button>
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="getmonth(0)">月</button>
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="getmonth(1)">上個月</button>
</div>
<div class="pr-3" id="ToYear" style="display:none">

View File

@ -98,11 +98,11 @@
<label class="form-label" for="example-select">狀態</label>
<div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input ml-auto" id="status_none_complete" name="status_modal" value="0" />
<input type="radio" class="custom-control-input ml-auto" id="status_none_complete" name="status_modal_opRecord" value="0" />
<label class="custom-control-label" for="status_none_complete">未完成</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input ml-auto" id="status_complete" name="status_modal" value="1" />
<input type="radio" class="custom-control-input ml-auto" id="status_complete" name="status_modal_opRecord" value="1" />
<label class="custom-control-label" for="status_complete">完成</label>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB