warehouseinfo.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <style>
  2. .upload-divBtn {
  3. text-decoration: none;
  4. width: 80px;
  5. height: 35px;
  6. line-height: 35px;
  7. border-radius: 5px;
  8. text-align: center;
  9. font-size: 14px;
  10. color: #fff;
  11. background: #1A9856;
  12. margin: 10px;
  13. cursor: pointer;
  14. }
  15. </style>
  16. <div class="easyui-tabs" data-options="fit:true">
  17. <div title="仓房基本信息" class="wb-base">
  18. <div class="wb-img">
  19. <!--<div class="wb-img-sun">
  20. <img src="" alt="仓房阳面">
  21. </div>-->
  22. <from class="wb-img-sun" style="height: 400px">
  23. <input type="hidden" name="id">
  24. <div class="pic house_pic" id="userpic"></div>
  25. <div class="upload-btn" >
  26. <input id="upload-file" class="upload house-d-btn" name="file" type="file" >
  27. <input name="pic" id="avator" type="hidden" />
  28. <span class="uploading-bar" id="uploading-bar" ></span>
  29. </div>
  30. <div class="upload-userinfo " id="upload-userinfo" style="min-height:0px;">
  31. </div>
  32. <div class="btn-box">
  33. <button type="button" href="#" style="width: 70px" class="easyui-linkbutton bd-add-s orz-y" plain="true" >保存图片</button>
  34. </div>
  35. </from>
  36. <!-- <dib class="wb-img-moon">
  37. <img src="/img/warehouse-moon.png" alt="仓房阴面">
  38. </dib> -->
  39. <div style="margin: 10px 0 0 10px">
  40. <span class="QRcode">点击扫描二维码</span>
  41. <span style="font-size:15px;">
  42. <!-- style="display:inline-block;width:110px;text-align:right;" -->
  43. <span>仓号:</span>
  44. <span class="wb-span-houseId" name="houseId" style="color:green;"></span>
  45. </span>
  46. </div>
  47. <div style="margin: 20px 0 0 10px">
  48. <span style="font-size:15px;">
  49. <span style="display:inline-block;">粮食作业状态:</span>
  50. <select class="easyui-combobox status-select-combobox" style="width: 100px;" data-options="panelHeight:120" editable="false">
  51. <option value="正常">正常</option>
  52. <option value="出入库">出入库</option>
  53. <option value="通风">通风</option>
  54. <option value="内环流">内环流</option>
  55. <option value="熏蒸">熏蒸</option>
  56. </select>
  57. </span>
  58. <a class="easyui-linkbutton status-select">确定</a>
  59. </div>
  60. </div>
  61. <div class="wb-item">
  62. <div class="wb-item-li">
  63. <div class="wb-item-title">仓房基本信息</div>
  64. <span class="wb-item-c">
  65. <span class="wb-item-c-left">仓房类型:</span>
  66. <span class="wb-item-c-right" name="type"></span>
  67. </span>
  68. <span class="wb-item-c">
  69. <span class="wb-item-c-left">设计仓容(m³):</span>
  70. <span class="wb-item-c-right" name="areaVolume"></span>
  71. </span>
  72. <span class="wb-item-c">
  73. <span class="wb-item-c-left">隔热方式:</span>
  74. <span class="wb-item-c-right" name="hotFormat"></span>
  75. </span>
  76. <span class="wb-item-c">
  77. <span class="wb-item-c-left">通风方式:</span>
  78. <span class="wb-item-c-right" name="airFormat"></span>
  79. </span>
  80. <span class="wb-item-c">
  81. <span class="wb-item-c-left">装粮线高度(m):</span>
  82. <span class="wb-item-c-right" name="innerLineHeight"></span>
  83. </span>
  84. <span class="wb-item-c">
  85. <span class="wb-item-c-left">控温措施:</span>
  86. <span class="wb-item-c-right" name="tempControl"></span>
  87. </span>
  88. <span class="wb-item-c">
  89. <span class="wb-item-c-left">屋面:</span>
  90. <span class="wb-item-c-right" name="areaHouse"></span>
  91. </span>
  92. <span class="wb-item-c">
  93. <span class="wb-item-c-left">墙体(m):</span>
  94. <span class="wb-item-c-right" name="areaWall"></span>
  95. </span>
  96. <span class="wb-item-c">
  97. <span class="wb-item-c-left">长(m):</span>
  98. <span class="wb-item-c-right" name="innerWidth"></span>
  99. </span>
  100. <span class="wb-item-c">
  101. <span class="wb-item-c-left">宽(m):</span>
  102. <span class="wb-item-c-right" name="innerHeight"></span>
  103. </span>
  104. <span class="wb-item-c">
  105. <span class="wb-item-c-left">檐高(m):</span>
  106. <span class="wb-item-c-right" name="alongHigh"></span>
  107. </span>
  108. <span class="wb-item-c">
  109. <span class="wb-item-c-left">仓门数量(个):</span>
  110. <span class="wb-item-c-right" name="doorNumber"></span>
  111. </span>
  112. </div>
  113. <div class="wb-item-li" style="text-align: right;margin-right: 80px;margin-top: 10px;">
  114. <button>详情>></button>
  115. </div>
  116. </div>
  117. </div>
  118. <div title="测温电缆、地上通风笼布置图">
  119. <div>
  120. <div class="upload-divBtn">上传图片</div>
  121. <input id="replace-pic" style="display: none;" class="upload" name="file" type="file">
  122. </div>
  123. <div>
  124. <img id = "linePic" src="/themes/picture/layout_show.jpg" style="width: 95%;" >
  125. </div>
  126. </div>
  127. <div title="仓房维修记录查询" id="record_check" style="width: 100%;height: 100%;">
  128. <div class="dt-item" id="" style="margin-top: 0;border: none;">
  129. <div class="dt-nav">
  130. 检查日期:
  131. <input class="easyui-datebox" type="text" id="start_time_record" value="" editable="false">-<input class="easyui-datebox" id="end_time_record" value="" editable="false">&emsp;
  132. <a href="#" class="easyui-linkbutton bd-add-s" style="height: 25px;" id="warehouse_equip_record_search">查询</a>
  133. <a href="#" class="easyui-linkbutton bd-add-s" style="height: 25px;" id="warehouse_add_record">添加</a>
  134. <a href="#" class="easyui-linkbutton bd-add-s clear-btn" plain="true">清空</a>
  135. </div>
  136. </div>
  137. <table id="record_equip" style="width: 800px">
  138. </table>
  139. </div>
  140. </div>
  141. <div id="warehouse_basic_record_add_win" style="padding:20px;">
  142. <form method="post" action="#" id="warehouse_basic_record_add_form">
  143. <input name="id" type="hidden">
  144. <ul class="warehouse_basic_record_add_win_ul">
  145. <li>
  146. <div>检查日期:</div>
  147. <input name="checkDate" class="easyui-datebox" required="true" editable="false" >
  148. <div>检查类型:</div>
  149. <input name="type" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true">
  150. <div>检查项目:</div>
  151. <input name="project" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li>
  152. <li>
  153. <div>检查人员:</div>
  154. <input name="checkPerson" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li>
  155. <li>
  156. <div class="text_title_public_style">是否存在问题:</div>
  157. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-first" name="problemRadio" value="0" style="width:25px;cursor:pointer;">是
  158. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-two" name="problemRadio" value="1" style="width:25px;cursor:pointer;">否
  159. </li>
  160. <li>
  161. <div class="text_title_public_style " >存在问题:</div>
  162. <input class="easyui-textbox easyui-validatebox stm-t-remark house-problems" name="problem" data-options="validType:'length[0,50]',multiline:true" style="width:625px;height: 60px;"></li>
  163. <li>
  164. <div class="text_title_public_style">处理意见:</div>
  165. <input class="easyui-textbox easyui-validatebox stm-t-remark house-opinion" name="opinion" data-options="validType:'length[0,50]',multiline:true" style="width:625px;height: 60px;"></li>
  166. <li>
  167. <div>维修责任人:</div>
  168. <input type="text" name="bosshead" class="easyui-textbox easyui-validatebox house-personLiable" data-options="validType:'length[0,10]'">
  169. <div>开始日期:</div>
  170. <input type="text" class="easyui-datebox house-startTime" name="maintainStartDate" editable="false" >
  171. <div>结束日期:</div>
  172. <input type="text" class="easyui-datebox house-endTime" name="maintainEndDate" editable="false" ></li>
  173. <li>
  174. <div>实际完成日期:</div>
  175. <input type="text" class="easyui-datebox house-actualDate" name="finishDate" editable="false" ></li>
  176. <li>
  177. <div class="text_title_public_style">维修结果:</div>
  178. <input class="easyui-textbox easyui-validatebox stm-t-remark house-result" name="result" data-options="validType:'length[0,50]',multiline:true" style="width:625px;height: 60px;"></li>
  179. <li>
  180. <div class="text_title_public_style">备注:</div>
  181. <input class="easyui-textbox easyui-validatebox stm-t-remark house-remark" name="remark" data-options="validType:'length[0,50]',multiline:true" style="width:625px;height: 60px;"></li>
  182. <li>
  183. <a href="#" class="easyui-linkbutton" icon="icon-ok" data-control='edit' id="comfirm_add_record" style="margin:auto 20px auto 250px;">确认</a>
  184. <a href="#" class="easyui-linkbutton" onclick="$('#warehouse_basic_record_add_win').window('close');" icon="icon-cancel" style="margin-left:40px;">取消</a>
  185. </li>
  186. </ul>
  187. </form>
  188. </div>
  189. <div class="wsf-wrap">
  190. <form class="wsf-wrap-from" style="padding:20px;">
  191. <span style="font-weight: bold">仓房基本信息</span>
  192. <br />
  193. <div class="wsf-li">
  194. <span class="wsf-li-title">所属粮库:</span>
  195. <input class="easyui-textbox grainId-span" name="grainId" style="width: 150px;" editable="false">
  196. </div>
  197. <div class="wsf-li">
  198. <span class="wsf-li-title">仓房类型:</span>
  199. <input class="easyui-textbox" name="type" style="width: 150px;" editable="false">
  200. </div>
  201. <div class="wsf-li">
  202. <span class="wsf-li-title">仓号:</span>
  203. <input class="easyui-textbox" name="houseName"></div>
  204. <div class="wsf-li">
  205. <span class="wsf-li-title">交付使用日期:</span>
  206. <input class="easyui-datebox startUsingDate" style="width: 150px;" name="startUsingDate" editable="false"></div>
  207. <div class="wsf-li">
  208. <span class="wsf-li-title">仓房编码 :</span>
  209. <input class="easyui-textbox" style="width: 150px;" name="houseNumber" editable="false"></div>
  210. <br />
  211. <span class="wsf-big">结构</span>
  212. <br />
  213. <div class="wsf-li-1">
  214. <span class="wsf-li-title-1">墙体(m):</span>
  215. <input class="easyui-textbox" name="areaWall"></div>
  216. <div class="wsf-li-1">
  217. <span class="wsf-li-title-1">屋面:</span>
  218. <input class="easyui-textbox" name="areaHouse"></div>
  219. <div class="wsf-li-1">
  220. <span class="wsf-li-title-1">地面:</span>
  221. <input class="easyui-textbox" name="areaFloor"></div>
  222. <div class="wsf-li-1">
  223. <span class="wsf-li-title-1">设计仓容(m³):</span>
  224. <input class="easyui-textbox" name="areaVolume"></div>
  225. <div class="wsf-li-1">
  226. <span class="wsf-li-title-1">檐高(m):</span>
  227. <input class="easyui-textbox" name="alongHigh"></div>
  228. <div class="wsf-li-1">
  229. <span class="wsf-li-title-1">房屋跨度:</span>
  230. <input class="easyui-textbox" name="houseCross"></div>
  231. <br />
  232. <span class="wsf-big">仓内</span>
  233. <br />
  234. <div class="wsf-li-1">
  235. <span class="wsf-li-title-1">长(m):</span>
  236. <input class="easyui-textbox" name="innerWidth"></div>
  237. <div class="wsf-li-1">
  238. <span class="wsf-li-title-1">宽(m):</span>
  239. <input class="easyui-textbox" name="innerHeight"></div>
  240. <div class="wsf-li-1">
  241. <span class="wsf-li-title-1">装粮线高度(m):</span>
  242. <input class="easyui-textbox" name="innerLineHeight"></div>
  243. <div class="wsf-li-1">
  244. <span class="wsf-li-title-1">筒仓内径:</span>
  245. <input class="easyui-textbox" name="innerDiameter"></div>
  246. <div class="wsf-li-1">
  247. <span class="wsf-li-title-1">仓内体积:</span>
  248. <input class="easyui-textbox" name="innerVolume"></div>
  249. <br />
  250. <span class="wsf-big">其他</span>
  251. <br />
  252. <div class="wsf-li-1">
  253. <span class="wsf-li-title-1">库门数量:</span>
  254. <input class="easyui-textbox" name="doorNumber"></div>
  255. <div class="wsf-li-1">
  256. <span class="wsf-li-title-1">库门高度:</span>
  257. <input class="easyui-textbox" name="doorHeight"></div>
  258. <div class="wsf-li-1">
  259. <span class="wsf-li-title-1">库门宽度:</span>
  260. <input class="easyui-textbox" name="doorWidth"></div>
  261. <div class="wsf-li-1">
  262. <span class="wsf-li-title-1">通风方式:</span>
  263. <input class="easyui-textbox" name="airFormat"></div>
  264. <div class="wsf-li-1">
  265. <span class="wsf-li-title-1">隔热方式:</span>
  266. <input class="easyui-textbox" name="hotFormat"></div>
  267. <div class="wsf-li-1">
  268. <span class="wsf-li-title-1">控温措施:</span>
  269. <input class="easyui-textbox" name="tempControl"></div>
  270. <div class="wsf-li-1">
  271. <span class="wsf-li-title-1">门窗更换时间:</span>
  272. <input class="easyui-datebox" style="width: 135px;" name="doorChangeDate" editable="false"></div>
  273. <div class="wsf-li-1">
  274. <span class="wsf-li-title-1">外墙粉刷时间:</span>
  275. <input class="easyui-datebox" style="width: 135px;" name="wallWashDate" editable="false"></div>
  276. <br />
  277. <span class="wsf-big">货位列表</span>
  278. <br />
  279. <div class="wsf-li-1">
  280. <span class="wsf-li-title-1">货位号:</span>
  281. <input class="easyui-textbox" name="positionNumber"></div>
  282. </form>
  283. </div>
  284. <!--二维码页面-->
  285. <div class="erweimap easyui-window" style="padding-left: 10px" data-options="closed:true">
  286. <!--startprint-->
  287. <div id="codeHtml">
  288. <div id="code"></div>
  289. </div>
  290. <a id="download" download="qrcode.jpg"></a>
  291. <a href="#" class="easyui-linkbutton dayin" plain="true" style="margin-top: 20px;">打印</a>
  292. <a id="saveQrCode" class="easyui-linkbutton" plain="true" style="margin-top: 20px;cursor: pointer;">下载二维码</a>
  293. <!--endprint onclick="$('.erweimap').window('close');"-->
  294. </div>
  295. <img id="image" src=""/>
  296. <script type="text/javascript">
  297. var wid = localStorage.warehouseID;
  298. base.ajaxFunc('get', config.warehouseBaseInfo.show, {
  299. houseId: wid
  300. }, function(e) {
  301. $("#linePic").attr("src", e.house.linePic);
  302. });
  303. $('.QRcode').on('click',function(){
  304. //window.open('../house/info/qrcode' + '?houseId=' + wid );
  305. // base.ajaxFunc('get', config.baseUrl + '/house/info/qrcode', {houseId: wid}, function(e) {
  306. // });
  307. $("#code").empty();
  308. base.renderwindow('.erweimap',
  309. {
  310. title: '二维码',
  311. width: 440,
  312. height: 500,
  313. });
  314. var id=$(this).data('id');
  315. var erwei="checkpoint_"+id;
  316. erwei=toUtf8(erwei);
  317. $("#code").qrcode({
  318. width: 400, //宽度
  319. height:400, //高度
  320. render : "canvas",
  321. text : "house_"+wid
  322. });
  323. $('.erweimap').window('open').window('center');
  324. dayinerweima();
  325. xiazai();
  326. })
  327. function xiazai() {
  328. $('#saveQrCode').click(function () {
  329. var canvas = $('#code').find("canvas").get(0);
  330. try {//解决IE转base64时缓存不足,canvas转blob下载
  331. var blob = canvas.msToBlob();
  332. navigator.msSaveBlob(blob, 'qrcode.jpg');
  333. } catch (e) {//如果为其他浏览器,使用base64转码下载
  334. var url = canvas.toDataURL('image/jpeg');
  335. $("#download").attr('href', url).get(0).click();
  336. }
  337. return false;
  338. });
  339. }
  340. function dayinerweima(){
  341. $(".dayin").off().on("click",function(){
  342. var img = document.getElementById("image"); /// get image element
  343. var canvas = document.getElementsByTagName("canvas")[0]; /// get canvas element
  344. img.src = canvas.toDataURL(); /// update image
  345. $("#image").jqprint({
  346. debug:false,
  347. importCSS:true,
  348. printContainer:true,
  349. operaSupport:false
  350. });
  351. });
  352. }
  353. function toUtf8(str) {
  354. var out, i, len, c;
  355. out = "";
  356. len = str.length;
  357. for(i = 0; i < len; i++) {
  358. c = str.charCodeAt(i);
  359. if ((c >= 0x0001) && (c <= 0x007F)) {
  360. out += str.charAt(i);
  361. } else if (c > 0x07FF) {
  362. out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
  363. out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
  364. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  365. } else {
  366. out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
  367. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  368. }
  369. }
  370. return out;
  371. }
  372. $(function(){
  373. $('.upload-divBtn').on('click', function(e){
  374. $("#replace-pic").trigger('click');
  375. })
  376. })
  377. var selector = $("#replace-pic");
  378. $(selector).AjaxFileUpload({
  379. action: "/sys/upload/doupload?type=linepic",
  380. dataType: 'json', //返回值类型 一般设置为json
  381. onChange: function(filename) {
  382. // Create a span element to notify the user of an upload in progress
  383. // var $span = $("<span id=\"uploading\"/>")
  384. // .attr("class", $(this).attr("id"))
  385. // .text("Uploading")
  386. // .appendTo($("#uploading-bar"));
  387. // // $("#uploading-bar").remove();
  388. // keeper_intervels = window.setInterval(function() {
  389. // var text = $span.text();
  390. // if (text.length < 13) {
  391. // $span.text(text + ".");
  392. // } else {
  393. // $span.text("Uploading");
  394. // }
  395. // }, 200);
  396. },
  397. onSubmit: function(data) {
  398. return true;
  399. },
  400. onComplete: function(data, response) {
  401. if (response.code == 0) {
  402. $("#linePic").attr("src", response.url);
  403. base.ajaxFunc('get', "/house/info/updateLinePic", {
  404. houseId: wid,
  405. linePic: response.url
  406. }, function(e) {});
  407. // $(formSelector+" #avator").val(response.url);
  408. // $(formSelector+ " #uploading-bar").html("");
  409. // $(formSelector + " #pic").html(
  410. // $("<img />").attr("src", response.url).attr("width", '100%')
  411. // );
  412. // $(formSelector+ " #upload-info").html("上传成功").fadeIn();
  413. } else {
  414. // $(formSelector+" #upload-info").html("上传失败").fadeIn();
  415. return;
  416. }
  417. }
  418. });
  419. </script>