256 lines
12 KiB
Plaintext
256 lines
12 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="rtd"><input id="cx" type="button" class="l-button" value="查询" /></td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
<div id="yyList"></div>
|
||
|
||
<div id="xgyyrqdiv" style="display:none">
|
||
<table class="t1" style="width:450px">
|
||
<tr>
|
||
<td class="ltd" style="width:100px">姓名:</td>
|
||
<td class="rtd" style="width:120px">
|
||
<input id="f_xm" class="l-text" style="width:110px" />
|
||
</td>
|
||
<td class="ltd" style="width:100px">手机号:</td>
|
||
<td class="rtd" style="width:120px">
|
||
<input id="f_sjh" class="l-text" style="width:110px" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="ltd" style="width:100px">身份证号:</td>
|
||
<td class="rtd" colspan="2">
|
||
<input id="f_sfzh" class="l-text" style="width:160px" />
|
||
</td>
|
||
<td class="rtd">
|
||
<input type="button" id="dk" value="读卡" class="l-button" />
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="ltd">检查样品:</td>
|
||
<td class="rtd" colspan="3">
|
||
<div style="float:left;width:80px"><input type="checkbox" name="yplx" value="1" checked="checked" />咽拭子</div>
|
||
<div style="float:left;width:80px"><input type="checkbox" name="yplx" value="2" />肛拭子</div>
|
||
<div style="float:left;width:100px"><input type="checkbox" name="yplx" value="3" />血清抗体</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div style="display:none">
|
||
<iframe id="if_dc" src="about:blank"></iframe>
|
||
<div class="dispReport">
|
||
<object classid="clsid:F6A015E2-092A-4006-93DA-4CBDE3AFF4B8" id="window.top.Formium.external.Print" width="300" height="50"></object>
|
||
<object id="CardReader1" classid="clsid:F225795B-A882-4FBA-934C-805E1B2FBD1B" style="background: #F5F7FF;"></object>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<script type="text/javascript" src="/Scripts/public.js"></script>
|
||
<script>
|
||
function printTM(arg) {
|
||
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
||
try {
|
||
if (window.top.Formium.external.Print.finit( "xgtm.frx")) {
|
||
window.top.Formium.external.Print.PrintXgtm(arg);
|
||
}
|
||
} catch (e) {
|
||
$.ligerDialog.error("打印条码出错:" + e.message);
|
||
}
|
||
}
|
||
var isInit = false;
|
||
function readCard() {
|
||
////debugger
|
||
var obj = document.getElementById("CardReader1");
|
||
//var form1=byId("formCard");
|
||
if (false == isInit) {
|
||
//设置端口号,1表示串口1,2表示串口2,依此类推;1001表示USB。0表示自动选择
|
||
obj.setPortNum(0);
|
||
isInit = true;
|
||
}
|
||
//使用重复读卡功能
|
||
obj.Flag = 0;
|
||
//设置照片保存路径,照片文件名:(身份证号).bmp。默认路径为系统临时目录,照片文件名:image.bmp
|
||
//obj.PhotoPath=form1.photoPath.value;
|
||
//读卡
|
||
var rst = obj.ReadCard();
|
||
//获取各项信息
|
||
if (0x90 == rst) {
|
||
//form1.person_name.value = obj.NameL();//姓名
|
||
//form1.sex.value = obj.SexL();//性别
|
||
//var birthsd = obj.BornL();//出生日期
|
||
//document.getElementById("birth").value=birthsd.substring(0,4)+"-"+birthsd.substring(5,7)+"-"+birthsd.substring(8,10);
|
||
|
||
//form1.card_number.value =obj.CardNo();//身份证号码
|
||
//form1.photoshop.value =obj.GetImage();//BASE64码
|
||
//var dates = document.getElementById("register_date").value;
|
||
//var chushen = document.getElementById("birth").value;//出生日期
|
||
//var strnum = chushen.substring(0,4)+chushen.substring(5,7)+chushen.substring(8,10);
|
||
//var dengji = document.getElementById("register_date").value;//登记日期
|
||
//var djtime = dengji.substring(0,4)+dengji.substring(5,7)+dengji.substring(8,10);
|
||
|
||
// 计算年龄:
|
||
//var age = getAgeByBrithday(birthsd.substring(0, 4), birthsd.substring(5, 7), birthsd.substring(8, 10));
|
||
//document.getElementById("person_age").value = age;// 年龄
|
||
//var photoshopd = document.getElementById("photoshop").value;
|
||
//shuipho("data:image/jpeg;base64," + obj.GetImage());
|
||
//$("#jtzz").val(obj.Address()); //住址
|
||
$("#f_xm").val(obj.NameL());
|
||
$("#f_sfzh").val(obj.CardNo());
|
||
//$("#cardnumber").trigger("blur");
|
||
$.ajax("@Url.Action("getyyxx")", {
|
||
type: "post", dataType: "json", data: { sfzh: $("#f_sfzh").val() }, success: function (data) {
|
||
$.ligerDialog.closeWaitting();
|
||
$("#f_sjh").val(data.sjh);
|
||
},
|
||
beforeSend: function () {
|
||
$.ligerDialog.waitting("正在获取预约信息……");
|
||
}
|
||
});
|
||
}
|
||
|
||
//读完卡后,将焦点放在电话上
|
||
$("#f_sjh").focus();
|
||
|
||
}
|
||
$(function () {
|
||
|
||
$("#xgyyrq").ligerDateEditor({ width: 140 });
|
||
$("#yyrq").ligerDateEditor({ width: 140 });
|
||
$("#cx").bind("click", function () {
|
||
|
||
liger.get("yyList").set("parms", {
|
||
xm: $("#xm").val(),
|
||
yyrq: $("#yyrq").val()
|
||
});
|
||
liger.get("yyList").reload();
|
||
|
||
});
|
||
|
||
$("#yyList").ligerGrid({
|
||
parms: {}, url: "@Url.Action("getYYList")",
|
||
columns: [
|
||
{ name: "xlh", display: "预约编码", width: 100, align: "left", },
|
||
{ name: "xm", display: "姓名", width: 80, align: "left", },
|
||
{
|
||
name: "sfzh", display: "身份证号", width: 160, align: "left"
|
||
},
|
||
{ name: "yyrq", display: "预约日期", width: 100, align: "left" }
|
||
, { name: "sjh", display: "联系电话", width: 100, align: "left" }
|
||
|
||
, {
|
||
name: "djzt", display: "登记状态", width: 80, render: function (r, i, v) {
|
||
if (v == 0) {
|
||
return "未登记";
|
||
}
|
||
else {
|
||
return "已登记";
|
||
}
|
||
}
|
||
}
|
||
, {
|
||
name: "djzt", display: "登记", width: 80, render: function (r, i, v) {
|
||
if (v == 0) {
|
||
return "<input type='button' onclick=\"dj('" + r.xm + "','" + r.sfzh + "','" + r.sjh +"')\" class='l-button' value='登记'/>";
|
||
}
|
||
else {
|
||
return "";
|
||
}
|
||
}
|
||
}
|
||
|
||
], width: "98%",
|
||
height: "100%",
|
||
rownumbers: true,
|
||
usePager: true,
|
||
heightDiff: -20,
|
||
delayLoad: true
|
||
});
|
||
});
|
||
function dj(xm, sfzh, sjh) {
|
||
$("#f_xm").val(xm);
|
||
$("#f_sfzh").val(sfzh);
|
||
$("#f_sjh").val(sjh);
|
||
$.ajax("@Url.Action("getyyxx")", {
|
||
type: "post", dataType: "json", data: { sfzh: $("#f_sfzh").val() }, success: function (data) {
|
||
$.ligerDialog.closeWaitting();
|
||
$("#f_sjh").val(data.sjh);
|
||
$('input[name="yplx"][value="1"]').prop("checked", false);
|
||
$('input[name="yplx"][value="2"]').prop("checked", false);
|
||
$('input[name="yplx"][value="3"]').prop("checked", false);
|
||
if (data.yymx.length > 0) {
|
||
for (var h = 0; h < data.yymx.length;h++)
|
||
$('input[name="yplx"][value="'+data.yymx[h].xmid+'"]').prop("checked", true);
|
||
}
|
||
},
|
||
beforeSend: function () {
|
||
$.ligerDialog.waitting("正在获取预约信息……");
|
||
}
|
||
});
|
||
$.ligerDialog.open({
|
||
title: "核酸检测登记", target: $("#xgyyrqdiv"), width: 500, height: 150,top:100, buttons: [{
|
||
text: "确定", onclick: function (item, dialg) {
|
||
var cks = $('input[name="yplx"]:checked');
|
||
if (cks.length == 0) {
|
||
$.ligerDialog.alert("请选择检查样品");
|
||
return;
|
||
}
|
||
if (!$("#f_sfzh").val()) {
|
||
$.ligerDialog.alert("身份证号不能为空");
|
||
return;
|
||
}
|
||
if (!$("#f_sjh").val()) {
|
||
$.ligerDialog.alert("手机号不能为空");
|
||
return;
|
||
}
|
||
if (!$("#f_xm").val()) {
|
||
$.ligerDialog.alert("姓名不能为空");
|
||
return;
|
||
}
|
||
var scks = "";
|
||
for (var i = 0; i < cks.length; i++) {
|
||
scks += $(cks[i]).val()+",";
|
||
}
|
||
$.ajax({
|
||
url: "@Url.Action("xgdj")", type: "post", dataType: "json", data: {
|
||
sfzh: $("#f_sfzh").val(), xm: $("#f_xm").val(), sjh: $("#f_sjh").val(), cks: scks
|
||
},
|
||
success: function (data) {
|
||
if (data.State == 1) {
|
||
$.ligerDialog.alert("操作成功!", function () {
|
||
$('input[name="yplx"][value="1"]').prop("checked", true);
|
||
$('input[name="yplx"][value="2"]').prop("checked", false);
|
||
$('input[name="yplx"][value="3"]').prop("checked", false);
|
||
$("#f_sfzh").val("");
|
||
$("#f_xm").val("");
|
||
$("#f_sjh").val("");
|
||
dialg.hidden();
|
||
printTM(data.id);
|
||
liger.get("yyList").reload();
|
||
});
|
||
}
|
||
else {
|
||
$.ligerDialog.alert(data.Message);
|
||
}
|
||
}
|
||
});
|
||
|
||
}
|
||
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
||
});
|
||
}
|
||
</script>
|
||
|