152 lines
6.5 KiB
Plaintext
152 lines
6.5 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "新冠核酸检测条码领用";
|
|
}
|
|
<table class="t1">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">目前剩余条码:</td>
|
|
<td class="rtd" style="width:200px"><span style="color:red;font-weight:bold;" id="tmcount"></span></td>
|
|
<td class="rtd" colspan="3"><input type="button" id="sx" value="刷新" class="l-button" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">最小条码号:</td>
|
|
<td class="rtd"><span id="tmmin" style="color:gray;font-weight:bold"></span></td>
|
|
<td class="ltd" style="width:100px">最大条码号:</td>
|
|
<td class="rtd" colspan="2"><span id="tmmax" style="color:gray;font-weight:bold"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">领用人:</td>
|
|
<td class="rtd"><input id="s_lyr" type="text" /></td>
|
|
<td class="ltd">领时间:</td>
|
|
<td class="rtd"><input id="s_lysj" type="text" /></td>
|
|
<td class="rtd">
|
|
<input type="button" class="l-button" value="查询" id="cx"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div id="lyjl"></div>
|
|
<div id="addtmly">
|
|
<table class="t1" style="width:300px">
|
|
<tr>
|
|
<td class="ltd" style="width:120px">
|
|
领用人:
|
|
</td>
|
|
<td class="rtd">
|
|
<input id="lyr" type="text" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">开始条码:</td>
|
|
<td class="rtd"><input type="text" id="tmb" class="l-text" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">结束条码:</td>
|
|
<td class="rtd"><input type="text" id="tme" class="l-text" /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
//刷新条码状态
|
|
function shuaxintmzt() {
|
|
$.ajax("gettmzt", {
|
|
type: "post", dataType: "json", success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
if (d.state == 1) {
|
|
$("#tmcount").text(d.tmcount);
|
|
$("#tmmin").text(d.tmmin);
|
|
$("#tmmax").text(d.tmmax);
|
|
}
|
|
else {
|
|
$.ligerDialog.alert(data.msg);
|
|
}
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在查询请稍后……");
|
|
}
|
|
});
|
|
}
|
|
$(function () {
|
|
shuaxintmzt();
|
|
$("#s_lysj").ligerDateEditor({ format: "yyyy-MM-dd", showTime: false });
|
|
$("#lyjl").ligerGrid({
|
|
title: "条码领用记录",
|
|
url: "@Url.Action("tmlyjl")", columns: [
|
|
{ name: "barcode", display: "条码号", width: 140, align: "left" },
|
|
{ name: "lyr_name", display: "领用人", width: 140, align: "left" },
|
|
{ name: "lysj", display: "领用时间", width: 200, align: "right" },
|
|
{ name: "ffr_name", display: "发放人", width: 140, align: "left" },
|
|
{ name: "bdsj", display: "使用时间", width: 200, align: "right" }
|
|
|
|
], width: '95%',
|
|
delayLoad: true, height: "100%", heightDiff: -30, toolbar: {
|
|
items: [{
|
|
text: '领用',icon:"add", click: function () {
|
|
$.ligerDialog.open({
|
|
title: "核酸预打印条码领用", target: $("#addtmly"), width: 320, height: 160, top: 50, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
var lyrid = liger.get("lyr").getValue();
|
|
var tmmin = $("#tmb").val();
|
|
var tmmax = $("#tme").val();
|
|
if ((!lyrid) || (!tmmin) || (!tmmax)) {
|
|
$.liger.warn("领用人、开始条码和结束条码都不能为空!");
|
|
return;
|
|
}
|
|
if (tmmin.length != tmmax.length) {
|
|
$.liger.warn("开始条码和结束条码的位数不一样!");
|
|
return;
|
|
}
|
|
$.ajax("@Url.Action("fftm")", {
|
|
type: "post", dataType: "json", data: { lyrid: lyrid, tmmax: tmmax, tmmin: tmmin }, beforeSend: function () {
|
|
$.ligerDialog.waitting("正在处理请稍后……");
|
|
},
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
if (d.state == 1) {
|
|
liger.get("lyr").setValue("");
|
|
$("#tmb").val("");
|
|
$("#tme").val("");
|
|
$.ligerDialog.success(d.msg);
|
|
}
|
|
else {
|
|
$.ligerDialog.warn(d.msg);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
});
|
|
}
|
|
}]
|
|
}
|
|
});
|
|
|
|
$("#sx").click(function () {
|
|
shuaxintmzt();
|
|
});
|
|
|
|
$("#cx").click(function () {
|
|
liger.get("lyjl").set("parms", {
|
|
s_lyr: liger.get("s_lyr").getValue(), s_lysj: $("#s_lysj").val()
|
|
});
|
|
liger.get("lyjl").reload();
|
|
});
|
|
|
|
$("#s_lyr").ligerComboBox({
|
|
url: "@Url.Action("getczy")",
|
|
valueField : 'id',
|
|
textField: 'name', autocomplete:true
|
|
});
|
|
$("#lyr").ligerComboBox({
|
|
url: "@Url.Action("getczy")",
|
|
valueField : 'id',
|
|
textField: 'name', autocomplete:true
|
|
});
|
|
$("#addtmly").hide();
|
|
|
|
});
|
|
</script>
|
|
}
|
|
|