RemoveFence.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. @{
  2. ViewBag.Title = "Detail";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using MES.Production.Service;
  6. @using Central.Control.Domain;
  7. @using Ant.Service.Common;
  8. @using Ant.Service.Common.Enums;
  9. @using MES.Production.Entity;
  10. @using CommonToolHelper;
  11. @model RemoveFenceEntity
  12. <style>
  13. body {
  14. background-color: white;
  15. }
  16. .changeicon {
  17. float: right;
  18. margin-right: -15px;
  19. position: absolute;
  20. right: -7px;
  21. top: 0px;
  22. border: none;
  23. background-color: #18a689;
  24. color: #FFFFFF;
  25. line-height: 33px;
  26. height: 33px;
  27. }
  28. </style>
  29. @using (Ajax.BeginForm("Save", null, new AjaxOptions()
  30. {
  31. HttpMethod = "Post",
  32. OnBegin = "SubAjax.Loading",
  33. OnComplete = "SubAjax.Complate",
  34. OnFailure = "SubAjax.Failure",
  35. OnSuccess = "SubAjax.Success"
  36. }, new { @class = "form-horizontal dig-from", @role = "form" }))
  37. {
  38. <div class="wrapper-content">
  39. <div class="panel-body" style="padding-top:0px;">
  40. <div class="tab-content">
  41. <div id="tab-1" class="tab-pane active">
  42. <div class="form-group">
  43. <label class="col-lg-3 control-label">所属经销商:</label>
  44. <div class="col-lg-8">
  45. <select id="SiteID" name="SiteID" class="form-control select2" datatype="*" nullmsg="请选择所属经销商">
  46. <option value="" @(string.IsNullOrEmpty(Model.bicycle.DistributorsID) ? "selected" : "")>--请选择--</option>
  47. @{
  48. foreach (var item in ViewBag.dpt)
  49. {
  50. <option value="@item.id" @(Model.bicycle.DistributorsID == @item.id ? "selected" : "")>@CommonHtmlHelper.RtfTextToHtml(item.name)</option>
  51. }
  52. }
  53. </select>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-lg-3 control-label">农机名称:</label>
  58. <div class="col-lg-8">
  59. @Html.TextBoxFor(p => p.bicycle.CarName, new { @class = "form-control", @placeholder = "请输入农机名称", @readonly = "readonly", @datatype = "*1-30", @nullmsg = "请输入农机名称" })
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label class="col-lg-3 control-label">农机条码:</label>
  64. <div class="col-lg-8">
  65. @Html.TextBoxFor(p => p.bicycle.carBar, new { @class = "form-control", @placeholder = "请输入农机条码", @readonly = "readonly", @datatype = "n15-20", @nullmsg = "请输入农机条码", @errormsg = "农机条码必须是15-20位的数字!" })
  66. </div>
  67. </div>
  68. <div class="clearfix f-hafl">
  69. <div class="col-hafl">
  70. <div class="form-group">
  71. <label class="col-lg-3 control-label">IMEI号:</label>
  72. <div class="col-lg-8">
  73. @Html.TextBoxFor(p => p.bicycle.CarID, new { @class = "form-control", @placeholder = "请输入农机条码", @readonly = "readonly", @datatype = "n15-20", @nullmsg = "请输入农机条码", @errormsg = "农机条码必须是15-20位的数字!" })
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label class="col-lg-3 control-label">出厂编号:</label>
  78. <div class="col-lg-8">
  79. @Html.HiddenFor(p => p.bicycle.ID)
  80. @Html.TextBoxFor(p => p.bicycle.FactoryNumber, new { @class = "form-control", @id = "CarID", @placeholder = "暂无出厂编号", @readonly = "readonly" })
  81. </div>
  82. </div>
  83. <div class="form-group">
  84. <label class="col-lg-3 control-label">购买人姓名:</label>
  85. <div class="col-lg-8">
  86. @Html.TextBoxFor(p => p.userName, new
  87. {
  88. @class = "form-control",
  89. @datatype = "*",
  90. @nullmsg = "请输入购买人姓名",
  91. @placeholder = "请输入购买人姓名",
  92. @errormsg = "排序值只能输入数字,数字越小排序越靠前"
  93. })
  94. </div>
  95. </div>
  96. </div>
  97. <div class="col-hafl">
  98. <div class="form-group">
  99. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">车型号:</label>
  100. <div class="col-lg-8">
  101. @Html.TextBoxFor(p => p.bicycle.CarModel, new { @class = "form-control", @id = "CarID", @placeholder = "车型号", @readonly = "readonly", @errormsg = "IMEI号必须是15位数字!" })
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">农机状态:</label>
  106. <div class="col-lg-8">
  107. @Html.TextBoxFor(p => p.bicycle.Createper, new { @class = "form-control", @id = "CarID", @placeholder = "车ID(IMEI)", @readonly = "readonly", @errormsg = "IMEI号必须是15位数字!" })
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">购买人手机:</label>
  112. <div class="col-lg-8">
  113. @Html.TextBoxFor(p => p.userTel, new { @class = "form-control", @id = "CarID", @placeholder = "购买人手机号", @datatype = "*1-30", @nullmsg = "购买人手机号不能为空!", @errormsg = "IMEI号必须是15位数字!" })
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="form-group">
  119. <label class="col-lg-3 control-label">购买时间:</label>
  120. <div class="col-lg-8">
  121. @Html.TextBoxFor(p => p.userCode, new { @class = "form-control", @placeholder = "请输入购买时间", @nullmsg = "请输入购买时间" })
  122. </div>
  123. </div>
  124. <div class="form-group">
  125. <label class="col-lg-3 control-label">购买人地址:</label>
  126. <div class="col-lg-8">
  127. @Html.TextBoxFor(p => p.userAddress, new { @class = "form-control", @placeholder = "请输入购买人地址", @datatype = "*", @nullmsg = "请输入购买人地址", @errormsg = "购买人地址必须是15-20位的字符!" })
  128. </div>
  129. </div>
  130. <div class="hr-line-dashed" style="margin:0;">
  131. <div class="form-group m20">
  132. <div class="col-sm-2 col-sm-offset-2">
  133. <button class="btn btn-primary btn-save" type="submit"><i class="fa fa-check"></i> <span>确定保存</span></button>
  134. <button class="btn btn-warning" id="btn-dig-close" type="button"><i class="im-undo2"></i> 取消返回</button>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. }
  143. @section scripts{
  144. <script type="text/javascript">
  145. $(function () {
  146. $('.form-horizontal').initValidform();
  147. $('.select2').select2();
  148. //分配部门
  149. $('#changeDpt').click(function () {
  150. var vals = $('#hiddpt').val();
  151. top.dialog({
  152. url: '/Sys/Department/GetSelectDpt',
  153. title: '选择景点',
  154. width: 450,
  155. height: 500,
  156. data: vals, // 给 iframe 的数据
  157. onclose: function () {
  158. if (this.returnValue != 'no') {
  159. $('#hiddpt').val(this.returnValue.split('|')[0]);
  160. $('#dpt').html(this.returnValue.split('|')[1]);
  161. //清理岗位
  162. $('#hidpost').val('');
  163. $('#post').html('');
  164. }
  165. },
  166. oniframeload: function () {
  167. }
  168. }).showModal();
  169. return false;
  170. });
  171. //$("#SiteID").change(function () {
  172. // var pstate = document.getElementById("SiteID");
  173. // var state = pstate.options[pstate.selectedIndex].value;
  174. // var test = pstate.options[pstate.selectedIndex].text;
  175. // alert(test);
  176. // //state就是选中的value中的值
  177. //});
  178. //分配岗位
  179. $('#changePost').click(function () {
  180. var dptid = $('#DPTID').val() + ',' + $('#hiddpt').val();
  181. if ($('#DPTID').val() == '' && $('#hiddpt').val() == '') {
  182. dig.alertError('提示', '请选择部门后再选择岗位');
  183. return;
  184. }
  185. var vals = $('#hidpost').val();
  186. top.dialog({
  187. url: '/Sys/Post/PostUser?dptid=' + dptid,
  188. title: '分配岗位',
  189. width: 500,
  190. height: 500,
  191. data: vals, // 给 iframe 的数据
  192. onclose: function () {
  193. if (this.returnValue != 'no') {
  194. $('#hidpost').val(this.returnValue.split('|')[0]);
  195. $('#post').html(this.returnValue.split('|')[1]);
  196. }
  197. },
  198. oniframeload: function () {
  199. }
  200. }).showModal();
  201. return false;
  202. });
  203. });
  204. </script>
  205. }