12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Aisky-coffee</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- 新 Bootstrap4 核心 CSS 文件 -->
- <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
- <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
- <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
- <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
- <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
- <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
- <!--可用來建立使用者小圖示-->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <script>
- $(function(){
- //進豆閥
- {% if params.beans %}
- var bean_num = 0;
- {% for bean in params.beans %}
- if('{{bean.start}}' != '00:00' && '{{bean.end}}' != '00:00' && bean_num == 0){
- var iv = $(".set-schedule")[0];
- var iv_div = $("#inletValve_div");
- iv.style.display = 'none';
- iv_div.css('visibility','visible');
- $('select[name=inletValve_duration1]').val('{{bean.duration}}');
- $('select[name=inletValve_from_hr1]').val('{{bean.start}}'.split(':')[0]);
- $('select[name=inletValve_from_min1]').val('{{bean.start}}'.split(':')[1]);
- $('select[name=inletValve_to_hr1]').val('{{bean.end}}'.split(':')[0]);
- $('select[name=inletValve_to_min1]').val('{{bean.end}}'.split(':')[1]);
- bean_num ++;
- }else if(bean_num > 0){
- if(bean_num == 1){
- var add = document.getElementById('inletValve_add1');
- bean_num ++;
- }else{
- var add = document.getElementById('inletValve_add' + i);
- };
- Add(add);
- $('select[name=inletValve_duration' + i + ']').val('{{bean.duration}}');
- $('select[name=' + 'inletValve_from_hr' + i + ']').val('{{bean.start}}'.split(':')[0]);
- $('select[name=' + 'inletValve_from_min' + i + ']').val('{{bean.start}}'.split(':')[1]);
- $('select[name=' + 'inletValve_to_hr' + i + ']').val('{{bean.end}}'.split(':')[0]);
- $('select[name=' + 'inletValve_to_min' + i + ']').val('{{bean.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //清洗機
- {% if params.washes %}
- var wash_num = 0;
- {% for wash in params.washes %}
- if('{{wash.start}}' != '00:00' && '{{wash.end}}' != '00:00' && wash_num == 0){
- var wash = $(".set-schedule")[1];
- var wash_div = $("#wash_div");
- wash.style.display = 'none';
- wash_div.css('visibility','visible');
- $('select[name=wash_duration1]').val('{{wash.duration}}');
- $('select[name=wash_from_hr1]').val('{{wash.start}}'.split(':')[0]);
- $('select[name=wash_from_min1]').val('{{wash.start}}'.split(':')[1]);
- $('select[name=wash_to_hr1]').val('{{wash.end}}'.split(':')[0]);
- $('select[name=wash_to_min1]').val('{{wash.end}}'.split(':')[1]);
- wash_num ++;
- }else if(wash_num > 0){
- if(wash_num == 1){
- var add = document.getElementById('wash_add1');
- wash_num ++;
- }else{
- var add = document.getElementById('wash_add' + i);
- };
- Add(add);
- $('select[name=wash_duration' + i + ']').val('{{wash.duration}}');
- $('select[name=' + 'wash_from_hr' + i + ']').val('{{wash.start}}'.split(':')[0]);
- $('select[name=' + 'wash_from_min' + i + ']').val('{{wash.start}}'.split(':')[1]);
- $('select[name=' + 'wash_to_hr' + i + ']').val('{{wash.end}}'.split(':')[0]);
- $('select[name=' + 'wash_to_min' + i + ']').val('{{wash.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //輸送帶1
- {% if params.belts1 %}
- var belt1_num = 0;
- {% for belt1 in params.belts1 %}
- if('{{belt1.start}}' != '00:00' && '{{belt1.end}}' != '00:00' && belt1_num == 0){
- var belt1 = $(".set-schedule")[2];
- var belt1_div = $("#belt1_div");
- belt1.style.display = 'none';
- belt1_div.css('visibility','visible');
- $('select[name=belt1_duration1]').val('{{belt1.duration}}');
- $('select[name=belt1_from_hr1]').val('{{belt1.start}}'.split(':')[0]);
- $('select[name=belt1_from_min1]').val('{{belt1.start}}'.split(':')[1]);
- $('select[name=belt1_to_hr1]').val('{{belt1.end}}'.split(':')[0]);
- $('select[name=belt1_to_min1]').val('{{belt1.end}}'.split(':')[1]);
- belt1_num ++;
- }else if(belt1_num > 0){
- if(belt1_num == 1){
- var add = document.getElementById('belt1_add1');
- belt1_num ++;
- }else{
- var add = document.getElementById('belt1_add' + i);
- };
- Add(add);
- $('select[name=belt1_duration' + i + ']').val('{{belt1.duration}}');
- $('select[name=' + 'belt1_from_hr' + i + ']').val('{{belt1.start}}'.split(':')[0]);
- $('select[name=' + 'belt1_from_min' + i + ']').val('{{belt1.start}}'.split(':')[1]);
- $('select[name=' + 'belt1_to_hr' + i + ']').val('{{belt1.end}}'.split(':')[0]);
- $('select[name=' + 'belt1_to_min' + i + ']').val('{{belt1.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //消毒機
- {% if params.disinfects %}
- var disinfect_num = 0;
- {% for disinfect in params.disinfects %}
- if('{{disinfect.start}}' != '00:00' && '{{disinfect.end}}' != '00:00' && disinfect_num == 0){
- var di = $(".set-schedule")[3];
- var di_div = $("#disinfect_div");
- di.style.display = 'none';
- di_div.css('visibility','visible');
- $('select[name=disinfect_duration1]').val('{{disinfect.duration}}');
- $('select[name=disinfect_from_hr1]').val('{{disinfect.start}}'.split(':')[0]);
- $('select[name=disinfect_from_min1]').val('{{disinfect.start}}'.split(':')[1]);
- $('select[name=disinfect_to_hr1]').val('{{disinfect.end}}'.split(':')[0]);
- $('select[name=disinfect_to_min1]').val('{{disinfect.end}}'.split(':')[1]);
- disinfect_num ++;
- }else if(disinfect_num > 0){
- if(disinfect_num == 1){
- var add = document.getElementById('disinfect_add1');
- disinfect_num ++;
- }else{
- var add = document.getElementById('disinfect_add' + i);
- };
- Add(add);
- $('select[name=disinfect_duration' + i + ']').val('{{disinfect.duration}}');
- $('select[name=' + 'disinfect_from_hr' + i + ']').val('{{disinfect.start}}'.split(':')[0]);
- $('select[name=' + 'disinfect_from_min' + i + ']').val('{{disinfect.start}}'.split(':')[1]);
- $('select[name=' + 'disinfect_to_hr' + i + ']').val('{{disinfect.end}}'.split(':')[0]);
- $('select[name=' + 'disinfect_to_min' + i + ']').val('{{disinfect.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //色選機
- {% if params.colors %}
- var color_num = 0;
- {% for color in params.colors %}
- if('{{color.start}}' != '00:00' && '{{color.end}}' != '00:00' && color_num == 0){
- var color = $(".set-schedule")[4];
- var color_div = $("#color_div");
- color.style.display = 'none';
- color_div.css('visibility','visible');
- $('select[name=color_duration1]').val('{{color.duration}}');
- $('select[name=color_from_hr1]').val('{{color.start}}'.split(':')[0]);
- $('select[name=color_from_min1]').val('{{color.start}}'.split(':')[1]);
- $('select[name=color_to_hr1]').val('{{color.end}}'.split(':')[0]);
- $('select[name=color_to_min1]').val('{{color.end}}'.split(':')[1]);
- color_num ++;
- }else if(color_num > 0){
- if(color_num == 1){
- var add = document.getElementById('color_add1');
- color_num ++;
- }else{
- var add = document.getElementById('color_add' + i);
- };
- Add(add);
- $('select[name=color_duration' + i + ']').val('{{color.duration}}');
- $('select[name=' + 'color_from_hr' + i + ']').val('{{color.start}}'.split(':')[0]);
- $('select[name=' + 'color_from_min' + i + ']').val('{{color.start}}'.split(':')[1]);
- $('select[name=' + 'color_to_hr' + i + ']').val('{{color.end}}'.split(':')[0]);
- $('select[name=' + 'color_to_min' + i + ']').val('{{color.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //輸送帶2
- {% if params.belts2 %}
- var belt2_num = 0;
- {% for belt2 in params.belts2 %}
- if('{{belt2.start}}' != '00:00' && '{{belt2.end}}' != '00:00' && belt2_num == 0){
- var belt2 = $(".set-schedule")[5];
- var belt2_div = $("#belt2_div");
- belt2.style.display = 'none';
- belt2_div.css('visibility','visible');
- $('select[name=belt2_duration1]').val('{{belt2.duration}}');
- $('select[name=belt2_from_hr1]').val('{{belt2.start}}'.split(':')[0]);
- $('select[name=belt2_from_min1]').val('{{belt2.start}}'.split(':')[1]);
- $('select[name=belt2_to_hr1]').val('{{belt2.end}}'.split(':')[0]);
- $('select[name=belt2_to_min1]').val('{{belt2.end}}'.split(':')[1]);
- belt2_num ++;
- }else if(belt2_num > 0){
- if(belt2_num == 1){
- var add = document.getElementById('belt2_add1');
- belt2_num ++;
- }else{
- var add = document.getElementById('belt2_add' + i);
- };
- Add(add);
- $('select[name=belt2_duration' + i + ']').val('{{belt2.duration}}');
- $('select[name=' + 'belt2_from_hr' + i + ']').val('{{belt2.start}}'.split(':')[0]);
- $('select[name=' + 'belt2_from_min' + i + ']').val('{{belt2.start}}'.split(':')[1]);
- $('select[name=' + 'belt2_to_hr' + i + ']').val('{{belt2.end}}'.split(':')[0]);
- $('select[name=' + 'belt2_to_min' + i + ']').val('{{belt2.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //去皮機
- {% if params.peelings %}
- var peeling_num = 0;
- {% for peeling in params.peelings %}
- if('{{peeling.start}}' != '00:00' && '{{peeling.end}}' != '00:00' && peeling_num == 0){
- var peeled = $(".set-schedule")[6];
- var peeled_div = $("#peeled_div");
- peeled.style.display = 'none';
- peeled_div.css('visibility','visible');
- $('select[name=peeled_duration1]').val('{{peeling.duration}}');
- $('select[name=peeled_from_hr1]').val('{{peeling.start}}'.split(':')[0]);
- $('select[name=peeled_from_min1]').val('{{peeling.start}}'.split(':')[1]);
- $('select[name=peeled_to_hr1]').val('{{peeling.end}}'.split(':')[0]);
- $('select[name=peeled_to_min1]').val('{{peeling.end}}'.split(':')[1]);
- peeling_num ++;
- }else if(peeling_num > 0){
- if(peeling_num == 1){
- var add = document.getElementById('peeled_add1');
- peeling_num ++;
- }else{
- var add = document.getElementById('peeled_add' + i);
- };
- Add(add);
- $('select[name=peeled_duration' + i + ']').val('{{peeling.duration}}');
- $('select[name=' + 'peeled_from_hr' + i + ']').val('{{peeling.start}}'.split(':')[0]);
- $('select[name=' + 'peeled_from_min' + i + ']').val('{{peeling.start}}'.split(':')[1]);
- $('select[name=' + 'peeled_to_hr' + i + ']').val('{{peeling.end}}'.split(':')[0]);
- $('select[name=' + 'peeled_to_min' + i + ']').val('{{peeling.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- //輸送帶3
- {% if params.belts3 %}
- var belt3_num = 0;
- {% for belt3 in params.belts3 %}
- if('{{belt3.start}}' != '00:00' && '{{belt3.end}}' != '00:00' && belt3_num == 0){
- var belt3 = $(".set-schedule")[7];
- var belt3_div = $("#belt3_div");
- belt3.style.display = 'none';
- belt3_div.css('visibility','visible');
- $('select[name=belt3_duration1]').val('{{belt3.duration}}');
- $('select[name=belt3_from_hr1]').val('{{belt3.start}}'.split(':')[0]);
- $('select[name=belt3_from_min1]').val('{{belt3.start}}'.split(':')[1]);
- $('select[name=belt3_to_hr1]').val('{{belt3.end}}'.split(':')[0]);
- $('select[name=belt3_to_min1]').val('{{belt3.end}}'.split(':')[1]);
- belt3_num ++;
- }else if(belt3_num > 0){
- if(belt3_num == 1){
- var add = document.getElementById('belt3_add1');
- belt3_num ++;
- }else{
- var add = document.getElementById('belt3_add' + i);
- };
- Add(add);
- $('select[name=belt3_duration' + i + ']').val('{{belt3.duration}}');
- $('select[name=' + 'belt3_from_hr' + i + ']').val('{{belt3.start}}'.split(':')[0]);
- $('select[name=' + 'belt3_from_min' + i + ']').val('{{belt3.start}}'.split(':')[1]);
- $('select[name=' + 'belt3_to_hr' + i + ']').val('{{belt3.end}}'.split(':')[0]);
- $('select[name=' + 'belt3_to_min' + i + ']').val('{{belt3.end}}'.split(':')[1]);
- };
- {% endfor %}
- {% endif %}
- });
- </script>
- <script>
- var i = 1;
- function Cancel(){
- window.location.href='/cargo1';
- };
- function Add(evt){
- evt.style.display="none";
- i ++;
- var div = document.createElement('div');
- var from_hr = 'from_hr' + i;
- var from_min = 'from_min' + i;
- var to_hr = 'to_hr' + i;
- var to_min = 'to_min' + i;
- var id = evt.getAttribute('id');
- var len = id.length;
- var add = id.split('_')[0] + '_add' + i;
- var del = id.split('_')[0] + '_del' + i;
- var html = '';
- var begin = id.split('_')[0];
- div.className = "col-12 row";
- div.style.marginTop = "10px";
- html += '<div class="col-xl-5 col-lg-5 col-md-4" style="margin-top:10px;">';
- html += '<span>Duration</span>';
- if(begin == 'inletValve'){
- html += ' <select name="inletValve_duration' + i + '" class="duration">';
- }else if(begin == 'wash'){
- html += ' <select name="wash_duration' + i + '" class="duration">';
- }else if(begin == 'belt1'){
- html += ' <select name="belt1_duration' + i + '" class="duration">';
- }else if(begin == 'disinfect'){
- html += ' <select name="disinfect_duration' + i + '" class="duration">';
- }else if(begin == 'color'){
- html += ' <select name="color_duration' + i + '" class="duration">';
- }else if(begin == 'belt2'){
- html += ' <select name="belt2_duration' + i + '" class="duration">';
- }else if(begin == 'peeled'){
- html += ' <select name="peeled_duration' + i + '" class="duration">';
- }else if(begin == 'belt3'){
- html += ' <select name="belt3_duration' + i + '" class="duration">';
- }else{
- };
- html += '<option selected value="30min">30 min</option><option value="60min">60 min</option><option value="90min">90 min</option><option value="120min">120 min</option><option value="150min">150 min</option></select>';
- html += '</div>';
- html += '<div class="from-to col-xl-7 col-lg-7 col-md-8" style="margin-top:10px;">';
- html += '<div>';
- html += '<div class="from row">';
- html += '<div class="col-3">';
- html += '<span>From</span>';
- html += '</div>';
- html += '<div class="col-xs-6">';
- if(id.split('_')[0] == 'inletValve'){
- html += '<select name="inletValve_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'wash'){
- html += '<select name="wash_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt1'){
- html += '<select name="belt1_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'disinfect'){
- html += '<select name="disinfect_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'color'){
- html += '<select name="color_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt2'){
- html += '<select name="belt2_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'peeled'){
- html += '<select name="peeled_from_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt3'){
- html += '<select name="belt3_from_hr' + i + '">';
- }else{
- };
- for(var hr = 0; hr < 24; hr++){
- if(hr < 10){
- html += '<option value="0' + hr + '">0' + hr + '</option>';
- }else{
- html += '<option value="' + hr + '">' + hr + '</option>';
- };
- };
- html += '</select>';
- if(id.split('_')[0] == 'inletValve'){
- html += ' : <select name="inletValve_from_min' + i + '">';
- }else if(id.split('_')[0] == 'wash'){
- html += ' : <select name="wash_from_min' + i + '">';
- }else if(id.split('_')[0] == 'belt1'){
- html += ' : <select name="belt1_from_min' + i + '">';
- }else if(id.split('_')[0] == 'disinfect'){
- html += ' : <select name="disinfect_from_min' + i + '">';
- }else if(id.split('_')[0] == 'color'){
- html += ' : <select name="color_from_min' + i + '">';
- }else if(id.split('_')[0] == 'belt2'){
- html += ' : <select name="belt2_from_min' + i + '">';
- }else if(id.split('_')[0] == 'peeled'){
- html += ' : <select name="peeled_from_min' + i + '">';
- }else if(id.split('_')[0] == 'belt3'){
- html += ' : <select name="belt3_from_min' + i + '">';
- }else{
- };
- for(var min = 0; min < 60; min++){
- if(min < 10){
- html += '<option value="0' + min + '">0' + min + '</option>';
- }else{
- html += '<option value="' + min + '">' + min + '</option>';
- };
- };
- html += '</select>';
- html += '</div>';
- html += '<div class="col-xs-3">';
- html += '<input id=' + del + ' class="delete" type="button" value="Delete" onclick="Delete(' + del + ');">';
- html += '</div>';
- html += '</div>';
- html += '<div class="to row">';
- html += '<div class="col-3">';
- html += '<span>To</span>';
- html += '</div>';
- html += '<div class="col-xs-6">';
- if(id.split('_')[0] == 'inletValve'){
- html += '<select name="inletValve_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'wash'){
- html += '<select name="wash_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt1'){
- html += '<select name="belt1_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'disinfect'){
- html += '<select name="disinfect_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'color'){
- html += '<select name="color_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt2'){
- html += '<select name="belt2_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'peeled'){
- html += '<select name="peeled_to_hr' + i + '">';
- }else if(id.split('_')[0] == 'belt3'){
- html += '<select name="belt3_to_hr' + i + '">';
- }else{
- };
- for(var hr = 0; hr < 24; hr++){
- if(hr < 10){
- html += '<option value="0' + hr + '">0' + hr + '</option>';
- }else{
- html += '<option value="' + hr + '">' + hr + '</option>';
- };
- };
- html += '</select>';
- if(id.split('_')[0] == 'inletValve'){
- html += ' : <select name="inletValve_to_min' + i + '">';
- }else if(id.split('_')[0] == 'wash'){
- html += ' : <select name="wash_to_min' + i + '">';
- }else if(id.split('_')[0] == 'belt1'){
- html += ' : <select name="belt1_to_min' + i + '">';
- }else if(id.split('_')[0] == 'disinfect'){
- html += ' : <select name="disinfect_to_min' + i + '">';
- }else if(id.split('_')[0] == 'color'){
- html += ' : <select name="color_to_min' + i + '">';
- }else if(id.split('_')[0] == 'belt2'){
- html += ' : <select name="belt2_to_min' + i + '">';
- }else if(id.split('_')[0] == 'peeled'){
- html += ' : <select name="peeled_to_min' + i + '">';
- }else if(id.split('_')[0] == 'belt3'){
- html += ' : <select name="belt3_to_min' + i + '">';
- }else{
- };
- for(var min = 0; min < 60; min++){
- if(min < 10){
- html += '<option value="0' + min + '">0' + min + '</option>';
- }else{
- html += '<option value="' + min + '">' + min + '</option>';
- };
- };
- html += '</select><br>';
- html += '<input id=' + add + ' class="add" type="button" value="Add" onclick="Add(' + add + ');">';
- html += '</div>';
- html += '<div class="col-xs-3"></div>';
- html += '</div>';
- html += '</div>';
- html += '</div>';
- div.innerHTML = html;
- div.style.marginTop = '15px';
- div.style.zIndex = '100';
- evt.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(div);
- };
- function Delete(evt){
- var id = evt.getAttribute('id');
- var add = id.split('_')[0] + '_' + 'add';
- var clo_xs_3 = evt.parentNode;
- var from = clo_xs_3.parentNode;
- var begin = id.split('_')[0];
- var div = from.parentNode.parentNode.parentNode;
- var next_div = div.nextElementSibling;
- var pre_div = div.previousElementSibling;
- if(next_div && pre_div == null){
- div.parentNode.removeChild(div);
- next_div.style.marginTop = '0px';
- }else if(next_div && pre_div){
- div.parentNode.removeChild(div);
- }else if(next_div == null && pre_div == null){
- div.parentNode.parentNode.children[1].style.display = 'inline-block';
- div.parentNode.style.visibility = 'hidden';
- var name = id.split('_')[0];
- var from_hr = name + '_from_hr' + 1;
- var from_min = name + '_from_min' + 1;
- var to_hr = name + '_to_hr' + 1;
- var to_min = name + '_to_min' + 1;
- $('select[name=' + from_hr + ']').val('00');
- $('select[name=' + from_min + ']').val('00');
- $('select[name=' + to_hr + ']').val('00');
- $('select[name=' + to_min + ']').val('00');
- }else{
- div.parentNode.removeChild(div);
- i --;
- add = add + i;
- add = document.getElementById(add);
- if(add == null){
- add = pre_div.children[1].children[0].children[1].children[1].children[3];
- };
- add.style.display = 'block';
- };
- };
- $(function(){
- var inletValve = $(".set-schedule")[0];
- var inletValve_div = $("#inletValve_div");
- var wash = $(".set-schedule")[1];
- var wash_div = $("#wash_div");
- var belt1 = $(".set-schedule")[2];
- var belt1_div = $("#belt1_div");
- var disinfect = $(".set-schedule")[3];
- var disinfect_div = $("#disinfect_div");
- var color = $(".set-schedule")[4];
- var color_div = $("#color_div");
- var belt2 = $(".set-schedule")[5];
- var belt2_div = $("#belt2_div");
- var peeled = $(".set-schedule")[6];
- var peeled_div = $("#peeled_div");
- var belt3 = $(".set-schedule")[7];
- var belt3_div = $("#belt3_div");
- inletValve.onclick = function(){
- inletValve.style.display = 'none';
- inletValve_div.css('visibility','visible');
- };
- wash.onclick = function(){
- wash.style.display = 'none';
- wash_div.css('visibility','visible');
- };
- belt1.onclick = function(){
- belt1.style.display = 'none';
- belt1_div.css('visibility','visible');
- };
- disinfect.onclick = function(){
- disinfect.style.display = 'none';
- disinfect_div.css('visibility','visible');
- };
- color.onclick = function(){
- color.style.display = 'none';
- color_div.css('visibility','visible');
- };
- belt2.onclick = function(){
- belt2.style.display = 'none';
- belt2_div.css('visibility','visible');
- };
- peeled.onclick = function(){
- peeled.style.display = 'none';
- peeled_div.css('visibility','visible');
- };
- belt3.onclick = function(){
- belt3.style.display = 'none';
- belt3_div.css('visibility','visible');
- };
- });
- </script>
- <style>
- body {
- margin:0;
- }
- .navbar-dark .navbar-nav .nav-link {
- color: white;
- cursor: pointer;
- text-decoration:none;
- width: 110px;
- height: 46px;
- }
- .nav-top {
- line-height:40px;
- background-color: #C4C4C4;
- }
- .website_title{
- font-family: Roboto;
- font-style: normal;
- font-weight: normal;
- font-size: 30px;
- color: #000000;
- }
- .navbar-nav > li{
- float: none;
- display: inline-block;
- width: 100px;
- margin: 0 auto;
- text-align: center;
- }
- .navbar-nav > li a{
- font-size: 20px;
- }
- .main-page {
- margin-top: 200px;
- }
- .page-title {
- font-family: Roboto;
- font-style: normal;
- font-weight: bold;
- font-size: 36px;
- color: #000000;
- }
- form {
- margin-top: 70px;
- }
- .flex {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: center;
- }
- .flex span {
- font-family: Roboto;
- font-style: normal;
- font-weight: normal;
- font-size: 18px;
- margin-left: 20px;
- color: #000000;
- }
- .duration {
- background: #FFFFFF;
- border: 1px solid #000000;
- box-sizing: border-box;
- border-radius: 5px;
- width: 110px;
- height: 40px;
- font-size: 20px;
- margin-left: 15px;
- text-align: center;
- }
- .from select, .to select {
- width: 65px;
- height: 35px;
- margin-left: 2px;
- }
- .to {
- margin-top: 10px;
- margin-left: 10px;
- }
- .from {
- margin-left: 10px;
- }
- .from > div:first-child, .to > div:first-child {
- padding-right: 0px;
- text-align: right;
- margin-right: 5px;
- }
- .inletValve, .belt1, .disinfect, .color, .peeled, .wash, .belt2, .belt3 {
- height: 400px;
- border: 2px solid #E5E5E5;
- border-radius: 5px;
- margin-top:35px;
- margin-left:35px;
- }
- .item-title {
- display: inline-block;
- margin-top: 20px;
- margin-left: 20px;
- font-family: Roboto;
- font-style: normal;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- }
- .set-schedule {
- width: 200px;
- height: 45px;
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- color: #FFFFFF;
- border-radius: 5px;
- font-size: 17px;
- margin-left: 20px;
- }
- .delete {
- background: #E43030;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- border-radius: 5px;
- margin-left: 5px;
- width: 65px;
- height: 33px;
- font-size: 16px;
- text-align: center;
- line-height: 16px;
- color: #FFFFFF;
- }
- .add {
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- border-radius: 5px;
- margin-top: 10px;
- margin-left: 82px;;
- width: 65px;
- height: 33px;
- font-size: 16px;
- text-align: center;
- line-height: 16px;
- color: #FFFFFF;
- }
- .page-bottom {
- margin-top: 100px;
- }
- .form-control {
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- border-radius: 5px;
- width: 120px;
- height: 58px;
- text-align: center;
- line-height: 50px;
- color: #FFFFFF;
- display: inline-block;
- }
- @media(max-width:373px){
- .card {
- margin-right: 0px;
- }
- .inletValve, .wash, .belt1, .disinfect, .color, .belt2, .peeled, .belt3 {
- margin-left: 0px;
- }
- .col {
- padding-right: 0px;
- padding-left: 0px;
- }
- .from,.to {
- margin-left: 0px;
- }
- .flex span {
- margin-left: 0px;
- }
- .from select, .to select {
- width: 45px;
- }
- .add {
- width: 50px;
- margin-left: 62px;
- }
- .delete {
- width: 58px;
- }
- .col-xs-8:not(:first-child) {
- margin-top: 150px;
- }
- .form-group {
- margin-top: 50px;
- }
- }
- @media(max-width:577px){
- }
- @media(min-width:576px){
- }
- @media(min-width:768px){
- .navbar-nav > li {
- margin-left: 0px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- }
- @media(min-width:991px){
- .navbar-nav > li {
- margin-left: 20px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- .page-bottom input:last-child {
- margin-left: 100px;
- }
- }
- @media(min-width:1200px){
- .navbar-nav > li {
- margin-left: 50px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 100px;
- }
- .page-bottom input:last-child {
- margin-left: 100px;
- }
- }
- @media(min-width:1400px){
- .navbar-nav .li-block {
- display: inline-block;
- width: 200px;
- }
- .page-bottom input:last-child {
- margin-left: 100px;
- }
- }
- @media(min-width:1689px) {
- .navbar-nav > li {
- margin-left: 50px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 500px;
- }
- .page-bottom input:last-child {
- margin-left: 100px;
- }
- }
- </style>
- </head>
- <body>
- <nav class="fixed-top">
- <nav class="navbar navbar-expand-md nav-top justify-content-center">
- <div>
- <span class="website_title">貨櫃1</span>
- </div>
- </nav>
- <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="collapsibleNavbar">
- <ul class="navbar-nav">
- <li class="nav-item">
- <a class="nav-link" href="/">首頁</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">關於我們</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">資訊</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">聯絡方法</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/cargo_list">咖啡貨櫃</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/video">影像串流</a>
- </li>
- <li class="li-block"></li>
- <li class="nav-item">
- <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/logout">Logout</a>
- </li>
- </ul>
- </div>
- </nav>
- </nav>
- <div class="main-page">
- <form method="post" action="/b_cargo1">
- <div class="container-fluid">
- <div class="row">
- <div class="col flex">
- <div class="inletValve col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">進豆閥</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="inletValve_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="inletValve_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="inletValve_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="inletValve_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="inletValve_del1" class="delete" type="button" value="Delete" onclick="Delete(inletValve_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="inletValve_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="inletValve_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="inletValve_add1" class="add" type="button" value="Add" onclick="Add(inletValve_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="wash col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">清洗機</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="wash_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="wash_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="wash_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="wash_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="wash_del1" class="delete" type="button" value="Delete" onclick="Delete(wash_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="wash_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="wash_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="wash_add1" class="add" type="button" value="Add" onclick="Add(wash_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="belt1 col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">輸送帶1</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="belt1_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="belt1_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="belt1_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt1_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="belt1_del1" class="delete" type="button" value="Delete" onclick="Delete(belt1_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="belt1_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt1_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="belt1_add1" class="add" type="button" value="Add" onclick="Add(belt1_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="disinfect col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">消毒</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="disinfect_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="disinfect_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="disinfect_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="disinfect_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="disinfect_del1" class="delete" type="button" value="Delete" onclick="Delete(disinfect_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="disinfect_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="disinfect_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="disinfect_add1" class="add" type="button" value="Add" onclick="Add(disinfect_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="color col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">色選機</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="color_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="color_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="color_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="color_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="color_del1" class="delete" type="button" value="Delete" onclick="Delete(color_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="color_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="color_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="color_add1" class="add" type="button" value="Add" onclick="Add(color_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="belt2 col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">輸送帶2</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="belt2_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="belt2_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="belt2_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt2_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="belt2_del1" class="delete" type="button" value="Delete" onclick="Delete(belt2_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="belt2_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt2_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="belt2_add1" class="add" type="button" value="Add" onclick="Add(belt2_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="peeled col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">去皮機</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="peeled_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="peeled_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="peeled_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="peeled_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="peeled_del1" class="delete" type="button" value="Delete" onclick="Delete(peeled_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="peeled_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="peeled_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="peeled_add1" class="add" type="button" value="Add" onclick="Add(peeled_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="belt3 col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">輸送帶3</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="belt3_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12" style="margin-top:10px;">
- <span>Duration</span>
- <select name="belt3_duration1" class="duration">
- <option selected value="30min">30 min</option>
- <option value="60min">60 min</option>
- <option value="90min">90 min</option>
- <option value="120min">120 min</option>
- <option value="150min">150 min</option>
- </select>
- </div>
- <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="belt3_from_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt3_from_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select>
- </div>
- <div class="col-xs-3">
- <input id="belt3_del1" class="delete" type="button" value="Delete" onclick="Delete(belt3_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-3">
- <span>To</span>
- </div>
- <div class="col-xs-6">
- <select name="belt3_to_hr1">
- {% for hr in range(0, 24) %}
- {% if hr < 10 %}
- <option value="0{{hr}}">0{{hr}}</option>
- {% else %}
- <option value="{{hr}}">{{hr}}</option>
- {% endif %}
- {% endfor %}
- </select>
- : <select name="belt3_to_min1">
- {% for min in range(0, 60) %}
- {% if min < 10 %}
- <option value="0{{min}}">0{{min}}</option>
- {% else %}
- <option value="{{min}}">{{min}}</option>
- {% endif %}
- {% endfor %}
- </select><br>
- <input id="belt3_add1" class="add" type="button" value="Add" onclick="Add(belt3_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row page-bottom">
- <div class="col"></div>
- <div class="col-xl-4 col-lg-6 col-md-8 col-sm-10 col-xs-10" style="text-align:center;">
- <div class="form-group">
- <input type="button" class="form-control" value="Cancel" onclick="Cancel();">
- <input type="submit" class="form-control" value="Confirm">
- </div>
- </div>
- <div class="col"></div>
- </div>
- </form>
- </div>
- </body>
- </html>
|