UpdateProjectProblem.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. @{
  2. ViewBag.Title = "UpdateProjectProblem";
  3. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  4. }
  5. <link href="~/Content/Scripts/plugins/umeditor-1.2.3/themes/default/_css/umeditor.css" rel="stylesheet" />
  6. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/umeditor.min.js"></script>
  7. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/umeditor.config.js"></script>
  8. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/lang/zh-cn/zh-cn.js"></script>
  9. @*<script src="~/Content/Scripts/plugins/layer-3.1/layer.js"></script>
  10. <script src="~/Content/Scripts/plugins/layer-2.1/layer.js"></script>
  11. <link href="~/Content/Scripts/plugins/layer-2.1/skin/layer.css" rel="stylesheet" />*@
  12. <script src="~/Content/Scripts/plugins/easyui/easyui-lang-zh_CN.js"></script>
  13. <script src="~/ViewModels/Register.Problem.js?r=1.11"></script>
  14. <style>
  15. table {
  16. width: 97%;
  17. }
  18. table td {
  19. padding: 3px;
  20. border-bottom: solid 1px #EEE;
  21. }
  22. .btn-cc {
  23. position: absolute;
  24. bottom: 20px;
  25. right: 10px;
  26. }
  27. .CheckImg:hover {
  28. transform: scale(3);
  29. z-index: 999;
  30. width: auto;
  31. height: 40px;
  32. }
  33. .CheckImg {
  34. cursor: pointer;
  35. transition: all 0.6s;
  36. }
  37. #attchment div {
  38. float: left;
  39. margin-left: 10px;
  40. line-height: 55px;
  41. }
  42. .mxid {
  43. width: 1000px;
  44. }
  45. .tabs-header {
  46. border: 0px;
  47. }
  48. </style>
  49. <form class="easyui-tabs" fit="true" lay-filter="update_problem" id="update_problem">
  50. <input type="hidden" id="ID" name="ID" value="@ViewBag.id" />
  51. <input type="hidden" id="BBH" name="BBH" />
  52. <input type="hidden" id="MKID" name="MKID" />
  53. <div title="<i class='fa fa-sticky-note-o'></i> 问题信息" style="padding:5px;display:none;">
  54. <table>
  55. <tr>
  56. <td style="width:80px;">
  57. 问题标题:
  58. </td>
  59. <td>
  60. <input id="WTBT" name="WTBT" class="easyui-textbox" style="width:445px" />
  61. <input class="easyui-combobox" required id="WTXZ" name="WTXZ" editable="false"
  62. data-options="label:'问题性质:',prompt:'请选择',limitToList:true,panelHeight:150,tipPosition:'top',labelAlign:'right'"
  63. style="width:250px;" />
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>项目:</td>
  68. <td>
  69. <input id="XMID" name="XMID" required panelheight="200px" class="easyui-combobox mxid"
  70. data-options="labelAlign:'right',prompt:'请选择(默认项目)',limitToList:true,tipPosition:'top'" style="width:200px;" />
  71. <input id="JGID" name="JGID" editable="false" panelheight="200px" class="easyui-combobox"
  72. data-options="label:'机构:',labelAlign:'right',limitToList:true" style="width:250px;" />
  73. <input class="easyui-combobox" id="DDID" name="DDID" data-options="limitToList:true,panelHeight:400,panelWidth:300,tipPosition:'top',label:'迭代任务:',labelAlign:'right'" style="width:250px;" />
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>所属产品:</td>
  78. <td>
  79. <input required editable="false" panelheight="200px" class="easyui-combobox" id="CPID" name="CPID"
  80. data-options="required:true,prompt:'指定一个产品',limitToList:true,tipPosition:'top'" style="width:200px;" />
  81. <input panelheight="200px" class="easyui-combotree" id="MK" name="MK"
  82. data-options="label:'所属模块:',labelAlign:'right',prompt:'请选择所属模块',limitToList:true,tipPosition:'top'"
  83. style="width:240px;" />
  84. <input id="FKR" name="FKR" class="easyui-textbox" data-options="label:'反馈人:',labelAlign:'right'"
  85. style="width:250px;" />
  86. </td>
  87. </tr>
  88. <tr>
  89. <td>迭代任务:</td>
  90. <td>
  91. <input class="easyui-combobox" id="DDID" name="DDID"
  92. data-options="prompt:'请选择',limitToList:true,panelHeight:400,panelWidth:300,tipPosition:'top'"
  93. style="width:200px;" />
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>问题描述:</td>
  98. <td colspan="2">
  99. <textarea id="WTMS" name="WTMS" style="width:95%;height:180px;"></textarea>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>问题附件:</td>
  104. <td colspan="2" id="demoList">
  105. <a id="ChooseFile" href="#" class="easyui-linkbutton c8" data-options="plain:true">
  106. <i class="fa fa-plus-square-o"></i> 添加附件
  107. </a>
  108. </td>
  109. </tr>
  110. </table>
  111. <div id="attchment" style="height:55px">
  112. </div>
  113. <div class="btn-cc">
  114. @Html.Partial("ChangeButton")
  115. <input type="hidden" id="btn_upload" />
  116. </div>
  117. </div>
  118. <div title="<i class='fa fa-server'></i> 相关信息" style="padding:5px;display:none;">
  119. <table>
  120. <tr>
  121. <td>
  122. <input id="DJRJ" name="DJRJ" required class="easyui-datetimebox" editable="false"
  123. data-options="label:'反馈日期:',tipPosition:'top'" value="${notices.release_time}" style="width:260px">
  124. </td>
  125. <td>
  126. <input class="easyui-combobox" id="LYDM" name="LYDM" editable="false"
  127. data-options="label:'登记来源:',prompt:'请选择',limitToList:true,panelHeight:150,tipPosition:'top'"
  128. style="width:260px;" />
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>
  133. <input class="easyui-combobox" required id="JJDM" name="JJDM" editable="false"
  134. data-options="label:'紧急程度:',prompt:'请选择',limitToList:true,panelHeight:150,tipPosition:'top'"
  135. style="width:260px;" />
  136. </td>
  137. <td>
  138. <input id="YQSJ" name="YQSJ" class="easyui-datebox" editable="false"
  139. data-options="label:'要求时间:',tipPosition:'top'" style="width:260px">
  140. </td>
  141. </tr>
  142. <tr>
  143. <td id="reapt">
  144. <input class="easyui-combobox" id="CFWTID" name="CFWTID" editable="false"
  145. data-options="label:'是否重复',prompt:'请选择',panelHeight:400,panelWidth:400,tipPosition:'top'" style="width:260px;" />
  146. </td>
  147. </tr>
  148. <tr>
  149. <td colspan="3">
  150. <input id="JJMS" name="JJMS" class="easyui-textbox"
  151. data-options="label:'紧急事由:',prompt:'紧急描述',tipPosition:'top',multiline:true" style="width:820px;height:280px;">
  152. </td>
  153. </tr>
  154. </table>
  155. <div class="btn-cc">
  156. @Html.Partial("ChangeButton")
  157. </div>
  158. </div>
  159. </form>
  160. <script type="text/javascript">
  161. //人员性质
  162. var RYXZ = "@ViewBag.RYXZ";
  163. var models = new ProblemModel();
  164. var id = @ViewBag.id
  165. models.UpdateProblemInit(id);
  166. layui.use('upload', function () {
  167. var upload = layui.upload;
  168. var demoListView = $('#demoList');
  169. var uploadInst = upload.render({
  170. elem: '#ChooseFile' //文件选择按钮
  171. ,
  172. url: '/Problem/FileUpload',
  173. method: "post",
  174. accept: 'file' //普通文件(文件类型)
  175. ,
  176. multiple: true //多文件上传
  177. ,
  178. auto: false //自动上传
  179. ,
  180. size: 5120,
  181. bindAction: "#btn_upload",
  182. number: 3 //最大允许上传文件数量
  183. ,
  184. choose: function (obj) {
  185. problemObj.Choose = 1;
  186. var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
  187. //读取本地文件
  188. obj.preview(function (index, file, result) {
  189. var display = "none";
  190. if (file.type == "image/jpeg" || file.type == "image/png") {
  191. display = "";
  192. }
  193. var tr = $(['<tr id="upload-' + index + '">', '<td class="uplad-filename">' + file.name + '</td>', '<td>' +
  194. (file.size / 1014).toFixed(1) + 'kb</td>', '<td>等待上传</td>', '<td>',
  195. '<button class="layui-btn layui-btn-mini demo-reload layui-hide">重传</button>',
  196. '<button class="layui-btn layui-btn-mini layui-btn-danger demo-delete" style="height:25px;line-height:25px">删除</button>',
  197. '<img src="' + result + '" class="CheckImg" width="auto" height="40" style="margin-left:10px;display:' +
  198. display + '"/>', '</td>', '</tr>'
  199. ].join(''));
  200. //单个重传
  201. tr.find('.demo-reload').on('click', function () {
  202. obj.upload(index, file);
  203. });
  204. //删除
  205. tr.find('.demo-delete').on('click', function () {
  206. delete files[index]; //删除对应的文件
  207. tr.remove();
  208. uploadInst.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
  209. });
  210. demoListView.append(tr);
  211. });
  212. }
  213. //, done: function (res, index, upload) {
  214. // var index = top.ZLPMS.Loading3(2);
  215. // if (res.msg.length == 36) {
  216. // top.ZLPMS.UnLoading(index);
  217. // top.ZLPMS.Msg("问题修改成功", 1)
  218. // ZLPMS.CloseTopWindow(true);
  219. // return;
  220. // }
  221. // else {
  222. // top.ZLPMS.UnLoading(index);
  223. // top.ZLPMS.Msg("问题修改失败", 2);
  224. // ZLPMS.CloseTopWindow(true)
  225. // return;
  226. // }
  227. //}
  228. ,
  229. allDone: function (obj) {
  230. top.ZLPMS.Msg("总共上传" + obj.total + ",成功" + obj.successful + "个,失败" + obj.aborted + "个")
  231. ZLPMS.CloseTopWindow(true);
  232. },
  233. error: function (index, upload) {
  234. var tr = demoListView.find('tr#upload-' + index),
  235. tds = tr.children();
  236. tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
  237. tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
  238. return;
  239. }
  240. });
  241. });
  242. </script>