9 changed files with 518 additions and 493 deletions
@ -1,109 +1,14 @@ |
|||||
|
<?php |
||||
<link rel="stylesheet" name="dynamicTableStyle" type="text/css" href="/sys/xform/designer/standardtable/tablestyle/tb_normal_lightweight/standardtable.css"> |
$date = Date('Y-m-d'); |
||||
<table id="fd_3c93363caa751c" formdesign="landray" align="center" class="tb_normal_lightweight" style="width: 98%;" layout2col="undefined" fd_values="{id:"fd_3c93363caa751c",label:"主表",isDefault:"true",tableStyle:"{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_lightweightquot;,quot;tbClassNamequot;:quot;tb_normal_lightweightquot;}"}" fd_type="standardTable" tablestyle="{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_lightweightquot;,quot;tbClassNamequot;:quot;tb_normal_lightweightquot;}"> |
$date1 = Date('Y-m-d', strtotime("$date +1 months")); |
||||
<tbody> |
|
||||
<tr style="height: 30px;"> |
|
||||
<td row="0" column="0" class="td_normal_title" style="width: auto; height: auto;"> </td> |
$a = 1; |
||||
<td row="0" column="1" class="" style=""> </td> |
$b = 12 / $a; |
||||
<td row="0" column="2"> </td> |
for ($i = 0; $i < $b; $i++) { |
||||
</tr> |
$c = $i * $a; |
||||
<tr> |
$date1 = Date('Y-m-d', strtotime("$date + $c months")); |
||||
<td row="1" column="0"> </td> |
echo '<pre>'; |
||||
<td row="1" column="1"> </td> |
print_r($date1); |
||||
<td row="1" column="2"> </td> |
echo '</pre>'; |
||||
</tr> |
} |
||||
<tr style="height: 30px;"> |
|
||||
<td row="2" column="0" class="" style=""><label formdesign="landray" class="xform_new_address" style="display: inline-block; width: 166px;" fd_values="{id:"fd_3c93374e32374e",width:"120",_label_bind:"false",label:"",_label_bind_id:"",_org_person:"true",_orgType:"ORG_TYPE_PERSON",new_addressCustomType:"org",new_address_select_value_id:"",new_address_select_value_name:""}" fd_type="new_address"><input id="fd_3c93374e32374e" class="inputsgl" canshow="true" "="" thousandshow=" true" _readonly="false" style="width:120px" required="false" _required="false" summary="false" ismark="false" tablename="fd_3c93363caa751c" label="" businesstype="addressDialog" multiselect="false" orgtype="ORG_TYPE_PERSON" scope="11" readonly=""><label> <a style="">選擇</a></label></label></td> |
|
||||
<td row="2" column="1"> </td> |
|
||||
<td row="2" column="2"> </td> |
|
||||
</tr> |
|
||||
<tr style="height: 30px;"> |
|
||||
<td row="3" column="0"> |
|
||||
<div formdesign="landray" id="fd_3c9337572bd274" label="" _width="200" class="xform_formula_load" loadtype="" returntype="select" datatype="undefined" scale="0" thousandshow="undefined" displayformat="undefined" controlids="" expression_mode="notRow" fd_values="{id:"fd_3c9337572bd274",_label_bind:"false",label:"",_label_bind_id:"",width:"200",loadType:"",returnType:"select",decimal:"0"}" fd_type="formula_calculation" style="display: inline-flex; width: 215px;"><label class="select_tag_left"><label class="select_tag_right"> <label class="select_tag_face" style="width: 100px;"> --- 請選擇 --- </label> </label></label> <a href="javascript:void(0);" style="white-space: nowrap;">公式加載</a></div> |
|
||||
<div formdesign="landray" id="fd_3c933771241e32" class="xform_dateFormat" canshow="true" tablename="fd_3c93363caa751c" label="" dateformat_mode="notRow" fd_values="{id:"fd_3c933771241e32",width:"200",_label_bind:"false",label:"",_label_bind_id:""}" fd_type="dateFormat" style="display: inline-block; width: 219px;"><input type="text" class="inputsgl" readonly="" style="width: 200px;"></div> |
|
||||
<div formdesign="landray" style="display: inline-block; width: 100%; min-width: 400px;" fd_values="{id:"fd_3c93377a0f1596",tableStyle:"{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_solidborder_radius_bgcolorquot;,quot;tbClassNamequot;:quot;tb_normal_solidborder_radius_bgcolorquot;}"}" fd_type="stageDiagram" tablestyle="{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_solidborder_radius_bgcolorquot;,quot;tbClassNamequot;:quot;tb_normal_solidborder_radius_bgcolorquot;}"> |
|
||||
<div class="lui-flow-rotundity"> |
|
||||
<ul class="lui-flow-rotundity-list"> |
|
||||
<li><span class="spot"></span> |
|
||||
<p class="title"></p> |
|
||||
</li> |
|
||||
<li><span class="spot" style=""></span> |
|
||||
<p class="title"></p> |
|
||||
</li> |
|
||||
<li><span class="spot" style=""></span> |
|
||||
<p class="title"></p> |
|
||||
</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</td> |
|
||||
<td row="3" column="1"> </td> |
|
||||
<td row="3" column="2"> </td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td row="4" column="0"> |
|
||||
<table label="明細表1" id="fd_3c93375a6e8256" formdesign="landray" align="center" class="tb_normal" tablename="fd_3c93363caa751c" style="width: 100%;" data-multihead="false" width="100%" showindex="true" showrow="1" showstatisticrow="undefined" showcopyopt="undefined" dataentrymode="multipleRow" required="undefined" excelexport="undefined" excelimport="undefined" defaultfreezetitle="undefined" defaultfreezecol="undefined" showfold="undefined" layout2col="undefined" fd_values="{cell:"6",_label_bind:"false",label:"明細表1",id:"fd_3c93375a6e8256",width:"100%",showRow:"1",columnIndex:"null"}" fd_type="detailsTable"> |
|
||||
<tbody> |
|
||||
<tr class="tr_normal_title" type="titleRow" style="height: 33px;"> |
|
||||
<td row="0" column="0" align="center" class="td_normal_title" coltype="selectCol" style="width: 15px;"></td> |
|
||||
<td row="0" column="1" align="center" class="td_normal_title" coltype="noTitle" style="width: 25px; white-space: nowrap;"><label attach="fd_3c93375a6e8256">序號</label></td> |
|
||||
<td row="0" column="2" align="center" class="td_normal_title"></td> |
|
||||
<td row="0" column="3" align="center" class="td_normal_title"></td> |
|
||||
<td row="0" column="4" align="center" class="td_normal_title"></td> |
|
||||
<td row="0" column="5" align="center" class="td_normal_title" coltype="blankTitleCol" style="width: 48px;"></td> |
|
||||
</tr> |
|
||||
<tr type="templateRow"> |
|
||||
<td row="1" column="0" align="center" coltype="selectCol" style="width: 15px;"><input type="checkbox" name="DocList_Selected"></td> |
|
||||
<td row="1" column="1" align="center" coltype="noTemplate" style="width: 25px;"><label attach="fd_3c93375a6e8256">1</label></td> |
|
||||
<td row="1" column="2" align="center"></td> |
|
||||
<td row="1" column="3" align="center"></td> |
|
||||
<td row="1" column="4" align="center"></td> |
|
||||
<td row="1" column="5" align="center" coltype="copyCol" style="width: 48px;"> |
|
||||
<nobr><img class="copyIcon" src="style/img/icon_copy.png" title="复制行"> <img class="delIcon" src="style/img/icon_del.png" title="刪除行"> </nobr> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr type="statisticRow"> |
|
||||
<td row="2" column="0" align="center" coltype="selectCol" style="width: 15px;"></td> |
|
||||
<td row="2" column="1" align="center" coltype="noFoot" style="width: 25px;"><label attach="fd_3c93375a6e8256"> </label></td> |
|
||||
<td row="2" column="2" align="center" class="" style=""> |
|
||||
<div formdesign="landray" id="fd_3c933764473d64" enabledfiletype="" fdmulti="true" label="" required="false" isshowdownloadcount="true" othercannotdelete="false" allcannotdelete="false" slidedown="true" widthcontent="undefined" tablename="fd_3c93375a6e8256" fd_values="{id:"fd_3c933764473d64",_label_bind:"true",label:"",_label_bind_id:""}" fd_type="attachment" style="display: inline-block; width: 280px; text-align: left;"> <button onclick="return false;" class="btnopt" style="width: 71px; height: 25px;">上傳</button> <span style="padding-left:8px;display:inline-block">請選擇要上傳的文件</span></div> |
|
||||
<div formdesign="landray" id="fd_3c933766738938" fdmulti="false" hidepicname="false" label="" required="false" width="200" widthcontent="240" height="150" mobilepicdisplaythumb="true" class="lui_upload_img_box" tablename="fd_3c93375a6e8256" fd_values="{width:"200",height:"150",widthContent:"240",id:"fd_3c933766738938",_label_bind:"true",label:"",_label_bind_id:""}" fd_type="docimg" style="display: inline-block; width: 240px;"> |
|
||||
<div class="lui_upload_img_item lui_upload_img" style="width:100%;height:180px;margin: 0px;" align="center"><span class="lui_upload_img_txt" style="width:240px;height:180px;margin: 0px;"><i class="icon icon-plus" style="margin-top:45px"></i>圖片上傳</span></div> |
|
||||
</div> |
|
||||
<div formdesign="landray" id="fd_3c9337682f649c" style="display: inline-block; width: 39px;" fd_values="{id:"fd_3c9337682f649c",_label_bind:"false",label:"",_label_bind_id:""}" fd_type="hidden"><label title="隱藏字段" label="" style="background: url("style/img/hidden.png") no-repeat; width: 24px; height: 24px; display: inline-block;"></label></div> |
|
||||
<div formdesign="landray" id="fd_3c93376b1bdd94" fd_values="{id:"fd_3c93376b1bdd94"}" fd_type="right" style="border: 1px dotted orange; width: 100%; min-height: 18px; padding: 1px; height: auto;"> |
|
||||
<div class="rightIconBar" style="background-color: red; height: 10px; width: 10px; position: relative; cursor: move;"></div> |
|
||||
<table class="righBar" cellpadding="1" style="border-collapse: collapse; border: none; display: none;"> |
|
||||
<tbody> |
|
||||
<tr style="height: 18px;"> |
|
||||
<td style="border: 1px solid red; background-color: rgb(251, 212, 180); width: 36px;"><button type="button" onmousedown="Designer_Control_Right_CancelBubbleFun(event);" class="modeCell" title="只讀" mode_g="view" mode_d="view" ondblclick="Designer_Control_Right_CancelBubbleFun(event);" style="float: left; cursor: pointer; width: 16px; height: 16px; background: url("style/img/right_icon.gif") 0px -48px no-repeat; border: 0px;" onclick="Designer_Control_Right_SetModeCellValue(this);"> </button><button type="button" onmousedown="Designer_Control_Right_CancelBubbleFun(event);" class="defaultCell" title="隨默認權限" ondblclick="Designer_Control_Right_CancelBubbleFun(event);" style="float: right; cursor: pointer; width: 16px; height: 16px; background: url("style/img/right_icon.gif") 0px -80px no-repeat; border: 0px; display: none;" onclick="Designer_Control_Right_SetDefaultCellValue(this);"> </button></td> |
|
||||
<td style="border: 1px solid red; background-color: rgb(251, 212, 180); word-break: keep-all; display: none;"><button type="button" onmousedown="Designer_Control_Right_CancelBubbleFun(event);" class="readerCell" title="未設置讀者" readerids="" readernames="" ondblclick="Designer_Control_Right_CancelBubbleFun(event);" style="cursor:pointer;width:16px;height:16px;background:url(style/img/right_icon.gif) no-repeat 0px -16px;border:0px;" onclick="Designer_Control_Right_SetReaderCellValue(this);"> </button></td> |
|
||||
<td style="border: none; padding: 0px 2px 0px 0px;"> <span ondblclick="Designer_Control_Right_CancelBubbleFun(event); Designer_Control_Right_ShowLabelEditor(this);" style="padding:0;margin:0;border:0;line-height:16px;">權限區段1</span></td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
</div> |
|
||||
</td> |
|
||||
<td row="2" column="3" align="center"> </td> |
|
||||
<td row="2" column="4" align="center"> </td> |
|
||||
<td row="2" column="5" align="center" coltype="emptyCell" style="width: 48px;"><label attach="fd_3c93375a6e8256"> </label></td> |
|
||||
</tr> |
|
||||
<tr type="optRow" class="tr_normal_opt"> |
|
||||
<td row="3" column="0" align="center" coltype="optCol" colspan="6" style=""><label attach="fd_3c93375a6e8256" style="display:none;"> </label> |
|
||||
<div name="tr_normal_opt_content" style="WIDTH: 100%; POSITION: relative; color:#fff;white-space: nowrap;"> |
|
||||
<div name="tr_normal_opt_l" style="POSITION: absolute; LEFT: 0px; TOP: 0px"> |
|
||||
<div style="display:inline-block; line-height: 20px; vertical-align: top;"><input style="position: relative; top: 6px;" type="checkbox" onclick="return false;"><span style="display:inline-block;position: relative;top:2px;margin-left:6px;">全選</span></div><span style="margin-left:15px; display:inline-block; line-height: 20px;"><span style="display:inline-block;width:20px;height:20px;background:url(style/img/normal_opt_sprite.png) no-repeat 0 0;background-position: 0 0;position: relative;top:2px;" "=""></span><span style=" display:inline-block;vertical-align: text-bottom;margin-left:6px;">刪除</span></span> |
|
||||
</div> |
|
||||
<div name="tr_normal_opt_c"><span style="display:inline-block; line-height: 20px;"><span style="display:inline-block;width:20px;height:20px;background:url(style/img/normal_opt_sprite.png) no-repeat 0 0;background-position: -20px 0;position: relative;top:2px;" title="添加行"></span><span style="display:inline-block;vertical-align: text-bottom;margin-left:6px;">添加行</span></span><span style="margin-left:15px; display:inline-block; line-height: 20px;"><span style="display:inline-block;width:20px;height:20px;background:url(style/img/normal_opt_sprite.png) no-repeat 0 0;background-position: -40px 0;position: relative;top:2px;" title="上移"></span><span style="display: inline-block; vertical-align: text-bottom; margin-left: 6px;">上移</span></span><span style="margin-left: 15px; display: inline-block; line-height: 20px;"><span style="display: inline-block; width: 20px; height: 20px; background: url("style/img/normal_opt_sprite.png") -60px 0px no-repeat; position: relative; top: 2px;" title="下移"></span><span style="display:inline-block;vertical-align: text-bottom;margin-left:6px;">下移</span></span></div> |
|
||||
<div name="tr_normal_opt_r" style="POSITION: absolute; RIGHT: 0px; TOP: 0px"><span name="excelExport" style="display: none; line-height: 20px;"><span style="display:inline-block;width:20px;height:20px;background:url(style/img/normal_opt_sprite.png) no-repeat 0 0;background-position: -100px 0; margin-right:6px;position: relative;top:2px;" "=""></span><span style=" display:inline-block;vertical-align: text-bottom;">批量導出</span></span><span name="excelImport" style="margin-left: 15px; display: none; line-height: 20px;"><span style="display:inline-block;width:20px;height:20px;background:url(style/img/normal_opt_sprite.png) no-repeat 0 0;background-position: -80px 0; margin-right:6px;position: relative;top:2px;" "=""></span><span style=" display:inline-block;vertical-align: text-bottom;">批量導入</span></span></div> |
|
||||
</div> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
</td> |
|
||||
<td row="4" column="1"> </td> |
|
||||
<td row="4" column="2"> </td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
|
@ -1,369 +1,371 @@ |
|||||
function tan(ty){ |
function tan(ty) { |
||||
alert('确定添加?'); |
alert('确定添加?'); |
||||
if(ty=='f'){ |
if (ty == 'f') { |
||||
var p= document.getElementById('facility'); |
var p = document.getElementById('facility'); |
||||
var newfacility='<div class="form-group">\n' + |
var newfacility = '<div class="form-group">\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="facilityno">作番号(必填)</label>\n' + |
' <label for="facilityno">作番号(必填)</label>\n' + |
||||
' <input class="form-control facilitynos" type="text" name="facilityno" id="facilityno" required>\n' + |
' <input class="form-control facilitynos" type="text" name="facilityno" id="facilityno" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="weight">重量(必填)</label>\n' + |
' <label for="weight">重量(必填)</label>\n' + |
||||
' <input class="form-control weights " type="text" name="weight" id="weight" onkeyup="if(value<0)value=0;if(value.length>4)value=value.slice(0,4);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control weights " type="text" name="weight" id="weight" onkeyup="if(value<0)value=0;if(value.length>4)value=value.slice(0,4);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="numberofstop">停数(必填)</label>\n' + |
' <label for="numberofstop">停数(必填)</label>\n' + |
||||
' <input class="form-control numberofstops" type="text" name="numberofstop" id="numberofstop" onkeyup="if(value<0)value=0;if(value.length>3)value=value.slice(0,3);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control numberofstops" type="text" name="numberofstop" id="numberofstop" onkeyup="if(value<0)value=0;if(value.length>3)value=value.slice(0,3);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3" >\n' + |
' <div class="col-md-3" >\n' + |
||||
' <label for="numberoffloor">楼层数(必填)</label>\n' + |
' <label for="numberoffloor">楼层数(必填)</label>\n' + |
||||
' <input class="form-control numberoffloors" type="text" name="numberoffloor" id="numberoffloor" onkeyup="if(value<0)value=0;if(value.length>3)value=value.slice(0,3);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control numberoffloors" type="text" name="numberoffloor" id="numberoffloor" onkeyup="if(value<0)value=0;if(value.length>3)value=value.slice(0,3);value=value.replace(/^\\D*(\\d*(?:\\.\\d)?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
' <div class="form-group">\n' + |
' <div class="form-group">\n' + |
||||
' <div class="col-md-3" >\n' + |
' <div class="col-md-3" >\n' + |
||||
' <label for="opentype">开门方式(必填)</label>\n' + |
' <label for="opentype">开门方式(必填)</label>\n' + |
||||
' <Select class="form-control opentypes" name="opentype" id="opentype" required>\n' + |
' <Select class="form-control opentypes" name="opentype" id="opentype" required>\n' + |
||||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
||||
' <Option Value="CO">CO</Option>\n' + |
' <Option Value="CO">CO</Option>\n' + |
||||
' <Option Value="SO">SO</Option>\n' + |
' <Option Value="SO">SO</Option>\n' + |
||||
' <Option Value="CO-SO">CO-SO</Option>\n' + |
' <Option Value="CO-SO">CO-SO</Option>\n' + |
||||
' </Select>\n' + |
' </Select>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="speed">速度(必填)</label>\n' + |
' <label for="speed">速度(必填)</label>\n' + |
||||
' <input class="form-control speeds" type="text" name="speed" id="speed" onkeyup="if(value<0)value=0;if(value.length>4)value=value.slice(0,4);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,1})?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control speeds" type="text" name="speed" id="speed" onkeyup="if(value<0)value=0;if(value.length>4)value=value.slice(0,4);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,1})?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div class="col-md-3">\n' + |
' </div class="col-md-3">\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="repairtype">维修型态(必填)</label>\n' + |
' <label for="repairtype">维修型态(必填)</label>\n' + |
||||
' <Select class="form-control repairtypes" name="repairtype" id="repairtype" required>\n' + |
' <Select class="form-control repairtypes" name="repairtype" id="repairtype" required>\n' + |
||||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
||||
' <Option Value="A">定期保养</Option>\n' + |
' <Option Value="A">定期保养</Option>\n' + |
||||
' <Option Value="B">单次保养</Option>\n' + |
' <Option Value="B">单次保养</Option>\n' + |
||||
' <Option Value="C">单次维修</Option>\n' + |
' <Option Value="C">单次维修</Option>\n' + |
||||
' </Select>\n' + |
' </Select>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="address">地址</label>\n' + |
' <label for="address">地址</label>\n' + |
||||
' <input class="form-control addresss" type="text" name="address" id="address" >\n' + |
' <input class="form-control addresss" type="text" name="address" id="address" >\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
' <div class="form-group">\n' + |
' <div class="form-group">\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="longitude">经度(必填)</label>\n' + |
' <label for="longitude">经度(必填)</label>\n' + |
||||
' <input class="form-control longitudes" type="text" name="longitude" id="longitude" onkeyup="if(value<0)value=0;if(value.length>11)value=value.slice(0,11);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,7})?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control longitudes" type="text" name="longitude" id="longitude" onkeyup="if(value<0)value=0;if(value.length>11)value=value.slice(0,11);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,7})?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="latitude">纬度(必填)</label>\n' + |
' <label for="latitude">纬度(必填)</label>\n' + |
||||
' <input class="form-control latitudes" type="latitude" name="latitude" id="latitude" onkeyup="if(value<0)value=0;if(value.length>11)value=value.slice(0,11);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,7})?).*$/g, \'$1\')" required>\n' + |
' <input class="form-control latitudes" type="latitude" name="latitude" id="latitude" onkeyup="if(value<0)value=0;if(value.length>11)value=value.slice(0,11);value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,7})?).*$/g, \'$1\')" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
'\n' + |
'\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="repairerid">维修人员工号(必填)</label>\n' + |
' <label for="repairerid">维修人员工号(必填)</label>\n' + |
||||
' <input class="form-control repairerids" type="text" name="repairerid" id="repairerid" required>\n' + |
' <input class="form-control repairerids" type="text" name="repairerid" id="repairerid" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="repairername">维修人员姓名(必填)</label>\n' + |
' <label for="repairername">维修人员姓名(必填)</label>\n' + |
||||
' <input class="form-control repairernames" type="text" name="repairername" id="repairername" required>\n' + |
' <input class="form-control repairernames" type="text" name="repairername" id="repairername" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>' |
' </div>' |
||||
p.innerHTML+=newfacility; |
p.innerHTML += newfacility; |
||||
|
|
||||
}else if(ty=='s'){ |
} else if (ty == 's') { |
||||
var s= document.getElementById('schedule'); |
var s = document.getElementById('schedule'); |
||||
var newschedule='<div class="form-group" >\n' + |
var newschedule = '<div class="form-group" >\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="facilityno">作番号(必填)</label>\n' + |
' <label for="facilityno">作番号(必填)</label>\n' + |
||||
' <input class="form-control facilitynos" type="text" id="facilityno" required>\n' + |
' <input class="form-control facilitynos" type="text" id="facilityno" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-2">\n' + |
' <div class="col-md-2">\n' + |
||||
' <label for="combono">保养套餐编号(必填)</label>\n' + |
' <label for="combono">保养套餐编号(必填)</label>\n' + |
||||
' <input class="form-control combonos" type="text" id="combono" required>\n' + |
' <input class="form-control combonos" type="text" id="combono" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
' <div class="col-md-2">\n' + |
' <div class="col-md-2">\n' + |
||||
' <label for="duedate">应保养日期(必填)</label>\n' + |
' <label for="duedate">应保养日期(必填)</label>\n' + |
||||
' <input class="form-control duedates" type="text " id="duedate" required>\n' + |
' <input class="form-control duedates" type="text " id="duedate" required>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
' <div class="col-md-2">\n' + |
' <div class="col-md-2">\n' + |
||||
' <label for="repairerid">保养人员工号(必填)</label>\n' + |
' <label for="repairerid">保养人员工号(必填)</label>\n' + |
||||
' <input class="form-control repairerids" type="text" id="repairerid" required>\n' + |
' <input class="form-control repairerids" type="text" id="repairerid" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' <div class="col-md-3">\n' + |
' <div class="col-md-3">\n' + |
||||
' <label for="repairername">保养人员姓名(必填)</label>\n' + |
' <label for="repairername">保养人员姓名(必填)</label>\n' + |
||||
' <input class="form-control repairernames" type="text" id="repairername" required>\n' + |
' <input class="form-control repairernames" type="text" id="repairername" required>\n' + |
||||
' </div>\n' + |
' </div>\n' + |
||||
'\n' + |
'\n' + |
||||
' </div>' |
' </div>' |
||||
s.innerHTML+=newschedule; |
s.innerHTML += newschedule; |
||||
}else{ |
} else { |
||||
alert('非法操作') |
alert('非法操作') |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
function tijiao(){ |
function tijiao() { |
||||
//作番号
|
//作番号
|
||||
var facilitynoslist = []; |
var facilitynoslist = []; |
||||
$(".facilitynos").each(function () { |
$(".facilitynos").each(function () { |
||||
facilitynoslist.push($(this).val()); |
facilitynoslist.push($(this).val()); |
||||
}); |
}); |
||||
console.log('11111'); |
console.log('11111'); |
||||
console.log(facilitynoslist); |
console.log(facilitynoslist); |
||||
console.log('22222'); |
console.log('22222'); |
||||
|
|
||||
console.log('数据'); |
console.log('数据'); |
||||
|
|
||||
|
|
||||
//重量
|
//重量
|
||||
var weightslist = []; |
var weightslist = []; |
||||
$(".weights").each(function () { |
$(".weights").each(function () { |
||||
weightslist.push($(this).val()); |
weightslist.push($(this).val()); |
||||
}); |
}); |
||||
//停数
|
//停数
|
||||
var numberofstopslist=[]; |
var numberofstopslist = []; |
||||
$(".numberofstops").each(function () { |
$(".numberofstops").each(function () { |
||||
numberofstopslist.push($(this).val()); |
numberofstopslist.push($(this).val()); |
||||
}); |
}); |
||||
//楼层数
|
//楼层数
|
||||
var numberoffloorslist=[]; |
var numberoffloorslist = []; |
||||
$(".numberoffloors").each(function () { |
$(".numberoffloors").each(function () { |
||||
numberoffloorslist.push($(this).val()); |
numberoffloorslist.push($(this).val()); |
||||
}); |
}); |
||||
//开门方式
|
//开门方式
|
||||
var opentypeslist=[]; |
var opentypeslist = []; |
||||
$(".opentypes").each(function () { |
$(".opentypes").each(function () { |
||||
opentypeslist.push($(this).val()); |
opentypeslist.push($(this).val()); |
||||
}); |
}); |
||||
//速度
|
//速度
|
||||
var speedslist=[]; |
var speedslist = []; |
||||
$(".speeds").each(function () { |
$(".speeds").each(function () { |
||||
speedslist.push($(this).val()); |
speedslist.push($(this).val()); |
||||
}); |
}); |
||||
//维护形态
|
//维护形态
|
||||
var repairtypeslist=[]; |
var repairtypeslist = []; |
||||
$(".repairtypes").each(function () { |
$(".repairtypes").each(function () { |
||||
repairtypeslist.push($(this).val()); |
repairtypeslist.push($(this).val()); |
||||
}); |
}); |
||||
//地址
|
//地址
|
||||
var addressslist=[]; |
var addressslist = []; |
||||
$(".addresss").each(function () { |
$(".addresss").each(function () { |
||||
addressslist.push($(this).val()); |
addressslist.push($(this).val()); |
||||
}); |
}); |
||||
//经度
|
//经度
|
||||
var longitudeslist=[]; |
var longitudeslist = []; |
||||
$(".longitudes").each(function () { |
$(".longitudes").each(function () { |
||||
longitudeslist.push($(this).val()); |
longitudeslist.push($(this).val()); |
||||
}); |
}); |
||||
//维度
|
//维度
|
||||
var latitudeslist=[]; |
var latitudeslist = []; |
||||
$(".latitudes").each(function () { |
$(".latitudes").each(function () { |
||||
latitudeslist.push($(this).val()); |
latitudeslist.push($(this).val()); |
||||
}); |
}); |
||||
//维护工号
|
//维护工号
|
||||
var repaireridslist=[]; |
var repaireridslist = []; |
||||
$(".repairerids").each(function () { |
$(".repairerids").each(function () { |
||||
repaireridslist.push($(this).val()); |
repaireridslist.push($(this).val()); |
||||
}); |
}); |
||||
//维护人员姓名
|
//维护人员姓名
|
||||
var repairernameslist=[]; |
var repairernameslist = []; |
||||
$(".repairernames").each(function () { |
$(".repairernames").each(function () { |
||||
repairernameslist.push($(this).val()); |
repairernameslist.push($(this).val()); |
||||
}); |
}); |
||||
|
|
||||
//合约号
|
//合约号
|
||||
var contractno = $('.contractno').val(); |
var contractno = $('.contractno').val(); |
||||
//客户编号
|
//客户编号
|
||||
var customerid = $('.customerid').val(); |
var customerid = $('.customerid').val(); |
||||
//建档人
|
//建档人
|
||||
var creater = $('.creater').val(); |
var creater = $('.creater').val(); |
||||
//创建时间
|
//创建时间
|
||||
var create_at = $('.create_at').val(); |
var create_at = $('.create_at').val(); |
||||
var type = $('.type').val(); |
var type = $('.type').val(); |
||||
var url = "facilityapi.php"; |
var url = "facilityapi.php"; |
||||
|
|
||||
//提交创建
|
//提交创建
|
||||
$.ajax({ |
$.ajax({ |
||||
method: 'post', |
method: 'post', |
||||
url: url, |
url: url, |
||||
data: { |
data: { |
||||
facilitynos: JSON.stringify(facilitynoslist), |
facilitynos: JSON.stringify(facilitynoslist), |
||||
weights: JSON.stringify(weightslist), |
weights: JSON.stringify(weightslist), |
||||
numberofstops:JSON.stringify(numberofstopslist), |
numberofstops: JSON.stringify(numberofstopslist), |
||||
numberoffloors:JSON.stringify(numberoffloorslist), |
numberoffloors: JSON.stringify(numberoffloorslist), |
||||
opentypes:JSON.stringify(opentypeslist), |
opentypes: JSON.stringify(opentypeslist), |
||||
speeds:JSON.stringify(speedslist), |
speeds: JSON.stringify(speedslist), |
||||
repairtypes:JSON.stringify(repairtypeslist), |
repairtypes: JSON.stringify(repairtypeslist), |
||||
addresss:JSON.stringify(addressslist), |
addresss: JSON.stringify(addressslist), |
||||
longitudes:JSON.stringify(longitudeslist), |
longitudes: JSON.stringify(longitudeslist), |
||||
latitudes:JSON.stringify(latitudeslist), |
latitudes: JSON.stringify(latitudeslist), |
||||
repairerids:JSON.stringify(repaireridslist), |
repairerids: JSON.stringify(repaireridslist), |
||||
repairernames:JSON.stringify(repairernameslist), |
repairernames: JSON.stringify(repairernameslist), |
||||
type:type, |
type: type, |
||||
contractno:contractno, |
contractno: contractno, |
||||
customerid:customerid, |
customerid: customerid, |
||||
creater:creater, |
creater: creater, |
||||
create_at:create_at |
create_at: create_at |
||||
}, |
}, |
||||
success: function (data) { |
success: function (data) { |
||||
|
|
||||
var res=eval('('+data+')'); |
var res = eval('(' + data + ')'); |
||||
if(res.code=='200'){ |
if (res.code == '200') { |
||||
window.location.href='custom-create-schedule.php?accountid='+customerid+'&contractno='+contractno; |
window.location.href = 'custom-create-schedule.php?accountid=' + customerid + '&contractno=' + contractno; |
||||
}else{ |
} else { |
||||
alert('添加失败'); |
alert('添加失败'); |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
}); |
}); |
||||
|
|
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
function tijiaosch(){ |
function tijiaosch() { |
||||
|
|
||||
//作番号
|
//作番号
|
||||
var facilitynoslist = []; |
var facilitynoslist = []; |
||||
$(".facilitynos").each(function () { |
$(".facilitynos").each(function () { |
||||
facilitynoslist.push($(this).val()); |
facilitynoslist.push($(this).val()); |
||||
}); |
}); |
||||
//保养套餐
|
//保养套餐
|
||||
var combonoslist=[]; |
var combonoslist = []; |
||||
$(".combonos").each(function () { |
$(".combonos").each(function () { |
||||
combonoslist.push($(this).val()); |
combonoslist.push($(this).val()); |
||||
}); |
}); |
||||
|
|
||||
//保养日期duedates
|
//保养日期duedates
|
||||
var duedateslist=[]; |
var duedateslist = []; |
||||
$(".duedates").each(function () { |
$(".duedates").each(function () { |
||||
duedateslist.push($(this).val()); |
duedateslist.push($(this).val()); |
||||
}); |
}); |
||||
|
|
||||
//保养工号
|
//保养工号
|
||||
var repaireridslist=[]; |
var repaireridslist = []; |
||||
$(".repairerids").each(function () { |
$(".repairerids").each(function () { |
||||
repaireridslist.push($(this).val()); |
repaireridslist.push($(this).val()); |
||||
}); |
}); |
||||
//保养人姓名
|
//保养人姓名
|
||||
var repairernameslist=[]; |
var repairernameslist = []; |
||||
$(".repairernames").each(function () { |
$(".repairernames").each(function () { |
||||
repairernameslist.push($(this).val()); |
repairernameslist.push($(this).val()); |
||||
}); |
}); |
||||
|
|
||||
//合约号
|
//合约号
|
||||
var contractno = $('.contractno').val(); |
var contractno = $('.contractno').val(); |
||||
//建档人
|
//建档人
|
||||
var creater = $('.creater').val(); |
var creater = $('.creater').val(); |
||||
//创建时间
|
//创建时间
|
||||
var create_at = $('.create_at').val(); |
var create_at = $('.create_at').val(); |
||||
var type = $('.type').val(); |
var type = $('.type').val(); |
||||
var url = "scheduleapi.php"; |
var url = "scheduleapi.php"; |
||||
|
|
||||
//提交创建
|
//提交创建
|
||||
$.ajax({ |
$.ajax({ |
||||
method: 'post', |
method: 'post', |
||||
url: url, |
url: url, |
||||
data: { |
data: { |
||||
facilitynos: JSON.stringify(facilitynoslist), |
facilitynos: JSON.stringify(facilitynoslist), |
||||
combonos:JSON.stringify(combonoslist), |
combonos: JSON.stringify(combonoslist), |
||||
duedates:JSON.stringify(duedateslist), |
duedates: JSON.stringify(duedateslist), |
||||
repairerids:JSON.stringify(repaireridslist), |
repairerids: JSON.stringify(repaireridslist), |
||||
repairernames:JSON.stringify(repairernameslist), |
repairernames: JSON.stringify(repairernameslist), |
||||
type:type, |
type: type, |
||||
contractno:contractno, |
contractno: contractno, |
||||
creater:creater, |
creater: creater, |
||||
create_at:create_at |
create_at: create_at |
||||
}, |
}, |
||||
success: function (data) { |
success: function (data) { |
||||
var res=eval('('+data+')'); |
var res = eval('(' + data + ')'); |
||||
if(res.code=='200'){ |
if (res.code == '200') { |
||||
window.location.href='index.php'; |
window.location.href = 'index.php'; |
||||
}else{ |
} else { |
||||
alert('添加失败,请检查数据'); |
alert('添加失败,请检查数据'); |
||||
} |
} |
||||
|
|
||||
} |
} |
||||
}); |
}); |
||||
|
|
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
function show(id){ |
function show(id) { |
||||
//removeClass
|
//removeClass
|
||||
var t = document.getElementById('account');//选取id为test的div元素
|
var t = document.getElementById('account');//选取id为test的div元素
|
||||
t.style.display = 'none';// 隐藏选择的元素
|
t.style.display = 'none';// 隐藏选择的元素
|
||||
t.style.display = 'block';// 以块级样式显示
|
t.style.display = 'block';// 以块级样式显示
|
||||
} |
} |
||||
|
|
||||
function login(){ |
function login() { |
||||
var account = $('.account').val(); |
var account = $('.account').val(); |
||||
var password = $('.password').val(); |
var password = $('.password').val(); |
||||
var url = "loginapi.php"; |
var url = "loginapi.php"; |
||||
$.ajax({ |
$.ajax({ |
||||
method: 'post', |
method: 'post', |
||||
url: url, |
url: url, |
||||
data: { |
data: { |
||||
account:account, |
account: account, |
||||
password:password |
password: password |
||||
}, |
}, |
||||
success: function (data) { |
success: function (data) { |
||||
console.log('返回的结果'); |
// console.log(data);
|
||||
res=eval("("+data+")"); |
console.log('返回的结果'); |
||||
console.log(res); |
res = eval("(" + data + ")"); |
||||
console.log(window.location.host); |
// console.log(res);
|
||||
console.log(res.code); |
// console.log(window.location.host);
|
||||
if(res.code=='200'){ |
// console.log(res.code);
|
||||
var token=res.token; |
if (res.code == '200') { |
||||
var name=res.name; |
var token = res.token; |
||||
var login=res.login; |
var name = res.name; |
||||
var menu=res.menu; |
var login = res.login; |
||||
//console.log(token);
|
var menu = res.menu; |
||||
//window.localStorage.setItem("token",token);
|
//console.log(token);
|
||||
//window.localStorage.setItem("name",name);
|
//window.localStorage.setItem("token",token);
|
||||
//window.localStorage.setItem("login",login);
|
//window.localStorage.setItem("name",name);
|
||||
window.localStorage.setItem("menu_"+res.uid,menu); |
//window.localStorage.setItem("login",login);
|
||||
window.location.href='index.php?token='+token; |
window.localStorage.setItem("menu_" + res.uid, menu); |
||||
}else{ |
window.location.href = 'index.php?token=' + token; |
||||
window.location.href='login.php?errno=1'; |
} else { |
||||
} |
window.location.href = 'login.php?errno=1'; |
||||
|
|
||||
|
} |
||||
} |
|
||||
}); |
|
||||
|
} |
||||
} |
}); |
||||
|
|
||||
function settoken(v){ |
} |
||||
window.localStorage.setItem("token",v); |
|
||||
} |
function settoken(v) { |
||||
|
window.localStorage.setItem("token", v); |
||||
function gettoken(v){ |
} |
||||
window.localStorage.getItem("token"); |
|
||||
} |
function gettoken(v) { |
||||
|
window.localStorage.getItem("token"); |
||||
function tttt(){ |
} |
||||
//alert('無權限操作');
|
|
||||
return "err"; |
function tttt() { |
||||
|
//alert('無權限操作');
|
||||
|
return "err"; |
||||
} |
} |
Loading…
Reference in new issue