warehouseSituation.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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>
  119. <div id="warehouse_basic_record_add_win" style="padding:20px;">
  120. <form method="post" action="#" id="warehouse_basic_record_add_form">
  121. <input name="id" type="hidden">
  122. <ul class="warehouse_basic_record_add_win_ul">
  123. <li>
  124. <div>检查日期:</div>
  125. <input name="checkDate" class="easyui-datebox" required="true" editable="false" >
  126. <div>检查类型:</div>
  127. <input name="type" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true">
  128. <div>检查项目:</div>
  129. <input name="project" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li>
  130. <li>
  131. <div>检查人员:</div>
  132. <input name="checkPerson" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li>
  133. <li>
  134. <div class="text_title_public_style">是否存在问题:</div>
  135. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-first" name="problemRadio" value="0" style="width:25px;cursor:pointer;">是
  136. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-two" name="problemRadio" value="1" style="width:25px;cursor:pointer;">否
  137. </li>
  138. <li>
  139. <div class="text_title_public_style " >存在问题:</div>
  140. <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>
  141. <li>
  142. <div class="text_title_public_style">处理意见:</div>
  143. <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>
  144. <li>
  145. <div>维修责任人:</div>
  146. <input type="text" name="bosshead" class="easyui-textbox easyui-validatebox house-personLiable" data-options="validType:'length[0,10]'">
  147. <div>开始日期:</div>
  148. <input type="text" class="easyui-datebox house-startTime" name="maintainStartDate" editable="false" >
  149. <div>结束日期:</div>
  150. <input type="text" class="easyui-datebox house-endTime" name="maintainEndDate" editable="false" ></li>
  151. <li>
  152. <div>实际完成日期:</div>
  153. <input type="text" class="easyui-datebox house-actualDate" name="finishDate" editable="false" ></li>
  154. <li>
  155. <div class="text_title_public_style">维修结果:</div>
  156. <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>
  157. <li>
  158. <div class="text_title_public_style">备注:</div>
  159. <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>
  160. <li>
  161. <a href="#" class="easyui-linkbutton" icon="icon-ok" data-control='edit' id="comfirm_add_record" style="margin:auto 20px auto 250px;">确认</a>
  162. <a href="#" class="easyui-linkbutton" onclick="$('#warehouse_basic_record_add_win').window('close');" icon="icon-cancel" style="margin-left:40px;">取消</a>
  163. </li>
  164. </ul>
  165. </form>
  166. </div>
  167. <div class="wsf-wrap">
  168. <form class="wsf-wrap-from" style="padding:20px;">
  169. <span style="font-weight: bold">仓房基本信息</span>
  170. <br />
  171. <div class="wsf-li">
  172. <span class="wsf-li-title">所属粮库:</span>
  173. <input class="easyui-textbox grainId-span" name="grainId" style="width: 150px;" editable="false">
  174. </div>
  175. <div class="wsf-li">
  176. <span class="wsf-li-title">仓房类型:</span>
  177. <input class="easyui-textbox" name="type" style="width: 150px;" editable="false">
  178. </div>
  179. <div class="wsf-li">
  180. <span class="wsf-li-title">仓号:</span>
  181. <input class="easyui-textbox" name="houseName"></div>
  182. <div class="wsf-li">
  183. <span class="wsf-li-title">交付使用日期:</span>
  184. <input class="easyui-datebox startUsingDate" style="width: 150px;" name="startUsingDate" editable="false"></div>
  185. <div class="wsf-li">
  186. <span class="wsf-li-title">仓房编码 :</span>
  187. <input class="easyui-textbox" style="width: 150px;" name="houseNumber" editable="false"></div>
  188. <br />
  189. <span class="wsf-big">结构</span>
  190. <br />
  191. <div class="wsf-li-1">
  192. <span class="wsf-li-title-1">墙体(m):</span>
  193. <input class="easyui-textbox houseWall" name="areaWall"></div>
  194. <div class="wsf-li-1">
  195. <span class="wsf-li-title-1">屋面:</span>
  196. <input class="easyui-textbox" name="areaHouse"></div>
  197. <div class="wsf-li-1">
  198. <span class="wsf-li-title-1">地面:</span>
  199. <input class="easyui-textbox" name="areaFloor"></div>
  200. <div class="wsf-li-1">
  201. <span class="wsf-li-title-1">设计仓容(m³):</span>
  202. <input class="easyui-textbox" name="areaVolume"></div>
  203. <div class="wsf-li-1">
  204. <span class="wsf-li-title-1">檐高(m):</span>
  205. <input class="easyui-textbox" name="alongHigh"></div>
  206. <div class="wsf-li-1">
  207. <span class="wsf-li-title-1">房屋跨度:</span>
  208. <input class="easyui-textbox" name="houseCross"></div>
  209. <div class="wsf-li-1">
  210. <span class="wsf-li-title-1">房顶:</span>
  211. <input class="easyui-textbox" name="roof"></div>
  212. <div class="wsf-li-1">
  213. <span class="wsf-li-title-1">房架:</span>
  214. <input class="easyui-textbox" name="frame"></div>
  215. <div class="wsf-li-1">
  216. <span class="wsf-li-title-1">核定容量:</span>
  217. <input class="easyui-textbox" name="houseCapacity"></div>
  218. <div class="wsf-li-1">
  219. <span class="wsf-li-title-1">保管方式:</span>
  220. <input class="easyui-textbox" name="keepMethod"></div>
  221. <div class="wsf-li-1">
  222. <span class="wsf-li-title-1">装粮高度:</span>
  223. <input class="easyui-textbox" name="lineHeight"></div>
  224. <br />
  225. <span class="wsf-big">仓内</span>
  226. <br />
  227. <div class="wsf-li-1">
  228. <span class="wsf-li-title-1">长(m):</span>
  229. <input class="easyui-textbox" name="innerWidth"></div>
  230. <div class="wsf-li-1">
  231. <span class="wsf-li-title-1">宽(m):</span>
  232. <input class="easyui-textbox" name="innerHeight"></div>
  233. <div class="wsf-li-1">
  234. <span class="wsf-li-title-1">装粮线高度(m):</span>
  235. <input class="easyui-textbox" name="innerLineHeight"></div>
  236. <div class="wsf-li-1">
  237. <span class="wsf-li-title-1">筒仓内径:</span>
  238. <input class="easyui-textbox" name="innerDiameter"></div>
  239. <div class="wsf-li-1">
  240. <span class="wsf-li-title-1">仓内体积:</span>
  241. <input class="easyui-textbox" name="innerVolume"></div>
  242. <div class="wsf-li-1">
  243. <span class="wsf-li-title-1">檐高:</span>
  244. <input class="easyui-textbox" name="innerEaves"></div>
  245. <div class="wsf-li-1">
  246. <span class="wsf-li-title-1">粮堆体积:</span>
  247. <input class="easyui-textbox" name="innerFoods"></div>
  248. <br />
  249. <span class="wsf-big">仓外</span>
  250. <br />
  251. <div class="wsf-li-1">
  252. <span class="wsf-li-title-1">长(m):</span>
  253. <input class="easyui-textbox" name="outerLength"></div>
  254. <div class="wsf-li-1">
  255. <span class="wsf-li-title-1">宽(m):</span>
  256. <input class="easyui-textbox" name="outerWidth"></div>
  257. <div class="wsf-li-1">
  258. <span class="wsf-li-title-1">檐高:</span>
  259. <input class="easyui-textbox" name="outerEaves"></div>
  260. <div class="wsf-li-1">
  261. <span class="wsf-li-title-1">顶高:</span>
  262. <input class="easyui-textbox" name="outerTop"></div>
  263. <div class="wsf-li-1">
  264. <span class="wsf-li-title-1">筒仓外径:</span>
  265. <input class="easyui-textbox" name="outerCircle"></div>
  266. <div class="wsf-li-1">
  267. <span class="wsf-li-title-1">外墙面积:</span>
  268. <input class="easyui-textbox" name="outerWall"></div>
  269. <div class="wsf-li-1">
  270. <span class="wsf-li-title-1">扣除体积:</span>
  271. <input class="easyui-textbox" name="outerDeduction"></div>
  272. <br />
  273. <span class="wsf-big">其他</span>
  274. <br />
  275. <div class="wsf-li-1">
  276. <span class="wsf-li-title-1">库门数量:</span>
  277. <input class="easyui-textbox" name="doorNumber"></div>
  278. <div class="wsf-li-1">
  279. <span class="wsf-li-title-1">库门高度:</span>
  280. <input class="easyui-textbox" name="doorHeight"></div>
  281. <div class="wsf-li-1">
  282. <span class="wsf-li-title-1">库门宽度:</span>
  283. <input class="easyui-textbox" name="doorWidth"></div>
  284. <div class="wsf-li-1">
  285. <span class="wsf-li-title-1">通风方式:</span>
  286. <input class="easyui-textbox" name="airFormat"></div>
  287. <div class="wsf-li-1">
  288. <span class="wsf-li-title-1">隔热方式:</span>
  289. <input class="easyui-textbox" name="hotFormat"></div>
  290. <div class="wsf-li-1">
  291. <span class="wsf-li-title-1">控温措施:</span>
  292. <input class="easyui-textbox" name="tempControl"></div>
  293. <div class="wsf-li-1">
  294. <span class="wsf-li-title-1">库门位置:</span>
  295. <input class="easyui-textbox" name="doorAddress"></div>
  296. <div class="wsf-li-1">
  297. <span class="wsf-li-title-1">仓顶隔热措施:</span>
  298. <input class="easyui-textbox" name="methodTop"></div>
  299. <div class="wsf-li-1">
  300. <span class="wsf-li-title-1">仓窗隔热措施:</span>
  301. <input class="easyui-textbox" name="methodWindow"></div>
  302. <div class="wsf-li-1">
  303. <span class="wsf-li-title-1">门窗更换时间:</span>
  304. <input class="easyui-datebox" style="width: 135px;" name="doorChangeDate" editable="false"></div>
  305. <div class="wsf-li-1">
  306. <span class="wsf-li-title-1">外墙粉刷时间:</span>
  307. <input class="easyui-datebox" style="width: 135px;" name="wallWashDate" editable="false"></div>
  308. <br />
  309. <span class="wsf-big">货位列表</span>
  310. <br />
  311. <div class="wsf-li-1">
  312. <span class="wsf-li-title-1">货位号:</span>
  313. <input class="easyui-textbox" name="positionNumber"></div>
  314. </form>
  315. </div>
  316. <!--二维码页面-->
  317. <div class="erweimap easyui-window" style="padding-left: 10px" data-options="closed:true">
  318. <!--startprint-->
  319. <div id="codeHtml">
  320. <div id="code"></div>
  321. </div>
  322. <a id="download" download="qrcode.jpg"></a>
  323. <a href="#" class="easyui-linkbutton dayin" plain="true" style="margin-top: 20px;">打印</a>
  324. <a id="saveQrCode" class="easyui-linkbutton" plain="true" style="margin-top: 20px;cursor: pointer;">下载二维码</a>
  325. <!--endprint onclick="$('.erweimap').window('close');"-->
  326. </div>
  327. <img id="image" src=""/>
  328. <script type="text/javascript">
  329. var wid = localStorage.warehouseID;
  330. base.ajaxFunc('get', config.warehouseBaseInfo.show, {
  331. houseId: wid
  332. }, function(e) {
  333. $("#linePic").attr("src", e.house.linePic);
  334. });
  335. $('.QRcode').on('click',function(){
  336. //window.open('../house/info/qrcode' + '?houseId=' + wid );
  337. // base.ajaxFunc('get', config.baseUrl + '/house/info/qrcode', {houseId: wid}, function(e) {
  338. // });
  339. $("#code").empty();
  340. base.renderwindow('.erweimap',
  341. {
  342. title: '二维码',
  343. width: 440,
  344. height: 500,
  345. });
  346. var id=$(this).data('id');
  347. var erwei="checkpoint_"+id;
  348. erwei=toUtf8(erwei);
  349. $("#code").qrcode({
  350. width: 400, //宽度
  351. height:400, //高度
  352. render : "canvas",
  353. text : "house_"+wid
  354. });
  355. $('.erweimap').window('open').window('center');
  356. dayinerweima();
  357. xiazai();
  358. })
  359. function xiazai() {
  360. $('#saveQrCode').click(function () {
  361. var canvas = $('#code').find("canvas").get(0);
  362. try {//解决IE转base64时缓存不足,canvas转blob下载
  363. var blob = canvas.msToBlob();
  364. navigator.msSaveBlob(blob, 'qrcode.jpg');
  365. } catch (e) {//如果为其他浏览器,使用base64转码下载
  366. var url = canvas.toDataURL('image/jpeg');
  367. $("#download").attr('href', url).get(0).click();
  368. }
  369. return false;
  370. });
  371. }
  372. function dayinerweima(){
  373. $(".dayin").off().on("click",function(){
  374. var img = document.getElementById("image"); /// get image element
  375. var canvas = document.getElementsByTagName("canvas")[0]; /// get canvas element
  376. img.src = canvas.toDataURL(); /// update image
  377. $("#image").jqprint({
  378. debug:false,
  379. importCSS:true,
  380. printContainer:true,
  381. operaSupport:false
  382. });
  383. });
  384. }
  385. function toUtf8(str) {
  386. var out, i, len, c;
  387. out = "";
  388. len = str.length;
  389. for(i = 0; i < len; i++) {
  390. c = str.charCodeAt(i);
  391. if ((c >= 0x0001) && (c <= 0x007F)) {
  392. out += str.charAt(i);
  393. } else if (c > 0x07FF) {
  394. out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
  395. out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
  396. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  397. } else {
  398. out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
  399. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  400. }
  401. }
  402. return out;
  403. }
  404. $(function(){
  405. $('.upload-divBtn').on('click', function(e){
  406. $("#replace-pic").trigger('click');
  407. })
  408. })
  409. var selector = $("#replace-pic");
  410. $(selector).AjaxFileUpload({
  411. action: "/sys/upload/doupload?type=linepic",
  412. dataType: 'json', //返回值类型 一般设置为json
  413. onChange: function(filename) {
  414. // Create a span element to notify the user of an upload in progress
  415. // var $span = $("<span id=\"uploading\"/>")
  416. // .attr("class", $(this).attr("id"))
  417. // .text("Uploading")
  418. // .appendTo($("#uploading-bar"));
  419. // // $("#uploading-bar").remove();
  420. // keeper_intervels = window.setInterval(function() {
  421. // var text = $span.text();
  422. // if (text.length < 13) {
  423. // $span.text(text + ".");
  424. // } else {
  425. // $span.text("Uploading");
  426. // }
  427. // }, 200);
  428. },
  429. onSubmit: function(data) {
  430. return true;
  431. },
  432. onComplete: function(data, response) {
  433. if (response.code == 0) {
  434. $("#linePic").attr("src", response.url);
  435. base.ajaxFunc('get', "/house/info/updateLinePic", {
  436. houseId: wid,
  437. linePic: response.url
  438. }, function(e) {});
  439. // $(formSelector+" #avator").val(response.url);
  440. // $(formSelector+ " #uploading-bar").html("");
  441. // $(formSelector + " #pic").html(
  442. // $("<img />").attr("src", response.url).attr("width", '100%')
  443. // );
  444. // $(formSelector+ " #upload-info").html("上传成功").fadeIn();
  445. } else {
  446. // $(formSelector+" #upload-info").html("上传失败").fadeIn();
  447. return;
  448. }
  449. }
  450. });
  451. </script>