|
@@ -23,6 +23,12 @@
|
|
|
<v-cascader ref="casRef1" :initVal="'d01'" placeholderType="请选择下单渠道" reqType="下单渠道"
|
|
|
@levelChange="channelChange" v-if="bShow"></v-cascader>
|
|
|
</FormItem>
|
|
|
+ <FormItem label="购买主体" required>
|
|
|
+ <RadioGroup v-model="member.buySubject" @on-change="radiosChange" >
|
|
|
+ <Radio label="1" style="marginRight:30px" :disabled="radio_dis || finish_dis ">个人</Radio>
|
|
|
+ <Radio label="2" :disabled="radio_dis || finish_dis ">企业</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </FormItem>
|
|
|
<!-- <FormItem label="订单时间" prop="createTime">
|
|
|
<date-sigle ref="sigleRef2" :dateType="'datetime'" :placeholderd="'请选择订单时间'" @startDate="orderDate" :overTime="0"></date-sigle>
|
|
|
</FormItem> -->
|
|
@@ -48,7 +54,10 @@
|
|
|
<!-- 我的订单不支持编辑产品类型 -->
|
|
|
<Select v-model="member.products" placeholder="请选择产品类型(暂不支持数据导出)" @on-change="proChange"
|
|
|
:disabled="proDis || interested || typeRestriction">
|
|
|
- <Option v-for="item in bigPro" :value="item.v" :key="item.v">{{ item.n }}</Option>
|
|
|
+ <!-- <Option v-for="item in bigPro" :value="item.v" :key="item.v">{{ item.n }}</Option> -->
|
|
|
+ <Option value="1" >大会员</Option>
|
|
|
+ <Option value="2" :disabled="member.buySubject=='2'">大会员子账号</Option>
|
|
|
+ <Option value="3" :disabled="member.buySubject=='2'">大会员补充包</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="计费模式" prop="billingMode">
|
|
@@ -63,6 +72,9 @@
|
|
|
<date-sigle ref="sigleRef3" :dateType="'date'" :dataV="member.sale_time" :placeholderd="'请选择业绩统计时间'"
|
|
|
@startDate="saleDate" :overTime="0"></date-sigle>
|
|
|
</FormItem>
|
|
|
+ <FormItem label="购买数量" required v-if="member.buySubject == '2'">
|
|
|
+ <Input v-model="member.buyCount" type="tel" maxlength="4" @on-keyup="buyHandler" placeholder="请填写购买数量" :disabled="finish_dis"></Input>
|
|
|
+ </FormItem>
|
|
|
<FormItem label="会员套餐" v-if="creAuth == '1'" prop="level">
|
|
|
<Select v-model="member.level" placeholder="请选择会员套餐" @on-change="leChange" @on-select="leSelect"
|
|
|
:disabled="interested">
|
|
@@ -286,7 +298,7 @@
|
|
|
:multipled="false"
|
|
|
></b-upload>
|
|
|
</FormItem>
|
|
|
- <FormItem label="公司名称" prop="">
|
|
|
+ <FormItem label="公司名称" prop="" :required="member.buySubject == '2'">
|
|
|
<Input v-model.trim="member.companyName" type="text" :maxlength="40" placeholder="请输入公司名称"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="备注">
|
|
@@ -335,6 +347,7 @@ import bUpload from '@/components/uploadFile.vue'
|
|
|
import saleSelect from './salesSelect.vue'
|
|
|
import reviewRecord from './reviewRecord.vue'
|
|
|
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
vCascader,
|
|
@@ -427,6 +440,31 @@ export default {
|
|
|
},500)
|
|
|
}).post()
|
|
|
},
|
|
|
+ radiosChange(val) {
|
|
|
+ this.member.buySubject = String(val)
|
|
|
+ this.member.buyCount = ''
|
|
|
+ this.creAuth = this.member.products
|
|
|
+
|
|
|
+ if(val==2){
|
|
|
+ // this.member.products=''
|
|
|
+ this.repair='1'
|
|
|
+ this.member.createType='1'
|
|
|
+ this.member.subPayMoney=0
|
|
|
+ }
|
|
|
+ this.member.level=''
|
|
|
+ this.nums=''
|
|
|
+ this.datas2=[]
|
|
|
+ // this.initialized()
|
|
|
+ this.reged()
|
|
|
+ if(this.member.buySubject==this.show_buy_subject){
|
|
|
+ this.show(this.olddata)
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(this.repair,this.member.createType,'切换服务状态')
|
|
|
+ },
|
|
|
+ buyHandler() {
|
|
|
+ this.member.buyCount=this.member.buyCount.replace(/[^\d]+/g,'')
|
|
|
+ },
|
|
|
clearReview() {
|
|
|
this.bShow = false
|
|
|
this.orderReview.pass = '通过'
|
|
@@ -567,7 +605,7 @@ export default {
|
|
|
paybackChange(val) {
|
|
|
this.member.paybackCompany = String(val)
|
|
|
},
|
|
|
- reged() {
|
|
|
+ reged(val) {
|
|
|
this.spinShow = true
|
|
|
// this.initialized()
|
|
|
this.$request('/order/isOpenBig').data({// 验证手机号权限
|
|
@@ -591,7 +629,8 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.spinShow = false
|
|
|
if (res.data.comingIntoEffective && !this.readonly) {
|
|
|
- this.$Modal.warning({
|
|
|
+ if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
+ this.$Modal.warning({
|
|
|
title: '警告提示',
|
|
|
content: '该用户存在即将生效的大会员订单,无法编辑订单',
|
|
|
okText: '我知道了',
|
|
@@ -599,9 +638,13 @@ export default {
|
|
|
this.bShow = false
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
+ console.log(this.member.products,this.member.buySubject)
|
|
|
if (this.member.products == 1) {
|
|
|
- if (this.bigStas == 1) {
|
|
|
+ if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
+ if (this.bigStas == 1) {
|
|
|
if (this.subStas == 1) {
|
|
|
this.colr = ''
|
|
|
this.downDis = false
|
|
@@ -667,6 +710,35 @@ export default {
|
|
|
this.monthTime = 60
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ }else{
|
|
|
+ console.log('企业',this.member.buySubject)
|
|
|
+ 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
|
|
|
+ //编辑订单时手机号修改建通自定义跳转
|
|
|
+ // if (this.member.oldPhone !== this.member.phone) {
|
|
|
+ // this.member.createType = '1'
|
|
|
+ // } else {
|
|
|
+ // this.member.createType = this.member.oldCreateType
|
|
|
+ // }
|
|
|
+ // this.repair = this.member.createType
|
|
|
+ //企业自定义走新建
|
|
|
+ this.member.createType = '1'
|
|
|
+ this.repair = '1'
|
|
|
+ this.monthTime = 60
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (this.member.createType == '3') {
|
|
|
this.monthTime = 60 - this.stopTime
|
|
|
}
|
|
@@ -769,7 +841,8 @@ export default {
|
|
|
s_name: "自定义",
|
|
|
s_servers: ""
|
|
|
}
|
|
|
- if (this.bigStas == 1) {
|
|
|
+ if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
+ if (this.bigStas == 1) {
|
|
|
if (this.subStas == 1) {
|
|
|
this.colr = ''
|
|
|
} else {
|
|
@@ -779,6 +852,13 @@ export default {
|
|
|
this.colr = ''
|
|
|
this.downDis = false
|
|
|
}
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.colr = ''
|
|
|
+ this.downDis = false
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}).get()
|
|
|
}
|
|
|
if (val == 2 || val == 3) {
|
|
@@ -805,9 +885,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
tipFunc(val) {
|
|
|
- if (val) {
|
|
|
+
|
|
|
return val.toLocaleString('zh', {style: 'currency', currency: 'CNY'})
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
currentServer() {// 获取用户当前已享有的服务
|
|
|
this.currentId = this.curIds
|
|
@@ -880,12 +960,38 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (v.i_ispackage == 1) {
|
|
|
+
|
|
|
let countStr = this.supplys ? this.supplys.filter(s => {
|
|
|
return Number(s.id) == v.id
|
|
|
}).map(t => {
|
|
|
return t.count
|
|
|
}) : []
|
|
|
- this.pacData.push({
|
|
|
+ console.log(this.member.level,this.member.buySubject)
|
|
|
+ if(this.member.buySubject!=this.show_buy_subject){
|
|
|
+ this.pacData.push({
|
|
|
+ id: v.id,
|
|
|
+ s_name: v.s_name,
|
|
|
+ i_pkprice: v.i_pkprice,
|
|
|
+ s_pkcount: v.s_pkcount,
|
|
|
+ b_pkcount: '',
|
|
|
+ count: Number(String(countStr))
|
|
|
+ })
|
|
|
+ console.log(this.member.supplyMoney)
|
|
|
+ this.member.supplyMoney='0'
|
|
|
+ this.member.sums='0'
|
|
|
+ this.member.supplyPayMoney=0
|
|
|
+ // if (Number(String(countStr)) / v.s_pkcount) {
|
|
|
+ // this.datas2.push({
|
|
|
+ // id: v.id,
|
|
|
+ // name: v.s_name,
|
|
|
+ // price: v.i_pkprice,
|
|
|
+ // s_pkcount: v.s_pkcount,
|
|
|
+ // count: Number(String(countStr)) / v.s_pkcount ? Number(String(countStr)) / v.s_pkcount : ''
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.pacData.push({
|
|
|
id: v.id,
|
|
|
s_name: v.s_name,
|
|
|
i_pkprice: v.i_pkprice,
|
|
@@ -902,6 +1008,9 @@ export default {
|
|
|
count: Number(String(countStr)) / v.s_pkcount ? Number(String(countStr)) / v.s_pkcount : ''
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
let arr1 = {
|
|
@@ -964,6 +1073,7 @@ export default {
|
|
|
s_pkcount: null,
|
|
|
_checked: false
|
|
|
}
|
|
|
+
|
|
|
if (this.repair == '1' || this.repair == '2') {
|
|
|
if (!(this.currentId.indexOf(17) > -1) && !(this.currentId.indexOf(18) > -1)) {
|
|
|
resList.splice(1, 0, arr1)
|
|
@@ -1002,14 +1112,19 @@ export default {
|
|
|
this.sumSel = []
|
|
|
this.serData.forEach(k => {
|
|
|
if (this.repair == '1') {
|
|
|
+ console.log(this.currentId,this.equity,'新服务选中ID,和权益是否开通')
|
|
|
if (k.id == 1) {
|
|
|
k._checked = true
|
|
|
k._disabled = true
|
|
|
}
|
|
|
- if (!this.equity) {
|
|
|
- if (this.currentId.indexOf(k.id) > -1) {
|
|
|
+ //原有逻辑已开通不回显勾选
|
|
|
+ // if (!this.equity) {
|
|
|
+ // if (this.currentId.indexOf(k.id) > -1) {
|
|
|
+ // k._checked = true
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (this.currentId.indexOf(k.id) > -1) {
|
|
|
k._checked = true
|
|
|
- }
|
|
|
}
|
|
|
if (k._checked) {
|
|
|
this.sumSel.push(k)
|
|
@@ -1095,7 +1210,8 @@ export default {
|
|
|
// if (check && val !== undefined) {
|
|
|
// this.allCancel()
|
|
|
// }
|
|
|
- if (this.bigStas == 1) {
|
|
|
+ if(this.member.buySubject!='2'){//主体为个体走原有逻辑
|
|
|
+ if (this.bigStas == 1) {
|
|
|
if (this.subStas == 1) {
|
|
|
this.radioDis1 = false
|
|
|
this.radioDis2 = true
|
|
@@ -1148,6 +1264,28 @@ export default {
|
|
|
this.myNoTchange()
|
|
|
}
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.radioDis1 = false
|
|
|
+ this.radioDis2 = true
|
|
|
+ this.radioDis3 = true
|
|
|
+ //避免初始化权益修改自定义内容
|
|
|
+ // if (this.member.oldPhone !== this.member.phone) {
|
|
|
+ // this.member.createType = '1'
|
|
|
+ // this.repair = '1'
|
|
|
+ // } else {
|
|
|
+ // this.member.createType = this.member.oldCreateType
|
|
|
+ // }
|
|
|
+
|
|
|
+ //企业固定为购买
|
|
|
+ this.repair = '1'
|
|
|
+ this.member.createType = '1'
|
|
|
+ this.monthTime = 60
|
|
|
+ if (!this.returnMyReceivable && !this.pReadon) {
|
|
|
+ this.myNoTchange()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (this.member.createType == '3') {
|
|
|
this.monthTime = 60 - this.stopTime
|
|
|
this.repair = '3'
|
|
@@ -1699,11 +1837,46 @@ export default {
|
|
|
this.isDisable = false
|
|
|
}).post()
|
|
|
},
|
|
|
- ordConfirm() {
|
|
|
+ ordConfirm() { //编辑提交
|
|
|
if (!this.member.salesChannel || this.member.salesChannel == undefined || this.member.salesChannel == 'undefined') {
|
|
|
this.$Notice.warning({title: '请选择销售渠道'})
|
|
|
return
|
|
|
}
|
|
|
+ //编辑存在老数据为空 前端不校验 提交后端接口 再至为1
|
|
|
+ // if (this.member.buySubject == '') {
|
|
|
+ // this.$Notice.warning({title: '请选择购买主体'})
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.member.phone == '') {
|
|
|
+ this.$Notice.warning({title: '请输入手机号'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.member.products == ''){
|
|
|
+ this.$Notice.warning({title: '请选择产品类型'})
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.member.billingMode !== 0 && this.member.billingMode !== 1){
|
|
|
+ this.$Notice.warning({title: '请选择计费模式'})
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
+ if (this.member.buySubject == '2') {
|
|
|
+ if(this.member.buyCount == '') {
|
|
|
+ this.$Notice.warning({title: '请输入购买数量'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.member.buyCount <= 0 ){
|
|
|
+ this.$Notice.warning({title: '请输入大于0的数量'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 公司名称在依赖后端校验的几个选项后 继续依赖后端校验
|
|
|
+ // if (this.member.companyName == ''){
|
|
|
+ // this.$Notice.warning({title: '购买主体为企业,请输入公司名称'})
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ }
|
|
|
let serveData = []
|
|
|
this.datas2.forEach(v => {
|
|
|
serveData.push({
|
|
@@ -1754,6 +1927,8 @@ export default {
|
|
|
createTime: this.member.createTime,
|
|
|
phone: this.member.phone,
|
|
|
products: '',// 产品类型不需要传(传空)
|
|
|
+ buySubject:this.member.buySubject?this.member.buySubject:'1',//主体 老数据编辑回显为空 提交默认为个体
|
|
|
+ buyCount:this.member.buyCount,//购买数量
|
|
|
billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
|
|
|
level: this.nums == 1 ? JSON.parse(this.member.level).id : 5,
|
|
|
payCycle: this.member.payCycle,
|
|
@@ -1808,6 +1983,8 @@ export default {
|
|
|
updateProductType: 1,
|
|
|
phone: this.member.phone,
|
|
|
products: '',// 产品类型不需要传(传空)
|
|
|
+ buySubject:this.member.buySubject?this.member.buySubject:'1',//主体 老数据编辑回显为空 提交默认为个体
|
|
|
+ buyCount:this.member.buyCount,//购买数量
|
|
|
billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
|
|
|
paySub: this.member.paySub,
|
|
|
freeSub: this.member.freeSub,
|
|
@@ -1847,6 +2024,8 @@ export default {
|
|
|
updateProductType: 2,
|
|
|
phone: this.member.phone,
|
|
|
products: '',// 产品类型不需要传(传空)
|
|
|
+ buySubject:this.member.buySubject?this.member.buySubject:'1',//主体 老数据编辑回显为空 提交默认为个体
|
|
|
+ buyCount:this.member.buyCount,//购买数量
|
|
|
billingMode: this.member.billingMode === '' ? 999 : this.member.billingMode,
|
|
|
serversArr: serveData,
|
|
|
orderMoney: this.fixedNum(this.member.orderMoney),
|
|
@@ -1882,7 +2061,9 @@ export default {
|
|
|
ordCancel() {
|
|
|
this.bShow = false
|
|
|
},
|
|
|
+ //回显
|
|
|
show(data) {
|
|
|
+ this.olddata=data
|
|
|
this.typeRestriction = true,
|
|
|
this.colr = ''
|
|
|
setTimeout(() => {
|
|
@@ -1962,6 +2143,21 @@ export default {
|
|
|
this.curIds = filterData.serversId ? filterData.serversId.split(',').map(Number) : []
|
|
|
|
|
|
this.proNums = products
|
|
|
+
|
|
|
+ if(!res.buy_subject){ //老数据购买主体无值 禁用购买主体选项
|
|
|
+ this.radio_dis=true
|
|
|
+ }else{
|
|
|
+ this.radio_dis=false
|
|
|
+
|
|
|
+ }
|
|
|
+ this.show_buy_subject=res.buy_subject
|
|
|
+ if(res.orderStatus == 1){//回显订单已完成禁用购买主体
|
|
|
+ this.finish_dis=true
|
|
|
+ }else{
|
|
|
+ this.finish_dis=false
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// 补充包列表
|
|
|
this.supplys = filterData.supplys
|
|
|
this.member = {
|
|
@@ -1971,6 +2167,8 @@ export default {
|
|
|
oldPhone: res.user_phone,
|
|
|
oldCreateType: filterData.createType + '', //
|
|
|
products: products, //
|
|
|
+ buySubject: res.buy_subject?res.buy_subject + "" : '',//购买主体 回显无值默认为个体
|
|
|
+ buyCount: res.buy_count?res.buy_count:'',//购买数量
|
|
|
billingMode: res.billingMode, //
|
|
|
salesPerson: JSON.stringify({
|
|
|
id: res.salesperson_id,
|
|
@@ -2009,6 +2207,7 @@ export default {
|
|
|
contract_archive_time: contractRes.contract_archive_time, //
|
|
|
contract_archive_num: contractRes.contract_archive_num == 0 ? '' : contractRes.contract_archive_num //
|
|
|
}
|
|
|
+
|
|
|
if (this.member.cycleType === 1) {
|
|
|
this.max_length = 4
|
|
|
}
|
|
@@ -2023,7 +2222,7 @@ export default {
|
|
|
this.radioDis2 = true
|
|
|
this.radioDis3 = true
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (filterData.level !== '自定义') {
|
|
|
this.creAuth = this.member.products
|
|
|
this.proNums = Number(products)
|
|
@@ -2036,16 +2235,19 @@ export default {
|
|
|
}
|
|
|
}, 200)
|
|
|
this.$request('/order/getCombo').data().success((res) => {
|
|
|
+ this.levelDown = []
|
|
|
res.data.lists.forEach(v => {
|
|
|
if (v.id == filterData.comboId) {
|
|
|
this.member.level = JSON.stringify(v)
|
|
|
this.leChange(JSON.stringify(v), false)
|
|
|
- this.levelDown = []
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (v.id !== 4) {// 试用版
|
|
|
this.levelDown.push(v)
|
|
|
}
|
|
|
- }
|
|
|
})
|
|
|
+
|
|
|
}).get()
|
|
|
} else {
|
|
|
let obj = {
|
|
@@ -2060,13 +2262,17 @@ export default {
|
|
|
// this.proChange(Number(products))
|
|
|
}
|
|
|
this.nums = 0
|
|
|
+ console.log(this.interested,res.buy_subject,this.member.buySubject,'21212121')
|
|
|
})
|
|
|
this.bShow = true
|
|
|
+
|
|
|
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ olddata:null,
|
|
|
+ show_buy_subject:'',
|
|
|
max_length: 2,
|
|
|
doReview: false,
|
|
|
orderCode: '',
|
|
@@ -2074,6 +2280,8 @@ export default {
|
|
|
pass: "通过",
|
|
|
reason: ""
|
|
|
},
|
|
|
+ radio_dis:false,
|
|
|
+ finish_dis:false,
|
|
|
overTime: 0,
|
|
|
serData: [],
|
|
|
servedData: [],
|
|
@@ -2124,6 +2332,8 @@ export default {
|
|
|
member: {
|
|
|
phone: '',
|
|
|
products: '',
|
|
|
+ buySubject: '',//购买主体
|
|
|
+ buyCount: '',//购买数量
|
|
|
billingMode: '',
|
|
|
salesPerson: '',
|
|
|
level: '',
|