editDevice.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>编辑设备信息</title>
  9. <script src="/shares/js/jquery-1.6.4.min.js" type="text/javascript"></script>
  10. <script type="text/javascript" src="/shares/js/constant.js"></script>
  11. <script type="text/javascript" src="/shares/js/common.js"></script>
  12. <script type="text/javascript" src="/shares/js/file.js"></script>
  13. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  14. <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript" ></script>
  15. <link href="./liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css"
  16. rel="stylesheet" type="text/css"></link>
  17. <script src="./liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  18. <script src="./liger/lib/ligerUI/js/plugins/ligerLayout.js"
  19. type="text/javascript"></script>
  20. <script
  21. src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDateEditor.js"
  22. type="text/javascript"></script>
  23. <script type="text/javascript">
  24. $(document).ready(function() {
  25. $("input[type='text']:first").focus();
  26. });
  27. $(function() {
  28. loadTypeTree("selectbutton1", {
  29. type : "singleuser",
  30. backId : "dev_buy_person",
  31. backName : "dev_buy_person_name",
  32. tab : 1
  33. });
  34. loadTypeTree("selectbutton2", {
  35. type : "detpusersingle",
  36. backId : "dev_useman",
  37. backName : "dev_useman_name",
  38. tab : 1
  39. });
  40. $("#dev_buy_date").ligerDateEditor({
  41. labelAlign : 'left',
  42. width : 150,
  43. height : 21,
  44. initValue : '${requestScope.device.dev_buy_date }'
  45. });
  46. $("#dev_stock_date").ligerDateEditor({
  47. labelAlign : 'left',
  48. width : 150,
  49. height : 21
  50. });
  51. $("#dev_reject_enddate").ligerDateEditor({
  52. labelAlign : 'left',
  53. width : 150,
  54. height : 21,
  55. initValue : '${requestScope.device.dev_reject_enddate }'
  56. });
  57. $("#dev_facture_date").ligerDateEditor({
  58. labelAlign : 'left',
  59. width : 150,
  60. height : 21,
  61. initValue : '${requestScope.device.dev_facture_date }'
  62. });
  63. $("#other19").ligerDateEditor({
  64. labelAlign : 'left',
  65. width : 150,
  66. height : 21,
  67. initValue : '${requestScope.device.other19 }'
  68. });
  69. $("#other20").ligerDateEditor({
  70. labelAlign : 'left',
  71. width : 150,
  72. height : 21,
  73. initValue : '${requestScope.device.other20 }'
  74. });
  75. });
  76. function checkForm(){
  77. var rs = $.validate({
  78. name : "dev_code",
  79. model : [ {
  80. type : "require",
  81. msg : "设备编号不能为空!"
  82. }, {
  83. type : "len",
  84. min : 1,
  85. max : 20,
  86. msg : "设备编号长度不能超过20个字!"
  87. } ]
  88. });
  89. rs = $.validate({
  90. name : "dev_name",
  91. model : [ {
  92. type : "require",
  93. msg : "设备名称不能为空!"
  94. } ]
  95. }) && rs;
  96. rs = $.validate({
  97. name : "dev_status",
  98. model : [ {
  99. type : "require",
  100. msg : "设备状态不能为空!"
  101. } ]
  102. }) && rs;
  103. rs = $.validate({
  104. name : "dev_stock_date",
  105. model : [ {
  106. type : "require",
  107. msg : "预计成交日期不能为空!"
  108. }]
  109. }) && rs;
  110. rs = $.validate({
  111. name : "dev_useman_name",
  112. model : [ {
  113. type : "require",
  114. msg : "责任人不能为空!"
  115. } ]
  116. }) && rs;
  117. if (rs) {
  118. return true;
  119. }else{
  120. return false;
  121. }
  122. }
  123. function refresh(obj){
  124. if(obj == "1"){
  125. parent.location.reload();
  126. }
  127. }
  128. </script>
  129. <style type="text/css">
  130. .file-style{
  131. width: 550px;
  132. }
  133. .file-style input[type='file'] {
  134. width:385px ;
  135. height:24px;
  136. line-height:22px;
  137. vertical-align: bottom;
  138. background-color: #fff;
  139. border: 1px solid #cccccc;
  140. margin-top: 2px;
  141. margin-bottom: 2px;
  142. }
  143. </style>
  144. </head>
  145. <body>
  146. <%@ include file="/include/message.jsp"%>
  147. <form action="deviceMgrAction.do" method="post" onsubmit="return checkForm()">
  148. <div id="title" class="form-button">
  149. <input type="submit" class="l-button" value="保存" />
  150. </div>
  151. <div class="container-layout">
  152. <div class="forum-container">
  153. <center>
  154. <table class="l-table-edit line">
  155. <tr>
  156. <th colspan="4">
  157. <c:if test="${device.dev_id == '' or device.dev_id == null }">添加设备信息</c:if>
  158. <c:if test="${device.dev_id != null }">编辑设备信息</c:if>
  159. </th>
  160. </tr>
  161. <tr>
  162. <th colspan="4">
  163. 基础信息
  164. </th>
  165. </tr>
  166. <tr>
  167. <td class="l-table-edit-text">${customDevice.dev_type_name }<FONT COLOR="red">*</FONT>:</td>
  168. <td class="l-table-edit-td" width="30%">
  169. <input type="hidden" id="dev_type" name="dev_type" value="${requestScope.device.dev_type }">
  170. <input type="text" id="dev_type_name" name="dev_type_name" value="${requestScope.device.dev_type_name }" readonly="readonly">
  171. </td>
  172. <td class="l-table-edit-text">${customDevice.dev_code }<FONT COLOR="red">*</FONT>:</td>
  173. <td class="l-table-edit-td">
  174. <input type="text" id="dev_code" name="dev_code" value="${requestScope.device.dev_code }">
  175. </td>
  176. </tr>
  177. <tr>
  178. <td class="l-table-edit-text">${customDevice.dev_name }<FONT COLOR="red">*</FONT>:</td>
  179. <td class="l-table-edit-td">
  180. <input type="text" id="dev_name" name="dev_name" value="${requestScope.device.dev_name }">
  181. </td>
  182. <td class="l-table-edit-text">${customDevice.dev_status }<FONT COLOR="red">*</FONT>:</td>
  183. <td class="l-table-edit-td">
  184. <select name="dev_status" id="dev_status" class="default-select" >
  185. <option value=""></option>
  186. <c:forEach items="${requestScope.devStatusList }" var="devStatus">
  187. <option value="${devStatus.dev_status_value }" <c:if test="${requestScope.device.dev_status == devStatus.dev_status_value }">selected="selected"</c:if> >${devStatus.dev_status_name}</option>
  188. </c:forEach>
  189. </select>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td class="l-table-edit-text">${customDevice.dev_brand }:</td>
  194. <td class="l-table-edit-td">
  195. <input type="text" id="dev_brand" name="dev_brand" value="${requestScope.device.dev_brand }">
  196. </td>
  197. <td class="l-table-edit-text">${customDevice.dev_model }:</td>
  198. <td class="l-table-edit-td">
  199. <input type="text" id="dev_model" name="dev_model" value="${requestScope.device.dev_model }">
  200. </td>
  201. </tr>
  202. <tr>
  203. <td class="l-table-edit-text">${customDevice.dev_manufacturer }</td>
  204. <td class="l-table-edit-td">
  205. <input type="text" id="dev_manufacturer" name="dev_manufacturer" value="${requestScope.device.dev_manufacturer }">
  206. </td>
  207. <td class="l-table-edit-text">${customDevice.dev_supplier }</td>
  208. <td class="l-table-edit-td">
  209. <input type="text" id="dev_supplier" name="dev_supplier" value="${requestScope.device.dev_supplier }">
  210. </td>
  211. </tr>
  212. <tr>
  213. <td class="l-table-edit-text">${customDevice.dev_buy_date_str }:</td>
  214. <td class="l-table-edit-td">
  215. <input type="text" id="dev_buy_date" name="dev_buy_date" value="${requestScope.device.dev_buy_date }">
  216. <td class="l-table-edit-text">${customDevice.dev_use }:</td>
  217. <td class="l-table-edit-td">
  218. <input type="text" id="dev_use" name="dev_use" value="${requestScope.device.dev_use }">
  219. </td>
  220. </tr>
  221. <tr>
  222. <td class="l-table-edit-text">${customDevice.dev_buy_person_name }:</td>
  223. <td class="l-table-edit-td">
  224. <input type="text" id="dev_buy_person_name" name="dev_buy_person_name" readonly="readonly" value="${requestScope.device.dev_buy_person_name }" />
  225. <input type="hidden" name="dev_buy_person" id="dev_buy_person" readonly="readonly" value="${requestScope.device.dev_buy_person }" />
  226. <input type="button" class="l-button" id="selectbutton1" value="选择人员" />
  227. </td>
  228. <td class="l-table-edit-text">${customDevice.dev_buy_contract }:</td>
  229. <td class="l-table-edit-td">
  230. <input type="text" id="dev_buy_contract" name="dev_buy_contract" value="${requestScope.device.dev_buy_contract }">
  231. </td>
  232. </tr>
  233. <tr>
  234. <td class="l-table-edit-text">${customDevice.dev_stock_date_str }:</td>
  235. <td class="l-table-edit-td">
  236. <input type="text" id="dev_stock_date" name="dev_stock_date" value="${requestScope.device.dev_stock_date }" />
  237. <input type="hidden" name="dev_stock_date" value="${requestScope.device.dev_stock_date }" />
  238. </td>
  239. <td class="l-table-edit-text">${customDevice.dev_useman_name }<FONT COLOR="red">*</FONT>:</td>
  240. <td class="l-table-edit-td">
  241. <input type="text" id="dev_useman_name" name="dev_useman_name" readonly="readonly" value="${requestScope.device.dev_useman_name }" />
  242. <input type="hidden" name="dev_useman" id="dev_useman" readonly="readonly" value="${requestScope.device.dev_useman }" />
  243. <input type="button" class="l-button" id="selectbutton2" value="选择人员" />
  244. </td>
  245. </tr>
  246. <tr>
  247. <td class="l-table-edit-text">${customDevice.dev_mainten_enddate_str }</td>
  248. <td class="l-table-edit-td">
  249. <input type="text" id="dev_mainten_enddate" name="dev_mainten_enddate" value="${requestScope.device.dev_mainten_enddate }">
  250. </td>
  251. <td class="l-table-edit-text">${customDevice.dev_reject_enddate_str }</td>
  252. <td class="l-table-edit-td">
  253. <input type="text" id="dev_reject_enddate" name="dev_reject_enddate" value="${requestScope.device.dev_reject_enddate }">
  254. </td>
  255. </tr>
  256. <tr>
  257. <td class="l-table-edit-text">${customDevice.dev_price_str }:</td>
  258. <td class="l-table-edit-text">
  259. <input type="text" id="dev_price" name="dev_price" value="${requestScope.device.dev_price }">
  260. </td>
  261. <td class="l-table-edit-text">${customDevice.dev_facture_date_str }:</td>
  262. <td class="l-table-edit-td">
  263. <input type="text" id="dev_facture_date" name="dev_facture_date" value="${requestScope.device.dev_facture_date }" />
  264. </td>
  265. </tr>
  266. <tr>
  267. <td class="l-table-edit-text">${customDevice.dev_docs }:</td>
  268. <td class="l-table-edit-td" colspan="3">
  269. <input type="hidden" name="dev_docs" id="dev_docs">
  270. <!--folder: 存储文件的文件夹名称 -->
  271. <!--fieldName: 后台获取文档ID的属性名称 -->
  272. <jsp:include page="/include/file.jsp">
  273. <jsp:param name="fieldName" value="documentId"/>
  274. <jsp:param name="folder" value="erp/device"/>
  275. <jsp:param name="isView" value="0"/>
  276. <jsp:param name="isDelFile" value="1"/>
  277. <jsp:param name="documentId" value=""/>
  278. <jsp:param name="size" value="1" />
  279. <jsp:param name="definedCss" value="file-style" />
  280. </jsp:include>
  281. </td>
  282. </tr>
  283. <tr>
  284. <td class="l-table-edit-text">${customDevice.dev_remark }:</td>
  285. <td class="l-table-edit-td" colspan="3">
  286. <input type="text" id="dev_remark" name="dev_remark" value="${requestScope.device.dev_remark }">
  287. </td>
  288. </tr>
  289. <tr>
  290. <th colspan="4">
  291. 自定义
  292. </th>
  293. </tr>
  294. <tr>
  295. <td class="l-table-edit-text">${customDevice.other1 }:</td>
  296. <td class="l-table-edit-td">
  297. <input type="text" id="other1" name="other1" value="${requestScope.device.other1 }">
  298. </td>
  299. <td class="l-table-edit-text">${customDevice.other2 }:</td>
  300. <td class="l-table-edit-td">
  301. <input type="text" id="other2" name="other2" value="${requestScope.device.other2 }">
  302. </td>
  303. </tr>
  304. <tr>
  305. <td class="l-table-edit-text">${customDevice.other3 }:</td>
  306. <td class="l-table-edit-td">
  307. <input type="text" id="other3" name="other3" value="${requestScope.device.other3 }">
  308. </td>
  309. <td class="l-table-edit-text">${customDevice.other4 }:</td>
  310. <td class="l-table-edit-td">
  311. <input type="text" id="other4" name="other4" value="${requestScope.device.other4 }">
  312. </td>
  313. </tr>
  314. <tr>
  315. <td class="l-table-edit-text">${customDevice.other5 }:</td>
  316. <td class="l-table-edit-td">
  317. <input type="text" id="other5" name="other5" value="${requestScope.device.other5 }">
  318. </td>
  319. <td class="l-table-edit-text">${customDevice.other6 }:</td>
  320. <td class="l-table-edit-td">
  321. <input type="text" id="other6" name="other6" value="${requestScope.device.other6 }">
  322. </td>
  323. </tr>
  324. <tr>
  325. <td class="l-table-edit-text">${customDevice.other7 }7:</td>
  326. <td class="l-table-edit-td">
  327. <input type="text" id="other7" name="other7" value="${requestScope.device.other7 }">
  328. </td>
  329. <td class="l-table-edit-text">${customDevice.other8 }:</td>
  330. <td class="l-table-edit-td">
  331. <input type="text" id="other8" name="other8" value="${requestScope.device.other8 }">
  332. </td>
  333. </tr>
  334. <tr>
  335. <td class="l-table-edit-text">${customDevice.other9 }:</td>
  336. <td class="l-table-edit-td">
  337. <input type="text" id="other9" name="other9" value="${requestScope.device.other9 }">
  338. </td>
  339. <td class="l-table-edit-text">${customDevice.other10 }:</td>
  340. <td class="l-table-edit-td">
  341. <input type="text" id="other10" name="other10" value="${requestScope.device.other10 }">
  342. </td>
  343. </tr>
  344. <tr>
  345. <td class="l-table-edit-text">${customDevice.other11 }:</td>
  346. <td class="l-table-edit-td">
  347. <input type="text" id="other11" name="other11" value="${requestScope.device.other11 }">
  348. </td>
  349. <td class="l-table-edit-text">${customDevice.other12 }:</td>
  350. <td class="l-table-edit-td">
  351. <input type="text" id="other12" name="other12" value="${requestScope.device.other12 }">
  352. </td>
  353. </tr>
  354. <tr>
  355. <td class="l-table-edit-text">${customDevice.other13_str }:</td>
  356. <td class="l-table-edit-td">
  357. <input type="text" id="other13" name="other13" value="${requestScope.device.other13 }">
  358. </td>
  359. <td class="l-table-edit-text">${customDevice.other14_str }:</td>
  360. <td class="l-table-edit-td">
  361. <input type="text" id="other14" name="other14" value="${requestScope.device.other14 }">
  362. </td>
  363. </tr>
  364. <tr>
  365. <td class="l-table-edit-text">${customDevice.other15_str }:</td>
  366. <td class="l-table-edit-td">
  367. <input type="text" id="other15" name="other15" value="${requestScope.device.other15 }">
  368. </td>
  369. <td class="l-table-edit-text">${customDevice.other16_str }:</td>
  370. <td class="l-table-edit-td">
  371. <input type="text" id="other16" name="other16" value="${requestScope.device.other16 }">
  372. </td>
  373. </tr>
  374. <tr>
  375. <td class="l-table-edit-text">${customDevice.other17_str }:</td>
  376. <td class="l-table-edit-td">
  377. <input type="text" id="other17" name="other17" value="${requestScope.device.other17 }">
  378. </td>
  379. <td class="l-table-edit-text">${customDevice.other18_str }:</td>
  380. <td class="l-table-edit-td">
  381. <input type="text" id="other18" name="other18" value="${requestScope.device.other18 }">
  382. </td>
  383. </tr>
  384. <tr>
  385. <td class="l-table-edit-text">${customDevice.other19_str }:</td>
  386. <td class="l-table-edit-td">
  387. <input type="text" id="other19" name="other19" value="${requestScope.device.other19 }">
  388. </td>
  389. <td class="l-table-edit-text">${customDevice.other20_str }:</td>
  390. <td class="l-table-edit-td">
  391. <input type="text" id="other20" name="other20" value="${requestScope.device.other20 }">
  392. </td>
  393. </tr>
  394. </table>
  395. <input type="hidden" id="dev_id" name="dev_id" value="${requestScope.device.dev_id }">
  396. <input type="hidden" id="task" name="task" value="doEditDevice">
  397. <input type="hidden" id="tabid" name="tabid" value="${requestScope.tabid}">
  398. </center>
  399. </div>
  400. </div>
  401. </form>
  402. </body>
  403. </html>