24 changed files with 13292 additions and 12144 deletions
File diff suppressed because it is too large
Binary file not shown.
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
require_once("../../T8_Authorization_from_bpm.php"); |
||||
|
|
||||
|
function T8API($data) |
||||
|
{ |
||||
|
// echo '<pre>'; |
||||
|
// print_r(json_encode($data)); |
||||
|
// echo '</pre>'; |
||||
|
|
||||
|
$api_url = 'https://erp.masada.com.tw:780/twWebAPI/V1/SALINCOMEAPPLY/PostERPData'; |
||||
|
$validation = get_Auth(); |
||||
|
$header = [ |
||||
|
"CHI_Authorization :" . $validation |
||||
|
]; |
||||
|
$ch = curl_init(); |
||||
|
curl_setopt($ch, CURLOPT_URL, $api_url); // 设置请求的URL |
||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $header); |
||||
|
curl_setopt($ch, CURLOPT_POST, 1); // 使用 POST |
||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); |
||||
|
$response = curl_exec($ch); |
||||
|
if ($response === false) { |
||||
|
echo 'Curl error: ' . curl_error($ch); |
||||
|
} else { |
||||
|
$result = json_decode($response, true); |
||||
|
// 若 API 傳入失敗。 |
||||
|
if ($result['Status'] == 'Erroe') { |
||||
|
echo 'API傳入失敗,' . $result['ErrorMsg']; |
||||
|
return $result; |
||||
|
} else { |
||||
|
// echo '<pre>'; |
||||
|
// print_r($result); |
||||
|
// echo '</pre>'; |
||||
|
return $result; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
curl_close($ch); |
||||
|
} |
||||
|
// T8API($data); |
@ -0,0 +1,186 @@ |
|||||
|
[ |
||||
|
{ |
||||
|
"name": "salIncomeApplyMaster", |
||||
|
"rows": [ |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"BillDate": "20240122", |
||||
|
"OrgId": "1000", |
||||
|
"FOrgId": "1000", |
||||
|
"TypeId": "RAS", |
||||
|
"BpOrgId": "1000", |
||||
|
"BizPartnerId": "B23100060", |
||||
|
"CurrId": "TWD", |
||||
|
"CurrOAmount": 1, |
||||
|
"CurrLAmount": 1, |
||||
|
"PersonId": "M0065", |
||||
|
"DtOrgId": "1000", |
||||
|
"DueToId": "B23100060", |
||||
|
"TaxId": "ST005", |
||||
|
"CompId": "1001", |
||||
|
"CreatorId": "M0225" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"name": "salIncomeApplyDetail", |
||||
|
"rows": [ |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 1, |
||||
|
"RowNo": 1, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 2, |
||||
|
"RowNo": 2, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 3, |
||||
|
"RowNo": 3, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 4, |
||||
|
"RowNo": 4, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 5, |
||||
|
"RowNo": 5, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 6, |
||||
|
"RowNo": 6, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 7, |
||||
|
"RowNo": 7, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 8, |
||||
|
"RowNo": 8, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 9, |
||||
|
"RowNo": 9, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 10, |
||||
|
"RowNo": 10, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 11, |
||||
|
"RowNo": 11, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
}, |
||||
|
{ |
||||
|
"BillNo": "B23100060", |
||||
|
"IncomeId": "A40003", |
||||
|
"TaxId": "ST005", |
||||
|
"RowCode": 12, |
||||
|
"RowNo": 12, |
||||
|
"ItemType": 1, |
||||
|
"SPrice": 1250, |
||||
|
"SQuantity": 1, |
||||
|
"ProjectId": "B23100060", |
||||
|
"FromSourceTag": 0, |
||||
|
"CU_MaterialId": "4TH53801" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
@ -1,77 +1,86 @@ |
|||||
<?php |
<?php |
||||
$now = gmdate("YmdHis"); |
require_once('../../T8_Authorization_from_bpm.php'); |
||||
$data = 'M0000.' . $now; |
require_once('../connt8.php'); |
||||
$sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); |
$sql = "SELECT * FROM salIncomeApplyMaster WHERE BillNo = '3TX10701' "; |
||||
?> |
$stmt = $connT8->prepare($sql); |
||||
|
$stmt->execute(); |
||||
|
$result = $stmt->fetchAll(PDO::FETCH_ASSOC); |
||||
|
echo '<pre>'; |
||||
|
print_r($result); |
||||
|
echo '</pre>'; |
||||
|
// $date = date("Y-m-d"); |
||||
|
// $date1 = str_replace('-', '', $date); |
||||
|
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script> |
// $arr = [ |
||||
<script> |
// "date" => $date1 |
||||
var body = [{ |
// ]; |
||||
"name": "salIncomeApplyMaster", |
|
||||
"rows": [{ |
|
||||
"BillNo": "Z001", |
|
||||
"BillDate": 20160811, |
|
||||
"OrgId": "1000", |
|
||||
"FOrgId": "1000", |
|
||||
"TypeId": "RR", |
|
||||
"BpOrgId": "1000", |
|
||||
"BizPartnerId": "C002", |
|
||||
"CurrId": "RMB", |
|
||||
"CurrOAmount": 1, |
|
||||
"CurrLAmount": 1, |
|
||||
"PersonId": "T001", |
|
||||
"DtOrgId": "1000", |
|
||||
"DueToId": "C002", |
|
||||
"TaxId": "123", |
|
||||
"CompId": "1000" |
|
||||
}] |
|
||||
}, |
|
||||
{ |
|
||||
"name": "salIncomeApplyDetail", |
|
||||
"rows": [{ |
|
||||
"BillNo": "Z001", |
|
||||
"IncomeId": "F203", |
|
||||
"TaxId": "ST003", |
|
||||
"RowCode": 1, |
|
||||
"ItemType": "1", |
|
||||
"SPrice": 50, |
|
||||
"SQuantity": 1, |
|
||||
"FromSourceTag": 0, |
|
||||
"FromBillNo": "123" |
|
||||
}] |
|
||||
} |
|
||||
] |
|
||||
|
|
||||
var json = JSON.stringify(body); |
// echo '<pre>'; |
||||
console.log(json); |
// print_r($arr); |
||||
// obj = { |
// echo '</pre>'; |
||||
// type: 'POST', |
// $validation = get_Auth(); |
||||
// // url: `${corsurl}${apiurl}`, |
// $data = [ |
||||
// url: `${apiurl}`, |
// [ |
||||
// dataType: 'json', |
// "name" => "OtherStockOutMtable", |
||||
// headers: headerParam, |
// "rows" => [ |
||||
// data: json, |
// [ |
||||
// // dataType: "json", |
// "BillNo" => "00850110", // 單據編號 varchar(20) |
||||
// success: function(res) { |
// "BillDate" => 20210427, // 單據日期 int |
||||
// console.log(res.Status); |
// "OrgId" => "1000", //組織 varchar(20) |
||||
// console.log(res.ErrorMsg); |
// "FOrgId" => "1000", //核算組織 varchar(20) |
||||
// console.log(res.Data); |
// "TypeId" => "OS", //單據類型 varchar(10) |
||||
// } |
// "BizPartnerId" => "", //往來對象(供應商) 可為空 |
||||
// }; |
// "PersonId" => "C0003", // 經辦人員 varchar(20) |
||||
// jQuery.ajax(obj); |
// "DeptId" => "250", // 經辦部門 varchar(20) |
||||
// // } |
// "CompId" => "1001" // 公司 varchar(20) |
||||
// }) |
// ] |
||||
$.ajax({ |
// ] |
||||
url: 'https://127.0.0.1:780/twWebAPI/V1/SALINCOMEAPPLY/PostERPData', |
// ], [ |
||||
method: 'POST', |
// "name" => "OtherStockOutDetail", |
||||
dataType: 'json', |
// "rows" => [ |
||||
// headers: headerParam, |
// [ |
||||
data: body, |
// "BillNo" => "00850110", //單據編號 varchar(20) |
||||
success: function(res) { |
// "RowCode" => 1, // 序號 int(10) |
||||
console.log('Success'); |
// "MaterialId" => "MX00021003", // 產品代碼 -> 產品集成 varchar(40) |
||||
}, |
// "SupplyOrgId" => "1000", // 供貨組織代碼 varchar(20) |
||||
error: function(err) { |
// "SQuantity" => 1, // 交易數量 numeric(19) |
||||
console.log(err); |
// "WarehouseId" => "100" // 倉庫代碼 varchar(20) |
||||
} |
// ] |
||||
}) |
// ] |
||||
</script> |
// ] |
||||
|
// ]; |
||||
|
// $data = file_get_contents('test.json'); |
||||
|
// echo '<pre>'; |
||||
|
// print_r($data); |
||||
|
// echo '</pre>'; |
||||
|
// $api_url = 'https://erp.masada.com.tw:780/twWebAPI/V1/STKOTHERSTOCKOUT/PostERPData'; |
||||
|
// $header = [ |
||||
|
// "CHI_Authorization :" . $validation |
||||
|
// ]; |
||||
|
// $ch = curl_init(); |
||||
|
// curl_setopt($ch, CURLOPT_URL, $api_url); // 设置请求的URL |
||||
|
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
||||
|
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
||||
|
// curl_setopt($ch, CURLOPT_HTTPHEADER, $header); |
||||
|
// curl_setopt($ch, CURLOPT_POST, 1); |
||||
|
// curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); |
||||
|
|
||||
|
// $response = curl_exec($ch); |
||||
|
// if ($response === false) { |
||||
|
// echo 'Curl error: ' . curl_error($ch); |
||||
|
// } else { |
||||
|
// $result = json_decode($response, true); |
||||
|
// if ($result['Status'] == 'Error') { |
||||
|
// echo '<pre>'; |
||||
|
// print_r($result); |
||||
|
// echo '</pre>'; |
||||
|
// echo 'API 傳入錯誤,' . $result['ErrorMsg']; |
||||
|
// } else { |
||||
|
// echo '<pre>'; |
||||
|
// print_r($result['Status']); |
||||
|
// echo '</pre>'; |
||||
|
// return $result; |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// curl_close($ch); |
||||
|
@ -1,110 +1,136 @@ |
|||||
<?php |
<?php |
||||
$token = $_REQUEST["token"]; |
$token = $_REQUEST["token"]; |
||||
?> |
?> |
||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||
<html lang="en"> |
<html lang="en"> |
||||
<head> |
|
||||
<meta charset="UTF-8"> |
<head> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" /> |
<meta charset="UTF-8"> |
||||
<title>待我簽核</title> |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" /> |
||||
<link rel="stylesheet" href="css/plugins/fontawesome-free/css/all.min.css"> |
<title>待我簽核</title> |
||||
<link rel="stylesheet" href="css/dist/css/adminlte.min.css"> |
<link rel="stylesheet" href="css/plugins/fontawesome-free/css/all.min.css"> |
||||
<script src="../css/jquery.min.js"></script> |
<link rel="stylesheet" href="css/dist/css/adminlte.min.css"> |
||||
<script src="../css/bootstrap.min.js"></script> |
<script src="../css/jquery.min.js"></script> |
||||
<style> |
<script src="../css/bootstrap.min.js"></script> |
||||
.content-wrapper { |
<style> |
||||
background-color: #fff; |
.content-wrapper { |
||||
} |
background-color: #fff; |
||||
.col-lg-6 { |
} |
||||
padding:8px 0 0 0!important; |
|
||||
} |
.col-lg-6 { |
||||
.card { |
padding: 8px 0 0 0 !important; |
||||
height: 90vh; |
} |
||||
line-height: 14 px; |
|
||||
font-size: 14px; |
.card { |
||||
} |
height: 90vh; |
||||
.card-header { |
line-height: 14 px; |
||||
background-color: #f4f6f9; |
font-size: 14px; |
||||
padding-left: 16px; |
} |
||||
} |
|
||||
.card-body ol { |
.card-header { |
||||
font-size: 14px; |
background-color: #f4f6f9; |
||||
margin-left: -30px; |
padding-left: 16px; |
||||
} |
} |
||||
.nav-pills .nav-link { |
|
||||
color: #446887; |
.card-body ol { |
||||
} |
font-size: 14px; |
||||
h5 svg { |
margin-left: -30px; |
||||
vertical-align: baseline; |
} |
||||
} |
|
||||
h5 a { |
.nav-pills .nav-link { |
||||
color: #000; |
color: #446887; |
||||
} |
} |
||||
@media screen and (max-width: 992px){ |
|
||||
.card { |
h5 svg { |
||||
height: 95vh; |
vertical-align: baseline; |
||||
} |
} |
||||
} |
|
||||
</style> |
h5 a { |
||||
</head> |
color: #000; |
||||
<body> |
} |
||||
<div class="wrapper"> |
|
||||
<!-- Content Wrapper. Contains page content --> |
@media screen and (max-width: 992px) { |
||||
<div class="content-wrapper"> |
.card { |
||||
<!-- Main content --> |
height: 95vh; |
||||
<div class="content"> |
} |
||||
<div class="container"> |
} |
||||
<div class="row"> |
</style> |
||||
<!-- /.col-md-6 --> |
</head> |
||||
<div class="col-lg-6"> |
|
||||
<div class="card"> |
<body> |
||||
<div class="card-header"> |
<div class="wrapper"> |
||||
<h5 class="card-title m-0"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16"><path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/><path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"/></svg> |
<!-- Content Wrapper. Contains page content --> |
||||
<a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" target="_parent">待我簽核</a></h5> |
<div class="content-wrapper"> |
||||
</div> |
<!-- Main content --> |
||||
<div class="card-body p-0"> |
<div class="content"> |
||||
Loading... |
<div class="container"> |
||||
</div> |
<div class="row"> |
||||
</div> |
<!-- /.col-md-6 --> |
||||
</div> |
<div class="col-lg-6"> |
||||
<!-- /.col-md-6 --> |
<div class="card"> |
||||
</div> |
<div class="card-header"> |
||||
<!-- /.row --> |
<h5 class="card-title m-0"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16"> |
||||
</div><!-- /.container-fluid --> |
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" /> |
||||
</div> |
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z" /> |
||||
<!-- /.content --> |
</svg> |
||||
</div> |
<a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" target="_parent">待我簽核</a> |
||||
<!-- /.content-wrapper --> |
</h5> |
||||
</div> |
</div> |
||||
<script> |
<div class="card-body p-0"> |
||||
$(document).ready(function() { |
Loading... |
||||
here(); |
</div> |
||||
}); |
</div> |
||||
|
</div> |
||||
function here() { |
<!-- /.col-md-6 --> |
||||
var URL = 'api_getdata.php'; |
</div> |
||||
$.ajax({ |
<!-- /.row --> |
||||
type: "GET", |
</div><!-- /.container-fluid --> |
||||
data: {p: 'pending', token: '<?php echo $token; ?>'}, |
</div> |
||||
url: URL, |
<!-- /.content --> |
||||
success: function (msg) { |
</div> |
||||
var obj = JSON.parse(msg); |
<!-- /.content-wrapper --> |
||||
console.log(obj); |
</div> |
||||
var myhtml = ''; |
<script> |
||||
if (obj.st == 'ok') { |
$(document).ready(function() { |
||||
myhtml += '<ul class="nav nav-pills flex-column">'; |
here(); |
||||
for (i=1; i<=Object.keys(obj.content).length; i++) { |
}); |
||||
myhtml += '<li class="nav-item"><a href="/wms/sign/list.php?system_id='+obj.content[i].sid+'&flow_id='+obj.content[i].fid+'&function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">'+obj.content[i].sname+' > '+obj.content[i].fname+'('+obj.content[i].cnt+')</a></li>'; |
|
||||
} |
function here() { |
||||
if (Object.keys(obj.content).length == 6) { |
var URL = 'api_getdata.php'; |
||||
myhtml += '<li class="nav-item"><a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">.... 顯示更多</a></li>'; |
$.ajax({ |
||||
} |
type: "GET", |
||||
myhtml += '</ul>'; |
data: { |
||||
$('.card-body').empty().append(myhtml); |
p: 'pending', |
||||
} |
token: '<?php echo $token; ?>' |
||||
} |
}, |
||||
}) |
url: URL, |
||||
} |
success: function(msg) { |
||||
</script> |
var obj = JSON.parse(msg); |
||||
</body> |
console.log(msg); |
||||
|
var myhtml = ''; |
||||
|
if (obj.st == 'ok') { |
||||
|
myhtml += '<ul class="nav nav-pills flex-column">'; |
||||
|
for (i = 1; i <= Object.keys(obj.content).length; i++) { |
||||
|
if (obj.content[i].fname == '新梯價審流程') { |
||||
|
myhtml += '<li class="nav-item"><a href="/wms/mkt/pricereview-index.php?system_id=' + obj.content[i].sid + '&flow_id=' + obj.content[i].fid + '&function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">' + obj.content[i].sname + ' > ' + obj.content[i].fname + '(' + obj.content[i].cnt + ')</a></li>'; |
||||
|
} else if (obj.content[i].fname == '汰改價審流程') { |
||||
|
myhtml += '<li class="nav-item"><a href="/wms/mkt/pricereview_renovate-index.php?system_id=' + obj.content[i].sid + '&flow_id=' + obj.content[i].fid + '&function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">' + obj.content[i].sname + ' > ' + obj.content[i].fname + '(' + obj.content[i].cnt + ')</a></li>'; |
||||
|
} else if (obj.content[i].fname == '契约價審流程') { |
||||
|
myhtml += '<li class="nav-item"><a href="/wms/cont/sign_list.php?system_id=' + obj.content[i].sid + '&flow_id=' + obj.content[i].fid + '&function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">' + obj.content[i].sname + ' > ' + obj.content[i].fname + '(' + obj.content[i].cnt + ')</a></li>'; |
||||
|
} else { |
||||
|
myhtml += '<li class="nav-item"><a href="/wms/sign/list.php?system_id=' + obj.content[i].sid + '&flow_id=' + obj.content[i].fid + '&function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">' + obj.content[i].sname + ' > ' + obj.content[i].fname + '(' + obj.content[i].cnt + ')</a></li>'; |
||||
|
} |
||||
|
} |
||||
|
if (Object.keys(obj.content).length == 6) { |
||||
|
myhtml += '<li class="nav-item"><a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" class="nav-link" target="_parent">.... 顯示更多</a></li>'; |
||||
|
} |
||||
|
myhtml += '</ul>'; |
||||
|
$('.card-body').empty().append(myhtml); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
|
||||
</html> |
</html> |
Loading…
Reference in new issue