9 changed files with 518 additions and 493 deletions
@ -1,109 +1,14 @@ |
|||
|
|||
<link rel="stylesheet" name="dynamicTableStyle" type="text/css" href="/sys/xform/designer/standardtable/tablestyle/tb_normal_lightweight/standardtable.css"> |
|||
<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;}"> |
|||
<tbody> |
|||
<tr style="height: 30px;"> |
|||
<td row="0" column="0" class="td_normal_title" style="width: auto; height: auto;"> </td> |
|||
<td row="0" column="1" class="" style=""> </td> |
|||
<td row="0" column="2"> </td> |
|||
</tr> |
|||
<tr> |
|||
<td row="1" column="0"> </td> |
|||
<td row="1" column="1"> </td> |
|||
<td row="1" column="2"> </td> |
|||
</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> |
|||
<?php |
|||
$date = Date('Y-m-d'); |
|||
$date1 = Date('Y-m-d', strtotime("$date +1 months")); |
|||
|
|||
|
|||
$a = 1; |
|||
$b = 12 / $a; |
|||
for ($i = 0; $i < $b; $i++) { |
|||
$c = $i * $a; |
|||
$date1 = Date('Y-m-d', strtotime("$date + $c months")); |
|||
echo '<pre>'; |
|||
print_r($date1); |
|||
echo '</pre>'; |
|||
} |
|||
|
@ -1,369 +1,371 @@ |
|||
function tan(ty){ |
|||
alert('确定添加?'); |
|||
if(ty=='f'){ |
|||
var p= document.getElementById('facility'); |
|||
var newfacility='<div class="form-group">\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="facilityno">作番号(必填)</label>\n' + |
|||
' <input class="form-control facilitynos" type="text" name="facilityno" id="facilityno" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3" >\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' </div>\n' + |
|||
' <div class="form-group">\n' + |
|||
' <div class="col-md-3" >\n' + |
|||
' <label for="opentype">开门方式(必填)</label>\n' + |
|||
' <Select class="form-control opentypes" name="opentype" id="opentype" required>\n' + |
|||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
|||
' <Option Value="CO">CO</Option>\n' + |
|||
' <Option Value="SO">SO</Option>\n' + |
|||
' <Option Value="CO-SO">CO-SO</Option>\n' + |
|||
' </Select>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div class="col-md-3">\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairtype">维修型态(必填)</label>\n' + |
|||
' <Select class="form-control repairtypes" name="repairtype" id="repairtype" required>\n' + |
|||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
|||
' <Option Value="A">定期保养</Option>\n' + |
|||
' <Option Value="B">单次保养</Option>\n' + |
|||
' <Option Value="C">单次维修</Option>\n' + |
|||
' </Select>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="address">地址</label>\n' + |
|||
' <input class="form-control addresss" type="text" name="address" id="address" >\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' <div class="form-group">\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
'\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairerid">维修人员工号(必填)</label>\n' + |
|||
' <input class="form-control repairerids" type="text" name="repairerid" id="repairerid" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairername">维修人员姓名(必填)</label>\n' + |
|||
' <input class="form-control repairernames" type="text" name="repairername" id="repairername" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>' |
|||
p.innerHTML+=newfacility; |
|||
|
|||
}else if(ty=='s'){ |
|||
var s= document.getElementById('schedule'); |
|||
var newschedule='<div class="form-group" >\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="facilityno">作番号(必填)</label>\n' + |
|||
' <input class="form-control facilitynos" type="text" id="facilityno" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="combono">保养套餐编号(必填)</label>\n' + |
|||
' <input class="form-control combonos" type="text" id="combono" required>\n' + |
|||
' </div>\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="duedate">应保养日期(必填)</label>\n' + |
|||
' <input class="form-control duedates" type="text " id="duedate" required>\n' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="repairerid">保养人员工号(必填)</label>\n' + |
|||
' <input class="form-control repairerids" type="text" id="repairerid" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairername">保养人员姓名(必填)</label>\n' + |
|||
' <input class="form-control repairernames" type="text" id="repairername" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>' |
|||
s.innerHTML+=newschedule; |
|||
}else{ |
|||
alert('非法操作') |
|||
} |
|||
} |
|||
|
|||
function tijiao(){ |
|||
//作番号
|
|||
var facilitynoslist = []; |
|||
$(".facilitynos").each(function () { |
|||
facilitynoslist.push($(this).val()); |
|||
}); |
|||
console.log('11111'); |
|||
console.log(facilitynoslist); |
|||
console.log('22222'); |
|||
|
|||
console.log('数据'); |
|||
|
|||
|
|||
//重量
|
|||
var weightslist = []; |
|||
$(".weights").each(function () { |
|||
weightslist.push($(this).val()); |
|||
}); |
|||
//停数
|
|||
var numberofstopslist=[]; |
|||
$(".numberofstops").each(function () { |
|||
numberofstopslist.push($(this).val()); |
|||
}); |
|||
//楼层数
|
|||
var numberoffloorslist=[]; |
|||
$(".numberoffloors").each(function () { |
|||
numberoffloorslist.push($(this).val()); |
|||
}); |
|||
//开门方式
|
|||
var opentypeslist=[]; |
|||
$(".opentypes").each(function () { |
|||
opentypeslist.push($(this).val()); |
|||
}); |
|||
//速度
|
|||
var speedslist=[]; |
|||
$(".speeds").each(function () { |
|||
speedslist.push($(this).val()); |
|||
}); |
|||
//维护形态
|
|||
var repairtypeslist=[]; |
|||
$(".repairtypes").each(function () { |
|||
repairtypeslist.push($(this).val()); |
|||
}); |
|||
//地址
|
|||
var addressslist=[]; |
|||
$(".addresss").each(function () { |
|||
addressslist.push($(this).val()); |
|||
}); |
|||
//经度
|
|||
var longitudeslist=[]; |
|||
$(".longitudes").each(function () { |
|||
longitudeslist.push($(this).val()); |
|||
}); |
|||
//维度
|
|||
var latitudeslist=[]; |
|||
$(".latitudes").each(function () { |
|||
latitudeslist.push($(this).val()); |
|||
}); |
|||
//维护工号
|
|||
var repaireridslist=[]; |
|||
$(".repairerids").each(function () { |
|||
repaireridslist.push($(this).val()); |
|||
}); |
|||
//维护人员姓名
|
|||
var repairernameslist=[]; |
|||
$(".repairernames").each(function () { |
|||
repairernameslist.push($(this).val()); |
|||
}); |
|||
|
|||
//合约号
|
|||
var contractno = $('.contractno').val(); |
|||
//客户编号
|
|||
var customerid = $('.customerid').val(); |
|||
//建档人
|
|||
var creater = $('.creater').val(); |
|||
//创建时间
|
|||
var create_at = $('.create_at').val(); |
|||
var type = $('.type').val(); |
|||
var url = "facilityapi.php"; |
|||
|
|||
//提交创建
|
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
facilitynos: JSON.stringify(facilitynoslist), |
|||
weights: JSON.stringify(weightslist), |
|||
numberofstops:JSON.stringify(numberofstopslist), |
|||
numberoffloors:JSON.stringify(numberoffloorslist), |
|||
opentypes:JSON.stringify(opentypeslist), |
|||
speeds:JSON.stringify(speedslist), |
|||
repairtypes:JSON.stringify(repairtypeslist), |
|||
addresss:JSON.stringify(addressslist), |
|||
longitudes:JSON.stringify(longitudeslist), |
|||
latitudes:JSON.stringify(latitudeslist), |
|||
repairerids:JSON.stringify(repaireridslist), |
|||
repairernames:JSON.stringify(repairernameslist), |
|||
type:type, |
|||
contractno:contractno, |
|||
customerid:customerid, |
|||
creater:creater, |
|||
create_at:create_at |
|||
}, |
|||
success: function (data) { |
|||
|
|||
var res=eval('('+data+')'); |
|||
if(res.code=='200'){ |
|||
window.location.href='custom-create-schedule.php?accountid='+customerid+'&contractno='+contractno; |
|||
}else{ |
|||
alert('添加失败'); |
|||
} |
|||
|
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
function tijiaosch(){ |
|||
|
|||
//作番号
|
|||
var facilitynoslist = []; |
|||
$(".facilitynos").each(function () { |
|||
facilitynoslist.push($(this).val()); |
|||
}); |
|||
//保养套餐
|
|||
var combonoslist=[]; |
|||
$(".combonos").each(function () { |
|||
combonoslist.push($(this).val()); |
|||
}); |
|||
|
|||
//保养日期duedates
|
|||
var duedateslist=[]; |
|||
$(".duedates").each(function () { |
|||
duedateslist.push($(this).val()); |
|||
}); |
|||
|
|||
//保养工号
|
|||
var repaireridslist=[]; |
|||
$(".repairerids").each(function () { |
|||
repaireridslist.push($(this).val()); |
|||
}); |
|||
//保养人姓名
|
|||
var repairernameslist=[]; |
|||
$(".repairernames").each(function () { |
|||
repairernameslist.push($(this).val()); |
|||
}); |
|||
|
|||
//合约号
|
|||
var contractno = $('.contractno').val(); |
|||
//建档人
|
|||
var creater = $('.creater').val(); |
|||
//创建时间
|
|||
var create_at = $('.create_at').val(); |
|||
var type = $('.type').val(); |
|||
var url = "scheduleapi.php"; |
|||
|
|||
//提交创建
|
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
facilitynos: JSON.stringify(facilitynoslist), |
|||
combonos:JSON.stringify(combonoslist), |
|||
duedates:JSON.stringify(duedateslist), |
|||
repairerids:JSON.stringify(repaireridslist), |
|||
repairernames:JSON.stringify(repairernameslist), |
|||
type:type, |
|||
contractno:contractno, |
|||
creater:creater, |
|||
create_at:create_at |
|||
}, |
|||
success: function (data) { |
|||
var res=eval('('+data+')'); |
|||
if(res.code=='200'){ |
|||
window.location.href='index.php'; |
|||
}else{ |
|||
alert('添加失败,请检查数据'); |
|||
} |
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
function show(id){ |
|||
//removeClass
|
|||
var t = document.getElementById('account');//选取id为test的div元素
|
|||
t.style.display = 'none';// 隐藏选择的元素
|
|||
t.style.display = 'block';// 以块级样式显示
|
|||
} |
|||
|
|||
function login(){ |
|||
var account = $('.account').val(); |
|||
var password = $('.password').val(); |
|||
var url = "loginapi.php"; |
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
account:account, |
|||
password:password |
|||
}, |
|||
success: function (data) { |
|||
console.log('返回的结果'); |
|||
res=eval("("+data+")"); |
|||
console.log(res); |
|||
console.log(window.location.host); |
|||
console.log(res.code); |
|||
if(res.code=='200'){ |
|||
var token=res.token; |
|||
var name=res.name; |
|||
var login=res.login; |
|||
var menu=res.menu; |
|||
//console.log(token);
|
|||
//window.localStorage.setItem("token",token);
|
|||
//window.localStorage.setItem("name",name);
|
|||
//window.localStorage.setItem("login",login);
|
|||
window.localStorage.setItem("menu_"+res.uid,menu); |
|||
window.location.href='index.php?token='+token; |
|||
}else{ |
|||
window.location.href='login.php?errno=1'; |
|||
} |
|||
|
|||
|
|||
} |
|||
}); |
|||
|
|||
} |
|||
|
|||
function settoken(v){ |
|||
window.localStorage.setItem("token",v); |
|||
} |
|||
|
|||
function gettoken(v){ |
|||
window.localStorage.getItem("token"); |
|||
} |
|||
|
|||
function tttt(){ |
|||
//alert('無權限操作');
|
|||
return "err"; |
|||
function tan(ty) { |
|||
alert('确定添加?'); |
|||
if (ty == 'f') { |
|||
var p = document.getElementById('facility'); |
|||
var newfacility = '<div class="form-group">\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="facilityno">作番号(必填)</label>\n' + |
|||
' <input class="form-control facilitynos" type="text" name="facilityno" id="facilityno" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3" >\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' </div>\n' + |
|||
' <div class="form-group">\n' + |
|||
' <div class="col-md-3" >\n' + |
|||
' <label for="opentype">开门方式(必填)</label>\n' + |
|||
' <Select class="form-control opentypes" name="opentype" id="opentype" required>\n' + |
|||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
|||
' <Option Value="CO">CO</Option>\n' + |
|||
' <Option Value="SO">SO</Option>\n' + |
|||
' <Option Value="CO-SO">CO-SO</Option>\n' + |
|||
' </Select>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div class="col-md-3">\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairtype">维修型态(必填)</label>\n' + |
|||
' <Select class="form-control repairtypes" name="repairtype" id="repairtype" required>\n' + |
|||
' <option selected="selected" disabled="disabled" style="display: none" value=""></option>\n' + |
|||
' <Option Value="A">定期保养</Option>\n' + |
|||
' <Option Value="B">单次保养</Option>\n' + |
|||
' <Option Value="C">单次维修</Option>\n' + |
|||
' </Select>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="address">地址</label>\n' + |
|||
' <input class="form-control addresss" type="text" name="address" id="address" >\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' <div class="form-group">\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\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' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
'\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairerid">维修人员工号(必填)</label>\n' + |
|||
' <input class="form-control repairerids" type="text" name="repairerid" id="repairerid" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairername">维修人员姓名(必填)</label>\n' + |
|||
' <input class="form-control repairernames" type="text" name="repairername" id="repairername" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>' |
|||
p.innerHTML += newfacility; |
|||
|
|||
} else if (ty == 's') { |
|||
var s = document.getElementById('schedule'); |
|||
var newschedule = '<div class="form-group" >\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="facilityno">作番号(必填)</label>\n' + |
|||
' <input class="form-control facilitynos" type="text" id="facilityno" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="combono">保养套餐编号(必填)</label>\n' + |
|||
' <input class="form-control combonos" type="text" id="combono" required>\n' + |
|||
' </div>\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="duedate">应保养日期(必填)</label>\n' + |
|||
' <input class="form-control duedates" type="text " id="duedate" required>\n' + |
|||
'\n' + |
|||
' </div>\n' + |
|||
' <div class="col-md-2">\n' + |
|||
' <label for="repairerid">保养人员工号(必填)</label>\n' + |
|||
' <input class="form-control repairerids" type="text" id="repairerid" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' <div class="col-md-3">\n' + |
|||
' <label for="repairername">保养人员姓名(必填)</label>\n' + |
|||
' <input class="form-control repairernames" type="text" id="repairername" required>\n' + |
|||
' </div>\n' + |
|||
'\n' + |
|||
' </div>' |
|||
s.innerHTML += newschedule; |
|||
} else { |
|||
alert('非法操作') |
|||
} |
|||
} |
|||
|
|||
function tijiao() { |
|||
//作番号
|
|||
var facilitynoslist = []; |
|||
$(".facilitynos").each(function () { |
|||
facilitynoslist.push($(this).val()); |
|||
}); |
|||
console.log('11111'); |
|||
console.log(facilitynoslist); |
|||
console.log('22222'); |
|||
|
|||
console.log('数据'); |
|||
|
|||
|
|||
//重量
|
|||
var weightslist = []; |
|||
$(".weights").each(function () { |
|||
weightslist.push($(this).val()); |
|||
}); |
|||
//停数
|
|||
var numberofstopslist = []; |
|||
$(".numberofstops").each(function () { |
|||
numberofstopslist.push($(this).val()); |
|||
}); |
|||
//楼层数
|
|||
var numberoffloorslist = []; |
|||
$(".numberoffloors").each(function () { |
|||
numberoffloorslist.push($(this).val()); |
|||
}); |
|||
//开门方式
|
|||
var opentypeslist = []; |
|||
$(".opentypes").each(function () { |
|||
opentypeslist.push($(this).val()); |
|||
}); |
|||
//速度
|
|||
var speedslist = []; |
|||
$(".speeds").each(function () { |
|||
speedslist.push($(this).val()); |
|||
}); |
|||
//维护形态
|
|||
var repairtypeslist = []; |
|||
$(".repairtypes").each(function () { |
|||
repairtypeslist.push($(this).val()); |
|||
}); |
|||
//地址
|
|||
var addressslist = []; |
|||
$(".addresss").each(function () { |
|||
addressslist.push($(this).val()); |
|||
}); |
|||
//经度
|
|||
var longitudeslist = []; |
|||
$(".longitudes").each(function () { |
|||
longitudeslist.push($(this).val()); |
|||
}); |
|||
//维度
|
|||
var latitudeslist = []; |
|||
$(".latitudes").each(function () { |
|||
latitudeslist.push($(this).val()); |
|||
}); |
|||
//维护工号
|
|||
var repaireridslist = []; |
|||
$(".repairerids").each(function () { |
|||
repaireridslist.push($(this).val()); |
|||
}); |
|||
//维护人员姓名
|
|||
var repairernameslist = []; |
|||
$(".repairernames").each(function () { |
|||
repairernameslist.push($(this).val()); |
|||
}); |
|||
|
|||
//合约号
|
|||
var contractno = $('.contractno').val(); |
|||
//客户编号
|
|||
var customerid = $('.customerid').val(); |
|||
//建档人
|
|||
var creater = $('.creater').val(); |
|||
//创建时间
|
|||
var create_at = $('.create_at').val(); |
|||
var type = $('.type').val(); |
|||
var url = "facilityapi.php"; |
|||
|
|||
//提交创建
|
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
facilitynos: JSON.stringify(facilitynoslist), |
|||
weights: JSON.stringify(weightslist), |
|||
numberofstops: JSON.stringify(numberofstopslist), |
|||
numberoffloors: JSON.stringify(numberoffloorslist), |
|||
opentypes: JSON.stringify(opentypeslist), |
|||
speeds: JSON.stringify(speedslist), |
|||
repairtypes: JSON.stringify(repairtypeslist), |
|||
addresss: JSON.stringify(addressslist), |
|||
longitudes: JSON.stringify(longitudeslist), |
|||
latitudes: JSON.stringify(latitudeslist), |
|||
repairerids: JSON.stringify(repaireridslist), |
|||
repairernames: JSON.stringify(repairernameslist), |
|||
type: type, |
|||
contractno: contractno, |
|||
customerid: customerid, |
|||
creater: creater, |
|||
create_at: create_at |
|||
}, |
|||
success: function (data) { |
|||
|
|||
var res = eval('(' + data + ')'); |
|||
if (res.code == '200') { |
|||
window.location.href = 'custom-create-schedule.php?accountid=' + customerid + '&contractno=' + contractno; |
|||
} else { |
|||
alert('添加失败'); |
|||
} |
|||
|
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
function tijiaosch() { |
|||
|
|||
//作番号
|
|||
var facilitynoslist = []; |
|||
$(".facilitynos").each(function () { |
|||
facilitynoslist.push($(this).val()); |
|||
}); |
|||
//保养套餐
|
|||
var combonoslist = []; |
|||
$(".combonos").each(function () { |
|||
combonoslist.push($(this).val()); |
|||
}); |
|||
|
|||
//保养日期duedates
|
|||
var duedateslist = []; |
|||
$(".duedates").each(function () { |
|||
duedateslist.push($(this).val()); |
|||
}); |
|||
|
|||
//保养工号
|
|||
var repaireridslist = []; |
|||
$(".repairerids").each(function () { |
|||
repaireridslist.push($(this).val()); |
|||
}); |
|||
//保养人姓名
|
|||
var repairernameslist = []; |
|||
$(".repairernames").each(function () { |
|||
repairernameslist.push($(this).val()); |
|||
}); |
|||
|
|||
//合约号
|
|||
var contractno = $('.contractno').val(); |
|||
//建档人
|
|||
var creater = $('.creater').val(); |
|||
//创建时间
|
|||
var create_at = $('.create_at').val(); |
|||
var type = $('.type').val(); |
|||
var url = "scheduleapi.php"; |
|||
|
|||
//提交创建
|
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
facilitynos: JSON.stringify(facilitynoslist), |
|||
combonos: JSON.stringify(combonoslist), |
|||
duedates: JSON.stringify(duedateslist), |
|||
repairerids: JSON.stringify(repaireridslist), |
|||
repairernames: JSON.stringify(repairernameslist), |
|||
type: type, |
|||
contractno: contractno, |
|||
creater: creater, |
|||
create_at: create_at |
|||
}, |
|||
success: function (data) { |
|||
var res = eval('(' + data + ')'); |
|||
if (res.code == '200') { |
|||
window.location.href = 'index.php'; |
|||
} else { |
|||
alert('添加失败,请检查数据'); |
|||
} |
|||
|
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
function show(id) { |
|||
//removeClass
|
|||
var t = document.getElementById('account');//选取id为test的div元素
|
|||
t.style.display = 'none';// 隐藏选择的元素
|
|||
t.style.display = 'block';// 以块级样式显示
|
|||
} |
|||
|
|||
function login() { |
|||
var account = $('.account').val(); |
|||
var password = $('.password').val(); |
|||
var url = "loginapi.php"; |
|||
$.ajax({ |
|||
method: 'post', |
|||
url: url, |
|||
data: { |
|||
account: account, |
|||
password: password |
|||
}, |
|||
success: function (data) { |
|||
// console.log(data);
|
|||
console.log('返回的结果'); |
|||
res = eval("(" + data + ")"); |
|||
// console.log(res);
|
|||
// console.log(window.location.host);
|
|||
// console.log(res.code);
|
|||
if (res.code == '200') { |
|||
var token = res.token; |
|||
var name = res.name; |
|||
var login = res.login; |
|||
var menu = res.menu; |
|||
//console.log(token);
|
|||
//window.localStorage.setItem("token",token);
|
|||
//window.localStorage.setItem("name",name);
|
|||
//window.localStorage.setItem("login",login);
|
|||
window.localStorage.setItem("menu_" + res.uid, menu); |
|||
window.location.href = 'index.php?token=' + token; |
|||
} else { |
|||
window.location.href = 'login.php?errno=1'; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
}); |
|||
|
|||
} |
|||
|
|||
function settoken(v) { |
|||
window.localStorage.setItem("token", v); |
|||
} |
|||
|
|||
function gettoken(v) { |
|||
window.localStorage.getItem("token"); |
|||
} |
|||
|
|||
function tttt() { |
|||
//alert('無權限操作');
|
|||
return "err"; |
|||
} |
Loading…
Reference in new issue