258 lines
10 KiB
Plaintext
258 lines
10 KiB
Plaintext
@using System.Web.UI.WebControls
|
||
@using WX.CRM.WebHelper;
|
||
|
||
@using WX.CRM.WEB.Handler
|
||
@model WX.CRM.WEB.ViewModel.Level2.PayOpenOrder
|
||
@{
|
||
ViewBag.Title = "L2CreateActiveOrder";
|
||
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
||
}
|
||
@Styles.Render("~/Content/data_grid_list.css")
|
||
<script src="@Url.Content("~/Scripts/op/ProductSelect.js")" type="text/javascript"></script>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
var protype = $('#hidprotype').val();
|
||
$("#product").ProductSelect({
|
||
url: "/Level2/L2Product/GetPayProduct?protype=" + protype,
|
||
Product_obj: "#ProductCode",
|
||
GetModule: function (ModuleData) {
|
||
var _text = "";
|
||
$("#tbList").empty();
|
||
$.each(ModuleData, function (i, n) {
|
||
_text += "<tr><td></td><td>" + n.MODULEID + "</td>" + "<td>" + n.MODULENAME + "</td></tr>"
|
||
});
|
||
$("#tbList").append(_text);
|
||
}
|
||
});
|
||
|
||
$("#btnSave").click(function () {
|
||
if ($("#CreateForm").valid()) {
|
||
$.r_ajax({
|
||
url: "/Level2/Leve2Order/L2AddOrderOpen?days="+$("#txtDays").val(),
|
||
type: "Post",
|
||
data: $("#CreateForm").serialize(),
|
||
dataType: "json",
|
||
loading: true,
|
||
success: function (data) {
|
||
if (data.type) {
|
||
window.parent.frameReturnByMes(data.message);
|
||
window.parent.frameReturnByReload(true);
|
||
window.parent.frameReturnByClose();
|
||
}
|
||
else {
|
||
window.parent.frameReturnByMes(data.message);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
return false;
|
||
});
|
||
$("#seachPhone").click(function () {
|
||
var resid = $("#getResId").val()
|
||
$.ajax({
|
||
url: "/Level2/Leve2Order/L2GetPhoneByResid?resid=" + resid,
|
||
type: "Post",
|
||
dataType: "json",
|
||
success: function (data) {
|
||
if (data.type) {
|
||
$("#resPhonLIst").empty();
|
||
var _text = "";
|
||
$.each(data.data, function (i, n) {
|
||
if (n.Text == resid) {
|
||
_text += "<input name='resPhone' type='radio' value='" + n.Text + "' checked='checked'" + " id='" + n.Text + "' />" + n.Value;
|
||
}
|
||
else { _text += "<input name='resPhone' type='radio'value='" + n.Text + "' id='" + n.Text + "' />" + n.Value; }
|
||
});
|
||
$("#resPhonLIst").append(_text);
|
||
}
|
||
else {
|
||
window.parent.frameReturnByMes(data.data);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
$("input[name=getPhone]").click(function () {
|
||
if ($(this).attr("id") === "rId") {
|
||
$("#mobile").text();
|
||
$(".resIdP").show();
|
||
$(".Mobile").hide();
|
||
}
|
||
else {
|
||
$("#resPhonLIst").empty();
|
||
$(".resIdP").hide();
|
||
$(".Mobile").show();
|
||
}
|
||
});
|
||
|
||
});
|
||
</script>
|
||
|
||
<div class="mvctool bgb">
|
||
@Html.ToolButtonPlain("btnSave", "icon-save", "创建订单", false, "")
|
||
</div>
|
||
@using (Html.BeginForm("L2PayOrderOpen", "Leve2Order", null, FormMethod.Post, new { Id = "CreateForm" }))
|
||
{
|
||
<div class="formContent">
|
||
@Html.ValidationSummary(true)
|
||
<table class="fromEditTable setTextWidth300">
|
||
<tbody>
|
||
<tr>
|
||
<td style="width: 100px;">
|
||
@Html.LabelFor(m => m.userName)
|
||
</td>
|
||
<td style="width: 210px">
|
||
@Html.TextBoxFor(m => m.userName)
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.userName)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width: 100px;">
|
||
@Html.LabelFor(m => m.businessType)
|
||
</td>
|
||
<td style="width: 210px">
|
||
@Html.RadioButtonListFor(m => m.businessType, new List<SelectListItem>()
|
||
{
|
||
new SelectListItem
|
||
{
|
||
Text = "业务版",
|
||
Value = "2"
|
||
},
|
||
new SelectListItem
|
||
{
|
||
Text = "ZD",
|
||
Value = "1"
|
||
},
|
||
new SelectListItem
|
||
{
|
||
Text = "OEM",
|
||
Value = "3",
|
||
Selected = true
|
||
}
|
||
}, RepeatDirection.Vertical)
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.businessType)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
<input id="rId" name="getPhone" type="radio" value="" checked="checked" /> 客户ID:
|
||
</td>
|
||
<td style="width:210px" class="resIdP">
|
||
<input type="text" id="getResId" style="width:240px;" /><input type="button" value="查询" id="seachPhone" />
|
||
</td>
|
||
<td width="220px" id="resPhonLIst" class="resIdP"></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
<input id="pId" name="getPhone" type="radio" value="" />手机号码:
|
||
</td>
|
||
<td style="width:210px;display:none; " class="Mobile">
|
||
@Html.TextBoxFor(m => m.mobile)
|
||
</td>
|
||
<td width="220px;display:none;" class="Mobile">
|
||
@Html.ValidationMessageFor(m => m.mobile)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
@Html.LabelFor(m => m.fullName)
|
||
</td>
|
||
<td style="width:210px">
|
||
@Html.TextBoxFor(m => m.fullName)
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.fullName)
|
||
</td>
|
||
</tr>
|
||
|
||
<tr id="product">
|
||
<td style="width:100px;">
|
||
产品类型:
|
||
</td>
|
||
<td style="width:210px">
|
||
<select id="BigPuc"></select>
|
||
<select id="ProductCode" name="ProductCode"></select>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
|
||
<tr style="display:none;">
|
||
<td style="width:100px;">
|
||
@Html.LabelFor(m => m.PayNo)
|
||
</td>
|
||
<td style="width:210px">
|
||
@Html.TextBoxFor(m => m.PayNo, htmlAttributes: new { Value = "auto" })
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.PayNo)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
@Html.LabelFor(m => m.PayPrice)
|
||
</td>
|
||
<td style="width:210px">
|
||
@Html.TextBoxFor(m => m.PayPrice)
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.PayPrice)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
开通天数:
|
||
</td>
|
||
<td style="width:210px">
|
||
<input type="text" id="txtDays" />
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
@Html.LabelFor(m => m.PayType)
|
||
</td>
|
||
<td style="width:210px">
|
||
@Html.DropDownList("PayType", new List<SelectListItem>() {
|
||
new SelectListItem(){Text="银行转账",Value="3",Selected=true}})
|
||
</td>
|
||
<td width="220px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:100px;">
|
||
@Html.LabelFor(m => m.PayMark)
|
||
</td>
|
||
<td style="width:210px">
|
||
@Html.TextAreaFor(m => m.PayMark)
|
||
</td>
|
||
<td width="220px">
|
||
@Html.ValidationMessageFor(m => m.PayMark)
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
</div>
|
||
<div class="bas_datagrid">
|
||
<div class='grid_table'>
|
||
<table width='100%' id='tablist' state='false' cellspacing='0' cellpadding='0' class='bas_datagrid_table' columns='MODULEID,MODULEname'>
|
||
<thead>
|
||
<tr class='grid_table_head'>
|
||
<th style='width:25px;'> </th>
|
||
<th class='tablegrid_sort' width="50%">模块Id <span class='tablegrid-sort-icon'> </span></th>
|
||
<th class='tablegrid_sort' width="50%">模块名称 <span class='tablegrid-sort-icon'> </span></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="tbList"></tbody>
|
||
</table>
|
||
<div style='width:100%;height:40px;'></div>
|
||
<input type="hidden" id="hidprotype" value="@ViewBag.protype" />
|
||
</div>
|
||
</div>
|
||
|
||
}
|