192 lines
8.0 KiB
Plaintext
192 lines
8.0 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "预约列表";
|
|
}
|
|
<form id="search">
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px;">姓名:</td>
|
|
<td class="rtd" style="width:140px"><input id="xm" type="text" style="width:140px" class="l-text" name="xm" /></td>
|
|
<td class="ltd" style="width:100px">预约日期:</td>
|
|
<td class="rtd" style="width:160px"><input id="yyrq" name="yyrq" type="text" /></td>
|
|
<td class="ltd" style="width:100px">预约类型:</td>
|
|
<td class="rtd" style="width:160px">
|
|
<select id="yylx" name="yylx">
|
|
<option value="0" selected="selected">请选择</option>
|
|
<option value="1">微信预约</option>
|
|
<option value="2">自助机预约</option>
|
|
<option value="3">企业预约</option>
|
|
<option value="4">批量导入</option>
|
|
<option value="5">人工预约</option>
|
|
</select>
|
|
</td>
|
|
<td class="ltd" style="width:100px">预约机构:</td>
|
|
<td class="rtd" width="width:160px"><input id="yyjg" /></td>
|
|
<td class="rtd" style="width:100px"><input id="cx" type="button" class="l-button" value="查询" /></td>
|
|
<td class="rtd"><input id="dc" type="button" class="l-button" value="导出" style="display:none" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<div id="yyList"></div>
|
|
|
|
<div id="xgyyrqdiv" style="display:none">
|
|
<table class="t1" style="width:300px">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">预约日期:</td>
|
|
<td class="rtd">
|
|
<input id="xgyyrq" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div style="display:none">
|
|
<iframe id="if_dc" src="about:blank"></iframe>
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
|
|
<script>
|
|
$(function () {
|
|
$("#yyjg").ligerComboBox({
|
|
url: "@Url.Action("getjg")", valueField: "jgid", textField: "jgmc", onSuccess: function () {
|
|
liger.get("yyjg").setValue("0");
|
|
}
|
|
});
|
|
$("#xgyyrq").ligerDateEditor({ width: 140 });
|
|
$("#yyrq").ligerDateEditor({ width: 140 });
|
|
$("#yylx").ligerComboBox({ width: 140 });
|
|
liger.get("yylx").setValue("0");
|
|
$("#cx").bind("click", function () {
|
|
|
|
liger.get("yyList").set("parms", {
|
|
xm: $("#xm").val(),
|
|
yyrq: $("#yyrq").val(),
|
|
yylx: liger.get("yylx").getValue(),
|
|
jgid: liger.get("yyjg").getValue()
|
|
});
|
|
liger.get("yyList").reload();
|
|
|
|
});
|
|
$("#dc").bind("click", function () {
|
|
$.ajax({
|
|
url: "@Url.Action("dcyy")", data: {
|
|
xm: $("#xm").val(),
|
|
yyrq: $("#yyrq").val(),
|
|
yylx: liger.get("yylx").getValue(),
|
|
jgid: liger.get("yyjg").getValue()
|
|
}, type: "post", dataType: "json", beforeSend: function () {
|
|
$.ligerDialog.waitting("正在导出请稍后……");
|
|
},
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
if(data.State=="1")
|
|
{
|
|
$("if_dc").attr("src", data.Message);
|
|
}
|
|
else
|
|
{
|
|
$.ligerDialog.alert(data.Message);
|
|
}
|
|
}
|
|
});
|
|
liger.get("yyList").reload();
|
|
|
|
|
|
});
|
|
$("#yyList").ligerGrid({
|
|
parms: {}, url: "@Url.Action("getYYList")",
|
|
columns: [
|
|
{ name: "YYCode", display: "预约编码", width: 100, align: "left", },
|
|
{ name: "xingMing", display: "姓名", width: 80, align: "left", },
|
|
{
|
|
name: "IDCard", display: "身份证号", width: 160, align: "left"
|
|
},
|
|
{ name: "ADate", display: "预约日期", width: 100, align: "left", render: function (r, i, v) { return formatDate(v) } }
|
|
, { name: "Mobile", display: "联系电话", width: 100, align: "left" }
|
|
, {
|
|
name: "YYType", display: "预约方式", width: 100, align: "left", render: function (r, i, v) {
|
|
////debugger
|
|
if (v == "1") {
|
|
return "微信";
|
|
}
|
|
else if (v == "2") {
|
|
return "自助机";
|
|
}
|
|
else if (v == "3") {
|
|
return "企业预约";
|
|
}
|
|
else if (v == "4") {
|
|
return "集体导入";
|
|
}
|
|
else if (v == "5") {
|
|
return "人工预约";
|
|
}
|
|
else {
|
|
return "其他";
|
|
}
|
|
}
|
|
}
|
|
, {
|
|
name: "status", display: "登记状态", width: 80, render: function (r, i, v) {
|
|
if (v == 0) {
|
|
return "未登记";
|
|
}
|
|
else {
|
|
return "已登记";
|
|
}
|
|
}
|
|
}
|
|
, { name: "CYFAName", display: "方案名称", width: 100, align: "left" }
|
|
, { name: "jgmc", display: "预约机构", width: 150, align: "left" }
|
|
|
|
], width: "98%",
|
|
height: "100%",
|
|
rownumbers: true,
|
|
fixedCellHeight: false,
|
|
usePager: true,
|
|
heightDiff: -20,
|
|
delayLoad: true,
|
|
toolbar: {
|
|
items: [
|
|
{
|
|
text: '修改预约日期', click: function () {
|
|
var r = liger.get("yyList").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的行!");
|
|
return;
|
|
|
|
}
|
|
if (r.status == 1) {
|
|
$.ligerDialog.alert("已经登记的不能修改预约日期!");
|
|
return;
|
|
}
|
|
$.ligerDialog.open({
|
|
title: "修改预约日期", target: $("#xgyyrqdiv"), width: 350, height: 100, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
$.ajax({
|
|
url: "@Url.Action("xgyyrq")", type: "post", dtatType: "json", data: { id: r.id, yyrq: $("#xgyyrq").val() },
|
|
success: function (data) {
|
|
if (data.State == 1) {
|
|
$.ligerDialog.alert("操作成功!", function () {
|
|
dialg.hidden();
|
|
liger.get("yyList").reload();
|
|
});
|
|
}
|
|
else {
|
|
$.ligerDialog.alert(data.Message);
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
});
|
|
}, icon: 'edit'
|
|
}
|
|
]
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|