Browse Source

0123新梯價審更新

main
Cheng 1 year ago
parent
commit
e676526be4
  1. 6
      wms/contract-repair/api/bpmAPI.php
  2. 32
      wms/contract/api/T8salIncomeApply.php
  3. 23
      wms/contract/api/postContractData.php
  4. 123
      wms/contract/api/testT8API.php
  5. 8
      wms/css/function.js
  6. 3
      wms/frame/api_getdata.php
  7. 75
      wms/mkt/pricereview-index.php
  8. 5
      wms/mkt/pricereview-record-check.php
  9. 2
      workflow/lib/DB.php

6
wms/contract-repair/api/bpmAPI.php

@ -1,4 +1,6 @@
<?php <?php
header("Access-Control-Allow-Origin: https://bpm.masada.com.tw");
require_once("../conn.php"); require_once("../conn.php");
$sql = "SELECT * FROM account WHERE accountid = 'M0225'"; $sql = "SELECT * FROM account WHERE accountid = 'M0225'";
@ -7,7 +9,7 @@ $stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC); $result = $stmt->fetch(PDO::FETCH_ASSOC);
// echo '<pre>'; // echo '<pre>';
// print_r(json_encode($result)); // print_r($result);
// echo '</pre>'; // echo '</pre>';
return json_encode($result); echo json_encode($result, JSON_UNESCAPED_UNICODE);

32
wms/contract/api/T8salIncomeApply.php

@ -39,3 +39,35 @@ function T8API($data)
curl_close($ch); curl_close($ch);
} }
// T8API($data); // T8API($data);
function pending($user_id, $token)
{
$api_url = 'localhost:3000/wms/frame/api_getdata';
$data = [
'p' => 'pending',
'token' => $token
];
$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;
}
}
}

23
wms/contract/api/postContractData.php

@ -524,29 +524,34 @@ function T8insert($data, $facilityno)
// 分期代碼計算 // 分期代碼計算
$IncomeId = [ $IncomeId = [
'A40006' => 1, 'A40006' => 1, //年繳
'A40007' => 4, 'A40007' => 4, //季繳
'A40003' => 12, 'A40003' => 12, //月繳
'A40004' => 6, 'A40004' => 6, //雙月繳
'A40005' => 2 'A40005' => 2 //半年繳
]; ];
//分幾期 => 總共保養月 / 分期月 //分幾期 => 總共保養月 / 分期月
$SQuantity = $elevator['maintain_months'] / $IncomeId[$payType]; $SQuantity = $elevator['maintain_months'] / $IncomeId[$payType];
// 依每台電梯去加入各個的付款項 // 依每台電梯去加入各個的付款項
for ($i = 1; $i <= $IncomeId[$payType]; $i++) { for ($i = 0; $i < $IncomeId[$payType]; $i++) {
// 計算分期款的收款月份
$paymonth = $i * $SQuantity;
$payday = date('Y-m-d', strtotime("$date_1 + $paymonth months"));
$rows_data = [ $rows_data = [
"BillNo" => "$contractno", "BillNo" => "$contractno",
"IncomeId" => "$payType", "IncomeId" => "$payType",
"TaxId" => "ST005", "TaxId" => "ST005",
"RowCode" => $i, "RowCode" => $i + 1,
"RowNo" => $i, "RowNo" => $i + 1,
"ItemType" => 1, "ItemType" => 1,
"SPrice" => $elevator['sold_price'], "SPrice" => $elevator['sold_price'],
"SQuantity" => $SQuantity, "SQuantity" => $SQuantity,
"ProjectId" => "$contractno", "ProjectId" => "$contractno",
"FromSourceTag" => 0, "FromSourceTag" => 0,
"CU_MaterialId" => "$facilityno[$index]" "CU_MaterialId" => "$facilityno[$index]",
"CU_EstPayDate" => "$payday"
]; ];
$salIncomeApplyDetail_rows[] = $rows_data; $salIncomeApplyDetail_rows[] = $rows_data;
} }

123
wms/contract/api/testT8API.php

@ -1,109 +1,14 @@
&nbsp; <?php
<link rel="stylesheet" name="dynamicTableStyle" type="text/css" href="/sys/xform/designer/standardtable/tablestyle/tb_normal_lightweight/standardtable.css"> $date = Date('Y-m-d');
<table id="fd_3c93363caa751c" formdesign="landray" align="center" class="tb_normal_lightweight" style="width: 98%;" layout2col="undefined" fd_values="{id:&quot;fd_3c93363caa751c&quot;,label:&quot;主表&quot;,isDefault:&quot;true&quot;,tableStyle:&quot;{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_lightweightquot;,quot;tbClassNamequot;:quot;tb_normal_lightweightquot;}&quot;}" fd_type="standardTable" tablestyle="{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_lightweightquot;,quot;tbClassNamequot;:quot;tb_normal_lightweightquot;}"> $date1 = Date('Y-m-d', strtotime("$date +1 months"));
<tbody>
<tr style="height: 30px;">
<td row="0" column="0" class="td_normal_title" style="width: auto; height: auto;">&nbsp;</td> $a = 1;
<td row="0" column="1" class="" style="">&nbsp;</td> $b = 12 / $a;
<td row="0" column="2">&nbsp;</td> for ($i = 0; $i < $b; $i++) {
</tr> $c = $i * $a;
<tr> $date1 = Date('Y-m-d', strtotime("$date + $c months"));
<td row="1" column="0">&nbsp;</td> echo '<pre>';
<td row="1" column="1">&nbsp;</td> print_r($date1);
<td row="1" column="2">&nbsp;</td> echo '</pre>';
</tr> }
<tr style="height: 30px;">
<td row="2" column="0" class="" style=""><label formdesign="landray" class="xform_new_address" style="display: inline-block; width: 166px;" fd_values="{id:&quot;fd_3c93374e32374e&quot;,width:&quot;120&quot;,_label_bind:&quot;false&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;,_org_person:&quot;true&quot;,_orgType:&quot;ORG_TYPE_PERSON&quot;,new_addressCustomType:&quot;org&quot;,new_address_select_value_id:&quot;&quot;,new_address_select_value_name:&quot;&quot;}" 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>&nbsp;<a style="">選擇</a></label></label></td>
<td row="2" column="1">&nbsp;</td>
<td row="2" column="2">&nbsp;</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:&quot;fd_3c9337572bd274&quot;,_label_bind:&quot;false&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;,width:&quot;200&quot;,loadType:&quot;&quot;,returnType:&quot;select&quot;,decimal:&quot;0&quot;}" 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:&quot;fd_3c933771241e32&quot;,width:&quot;200&quot;,_label_bind:&quot;false&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;}" 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:&quot;fd_3c93377a0f1596&quot;,tableStyle:&quot;{quot;pathProfixquot;:quot;sys/xform/designer/standardtable/tablestyle/tb_normal_solidborder_radius_bgcolorquot;,quot;tbClassNamequot;:quot;tb_normal_solidborder_radius_bgcolorquot;}&quot;}" 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">&nbsp;</td>
<td row="3" column="2">&nbsp;</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:&quot;6&quot;,_label_bind:&quot;false&quot;,label:&quot;明細表1&quot;,id:&quot;fd_3c93375a6e8256&quot;,width:&quot;100%&quot;,showRow:&quot;1&quot;,columnIndex:&quot;null&quot;}" 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="复制行">&nbsp;&nbsp;<img class="delIcon" src="style/img/icon_del.png" title="刪除行">&nbsp;&nbsp;</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">&nbsp;</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:&quot;fd_3c933764473d64&quot;,_label_bind:&quot;true&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;}" 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:&quot;200&quot;,height:&quot;150&quot;,widthContent:&quot;240&quot;,id:&quot;fd_3c933766738938&quot;,_label_bind:&quot;true&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;}" 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:&quot;fd_3c9337682f649c&quot;,_label_bind:&quot;false&quot;,label:&quot;&quot;,_label_bind_id:&quot;&quot;}" fd_type="hidden"><label title="隱藏字段" label="" style="background: url(&quot;style/img/hidden.png&quot;) no-repeat; width: 24px; height: 24px; display: inline-block;"></label></div>
<div formdesign="landray" id="fd_3c93376b1bdd94" fd_values="{id:&quot;fd_3c93376b1bdd94&quot;}" 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(&quot;style/img/right_icon.gif&quot;) 0px -48px no-repeat; border: 0px;" onclick="Designer_Control_Right_SetModeCellValue(this);">&nbsp;&nbsp;&nbsp;</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(&quot;style/img/right_icon.gif&quot;) 0px -80px no-repeat; border: 0px; display: none;" onclick="Designer_Control_Right_SetDefaultCellValue(this);">&nbsp;&nbsp;&nbsp;</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);">&nbsp;&nbsp;&nbsp;</button></td>
<td style="border: none; padding: 0px 2px 0px 0px;">&nbsp;<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">&nbsp;</td>
<td row="2" column="4" align="center">&nbsp;</td>
<td row="2" column="5" align="center" coltype="emptyCell" style="width: 48px;"><label attach="fd_3c93375a6e8256">&nbsp;</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;">&nbsp;</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(&quot;style/img/normal_opt_sprite.png&quot;) -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">&nbsp;</td>
<td row="4" column="2">&nbsp;</td>
</tr>
</tbody>
</table>

8
wms/css/function.js

@ -329,11 +329,12 @@ function login(){
password: password password: password
}, },
success: function (data) { success: function (data) {
// console.log(data);
console.log('返回的结果'); console.log('返回的结果');
res = eval("(" + data + ")"); res = eval("(" + data + ")");
console.log(res); // console.log(res);
console.log(window.location.host); // console.log(window.location.host);
console.log(res.code); // console.log(res.code);
if (res.code == '200') { if (res.code == '200') {
var token = res.token; var token = res.token;
var name = res.name; var name = res.name;
@ -347,6 +348,7 @@ function login(){
window.location.href = 'index.php?token=' + token; window.location.href = 'index.php?token=' + token;
} else { } else {
window.location.href = 'login.php?errno=1'; window.location.href = 'login.php?errno=1';
} }

3
wms/frame/api_getdata.php

@ -22,7 +22,7 @@
*/ */
$json = array("st" => "ok", "err" => "", "errCode" => ""); $json = array("st" => "ok", "err" => "", "errCode" => "");
echo '123';
/** /**
* 表單列表 * 表單列表
*/ */
@ -220,3 +220,4 @@ try {
} }
echo json_encode($json, JSON_UNESCAPED_UNICODE); echo json_encode($json, JSON_UNESCAPED_UNICODE);
return json_encode($json, JSON_UNESCAPED_UNICODE);

75
wms/mkt/pricereview-index.php

@ -37,7 +37,7 @@ if (!empty($_GET['system_id']) && !empty($_GET['flow_id'])) {
// echo '<pre>'; // echo '<pre>';
// print_r($sql_get); // print_r($sql_get);
// echo '</pre>'; // echo '</pre>';
// exit;
$result = mysqli_query($link, $sql_get); $result = mysqli_query($link, $sql_get);
if ($result == false) { if ($result == false) {
die(mysqli_error($link)); die(mysqli_error($link));
@ -93,6 +93,7 @@ if (!empty($res_get)) {
$data = mysqli_query($link, $sql); $data = mysqli_query($link, $sql);
$para = "function_name=pricereview&" . $token_link; $para = "function_name=pricereview&" . $token_link;
?> ?>
<style> <style>
#table_index2 { #table_index2 {
@ -188,6 +189,77 @@ $para = "function_name=pricereview&" . $token_link;
</p> </p>
--> -->
<?php <?php
function get_pending($token)
{
global $link;
if (!$token) throw new \Exception("token empty", 802);
list($user_id) = explode(".", $token);
$i = 1;
$data = [];
$sql = "
SELECT
t.system_id,
t.system_name,
t.flow_id,
t.flow_name,
COUNT(*)
FROM (
SELECT s.form_key,
m.system_id,
y.system_name,
m.flow_id,
m.flow_name,
m.path
FROM subflow s,
flow f,
flow_main m,
system_main y
WHERE 1=1
AND m.flow_id NOT IN ('wws04')
AND EXISTS (
SELECT form_key,
MAX(seq)
FROM subflow
GROUP BY form_key
HAVING SUBSTRING(s.form_key, 1, 10) = form_key
AND s.seq = max(seq)
)
AND SUBSTRING(s.form_key, 1, 10) = f.form_key
AND f.flow_id = m.flow_id
AND f.system_id = y.system_id
AND s.current_assigner = '$user_id'
AND f.flow_code != 'Z'
) t
GROUP BY t.system_id,
t.flow_id,
t.system_name,
t.flow_name
LIMIT 0, 6
";
$res = mysqli_query($link, $sql);
while ($row = mysqli_fetch_row($res)) {
// print_r($row);
$data[$i]["sid"] = $row[0];
$data[$i]["sname"] = $row[1];
$data[$i]["fid"] = $row[2];
$data[$i]["fname"] = $row[3];
$data[$i]["cnt"] = $row[4];
$i++;
}
mysqli_free_result($res);
return $data;
}
$result = get_pending($token);
// echo '<pre>';
// print_r($result);
// echo '</pre>';
if ($data) : if ($data) :
/* /*
if($_SERVER["REQUEST_METHOD"] == "POST"){ if($_SERVER["REQUEST_METHOD"] == "POST"){
@ -201,6 +273,7 @@ if ($data) :
?> ?>
<link rel="stylesheet" href="common.css"> <link rel="stylesheet" href="common.css">
<div style="overflow-x:auto; white-space:nowrap;"> <div style="overflow-x:auto; white-space:nowrap;">
<a href="/wms/mkt/pricereview-index.php?system_id=<?= $result[1]['sid'] ?>&flow_id=<?= $result[1]['fid'] ?>&function_name=pricereview&token=<?php echo $token; ?>" class=" btn btn-primary btn-sm"> 待我簽核</a>
<table id="table_index" class="table table-striped table-bordered" style="width:100%"> <table id="table_index" class="table table-striped table-bordered" style="width:100%">
<thead> <thead>
<tr> <tr>

5
wms/mkt/pricereview-record-check.php

@ -139,8 +139,13 @@ if (isset($_POST['status'])) {
echo "<script type ='text/JavaScript'>"; echo "<script type ='text/JavaScript'>";
if ($fromsign == 1) { if ($fromsign == 1) {
echo "location.href='../sign/list.php?system_id=prm&flow_id=prm01&function_name=show&" . $token_link . "';"; echo "location.href='../sign/list.php?system_id=prm&flow_id=prm01&function_name=show&" . $token_link . "';";
} else {
if ($user_id == "M0060") {
echo "alert('簽核成功!!!');";
echo "location.href='../sign/list.php?system_id=prm&flow_id=prm01&function_name=show&" . $token_link . "';";
} else { } else {
echo "location.href='pricereview-check.php?id=" . $id . "&function_name=pricereview&" . $token_link . "';"; echo "location.href='pricereview-check.php?id=" . $id . "&function_name=pricereview&" . $token_link . "';";
} }
}
echo "</script>"; echo "</script>";
} }

2
workflow/lib/DB.php

@ -19,7 +19,7 @@ if (file_exists($envFile)) {
class DB class DB
{ {
private static $ds = array( private static $ds = array(
'default' => array('host' => '127.0.0.1', 'db_name' => 'appwms', 'user' => 'masadaroot', 'pwd' => 'x6h5E5p#u8y') 'default' => array('host' => '127.0.0.1', 'db_name' => 'appwms', 'user' => 'masadaroot', 'pwd' => '')
); );
public static $instance; public static $instance;
/** /**

Loading…
Cancel
Save