29 changed files with 2711 additions and 1286 deletions
@ -0,0 +1,134 @@ |
|||||
|
<?php |
||||
|
ini_set('display_errors', 'on'); |
||||
|
date_default_timezone_set('Asia/Taipei'); |
||||
|
|
||||
|
|
||||
|
include "T8_Authorization_curl_ver.php"; |
||||
|
|
||||
|
$user_id = "M0117"; |
||||
|
$user_password = "90493119"; |
||||
|
$validation = get_Auth($user_id, $user_password); |
||||
|
|
||||
|
// getDataSchemaDetails($validation); |
||||
|
// getSALDISPATCHLIST($validation); |
||||
|
|
||||
|
|
||||
|
$body = [ |
||||
|
[ |
||||
|
"name" => "salDispatchListMaster", |
||||
|
"rows" => [ |
||||
|
[ |
||||
|
"BillNo" => "SS20230208001", |
||||
|
"BillDate" => 20230208, |
||||
|
"SupplyFOrgId" => "1000", |
||||
|
"FOrgId" => "1000", |
||||
|
"TypeId" => "SS", |
||||
|
"OrgId" => "1000", |
||||
|
"CompId" => "A", |
||||
|
"ModeId" => "DS", |
||||
|
"BizPartnerId" => "A0000001", |
||||
|
"PersonId" => "POS001", |
||||
|
"CurrId" => "TWD", |
||||
|
"CurrOAmount" => 1, |
||||
|
"CurrLAmount" => 1, |
||||
|
"TrusteeWarehouseId" => "", |
||||
|
"SendGoodsDate" => 20230208, |
||||
|
"DueToId" => "A0000001", |
||||
|
"TaxId" => "ST005", |
||||
|
"CreditorOrgId" => "1000", |
||||
|
"CreditorCompId" => "A", |
||||
|
"CreditorCurrOAmount" => 1, |
||||
|
"CreditorCurrLAmount" => 1, |
||||
|
"TradeConditionId" => "", |
||||
|
"TrusteeWarehouseBPType" => 0 |
||||
|
] |
||||
|
] |
||||
|
], |
||||
|
[ |
||||
|
"name" => "salDispatchListDetail", |
||||
|
"rows" => [ |
||||
|
"SupplyCompId" => "A", |
||||
|
"SupplyOrgId" => "1000", |
||||
|
"DispatchCompId" => "A", |
||||
|
"DispatchOrgId" => "1000", |
||||
|
"SQuantity" => "1", |
||||
|
"TaxId" => "ST005", |
||||
|
"BillNo" => "SS20230208001", |
||||
|
"RowCode" => 1, |
||||
|
"ItemType" => 0, |
||||
|
"MaterialId" => "POS01CF0001", |
||||
|
"SUnitId" => "CAP", |
||||
|
"SPrice" => "100" |
||||
|
] |
||||
|
] |
||||
|
]; |
||||
|
createSALDISPATCHLIST($validation, $data); |
||||
|
|
||||
|
// 新增發貨單 |
||||
|
function createSALDISPATCHLIST($validation, $body) |
||||
|
{ |
||||
|
// 新增 |
||||
|
$apiurl = 'http://60.244.87.101:880/twWebAPI/V1/SALDISPATCHLIST/PostERPData'; |
||||
|
// $apiurl = 'http://10.10.145.2:880/twWebAPI/V1/SALDISPATCHLIST/PostERPData'; |
||||
|
// $apiurl = 'https://127.0.0.1:780/twWebAPI/V1/SALDISPATCHLIST/PostERPData'; |
||||
|
$headerParam = [ |
||||
|
'CHI_Authorization: ' . $validation, |
||||
|
'Content-Type: application/json' |
||||
|
]; |
||||
|
$json = json_encode($body); |
||||
|
myCurl($apiurl, $headerParam, $json); |
||||
|
} |
||||
|
|
||||
|
// 發貨單查詢 |
||||
|
function getSALDISPATCHLIST($validation) |
||||
|
{ |
||||
|
// 新增 刪除 |
||||
|
$apiurl = 'http://60.244.87.101:880/twWebAPI/V1/SALDISPATCHLIST/GetERPData?pkValue=SS20231114001'; |
||||
|
// $apiurl = 'http://10.10.145.2:880/twWebAPI/V1/SALDISPATCHLIST/GetERPData'; |
||||
|
// $apiurl = 'https://127.0.0.1:780/twWebAPI/V1/SALDISPATCHLIST/GetERPData'; |
||||
|
$headerParam = [ |
||||
|
'CHI_Authorization: ' . $validation, |
||||
|
'Content-Type: application/json' |
||||
|
]; |
||||
|
$body = []; |
||||
|
$json = json_encode($body); |
||||
|
myCurl($apiurl, $headerParam, $json); |
||||
|
} |
||||
|
|
||||
|
// 發貨單資料表結構 |
||||
|
function getDataSchemaDetails($validation) |
||||
|
{ |
||||
|
// 取得資料表結構 |
||||
|
$apiurl = 'http://60.244.87.101:880/twWebAPI/V1/SALDISPATCHLIST/GetTableSchema'; |
||||
|
// $apiurl = 'http://10.10.145.2:880/twWebAPI/V1/SALDISPATCHLIST/GetTableSchema'; |
||||
|
// $apiurl = 'https://127.0.0.1:780/twWebAPI/V1/SALDISPATCHLIST/GetTableSchema'; |
||||
|
$headerParam = [ |
||||
|
'CHI_Authorization: ' . $validation, |
||||
|
'Content-Type: application/json' |
||||
|
]; |
||||
|
$body = []; |
||||
|
$json = json_encode($body); |
||||
|
myCurl($apiurl, $headerParam, $json); |
||||
|
} |
||||
|
|
||||
|
function myCurl($apiurl, $headerParam, $json) |
||||
|
{ |
||||
|
$ch = curl_init(); |
||||
|
curl_setopt($ch, CURLOPT_URL, $apiurl); |
||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headerParam); |
||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); |
||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $json); |
||||
|
$response = curl_exec($ch); |
||||
|
if ($response === false) { |
||||
|
echo 'Curl error: ' . curl_error($ch); |
||||
|
} else { |
||||
|
$result = json_decode($response, true); |
||||
|
if ($result['Status'] == 'Success') { |
||||
|
echo json_encode($result['Data'], JSON_UNESCAPED_UNICODE); |
||||
|
} else { |
||||
|
echo $result['ErrorMsg']; |
||||
|
} |
||||
|
} |
||||
|
curl_close($ch); |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// $user_id = "M0000"; |
||||
|
// $user_password = "M012290493119"; |
||||
|
|
||||
|
$user_id = "M0117"; |
||||
|
$user_password = "90493119"; |
||||
|
$validation = get_Auth($user_id, $user_password); |
||||
|
|
||||
|
function get_Auth($user_id = "M0000", $user_password = "M012290493119") |
||||
|
{ |
||||
|
|
||||
|
// $now = gmdate("YmdHis"); |
||||
|
$now = gmdate("YmdHis", strtotime("-2 minutes")); |
||||
|
$data = "$user_id." . $now; |
||||
|
$sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); |
||||
|
|
||||
|
|
||||
|
// $apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth'; |
||||
|
$apiurl = 'http://60.244.87.101:880//twWebAPI/GetAuth'; |
||||
|
// $apiurl = 'http://10.10.145.2:880//twWebAPI/GetAuth'; |
||||
|
// $apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth'; |
||||
|
|
||||
|
$headerParam = [ |
||||
|
"UserId: $user_id", |
||||
|
"Pwd: $user_password", |
||||
|
"TimestampUTC: $now", |
||||
|
"Sign: $sign" |
||||
|
]; |
||||
|
|
||||
|
$ch = curl_init(); |
||||
|
curl_setopt($ch, CURLOPT_URL, $apiurl); |
||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headerParam); |
||||
|
|
||||
|
$response = curl_exec($ch); |
||||
|
if ($response === false) { |
||||
|
echo 'Curl error: ' . curl_error($ch); |
||||
|
} else { |
||||
|
$result = json_decode($response, true); |
||||
|
if ($result['Status'] == 'Success') |
||||
|
return $result['Data']['CHI_Authorization']; |
||||
|
if ($result['Status'] == 'Error') |
||||
|
return $result['ErrorMsg']; |
||||
|
} |
||||
|
|
||||
|
curl_close($ch); |
||||
|
} |
Binary file not shown.
File diff suppressed because it is too large
Binary file not shown.
@ -1,371 +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({ |
|
||||
method: 'post', |
$.ajax({ |
||||
url: url, |
method: 'post', |
||||
data: { |
url: url, |
||||
account: account, |
data: { |
||||
password: password |
account: account, |
||||
}, |
password: password |
||||
success: function (data) { |
}, |
||||
// console.log(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) { |
function settoken(v) { |
||||
window.localStorage.setItem("token", v); |
window.localStorage.setItem("token", v); |
||||
} |
} |
||||
|
|
||||
function gettoken(v) { |
function gettoken(v) { |
||||
window.localStorage.getItem("token"); |
window.localStorage.getItem("token"); |
||||
} |
} |
||||
|
|
||||
function tttt() { |
function tttt() { |
||||
//alert('無權限操作');
|
//alert('無權限操作');
|
||||
return "err"; |
return "err"; |
||||
} |
} |
@ -0,0 +1,230 @@ |
|||||
|
<style> |
||||
|
#table_index2_filter, |
||||
|
#table_index2_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
#table_index3_filter, |
||||
|
#table_index3_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
#table_index4_filter, |
||||
|
#table_index4_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
#table_index5_filter, |
||||
|
#table_index5_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
#table_index6_filter, |
||||
|
#table_index6_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
#table_index7_filter, |
||||
|
#table_index7_paginate { |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
table { |
||||
|
table-layout: fixed; |
||||
|
width: 100%; |
||||
|
margin-left: 12px; |
||||
|
} |
||||
|
|
||||
|
td { |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
|
||||
|
img { |
||||
|
width: 125px; |
||||
|
} |
||||
|
|
||||
|
.width_style_1 { |
||||
|
width: 125px; |
||||
|
} |
||||
|
|
||||
|
#table_index_filter { |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
#table_index_paginate { |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
label { |
||||
|
display: inline-flex; |
||||
|
margin-bottom: .5rem; |
||||
|
margin-top: .5rem; |
||||
|
} |
||||
|
|
||||
|
.table>tbody>tr>th { |
||||
|
vertical-align: middle !important; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.table>tbody>tr>td { |
||||
|
vertical-align: middle !important; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
#loadingOverlay { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: rgba(255, 255, 255, 0.7); |
||||
|
/* 透明度的背景颜色 */ |
||||
|
z-index: 9999; |
||||
|
/* 确保在最上层显示 */ |
||||
|
/* 添加加载动画的样式 */ |
||||
|
} |
||||
|
|
||||
|
.hidden { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
#loadingOverlay { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: rgba(255, 255, 255, 0.7); |
||||
|
/* 半透明的背景 */ |
||||
|
z-index: 9999; |
||||
|
/* 确保显示在最上层 */ |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.loading-text { |
||||
|
text-align: center; |
||||
|
margin-top: 10px; |
||||
|
/* 调整文字与图标之间的间距 */ |
||||
|
font-size: 16px; |
||||
|
color: #333; |
||||
|
/* 文字颜色 */ |
||||
|
} |
||||
|
|
||||
|
.loading-icon { |
||||
|
/* 这里是你加载图标的样式,可以是一个动画、GIF图或者SVG等 */ |
||||
|
/* 例如一个简单的加载圆圈动画 */ |
||||
|
border: 10px solid #f3f3f3; |
||||
|
/* 灰色边框 */ |
||||
|
border-top: 10px solid #3498db; |
||||
|
/* 蓝色顶部边框 */ |
||||
|
border-radius: 50%; |
||||
|
width: 80px; |
||||
|
height: 80px; |
||||
|
animation: spin 2s linear infinite; |
||||
|
/* 旋转动画 */ |
||||
|
} |
||||
|
|
||||
|
/* The Modal (background) */ |
||||
|
.modal { |
||||
|
display: none; |
||||
|
/* Hidden by default */ |
||||
|
position: fixed; |
||||
|
/* Stay in place */ |
||||
|
z-index: 1; |
||||
|
/* Sit on top */ |
||||
|
padding-top: 100px; |
||||
|
/* Location of the box */ |
||||
|
left: 0; |
||||
|
top: 0; |
||||
|
width: 100%; |
||||
|
/* Full width */ |
||||
|
height: 100%; |
||||
|
/* Full height */ |
||||
|
overflow: auto; |
||||
|
/* Enable scroll if needed */ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.modal .back { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: rgba(0, 0, 0, 0.4); |
||||
|
/* Black w/ opacity */ |
||||
|
} |
||||
|
|
||||
|
/* Modal Content */ |
||||
|
.modal-content { |
||||
|
z-index: 9; |
||||
|
background-color: #fefefe; |
||||
|
margin: auto; |
||||
|
padding: 20px; |
||||
|
border: 1px solid #888; |
||||
|
width: 80%; |
||||
|
} |
||||
|
|
||||
|
/* The Close Button */ |
||||
|
.close { |
||||
|
color: #aaaaaa; |
||||
|
float: right; |
||||
|
font-size: 28px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.close:hover, |
||||
|
.close:focus { |
||||
|
color: #000; |
||||
|
text-decoration: none; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@keyframes spin { |
||||
|
0% { |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
|
||||
|
100% { |
||||
|
transform: rotate(360deg); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@media screen and (max-width: 600px) { |
||||
|
|
||||
|
table { |
||||
|
border: 0; |
||||
|
} |
||||
|
|
||||
|
table thead { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
table tr { |
||||
|
margin-bottom: 10px; |
||||
|
display: block; |
||||
|
border-bottom: 2px solid #ddd; |
||||
|
} |
||||
|
|
||||
|
table td { |
||||
|
display: block; |
||||
|
text-align: right; |
||||
|
font-size: 14px; |
||||
|
border-bottom: 1px dotted #ccc; |
||||
|
} |
||||
|
|
||||
|
table td:last-child { |
||||
|
border-bottom: 0; |
||||
|
} |
||||
|
|
||||
|
table td:before { |
||||
|
content: attr(data-label); |
||||
|
float: left; |
||||
|
text-transform: uppercase; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,282 @@ |
|||||
|
<div id="loadingOverlay" class="hidden"> |
||||
|
<div class="loading-icon"></div> |
||||
|
</div> |
||||
|
<script> |
||||
|
document.getElementById('loadingOverlay').classList.remove('hidden'); |
||||
|
</script> |
||||
|
<?php |
||||
|
include "header.php"; |
||||
|
include "css/view/wipwhole-index.php"; |
||||
|
|
||||
|
// 設置一個空陣列來放資料 |
||||
|
$data = array(); |
||||
|
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null; |
||||
|
$contractno = isset($_REQUEST['contractno']) ? $_REQUEST['contractno'] : null; |
||||
|
$facilityno = isset($_REQUEST['facilityno']) ? $_REQUEST['facilityno'] : null; |
||||
|
|
||||
|
// sql語法存在變數中 |
||||
|
$sql = " |
||||
|
SELECT * |
||||
|
FROM wipwholestatus |
||||
|
WHERE status = '1' |
||||
|
"; |
||||
|
$sql .= !empty($id) ? " AND id = '$id'" : ""; |
||||
|
$sql .= !empty($contractno) ? " AND contractno = '$contractno'" : ""; |
||||
|
$sql .= !empty($facilityno) ? " AND facilityno = '$facilityno'" : ""; |
||||
|
|
||||
|
|
||||
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中 |
||||
|
$data = mysqli_query($link, $sql); |
||||
|
$data2 = $data; |
||||
|
|
||||
|
|
||||
|
function getAllCustomerPlanningVerify($link, $id) |
||||
|
{ |
||||
|
$sql = " |
||||
|
SELECT |
||||
|
real_custom_name AS custom_name, |
||||
|
customer_planning_verify_file, |
||||
|
date_format(customer_planning_verify_at, '%Y-%m-%d %H:%i:%s') AS create_at |
||||
|
FROM wipwholestatus |
||||
|
WHERE id = $id |
||||
|
AND customer_planning_verify_file != '' |
||||
|
AND customer_planning_verify_file IS NOT NULL |
||||
|
UNION |
||||
|
SELECT |
||||
|
custom_name, |
||||
|
customer_planning_verify_file, |
||||
|
create_at |
||||
|
FROM wipwhole_change_planning_customer_details |
||||
|
WHERE wipwholestatus_id = $id |
||||
|
AND customer_planning_verify_file != '' |
||||
|
AND customer_planning_verify_file IS NOT NULL |
||||
|
"; |
||||
|
return mysqli_query($link, $sql); |
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
|
||||
|
<?php if ($user_auth & 2) { ?> |
||||
|
<!-- <p> |
||||
|
<a href="board-create.php?function_name=board&<?php echo $token_link; ?>" class="btn btn-info btn-sm"> |
||||
|
<span class="glyphicon glyphicon-plus"></span> |
||||
|
</a> |
||||
|
</p> --> |
||||
|
<?php |
||||
|
} |
||||
|
if ($data) : |
||||
|
?> |
||||
|
|
||||
|
<style> |
||||
|
table { |
||||
|
table-layout: fixed; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
td { |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
|
||||
|
img { |
||||
|
width: 125px; |
||||
|
} |
||||
|
|
||||
|
.width_style_1 { |
||||
|
width: 125px; |
||||
|
} |
||||
|
|
||||
|
table { |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
#table_index_filter { |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
#table_index_paginate { |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
label { |
||||
|
display: inline-flex; |
||||
|
margin-bottom: .5rem; |
||||
|
margin-top: .5rem; |
||||
|
|
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<div style="overflow-x:auto;"> |
||||
|
<form id='myForm' method='post' action='expression-index.php?<?= $token_link ?>'> |
||||
|
<table class='table query-table table-striped table-bordered display compact' style='width:98%;text-align:center;margin:0 auto'> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<td colspan="5"> |
||||
|
<h3 style='text-align:center'>永佳捷 - 普萊特富 規格聯繫</h3> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<th style='text-align:center;vertical-align: middle;'>合約號</th> |
||||
|
<td style='text-align:center;vertical-align: middle;'><input type="text" class='form-control' id='contractno' name='contractno' value="<?php echo $contractno; ?>"></td> |
||||
|
<th style='text-align:center;vertical-align: middle;'>電梯編號</th> |
||||
|
<td style='text-align:center;vertical-align: middle;'><input type="text" class='form-control' id='facilityno' name='facilityno' value="<?php echo $facilityno; ?>"></td> |
||||
|
<td style='text-align:left;vertical-align: middle;'> |
||||
|
<button type="submit" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm">查詢</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</form> |
||||
|
</div> |
||||
|
|
||||
|
<div style="overflow-x:auto;"> |
||||
|
<table id="table_index" class="table table-striped table-bordered" style="width:100%"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>合約號</th> |
||||
|
<th>作翻號</th> |
||||
|
<th>樓高通報</th> |
||||
|
<th>工勘確認</th> |
||||
|
<th>設計規格</th> |
||||
|
<th>設計計劃圖</th> |
||||
|
<th>設計顏色</th> |
||||
|
<th>設計樣式</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<?php foreach ($data as $data) : ?> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<?php echo $data['contractno']; ?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<?php echo $data['facilityno']; ?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select class="disabled_select" name="building_heigh_verify" id="building_heigh_verify" disabled> |
||||
|
<option <?php if ($data["building_heigh_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
||||
|
<option <?php if ($data["building_heigh_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
||||
|
<option <?php if ($data["building_heigh_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
||||
|
<option <?php if ($data["building_heigh_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
||||
|
</select> |
||||
|
<?php |
||||
|
echo !empty($data['building_heigh_verify_file']) ? "<a id='building_heigh_verify_file_a' style='color:#00F;' href='" . $data['building_heigh_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
||||
|
?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<?php |
||||
|
$site_survey_status = array( |
||||
|
"1" => "請選擇", |
||||
|
"0" => "已確認", |
||||
|
"2" => "無工勘需求", |
||||
|
"A" => "未動工", |
||||
|
"B" => "地下室施工", |
||||
|
"C" => "打樁", |
||||
|
"D" => "地基", |
||||
|
"E" => "挖土", |
||||
|
"G" => "機房", |
||||
|
"H" => "機械式淨高", |
||||
|
"M" => "樓中樓", |
||||
|
"OH" => "最高層(頂樓高度)", |
||||
|
"P" => "PIT(機坑深度)", |
||||
|
"R" => "R 樓", |
||||
|
"S" => "停工", |
||||
|
"T" => "TOP", |
||||
|
"TC" => "頂部間隙", |
||||
|
"TS" => "行程", |
||||
|
"TH" => "全高", |
||||
|
"Y" => "已搭、已出", |
||||
|
"YB" => "退購結案", |
||||
|
"YF" => "既有建物", |
||||
|
"YN" => "已搭、未出" |
||||
|
); |
||||
|
for ($i = 1; $i < 200; $i++) { |
||||
|
$site_survey_status[$i . "F"] = $i . "F"; |
||||
|
} |
||||
|
?> |
||||
|
<select class="disabled_select" name="site_survey_contact_verify" id="site_survey_contact_verify" disabled> |
||||
|
<?php |
||||
|
foreach ($site_survey_status as $key => $val) { |
||||
|
if ($data["site_survey_contact_verify"] == $key) { |
||||
|
echo "<option value='$key' selected>$val</option>"; |
||||
|
} else { |
||||
|
echo "<option value='$key'>$val</option>"; |
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
<?php |
||||
|
echo !empty($data['site_survey_contact_verify_file']) ? "<a id='site_survey_contact_verify_file_a' style='color:#00F;' href='" . $data['site_survey_contact_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
||||
|
?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select class="disabled_select" name="desin_spec_verify" id="desin_spec_verify" disabled> |
||||
|
<option <?php if ($data["desin_spec_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
||||
|
<option <?php if ($data["desin_spec_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
||||
|
<option <?php if ($data["desin_spec_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
||||
|
<option <?php if ($data["desin_spec_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
||||
|
</select> |
||||
|
<?php |
||||
|
echo !empty($data['sales_spec_verify_file']) ? "<a id='sales_spec_verify_file_a' style='color:#00F;' href='" . $data['sales_spec_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
||||
|
?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select name="desin_planning_verify" id="desin_planning_verify" disabled> |
||||
|
<option <?php if ($data["desin_planning_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
||||
|
<option <?php if ($data["desin_planning_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
||||
|
<option <?php if ($data["desin_planning_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
||||
|
<option <?php if ($data["desin_planning_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
||||
|
</select> |
||||
|
<?php |
||||
|
$customer_planning_verify_files = getAllCustomerPlanningVerify($link, $data['id']); |
||||
|
foreach ($customer_planning_verify_files as $row2) : |
||||
|
echo "<a id='customer_planning_verify_file_a' style='color:#00F;' |
||||
|
href='" . $row2['customer_planning_verify_file'] . "' target='_blank'>下載附件_" . $data['create_at'] . "</a><br/>"; |
||||
|
endforeach; |
||||
|
?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select name="desin_color_verify" id="desin_color_verify" disabled> |
||||
|
<option <?php if ($data["desin_color_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
||||
|
<option <?php if ($data["desin_color_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
||||
|
<option <?php if ($data["desin_color_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
||||
|
<option <?php if ($data["desin_color_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
||||
|
</select> |
||||
|
<?php |
||||
|
echo !empty($data['customer_color_verify_file']) ? "<a id='customer_color_verify_file_a' style='color:#00F;' href='" . $data['customer_color_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
||||
|
?> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select name="desin_style_verify" id="desin_style_verify" disabled> |
||||
|
<option <?php if ($data["desin_style_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
||||
|
<option <?php if ($data["desin_style_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
||||
|
<option <?php if ($data["desin_style_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
||||
|
<option <?php if ($data["desin_style_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
||||
|
</select> |
||||
|
<?php |
||||
|
echo !empty($data['customer_style_verify_file']) ? "<a id='customer_style_verify_file_a' style='color:#00F;' href='" . $data['customer_style_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
||||
|
?> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<?php endforeach; ?> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
<script> |
||||
|
$(function() { |
||||
|
document.getElementById('loadingOverlay').classList.add('hidden'); |
||||
|
}) |
||||
|
</script> |
||||
|
<?php |
||||
|
|
||||
|
else : |
||||
|
echo "<h2>There is no record!</h2>"; |
||||
|
endif; |
||||
|
|
||||
|
#代表結束連線 |
||||
|
mysqli_close($link); |
||||
|
|
||||
|
include "footer.php"; |
||||
|
?> |
Loading…
Reference in new issue