171 lines
7.4 KiB
Plaintext
171 lines
7.4 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "维护机构可预约人数";
|
|
}
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">机构名称:</td>
|
|
<td class="rtd" style="width:200px"><input id="jgmc" /></td>
|
|
<td class="ltd" style="width:100px">体检类型:</td>
|
|
<td class="rtd" style="width:100px"><input id="tjlx" /></td>
|
|
<td class="rtd"><input id="cx" class="l-button" value="查询" type="button" /></td>
|
|
</tr>
|
|
</table>
|
|
<div id="kyywh"></div>
|
|
<div id="savediv" >
|
|
<input type="hidden" id="id" />
|
|
<table class="t1" style="width:500px">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">机构名称:</td>
|
|
<td class="rtd"><input id="jgmc_a" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" style="width:100px">体检类型:</td>
|
|
<td class="rtd"><input id="tjlx_a" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" style="width:100px">可预约人数:</td>
|
|
<td class="rtd"><input id="kyyrs" class="l-text" /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#jgmc").ligerComboBox({
|
|
url: "@Url.Action("getjg")", valueField: "jgid", textField: "jgmc", onSuccess: function () {
|
|
liger.get("jgmc").setValue("0");
|
|
}
|
|
});
|
|
$("#jgmc_a").ligerComboBox({
|
|
url: "@Url.Action("getjg")", valueField: "jgid", textField: "jgmc", onSuccess: function () {
|
|
liger.get("jgmc").setValue("0");
|
|
}
|
|
});
|
|
$("#tjlx").ligerComboBox({
|
|
url: "@Url.Action("gettjlx")", valueField: "id", textField: "medical_scheme", onSuccess: function () {
|
|
liger.get("tjlx").setValue("0");
|
|
}
|
|
});
|
|
$("#tjlx_a").ligerComboBox({
|
|
url: "@Url.Action("gettjlx")", valueField: "id", textField: "medical_scheme", onSuccess: function () {
|
|
liger.get("tjlx").setValue("0");
|
|
}
|
|
});
|
|
$("#kyywh").ligerGrid({
|
|
|
|
url: "@Url.Action("getjgyyrs")", title: "维护机构可预约人数", columns: [
|
|
{ display: '机构名称', name: 'jgmc', align: 'left', width: 260 },
|
|
{ display: '体检类型', name: 'tjlx', align: 'left', width: 120 },
|
|
{ display: '可预约人数', name: 'kyyrs', align: 'right', width: 120 }
|
|
]
|
|
, height: "100%", width: "100%", heightDiff: 30, usePager: false,
|
|
toolbar: {
|
|
items: [
|
|
{
|
|
text: "添加", icon: "add", click: function (item) {
|
|
f_clear();
|
|
f_wh();
|
|
}
|
|
}
|
|
, {
|
|
|
|
text: "修改", icon: "edit", click: function (item) {
|
|
var r = liger.get("kyywh").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择需要修改的设置!");
|
|
}
|
|
$("#id").val(r.id);
|
|
liger.get("jgmc_a").setValue(r.jgid);
|
|
liger.get("tjlx_a").setValue(r.lxid);
|
|
$("#kyyrs").val(r.kyyrs);
|
|
f_wh();
|
|
|
|
}
|
|
},
|
|
{ line: true },
|
|
{ text: '删除', click: edit, icon: 'delete' }
|
|
]
|
|
}
|
|
});
|
|
$("#cx").bind("click", function () {
|
|
liger.get("kyywh").set("parms", { jgid: liger.get("jgmc").getValue(), tjlx: liger.get("tjlx").getValue() });
|
|
liger.get("kyywh").reload();
|
|
});
|
|
$("#savediv").hide();
|
|
});
|
|
function f_clear() {
|
|
liger.get("jgmc_a").setValue("0");
|
|
liger.get("tjlx_a").setValue("0");
|
|
$("#kyyrs").val("");
|
|
$("#id").val("");
|
|
}
|
|
function f_wh() {
|
|
$.ligerDialog.open({
|
|
title: "维护可预约人数", target: $("#savediv"), width: 550, height: 200, buttons: [
|
|
{
|
|
text: '确定', onclick: function (item, dialog) {
|
|
if (liger.get("jgmc_a").getValue() == "0" || liger.get("jgmc_a").getValue() == "") {
|
|
$.ligerDialog.alert("预约机构不能为空!");
|
|
return;
|
|
}
|
|
if (liger.get("tjlx_a").getValue() == "0" || liger.get("tjlx_a").getValue() == "") {
|
|
$.ligerDialog.alert("体检类型不能为空!");
|
|
return;
|
|
}
|
|
if ($("#kyyrs").val() == "") {
|
|
$.ligerDialog.alert("可预约人数不能为空!");
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url: "@Url.Action("saveyyrs")", type: "post", dataType: "json", data: { jgid: liger.get("jgmc_a").getValue(), cylx: liger.get("tjlx_a").getValue(), kyyrs: $("#kyyrs").val(),id:$("#id").val() },
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(data.Message);
|
|
if (data.State == 1) {
|
|
f_clear();
|
|
liger.get("kyywh").reload();
|
|
dialog.hidden();
|
|
}
|
|
}, beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
|
|
}, {
|
|
text: "取消", onclick: function (item, dialog) {
|
|
dialog.hidden();
|
|
}
|
|
}]
|
|
});
|
|
}
|
|
function edit(item) {
|
|
if (item.text === "删除") {
|
|
var r1 = liger.get("kyywh").getSelectedRow();
|
|
if (!r1) {
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
|
return;
|
|
} else {
|
|
$.ajax({
|
|
url: "@Url.Action("delKyywh")", type: "post", dataType: "json", data: {id:r1.id},
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
liger.get("kyywh").reload();
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
}
|