tijian_tieying/web/dccdc/Views/Charge4/dunxinqunfa.cshtml
2025-02-20 12:14:39 +08:00

140 lines
5.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@{
ViewBag.Title = "不漏短信群发";
}
<table class="t1" style="width:100%">
<tr>
<td class="ltd" style="width:160px">请上传电话号码:</td>
<td class="rtd" style="width:200px"><input type="file" id="file" name="file" /></td>
<td class="rtd"><input type="button" value="上传" id="sc" class="l-button" /></td>
</tr>
</table>
<table>
<tr>
<td style="width:400px">待发送人员</td>
<td></td>
</tr>
<tr>
<td valign="top">
<div id="dfslb" style="width:400px"></div>
</td>
<td valign="top">
<table class="t1">
<tr>
<td class="ltd">补种疫苗名称:</td>
<td class="rtd"><input type="text" id="ymmc" class="l-text" /></td>
</tr>
<tr>
<td class="ltd"></td>
<td class="rtd"><input id="fs" value="发送魔板短信" type="button" class="l-button" style="width:120px" /></td>
</tr>
<tr>
<td class="ltd">短信内容:</td>
<td class="rtd"><textarea rows="5" cols="5" id="dxnr" class="l-text" style="width:260px;height:80px" ></textarea></td>
</tr>
<tr>
<td class="ltd"></td>
<td class="rtd"><input id="fs2" value="发送普通短信" type="button" class="l-button" style="width:120px" /></td>
</tr>
</table>
</td>
</tr>
</table>
@section scripts{
<script src="@Url.Content("~/Scripts/ajaxfileupload.js")"></script>
<script>
$(function () {
$("#dfslb").ligerGrid({
height: '100%',
columns: [
{ display: '接种条码', name: 'barcode', align: 'left', width: 140 },
{ display: '姓名', name: 'username', align: 'left', width: 80 },
{ display: '手机号', name: 'sjh', align: 'left', width: 80 },
{ display: '出生日期', name: 'csrq', align: 'left', width: 100 }
],
//url: "@Url.Action("getSFXMData")",
data: { Rows: [], Total: 0 },
pageSize: 30,
rownumbers: true,
usePager: false
});
$("#sc").click(function () {
$.ligerDialog.waitting("正在上传……");
$.ajaxFileUpload({
url: "@Url.Action("uploadsjh")",
type: "post",
secureuri: false, //一般设置为false
fileElementId: "file", // 上传文件的id、name属性名
dataType: "json", //返回值类型一般设置为json、application/json
//elementIds: elementIds, //传递参数到服务器
success: function (data, status) {
$.ligerDialog.closeWaitting();
if (data.State == 1) {
liger.get("dfslb").set("data", data.Message);
liger.get("dfslb").reload();
}
else {
$.ligerDialog.warn(data.Message);
}
},
error: function (data, status, e) {
$.ligerDialog.closeWaitting();
$.ligerDialog.warn(data.responseText);
},
complete: function () {
//var g = liger.get("olddate");
//g.setParm("key", cId);
//g.reload();
},
beforeSend: function () { $.ligerDialog.waitting("正在上传……"); }
});
});
$("#fs").bind("click", function () {
$.ligerDialog.waitting("正在发送请稍后……");
var sjh = "";
for (var i = 0; i < liger.get("dfslb").rows.length; i++) {
sjh += liger.get("dfslb").rows[i].sjh + "|";
}
$.ajax("@Url.Action("senddx")", {
type: "post", dataType: "json", data: { sjhs: sjh, ymmc: $("#ymmc").val() },
success: function () {
$.ligerDialog.closeWaitting();
$.ligerDialog.alert(data.Message);
if (data.State == 1) {
liger.get("dfslb").set("data", { Rows: [], Total: 0 });
liger.get("dfslb").reload();
}
}
}
);
});
$("#fs2").bind("click", function () {
$.ligerDialog.waitting("正在发送请稍后……");
var sjh = "";
for (var i = 0; i < liger.get("dfslb").rows.length; i++) {
sjh += liger.get("dfslb").rows[i].sjh + "|";
}
$.ajax("@Url.Action("senddx2")", {
type: "post", dataType: "json", data: { sjhs: sjh, dxnr: $("#dxnr").val() },
success: function () {
$.ligerDialog.closeWaitting();
$.ligerDialog.alert(data.Message);
if (data.State == 1) {
liger.get("dfslb").set("data", { Rows: [], Total: 0 });
liger.get("dfslb").reload();
}
}
}
);
});
});
</script>
}