|
@@ -29,8 +29,8 @@ $(function () {
|
|
|
initSourceList();
|
|
|
$("#btn_creat").removeClass('in').addClass('hide');
|
|
|
$("#btn_cancel").removeClass('hide').addClass('in');
|
|
|
- $("#tb_table_1").css("display","block");
|
|
|
- $("#tb_table_2").css("display","block");
|
|
|
+ $("#tb_table_1").css("display", "block");
|
|
|
+ $("#tb_table_2").css("display", "block");
|
|
|
});
|
|
|
$("#btn_cancel").click(function (t) {
|
|
|
showTwoTable = false;
|
|
@@ -39,8 +39,8 @@ $(function () {
|
|
|
initSourceList();
|
|
|
$("#btn_cancel").removeClass('in').addClass('hide');
|
|
|
$("#btn_creat").removeClass('hide').addClass('in');
|
|
|
- $("#tb_table_1").css("display","none");
|
|
|
- $("#tb_table_2").css("display","none");
|
|
|
+ $("#tb_table_1").css("display", "none");
|
|
|
+ $("#tb_table_2").css("display", "none");
|
|
|
});
|
|
|
|
|
|
$("#btn_add").click(function (t) {
|
|
@@ -344,6 +344,8 @@ function queryParams(params) {
|
|
|
var temp = {
|
|
|
beginDate: "2012-02-13 00:00:00",
|
|
|
endDate: "2012-02-19 23:59:59",
|
|
|
+ unitCode: $("#unitCode").val(),
|
|
|
+ ampm: $("#ampmParams").val()
|
|
|
};
|
|
|
return temp;
|
|
|
}
|
|
@@ -351,6 +353,8 @@ function queryParams(params) {
|
|
|
var temp = {
|
|
|
beginDate: rePortRangeArr[0],
|
|
|
endDate: rePortRangeArr[1],
|
|
|
+ unitCode: $("#unitCode").val(),
|
|
|
+ ampm: $("#ampmParams").val()
|
|
|
};
|
|
|
return temp;
|
|
|
};
|
|
@@ -596,6 +600,11 @@ function getNewRangeArr() {
|
|
|
function cleanParams() {
|
|
|
$('#sourceRange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
$('#newRange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
+ $('#ampmParams').selectpicker('val', null);
|
|
|
+ $('#ampmParams').selectpicker('refresh');
|
|
|
+ $('#unitCode').selectpicker('val', null);
|
|
|
+ $('#unitCode').selectpicker('refresh');
|
|
|
+ initSourceList();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -603,7 +612,7 @@ function cleanParams() {
|
|
|
* 保存临时生成的新号表数据
|
|
|
*/
|
|
|
function saveTempRequest() {
|
|
|
- var index =$("#requestId").val();
|
|
|
+ var index = $("#requestId").val();
|
|
|
var realParams = JSON.parse('{"mzyRequests":""}');
|
|
|
var tempJson = JSON.parse('{"requestDay":"","ampm":"","unitCode":"","doctorCode":"","chargeType":"","totalNum":"","leftNum":"","bespeakNo":"1","checkFee":""}');
|
|
|
tempJson.requestDay = $("#editDay").val();
|
|
@@ -614,9 +623,9 @@ function saveTempRequest() {
|
|
|
tempJson.totalNum = $("#totalNum").val();
|
|
|
tempJson.leftNum = $("#totalNum").val();
|
|
|
tempJson.checkFee = $("#checkFee").val();
|
|
|
- if(index==null || index ==""){
|
|
|
+ if (index == null || index == "") {
|
|
|
tempData[tempData.length] = tempJson;
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
tempData[index] = tempJson;
|
|
|
}
|
|
|
realParams.mzyRequests = tempData;
|
|
@@ -650,7 +659,7 @@ function saveRequest() {
|
|
|
} else {
|
|
|
data = JSON.stringify({
|
|
|
mzyRequests: [{
|
|
|
- id:$("#requestId").val(),
|
|
|
+ id: $("#requestId").val(),
|
|
|
requestDay: $("#editDay").val(),
|
|
|
ampm: $("#ampm").val(),
|
|
|
unitCode: $("#deptNo").val(),
|
|
@@ -713,6 +722,10 @@ function initMzWorkTime() {
|
|
|
$('#ampm').empty(); //清空resText里面的所有内容
|
|
|
$('#ampm').html(html);
|
|
|
$('#ampm').selectpicker('refresh');
|
|
|
+
|
|
|
+ $('#ampmParams').empty(); //清空resText里面的所有内容
|
|
|
+ $('#ampmParams').html(html);
|
|
|
+ $('#ampmParams').selectpicker('refresh');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -740,6 +753,10 @@ function initDeptSelect() {
|
|
|
$('#deptNo').empty();
|
|
|
$('#deptNo').html(html);
|
|
|
$('#deptNo').selectpicker('refresh');
|
|
|
+
|
|
|
+ $('#unitCode').empty();
|
|
|
+ $('#unitCode').html(html);
|
|
|
+ $('#unitCode').selectpicker('refresh');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -761,9 +778,9 @@ function initDoctorSelect() {
|
|
|
window.location.href = '/thmz/login/view'
|
|
|
return;
|
|
|
}
|
|
|
- var html = '';
|
|
|
+ var html = '<option value=""></option>';
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
- html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + ' ('+comment.deptName+') </option>';
|
|
|
+ html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + ' (' + comment.deptName + ') </option>';
|
|
|
});
|
|
|
$('#doctorParam').empty();
|
|
|
$('#doctorParam').html(html);
|
|
@@ -842,7 +859,7 @@ function updateRequest(id) {
|
|
|
*/
|
|
|
function updateRequestByIndex(index) {
|
|
|
$("#requestId").val(index);
|
|
|
- var data =tempData[index];
|
|
|
+ var data = tempData[index];
|
|
|
$("#classTitle").text("修改");
|
|
|
$("#editDay").val(format(data.requestDay, "yyyy-MM-dd"));
|
|
|
$('#ampm').selectpicker('val', data.ampm);
|