sell info 작업중

This commit is contained in:
2023-01-04 19:02:36 +09:00
parent bfbfb2b452
commit e9e97cb51b
16 changed files with 433 additions and 108 deletions
+102 -12
View File
@@ -1,22 +1,22 @@
drop table erp.mobile_carrier; drop table mobile_carrier;
create table erp.mobile_carrier create table mobile_carrier
( (
id bigint auto_increment primary key, id bigint auto_increment primary key,
carrier_name varchar(50) not null UNIQUE, carrier_name varchar(50) not null UNIQUE,
del_yn bit default b'0' null del_yn bit default b'0' null
); );
INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(1, 'KT', 0); INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(1, 'KT', 0);
INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(2, 'SKT', 0); INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(2, 'SKT', 0);
INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(3, 'LGT', 0); INSERT INTO erp.mobile_carrier(id, carrier_name, del_yn) VALUES(3, 'LGT', 0);
drop table erp.business_partner; drop table business_partner;
create table erp.business_partner create table business_partner
( (
id bigint auto_increment primary key, id bigint auto_increment primary key,
partner_name varchar(50) not null, partner_name varchar(50) not null,
carrier_name varchar(50) not null, carrier_name varchar(50) not null,
del_yn bit default b'0' null, del_yn bit default b'0' null,
FOREIGN KEY(carrier_name) REFERENCES mobile_carrier(carrier_name) FOREIGN KEY(carrier_name) REFERENCES mobile_carrier(carrier_name)
); );
INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(1, '한빛', 'SKT', 0); INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(1, '한빛', 'SKT', 0);
INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(2, '행복', 'SKT', 0); INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(2, '행복', 'SKT', 0);
@@ -36,3 +36,93 @@ INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES
INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(16, '에스엔넷 SK', 'SKT', 0); INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(16, '에스엔넷 SK', 'SKT', 0);
INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(17, '에스엔넷 KT', 'KT', 0); INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(17, '에스엔넷 KT', 'KT', 0);
INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(18, '에스엔넷 LG', 'LGT', 0); INSERT INTO erp.business_partner (id, partner_name, carrier_name, del_yn) VALUES(18, '에스엔넷 LG', 'LGT', 0);
ALTER table erp.business_partner add column serial_yn bit default b'0';
ALTER TABLE erp.business_partner CHANGE serial_yn serial_yn bit(1) DEFAULT b'0' NULL AFTER carrier_name;
create table erp.phone
(
id bigint auto_increment primary key,
pet_name varchar(50) not null comment '아이폰,갤럭시 등',
model varchar(50) not null comment 'a2683, F711 등',
storage int not null comment '핸드폰 용량',
producer varchar(50) not null comment '제조사',
del_yn bit default b'0' null
);
create table erp.main_rate_plan
(
id bigint auto_increment primary key,
carrier_name varchar(50) not null,
plan_type varchar(50) not null default 'phone' comment '요금제 타입',
plan_name varchar(50) not null comment '요금제 이름',
price bigint null comment '요금제 가격',
del_yn bit default b'0' null,
FOREIGN KEY(carrier_name) REFERENCES mobile_carrier(carrier_name)
);
ALTER TABLE erp.main_rate_plan MODIFY COLUMN price bigint(20) DEFAULT 0 NULL COMMENT '요금제 가격';
create table erp.sub_rate_plan
(
id bigint auto_increment primary key,
carrier_name varchar(50) not null,
plan_name varchar(50) not null comment '요금제 이름',
price bigint null comment '요금제 가격',
del_yn bit default b'0' null,
FOREIGN KEY(carrier_name) REFERENCES mobile_carrier(carrier_name)
);
ALTER TABLE erp.sub_rate_plan MODIFY COLUMN price bigint(20) DEFAULT 0 NULL COMMENT '요금제 가격';
drop table menu;
create table menu
(
id varchar(10) not null,
name varchar(255) null,
url varchar(255) null,
auth varchar(255) null,
uppr_id varchar(10) not null,
active_url varchar(255) null,
sort int null,
menu_icon varchar(255) null,
del_yn bit default b'0' null,
primary key (id, uppr_id)
);
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('1', '거래처 등록', '/partner/add', 'guest', '0', null, 1, 'menuIcon01');
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('2', '요금제 등록', '/main/rate/plan/add', 'guest', '0', null, 2, 'menuIcon02');
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('3', '부가서비스 등록', '/sub/rate/plan/add', 'guest', '0', null, 3, 'menuIcon03');
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('4', '핸드폰 등록', '/phone/add', 'guest', '0', null, 4, 'menuIcon04');
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('5', '고객정보 등록', '/guest/add', 'guest', '0', null, 5, 'menuIcon05');
INSERT INTO menu (id, name, url, auth, uppr_id, active_url, sort, menu_icon) VALUES ('6', '관리자메뉴', '/admin', 'guest', '0', null, 6, 'menuIcon06');
select now() from dual;
drop table sell_info;
create table sell_info
(
id bigint auto_increment primary key,
openingDate datetime(6) not null,
birthday datetime(6) not null,
pbirthday datetime(6),
payBackDay datetime(6),
reg_dt datetime(6) default now(),
businessPartner varchar(255) not null,
mobileCarrier varchar(255) not null,
name varchar(255) not null,
phoneNumber varchar(255) not null,
pname varchar(255),
pphoneNumber varchar(255),
mainRatePlan varchar(255) not null,
subRatePlan varchar(255),
serialNumber varchar(255),
insertType varchar(255) not null,
formula varchar(255),
payBackYn varchar(255),
payBackBank varchar(255),
payBackNumber varchar(255),
installment bigint not null,
phoneId bigint not null,
usim bigint default 0,
faceValueRebate bigint,
guestMoney bigint,
introductionPay bigint,
payBack bigint,
del_yn bit default b'0' null
);
@@ -0,0 +1,47 @@
package com.ns.mobile.website.biz.entity;
import java.time.LocalDateTime;
import javax.persistence.Entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@Data
@Entity
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class SellInfo extends BaseEntity{
private LocalDateTime openingDate;
private LocalDateTime birthday;
private LocalDateTime pbirthday;
private LocalDateTime payBackDay;
private String businessPartner;
private String mobileCarrier;
private String name;
private String phoneNumber;
private String pname;
private String pphoneNumber;
private String mainRatePlan;
private String subRatePlan;
private String serialNumber;
private String insertType;
private String formula;
private String payBackYn;
private String payBackBank;
private String payBackNumber;
private long installment;
private long phoneId;
private long usim;
private long faceValueRebate;
private long guestMoney;
private long introductionPay;
private long payBack;
}
@@ -1,4 +1,4 @@
package com.ns.mobile.website.biz.model; package com.ns.mobile.website.biz.model.sell;
import java.util.List; import java.util.List;
@@ -17,7 +17,7 @@ import lombok.experimental.SuperBuilder;
@SuperBuilder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class GuestAddInfoModel{ public class SellAddInfoModel{
List<BusinessPartner> businessPartnerList; List<BusinessPartner> businessPartnerList;
List<MainRatePlan> mainRatePlanList; List<MainRatePlan> mainRatePlanList;
@@ -0,0 +1,42 @@
package com.ns.mobile.website.biz.model.sell;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class SellAddInfoParameter{
private String openingDate;
private String businessPartner;
private String mobileCarrier;
private String name;
private String birthday;
private String phoneNumber;
private String pname;
private String pbirthday;
private String pphoneNumber;
private String mainRatePlan;
private String subRatePlan;
private String serialNumber;
private long installment;
private long phoneId;
private String insertType;
private long usim;
private String formula;
private long faceValueRebate;
private long guestMoney;
private long introductionPay;
private long payBack;
private String payBackDay;
private String payBackYn;
private String payBackBank;
private String payBackNumber;
}
@@ -0,0 +1,15 @@
package com.ns.mobile.website.biz.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.ns.mobile.website.biz.entity.SellInfo;
import com.ns.mobile.website.biz.entity.SubRatePlan;
@Repository
public interface SellInfoRepository extends JpaRepository<SellInfo, Long> {
Optional<List<SellInfo>> findByDelYn(boolean delYn);
}
@@ -1,8 +0,0 @@
package com.ns.mobile.website.biz.service;
import com.ns.mobile.website.biz.model.GuestAddInfoModel;
public interface GuestService {
public GuestAddInfoModel getGuestAddInfo();
}
@@ -0,0 +1,11 @@
package com.ns.mobile.website.biz.service;
import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
public interface SellInfoService {
public SellAddInfoModel getSellAddInfo();
public void insertSellAdd(SellAddInfoParameter parameter);
}
@@ -10,13 +10,15 @@ 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.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.GuestAddInfoModel; import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
import com.ns.mobile.website.biz.repository.BusinessPartnerRepository; import com.ns.mobile.website.biz.repository.BusinessPartnerRepository;
import com.ns.mobile.website.biz.repository.MainRatePlanRepository; import com.ns.mobile.website.biz.repository.MainRatePlanRepository;
import com.ns.mobile.website.biz.repository.MobileCarrierRepository; import com.ns.mobile.website.biz.repository.MobileCarrierRepository;
import com.ns.mobile.website.biz.repository.PhoneRepository; import com.ns.mobile.website.biz.repository.PhoneRepository;
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.GuestService; import com.ns.mobile.website.biz.service.SellInfoService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -24,17 +26,19 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class GuestServiceImpl implements GuestService{ public class SellInfoServiceImpl implements SellInfoService{
private final BusinessPartnerRepository businessPartnerRepository; private final BusinessPartnerRepository businessPartnerRepository;
private final MainRatePlanRepository mainRatePlanRepository; private final MainRatePlanRepository mainRatePlanRepository;
private final MobileCarrierRepository mobileCarrierRepository; private final MobileCarrierRepository mobileCarrierRepository;
private final PhoneRepository phoneRepository; private final PhoneRepository phoneRepository;
private final SubRatePlanRepository subRatePlanRepository; private final SubRatePlanRepository subRatePlanRepository;
@Override private final SellInfoRepository sellInfoRepository;
public GuestAddInfoModel getGuestAddInfo() {
GuestAddInfoModel result = new GuestAddInfoModel(); @Override
public SellAddInfoModel getSellAddInfo() {
SellAddInfoModel result = new SellAddInfoModel();
List<BusinessPartner> businessPartnerList = businessPartnerRepository.findByDelYn(false).orElseThrow(() -> new BizApiException("거래처 조회가 실패하였습니다.")); List<BusinessPartner> businessPartnerList = businessPartnerRepository.findByDelYn(false).orElseThrow(() -> new BizApiException("거래처 조회가 실패하였습니다."));
result.setBusinessPartnerList(businessPartnerList); result.setBusinessPartnerList(businessPartnerList);
List<MainRatePlan> mainRatePlanList = mainRatePlanRepository.findByDelYn(false).orElseThrow(() -> new BizApiException("요금제 조회가 실패하였습니다.")); List<MainRatePlan> mainRatePlanList = mainRatePlanRepository.findByDelYn(false).orElseThrow(() -> new BizApiException("요금제 조회가 실패하였습니다."));
@@ -48,6 +52,11 @@ public class GuestServiceImpl implements GuestService{
return result; return result;
} }
@Override
public void insertSellAdd(SellAddInfoParameter parameter) {
sellInfoRepository.save(null);
}
} }
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ns.mobile.website.biz.service.GuestService; import com.ns.mobile.website.biz.service.SellInfoService;
import com.ns.mobile.website.web.auth.PublicAccess; import com.ns.mobile.website.web.auth.PublicAccess;
import com.ns.mobile.website.web.controller.BaseController; import com.ns.mobile.website.web.controller.BaseController;
import com.ns.mobile.website.web.properties.LaneduProperties; import com.ns.mobile.website.web.properties.LaneduProperties;
@@ -17,19 +17,19 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@Controller @Controller
public class GuestController extends BaseController { public class SellInfoController extends BaseController {
private final LaneduProperties laneduProperties; private final LaneduProperties laneduProperties;
@Autowired @Autowired
private GuestService guestService; private SellInfoService sellService;
@PublicAccess @PublicAccess
@RequestMapping(value = {"guest/add"}) @RequestMapping(value = {"sell/add"})
String home(Model model, HttpServletRequest request, HttpSession session String home(Model model, HttpServletRequest request, HttpSession session
) { ) {
model.addAttribute("version", laneduProperties.getVersion()); model.addAttribute("version", laneduProperties.getVersion());
return "guest/add"; return "sell/add";
} }
@@ -5,11 +5,13 @@ import javax.servlet.http.HttpSession;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
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.model.GuestAddInfoModel;
import com.ns.mobile.website.biz.model.ResponseResult; import com.ns.mobile.website.biz.model.ResponseResult;
import com.ns.mobile.website.biz.service.GuestService; import com.ns.mobile.website.biz.model.sell.SellAddInfoModel;
import com.ns.mobile.website.biz.model.sell.SellAddInfoParameter;
import com.ns.mobile.website.biz.service.SellInfoService;
import com.ns.mobile.website.web.auth.PublicAccess; import com.ns.mobile.website.web.auth.PublicAccess;
import com.ns.mobile.website.web.controller.BaseController; import com.ns.mobile.website.web.controller.BaseController;
@@ -19,16 +21,23 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
public class ApiGuestController extends BaseController { public class ApiSellInfoController extends BaseController {
private final GuestService guestService; private final SellInfoService sellInfoService;
@PublicAccess @PublicAccess
@PostMapping("/api/guest/add/info.api") @PostMapping("/api/sell/add/info.api")
public ResponseEntity<?> list(HttpServletRequest request, HttpSession session){ public ResponseEntity<?> addInfo(HttpServletRequest request, HttpSession session){
GuestAddInfoModel result = guestService.getGuestAddInfo(); SellAddInfoModel result = sellInfoService.getSellAddInfo();
return ResponseResult.success(result); return ResponseResult.success(result);
} }
@PublicAccess
@PostMapping("/api/sell/add.api")
public ResponseEntity<?> add(@RequestBody SellAddInfoParameter parameter, HttpServletRequest request, HttpSession session){
sellInfoService.insertSellAdd(parameter);
return ResponseResult.success();
}
// //
// @PublicAccess // @PublicAccess
// @PostMapping("/api/phone/detail.api") // @PostMapping("/api/phone/detail.api")
@@ -1,16 +0,0 @@
if (typeof (nscompany) == 'undefined') { nscompany = {}; }
if (typeof (nscompany.mobile) == 'undefined') { nscompany.mobile = {}; }
if (typeof (nscompany.mobile.api) == 'undefined') { nscompany.mobile.api = {}; }
if (typeof (nscompany.mobile.api.guest) == 'undefined') { nscompany.mobile.api.guest = {}; }
(function (_context_) {
var API_GUEST_ADD_INFO = '/api/guest/add/info.api';
// 핸드폰 전체 리스트
_context_.addInfo = function (parameter, callback) {
commonFunction(API_GUEST_ADD_INFO, parameter, callback);
};
})(nscompany.mobile.api.guest);
@@ -0,0 +1,21 @@
if (typeof (nscompany) == 'undefined') { nscompany = {}; }
if (typeof (nscompany.mobile) == 'undefined') { nscompany.mobile = {}; }
if (typeof (nscompany.mobile.api) == 'undefined') { nscompany.mobile.api = {}; }
if (typeof (nscompany.mobile.api.sell) == 'undefined') { nscompany.mobile.api.sell = {}; }
(function (_context_) {
var API_SELL_ADD_INFO = '/api/sell/add/info.api';
var API_SELL_ADD = '/api/sell/add.api';
// 핸드폰 전체 리스트
_context_.addInfo = function (parameter, callback) {
commonFunction(API_SELL_ADD_INFO, parameter, callback);
};
// 고객 정보 저장
_context_.add = function (parameter, callback) {
commonFunction(API_SELL_ADD, parameter, callback);
};
})(nscompany.mobile.api.sell);
@@ -13,24 +13,31 @@ let appVue = new Vue({
mainRatePlanList: [], mainRatePlanList: [],
subRatePlanList: [] subRatePlanList: []
}, },
openingDate : '', openingDate : '23',
businessPartner : '', businessPartner : '',
mobileCarrier: '', mobileCarrier: '',
name: '', name: '',
birthday: '', birthday: '19',
phoneNumber: '', phoneNumber: '',
pname: '', pname: '',
pbirthday: '', pbirthday: '19',
pphoneNumber: '', pphoneNumber: '',
mainRatePlan: '', mainRatePlan: '',
subRatePlan: '', subRatePlan: [],
serialNumber: '', serialNumber: '',
installment: '0', installment: '0',
petName: '', phoneId: '',
insertType: 'change', insertType: 'change',
usim: '0', usim: '0',
formula: '', formula: '',
faceValueRebate: '' faceValueRebate: '',
guestMoney: '',
introductionPay: '',
payBack: '',
payBackDay: '',
payBackYn: 'N',
payBackBank: '',
payBackNumber: ''
}, },
mounted: function () { mounted: function () {
this.init(); this.init();
@@ -44,24 +51,12 @@ let appVue = new Vue({
let $this = this; let $this = this;
$this.bindData(); $this.bindData();
$this.insertTypeChange(); $this.insertTypeChange();
$(".money").on('blur', function(e){
e.stopPropagation();
e.stopImmediatePropagation();
var value;
if(e.target.value < 100){
value = e.target.value*10000;
}else{
value = e.target.value;
}
e.target.value = $this.moneyText(value.toString());
});
}, },
bindData: function () { bindData: function () {
let $this = this; let $this = this;
let parameter = ''; let parameter = '';
nscompany.mobile.api.guest.addInfo(parameter, function (success, message, data) { nscompany.mobile.api.sell.addInfo(parameter, function (success, message, data) {
if (!success) { if (!success) {
alert(message); alert(message);
return false; return false;
@@ -77,6 +72,57 @@ let appVue = new Vue({
$('.selectpicker').selectpicker(); $('.selectpicker').selectpicker();
}); });
}, },
save: function(){
let $this = this;
//개통일 date로 변환
if($this.openingDate.length == 6){
$this.openingDate = '20' + $this.openingDate;
}
if($this.payBackDay.length == 6){
$this.payBackDay = '20' + $this.payBackDay;
}
let parameter = {
openingDate : $this.peningDate,
birthday : $this.birthday,
pbirthday : $this.pbirthday,
payBackDay : $this.payBackDay,
usim : $this.usim.replaceAll(',', ''),
faceValueRebate : $this.faceValueRebate.replaceAll(',', ''),
guestMoney : $this.guestMoney.replaceAll(',', ''),
introductionPay : $this.introductionPay.replaceAll(',', ''),
payBack : $this.payBack.replaceAll(',', ''),
businessPartner : $this.businessPartner,
mobileCarrier : $this.mobileCarrier,
name : $this.name,
phoneNumber : $this.phoneNumber,
pname : $this.pname,
pphoneNumber : $this.pphoneNumber,
mainRatePlan : $this.mainRatePlan,
subRatePlan : $this.subRatePlan.toString(),
serialNumber : $this.serialNumber,
installment : $this.installment,
phoneId : $this.phoneId,
insertType : $this.insertType,
formula : $this.formula,
payBackYn : $this.payBackYn,
payBackBank : $this.payBackBank,
payBackNumber : $this.payBackNumber,
}
console.log(parameter);
nscompany.mobile.api.sell.add(parameter, function (success, message, data) {
if (!success) {
alert(message);
return false;
}
alert("저장 되었습니다.");
//location.reload();
});
},
birthdayChange: function (){ birthdayChange: function (){
let $this = this; let $this = this;
if($this.birthday.length != 8){ //생일 입력 안됨 if($this.birthday.length != 8){ //생일 입력 안됨
@@ -137,6 +183,15 @@ let appVue = new Vue({
$('#mainRatePlan').selectpicker('refresh'); $('#mainRatePlan').selectpicker('refresh');
//$('#mainRatePlan').find(':selected').index(); //선택값쓸떄 //$('#mainRatePlan').find(':selected').index(); //선택값쓸떄
//부가서비스 셋팅
$this.view.subRatePlanList = []; //배열 초기화
Array.prototype.push.apply($this.view.subRatePlanList, $this.info.subRatePlanList.filter(function(x){
if(x.carrierName === $this.mobileCarrier){
return true;
}
}));
$('#subRatePlan').selectpicker('refresh');
//시리얼 입력 여부 //시리얼 입력 여부
if($this.info.businessPartnerList[index].serialYn){ if($this.info.businessPartnerList[index].serialYn){
$("#serialNumber").removeAttr('disabled'); $("#serialNumber").removeAttr('disabled');
@@ -172,12 +227,32 @@ let appVue = new Vue({
}, },
moneyText: function(value){ moneyText: function(value){
value = Number(value.replaceAll(',', '')); value = Number(value.replaceAll(',', ''));
if(value < 100){
value = value*10000;
}
if(isNaN(value)) { //NaN인지 판별 if(isNaN(value)) { //NaN인지 판별
return 0; return 0;
}else { //NaN이 아닌 경우 }else { //NaN이 아닌 경우
const formatValue = value.toLocaleString('ko-KR'); const formatValue = value.toLocaleString('ko-KR');
return formatValue; return formatValue;
} }
},
payBackChange: function(){
let $this = this;
if($this.payBack != ''){
$("#payBackDay").removeAttr('disabled');
$("#payBackYn").removeAttr('disabled');
$("#payBackBank").removeAttr('disabled');
$("#payBackNumber").removeAttr('disabled');
}else{
$("#payBackDay").attr('disabled', 'disabled');
$("#payBackYn").attr('disabled', 'disabled');
$("#payBackBank").attr('disabled', 'disabled');
$("#payBackNumber").attr('disabled', 'disabled');
}
} }
} }
}); });
@@ -3582,4 +3582,3 @@
})); }));
//# sourceMappingURL=bootstrap-select.js.map
@@ -18,4 +18,4 @@
<script type="text/javascript" src="/res/front/js/lib/bootstrap-select.js?v=<%=java.time.LocalDateTime.now()%>"></script> <script type="text/javascript" src="/res/front/js/lib/bootstrap-select.js?v=<%=java.time.LocalDateTime.now()%>"></script>
<script src="/res/front/js/biz/common/common.js"></script> <script src="/res/front/js/biz/common/common.js"></script>
<script src="/res/front/js/biz/api/guest-service.js?v=${timestamp}"></script> <script src="/res/front/js/biz/api/sell-service.js?v=${timestamp}"></script>
@@ -28,17 +28,17 @@
<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="22-12-29" tabindex="1"> <input type="text" class="form-control" id="openingDate" v-model="openingDate" value="221229" tabindex="1">
</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">
<select class="selectpicker show-tick" title='' data-live-search="true" id="businessPartner" v-model="businessPartner" @change="businessPartnerChange" tabindex="2" > <select class="selectpicker show-tick" data-width="100%" title='' data-live-search="true" id="businessPartner" v-model="businessPartner" @change="businessPartnerChange" tabindex="2" >
<option v-for="(x, index) in info.businessPartnerList" :index="x.id">{{x.partnerName}}</option> <option v-for="(x, index) in info.businessPartnerList" :index="x.id" :value="x.id">{{x.partnerName}}</option>
</select> </select>
</div> </div>
<label for="mobileCarrier" class="col-sm-1 col-form-label mb-3 pt-3">통신사</label> <label for="mobileCarrier" 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" readonly class="form-control" id="mobileCarrier" v-model="mobileCarrier" disabled="disabled" tabindex="3"> <input type="text" readonly class="form-control" id="mobileCarrier" v-model="mobileCarrier" disabled="disabled">
</div> </div>
</div> </div>
</div> </div>
@@ -48,36 +48,36 @@
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<label for="name" class="col-sm-2 col-form-label mb-3 pt-3">이름</label> <label for="name" 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="name" v-model="name" value="한강욱" tabindex="4"> <input type="text" class="form-control" id="name" v-model="name" value="한강욱" tabindex="3">
</div> </div>
<div class="vr p-0 m-0"></div> <div class="vr p-0 m-0"></div>
<label for="pname" class="col-sm-2 col-form-label mb-3 pt-3">법대이름</label> <label for="pname" 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="pname" v-model="pname" value="황민창" tabindex="7" disabled="disabled"> <input type="text" class="form-control" id="pname" v-model="pname" value="황민창" tabindex="6" disabled="disabled">
</div> </div>
</div> </div>
<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="5" @input="birthdayChange"> <input type="text" class="form-control" id="birthday" v-model="birthday" value="" tabindex="4" @input="birthdayChange">
</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="8" disabled="disabled"> <input type="text" class="form-control" id="pbirthday" v-model="pbirthday" value="" tabindex="7" disabled="disabled">
</div> </div>
</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">
<input type="text" class="form-control" id="phoneNumber" v-model="phoneNumber" value="" tabindex="6"> <input type="text" class="form-control" id="phoneNumber" v-model="phoneNumber" value="" tabindex="5">
</div> </div>
<div class="vr p-0"></div> <div class="vr p-0"></div>
<label for="pphoneNumber" class="col-sm-2 col-form-label mb-3">법대핸드폰번호</label> <label for="pphoneNumber" 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="pphoneNumber" v-model="pphoneNumber" value="" tabindex="9" disabled="disabled"> <input type="text" class="form-control" id="pphoneNumber" v-model="pphoneNumber" value="" tabindex="8" disabled="disabled">
</div> </div>
</div> </div>
</div> </div>
@@ -95,9 +95,11 @@
</select> </select>
</div> </div>
<div class="vr p-0 m-0"></div> <div class="vr p-0 m-0"></div>
<label for="petName" class="col-sm-2 col-form-label mb-3 pt-3">펫네임</label> <label for="phoneId" 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="petName" v-model="petName" value="아이폰12"> <select class="selectpicker show-tick" data-width="100%" title='' data-live-search="true" id="phoneId" v-model="phoneId">
<option v-for="(x, index) in info.phoneList" :index="x.id" :value="x.id">{{x.petName}} | {{x.model}}</option>
</select>
</div> </div>
</div> </div>
@@ -121,14 +123,14 @@
<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">
<select class="selectpicker show-tick" title='' data-live-search="true" id="subRatePlan" v-model="subRatePlan" > <select class="selectpicker show-tick" multiple data-width="100%" title='' data-live-search="true" id="subRatePlan" v-model="subRatePlan" >
<option v-for="(x, index) in view.subRatePlanList" :index="x.id">{{x.planName}}</option> <option v-for="(x, index) in view.subRatePlanList" :index="x.id">{{x.planName}}</option>
</select> </select>
</div> </div>
<div class="vr p-0"></div> <div class="vr p-0"></div>
<label for="mainRatePlan" class="col-sm-2 col-form-label mb-3">요금제</label> <label for="mainRatePlan" class="col-sm-2 col-form-label mb-3">요금제</label>
<div class="col-sm-3 mb-3"> <div class="col-sm-3 mb-3">
<select class="selectpicker show-tick" title='' data-live-search="true" id="mainRatePlan" v-model="mainRatePlan" > <select class="selectpicker show-tick" data-width="100%" title='' data-live-search="true" id="mainRatePlan" v-model="mainRatePlan" >
<option v-for="(x, index) in view.mainRatePlanList" :index="x.id">{{x.planName}}</option> <option v-for="(x, index) in view.mainRatePlanList" :index="x.id">{{x.planName}}</option>
</select> </select>
</div> </div>
@@ -145,62 +147,91 @@
<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/B</label> <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"> <div class="col-sm-3 mb-3 pt-3">
<input type="text" class="form-control money" 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"> <div class="row d-flex justify-content-center">
<label for="birthday" class="col-sm-2 col-form-label mb-3">고객현금</label> <label for="guestMoney" 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 money" id="birthday" value="130000"> <input type="text" class="form-control" id="guestMoney" v-model="guestMoney" value="130000" @blur="guestMoney = moneyText(guestMoney)">
</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">유심비</label> <label for="usim" 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 money" id="usim" v-model="usim" value="7700"> <input type="text" class="form-control" id="usim" v-model="usim" value="7700" @blur="usim = moneyText(usim)">
</div> </div>
</div> </div>
<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="introductionPay" 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 money" id="birthday" value="10000"> <input type="text" class="form-control" id="introductionPay" v-model="introductionPay" value="10000" @blur="introductionPay = moneyText(introductionPay)">
</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">페이백(P/B)</label> <label for="payBack" class="col-sm-2 col-form-label mb-3">페이백(P/B)</label>
<div class="col-sm-3 mb-3"> <div class="col-sm-3 mb-3">
<input type="text" class="form-control money" id="pbirthday" readonly value="30000"> <input type="text" class="form-control" id="payBack" v-model="payBack" value="30000" @input="payBackChange" @blur="payBack = moneyText(payBack)">
</div> </div>
</div> </div>
<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="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" id="birthday" value="22-12-30"> <input type="text" class="form-control" disabled id="payBackDay" v-model="payBackDay" value="22-12-30">
</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="payBackYn" 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" readonly value="지급완료"> <select class="form-select" id="payBackYn" disabled v-model="payBackYn">
<option value="N" selected>지급대기</option>
<option value="Y">지급완료</option>
</select>
</div> </div>
</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="payBackBank" 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="phoneNumber" value="하나은행"> <select class="selectpicker show-tick" disabled data-width="100%" title='' data-live-search="true" id="payBackBank" v-model="payBackBank">
<option>카카오뱅크</option>
<option>농협</option>
<option>국민</option>
<option>신한</option>
<option>우리</option>
<option>기업</option>
<option>하나</option>
<option>새마을금고</option>
<option>우체국</option>
<option>SC제일</option>
<option>대구</option>
<option>부산</option>
<option>경남</option>
<option>광주</option>
<option>신협</option>
<option>수협</option>
<option>산업</option>
<option>전북</option>
<option>제주</option>
<option>씨티</option>
<option>케이뱅크</option>
<option>토스뱅크</option>
</select>
</div> </div>
<div class="vr p-0"></div> <div class="vr p-0"></div>
<label for="pphoneNumber" class="col-sm-2 col-form-label mb-3">지급계좌번호</label> <label for="payBackNumber" 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="pphoneNumber" value="111999111222333"> <input type="text" class="form-control" disabled id="payBackNumber" v-model="payBackNumber" value="111999111222333">
</div> </div>
</div> </div>
</div> </div>
<div class="row d-flex justify-content-center">
<button type="button" class="btn btn-primary btn-round mb-3 col-sm-2" @click="save">저장</button>
</div>
</div> </div>
</div> </div>
</div> </div>
<!-- container : e--> <!-- container : e-->
<script src="/res/front/js/biz/guest/add.js?v=${timestamp}"></script> <script src="/res/front/js/biz/sell/add.js?v=${timestamp}"></script>
</body> </body>
</html> </html>