|
@@ -3,7 +3,17 @@
|
|
<Modal title="创建大会员订单" v-model="bShow" class-name="order-model" :mask-closable="false" @on-visible-change="visibleChange">
|
|
<Modal title="创建大会员订单" v-model="bShow" class-name="order-model" :mask-closable="false" @on-visible-change="visibleChange">
|
|
<Form ref="member" :model="member" :show-message="false" :label-width="110">
|
|
<Form ref="member" :model="member" :show-message="false" :label-width="110">
|
|
<FormItem label="手机号" :class="{'big-stas':colr}">
|
|
<FormItem label="手机号" :class="{'big-stas':colr}">
|
|
- <Input v-model="member.phone" type="text" @on-change="pheHandler" @on-keyup="keyHandler" :maxlength="11" placeholder="请输入手机号"></Input>
|
|
|
|
|
|
+ <Input
|
|
|
|
+ class="ipt-inpt"
|
|
|
|
+ v-model="member.phone"
|
|
|
|
+ type="text"
|
|
|
|
+ @on-change="pheHandler"
|
|
|
|
+ @on-keyup="keyHandler"
|
|
|
|
+ :maxlength="11"
|
|
|
|
+ placeholder="请输入手机号"
|
|
|
|
+ :readonly="pReadon"
|
|
|
|
+ ></Input>
|
|
|
|
+ <Checkbox v-model="noPhone" @on-change="noPchange">无手机号</Checkbox>
|
|
<Spin fix class="order-spin" v-if="spinShow">
|
|
<Spin fix class="order-spin" v-if="spinShow">
|
|
<Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
|
|
<Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
|
|
</Spin>
|
|
</Spin>
|
|
@@ -70,7 +80,15 @@
|
|
<Input v-model="member.payCycle" type="tel" maxlength="2" @on-keyup="cycleHandler" @on-change="peChange" :placeholder="'请输入有效周期(单位(月),最多输入'+monthTime+'个月)'"></Input>
|
|
<Input v-model="member.payCycle" type="tel" maxlength="2" @on-keyup="cycleHandler" @on-change="peChange" :placeholder="'请输入有效周期(单位(月),最多输入'+monthTime+'个月)'"></Input>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="开始日期" v-if="creAuth == '1' && repair !== '3'">
|
|
<FormItem label="开始日期" v-if="creAuth == '1' && repair !== '3'">
|
|
- <date-sigle ref="sigleRef" :placeholderd="'请选择开始日期'" @startDate="startDate" :overTime="overTime"></date-sigle>
|
|
|
|
|
|
+ <date-sigle
|
|
|
|
+ ref="sigleRef"
|
|
|
|
+ :placeholderd="'请选择开始日期'"
|
|
|
|
+ @startDate="startDate"
|
|
|
|
+ :overTime="overTime"
|
|
|
|
+ class="no-pass"
|
|
|
|
+ :beginDis="noPass"
|
|
|
|
+ ></date-sigle>
|
|
|
|
+ <Checkbox v-model="noPass" @on-change="noTchange">暂不开通</Checkbox >
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem class="table-order1">
|
|
<FormItem class="table-order1">
|
|
<Table
|
|
<Table
|
|
@@ -158,6 +176,9 @@
|
|
:multipled="false"
|
|
:multipled="false"
|
|
></b-upload>
|
|
></b-upload>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <FormItem label="公司名称">
|
|
|
|
+ <Input v-model="member.companyName" type="text" :maxlength="8" placeholder="请输入公司名称"></Input>
|
|
|
|
+ </FormItem>
|
|
<FormItem label="备注">
|
|
<FormItem label="备注">
|
|
<Input v-model="member.remark" type="text" :maxlength="40" placeholder="请输入备注"></Input>
|
|
<Input v-model="member.remark" type="text" :maxlength="40" placeholder="请输入备注"></Input>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -185,10 +206,16 @@ export default {
|
|
proDis:function() {
|
|
proDis:function() {
|
|
if (this.member.phone == '') {
|
|
if (this.member.phone == '') {
|
|
return true
|
|
return true
|
|
- } else if (!(/^1[3456789]\d{9}$/.test(this.member.phone))) {
|
|
|
|
- return true
|
|
|
|
} else {
|
|
} else {
|
|
- return false
|
|
|
|
|
|
+ if (this.noPhone) {
|
|
|
|
+ return false
|
|
|
|
+ } else {
|
|
|
|
+ if (!(/^1[3456789]\d{9}$/.test(this.member.phone))) {
|
|
|
|
+ return true
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -207,6 +234,7 @@ export default {
|
|
this.member.supplyPayMoney = ''
|
|
this.member.supplyPayMoney = ''
|
|
this.member.payCycle = ''
|
|
this.member.payCycle = ''
|
|
this.member.contractUrl = ''
|
|
this.member.contractUrl = ''
|
|
|
|
+ this.member.companyName = ''
|
|
this.member.remark = ''
|
|
this.member.remark = ''
|
|
this.sumSel = []
|
|
this.sumSel = []
|
|
this.sPrice = 0
|
|
this.sPrice = 0
|
|
@@ -233,125 +261,143 @@ export default {
|
|
keyHandler() {
|
|
keyHandler() {
|
|
this.member.phone = this.member.phone.replace(/[^\d]/g,'')
|
|
this.member.phone = this.member.phone.replace(/[^\d]/g,'')
|
|
},
|
|
},
|
|
- pheHandler() {// 填写手机号并验证
|
|
|
|
- this.member.phone = this.member.phone.replace(/[^\d]/g,'')
|
|
|
|
- if (this.member.phone) {
|
|
|
|
- if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
|
|
|
|
- this.spinShow = true
|
|
|
|
- this.initialized()
|
|
|
|
- this.$request('/order/isOpenBig').data({// 验证手机号权限
|
|
|
|
- phone: this.member.phone
|
|
|
|
- }).success((res) => {
|
|
|
|
- this.bigStas = res.data.Bigstatus
|
|
|
|
- this.subStas = res.data.isSub
|
|
|
|
- this.isYears = res.data.isYear
|
|
|
|
- this.overTime = res.data.endTime
|
|
|
|
- this.stopTime = getDateSub('', res.data.endTime)
|
|
|
|
- this.serData = []
|
|
|
|
- this.pacData = []
|
|
|
|
- this.datas2 = []
|
|
|
|
- if (res.data.isYear == 0) {
|
|
|
|
- this.yearStas = 10
|
|
|
|
- } else if (res.data.isYear == 1) {
|
|
|
|
- this.yearStas = 12
|
|
|
|
- }
|
|
|
|
- this.currentServer()
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.spinShow = false
|
|
|
|
- if (this.member.products == 1) {
|
|
|
|
- if (this.bigStas == 1) {
|
|
|
|
- if (this.subStas == 1) {
|
|
|
|
- this.colr = ''
|
|
|
|
- this.downDis = false
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.getServed('')
|
|
|
|
- this.sumSel = []
|
|
|
|
- this.radioDis1 = false
|
|
|
|
- this.radioDis2 = true
|
|
|
|
- this.radioDis3 = true
|
|
|
|
- this.member.createType = '1'
|
|
|
|
- this.repair = 1
|
|
|
|
- this.monthTime = 60
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.downDis = true
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.getServed('')
|
|
|
|
- this.sumSel = []
|
|
|
|
- this.radioDis1 = true
|
|
|
|
- this.radioDis2 = false
|
|
|
|
- this.radioDis3 = false
|
|
|
|
- this.member.createType = '2'
|
|
|
|
- this.repair = 2
|
|
|
|
- this.monthTime = this.stopTime
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.colr = ''
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.creAuth = '1'
|
|
|
|
- }
|
|
|
|
- this.downDis = false
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.getServed('')
|
|
|
|
- this.sumSel = []
|
|
|
|
- this.radioDis1 = false
|
|
|
|
- this.radioDis2 = true
|
|
|
|
- this.radioDis3 = true
|
|
|
|
- this.member.createType = '1'
|
|
|
|
- this.repair = 1
|
|
|
|
- this.monthTime = 60
|
|
|
|
- }
|
|
|
|
|
|
+ noPchange(val) {
|
|
|
|
+ if (val) {
|
|
|
|
+ this.pReadon = true
|
|
|
|
+ this.member.phone = 9 + String(Math.random()).substring(2,12)
|
|
|
|
+ this.overTime = 0
|
|
|
|
+ this.pheHandler()
|
|
|
|
+ } else {
|
|
|
|
+ this.pReadon = false
|
|
|
|
+ this.member.phone = ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ reged() {
|
|
|
|
+ this.spinShow = true
|
|
|
|
+ this.initialized()
|
|
|
|
+ this.$request('/order/isOpenBig').data({// 验证手机号权限
|
|
|
|
+ phone: this.member.phone
|
|
|
|
+ }).success((res) => {
|
|
|
|
+ this.bigStas = res.data.Bigstatus
|
|
|
|
+ this.subStas = res.data.isSub
|
|
|
|
+ this.isYears = res.data.isYear
|
|
|
|
+ this.overTime = res.data.endTime
|
|
|
|
+ this.stopTime = getDateSub('', res.data.endTime)
|
|
|
|
+ this.serData = []
|
|
|
|
+ this.pacData = []
|
|
|
|
+ this.datas2 = []
|
|
|
|
+ if (res.data.isYear == 0) {
|
|
|
|
+ this.yearStas = 10
|
|
|
|
+ } else if (res.data.isYear == 1) {
|
|
|
|
+ this.yearStas = 12
|
|
|
|
+ }
|
|
|
|
+ this.currentServer()
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.spinShow = false
|
|
|
|
+ if (this.member.products == 1) {
|
|
|
|
+ if (this.bigStas == 1) {
|
|
|
|
+ if (this.subStas == 1) {
|
|
|
|
+ this.colr = ''
|
|
|
|
+ this.downDis = false
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.getServed('')
|
|
|
|
+ this.sumSel = []
|
|
|
|
+ this.radioDis1 = false
|
|
|
|
+ this.radioDis2 = true
|
|
|
|
+ this.radioDis3 = true
|
|
|
|
+ this.member.createType = '1'
|
|
|
|
+ this.repair = 1
|
|
|
|
+ this.monthTime = 60
|
|
}
|
|
}
|
|
- } else if (this.member.products == 2) {
|
|
|
|
- if (this.bigStas == 0) {
|
|
|
|
- if (this.subStas == 0) {
|
|
|
|
- this.colr = '此手机号无大会员权限'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- }
|
|
|
|
- } else if (this.bigStas == 2) {
|
|
|
|
- this.colr = '此手机号已有大会员权限,无需再次创建'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- } else {
|
|
|
|
- if (this.subStas == 1) {
|
|
|
|
- this.colr = '此手机号已是大会员子账号'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- } else {
|
|
|
|
- this.colr = ''
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.creAuth = '2'
|
|
|
|
- this.getServed('')
|
|
|
|
- this.sumSel = []
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.downDis = true
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.getServed('')
|
|
|
|
+ this.sumSel = []
|
|
|
|
+ this.radioDis1 = true
|
|
|
|
+ this.radioDis2 = false
|
|
|
|
+ this.radioDis3 = false
|
|
|
|
+ this.member.createType = '2'
|
|
|
|
+ this.repair = 2
|
|
|
|
+ this.monthTime = this.stopTime
|
|
}
|
|
}
|
|
- } else if (this.member.products == 3) {
|
|
|
|
- if (this.bigStas == 0) {
|
|
|
|
- if (this.subStas == 0) {
|
|
|
|
- this.colr = '此手机号无大会员权限'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- }
|
|
|
|
- } else if (this.bigStas == 2) {
|
|
|
|
- this.colr = '此手机号已有大会员权限,无需再次创建'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- } else {
|
|
|
|
- if (this.subStas == 1) {
|
|
|
|
- this.colr = '此手机号已是大会员子账号'
|
|
|
|
- this.creAuth = ''
|
|
|
|
- } else {
|
|
|
|
- this.colr = ''
|
|
|
|
- if (this.nums == 0) {
|
|
|
|
- this.creAuth = '3'
|
|
|
|
- }
|
|
|
|
- this.getServed('')
|
|
|
|
- this.sumSel = []
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.colr = ''
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.creAuth = '1'
|
|
|
|
+ }
|
|
|
|
+ this.downDis = false
|
|
|
|
+ this.getServed('')
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.sumSel = []
|
|
|
|
+ this.radioDis1 = false
|
|
|
|
+ this.radioDis2 = true
|
|
|
|
+ this.radioDis3 = true
|
|
|
|
+ this.member.createType = '1'
|
|
|
|
+ this.repair = 1
|
|
|
|
+ this.monthTime = 60
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (this.member.products == 2) {
|
|
|
|
+ if (this.bigStas == 0) {
|
|
|
|
+ if (this.subStas == 0) {
|
|
|
|
+ this.colr = '此手机号无大会员权限'
|
|
|
|
+ this.creAuth = ''
|
|
|
|
+ }
|
|
|
|
+ } else if (this.bigStas == 2) {
|
|
|
|
+ this.colr = '此手机号已有大会员权限,无需再次创建'
|
|
|
|
+ this.creAuth = ''
|
|
|
|
+ } else {
|
|
|
|
+ if (this.subStas == 1) {
|
|
|
|
+ this.colr = '此手机号已是大会员子账号'
|
|
|
|
+ this.creAuth = ''
|
|
|
|
+ } else {
|
|
|
|
+ this.colr = ''
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.creAuth = '2'
|
|
|
|
+ this.getServed('')
|
|
|
|
+ this.sumSel = []
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (this.member.products == 3) {
|
|
|
|
+ if (this.bigStas == 0) {
|
|
|
|
+ if (this.subStas == 0) {
|
|
|
|
+ this.colr = '此手机号无大会员权限'
|
|
|
|
+ this.creAuth = ''
|
|
|
|
+ }
|
|
|
|
+ } else if (this.bigStas == 2) {
|
|
|
|
+ this.colr = '此手机号已有大会员权限,无需再次创建'
|
|
|
|
+ this.creAuth = ''
|
|
|
|
+ } else {
|
|
|
|
+ if (this.subStas == 1) {
|
|
|
|
+ this.colr = '此手机号已是大会员子账号'
|
|
|
|
+ this.creAuth = ''
|
|
} else {
|
|
} else {
|
|
- this.member.products = ''
|
|
|
|
|
|
+ this.colr = ''
|
|
|
|
+ if (this.nums == 0) {
|
|
|
|
+ this.creAuth = '3'
|
|
|
|
+ }
|
|
|
|
+ this.getServed('')
|
|
|
|
+ this.sumSel = []
|
|
}
|
|
}
|
|
- }, 500)
|
|
|
|
- }).post()
|
|
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.member.products = ''
|
|
|
|
+ }
|
|
|
|
+ }, 500)
|
|
|
|
+ }).post()
|
|
|
|
+ },
|
|
|
|
+ pheHandler() {// 填写手机号并验证
|
|
|
|
+ this.member.phone = this.member.phone.replace(/[^\d]/g,'')
|
|
|
|
+ if (this.member.phone) {
|
|
|
|
+ if (this.pReadon) {
|
|
|
|
+ this.reged()
|
|
|
|
+ } else {
|
|
|
|
+ if ((/^1[3456789]\d{9}$/.test(this.member.phone))) {
|
|
|
|
+ this.reged()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -665,14 +711,26 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ timeReg(val) {
|
|
|
|
+ return new Date(ChangeDate(val).replace(/-/g, '/') + ' 00:00:00').getTime() / 1000
|
|
|
|
+ },
|
|
startDate(val) {
|
|
startDate(val) {
|
|
if (val) {
|
|
if (val) {
|
|
- this.member.beginTime = new Date(ChangeDate(val).replace(/-/g, '/') + ' 00:00:00').getTime() / 1000
|
|
|
|
|
|
+ this.member.beginTime = this.timeReg(val)
|
|
} else {
|
|
} else {
|
|
this.member.beginTime = ''
|
|
this.member.beginTime = ''
|
|
}
|
|
}
|
|
this.cycleTime()
|
|
this.cycleTime()
|
|
},
|
|
},
|
|
|
|
+ noTchange(val) {
|
|
|
|
+ if (val) {
|
|
|
|
+ this.$refs.sigleRef.dataVals = '2099-01-01'
|
|
|
|
+ this.member.beginTime = this.timeReg('2099-01-01')
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs.sigleRef.dataVals = ''
|
|
|
|
+ this.member.beginTime = ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
payBlur() {
|
|
payBlur() {
|
|
if (this.member.paySub) {
|
|
if (this.member.paySub) {
|
|
this.datas1.splice(1,1,{
|
|
this.datas1.splice(1,1,{
|
|
@@ -690,7 +748,7 @@ export default {
|
|
this.member.orderMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
|
|
this.member.orderMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
|
|
}
|
|
}
|
|
this.member.subMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
|
|
this.member.subMoney = parseInt(this.member.paySub==''?0:this.member.paySub) * 2000
|
|
- if (this.member.subMoney == 0) {
|
|
|
|
|
|
+ if (this.member.paySub == '') {
|
|
this.subDis = true
|
|
this.subDis = true
|
|
this.member.subPayMoney =''
|
|
this.member.subPayMoney =''
|
|
} else {
|
|
} else {
|
|
@@ -967,6 +1025,7 @@ export default {
|
|
serversId: this.nums == 0?String(serId):'',
|
|
serversId: this.nums == 0?String(serId):'',
|
|
serversName: this.nums == 0?String(serName):'',
|
|
serversName: this.nums == 0?String(serName):'',
|
|
serversArr: serveData,
|
|
serversArr: serveData,
|
|
|
|
+ companyName: this.member.companyName,
|
|
remark: this.member.remark
|
|
remark: this.member.remark
|
|
}
|
|
}
|
|
this.urlReq('/order/createBigOrder', obj)
|
|
this.urlReq('/order/createBigOrder', obj)
|
|
@@ -981,6 +1040,7 @@ export default {
|
|
contractUrl: this.member.contractUrl,
|
|
contractUrl: this.member.contractUrl,
|
|
isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
|
|
isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
|
|
payMoney: parseInt(this.member.payMoney * 100),
|
|
payMoney: parseInt(this.member.payMoney * 100),
|
|
|
|
+ companyName: this.member.companyName,
|
|
remark: this.member.remark
|
|
remark: this.member.remark
|
|
}
|
|
}
|
|
this.urlReq('/order/createSubOrder', obj)
|
|
this.urlReq('/order/createSubOrder', obj)
|
|
@@ -994,6 +1054,7 @@ export default {
|
|
contractUrl: this.member.contractUrl,
|
|
contractUrl: this.member.contractUrl,
|
|
isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
|
|
isAll: this.isAll ? 1 : this.member.contractUrl ? 3 : 2,
|
|
payMoney: parseInt(this.member.payMoney * 100),
|
|
payMoney: parseInt(this.member.payMoney * 100),
|
|
|
|
+ companyName: this.member.companyName,
|
|
remark: this.member.remark
|
|
remark: this.member.remark
|
|
}
|
|
}
|
|
this.urlReq('/order/createSupplyOrder', obj)
|
|
this.urlReq('/order/createSupplyOrder', obj)
|
|
@@ -1012,6 +1073,10 @@ export default {
|
|
this.member.salesperson = ''
|
|
this.member.salesperson = ''
|
|
this.member.level = ''
|
|
this.member.level = ''
|
|
this.nums = ''
|
|
this.nums = ''
|
|
|
|
+ this.spinShow = false
|
|
|
|
+ this.noPhone = false
|
|
|
|
+ this.noPass = false
|
|
|
|
+ this.pReadon = false
|
|
this.initialized()
|
|
this.initialized()
|
|
},500)
|
|
},500)
|
|
} else {
|
|
} else {
|
|
@@ -1039,6 +1104,9 @@ export default {
|
|
subDis: true,
|
|
subDis: true,
|
|
supplyDis: true,
|
|
supplyDis: true,
|
|
sArr: [],
|
|
sArr: [],
|
|
|
|
+ noPhone: false,
|
|
|
|
+ noPass: false,
|
|
|
|
+ pReadon: false,
|
|
isDisable: false,
|
|
isDisable: false,
|
|
selectList: [],
|
|
selectList: [],
|
|
member: {
|
|
member: {
|
|
@@ -1061,6 +1129,7 @@ export default {
|
|
bigPayMoney: '',
|
|
bigPayMoney: '',
|
|
subPayMoney: '',
|
|
subPayMoney: '',
|
|
supplyPayMoney: '',
|
|
supplyPayMoney: '',
|
|
|
|
+ companyName: '',
|
|
remark: ''
|
|
remark: ''
|
|
},
|
|
},
|
|
isAll: false,
|
|
isAll: false,
|