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 |
|||
$now = gmdate("YmdHis"); |
|||
$data = 'M0000.' . $now; |
|||
$sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); |
|||
?> |
|||
require_once('../../T8_Authorization_from_bpm.php'); |
|||
require_once('../connt8.php'); |
|||
$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> |
|||
<script> |
|||
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" |
|||
}] |
|||
} |
|||
] |
|||
// $arr = [ |
|||
// "date" => $date1 |
|||
// ]; |
|||
|
|||
var json = JSON.stringify(body); |
|||
console.log(json); |
|||
// obj = { |
|||
// type: 'POST', |
|||
// // url: `${corsurl}${apiurl}`, |
|||
// url: `${apiurl}`, |
|||
// dataType: 'json', |
|||
// headers: headerParam, |
|||
// data: json, |
|||
// // dataType: "json", |
|||
// success: function(res) { |
|||
// console.log(res.Status); |
|||
// console.log(res.ErrorMsg); |
|||
// console.log(res.Data); |
|||
// } |
|||
// }; |
|||
// jQuery.ajax(obj); |
|||
// // } |
|||
// }) |
|||
$.ajax({ |
|||
url: 'https://127.0.0.1:780/twWebAPI/V1/SALINCOMEAPPLY/PostERPData', |
|||
method: 'POST', |
|||
dataType: 'json', |
|||
// headers: headerParam, |
|||
data: body, |
|||
success: function(res) { |
|||
console.log('Success'); |
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}) |
|||
</script> |
|||
// echo '<pre>'; |
|||
// print_r($arr); |
|||
// echo '</pre>'; |
|||
// $validation = get_Auth(); |
|||
// $data = [ |
|||
// [ |
|||
// "name" => "OtherStockOutMtable", |
|||
// "rows" => [ |
|||
// [ |
|||
// "BillNo" => "00850110", // 單據編號 varchar(20) |
|||
// "BillDate" => 20210427, // 單據日期 int |
|||
// "OrgId" => "1000", //組織 varchar(20) |
|||
// "FOrgId" => "1000", //核算組織 varchar(20) |
|||
// "TypeId" => "OS", //單據類型 varchar(10) |
|||
// "BizPartnerId" => "", //往來對象(供應商) 可為空 |
|||
// "PersonId" => "C0003", // 經辦人員 varchar(20) |
|||
// "DeptId" => "250", // 經辦部門 varchar(20) |
|||
// "CompId" => "1001" // 公司 varchar(20) |
|||
// ] |
|||
// ] |
|||
// ], [ |
|||
// "name" => "OtherStockOutDetail", |
|||
// "rows" => [ |
|||
// [ |
|||
// "BillNo" => "00850110", //單據編號 varchar(20) |
|||
// "RowCode" => 1, // 序號 int(10) |
|||
// "MaterialId" => "MX00021003", // 產品代碼 -> 產品集成 varchar(40) |
|||
// "SupplyOrgId" => "1000", // 供貨組織代碼 varchar(20) |
|||
// "SQuantity" => 1, // 交易數量 numeric(19) |
|||
// "WarehouseId" => "100" // 倉庫代碼 varchar(20) |
|||
// ] |
|||
// ] |
|||
// ] |
|||
// ]; |
|||
// $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 |
|||
$token = $_REQUEST["token"]; |
|||
?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" /> |
|||
<title>待我簽核</title> |
|||
<link rel="stylesheet" href="css/plugins/fontawesome-free/css/all.min.css"> |
|||
<link rel="stylesheet" href="css/dist/css/adminlte.min.css"> |
|||
<script src="../css/jquery.min.js"></script> |
|||
<script src="../css/bootstrap.min.js"></script> |
|||
<style> |
|||
.content-wrapper { |
|||
background-color: #fff; |
|||
} |
|||
.col-lg-6 { |
|||
padding:8px 0 0 0!important; |
|||
} |
|||
.card { |
|||
height: 90vh; |
|||
line-height: 14 px; |
|||
font-size: 14px; |
|||
} |
|||
.card-header { |
|||
background-color: #f4f6f9; |
|||
padding-left: 16px; |
|||
} |
|||
.card-body ol { |
|||
font-size: 14px; |
|||
margin-left: -30px; |
|||
} |
|||
.nav-pills .nav-link { |
|||
color: #446887; |
|||
} |
|||
h5 svg { |
|||
vertical-align: baseline; |
|||
} |
|||
h5 a { |
|||
color: #000; |
|||
} |
|||
@media screen and (max-width: 992px){ |
|||
.card { |
|||
height: 95vh; |
|||
} |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="wrapper"> |
|||
<!-- Content Wrapper. Contains page content --> |
|||
<div class="content-wrapper"> |
|||
<!-- Main content --> |
|||
<div class="content"> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<!-- /.col-md-6 --> |
|||
<div class="col-lg-6"> |
|||
<div class="card"> |
|||
<div class="card-header"> |
|||
<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> |
|||
<a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" target="_parent">待我簽核</a></h5> |
|||
</div> |
|||
<div class="card-body p-0"> |
|||
Loading... |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- /.col-md-6 --> |
|||
</div> |
|||
<!-- /.row --> |
|||
</div><!-- /.container-fluid --> |
|||
</div> |
|||
<!-- /.content --> |
|||
</div> |
|||
<!-- /.content-wrapper --> |
|||
</div> |
|||
<script> |
|||
$(document).ready(function() { |
|||
here(); |
|||
}); |
|||
|
|||
function here() { |
|||
var URL = 'api_getdata.php'; |
|||
$.ajax({ |
|||
type: "GET", |
|||
data: {p: 'pending', token: '<?php echo $token; ?>'}, |
|||
url: URL, |
|||
success: function (msg) { |
|||
var obj = JSON.parse(msg); |
|||
console.log(obj); |
|||
var myhtml = ''; |
|||
if (obj.st == 'ok') { |
|||
myhtml += '<ul class="nav nav-pills flex-column">'; |
|||
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>'; |
|||
} |
|||
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> |
|||
<?php |
|||
$token = $_REQUEST["token"]; |
|||
?> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" /> |
|||
<title>待我簽核</title> |
|||
<link rel="stylesheet" href="css/plugins/fontawesome-free/css/all.min.css"> |
|||
<link rel="stylesheet" href="css/dist/css/adminlte.min.css"> |
|||
<script src="../css/jquery.min.js"></script> |
|||
<script src="../css/bootstrap.min.js"></script> |
|||
<style> |
|||
.content-wrapper { |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.col-lg-6 { |
|||
padding: 8px 0 0 0 !important; |
|||
} |
|||
|
|||
.card { |
|||
height: 90vh; |
|||
line-height: 14 px; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.card-header { |
|||
background-color: #f4f6f9; |
|||
padding-left: 16px; |
|||
} |
|||
|
|||
.card-body ol { |
|||
font-size: 14px; |
|||
margin-left: -30px; |
|||
} |
|||
|
|||
.nav-pills .nav-link { |
|||
color: #446887; |
|||
} |
|||
|
|||
h5 svg { |
|||
vertical-align: baseline; |
|||
} |
|||
|
|||
h5 a { |
|||
color: #000; |
|||
} |
|||
|
|||
@media screen and (max-width: 992px) { |
|||
.card { |
|||
height: 95vh; |
|||
} |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="wrapper"> |
|||
<!-- Content Wrapper. Contains page content --> |
|||
<div class="content-wrapper"> |
|||
<!-- Main content --> |
|||
<div class="content"> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<!-- /.col-md-6 --> |
|||
<div class="col-lg-6"> |
|||
<div class="card"> |
|||
<div class="card-header"> |
|||
<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> |
|||
<a href="/wms/sign/list.php?function_name=show&token=<?php echo $token; ?>" target="_parent">待我簽核</a> |
|||
</h5> |
|||
</div> |
|||
<div class="card-body p-0"> |
|||
Loading... |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- /.col-md-6 --> |
|||
</div> |
|||
<!-- /.row --> |
|||
</div><!-- /.container-fluid --> |
|||
</div> |
|||
<!-- /.content --> |
|||
</div> |
|||
<!-- /.content-wrapper --> |
|||
</div> |
|||
<script> |
|||
$(document).ready(function() { |
|||
here(); |
|||
}); |
|||
|
|||
function here() { |
|||
var URL = 'api_getdata.php'; |
|||
$.ajax({ |
|||
type: "GET", |
|||
data: { |
|||
p: 'pending', |
|||
token: '<?php echo $token; ?>' |
|||
}, |
|||
url: URL, |
|||
success: function(msg) { |
|||
var obj = JSON.parse(msg); |
|||
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> |
Loading…
Reference in new issue