ComplianceServer/oldcode/WEB/Views/WeiXin/OrderDeposit/Bank.cshtml

149 lines
5.1 KiB
Plaintext
Raw Permalink 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 = "支付记录录入";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<style>
.layui-table td, .layui-table th {
padding: 5px 15px;
}
</style>
<div class="mvctool bgb">
<input class="layui-btn layui-btn-ok" id="btnSave" type="button" value="提交" />
<input class="layui-btn layui-btn-primary" id="btnClose" type="button" value="关闭" />
</div>
@using (Html.BeginForm("Add2", "OrderDeposit", null, FormMethod.Post, new { Id = "CreateForm" }))
{
<table class="fromEditTable" id="qrcodeTab">
<tr>
<td style="width:120px;">客户ID</td>
<td style="width:310px">
<input type="text" value="@Request["resid"]" disabled readonly>
<input type="hidden" value="@Request["resid"]" name="resid" />
<input type="hidden" name="payno" id="payno" />
</td>
<td width="120px"></td>
</tr>
@if (ViewBag.DeptList != null)
{
<tr>
<td>部门归属:</td>
<td>
<select id="deptcode" name="deptcode">
<option value="">请选择...</option>
@foreach (var item in ViewBag.DeptList as List<SelectListItem>)
{
<option value="@item.Value">@item.Text</option>
}
</select>
</td>
<td></td>
</tr>
}
<tr style="display:none;">
<td style="width:120px;">支付类型:</td>
<td style="width:310px">
<select name="PAYTYPE">
<option value="3" selected="selected">银行转账</option>
</select>
</td>
<td width="120px"></td>
</tr>
<tr>
<td>银行名称:</td>
<td><input type="text" id="bankName"></td>
<td></td>
</tr>
<tr>
<td style="width:120px;">付款日期:</td>
<td style="width:310px">
<input id="paydate" name='paydate' class='Wdate' type='text' value='@DateTime.Now.ToString("yyy-MM-dd")' onclick='javascript: WdatePicker();' />
</td>
<td width="120px"></td>
</tr>
<tr>
<td>付款金额:</td>
<td>
<input type="text" id="payprice" name="payprice" placeholder="¥">
</td>
<td></td>
</tr>
<tr>
<td style="width:120px;">付款人姓名:</td>
<td style="width:310px">
<input type="text" id="payname" name="payname" placeholder="请输入">
</td>
<td width="120px"></td>
</tr>
</table>
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
var bankName = $("#bankName").val();
var payprice = $("#payprice").val();
var payname = $("#payname").val();
var paydate = $("#paydate").val();
if (bankName == "") {
$.messager.alert("错误", "银行名称不能为空!", "error");
return;
}
if (payprice == "") {
$.messager.alert("错误", "付款金额不能为空!", "error");
return;
}
if (payname == "") {
$.messager.alert("错误", "付款人姓名不能为空!", "error");
return;
}
if (paydate == "") {
$.messager.alert("错误", "付款日期不能为空!", "error");
return;
}
var date = new Date();
var month = date.getMonth();
var day = date.getDay();
var hm = date.getMilliseconds();
var d = month + "." + day + "-" + hm;
var payno = bankName + " " + payname + "【" + payprice + "】" + "(" + d + ")";
$("#payno").val(payno);
@if (ViewBag.DeptList != null)
{
@Html.Raw("var deptcode = $('#deptcode');");
@Html.Raw("if (!$.trim(deptcode.val())){");
@Html.Raw(" $.messager.alert('错误', '请选择部门归属!', 'error'); return;");
@Html.Raw("}");
}
$.r_ajax({
url: "/WeiXin/OrderDeposit/Add2",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type == 1) {
$.messager.alert("提示", '提交成功!', "info", function () { window.parent.location.reload(); });
}
else {
$.messager.alert("警告", data.message, "error");
}
}
});
return false;
});
$("#btnClose").click(function () {
parent.layer.closeAll();
});
});
</script>