Commit ebc0d00f ebc0d00f3281d14f1c1adc53a167cb9343a78563 by zhanghao

commit

1 parent 40d76ab7
...@@ -170,51 +170,72 @@ ...@@ -170,51 +170,72 @@
170 </el-row> 170 </el-row>
171 <el-row style="margin-bottom: 15px;"> 171 <el-row style="margin-bottom: 15px;">
172 <el-col :span="8"> 172 <el-col :span="8">
173 <el-form ref="bizData" :model="bizData" label-width="0px"> 173 <el-form ref="changeOrgAll" :model="changeOrgAll" label-width="0px">
174 <el-card class="darkred" shadow="always"> 174 <el-card class="darkred" shadow="always">
175 <div slot="header" class="clearfix"> 175 <div slot="header" class="clearfix">
176 <span>加密&解密biz_data</span> 176 <span>代理人更换机构</span>
177 </div> 177 </div>
178 <div class="text item"> 178 <div class="text item">
179 <el-form-item> 179 <el-form-item>
180 <el-input placeholder="请输入biz_data" v-model="bizData.myData" clearable></el-input> 180 <el-input placeholder="请输入手机号" v-model="changeOrgAll.phone" clearable></el-input>
181 </el-form-item> 181 </el-form-item>
182 <div style="margin: 15px 0;"></div>
182 <el-form-item> 183 <el-form-item>
183 <el-select v-model="bizData.type" placeholder="请选择算法类型"> 184 <el-select @change="changeProvince" v-model="changeOrgAll.provinceCode" filterable placeholder="请选择一级机构">
184 <el-option 185 <el-option
185 v-for="item in bizDataoptions" 186 v-for="item in provinceOptions"
186 :key="item.value" 187 :key="item.province_code"
187 :label="item.label" 188 :label="item.province_name"
188 :value="item.value"> 189 :value="item.province_code">
189 </el-option> 190 </el-option>
190 </el-select> 191 </el-select>
191 </el-form-item> 192 </el-form-item>
192 <el-form-item> 193 <el-form-item>
193 <el-select v-model="bizData.version" placeholder="请选择算法版本"> 194 <el-select @change="changeCity" v-model="changeOrgAll.cityCode" filterable placeholder="请选择二级机构">
194 <el-option 195 <el-option
195 v-for="item in bizDataversionoptions" 196 v-for="item in cityOptions"
196 :key="item.value" 197 :key="item.city_code"
197 :label="item.label" 198 :label="item.city_name"
198 :value="item.value"> 199 :value="item.city_code">
199 </el-option> 200 </el-option>
200 </el-select> 201 </el-select>
201 </el-form-item> 202 </el-form-item>
202 <div style="margin: 15px 0;"></div>
203 <el-form-item> 203 <el-form-item>
204 <el-button round @click="bizDataSubmit">提交</el-button> 204 <el-select @change="changeTeam" v-model="changeOrgAll.teamCode" filterable placeholder="请选择三级机构">
205 <el-option
206 v-for="item in teamOptions"
207 :key="item.team_code"
208 :label="item.team_name"
209 :value="item.team_code">
210 </el-option>
211 </el-select>
212 </el-form-item>
213 <el-form-item>
214 <el-select @change="changeFour" v-model="changeOrgAll.fourCode" filterable placeholder="请选择四级机构">
215 <el-option
216 v-for="item in fourOptions"
217 :key="item.four_level_code"
218 :label="item.four_level_name"
219 :value="item.four_level_code">
220 </el-option>
221 </el-select>
222 </el-form-item>
223 <el-form-item>
224 <el-select v-model="changeOrgAll.fiveCode" filterable placeholder="请选择五级机构">
225 <el-option
226 v-for="item in fiveOptions"
227 :key="item.five_level_code"
228 :label="item.five_level_name"
229 :value="item.five_level_code">
230 </el-option>
231 </el-select>
232 </el-form-item>
233 <el-form-item>
234 <el-button round @click="changeOrgAllSubmit">更换机构</el-button>
205 </el-form-item> 235 </el-form-item>
206 </div> 236 </div>
207 </el-card> 237 </el-card>
208 </el-form> 238 </el-form>
209 <el-dialog
210 title="biz_data"
211 :visible.sync="dialogVisible"
212 width="30%">
213 <span>{{mybizdata}}</span>
214 <span slot="footer" class="dialog-footer">
215 <el-button type="primary" v-clipboard:copy="JSON.stringify(mybizdata)" v-clipboard:success="onCopy" @click="dialogVisible = false">点击复制</el-button>
216 </span>
217 </el-dialog>
218 </el-col> 239 </el-col>
219 <el-col :span="8"> 240 <el-col :span="8">
220 <el-form ref="apiTest" :model="apiTest" label-width="0px"> 241 <el-form ref="apiTest" :model="apiTest" label-width="0px">
...@@ -349,29 +370,51 @@ ...@@ -349,29 +370,51 @@
349 </el-form> 370 </el-form>
350 </el-col> 371 </el-col>
351 <el-col :span="8"> 372 <el-col :span="8">
352 <el-form ref="createCluesYoubaoe" :model="createCluesYoubaoe" label-width="0px"> 373 <el-form ref="bizData" :model="bizData" label-width="0px">
353 <el-card class="darkred" shadow="always"> 374 <el-card class="darkred" shadow="always">
354 <div slot="header" class="clearfix"> 375 <div slot="header" class="clearfix">
355 <span>生成线索-活动类型-有预约保额</span> 376 <span>加密&解密biz_data</span>
356 </div> 377 </div>
357 <div class="text item"> 378 <div class="text item">
358 <el-form-item> 379 <el-form-item>
359 <el-input placeholder="代理人UID" v-model="createCluesYoubaoe.agentUid" clearable></el-input> 380 <el-input placeholder="请输入biz_data" v-model="bizData.myData" clearable></el-input>
360 </el-form-item> 381 </el-form-item>
361 <div style="margin: 15px 0;"></div>
362 <el-form-item> 382 <el-form-item>
363 <el-input placeholder="该代理人名下的健康坊用户UID" v-model="createCluesYoubaoe.customUid" clearable></el-input> 383 <el-select v-model="bizData.type" placeholder="请选择算法类型">
384 <el-option
385 v-for="item in bizDataoptions"
386 :key="item.value"
387 :label="item.label"
388 :value="item.value">
389 </el-option>
390 </el-select>
364 </el-form-item> 391 </el-form-item>
365 <el-form-item> 392 <el-form-item>
366 <el-input placeholder="正在进行中的活动ID" v-model="createCluesYoubaoe.actId" clearable></el-input> 393 <el-select v-model="bizData.version" placeholder="请选择算法版本">
394 <el-option
395 v-for="item in bizDataversionoptions"
396 :key="item.value"
397 :label="item.label"
398 :value="item.value">
399 </el-option>
400 </el-select>
367 </el-form-item> 401 </el-form-item>
368 <div style="margin: 15px 0;"></div> 402 <div style="margin: 15px 0;"></div>
369 <el-form-item> 403 <el-form-item>
370 <el-button round @click="createCluesYoubaoeSubmit">生成线索</el-button> 404 <el-button round @click="bizDataSubmit">提交</el-button>
371 </el-form-item> 405 </el-form-item>
372 </div> 406 </div>
373 </el-card> 407 </el-card>
374 </el-form> 408 </el-form>
409 <el-dialog
410 title="biz_data"
411 :visible.sync="dialogVisible"
412 width="30%">
413 <span>{{mybizdata}}</span>
414 <span slot="footer" class="dialog-footer">
415 <el-button type="primary" v-clipboard:copy="JSON.stringify(mybizdata)" v-clipboard:success="onCopy" @click="dialogVisible = false">点击复制</el-button>
416 </span>
417 </el-dialog>
375 </el-col> 418 </el-col>
376 </el-row> 419 </el-row>
377 </div> 420 </div>
...@@ -477,11 +520,6 @@ ...@@ -477,11 +520,6 @@
477 phone: '', 520 phone: '',
478 code: 1111 521 code: 1111
479 }, 522 },
480 createCluesYoubaoe: {
481 agentUid: '',
482 customUid: '',
483 actId: ''
484 },
485 activityConfig: { 523 activityConfig: {
486 id: '', 524 id: '',
487 huanjing: [] 525 huanjing: []
...@@ -582,7 +620,35 @@ ...@@ -582,7 +620,35 @@
582 }, { 620 }, {
583 value: 'peripheral', 621 value: 'peripheral',
584 label: 'peripheral' 622 label: 'peripheral'
585 }] 623 }],
624 changeOrgAll: {
625 phone: '',
626 provinceCode: [{
627 province_code: '',
628 province_name: ''
629 }],
630 cityCode: [{
631 city_code: '',
632 city_name: ''
633 }],
634 teamCode: [{
635 team_code: '',
636 team_name: ''
637 }],
638 fourCode: [{
639 four_level_code: '',
640 four_level_name: ''
641 }],
642 fiveCode: [{
643 five_level_code: '',
644 five_level_name: ''
645 }]
646 },
647 provinceOptions: [],
648 cityOptions: [],
649 teamOptions: [],
650 fourOptions: [],
651 fiveOptions: []
586 // activityConfigRules: { 652 // activityConfigRules: {
587 // id: [ 653 // id: [
588 // { required: true, message: '请输入活动ID', trigger: 'blur' } 654 // { required: true, message: '请输入活动ID', trigger: 'blur' }
...@@ -591,7 +657,8 @@ ...@@ -591,7 +657,8 @@
591 } 657 }
592 }, 658 },
593 mounted() { 659 mounted() {
594 this.openToolPage() 660 this.openToolPage();
661 this.loadProvince();
595 }, 662 },
596 methods: { 663 methods: {
597 openToolPage() { 664 openToolPage() {
...@@ -606,6 +673,99 @@ ...@@ -606,6 +673,99 @@
606 console.log(error); 673 console.log(error);
607 }) 674 })
608 }, 675 },
676 loadProvince() {
677 let config = {
678 headers: {
679 'Content-Type': 'application/x-www-form-urlencoded'
680 }
681 }
682 this.$http.get('/tool/loadProvince',config).then((res)=>{
683 console.log(res);
684 this.provinceOptions=res.data;
685 }).catch(error=>{
686 console.log(error);
687 })
688 },
689 changeProvince(value) {
690 this.cityOptions = [];
691 this.teamOptions = [];
692 this.fourOptions = [];
693 this.fiveOptions = [];
694 this.changeOrgAll.cityCode = '';
695 this.changeOrgAll.teamCode = '';
696 this.changeOrgAll.fourCode = '';
697 this.changeOrgAll.fiveCode = '';
698 let config = {
699 headers: {
700 'Content-Type': 'application/x-www-form-urlencoded'
701 }
702 }
703 this.$http.get('/tool/loadCity?'+this.$qs.stringify({
704 code: value
705 }),config).then((res)=>{
706 console.log(res);
707 this.cityOptions=res.data;
708 }).catch(error=>{
709 console.log(error);
710 })
711 },
712 changeCity(value) {
713 this.teamOptions = [];
714 this.fourOptions = [];
715 this.fiveOptions = [];
716 this.changeOrgAll.teamCode = '';
717 this.changeOrgAll.fourCode = '';
718 this.changeOrgAll.fiveCode = '';
719 let config = {
720 headers: {
721 'Content-Type': 'application/x-www-form-urlencoded'
722 }
723 }
724 this.$http.get('/tool/loadTeam?'+this.$qs.stringify({
725 code: value
726 }),config).then((res)=>{
727 console.log(res);
728 this.teamOptions=res.data;
729 }).catch(error=>{
730 console.log(error);
731 })
732 },
733 changeTeam(value) {
734 this.fourOptions = [];
735 this.fiveOptions = [];
736 this.changeOrgAll.fourCode = '';
737 this.changeOrgAll.fiveCode = '';
738 let config = {
739 headers: {
740 'Content-Type': 'application/x-www-form-urlencoded'
741 }
742 }
743 this.$http.get('/tool/loadFour?'+this.$qs.stringify({
744 code: value
745 }),config).then((res)=>{
746 console.log(res);
747 this.fourOptions=res.data;
748 }).catch(error=>{
749 console.log(error);
750 })
751 },
752 changeFour(value) {
753 this.fiveOptions = [];
754 this.changeOrgAll.fiveCode = '';
755 let config = {
756 headers: {
757 'Content-Type': 'application/x-www-form-urlencoded'
758 }
759 }
760 this.$http.get('/tool/loadFive?'+this.$qs.stringify({
761 code: value
762 }),config).then((res)=>{
763 console.log(res);
764 this.fiveOptions=res.data;
765 }).catch(error=>{
766 console.log(error);
767 })
768 },
609 onCopy (e) { 769 onCopy (e) {
610 this.$message({ 770 this.$message({
611 showClose: true, 771 showClose: true,
...@@ -708,40 +868,6 @@ ...@@ -708,40 +868,6 @@
708 }); 868 });
709 }) 869 })
710 }, 870 },
711 createCluesYoubaoeSubmit() {
712 let config = {
713 headers: {
714 'Content-Type': 'application/x-www-form-urlencoded'
715 }
716 }
717 this.$http.get('/tool/money/activity/youbaoe?'+this.$qs.stringify({
718 uid: this.createCluesYoubaoe.agentUid,
719 ref_id: this.createCluesYoubaoe.customUid,
720 act_id: this.createCluesYoubaoe.actId
721 }),config).then((res)=>{
722 console.log(res);
723 if(res.data=='success') {
724 this.$message({
725 showClose: true,
726 message: '生成线索成功',
727 type: 'success'
728 });
729 } else {
730 this.$message({
731 showClose: true,
732 message: '生成线索失败',
733 type: 'error'
734 });
735 }
736 }).catch(error=>{
737 console.log(error);
738 this.$message({
739 showClose: true,
740 message: '服务器处理失败,请核对参数!',
741 type: 'error'
742 });
743 })
744 },
745 activityConfigSubmit() { 871 activityConfigSubmit() {
746 // this.$refs['activityConfig'].validate((valid) => { 872 // this.$refs['activityConfig'].validate((valid) => {
747 // if(valid) { 873 // if(valid) {
...@@ -938,6 +1064,44 @@ ...@@ -938,6 +1064,44 @@
938 {method: this.apiTest.method, biz_data: this.apiTest.biz_data, phone: this.apiTest.phone, path: this.apiTest.path.toString(), type: this.apiTest.huanjing.toString()}}) 1064 {method: this.apiTest.method, biz_data: this.apiTest.biz_data, phone: this.apiTest.phone, path: this.apiTest.path.toString(), type: this.apiTest.huanjing.toString()}})
939 window.open(href, '_blank') 1065 window.open(href, '_blank')
940 }, 1066 },
1067 changeOrgAllSubmit() {
1068 let config = {
1069 headers: {
1070 'Content-Type': 'application/x-www-form-urlencoded'
1071 }
1072 }
1073 this.$http.get('/tool/changeOrgAll?'+this.$qs.stringify({
1074 phone: this.changeOrgAll.phone,
1075 provinceCode: this.changeOrgAll.provinceCode.toString(),
1076 cityCode: this.changeOrgAll.cityCode.toString(),
1077 teamCode: this.changeOrgAll.teamCode.toString(),
1078 fourLevelCode: this.changeOrgAll.fourCode.toString(),
1079 fiveLevelCode: this.changeOrgAll.fiveCode.toString()
1080 }),config).then((res)=>{
1081 console.log(res);
1082 if(res.data=='jobnull') {
1083 this.$message({
1084 showClose: true,
1085 message: '代理人手机号不存在',
1086 type: 'error'
1087 });
1088 } else if(res.data=='success') {
1089 this.$message({
1090 showClose: true,
1091 message: '更换机构成功',
1092 type: 'success'
1093 });
1094 } else {
1095 this.$message({
1096 showClose: true,
1097 message: '更换机构失败',
1098 type: 'error'
1099 });
1100 }
1101 }).catch(error=>{
1102 console.log(error);
1103 })
1104 }
941 } 1105 }
942 } 1106 }
943 </script> 1107 </script>
......