89 lines
2.5 KiB
Plaintext
89 lines
2.5 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "疫苗接种流程";
|
|
}
|
|
@using Newtonsoft.Json;
|
|
@model dccdc.Models.ym_jzlc
|
|
<div class="l-clear"></div>
|
|
<div id="maingrid"></div>
|
|
<div style="display:none;">
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
var openf;
|
|
function edit(item) {
|
|
var id;
|
|
if (item.text === "增加") {
|
|
id = "";
|
|
}
|
|
else if (item.text === "修改") {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
}
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("EditYmJzlc")?id=" + id,
|
|
title: item.text,
|
|
width: 380,
|
|
height: 300
|
|
});
|
|
}
|
|
function init() {
|
|
liger.get("maingrid").reload();
|
|
openf.close();
|
|
}
|
|
$(function () {
|
|
$("#maingrid").ligerGrid({
|
|
height: '100%',
|
|
columns: [
|
|
{ display: '主键', name: 'id', align: 'left', width: 100, minWidth: 60 }
|
|
, { display: '流程名称', name: 'lcmc', align: 'left', width: 100, minWidth: 60 }
|
|
, { display: '对应疫苗', name: 'ymid', align: 'left', width: 100, minWidth: 60, render: function (r, i, v) {
|
|
if (v) {
|
|
var json=@Html.Raw(JsonConvert.SerializeObject(ViewData["vaccine"]));
|
|
for(i in json){
|
|
if(json[i]["Value"]==v)
|
|
return json[i]["Text"];
|
|
}
|
|
}
|
|
}}
|
|
, { display: '进度', name: 'jdid', align: 'left', width: 100, minWidth: 60, render: function (r, i, v) {
|
|
if (v) {
|
|
var json=@Html.Raw(JsonConvert.SerializeObject(ViewData["ymjd"]));
|
|
for(i in json){
|
|
if(json[i]["Value"]==v)
|
|
return json[i]["Text"];
|
|
}
|
|
}
|
|
}}
|
|
, { display: '与上次间隔天数', name: 'jgts', align: 'left', width: 100, minWidth: 60 }
|
|
],
|
|
url: "@Url.Action("GetYmJzlc")",
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
toolbar: {
|
|
items: [
|
|
{ text: '增加', click: edit, icon: 'add' },
|
|
{ line: true },
|
|
{ text: '修改', click: edit, icon: 'modify' }
|
|
]
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|