123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- @{
- ViewBag.Title = "表具类型管理";
- Layout = "~/Views/Shared/_Form.cshtml";
- }
- <script>
-
- $(function () {
- initControl();
- })
- //初始化控件
- function initControl() {
- //表类型
- $("#NBCompany").ComboBoxTree({
- url: "/NBManage/NBSystemSetting/GetManufacturerCode",
- id: "ItemValue",
- text: "ItemName",
- description: "==请选择==",
- height: "200px"
- });
- var data =@Html.Raw(ViewBag.settingData);
- if(data!=""){
- $("#form1").SetWebControls(data);
- }
-
- }
- //保存表单
- function AcceptClick() {
- if (!$('#form1').Validform()) {
- return false;
- }
- var postData = $("#form1").GetWebControls();
- //postData 格式化 将 替换为 ""
- for (var i in postData) {
- if (postData[i] == " ") {
- postData[i] = "";
- }
- }
- $.SaveForm({
- url: "/NBManage/NBSystemSetting/SaveForm",
- param: { "strForm": JSON.stringify(postData) },
- loading: "正在保存数据...",
- success: function () {
- window.location.reload();
- }
- })
- }
- </script>
- <style type="text/css">
- .form .formTitle {
- width: 100px;
- }
- </style>
- <div style="margin-left: 10%; margin-top: 80px; margin-right: 70%;">
- <form action="" method="post">
- <table class="form">
- <tr>
- <th class="formTitle">读数小数位数<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="ReaddingDecimalDigits" type="text" class="form-control" isvalid="yes" checkexpession="Num" errormsg="读数小数位数" placeholder="请输入读数小数位数" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">用量小数位数<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="UsingDecimalDigits" type="text" class="form-control" isvalid="yes" checkexpession="Num" errormsg="请输入起始流量" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">厂商编码<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="NBManufacturerCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" errormsg="厂商编码" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">数据导出格式<font face="宋体">*</font></th>
- <td class="formValue">
- <div id="NBCompany" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull" errormsg="请选择表类型">
- </div>
- </td>
- </tr>
- <tr>
- <th></th>
- <td class="formValue">
- <input type="button" class="btn btn-primary form-control" value="保存" style="width:70%" onclick="AcceptClick()" />
- </td>
- </tr>
- </table>
- </form>
- </div>
|