Detail.cshtml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 EntYW_UserDistributor
  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. <link href="~/Content/uploadone/CSS/webuploader.css" rel="stylesheet" />
  30. <link href="~/Content/uploadone/CSS/bootstrap.min.css" rel="stylesheet" />
  31. <link href="~/Content/uploadone/CSS/uploadstyle.css" rel="stylesheet" />
  32. <link href="~/Content/uploadone/CSS/font-awesome.css" rel="stylesheet" />
  33. <!-- 配置文件 -->
  34. <!-- 编辑器源码文件 -->
  35. @using (Ajax.BeginForm("Save", null, new AjaxOptions()
  36. {
  37. HttpMethod = "Post",
  38. OnBegin = "SubAjax.Loading",
  39. OnComplete = "SubAjax.Complate",
  40. OnFailure = "SubAjax.Failure",
  41. OnSuccess = "SubAjax.Success"
  42. }, new { @class = "form-horizontal dig-from", @role = "form" }))
  43. {
  44. @Html.Hidden("productline")
  45. @Html.Hidden("distributorsid", ViewData["distributorsid"])
  46. <div class="wrapper-content">
  47. <div class="panel-body">
  48. <div class="tab-content">
  49. <div id="tab-1" class="tab-pane active">
  50. <div class="form-group">
  51. <label class="col-lg-3 control-label">产品线负责人员</label>
  52. <div class="col-lg-8">
  53. @{
  54. var fromuser = ViewData["userid"] as string;
  55. }
  56. <span id="readuser" class="form-control" style="padding:8px 5px; font-size:14px;overflow:hidden;">
  57. @if (!string.IsNullOrEmpty(fromuser))
  58. {
  59. @Html.Raw(fromuser.Split('|')[1]);
  60. }
  61. </span>
  62. @Html.Hidden("hidsendUserid", (!string.IsNullOrEmpty(fromuser) ? fromuser.Split('|')[0] : ""))
  63. <button class="changeicon" id="changesendUser" type="button">
  64. 选择
  65. </button>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label class="col-lg-3 control-label">轮拖轮式收条线</label>
  70. <div class="col-lg-8">
  71. <label class="radio-inline">
  72. <input name="ckb_per" type="checkbox" value="601" data-parent="轮拖"> 轮 拖
  73. </label>
  74. <label class="radio-inline">
  75. <input name="ckb_per" type="checkbox" value="615" data-parent="轮式收"> 轮式收
  76. @*<input type="radio" name="sexcode" value="2" @(Model.SEXCODE != null && Model.SEXCODE == 2 ? "checked" : "")>女*@
  77. </label>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label class="col-lg-3 control-label">履带插秧条线</label>
  82. <div class="col-lg-8">
  83. <label class="radio-inline">
  84. <input name="ckb_per" type="checkbox" value="612" data-parent="履带收"> 履带收
  85. </label>
  86. <label class="radio-inline">
  87. <input name="ckb_per" type="checkbox" value="61102" data-parent="插秧机"> 插秧机
  88. </label>
  89. </div>
  90. </div>
  91. <div class="form-group">
  92. <label class="col-lg-3 control-label">玉米收花生机线</label>
  93. <div class="col-lg-8">
  94. <label class="radio-inline">
  95. <input name="ckb_per" type="checkbox" value="622" data-parent="玉米收"> 玉米收
  96. </label>
  97. <label class="radio-inline">
  98. <input name="ckb_per" type="checkbox" value="628" data-parent="花生机"> 花生机
  99. </label>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="hr-line-dashed">
  107. <div class="form-group" style="margin-top:10px !important;">
  108. <div class="col-sm-2 col-sm-offset-2" style="text-align:center">
  109. <button class="btn btn-primary" id="btn-save" type="submit" onclick="GetParentModuleId()"><i class="fa fa-check"></i> <span>确定保存</span></button>
  110. <button class="btn btn-warning" id="btn-dig-close1" type="button"><i class="im-undo2"></i> 取消返回</button>
  111. </div>
  112. </div>
  113. </div>
  114. }
  115. @section scripts{
  116. <script type="text/javascript">
  117. var applicationPath = "http://" + window.location.host;
  118. $(function () {
  119. $('.select2').select2();
  120. //分配部门
  121. $('#changeDpt').click(function () {
  122. var vals = $('#hiddpt').val();
  123. top.dialog({
  124. url: '/Sys/Department/GetSelectDpt',
  125. title: '选择景点',
  126. width: 450,
  127. height: 500,
  128. data: vals, // 给 iframe 的数据
  129. onclose: function () {
  130. if (this.returnValue != 'no') {
  131. $('#hiddpt').val(this.returnValue.split('|')[0]);
  132. $('#dpt').html(this.returnValue.split('|')[1]);
  133. //清理岗位
  134. $('#hidpost').val('');
  135. $('#post').html('');
  136. }
  137. },
  138. oniframeload: function () {
  139. }
  140. }).showModal();
  141. return false;
  142. });
  143. $('#changesendUser').click(function () {
  144. var vals = $('#hidsendUserid').val();
  145. dig.addModel('选择用户', '/Sys/User/SelectUser?userid=' + vals, 800, 500, function () {
  146. if (this.returnValue != 'no' && this.returnValue != 'undefined' && this.returnValue != '') {
  147. var vl = "";
  148. if ($('#hidsendUserid').val() == "") {
  149. vl = this.returnValue.split('|')[0]
  150. }
  151. else {
  152. vl = $('#hidsendUserid').val() + "," + this.returnValue.split('|')[0]
  153. }
  154. //alert(vl);
  155. $('#hidsendUserid').val(vl);
  156. var vals = "";
  157. if ($('#readuser').html().replace(/^\s\s*/, '').replace(/\s\s*$/, '').length == 0) {
  158. vals = this.returnValue.split('|')[1];
  159. }
  160. else {
  161. vals = $('#readuser').html().replace(/^\s\s*/, '').replace(/\s\s*$/, '') + "," + this.returnValue.split('|')[1];
  162. }
  163. $('#readuser').html(vals);
  164. }
  165. });
  166. });
  167. //分配岗位
  168. $('#changePost').click(function () {
  169. var dptid = $('#DPTID').val() + ',' + $('#hiddpt').val();
  170. if ($('#DPTID').val() == '' && $('#hiddpt').val() == '') {
  171. dig.alertError('提示', '请选择部门后再选择岗位');
  172. return;
  173. }
  174. var vals = $('#hidpost').val();
  175. top.dialog({
  176. url: '/Sys/Post/PostUser?dptid=' + dptid,
  177. title: '分配岗位',
  178. width: 500,
  179. height: 500,
  180. data: vals, // 给 iframe 的数据
  181. onclose: function () {
  182. if (this.returnValue != 'no') {
  183. $('#hidpost').val(this.returnValue.split('|')[0]);
  184. $('#post').html(this.returnValue.split('|')[1]);
  185. }
  186. },
  187. oniframeload: function () {
  188. }
  189. }).showModal();
  190. return false;
  191. });
  192. });
  193. function GetParentModuleId() {
  194. var perid = '';
  195. $('input[name="ckb_per"]:checked').each(function () {
  196. perid += $(this).attr('value') + ',';
  197. });
  198. $('#productline').val(perid);
  199. }
  200. </script>
  201. }