You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

118 lines
4.1 KiB

const pricereviewCreate = ()=>{
return {
init(){
console.log(123);
},
modalShow:{
elevator: false,
},
total_spec:0,
elevators:[],
modalElevatorInfo:{
spec:'',
person:'',
weight:'',
stop:'',
speed:'',
permitNumber:'', //許可證號碼
brand:'', //品牌
m1:0, //贈送M1
months:12, //保養月數(月)
cycle:'EM', // 保養週期
checkYear:'', //竣工檢查年度
lastDate:'', // 上次年檢日期
yearCheckFee:'', //年檢費用
price:'', //公司發布價(月)
qty:'', //電梯數量
sale_price:'', //契約報價
},
openCreateElevatorModal(){
this.modalShow.elevator = true;
body.style.overflow = 'hidden';
},
hideCreateElevatorModal(){
this.modalShow.elevator = false;
body.style.overflow = 'auto';
this.modalElevatorInfo = {
spec:'',
person:'',
weight:'',
stop:'',
speed:'',
permitNumber:'',
brand:'',
m1:0,
months:'',
cycle:'',
checkYear:'',
lastDate:'',
yearCheckFee:'',
price:'',
qty:'',
sale_price:'',
};
},
createElevatorFn(){
this.total_spec ++;
this.elevators.push({
id: this.total_spec,
spec: this.modalElevatorInfo.spec,
person: this.modalElevatorInfo.person,
weight: this.modalElevatorInfo.weight,
stop: this.modalElevatorInfo.stop,
speed: this.modalElevatorInfo.speed,
permitNumber: this.modalElevatorInfo.permitNumber,
brand: this.modalElevatorInfo.brand,
m1: this.modalElevatorInfo.m1,
months: this.modalElevatorInfo.months,
cycle: this.modalElevatorInfo.cycle,
checkYear: this.modalElevatorInfo.checkYear,
lastDate: this.modalElevatorInfo.lastDate,
yearCheckFee: this.modalElevatorInfo.yearCheckFee,
price: this.modalElevatorInfo.price,
qty: this.modalElevatorInfo.qty,
sale_price: this.modalElevatorInfo.sale_price
})
this.hideCreateElevatorModal();
},
copyElevator(idx){
const spec = this.elevators[idx].spec;
const person = this.elevators[idx].person;
const stop = this.elevators[idx].stop;
const weight = this.elevators[idx].weight
const speed = this.elevators[idx].speed;
const permitNumber = this.elevators[idx].permitNumber;
const brand = this.elevators[idx].brand;
const m1 = this.elevators[idx].m1;
const months = this.elevators[idx].months;
const cycle = this.elevators[idx].cycle;
const checkYear = this.elevators[idx].checkYear;
const lastDate = this.elevators[idx].lastDate;
const yearCheckFee = this.elevators[idx].yearCheckFee;
const price = this.elevators[idx].price;
const qty = this.elevators[idx].qty;
const sale_price = this.elevators[idx].sale_price;
this.total_spec ++;
this.elevators.push({
id: this.total_spec,
spec: spec,
person: person,
stop: stop,
weight:weight,
speed: speed,
permitNumber: permitNumber,
brand: brand,
m1: m1,
months: months,
cycle: cycle,
checkYear: checkYear,
lastDate: lastDate,
yearCheckFee: yearCheckFee,
price: price,
qty: qty,
sale_price: sale_price
})
},
}
}