Commit ebc0d00f ebc0d00f3281d14f1c1adc53a167cb9343a78563 by zhanghao

commit

1 parent 40d76ab7
......@@ -170,51 +170,72 @@
</el-row>
<el-row style="margin-bottom: 15px;">
<el-col :span="8">
<el-form ref="bizData" :model="bizData" label-width="0px">
<el-form ref="changeOrgAll" :model="changeOrgAll" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>加密&解密biz_data</span>
<span>代理人更换机构</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入biz_data" v-model="bizData.myData" clearable></el-input>
<el-input placeholder="请输入手机号" v-model="changeOrgAll.phone" clearable></el-input>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-select v-model="bizData.type" placeholder="请选择算法类型">
<el-select @change="changeProvince" v-model="changeOrgAll.provinceCode" filterable placeholder="请选择一级机构">
<el-option
v-for="item in bizDataoptions"
:key="item.value"
:label="item.label"
:value="item.value">
v-for="item in provinceOptions"
:key="item.province_code"
:label="item.province_name"
:value="item.province_code">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="bizData.version" placeholder="请选择算法版本">
<el-select @change="changeCity" v-model="changeOrgAll.cityCode" filterable placeholder="请选择二级机构">
<el-option
v-for="item in bizDataversionoptions"
:key="item.value"
:label="item.label"
:value="item.value">
v-for="item in cityOptions"
:key="item.city_code"
:label="item.city_name"
:value="item.city_code">
</el-option>
</el-select>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="bizDataSubmit">提交</el-button>
<el-select @change="changeTeam" v-model="changeOrgAll.teamCode" filterable placeholder="请选择三级机构">
<el-option
v-for="item in teamOptions"
:key="item.team_code"
:label="item.team_name"
:value="item.team_code">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select @change="changeFour" v-model="changeOrgAll.fourCode" filterable placeholder="请选择四级机构">
<el-option
v-for="item in fourOptions"
:key="item.four_level_code"
:label="item.four_level_name"
:value="item.four_level_code">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="changeOrgAll.fiveCode" filterable placeholder="请选择五级机构">
<el-option
v-for="item in fiveOptions"
:key="item.five_level_code"
:label="item.five_level_name"
:value="item.five_level_code">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button round @click="changeOrgAllSubmit">更换机构</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title="biz_data"
:visible.sync="dialogVisible"
width="30%">
<span>{{mybizdata}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" v-clipboard:copy="JSON.stringify(mybizdata)" v-clipboard:success="onCopy" @click="dialogVisible = false">点击复制</el-button>
</span>
</el-dialog>
</el-col>
<el-col :span="8">
<el-form ref="apiTest" :model="apiTest" label-width="0px">
......@@ -349,29 +370,51 @@
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="createCluesYoubaoe" :model="createCluesYoubaoe" label-width="0px">
<el-form ref="bizData" :model="bizData" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>生成线索-活动类型-有预约保额</span>
<span>加密&解密biz_data</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="代理人UID" v-model="createCluesYoubaoe.agentUid" clearable></el-input>
<el-input placeholder="请输入biz_data" v-model="bizData.myData" clearable></el-input>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-input placeholder="该代理人名下的健康坊用户UID" v-model="createCluesYoubaoe.customUid" clearable></el-input>
<el-select v-model="bizData.type" placeholder="请选择算法类型">
<el-option
v-for="item in bizDataoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="正在进行中的活动ID" v-model="createCluesYoubaoe.actId" clearable></el-input>
<el-select v-model="bizData.version" placeholder="请选择算法版本">
<el-option
v-for="item in bizDataversionoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="createCluesYoubaoeSubmit">生成线索</el-button>
<el-button round @click="bizDataSubmit">提交</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title="biz_data"
:visible.sync="dialogVisible"
width="30%">
<span>{{mybizdata}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" v-clipboard:copy="JSON.stringify(mybizdata)" v-clipboard:success="onCopy" @click="dialogVisible = false">点击复制</el-button>
</span>
</el-dialog>
</el-col>
</el-row>
</div>
......@@ -477,11 +520,6 @@
phone: '',
code: 1111
},
createCluesYoubaoe: {
agentUid: '',
customUid: '',
actId: ''
},
activityConfig: {
id: '',
huanjing: []
......@@ -582,7 +620,35 @@
}, {
value: 'peripheral',
label: 'peripheral'
}],
changeOrgAll: {
phone: '',
provinceCode: [{
province_code: '',
province_name: ''
}],
cityCode: [{
city_code: '',
city_name: ''
}],
teamCode: [{
team_code: '',
team_name: ''
}],
fourCode: [{
four_level_code: '',
four_level_name: ''
}],
fiveCode: [{
five_level_code: '',
five_level_name: ''
}]
},
provinceOptions: [],
cityOptions: [],
teamOptions: [],
fourOptions: [],
fiveOptions: []
// activityConfigRules: {
// id: [
// { required: true, message: '请输入活动ID', trigger: 'blur' }
......@@ -591,7 +657,8 @@
}
},
mounted() {
this.openToolPage()
this.openToolPage();
this.loadProvince();
},
methods: {
openToolPage() {
......@@ -606,6 +673,99 @@
console.log(error);
})
},
loadProvince() {
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/loadProvince',config).then((res)=>{
console.log(res);
this.provinceOptions=res.data;
}).catch(error=>{
console.log(error);
})
},
changeProvince(value) {
this.cityOptions = [];
this.teamOptions = [];
this.fourOptions = [];
this.fiveOptions = [];
this.changeOrgAll.cityCode = '';
this.changeOrgAll.teamCode = '';
this.changeOrgAll.fourCode = '';
this.changeOrgAll.fiveCode = '';
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/loadCity?'+this.$qs.stringify({
code: value
}),config).then((res)=>{
console.log(res);
this.cityOptions=res.data;
}).catch(error=>{
console.log(error);
})
},
changeCity(value) {
this.teamOptions = [];
this.fourOptions = [];
this.fiveOptions = [];
this.changeOrgAll.teamCode = '';
this.changeOrgAll.fourCode = '';
this.changeOrgAll.fiveCode = '';
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/loadTeam?'+this.$qs.stringify({
code: value
}),config).then((res)=>{
console.log(res);
this.teamOptions=res.data;
}).catch(error=>{
console.log(error);
})
},
changeTeam(value) {
this.fourOptions = [];
this.fiveOptions = [];
this.changeOrgAll.fourCode = '';
this.changeOrgAll.fiveCode = '';
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/loadFour?'+this.$qs.stringify({
code: value
}),config).then((res)=>{
console.log(res);
this.fourOptions=res.data;
}).catch(error=>{
console.log(error);
})
},
changeFour(value) {
this.fiveOptions = [];
this.changeOrgAll.fiveCode = '';
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/loadFive?'+this.$qs.stringify({
code: value
}),config).then((res)=>{
console.log(res);
this.fiveOptions=res.data;
}).catch(error=>{
console.log(error);
})
},
onCopy (e) {
this.$message({
showClose: true,
......@@ -708,40 +868,6 @@
});
})
},
createCluesYoubaoeSubmit() {
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/money/activity/youbaoe?'+this.$qs.stringify({
uid: this.createCluesYoubaoe.agentUid,
ref_id: this.createCluesYoubaoe.customUid,
act_id: this.createCluesYoubaoe.actId
}),config).then((res)=>{
console.log(res);
if(res.data=='success') {
this.$message({
showClose: true,
message: '生成线索成功',
type: 'success'
});
} else {
this.$message({
showClose: true,
message: '生成线索失败',
type: 'error'
});
}
}).catch(error=>{
console.log(error);
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
},
activityConfigSubmit() {
// this.$refs['activityConfig'].validate((valid) => {
// if(valid) {
......@@ -938,6 +1064,44 @@
{method: this.apiTest.method, biz_data: this.apiTest.biz_data, phone: this.apiTest.phone, path: this.apiTest.path.toString(), type: this.apiTest.huanjing.toString()}})
window.open(href, '_blank')
},
changeOrgAllSubmit() {
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool/changeOrgAll?'+this.$qs.stringify({
phone: this.changeOrgAll.phone,
provinceCode: this.changeOrgAll.provinceCode.toString(),
cityCode: this.changeOrgAll.cityCode.toString(),
teamCode: this.changeOrgAll.teamCode.toString(),
fourLevelCode: this.changeOrgAll.fourCode.toString(),
fiveLevelCode: this.changeOrgAll.fiveCode.toString()
}),config).then((res)=>{
console.log(res);
if(res.data=='jobnull') {
this.$message({
showClose: true,
message: '代理人手机号不存在',
type: 'error'
});
} else if(res.data=='success') {
this.$message({
showClose: true,
message: '更换机构成功',
type: 'success'
});
} else {
this.$message({
showClose: true,
message: '更换机构失败',
type: 'error'
});
}
}).catch(error=>{
console.log(error);
})
}
}
}
</script>
......