| | |
| | | applyAgentViewRef.value?.handleSubmit?.(); |
| | | } |
| | | |
| | | function submit() { |
| | | function submit(value: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.applyResult, |
| | | url: `${RouterPath.applyResult}?promoterIdNumber=${value}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import { ResultWithoutBG } from '@life-payment/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'applyAgent', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | |
| | | const promoterIdNumber = router.params?.promoterIdNumber ?? ''; |
| | | |
| | | function generate() { |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.promotionQrcode, |
| | | url: `${RouterPath.generatePromotionCode}?promoterIdNumber=${promoterIdNumber}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | import { PageLayout } from '@/components'; |
| | | import { RouterPath } from '@/constants'; |
| | | import { GeneratePromotionCodeView } from '@life-payment/components'; |
| | | import { goBack } from '@/utils'; |
| | | import type { ComponentExposed } from 'vue-component-type-helpers'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'generatePromotionCode', |
| | |
| | | generatePromotionCodeViewRef.value?.handleSubmit?.(); |
| | | } |
| | | |
| | | function submit() { |
| | | function submit(value: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.applyResult, |
| | | url: `${RouterPath.promotionQrcode}?promoterIdNumber=${value}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'submit'): void; |
| | | (e: 'submit', value: string): void; |
| | | }>(); |
| | | |
| | | const router = Taro.useRouter(); |
| | |
| | | companyName: form.companyName, |
| | | customerResources: form.customerResources, |
| | | }; |
| | | console.log('params: ', params); |
| | | let res = await blLifeRecharge.services.createChannelConsultation(params); |
| | | if (res) { |
| | | emit('submit'); |
| | | emit('submit', res); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | |
| | | import { Form as NutForm, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref } from 'vue'; |
| | | import { useLifeRechargeContext } from '@life-payment/core-vue'; |
| | | import { CreateOrUpdatePromoterInput, useLifeRechargeContext } from '@life-payment/core-vue'; |
| | | import { FormValidator } from '../../utils'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'ApplyAgentView', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'submit'): void; |
| | | (e: 'submit', data: string): void; |
| | | }>(); |
| | | |
| | | const router = Taro.useRouter(); |
| | | |
| | | const promoterIdNumber = router.params?.promoterIdNumber ?? ''; |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | |
| | | |
| | | async function refundUserLifePayOrder() { |
| | | try { |
| | | // let params = { |
| | | // userId: blLifeRecharge.accountModel.userId, |
| | | // refundApplyRemark: form.refundApplyRemark, |
| | | // }; |
| | | // let res = await blLifeRecharge.services.refundUserLifePayOrder(params); |
| | | emit('submit'); |
| | | let params: CreateOrUpdatePromoterInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | idNumber: promoterIdNumber, |
| | | name: form.name, |
| | | phoneNumber: form.phoneNumber, |
| | | }; |
| | | let res = await blLifeRecharge.services.createOrUpdatePromoter(params); |
| | | if (res) { |
| | | emit('submit', res); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 创建或更新推广员 POST /api/Promoter/CreateOrUpdatePromoter */ |
| | | async createOrUpdatePromoter(body: API.CreateOrUpdatePromoterInput, options?: API.RequestConfig) { |
| | | return this.request<string>('/api/Promoter/CreateOrUpdatePromoter', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | } |
| | | |
| | | export interface PhoneMesssageCodeLoginInput { |
| | |
| | | /** 客户资源 */ |
| | | customerResources?: string; |
| | | } |
| | | |
| | | export interface CreateOrUpdatePromoterInput { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 客户端用户Id 如有 */ |
| | | userId?: string; |
| | | /** ID */ |
| | | idNumber?: string; |
| | | /** 推广员 */ |
| | | name?: string; |
| | | /** 联系方式 */ |
| | | phoneNumber?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | } |