SellInfoDto of 작성할 차례
This commit is contained in:
+20
-18
@@ -98,31 +98,33 @@ drop table sell_info;
|
|||||||
create table sell_info
|
create table sell_info
|
||||||
(
|
(
|
||||||
id bigint auto_increment primary key,
|
id bigint auto_increment primary key,
|
||||||
openingDate datetime(6) not null,
|
opening_date datetime(6) not null,
|
||||||
birthday datetime(6) not null,
|
birthday datetime(6) not null,
|
||||||
pbirthday datetime(6),
|
pbirthday datetime(6),
|
||||||
payBackDay datetime(6),
|
pay_back_day datetime(6),
|
||||||
reg_dt datetime(6) default now(),
|
reg_dt datetime(6) default now(),
|
||||||
businessPartner varchar(255) not null,
|
business_partner varchar(255) not null,
|
||||||
mobileCarrier varchar(255) not null,
|
mobile_carrier varchar(255) not null,
|
||||||
name varchar(255) not null,
|
name varchar(255) not null,
|
||||||
phoneNumber varchar(255) not null,
|
phone_number varchar(255) not null,
|
||||||
pname varchar(255),
|
pname varchar(255),
|
||||||
pphoneNumber varchar(255),
|
pphone_number varchar(255),
|
||||||
mainRatePlan varchar(255) not null,
|
main_rate_plan varchar(255) not null,
|
||||||
subRatePlan varchar(255),
|
sub_rate_plan varchar(255),
|
||||||
serialNumber varchar(255),
|
serial_number varchar(255),
|
||||||
insertType varchar(255) not null,
|
insert_type varchar(255) not null,
|
||||||
formula varchar(255),
|
formula varchar(255),
|
||||||
payBackYn varchar(255),
|
pay_back_yn varchar(255),
|
||||||
payBackBank varchar(255),
|
pay_back_bank varchar(255),
|
||||||
payBackNumber varchar(255),
|
pay_back_number varchar(255),
|
||||||
installment bigint not null,
|
installment bigint not null,
|
||||||
phoneId bigint not null,
|
phone_id bigint not null,
|
||||||
usim bigint default 0,
|
usim bigint default 0,
|
||||||
faceValueRebate bigint,
|
face_value_rebate bigint default 0,
|
||||||
guestMoney bigint,
|
guest_money bigint default 0,
|
||||||
introductionPay bigint,
|
introduction_pay bigint default 0,
|
||||||
payBack bigint,
|
pay_back bigint default 0,
|
||||||
|
factory_price bigint not null,
|
||||||
|
disclosure_subsidy bigint default 0,
|
||||||
del_yn bit default b'0' null
|
del_yn bit default b'0' null
|
||||||
);
|
);
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.ns.mobile.website.biz.dto;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import com.ns.mobile.website.biz.entity.Phone;
|
||||||
|
import com.ns.mobile.website.biz.entity.SellInfo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@SuperBuilder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SellInfoDto extends BaseDto{
|
||||||
|
|
||||||
|
LocalDate openingDate;
|
||||||
|
LocalDate birthday;
|
||||||
|
LocalDate pbirthday;
|
||||||
|
LocalDate payBackDay;
|
||||||
|
|
||||||
|
String businessPartner;
|
||||||
|
String mobileCarrier;
|
||||||
|
String name;
|
||||||
|
String phoneNumber;
|
||||||
|
String pname;
|
||||||
|
String pphoneNumber;
|
||||||
|
String mainRatePlan;
|
||||||
|
String subRatePlan;
|
||||||
|
String serialNumber;
|
||||||
|
String insertType;
|
||||||
|
String formula;
|
||||||
|
String payBackYn;
|
||||||
|
String payBackBank;
|
||||||
|
String payBackNumber;
|
||||||
|
|
||||||
|
long installment;
|
||||||
|
long phoneId;
|
||||||
|
long usim;
|
||||||
|
long faceValueRebate;
|
||||||
|
long guestMoney;
|
||||||
|
long introductionPay;
|
||||||
|
long payBack;
|
||||||
|
long factoryPrice;
|
||||||
|
long disclosureSubsidy;
|
||||||
|
boolean disclosureSubsidyYn;
|
||||||
|
|
||||||
|
public static SellInfoDto of(SellInfo sellInfo) {
|
||||||
|
|
||||||
|
SellInfoDto sellInfoDto = SellInfoDto.builder()
|
||||||
|
|
||||||
|
.build();
|
||||||
|
sellInfoDto.base(sellInfo);
|
||||||
|
|
||||||
|
return sellInfoDto;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ns.mobile.website.biz.entity;
|
package com.ns.mobile.website.biz.entity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@ import lombok.experimental.SuperBuilder;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SellInfo extends BaseEntity{
|
public class SellInfo extends BaseEntity{
|
||||||
|
|
||||||
private LocalDateTime openingDate;
|
private LocalDate openingDate;
|
||||||
private LocalDateTime birthday;
|
private LocalDate birthday;
|
||||||
private LocalDateTime pbirthday;
|
private LocalDate pbirthday;
|
||||||
private LocalDateTime payBackDay;
|
private LocalDate payBackDay;
|
||||||
|
|
||||||
private String businessPartner;
|
private String businessPartner;
|
||||||
private String mobileCarrier;
|
private String mobileCarrier;
|
||||||
@@ -43,5 +43,7 @@ public class SellInfo extends BaseEntity{
|
|||||||
private long guestMoney;
|
private long guestMoney;
|
||||||
private long introductionPay;
|
private long introductionPay;
|
||||||
private long payBack;
|
private long payBack;
|
||||||
|
private long factoryPrice;
|
||||||
|
private long disclosureSubsidy;
|
||||||
|
private boolean disclosureSubsidyYn;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,5 +38,9 @@ public class SellAddInfoParameter{
|
|||||||
private String payBackYn;
|
private String payBackYn;
|
||||||
private String payBackBank;
|
private String payBackBank;
|
||||||
private String payBackNumber;
|
private String payBackNumber;
|
||||||
|
|
||||||
|
private long factoryPrice;
|
||||||
|
private long disclosureSubsidy;
|
||||||
|
private boolean disclosureSubsidyYn;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
package com.ns.mobile.website.biz.service;
|
package com.ns.mobile.website.biz.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ns.mobile.website.biz.dto.SellInfoDto;
|
||||||
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
||||||
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
|
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
|
||||||
|
|
||||||
public interface SellInfoService {
|
public interface SellInfoService {
|
||||||
|
|
||||||
|
public List<SellInfoDto> info();
|
||||||
|
|
||||||
public SellAddInfoModel getSellAddInfo();
|
public SellAddInfoModel getSellAddInfo();
|
||||||
|
|
||||||
public void insertSellAdd(SellAddInfoParameter parameter);
|
public void insertSellAdd(SellAddInfoParameter parameter);
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
package com.ns.mobile.website.biz.service.impl;
|
package com.ns.mobile.website.biz.service.impl;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.ns.mobile.website.biz.dto.MenuDto;
|
||||||
|
import com.ns.mobile.website.biz.dto.SellInfoDto;
|
||||||
import com.ns.mobile.website.biz.entity.BusinessPartner;
|
import com.ns.mobile.website.biz.entity.BusinessPartner;
|
||||||
import com.ns.mobile.website.biz.entity.MainRatePlan;
|
import com.ns.mobile.website.biz.entity.MainRatePlan;
|
||||||
import com.ns.mobile.website.biz.entity.MobileCarrier;
|
import com.ns.mobile.website.biz.entity.MobileCarrier;
|
||||||
import com.ns.mobile.website.biz.entity.Phone;
|
import com.ns.mobile.website.biz.entity.Phone;
|
||||||
|
import com.ns.mobile.website.biz.entity.SellInfo;
|
||||||
import com.ns.mobile.website.biz.entity.SubRatePlan;
|
import com.ns.mobile.website.biz.entity.SubRatePlan;
|
||||||
import com.ns.mobile.website.biz.exception.BizApiException;
|
import com.ns.mobile.website.biz.exception.BizApiException;
|
||||||
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
||||||
@@ -19,6 +24,7 @@ import com.ns.mobile.website.biz.repository.PhoneRepository;
|
|||||||
import com.ns.mobile.website.biz.repository.SellInfoRepository;
|
import com.ns.mobile.website.biz.repository.SellInfoRepository;
|
||||||
import com.ns.mobile.website.biz.repository.SubRatePlanRepository;
|
import com.ns.mobile.website.biz.repository.SubRatePlanRepository;
|
||||||
import com.ns.mobile.website.biz.service.SellInfoService;
|
import com.ns.mobile.website.biz.service.SellInfoService;
|
||||||
|
import com.ns.mobile.website.common.util.DateUtils;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -35,6 +41,17 @@ public class SellInfoServiceImpl implements SellInfoService{
|
|||||||
private final SubRatePlanRepository subRatePlanRepository;
|
private final SubRatePlanRepository subRatePlanRepository;
|
||||||
private final SellInfoRepository sellInfoRepository;
|
private final SellInfoRepository sellInfoRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SellInfoDto> info() {
|
||||||
|
List<SellInfo> sellInfoList = sellInfoRepository.findByDelYn(false).orElseThrow(() -> new BizApiException("판매 조회가 실패하였습니다."));
|
||||||
|
List<SellInfoDto> result = new ArrayList<SellInfoDto>();
|
||||||
|
sellInfoList.forEach(e -> {
|
||||||
|
result.add(SellInfoDto.of(e));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SellAddInfoModel getSellAddInfo() {
|
public SellAddInfoModel getSellAddInfo() {
|
||||||
|
|
||||||
@@ -55,8 +72,38 @@ public class SellInfoServiceImpl implements SellInfoService{
|
|||||||
@Override
|
@Override
|
||||||
public void insertSellAdd(SellAddInfoParameter parameter) {
|
public void insertSellAdd(SellAddInfoParameter parameter) {
|
||||||
|
|
||||||
sellInfoRepository.save(null);
|
SellInfo sellInfo = SellInfo.builder()
|
||||||
|
.openingDate(DateUtils.localDate(parameter.getOpeningDate()))
|
||||||
|
.birthday(DateUtils.localDate(parameter.getBirthday()))
|
||||||
|
.pbirthday(DateUtils.localDate(parameter.getPbirthday()))
|
||||||
|
.payBackDay(DateUtils.localDate(parameter.getPayBackDay()))
|
||||||
|
.businessPartner(parameter.getBusinessPartner())
|
||||||
|
.mobileCarrier(parameter.getMobileCarrier())
|
||||||
|
.name(parameter.getName())
|
||||||
|
.phoneNumber(parameter.getPhoneNumber())
|
||||||
|
.pname(parameter.getPname())
|
||||||
|
.pphoneNumber(parameter.getPphoneNumber())
|
||||||
|
.mainRatePlan(parameter.getMainRatePlan())
|
||||||
|
.subRatePlan(parameter.getSubRatePlan())
|
||||||
|
.serialNumber(parameter.getSerialNumber())
|
||||||
|
.insertType(parameter.getInsertType())
|
||||||
|
.formula(parameter.getFormula())
|
||||||
|
.payBackYn(parameter.getPayBackYn())
|
||||||
|
.payBackBank(parameter.getPayBackBank())
|
||||||
|
.payBackNumber(parameter.getPayBackNumber())
|
||||||
|
.installment(parameter.getInstallment())
|
||||||
|
.phoneId(parameter.getPhoneId())
|
||||||
|
.usim(parameter.getUsim())
|
||||||
|
.faceValueRebate(parameter.getFaceValueRebate())
|
||||||
|
.guestMoney(parameter.getGuestMoney())
|
||||||
|
.introductionPay(parameter.getIntroductionPay())
|
||||||
|
.payBack(parameter.getPayBack())
|
||||||
|
.factoryPrice(parameter.getFactoryPrice())
|
||||||
|
.disclosureSubsidy(parameter.getDisclosureSubsidy())
|
||||||
|
.disclosureSubsidyYn(parameter.isDisclosureSubsidyYn())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
sellInfoRepository.save(sellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,17 @@ public class SellInfoController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SellInfoService sellService;
|
private SellInfoService sellService;
|
||||||
|
|
||||||
|
@PublicAccess
|
||||||
|
@RequestMapping(value = {"sell/info"})
|
||||||
|
String info(Model model, HttpServletRequest request, HttpSession session
|
||||||
|
) {
|
||||||
|
model.addAttribute("version", laneduProperties.getVersion());
|
||||||
|
return "sell/info";
|
||||||
|
}
|
||||||
|
|
||||||
@PublicAccess
|
@PublicAccess
|
||||||
@RequestMapping(value = {"sell/add"})
|
@RequestMapping(value = {"sell/add"})
|
||||||
String home(Model model, HttpServletRequest request, HttpSession session
|
String add(Model model, HttpServletRequest request, HttpSession session
|
||||||
) {
|
) {
|
||||||
model.addAttribute("version", laneduProperties.getVersion());
|
model.addAttribute("version", laneduProperties.getVersion());
|
||||||
return "sell/add";
|
return "sell/add";
|
||||||
|
|||||||
+10
@@ -1,5 +1,7 @@
|
|||||||
package com.ns.mobile.website.web.controller.home.api;
|
package com.ns.mobile.website.web.controller.home.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
@@ -8,6 +10,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.ns.mobile.website.biz.dto.SellInfoDto;
|
||||||
import com.ns.mobile.website.biz.model.ResponseResult;
|
import com.ns.mobile.website.biz.model.ResponseResult;
|
||||||
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
|
||||||
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
|
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
|
||||||
@@ -25,6 +28,13 @@ public class ApiSellInfoController extends BaseController {
|
|||||||
|
|
||||||
private final SellInfoService sellInfoService;
|
private final SellInfoService sellInfoService;
|
||||||
|
|
||||||
|
@PublicAccess
|
||||||
|
@PostMapping("/api/sell/info.api")
|
||||||
|
public ResponseEntity<?> info(HttpServletRequest request, HttpSession session){
|
||||||
|
List<SellInfoDto> result = sellInfoService.info();
|
||||||
|
return ResponseResult.success(result);
|
||||||
|
}
|
||||||
|
|
||||||
@PublicAccess
|
@PublicAccess
|
||||||
@PostMapping("/api/sell/add/info.api")
|
@PostMapping("/api/sell/add/info.api")
|
||||||
public ResponseEntity<?> addInfo(HttpServletRequest request, HttpSession session){
|
public ResponseEntity<?> addInfo(HttpServletRequest request, HttpSession session){
|
||||||
|
|||||||
@@ -5,9 +5,14 @@ if (typeof (nscompany.mobile.api.sell) == 'undefined') { nscompany.mobile.api.se
|
|||||||
|
|
||||||
(function (_context_) {
|
(function (_context_) {
|
||||||
|
|
||||||
|
var API_SELL_INFO = '/api/sell/info.api';
|
||||||
var API_SELL_ADD_INFO = '/api/sell/add/info.api';
|
var API_SELL_ADD_INFO = '/api/sell/add/info.api';
|
||||||
var API_SELL_ADD = '/api/sell/add.api';
|
var API_SELL_ADD = '/api/sell/add.api';
|
||||||
|
|
||||||
|
// 핸드폰 전체 리스트
|
||||||
|
_context_.info = function (parameter, callback) {
|
||||||
|
commonFunction(API_SELL_INFO, parameter, callback);
|
||||||
|
};
|
||||||
// 핸드폰 전체 리스트
|
// 핸드폰 전체 리스트
|
||||||
_context_.addInfo = function (parameter, callback) {
|
_context_.addInfo = function (parameter, callback) {
|
||||||
commonFunction(API_SELL_ADD_INFO, parameter, callback);
|
commonFunction(API_SELL_ADD_INFO, parameter, callback);
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ let appVue = new Vue({
|
|||||||
mainRatePlanList: [],
|
mainRatePlanList: [],
|
||||||
subRatePlanList: []
|
subRatePlanList: []
|
||||||
},
|
},
|
||||||
openingDate : '23',
|
openingDate : '',
|
||||||
businessPartner : '',
|
businessPartner : '',
|
||||||
mobileCarrier: '',
|
mobileCarrier: '',
|
||||||
name: '',
|
name: '',
|
||||||
birthday: '19',
|
birthday: '',
|
||||||
phoneNumber: '',
|
phoneNumber: '',
|
||||||
pname: '',
|
pname: '',
|
||||||
pbirthday: '19',
|
pbirthday: '',
|
||||||
pphoneNumber: '',
|
pphoneNumber: '',
|
||||||
mainRatePlan: '',
|
mainRatePlan: '',
|
||||||
subRatePlan: [],
|
subRatePlan: [],
|
||||||
@@ -37,7 +37,10 @@ let appVue = new Vue({
|
|||||||
payBackDay: '',
|
payBackDay: '',
|
||||||
payBackYn: 'N',
|
payBackYn: 'N',
|
||||||
payBackBank: '',
|
payBackBank: '',
|
||||||
payBackNumber: ''
|
payBackNumber: '',
|
||||||
|
factoryPrice: '',
|
||||||
|
disclosureSubsidy: '',
|
||||||
|
disclosureSubsidyYn: false
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.init();
|
this.init();
|
||||||
@@ -74,18 +77,57 @@ let appVue = new Vue({
|
|||||||
},
|
},
|
||||||
save: function(){
|
save: function(){
|
||||||
let $this = this;
|
let $this = this;
|
||||||
|
|
||||||
//개통일 date로 변환
|
|
||||||
if($this.openingDate.length == 6){
|
|
||||||
$this.openingDate = '20' + $this.openingDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this.payBackDay.length == 6){
|
if($this.openingDate == ''){
|
||||||
$this.payBackDay = '20' + $this.payBackDay;
|
alert('개통일을 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.businessPartner == ''){
|
||||||
|
alert('거래처를 선택하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.mobileCarrier== ''){
|
||||||
|
alert('통신사를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.name== ''){
|
||||||
|
alert('이름을 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.birthday== ''){
|
||||||
|
alert('생일을 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.phoneNumber== ''){
|
||||||
|
alert('핸드폰번호를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.mainRatePlan== ''){
|
||||||
|
alert('요금제를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.phoneId== ''){
|
||||||
|
alert('핸드폰을 선택하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.formula== ''){
|
||||||
|
alert('리베이트 계산식을 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.faceValueRebate== '' || $this.faceValueRebate== 0){
|
||||||
|
alert('액면가를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.factoryPrice== '' ||$this.factoryPrice== 0){
|
||||||
|
alert('출고가를 입력하세요');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if($this.disclosureSubsidy != '' || $this.disclosureSubsidy != 0){
|
||||||
|
$this.disclosureSubsidyYn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let parameter = {
|
let parameter = {
|
||||||
openingDate : $this.peningDate,
|
openingDate : $this.openingDate,
|
||||||
birthday : $this.birthday,
|
birthday : $this.birthday,
|
||||||
pbirthday : $this.pbirthday,
|
pbirthday : $this.pbirthday,
|
||||||
payBackDay : $this.payBackDay,
|
payBackDay : $this.payBackDay,
|
||||||
@@ -95,6 +137,8 @@ let appVue = new Vue({
|
|||||||
guestMoney : $this.guestMoney.replaceAll(',', ''),
|
guestMoney : $this.guestMoney.replaceAll(',', ''),
|
||||||
introductionPay : $this.introductionPay.replaceAll(',', ''),
|
introductionPay : $this.introductionPay.replaceAll(',', ''),
|
||||||
payBack : $this.payBack.replaceAll(',', ''),
|
payBack : $this.payBack.replaceAll(',', ''),
|
||||||
|
factoryPrice : $this.factoryPrice.replaceAll(',', ''),
|
||||||
|
disclosureSubsidy : $this.disclosureSubsidy.replaceAll(',', ''),
|
||||||
|
|
||||||
businessPartner : $this.businessPartner,
|
businessPartner : $this.businessPartner,
|
||||||
mobileCarrier : $this.mobileCarrier,
|
mobileCarrier : $this.mobileCarrier,
|
||||||
@@ -112,7 +156,9 @@ let appVue = new Vue({
|
|||||||
payBackYn : $this.payBackYn,
|
payBackYn : $this.payBackYn,
|
||||||
payBackBank : $this.payBackBank,
|
payBackBank : $this.payBackBank,
|
||||||
payBackNumber : $this.payBackNumber,
|
payBackNumber : $this.payBackNumber,
|
||||||
|
disclosureSubsidyYn : $this.disclosureSubsidyYn
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(parameter);
|
console.log(parameter);
|
||||||
nscompany.mobile.api.sell.add(parameter, function (success, message, data) {
|
nscompany.mobile.api.sell.add(parameter, function (success, message, data) {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
@@ -123,6 +169,51 @@ let appVue = new Vue({
|
|||||||
//location.reload();
|
//location.reload();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
openingDayBlur: function (){
|
||||||
|
let $this = this;
|
||||||
|
|
||||||
|
//개통일 date로 변환
|
||||||
|
if($this.openingDate.length == 4){
|
||||||
|
$this.openingDate = '2023' + $this.openingDate;
|
||||||
|
}
|
||||||
|
else if($this.openingDate.length == 6){
|
||||||
|
$this.openingDate = '20' + $this.openingDate;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
payBackgDayBlur: function (){
|
||||||
|
let $this = this;
|
||||||
|
|
||||||
|
//개통일 date로 변환
|
||||||
|
if($this.payBackDay.length == 4){
|
||||||
|
$this.payBackDay = '2023' + $this.payBackDay;
|
||||||
|
}
|
||||||
|
if($this.payBackDay.length == 6){
|
||||||
|
$this.payBackDay = '20' + $this.payBackDay;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
birthdayBlur: function (){
|
||||||
|
let $this = this;
|
||||||
|
|
||||||
|
if($this.birthday.length == 6){
|
||||||
|
if(Number($this.birthday.substr(0, 1)) < 2 ){
|
||||||
|
$this.birthday = '20' + $this.birthday;
|
||||||
|
}else{
|
||||||
|
$this.birthday = '19' + $this.birthday;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this.birthdayChange();
|
||||||
|
},
|
||||||
|
pbirthdayBlur: function (){
|
||||||
|
let $this = this;
|
||||||
|
|
||||||
|
if($this.pbirthday.length == 6){
|
||||||
|
if(Number($this.pbirthday.substr(0, 1)) < 2 ){
|
||||||
|
$this.pbirthday = '20' + $this.pbirthday;
|
||||||
|
}else{
|
||||||
|
$this.pbirthday = '19' + $this.pbirthday;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
birthdayChange: function (){
|
birthdayChange: function (){
|
||||||
let $this = this;
|
let $this = this;
|
||||||
if($this.birthday.length != 8){ //생일 입력 안됨
|
if($this.birthday.length != 8){ //생일 입력 안됨
|
||||||
@@ -228,7 +319,7 @@ let appVue = new Vue({
|
|||||||
moneyText: function(value){
|
moneyText: function(value){
|
||||||
value = Number(value.replaceAll(',', ''));
|
value = Number(value.replaceAll(',', ''));
|
||||||
|
|
||||||
if(value < 100){
|
if(value < 999){
|
||||||
value = value*10000;
|
value = value*10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
let appVue = new Vue({
|
||||||
|
mixins: [MIXIN, PAGING],
|
||||||
|
el: '#vueApp',
|
||||||
|
data: {
|
||||||
|
info :{
|
||||||
|
businessPartnerList: [],
|
||||||
|
mainRatePlanList: [],
|
||||||
|
mobileCarrierList: [],
|
||||||
|
phoneList: [],
|
||||||
|
subRatePlanList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
init: function () {
|
||||||
|
let $this = this;
|
||||||
|
$this.bindData();
|
||||||
|
},
|
||||||
|
bindData: function () {
|
||||||
|
let $this = this;
|
||||||
|
|
||||||
|
let parameter = '';
|
||||||
|
nscompany.mobile.api.sell.info(parameter, function (success, message, data) {
|
||||||
|
if (!success) {
|
||||||
|
alert(message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this.info.businessPartnerList = data.businessPartnerList;
|
||||||
|
$this.info.mainRatePlanList = data.mainRatePlanList;
|
||||||
|
$this.info.mobileCarrierList = data.mobileCarrierList;
|
||||||
|
$this.info.phoneList = data.phoneList;
|
||||||
|
$this.info.subRatePlanList = data.subRatePlanList;
|
||||||
|
|
||||||
|
console.log($this.info);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="openingDate" class="col-sm-1 col-form-label mb-3 pt-3">날짜</label>
|
<label for="openingDate" class="col-sm-1 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="openingDate" v-model="openingDate" value="221229" tabindex="1">
|
<input type="text" class="form-control" id="openingDate" v-model="openingDate" value="221229" tabindex="1" @blur="openingDayBlur">
|
||||||
</div>
|
</div>
|
||||||
<label for="businessPartner" class="col-sm-1 col-form-label mb-3 pt-3">거래처</label>
|
<label for="businessPartner" class="col-sm-1 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">
|
||||||
@@ -60,12 +60,12 @@
|
|||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="birthday" class="col-sm-2 col-form-label mb-3">생년월일</label>
|
<label for="birthday" class="col-sm-2 col-form-label mb-3">생년월일</label>
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<input type="text" class="form-control" id="birthday" v-model="birthday" value="" tabindex="4" @input="birthdayChange">
|
<input type="text" class="form-control" id="birthday" v-model="birthday" value="" tabindex="4" @input="birthdayChange" @blur="birthdayBlur">
|
||||||
</div>
|
</div>
|
||||||
<div class="vr p-0 m-0"></div>
|
<div class="vr p-0 m-0"></div>
|
||||||
<label for="pbirthday" class="col-sm-2 col-form-label mb-3">법대생년월일</label>
|
<label for="pbirthday" class="col-sm-2 col-form-label mb-3">법대생년월일</label>
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<input type="text" class="form-control" id="pbirthday" v-model="pbirthday" value="" tabindex="7" disabled="disabled">
|
<input type="text" class="form-control" id="pbirthday" v-model="pbirthday" value="" tabindex="7" disabled="disabled" @blur="pbirthdayBlur">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -120,6 +120,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row d-flex justify-content-center">
|
||||||
|
<label for="factoryPrice" class="col-sm-2 col-form-label mb-3">출고가</label>
|
||||||
|
<div class="col-sm-3 mb-3">
|
||||||
|
<input type="text" class="form-control" id="factoryPrice" v-model="factoryPrice" value="" @blur="factoryPrice = moneyText(factoryPrice)">
|
||||||
|
</div>
|
||||||
|
<div class="vr p-0 m-0"></div>
|
||||||
|
<label for="disclosureSubsidy" class="col-sm-2 col-form-label mb-3">공시지원금(안적으면 선약)</label>
|
||||||
|
<div class="col-sm-3 mb-3">
|
||||||
|
<input type="text" class="form-control" id="disclosureSubsidy" v-model="disclosureSubsidy" value="" @blur="disclosureSubsidy = moneyText(disclosureSubsidy)">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="phoneNumber" class="col-sm-2 col-form-label mb-3">부가서비스</label>
|
<label for="phoneNumber" class="col-sm-2 col-form-label mb-3">부가서비스</label>
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
@@ -178,7 +190,7 @@
|
|||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<label for="payBackDay" class="col-sm-2 col-form-label mb-3">지급예정일자</label>
|
<label for="payBackDay" class="col-sm-2 col-form-label mb-3">지급예정일자</label>
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<input type="text" class="form-control" disabled id="payBackDay" v-model="payBackDay" value="22-12-30">
|
<input type="text" class="form-control" disabled id="payBackDay" v-model="payBackDay" value="22-12-30" @blur="payBackgDayBlur">
|
||||||
</div>
|
</div>
|
||||||
<div class="vr p-0 m-0"></div>
|
<div class="vr p-0 m-0"></div>
|
||||||
<label for="payBackYn" class="col-sm-2 col-form-label mb-3">지급여부</label>
|
<label for="payBackYn" class="col-sm-2 col-form-label mb-3">지급여부</label>
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<jsp:include page="/WEB-INF/view/include/inc_head.jsp"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- wrapper : s -->
|
||||||
|
<div class="d-flex" id="wrapper">
|
||||||
|
<!-- Sidebar : s-->
|
||||||
|
<jsp:include page="/WEB-INF/view/include/inc_body_sidebar.jsp"/>
|
||||||
|
<!-- Sidebar : e-->
|
||||||
|
|
||||||
|
<!-- container : s-->
|
||||||
|
<div id="container">
|
||||||
|
<!-- header : s-->
|
||||||
|
<jsp:include page="/WEB-INF/view/include/inc_body_header.jsp"/>
|
||||||
|
<!-- header : e-->
|
||||||
|
|
||||||
|
<div class="container-fluid" id="vueApp">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- container : e-->
|
||||||
|
<script src="/res/front/js/biz/sell/info.js?v=${timestamp}"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user