차감기능, 유선기능 추가
This commit is contained in:
@@ -40,6 +40,7 @@ public class SellInfoDto extends BaseDto{
|
|||||||
String payBackNumber;
|
String payBackNumber;
|
||||||
String etc;
|
String etc;
|
||||||
String guestKinds;
|
String guestKinds;
|
||||||
|
long deduction;
|
||||||
|
|
||||||
long installment;
|
long installment;
|
||||||
long phoneId;
|
long phoneId;
|
||||||
@@ -83,6 +84,7 @@ public class SellInfoDto extends BaseDto{
|
|||||||
.phoneId(sellInfo.getPhoneId())
|
.phoneId(sellInfo.getPhoneId())
|
||||||
.usim(sellInfo.getUsim())
|
.usim(sellInfo.getUsim())
|
||||||
.faceValueRebate(sellInfo.getFaceValueRebate())
|
.faceValueRebate(sellInfo.getFaceValueRebate())
|
||||||
|
.deduction(sellInfo.getDeduction())
|
||||||
.guestMoney(sellInfo.getGuestMoney())
|
.guestMoney(sellInfo.getGuestMoney())
|
||||||
.introductionPay(sellInfo.getIntroductionPay())
|
.introductionPay(sellInfo.getIntroductionPay())
|
||||||
.payBack(sellInfo.getPayBack())
|
.payBack(sellInfo.getPayBack())
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class SellInfo extends BaseEntity{
|
|||||||
private long disclosureSubsidy;
|
private long disclosureSubsidy;
|
||||||
private long addRebate;
|
private long addRebate;
|
||||||
private long cashRebate;
|
private long cashRebate;
|
||||||
|
private long deduction;
|
||||||
|
|
||||||
private boolean payBackYn;
|
private boolean payBackYn;
|
||||||
private boolean disclosureSubsidyYn;
|
private boolean disclosureSubsidyYn;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class SellAddInfoParameter{
|
|||||||
private long faceValueRebate;
|
private long faceValueRebate;
|
||||||
private long guestMoney;
|
private long guestMoney;
|
||||||
private long introductionPay;
|
private long introductionPay;
|
||||||
|
private long deduction;
|
||||||
private long payBack;
|
private long payBack;
|
||||||
private String payBackDay;
|
private String payBackDay;
|
||||||
private String payBackBank;
|
private String payBackBank;
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ public class SellInfoServiceImpl implements SellInfoService{
|
|||||||
.formula(parameter.getFormula())
|
.formula(parameter.getFormula())
|
||||||
.payBackYn(parameter.isPayBackYn())
|
.payBackYn(parameter.isPayBackYn())
|
||||||
.payBackBank(parameter.getPayBackBank())
|
.payBackBank(parameter.getPayBackBank())
|
||||||
|
.deduction(parameter.getDeduction())
|
||||||
.payBackNumber(parameter.getPayBackNumber())
|
.payBackNumber(parameter.getPayBackNumber())
|
||||||
.installment(parameter.getInstallment())
|
.installment(parameter.getInstallment())
|
||||||
.phoneId(parameter.getPhoneId())
|
.phoneId(parameter.getPhoneId())
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ let appVue = new Vue({
|
|||||||
insertType: 'change',
|
insertType: 'change',
|
||||||
usim: '',
|
usim: '',
|
||||||
formula: '',
|
formula: '',
|
||||||
|
addFormula: '',
|
||||||
faceValueRebate: '',
|
faceValueRebate: '',
|
||||||
guestMoney: '',
|
guestMoney: '',
|
||||||
introductionPay: '',
|
introductionPay: '',
|
||||||
@@ -44,7 +45,9 @@ let appVue = new Vue({
|
|||||||
addRebate: '',
|
addRebate: '',
|
||||||
cashRebate: '',
|
cashRebate: '',
|
||||||
etc: '',
|
etc: '',
|
||||||
guestKind: ''
|
guestKind: '',
|
||||||
|
deductionFormula: '',
|
||||||
|
deduction: ''
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.init();
|
this.init();
|
||||||
@@ -102,18 +105,12 @@ let appVue = new Vue({
|
|||||||
alert('생일을 입력하세요');
|
alert('생일을 입력하세요');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($this.phoneNumber== ''){
|
|
||||||
alert('핸드폰번호를 입력하세요');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if($this.mainRatePlan== ''){
|
if($this.mainRatePlan== ''){
|
||||||
alert('요금제를 입력하세요');
|
alert('요금제를 입력하세요');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($this.phoneId== ''){
|
|
||||||
alert('핸드폰을 선택하세요');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if($this.formula== ''){
|
if($this.formula== ''){
|
||||||
alert('리베이트 계산식을 입력하세요');
|
alert('리베이트 계산식을 입력하세요');
|
||||||
return false;
|
return false;
|
||||||
@@ -126,9 +123,19 @@ let appVue = new Vue({
|
|||||||
alert('현금수납를 입력하세요');
|
alert('현금수납를 입력하세요');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($this.factoryPrice== '' ||$this.factoryPrice== 0){
|
if($this.insertType != 'other'){
|
||||||
alert('출고가를 입력하세요');
|
if($this.phoneNumber== ''){
|
||||||
return false;
|
alert('핸드폰번호를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.phoneId== ''){
|
||||||
|
alert('핸드폰을 선택하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.factoryPrice== '' ||$this.factoryPrice== 0){
|
||||||
|
alert('출고가를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($this.disclosureSubsidy != '' && $this.disclosureSubsidy != 0 && $this.disclosureSubsidy != '0'){
|
if($this.disclosureSubsidy != '' && $this.disclosureSubsidy != 0 && $this.disclosureSubsidy != '0'){
|
||||||
$this.disclosureSubsidyYn = true;
|
$this.disclosureSubsidyYn = true;
|
||||||
@@ -136,20 +143,30 @@ let appVue = new Vue({
|
|||||||
let index = $('#businessPartner').find(':selected').index();
|
let index = $('#businessPartner').find(':selected').index();
|
||||||
//시리얼 입력 여부
|
//시리얼 입력 여부
|
||||||
if($this.info.businessPartnerList[index].serialYn){
|
if($this.info.businessPartnerList[index].serialYn){
|
||||||
let confirmAction = confirm("시리얼 번호 필수인데 그냥 입력 하시겠습니까?");
|
if($this.serialNumber == ''){
|
||||||
if (confirmAction) {
|
let confirmAction = confirm("시리얼 번호 필수인데 그냥 입력 하시겠습니까?");
|
||||||
|
if (confirmAction) {
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
debugger;
|
let realFormula = $this.formula;
|
||||||
|
if($this.addRebate != '' && $this.addRebate != 0 && $this.addRebate != '0'){
|
||||||
|
realFormula = realFormula + '+' + $this.addFormula;
|
||||||
|
}
|
||||||
|
if($this.deduction != '' && $this.deduction != 0 && $this.deduction != '0'){
|
||||||
|
realFormula = realFormula + $this.deductionFormula;
|
||||||
|
}
|
||||||
|
|
||||||
let parameter = {
|
let parameter = {
|
||||||
openingDate : $this.openingDate,
|
openingDate : $this.openingDate,
|
||||||
birthday : $this.birthday,
|
birthday : $this.birthday,
|
||||||
pbirthday : $this.pbirthday,
|
pbirthday : $this.pbirthday,
|
||||||
payBackDay : $this.payBackDay,
|
payBackDay : $this.payBackDay,
|
||||||
|
|
||||||
|
|
||||||
usim : $this.usim.replaceAll(',', ''),
|
usim : $this.usim.replaceAll(',', ''),
|
||||||
faceValueRebate : $this.faceValueRebate.replaceAll(',', ''),
|
faceValueRebate : $this.faceValueRebate.replaceAll(',', ''),
|
||||||
guestMoney : $this.guestMoney.replaceAll(',', ''),
|
guestMoney : $this.guestMoney.replaceAll(',', ''),
|
||||||
@@ -159,6 +176,7 @@ let appVue = new Vue({
|
|||||||
disclosureSubsidy : $this.disclosureSubsidy.replaceAll(',', ''),
|
disclosureSubsidy : $this.disclosureSubsidy.replaceAll(',', ''),
|
||||||
cashRebate: $this.cashRebate.replaceAll(',', ''),
|
cashRebate: $this.cashRebate.replaceAll(',', ''),
|
||||||
addRebate: $this.addRebate.replaceAll(',', ''),
|
addRebate: $this.addRebate.replaceAll(',', ''),
|
||||||
|
deduction : $this.deduction.replaceAll(',', '').replaceAll('-', ''),
|
||||||
|
|
||||||
businessPartner : $this.businessPartner,
|
businessPartner : $this.businessPartner,
|
||||||
mobileCarrier : $this.mobileCarrier,
|
mobileCarrier : $this.mobileCarrier,
|
||||||
@@ -172,7 +190,7 @@ let appVue = new Vue({
|
|||||||
installment : $this.installment,
|
installment : $this.installment,
|
||||||
phoneId : $this.phoneId,
|
phoneId : $this.phoneId,
|
||||||
insertType : $this.insertType,
|
insertType : $this.insertType,
|
||||||
formula : $this.formula,
|
formula : realFormula,
|
||||||
payBackYn : $this.payBackYn,
|
payBackYn : $this.payBackYn,
|
||||||
payBackBank : $this.payBackBank,
|
payBackBank : $this.payBackBank,
|
||||||
payBackNumber : $this.payBackNumber,
|
payBackNumber : $this.payBackNumber,
|
||||||
@@ -315,7 +333,7 @@ let appVue = new Vue({
|
|||||||
formulaChange: function(e){
|
formulaChange: function(e){
|
||||||
let $this = this;
|
let $this = this;
|
||||||
var result = 0;
|
var result = 0;
|
||||||
var calc = e.target.value; //-1-2-3 = -6
|
var calc = $this.formula+'+'+$this.addFormula + $this.deductionFormula; //-1-2-3 = -6
|
||||||
var plusList = calc.split('+');//-1-2-3
|
var plusList = calc.split('+');//-1-2-3
|
||||||
|
|
||||||
for(var i=0;i<plusList.length;i++){
|
for(var i=0;i<plusList.length;i++){
|
||||||
@@ -337,6 +355,59 @@ let appVue = new Vue({
|
|||||||
var value = result*10000;
|
var value = result*10000;
|
||||||
$this.faceValueRebate = moneyText(value.toString());
|
$this.faceValueRebate = moneyText(value.toString());
|
||||||
},
|
},
|
||||||
|
addFormulaChange: function(e){
|
||||||
|
let $this = this;
|
||||||
|
var result = 0;
|
||||||
|
var calc = $this.addFormula; //-1-2-3 = -6
|
||||||
|
var plusList = calc.split('+');//-1-2-3
|
||||||
|
|
||||||
|
for(var i=0;i<plusList.length;i++){
|
||||||
|
if(plusList[i].indexOf('-') == -1){ //only 숫자
|
||||||
|
result += Number(plusList[i]);
|
||||||
|
}else{
|
||||||
|
var subList = plusList[i].split('-');//-1-2-3
|
||||||
|
for(var j=0;j<subList.length;j++){
|
||||||
|
if(subList[j] == '' && j == 0){
|
||||||
|
|
||||||
|
}else if(subList[j] != '' && j == 0){
|
||||||
|
result +=Number(subList[j]);
|
||||||
|
}else{
|
||||||
|
result -=Number(subList[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var value = result*10000;
|
||||||
|
$this.addRebate = moneyText(value.toString());
|
||||||
|
$this.formulaChange();
|
||||||
|
},
|
||||||
|
|
||||||
|
deductionFormulaChange: function(e){
|
||||||
|
let $this = this;
|
||||||
|
var result = 0;
|
||||||
|
var calc = $this.deductionFormula; //-1-2-3 = -6
|
||||||
|
var plusList = calc.split('+');//-1-2-3
|
||||||
|
|
||||||
|
for(var i=0;i<plusList.length;i++){
|
||||||
|
if(plusList[i].indexOf('-') == -1){ //only 숫자
|
||||||
|
result += Number(plusList[i]);
|
||||||
|
}else{
|
||||||
|
var subList = plusList[i].split('-');//-1-2-3
|
||||||
|
for(var j=0;j<subList.length;j++){
|
||||||
|
if(subList[j] == '' && j == 0){
|
||||||
|
|
||||||
|
}else if(subList[j] != '' && j == 0){
|
||||||
|
result +=Number(subList[j]);
|
||||||
|
}else{
|
||||||
|
result -=Number(subList[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var value = result*10000;
|
||||||
|
$this.deduction = moneyText(value.toString());
|
||||||
|
$this.formulaChange();
|
||||||
|
},
|
||||||
callMoneyText: function(value){
|
callMoneyText: function(value){
|
||||||
return moneyText(value);
|
return moneyText(value);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="formula" class="col-sm-2 col-form-label mb-3 pt-3">계산식</label>
|
<label for="formula" class="col-sm-2 col-form-label mb-3 pt-3">계산식</label>
|
||||||
<div class="col-sm-3 mb-3 pt-3">
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
<input type="text" class="form-control" id="formula" value="1+2+4+5+6-2" v-model="formula" @input="formulaChange" tabindex="4">
|
<input type="text" class="form-control" id="formula" value="1+2+4+5+6-2" v-model="formula" @input="formulaChange" tabindex="3">
|
||||||
</div>
|
</div>
|
||||||
<div class="vr p-0 m-0"></div>
|
<div class="vr p-0 m-0"></div>
|
||||||
<label for="faceValueRebate" class="col-sm-2 col-form-label mb-3 pt-3">R(액면R/B)</label>
|
<label for="faceValueRebate" class="col-sm-2 col-form-label mb-3 pt-3">R(액면R/B)</label>
|
||||||
@@ -54,6 +54,28 @@
|
|||||||
<input type="text" class="form-control" id="faceValueRebate" v-model="faceValueRebate" disabled="disabled" value="160000">
|
<input type="text" class="form-control" id="faceValueRebate" v-model="faceValueRebate" disabled="disabled" value="160000">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row d-flex justify-content-center">
|
||||||
|
<label for="formula" class="col-sm-2 col-form-label mb-3 pt-3">추가 계산식</label>
|
||||||
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
|
<input type="text" class="form-control" id="addFormula" value="1+2+4+5+6-2" v-model="addFormula" @input="addFormulaChange" tabindex="4">
|
||||||
|
</div>
|
||||||
|
<div class="vr p-0 m-0"></div>
|
||||||
|
<label for="faceValueRebate" class="col-sm-2 col-form-label mb-3 pt-3">추가R/B</label>
|
||||||
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
|
<input type="text" class="form-control" id="addRebate" v-model="addRebate" value="130000" disabled="disabled">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row d-flex justify-content-center">
|
||||||
|
<label for="formula" class="col-sm-2 col-form-label mb-3 pt-3">차감 계산식</label>
|
||||||
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
|
<input type="text" class="form-control" id="deductionFormula" value="1+2+4+5+6-2" v-model="deductionFormula" @input="deductionFormulaChange" tabindex="4">
|
||||||
|
</div>
|
||||||
|
<div class="vr p-0 m-0"></div>
|
||||||
|
<label for="faceValueRebate" class="col-sm-2 col-form-label mb-3 pt-3">차감</label>
|
||||||
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
|
<input type="text" class="form-control" id="deduction" v-model="deduction" value="130000" disabled="disabled">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="cashRebate" class="col-sm-2 col-form-label mb-3">P(현금수납 or 상품권)</label>
|
<label for="cashRebate" class="col-sm-2 col-form-label mb-3">P(현금수납 or 상품권)</label>
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
@@ -78,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
※ 유선시 P(현금수납 or 상품권) = 고객현금 + 페이백(P/B)
|
||||||
<h5 class="mt-3 mb-3">고객정보 등록</h5>
|
<h5 class="mt-3 mb-3">고객정보 등록</h5>
|
||||||
<div class="border border-2 mb-3">
|
<div class="border border-2 mb-3">
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
@@ -189,9 +211,9 @@
|
|||||||
<h5 class="mt-3 mb-3">기타</h5>
|
<h5 class="mt-3 mb-3">기타</h5>
|
||||||
<div class="border border-2 mb-3">
|
<div class="border border-2 mb-3">
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="addRebate" class="col-sm-2 col-form-label mb-3 pt-3">추가R/B</label>
|
<label for="" class="col-sm-2 col-form-label mb-3 pt-3">공란</label>
|
||||||
<div class="col-sm-3 mb-3 pt-3">
|
<div class="col-sm-3 mb-3 pt-3">
|
||||||
<input type="text" class="form-control" id="addRebate" v-model="addRebate" value="130000" @blur="addRebate = callMoneyText(addRebate)" tabindex="23">
|
<input type="text" class="form-control" id="" value="" disabled="disabled">
|
||||||
</div>
|
</div>
|
||||||
<div class="vr p-0 m-0"></div>
|
<div class="vr p-0 m-0"></div>
|
||||||
<label for="usim" class="col-sm-2 col-form-label mb-3 pt-3">유심비</label>
|
<label for="usim" class="col-sm-2 col-form-label mb-3 pt-3">유심비</label>
|
||||||
|
|||||||
@@ -70,8 +70,10 @@
|
|||||||
<th scope="col">액면R/B</th>
|
<th scope="col">액면R/B</th>
|
||||||
<th scope="col">추가R/B</th>
|
<th scope="col">추가R/B</th>
|
||||||
<th scope="col">고객현금</th>
|
<th scope="col">고객현금</th>
|
||||||
|
|
||||||
<th scope="col">차감</th>
|
<th scope="col">차감</th>
|
||||||
<th scope="col">차감내용</th>
|
<th scope="col">차감내용</th>
|
||||||
|
|
||||||
<th scope="col">현금수납 or 유선상품권</th>
|
<th scope="col">현금수납 or 유선상품권</th>
|
||||||
<th scope="col">유심비</th>
|
<th scope="col">유심비</th>
|
||||||
<th scope="col">수수료</th>
|
<th scope="col">수수료</th>
|
||||||
@@ -126,8 +128,8 @@
|
|||||||
<td>{{callMoneyText(x.faceValueRebate)}}</td>
|
<td>{{callMoneyText(x.faceValueRebate)}}</td>
|
||||||
<td>{{callMoneyText(x.addRebate)}}</td>
|
<td>{{callMoneyText(x.addRebate)}}</td>
|
||||||
<td>{{callMoneyText(x.guestMoney)}}</td>
|
<td>{{callMoneyText(x.guestMoney)}}</td>
|
||||||
<td>0</td>
|
<td>{{callMoneyText(x.deduction)}}</td> <!-- 차감 -->
|
||||||
<td>0</td>
|
<td>0</td> <!-- 차감 내용 -->
|
||||||
<td>{{callMoneyText(x.cashRebate)}}</td>
|
<td>{{callMoneyText(x.cashRebate)}}</td>
|
||||||
<td>{{callMoneyText(x.usim)}}</td>
|
<td>{{callMoneyText(x.usim)}}</td>
|
||||||
<td>{{getFees(x)}}</td>
|
<td>{{getFees(x)}}</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user