Browse Source

測試發貨單API

gary
Ellin 1 year ago
parent
commit
7c02e7768f
  1. BIN
      wms/WriteOff.xlsx
  2. 101
      wms/rib-test.php
  3. 2
      wms/rib-test02.php
  4. 2
      wms/rib01-check.php

BIN
wms/WriteOff.xlsx

Binary file not shown.

101
wms/rib-test.php

@ -1,86 +1,67 @@
<?php <?php
include "T8_Authorization.php"; include "T8_Authorization.php";
echo "應付確認單"; echo "發貨單";
?> ?>
<script> <script>
console.log(<?=$now ?>);
get_Auth(); get_Auth();
window.addEventListener('message', function(event) { window.addEventListener('message', function(event) {
if (event.origin === "http://localhost:3000" && (typeof event.data === "string")) { if (event.origin === "http://localhost:3000" && (typeof event.data === "string")) {
var validation = event.data; var validation = event.data;
console.log("event"); console.log("成功要到認證");
console.log(validation); console.log(validation);
// var corsurl = 'http://cors-anywhere.herokuapp.com/'; // var corsurl = 'http://cors-anywhere.herokuapp.com/';
var apiurl = 'http://60.244.87.101:880/twWebAPI/V1/APCHECKBILL/PostERPData'; var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/V1/SALDISPATCHLIST/PostERPData';
headerParam = { headerParam = {
CHI_Authorization: `${validation}`, CHI_Authorization: `${validation}`,
}; };
var body = [{ var body = [{
"name": "MasterTable", "name": "salDispatchListMaster",
"rows": [{ "rows": [{
"BillNo": "Z004", "BillNo": "TEST03",
"BillDate": 20231030, "BillDate": 20231108,
"SupplyFOrgId": "1000",
"FOrgId": "1000",
"TypeId": "SP",
"OrgId": "1000", "OrgId": "1000",
"TypeId": "OPV",
"IsPriceWithTax":1,
"IsCounteract":1,
"BizPartnerId": "03051501",
"CurrId": "RMB",
"CurrOAmount":1,
"CurrLAmount":4,
"TaxId": "ST101",
"PersonId": "M0012",
"DeptId": "220",
"CompId": "1001", "CompId": "1001",
"CreditAgeDate": 20230930, "ModeId": "T",
"RecBizPartnerId": "03051501" "BizPartnerId": "M230575",
"PersonId": "M0122",
"CurrId": "TWD",
"CurrOAmount": 1,
"CurrLAmount": 1,
"TrusteeWarehouseId": "",
"SendGoodsDate": 20231108,
"DueToId": "M230575",
"TaxId": "ST005",
"CreditorOrgId": "1000",
"CreditorCompId": "1001",
"CreditorCurrOAmount": 1,
"CreditorCurrLAmount": 1,
"TradeConditionId": "",
"TrusteeWarehouseBPType": 0,
"CurrentState":2
}] }]
}, },
{ {
"name": "DetailTable", "name": "salDispatchListDetail",
"rows": [{ "rows": [{
"BillNo": "Z004", "SupplyCompId": "1001",
"RowCode": 1, "SupplyOrgId": "1000",
"RowNo": 1, "DispatchCompId": "1001",
"ItemType": 0, "DispatchOrgId": "1000",
"TaxId": "ST101", "SQuantity": "1",
"MaterialId": "MX00000001", "TaxId": "ST005",
"UnitId": "PCS", "BillNo": "TEST03",
"MaterialSpec": "", "RowCode": 1,
"SQuantity":10, "ItemType": 0,
"SPrice":100, "MaterialId": "3JX05302",
}, "SUnitId": "SET",
// { "SPrice": "150000",
// "BillNo": "Z002", "WarehouseId":"100"
// "RowCode": 2, }]
// "RowNo": 2,
// "ItemType": 0,
// "MaterialId": "MX00000001",
// "UnitId": "PCS",
// "MaterialSpec": "",
// "SQuantity": 15,
// // "SPrice": 210,
// "OAmountWithTax": 3150,
// // "OTax": 100.84,
// // "OAmountWithTax": 2117.7,
// "TaxId": "ST005"
// }
]
} }
// ,
// {
// "name":"apCheckBillInvInfo",
// "rows":[{
// "BillNo":"Z003",
// "RowCode":1,
// "RowNo":1,
// "InvoiceNo":"ap12345678",
// "InvoiceId":25,
// "TaxId":"ST005",
// "LAmountWithTax":105
// }]
// }
]; ];
var json = JSON.stringify(body); var json = JSON.stringify(body);
obj = { obj = {

2
wms/rib-test02.php

@ -11,7 +11,7 @@ $sign = hash_hmac('SHA256', $data, '964C834F7BF2BB70', false);
var api_key = '964C834F7BF2BB70'; var api_key = '964C834F7BF2BB70';
var validation = ""; var validation = "";
// var corsurl = 'http://cors-anywhere.herokuapp.com/'; // var corsurl = 'http://cors-anywhere.herokuapp.com/';
var apiurl = 'http://60.244.87.101:880//twWebAPI/GetAuth'; var apiurl = 'http://60.244.87.101:780//twWebAPI/GetAuth';
headerParam = { headerParam = {
UserId: 'M0000', UserId: 'M0000',
Pwd: 'M012290493119', Pwd: 'M012290493119',

2
wms/rib01-check.php

@ -335,7 +335,7 @@ $feetype = mysqli_fetch_all($feetype_query, MYSQLI_ASSOC);
?> ?>
<div style="width: 80%;"> <div style="width: 80%;">
<?php <?php
if (($state == 0)||($user_id='M0056') || $user_id=='M0209') : if (($state == 0)||($user_id=='M0056') || $user_id=='M0209') :
?> ?>
<a href="rib02-create.php?id=<?php echo $data['rib_id'] ?>&RowCode=<?= $RowCode ?>&CurrId=<?= $CurrId ?>&<?= $token_link ?>" class="btn btn-info btn-lg pull-right" style="margin: 1 rem;"> <a href="rib02-create.php?id=<?php echo $data['rib_id'] ?>&RowCode=<?= $RowCode ?>&CurrId=<?= $CurrId ?>&<?= $token_link ?>" class="btn btn-info btn-lg pull-right" style="margin: 1 rem;">
<span class=" glyphicon glyphicon-plus"></span> <span class=" glyphicon glyphicon-plus"></span>

Loading…
Cancel
Save