Browse Source

20240112

main
Cheng 1 year ago
parent
commit
b180f0a181
  1. 175
      wms/contract/api/testT8API.php
  2. 8
      wms/mkt/pricereview-index.php

175
wms/contract/api/testT8API.php

@ -1,66 +1,109 @@
<?php &nbsp;
require_once('../../T8_Authorization_from_bpm.php'); <link rel="stylesheet" name="dynamicTableStyle" type="text/css" href="/sys/xform/designer/standardtable/tablestyle/tb_normal_lightweight/standardtable.css">
require_once('../connt8.php'); <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;}">
<tbody>
$validation = get_Auth(); <tr style="height: 30px;">
$data = [ <td row="0" column="0" class="td_normal_title" style="width: auto; height: auto;">&nbsp;</td>
[ <td row="0" column="1" class="" style="">&nbsp;</td>
"name" => "OtherStockOutMtable", <td row="0" column="2">&nbsp;</td>
"rows" => [ </tr>
[ <tr>
"BillNo" => "00850110", // 單據編號 varchar(20) <td row="1" column="0">&nbsp;</td>
"BillDate" => 20210427, // 單據日期 int <td row="1" column="1">&nbsp;</td>
"OrgId" => "1000", //組織 varchar(20) <td row="1" column="2">&nbsp;</td>
"FOrgId" => "1000", //核算組織 varchar(20) </tr>
"TypeId" => "OS", //單據類型 varchar(10) <tr style="height: 30px;">
"BizPartnerId" => "", //往來對象(供應商) 可為空 <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>
"PersonId" => "C0003", // 經辦人員 varchar(20) <td row="2" column="1">&nbsp;</td>
"DeptId" => "250", // 經辦部門 varchar(20) <td row="2" column="2">&nbsp;</td>
"CompId" => "1001" // 公司 varchar(20) </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>
"name" => "OtherStockOutDetail", <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>
"rows" => [ <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">
"BillNo" => "00850110", //單據編號 varchar(20) <ul class="lui-flow-rotundity-list">
"RowCode" => 1, // 序號 int(10) <li><span class="spot"></span>
"MaterialId" => "MX00021003", // 產品代碼 -> 產品集成 varchar(40) <p class="title"></p>
"SupplyOrgId" => "1000", // 供貨組織代碼 varchar(20) </li>
"SQuantity" => 1, // 交易數量 numeric(19) <li><span class="spot" style=""></span>
"WarehouseId" => "100" // 倉庫代碼 varchar(20) <p class="title"></p>
] </li>
] <li><span class="spot" style=""></span>
] <p class="title"></p>
]; </li>
$api_url = 'https://erp.masada.com.tw:780/twWebAPI/V1/STKOTHERSTOCKOUT/PostERPData'; </ul>
$header = [ </div>
"CHI_Authorization :" . $validation </div>
]; </td>
$ch = curl_init(); <td row="3" column="1">&nbsp;</td>
curl_setopt($ch, CURLOPT_URL, $api_url); // 设置请求的URL <td row="3" column="2">&nbsp;</td>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); </tr>
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); <tr>
curl_setopt($ch, CURLOPT_HTTPHEADER, $header); <td row="4" column="0">
curl_setopt($ch, CURLOPT_POST, 1); <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">
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); <tbody>
<tr class="tr_normal_title" type="titleRow" style="height: 33px;">
$response = curl_exec($ch); <td row="0" column="0" align="center" class="td_normal_title" coltype="selectCol" style="width: 15px;"></td>
if ($response === false) { <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>
echo 'Curl error: ' . curl_error($ch); <td row="0" column="2" align="center" class="td_normal_title"></td>
} else { <td row="0" column="3" align="center" class="td_normal_title"></td>
$result = json_decode($response, true); <td row="0" column="4" align="center" class="td_normal_title"></td>
if ($result['Status'] == 'Error') { <td row="0" column="5" align="center" class="td_normal_title" coltype="blankTitleCol" style="width: 48px;"></td>
echo '<pre>'; </tr>
print_r($result); <tr type="templateRow">
echo '</pre>'; <td row="1" column="0" align="center" coltype="selectCol" style="width: 15px;"><input type="checkbox" name="DocList_Selected"></td>
echo 'API 傳入錯誤,' . $result['ErrorMsg']; <td row="1" column="1" align="center" coltype="noTemplate" style="width: 25px;"><label attach="fd_3c93375a6e8256">1</label></td>
} else { <td row="1" column="2" align="center"></td>
echo '<pre>'; <td row="1" column="3" align="center"></td>
print_r($result['Status']); <td row="1" column="4" align="center"></td>
echo '</pre>'; <td row="1" column="5" align="center" coltype="copyCol" style="width: 48px;">
return $result; <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">
curl_close($ch); <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/mkt/pricereview-index.php

@ -28,9 +28,9 @@ if (!empty($_GET['system_id']) && !empty($_GET['flow_id'])) {
$where_system_id $where_system_id
$where_flow_id $where_flow_id
"; ";
echo '<pre>'; // echo '<pre>';
print_r($sql_get); // print_r($sql_get);
echo '</pre>'; // echo '</pre>';
$result = mysqli_query($link, $sql_get); $result = mysqli_query($link, $sql_get);
if ($result == false) { if ($result == false) {
@ -63,7 +63,7 @@ if (!empty($_GET['system_id']) && !empty($_GET['flow_id'])) {
$data = array(); $data = array();
// sql語法存在變數中 // sql語法存在變數中
$sql_cmd = sql_myself($user_id, "pricereview_main .creater"); $sql_cmd = sql_myself($user_id, "pricereview_main .creater");
$sql = "select pricereview_main.*, contract_new_apply.status as applystatus, contract_new_apply.progress as applyprogress from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where pricereview_main.creater = '$user_id' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id"; $sql = "SELECT pricereview_main.*, contract_new_apply.status AS applystatus, contract_new_apply.progress AS applyprogress FROM pricereview_main LEFT JOIN contract_new_apply ON pricereview_main.id = contract_new_apply.mid where pricereview_main.creater = '$user_id' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id";
// M0024許伃廷,M0107許紓晴,,M0175陳君敏,M0189權限全開 // M0024許伃廷,M0107許紓晴,,M0175陳君敏,M0189權限全開
if ($user_id == "M0024" || $user_id == 'M0026' || $user_id == "M0107" || $user_id == "M0174" || $user_id == "M0175" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") { if ($user_id == "M0024" || $user_id == 'M0026' || $user_id == "M0107" || $user_id == "M0174" || $user_id == "M0175" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'"; $sql_cmd = "where create_at >= '2023-01-01 00:00:00'";

Loading…
Cancel
Save