warehouseMaintenance.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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="仓房维修记录查询" id="record_check" style="width: 100%;height: 100%;">
  18. <div class="dt-item" id="" style="margin-top: 0;border: none;">
  19. <div class="dt-nav">
  20. 检查日期:
  21. <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;
  22. <a href="#" class="easyui-linkbutton bd-add-s" style="height: 25px;" id="warehouse_equip_record_search">查询</a>
  23. <a href="#" class="easyui-linkbutton bd-add-s" style="height: 25px;" id="warehouse_add_record">添加</a>
  24. <a href="#" class="easyui-linkbutton bd-add-s clear-btn" plain="true">清空</a>
  25. </div>
  26. </div>
  27. <table id="record_equip" style="width: 800px">
  28. </table>
  29. </div>
  30. </div>
  31. <div id="warehouse_basic_record_add_win" style="padding:20px;">
  32. <form method="post" action="#" id="warehouse_basic_record_add_form">
  33. <input name="id" type="hidden">
  34. <ul class="warehouse_basic_record_add_win_ul">
  35. <li>
  36. <div>检查日期:</div>
  37. <input name="checkDate" id="checkDates" class="easyui-datebox" required="true" editable="false" >
  38. <!-- <div>检查类型:</div>
  39. <input name="type" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"> -->
  40. <div>检查项目:</div>
  41. <input name="project" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li>
  42. <!-- <li>
  43. <div>检查人员:</div>
  44. <input name="checkPerson" class="easyui-textbox easyui-validatebox" data-options="validType:'length[0,10]',required: true"></li> -->
  45. <!-- <li>
  46. <div class="text_title_public_style">是否存在问题:</div>
  47. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-first" name="problemRadio" value="0" style="width:25px;cursor:pointer;">是
  48. <input type="radio" class="yesOrNo-wareHouse yesOrNo-wareHouse-two" name="problemRadio" value="1" style="width:25px;cursor:pointer;">否
  49. </li> -->
  50. <li>
  51. <div class="text_title_public_style " >检查维修情况摘要:</div>
  52. <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>
  53. <!-- <li>
  54. <div class="text_title_public_style">处理意见:</div>
  55. <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> -->
  56. <!-- <li>
  57. <div>维修责任人:</div>
  58. <input type="text" name="bosshead" class="easyui-textbox easyui-validatebox house-personLiable" data-options="validType:'length[0,10]'">
  59. <div>开始日期:</div>
  60. <input type="text" class="easyui-datebox house-startTime" name="maintainStartDate" editable="false" >
  61. <div>结束日期:</div>
  62. <input type="text" class="easyui-datebox house-endTime" name="maintainEndDate" editable="false" ></li>
  63. <li>
  64. <div>实际完成日期:</div>
  65. <input type="text" class="easyui-datebox house-actualDate" name="finishDate" editable="false" ></li> -->
  66. <li>
  67. <div class="text_title_public_style">效果:</div>
  68. <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>
  69. <li>
  70. <div class="text_title_public_style">记事:</div>
  71. <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>
  72. <li>
  73. <a href="#" class="easyui-linkbutton" icon="icon-ok" data-control='edit' id="comfirm_add_record" style="margin:auto 20px auto 250px;">确认</a>
  74. <a href="#" class="easyui-linkbutton" onclick="$('#warehouse_basic_record_add_win').window('close');" icon="icon-cancel" style="margin-left:40px;">取消</a>
  75. </li>
  76. </ul>
  77. </form>
  78. </div>
  79. <div class="wsf-wrap">
  80. <form class="wsf-wrap-from" style="padding:20px;">
  81. <span style="font-weight: bold">仓房基本信息</span>
  82. <br />
  83. <div class="wsf-li">
  84. <span class="wsf-li-title">所属粮库:</span>
  85. <input class="easyui-textbox grainId-span" name="grainId" style="width: 150px;" editable="false">
  86. </div>
  87. <div class="wsf-li">
  88. <span class="wsf-li-title">仓房类型:</span>
  89. <input class="easyui-textbox" name="type" style="width: 150px;" editable="false">
  90. </div>
  91. <div class="wsf-li">
  92. <span class="wsf-li-title">仓号:</span>
  93. <input class="easyui-textbox" name="houseName"></div>
  94. <div class="wsf-li">
  95. <span class="wsf-li-title">交付使用日期:</span>
  96. <input class="easyui-datebox startUsingDate" style="width: 150px;" name="startUsingDate" editable="false"></div>
  97. <div class="wsf-li">
  98. <span class="wsf-li-title">仓房编码 :</span>
  99. <input class="easyui-textbox" style="width: 150px;" name="houseNumber" editable="false"></div>
  100. <br />
  101. <span class="wsf-big">结构</span>
  102. <br />
  103. <div class="wsf-li-1">
  104. <span class="wsf-li-title-1">墙体(m):</span>
  105. <input class="easyui-textbox" name="areaWall"></div>
  106. <div class="wsf-li-1">
  107. <span class="wsf-li-title-1">屋面:</span>
  108. <input class="easyui-textbox" name="areaHouse"></div>
  109. <div class="wsf-li-1">
  110. <span class="wsf-li-title-1">地面:</span>
  111. <input class="easyui-textbox" name="areaFloor"></div>
  112. <div class="wsf-li-1">
  113. <span class="wsf-li-title-1">设计仓容(m³):</span>
  114. <input class="easyui-textbox" name="areaVolume"></div>
  115. <div class="wsf-li-1">
  116. <span class="wsf-li-title-1">檐高(m):</span>
  117. <input class="easyui-textbox" name="alongHigh"></div>
  118. <div class="wsf-li-1">
  119. <span class="wsf-li-title-1">房屋跨度:</span>
  120. <input class="easyui-textbox" name="houseCross"></div>
  121. <br />
  122. <span class="wsf-big">仓内</span>
  123. <br />
  124. <div class="wsf-li-1">
  125. <span class="wsf-li-title-1">长(m):</span>
  126. <input class="easyui-textbox" name="innerWidth"></div>
  127. <div class="wsf-li-1">
  128. <span class="wsf-li-title-1">宽(m):</span>
  129. <input class="easyui-textbox" name="innerHeight"></div>
  130. <div class="wsf-li-1">
  131. <span class="wsf-li-title-1">装粮线高度(m):</span>
  132. <input class="easyui-textbox" name="innerLineHeight"></div>
  133. <div class="wsf-li-1">
  134. <span class="wsf-li-title-1">筒仓内径:</span>
  135. <input class="easyui-textbox" name="innerDiameter"></div>
  136. <div class="wsf-li-1">
  137. <span class="wsf-li-title-1">仓内体积:</span>
  138. <input class="easyui-textbox" name="innerVolume"></div>
  139. <br />
  140. <span class="wsf-big">其他</span>
  141. <br />
  142. <div class="wsf-li-1">
  143. <span class="wsf-li-title-1">库门数量:</span>
  144. <input class="easyui-textbox" name="doorNumber"></div>
  145. <div class="wsf-li-1">
  146. <span class="wsf-li-title-1">库门高度:</span>
  147. <input class="easyui-textbox" name="doorHeight"></div>
  148. <div class="wsf-li-1">
  149. <span class="wsf-li-title-1">库门宽度:</span>
  150. <input class="easyui-textbox" name="doorWidth"></div>
  151. <div class="wsf-li-1">
  152. <span class="wsf-li-title-1">通风方式:</span>
  153. <input class="easyui-textbox" name="airFormat"></div>
  154. <div class="wsf-li-1">
  155. <span class="wsf-li-title-1">隔热方式:</span>
  156. <input class="easyui-textbox" name="hotFormat"></div>
  157. <div class="wsf-li-1">
  158. <span class="wsf-li-title-1">控温措施:</span>
  159. <input class="easyui-textbox" name="tempControl"></div>
  160. <div class="wsf-li-1">
  161. <span class="wsf-li-title-1">门窗更换时间:</span>
  162. <input class="easyui-datebox" style="width: 135px;" name="doorChangeDate" editable="false"></div>
  163. <div class="wsf-li-1">
  164. <span class="wsf-li-title-1">外墙粉刷时间:</span>
  165. <input class="easyui-datebox" style="width: 135px;" name="wallWashDate" editable="false"></div>
  166. <br />
  167. <span class="wsf-big">货位列表</span>
  168. <br />
  169. <div class="wsf-li-1">
  170. <span class="wsf-li-title-1">货位号:</span>
  171. <input class="easyui-textbox" name="positionNumber"></div>
  172. </form>
  173. </div>
  174. <!--二维码页面-->
  175. <div class="erweimap easyui-window" style="padding-left: 10px" data-options="closed:true">
  176. <!--startprint-->
  177. <div id="codeHtml">
  178. <div id="code"></div>
  179. </div>
  180. <a id="download" download="qrcode.jpg"></a>
  181. <a href="#" class="easyui-linkbutton dayin" plain="true" style="margin-top: 20px;">打印</a>
  182. <a id="saveQrCode" class="easyui-linkbutton" plain="true" style="margin-top: 20px;cursor: pointer;">下载二维码</a>
  183. <!--endprint onclick="$('.erweimap').window('close');"-->
  184. </div>
  185. <img id="image" src=""/>
  186. <script type="text/javascript">
  187. var wid = localStorage.warehouseID;
  188. base.ajaxFunc('get', config.warehouseBaseInfo.show, {
  189. houseId: wid
  190. }, function(e) {
  191. $("#linePic").attr("src", e.house.linePic);
  192. });
  193. $('.QRcode').on('click',function(){
  194. //window.open('../house/info/qrcode' + '?houseId=' + wid );
  195. // base.ajaxFunc('get', config.baseUrl + '/house/info/qrcode', {houseId: wid}, function(e) {
  196. // });
  197. $("#code").empty();
  198. base.renderwindow('.erweimap',
  199. {
  200. title: '二维码',
  201. width: 440,
  202. height: 500,
  203. });
  204. var id=$(this).data('id');
  205. var erwei="checkpoint_"+id;
  206. erwei=toUtf8(erwei);
  207. $("#code").qrcode({
  208. width: 400, //宽度
  209. height:400, //高度
  210. render : "canvas",
  211. text : "house_"+wid
  212. });
  213. $('.erweimap').window('open').window('center');
  214. dayinerweima();
  215. xiazai();
  216. })
  217. function xiazai() {
  218. $('#saveQrCode').click(function () {
  219. var canvas = $('#code').find("canvas").get(0);
  220. try {//解决IE转base64时缓存不足,canvas转blob下载
  221. var blob = canvas.msToBlob();
  222. navigator.msSaveBlob(blob, 'qrcode.jpg');
  223. } catch (e) {//如果为其他浏览器,使用base64转码下载
  224. var url = canvas.toDataURL('image/jpeg');
  225. $("#download").attr('href', url).get(0).click();
  226. }
  227. return false;
  228. });
  229. }
  230. function dayinerweima(){
  231. $(".dayin").off().on("click",function(){
  232. var img = document.getElementById("image"); /// get image element
  233. var canvas = document.getElementsByTagName("canvas")[0]; /// get canvas element
  234. img.src = canvas.toDataURL(); /// update image
  235. $("#image").jqprint({
  236. debug:false,
  237. importCSS:true,
  238. printContainer:true,
  239. operaSupport:false
  240. });
  241. });
  242. }
  243. function toUtf8(str) {
  244. var out, i, len, c;
  245. out = "";
  246. len = str.length;
  247. for(i = 0; i < len; i++) {
  248. c = str.charCodeAt(i);
  249. if ((c >= 0x0001) && (c <= 0x007F)) {
  250. out += str.charAt(i);
  251. } else if (c > 0x07FF) {
  252. out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
  253. out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
  254. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  255. } else {
  256. out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
  257. out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
  258. }
  259. }
  260. return out;
  261. }
  262. $(function(){
  263. $('.upload-divBtn').on('click', function(e){
  264. $("#replace-pic").trigger('click');
  265. })
  266. })
  267. var selector = $("#replace-pic");
  268. $(selector).AjaxFileUpload({
  269. action: "/sys/upload/doupload?type=linepic",
  270. dataType: 'json', //返回值类型 一般设置为json
  271. onChange: function(filename) {
  272. // Create a span element to notify the user of an upload in progress
  273. // var $span = $("<span id=\"uploading\"/>")
  274. // .attr("class", $(this).attr("id"))
  275. // .text("Uploading")
  276. // .appendTo($("#uploading-bar"));
  277. // // $("#uploading-bar").remove();
  278. // keeper_intervels = window.setInterval(function() {
  279. // var text = $span.text();
  280. // if (text.length < 13) {
  281. // $span.text(text + ".");
  282. // } else {
  283. // $span.text("Uploading");
  284. // }
  285. // }, 200);
  286. },
  287. onSubmit: function(data) {
  288. return true;
  289. },
  290. onComplete: function(data, response) {
  291. if (response.code == 0) {
  292. $("#linePic").attr("src", response.url);
  293. base.ajaxFunc('get', "/house/info/updateLinePic", {
  294. houseId: wid,
  295. linePic: response.url
  296. }, function(e) {});
  297. // $(formSelector+" #avator").val(response.url);
  298. // $(formSelector+ " #uploading-bar").html("");
  299. // $(formSelector + " #pic").html(
  300. // $("<img />").attr("src", response.url).attr("width", '100%')
  301. // );
  302. // $(formSelector+ " #upload-info").html("上传成功").fadeIn();
  303. } else {
  304. // $(formSelector+" #upload-info").html("上传失败").fadeIn();
  305. return;
  306. }
  307. }
  308. });
  309. </script>