Add: send mail - maestro upgrade

This commit is contained in:
2018-09-20 17:34:54 +09:00
parent bffc63996a
commit a27eaa37d2
8 changed files with 361 additions and 123 deletions
+82 -26
View File
@@ -15,28 +15,7 @@
$("#header").load("admin_header.html");
});
function getMaestroData() {
var maestroID = 1;
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
// "./../server/mail/send_mail_bank_info.php",
"./../server/mail/send_mail_test.php",
"type=get_maestro_data" + "&maestro_id=" + maestroID,
function(jsonData) {
console.log(jsonData);
// showErrorMessage("마에스트로 계정이 정상적으로 등록되었습니다.", "success");
// loadMaestroList("");
},
function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error");
}
);
}
function sendMailBankInfo() {
function sendMailRegisterBankInfo() {
var maestroName = "삼화초";
var email = "jisangs@daum.net";
var accountType = 1;
@@ -44,7 +23,7 @@
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
// "./../server/mail/send_mail_bank_info.php",
"./../server/mail/send_mail_test.php",
"type=sendMailBankInfo" + "&maestro_name=" + maestroName + "&email=" + email + "&account_type=" + accountType,
"type=sendMailRegisterBankInfo" + "&maestro_name=" + maestroName + "&email=" + email + "&account_type=" + accountType,
function(jsonData) {
console.log(jsonData);
@@ -59,7 +38,7 @@
);
}
function sendMailRegistered() {
function sendMailRegisterDone() {
var maestroName = "삼화초";
var email = "jisangs@daum.net";
var accountType = 1;
@@ -82,6 +61,75 @@
);
}
function sendMailUpgradeBankInfo() {
var maestroName = "삼화초";
var email = "jisangs@daum.net";
var accountType = 1;
var upgradeAccountType = 3;
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
// "./../server/mail/send_mail_bank_info.php",
"./../server/mail/send_mail_test.php",
"type=sendMailUpgradeBankInfo" + "&maestro_name=" + maestroName + "&email=" + email + "&account_type=" + accountType + "&upgrade_account_type=" + upgradeAccountType,
function(jsonData) {
console.log(jsonData);
// showErrorMessage("마에스트로 계정이 정상적으로 등록되었습니다.", "success");
// loadMaestroList("");
},
function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error");
}
);
}
function sendMailUpgradeDone() {
var maestroName = "삼화초";
var email = "jisangs@daum.net";
var accountType = 1;
var upgradeAccountType = 3;
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
// "./../server/mail/send_mail_bank_info.php",
"./../server/mail/send_mail_test.php",
"type=sendMailUpgradeDone" + "&maestro_name=" + maestroName + "&email=" + email + "&account_type=" + accountType + "&upgrade_account_type=" + upgradeAccountType,
function(jsonData) {
console.log(jsonData);
// showErrorMessage("마에스트로 계정이 정상적으로 등록되었습니다.", "success");
// loadMaestroList("");
},
function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error");
}
);
}
function getMaestroData() {
var maestroID = 1;
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
// "./../server/mail/send_mail_bank_info.php",
"./../server/mail/send_mail_test.php",
"type=get_maestro_data" + "&maestro_id=" + maestroID,
function(jsonData) {
console.log(jsonData);
// showErrorMessage("마에스트로 계정이 정상적으로 등록되었습니다.", "success");
// loadMaestroList("");
},
function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error");
}
);
}
</script>
</head>
@@ -98,9 +146,17 @@
<div id="message_box"></div>
<button type="button" class="btn btn-primary" onClick="sendMailBankInfo()">[ 마에 ] 입금 계좌 안내 메일 발송</button>
<button type="button" class="btn btn-primary" onClick="sendMailRegisterBankInfo()">[ 마에 ] 입금 계좌 안내 메일 발송</button>
<button type="button" class="btn btn-primary" onClick="sendMailRegistered()">[ 마에 ] 등록 완료 메일 발송</button>
<button type="button" class="btn btn-primary" onClick="sendMailRegisterDone()">[ 마에 ] 등록 완료 메일 발송</button>
<br/>
<br/>
<button type="button" class="btn btn-primary" onClick="sendMailUpgradeBankInfo()">[ 마에 ] 업그레이드 - 입금 계좌 안내 메일 발송</button>
<button type="button" class="btn btn-primary" onClick="sendMailUpgradeDone()">[ 마에 ] 업그레이드 완료 메일 발송</button>
<br/>
<br/>
<button type="button" class="btn btn-secondary" onClick="getMaestroData()">마에스트로 데이터 테스트</button>
+17 -12
View File
@@ -68,7 +68,7 @@
+ " <input type='text' class='maestro_upgrade_id d-none' disabled value='" + jsonList[i].maestroUpgradeID + "'>"
+ " <input type='text' class='maestro_id d-none' disabled value='" + jsonList[i].maestroID + "'>"
+ " <input type='text' class='col-sm' disabled value='" + jsonList[i].maestroName + "'>"
+ " <input type='text' class='col-sm' disabled value='" + accoutType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='registered_account_type col-sm' disabled value='" + accoutType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='new_account_type col-sm' disabled value='" + accoutType(jsonList[i].requestedAccountType) + "'>"
+ " <input type='text' class='col-sm' disabled value='" + NumberUtil.numberWithCommas(price(jsonList[i].requestedAccountType, jsonList[i].registeredAccountType)) + "'>"
+ " <input type='text' class='col-sm' disabled value='" + jsonList[i].requestedDateTime + "'>"
@@ -82,7 +82,7 @@
+ " <input type='text' class='maestro_upgrade_id d-none' disabled value='" + jsonList[i].maestroUpgradeID + "'>"
+ " <input type='text' class='maestro_id d-none' disabled value='" + jsonList[i].maestroID + "'>"
+ " <input type='text' class='col-sm text-success' disabled value='" + jsonList[i].maestroName + "'>"
+ " <input type='text' class='col-sm text-success' disabled value='" + accoutType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='registered_account_type col-sm text-success' disabled value='" + accoutType(jsonList[i].registeredAccountType) + "'>"
+ " <input type='text' class='new_account_type col-sm text-success' disabled value='" + accoutType(jsonList[i].requestedAccountType) + "'>"
+ " <input type='text' class='col-sm text-success' disabled value='" + NumberUtil.numberWithCommas(price(jsonList[i].requestedAccountType, jsonList[i].registeredAccountType)) + "'>"
+ " <input type='text' class='col-sm text-success' disabled value='" + jsonList[i].requestedDateTime + "'>"
@@ -111,35 +111,40 @@
// var maestroID = $(inputButton).siblings(".maestro_id");
// var id = maestroID.text();
// var accountType = $(inputButton).siblings(".requested_account_type");
// var newAccountType = accoutTypeValue(accountType.val());
// var upgradeAccountType = accoutTypeValue(accountType.val());
var children = inputButton.parentElement.childNodes;
var maestroUpgradeID;
var maestroID;
var newAccountType;
var registeredAccountType;
var upgradeAccountType;
for (var i=0; i < children.length; i++) {
// console.log(children);
if (children[i].className == "maestro_upgrade_id d-none") {
maestroUpgradeID = children[i].value;
continue;
}
if (children[i].className == "maestro_id d-none") {
} else if (children[i].className == "maestro_id d-none") {
maestroID = children[i].value;
continue;
}
if (children[i].className == "new_account_type col-sm") {
// newAccountType = children[i].value;
newAccountType = accoutTypeValue(children[i].value);
} else if (children[i].className == "registered_account_type col-sm") {
// upgradeAccountType = children[i].value;
registeredAccountType = accoutTypeValue(children[i].value);
continue;
} else if (children[i].className == "new_account_type col-sm") {
// upgradeAccountType = children[i].value;
upgradeAccountType = accoutTypeValue(children[i].value);
continue;
}
}
// console.log(maestroUpgradeID);
// console.log(maestroID);
// console.log(newAccountType);
// console.log(registeredAccountType);
// console.log(upgradeAccountType);
// return;
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
"./../server/admin/upgrade_maestro.php",
"maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + maestroID + "&new_account_type=" + newAccountType,
"maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + maestroID + "&registered_account_type=" + registeredAccountType+ "&upgrade_account_type=" + upgradeAccountType,
function(jsonData) {
loadMaestroUpgradeList("");