diff --git a/wms/rib02-purReceive-submit.php b/wms/T8-purReceive-submit.php similarity index 96% rename from wms/rib02-purReceive-submit.php rename to wms/T8-purReceive-submit.php index ba87bc27..aa917201 100644 --- a/wms/rib02-purReceive-submit.php +++ b/wms/T8-purReceive-submit.php @@ -1,89 +1,89 @@ - - \ No newline at end of file diff --git a/wms/rib02-purchase-submit.php b/wms/T8-purchase-submit.php similarity index 97% rename from wms/rib02-purchase-submit.php rename to wms/T8-purchase-submit.php index 13f042fa..216b4906 100644 --- a/wms/rib02-purchase-submit.php +++ b/wms/T8-purchase-submit.php @@ -1,89 +1,89 @@ - - \ No newline at end of file diff --git a/wms/T8_Authorization.php b/wms/T8_Authorization.php index a1a756ce..dce65c91 100644 --- a/wms/T8_Authorization.php +++ b/wms/T8_Authorization.php @@ -14,12 +14,13 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); var validation = ""; // var corsurl = 'http://cors-anywhere.herokuapp.com/'; // var apiurl = 'http://60.244.87.101:880//twWebAPI/GetAuth'; - var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth' + // var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth' headerParam = { UserId: 'M0000', Pwd: 'M012290493119', TimestampUTC: = $now ?>, - Sign: '= $sign ?>' + Sign: '= $sign ?>', + GroupId: 'TEST', }; obj = { type: 'get', @@ -30,7 +31,7 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); success: function(res) { validation = res.Data['CHI_Authorization']; console.log(validation); - // console.log(res); + console.log(res); // console.log() // window.parent.postMessage(validation,'http://localhost:3000'); // window.parent.postMessage(validation,'https://masada.com.tw'); @@ -40,4 +41,5 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); jQuery.ajax(obj); // return jQuery.ajax(obj); } + get_Auth(); \ No newline at end of file diff --git a/wms/T8_Authorization_from_bpm.php b/wms/T8_Authorization_from_bpm.php index 3e8708b2..7c206023 100644 --- a/wms/T8_Authorization_from_bpm.php +++ b/wms/T8_Authorization_from_bpm.php @@ -24,11 +24,13 @@ function get_Auth($user_id = "M0000", $user_password = "M012290493119") // $apiurl = 'http://10.10.145.2:880//twWebAPI/GetAuth'; // $apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth'; + //GroupId : TEST測試區 ; MASADA正式區 $headerParam = [ "UserId: $user_id", "Pwd: $user_password", "TimestampUTC: $now", - "Sign: $sign" + "Sign: $sign", + "GroupId: TEST" ]; $ch = curl_init(); @@ -51,4 +53,4 @@ function get_Auth($user_id = "M0000", $user_password = "M012290493119") curl_close($ch); } // $data = []; -// get_Auth(); +get_Auth(); diff --git a/wms/WriteOff.xlsx b/wms/WriteOff.xlsx index 61407291..6bb1cd82 100644 Binary files a/wms/WriteOff.xlsx and b/wms/WriteOff.xlsx differ diff --git a/wms/account-receivable-.xlsx b/wms/account-receivable-.xlsx deleted file mode 100644 index d5274026..00000000 Binary files a/wms/account-receivable-.xlsx and /dev/null differ diff --git a/wms/account-receivable-check.php b/wms/account-receivable-check.php deleted file mode 100644 index 4ed786aa..00000000 --- a/wms/account-receivable-check.php +++ /dev/null @@ -1,201 +0,0 @@ - - -
'; + // print_r($result); + // echo '
'; + print_r($a); + echo '
'; + // print_r($count . '-- > Success'); + // echo '
'; +// print_r($result['bonus_json']); +// echo '
未填寫
(Ex:20240101)
標準價+Option價格+與其他電梯共同分擔的費用貨價格
'; + // print_r($a); + // echo '
'; + print_r($count . '-- > Success'); + echo '
'; + // print_r($sql); + // echo '
※此信件為系統發出信件,請勿直接回覆。
'; -// print_r($apply_key); -// echo '
1.速度單位是 米/分.
2.選擇贈送M1,保養月數需填寫60.
3.標準價格未帶出,請聯係業務部建立該規格報價.
4.無機房速度20~60米 以60米為標準.
'; +// print_r($apply_key); +// echo '
'; -// print_r($salesman); -// echo '
'; +// print_r($contractSalesman); +// echo '
'; +// print_r($persons); +// echo '
diff --git a/wms/contract-repair/js/alpine.js b/wms/contract-repair/js/alpine.js index 326d6908..43991cca 100644 --- a/wms/contract-repair/js/alpine.js +++ b/wms/contract-repair/js/alpine.js @@ -320,7 +320,7 @@ const contractRepair = () => { repair_no: '', total_price: '', sign_date: '', - contract_status: '' + contract_status: '', }, step: 1, isLoading: false, @@ -874,16 +874,34 @@ const contract_edit = () => { } -const bonsIndex = () => { +const bonunsIndex = () => { return { data: { - contract_no: 'Q23080067', - client_type: '', - facility_no: '', - bons_verson: '', - receiver: '', + contract_no: contract_no, + facility_no: facility_no, + bonus_verson: bonus_verson, + receiver: receiver, maintain_month: '', - maintain_price_toal: '' + maintain_price_total: maintain_price_total, + payDaydue: payDaydue, + bonusArr: [], + contract_type: contract_type, + manager: '', + bonus_type: '', + bouns_receiver: '', + bouns_amount: '', + payDay: '', + bouns_regulation: '', + contract_manger: 'M0001', + user_id: user_id, + maintain_type: maintain_type, + pay_kind: pay_kind, + receivable_date_due: receivable_date_due, + total: total, + fee_per_st: fee_per_st, + commission_fee: commission_fee, + discount: discount + }, step: 1, isLoading: false, @@ -921,29 +939,203 @@ const bonsIndex = () => { if (!this.customize) { this.data.contract_no = res.data.BillNo; this.data.facility_no = res.data.facility; - this.data.bons_verson = res.data.bons_verson; + this.data.bonus_verson = res.data.bonuns_verson; this.data.receiver = res.data.personId; - this.data.maintain_price_toal = res.data.amount; - this.data.bons_verson = 2; + this.data.maintain_price_total = res.data.amount; + // this.data.bonuns_verson = 2; this.data.maintain_month = res.data.maintain_month; - } + this.data.payDay = res.data.payDay; + axios.get('./api/getAccount.php?accountid=' + res.data.personId).then(res => { + this.data.manager = res.data.manager; + }).catch(err => { + console.log(err); + }) + }; this.step = 2; this.isLoading = false; }).catch(err => { - + errorFn(); }) + // axios.get('./api/getAccount.php?accountid=' + this.data.receiver).then(res => { + // console.log(res); + // this.data.manager = res.result.manager; + // }).catch(err => { + // console.log(err); + // }) + }, + save() { + if (this.step == 1) { + window.history.back(); + } + }, + calBons() { + console.log(this.step); + const form = new FormData(); + form.append('cotract_no', this.data.contract_no); + form.append('bonuns_verson', this.data.bonus_verson); + form.append('contract_type', this.data.contract_type); + form.append('maintain_month', this.data.maintain_month); + form.append('maintain_price_total', this.data.maintain_price_total); + form.append('payDay', this.data.payDay); + form.append('receiver', this.data.receiver); + form.append('manager', this.data.manager); + axios.post('./api/postCalBouns.php', form).then(res => { + // console.log(res); + this.data.bonusArr = res.data.bonus_array; + console.log(this.data.bonusArr); + this.step = 3; + this.isLoading = false; + }).catch(err => { + console.log(err.response.data); + alert(err.response.data); + this.step = 2; + }) + }, + errorFn() { + let msg = ''; + for (let i = 0; i < this.fail_arr.length; i++) { + msg += this.fail_arr[i] + '、'; + } + alert(msg); }, - preStepFn() { - this.step = 1 - if (this.step == 2) { + } +} +const bonunsIndexTest = () => { + return { + data: { + bonus_verson: '2.1', + receiver: 'M0225', + maintain_month: '12', + client_type: '', + maintain_price_month: '3000', + maintain_price_total: '3000', + commission_fee: '0', + bonusArr: [], + manager: 'M0008', + bonus_type: '', + bouns_receiver: '', + bouns_amount: '', + payDay: '20240101', + bouns_regulation: '', + contract_manger: 'M0001', + paykindArr: ['請選擇月份', 1, 2, 3, 6, 12], + paykind: '', + checkbox: '', + + }, + checkbox: 0, + step: 1, + isLoading: false, + fail_arr: [], + test() { + console.log(this.data.paykind); + }, + nextStepFn() { + if (this.step == 1) { + this.checkbox = Number(this.data.checkbox); + this.step = 2; + } else if (this.step == 2) { + this.isLoading = true; + this.calBons(); } + // this.step = 3; + console.log(this.step); + console.log(this.checkbox); + + }, + nextStepKeyupFn(e) { + if (e.keyCode !== 13) return; + if (this.step == 1) { + this.step = 2; + } else if (this.step == 2) { + this.step = 3; + } + }, + getContractData() { + axios.get('./api/get.php?contract_no=' + this.data.contract_no).then(res => { + if (!res.data) { + this.step = 2; + this.isLoading = false; + return; + } + if (!this.customize) { + this.data.contract_no = res.data.BillNo; + this.data.facility_no = res.data.facility; + this.data.bonus_verson = res.data.bonuns_verson; + this.data.receiver = res.data.personId; + this.data.maintain_price_total = res.data.amount; + // this.data.bonuns_verson = 2; + this.data.maintain_month = res.data.maintain_month; + this.data.payDay = res.data.payDay; + axios.get('./api/getAccount.php?accountid=' + res.data.personId).then(res => { + this.data.manager = res.data.manager; + }).catch(err => { + console.log(err); + }) + }; + this.step = 2; + this.isLoading = false; + }).catch(err => { + errorFn(); + }) + // axios.get('./api/getAccount.php?accountid=' + this.data.receiver).then(res => { + // console.log(res); + // this.data.manager = res.result.manager; + // }).catch(err => { + // console.log(err); + // }) }, save() { - + if (this.step == 3) { + const form = new FormData(); + form.append('status', 'save'); + form.append('checkbox', this.data.checkbox); + form.append('bonuns_verson', this.data.bonus_verson); + form.append('contract_type', this.data.contract_type); + form.append('maintain_month', this.data.maintain_month); + form.append('maintain_price_total', this.data.maintain_price_total); + form.append('payDay', this.data.payDay); + form.append('receiver', this.data.receiver); + form.append('manager', this.data.manager); + form.append('paykind', this.data.paykind); + form.append('contract_manger', this.data.contract_manger); + form.append('maintain_price_month', this.data.maintain_price_month); + form.append('commission_fee', this.data.commission_fee); + form.append('client_type', this.data.client_type); + axios.post('./api/postCalBouns.php', form).then(res => { + console.log(res.data); + }).catch(err => { + console.log(err.response.data); + }) + } }, calBons() { - console.log('123'); + const form = new FormData(); + form.append('checkbox', this.data.checkbox); + form.append('bonuns_verson', this.data.bonus_verson); + form.append('contract_type', this.data.contract_type); + form.append('maintain_month', this.data.maintain_month); + form.append('maintain_price_total', this.data.maintain_price_total); + form.append('payDay', this.data.payDay); + form.append('receiver', this.data.receiver); + form.append('manager', this.data.manager); + form.append('paykind', this.data.paykind); + form.append('contract_manger', this.data.contract_manger); + form.append('maintain_price_month', this.data.maintain_price_month); + form.append('commission_fee', this.data.commission_fee); + form.append('client_type', this.data.client_type); + axios.post('./api/postCalBouns.php', form).then(res => { + // console.log(res); + this.data.bonusArr = res.data.bonus_array; + console.log(this.data.bonusArr); + this.step = 3; + this.isLoading = false; + }).catch(err => { + console.log(err.response.data); + alert(err.response.data); + this.step = 1; + }) }, errorFn() { let msg = ''; @@ -953,5 +1145,66 @@ const bonsIndex = () => { alert(msg); }, + } +} + +const renovateInput = () => { + return { + data: { + contract_no: '', + customer: '', + salesman: '', + address: '', + paykind: [0, 0, 0, 0, 0, 0, 0], + payarr: ['', 1, 2, 6, 12], + total: '', + // paykindTotal: this.total(), + }, + step: 1, + isLoading: false, + nextStepFn() { + if (this.step == 1) { + if (this.data.contract_no == '') return alert('請輸入合約號'); + this.isLoading = true; + this.getContractData(); + } else if (this.step == 2) { + console.log('1111'); + } + // this.step = 3; + }, + // 計算總共分期月數 + totalFn() { + let total = 0 + for (let i = 0; i < this.data.paykind.length; i++) { + if (this.data.paykind[i] != '0') { + total += Number(this.data.paykind[i]); + + } + } + // console.log(123); + this.data.total = total; + }, + nextStepKeyupFn() { + + }, + preStepFn() { + this.step -= 1; + console.log(this.step); + }, + getContractData() { + axios.get('../api/getContractData.php?contracttype=t&contract_no=' + this.data.contract_no, (res) => { + + }) + }, + save() { + + }, + getContractData() { + this.step = 2; + this.isLoading = false; + console.log(this.step); + + } + } } \ No newline at end of file diff --git a/wms/contract/api/testT8API.php b/wms/contract/api/testT8API.php index e7a85071..59730e98 100644 --- a/wms/contract/api/testT8API.php +++ b/wms/contract/api/testT8API.php @@ -1,19 +1,21 @@ '; // print_r($countDay); // echo ''; // exit(); -$a = 0; +$SQuantity = 2; // $b = 24 / $a; -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 12; $j++) { - $a++; - echo '
'; - print_r($a); - echo '
'; + print_r($payDay); + echo '
- - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
+ + + - - - - - - - - - - - - - - - - - - - - -