| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- @{
- ViewBag.Title = "分区管理";
- Layout = "~/Views/Shared/_Form.cshtml";
- }
- <script>
- var keyValue = request('keyValue');
- var DMAID = request('DMAID');
- $(document).ready(function () {
- InitialColor();
- });
- //保存表单
- function AcceptClick() {
- if (!$('#form1').Validform()) {
- return false;
- }
- $("#ParentId").val(DMAID == "" ? "0" : DMAID);
- var postData = $("#form1").GetWebControls(keyValue);
- //postData 格式化 将 替换为 ""
- for (var i in postData) {
- if (postData[i] == " ") {
- postData[i] = "";
- }
- }
-
- $.SaveForm({
- url: '/DMAManage/PartitionManage/AddDMAData',
- param: {"keyValue": keyValue, "data": JSON.stringify(postData) },
- loading: "正在保存数据...",
- success: function () {
- $.currentIframe().GetTree();
- }
- })
- }
- // 初始化颜色
- function InitialColor() {
- $('.fill_Color').each(function () {
- $(this).minicolors({
- control: $(this).attr('data-control') || 'hue',
- defaultValue: $(this).attr('data-defaultValue') || '',
- inline: $(this).attr('data-inline') === 'true',
- letterCase: $(this).attr('data-letterCase') || 'lowercase',
- opacity: $(this).attr('data-opacity'),
- position: $(this).attr('data-position') || 'bottom left',
- change: function (hex, opacity) {
- if (!hex) return;
- if (opacity) hex += ', ' + opacity;
- try {
- console.log(hex);
- } catch (e) { }
- },
- theme: 'bootstrap'
- });
- });
- }
- </script>
- <style type="text/css">
- .formTitle {
- width: 130px !important;
- margin-left: 40px;
- }
- </style>
- <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
- <table id="form1" class="form" style="width: 95%">
- <tr>
- <th class="formTitle">分区名称<font face="宋体">*</font></th>
- <td class="formValue">
- <input id="DMAName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" errormsg="请输入分区名称" placeholder="请输入分区名称"/>
- </td>
- </tr>
- <input type="hidden" id="ParentId" />
- <tr>
- <th class="formTitle">填充颜色</th>
- <td class="formValue" >
- <input type="text" style="height: 35px" id="FillColor" class="form-control fill_Color">
- </td>
- </tr>
- <tr>
- <th class="formTitle">管道连接点数(个)</th>
- <td class="formValue">
- <input id="PipeConnectionPoint" type="text" checkexpession="NumOrNull" class="form-control" isvalid="yes" placeholder="请输入管道连接点数"/>
- </td>
- </tr>
- <tr>
- <th class="formTitle">主供水管道长度(KM)</th>
- <td class="formValue" >
- <input id="MainPipeLength" type="text" checkexpession="DoubleOrNull" class="form-control" isvalid="yes" placeholder="请输入主供水管道长度" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">支供水管道长度(KM)</th>
- <td class="formValue" >
- <input id="BranchPipeLength" type="text" checkexpession="DoubleOrNull" class="form-control" isvalid="yes" placeholder="请输入支供水管道长度" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">管道设施状况因子</th>
- <td class="formValue" >
- <input id="PipeFactor" type="text" checkexpession="DoubleOrNull" class="form-control" isvalid="yes" placeholder="请输入管道设施状况因子" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">渗透幂指数 N1</th>
- <td class="formValue" >
- <input id="N1" type="text" checkexpession="DoubleOrNull" class="form-control" isvalid="yes" placeholder="请输入渗透幂指数" />
- </td>
- </tr>
- <tr>
- <th class="formTitle">干管用户管道容积(M3)</th>
- <td class="formValue" >
- <input id="PipeVolume" type="text" class="form-control" checkexpession="DoubleOrNull" isvalid="yes" placeholder="请输入干管用户管道容积" />
- </td>
- </tr>
- </table>
- </div>
|