GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
fujun
/
dxCard-admin
Browse code
unice
master
1 parent
f88a37f
commit
35c3f32724a79fcd459b36e95a95fbf9a3295525
jiangqihao
authored
6 days ago
Patch
Showing
3 changed files
.env.development
src/views/customers/CardApplicationCustomers.data.ts
src/views/customers/components/DispatchOrderModal.vue
Ignore Space
Show notes
View
.env.development
# 是否打开mock VITE_USE_MOCK = true # 发布路径 VITE_PUBLIC_PATH = / # 跨域代理,您可以配置多个 ,请注意,没有换行符 VITE_PROXY = [["/jeecg-boot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] # VITE_PROXY = [["/jeecg-boot","http://dhfxy.yn-ce.com/dhfxy"],["/upload","http://dhfxy.yn-ce.com/upload"]] #后台接口全路径地址(必填) VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot #后台接口父地址(必填) VITE_GLOB_API_URL=/jeecg-boot # 接口前缀 VITE_GLOB_API_URL_PREFIX= #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径 VITE_APP_SUB_jeecg-app-1 = '//localhost:8092' # 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动) #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 # 作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致 #VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/jeecg-vue3 # 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开 #VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs # 在线文档编辑版本。可选属性:wps, offlineWps(离线版) ,onlyoffice VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps
# 是否打开mock VITE_USE_MOCK = true # 发布路径 VITE_PUBLIC_PATH = / # 跨域代理,您可以配置多个 ,请注意,没有换行符 VITE_PROXY = [["/jeecg-boot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]] #后台接口全路径地址(必填) VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot #后台接口父地址(必填) VITE_GLOB_API_URL=/jeecg-boot # 接口前缀 VITE_GLOB_API_URL_PREFIX= #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径 VITE_APP_SUB_jeecg-app-1 = '//localhost:8092' # 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动) #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 # 作为乾坤子应用启动时必填,需与qiankun主应用注册子应用时填写的 entry 保持一致 #VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/jeecg-vue3 # 全局隐藏哪些布局。可选属性:sider,header,multi-tabs;多个用逗号隔开 #VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs # 在线文档编辑版本。可选属性:wps, offlineWps(离线版) ,onlyoffice VITE_GLOB_ONLINE_DOCUMENT_VERSION=wps
Ignore Space
Show notes
View
src/views/customers/CardApplicationCustomers.data.ts
import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { title: '分销客户id', align:"center", dataIndex: 'distributionCustomersId' }, { title: '分销客户姓名', align:"center", dataIndex: 'distributionCustomersName' }, { title: '分销客户手机号', align:"center", dataIndex: 'distributionCustomersPhone' }, { title: '办卡客户id', align:"center", dataIndex: 'cardApplicationId' }, { title: '办卡姓名', align:"center", dataIndex: 'cardApplicationName' }, { title: '办卡手机号', align:"center", dataIndex: 'cardApplicationPhone' }, { title: '预约单号', align:"center", dataIndex: 'reservationNumber' }, { title: '省', align:"center", dataIndex: 'province', width: 100, }, { title: '市', align:"center", dataIndex: 'city', width: 100, }, { title: '区', align:"center", dataIndex: 'area', width: 100, }, { title: '详细地址', align:"center", dataIndex: 'address' }, { title: '预约时间', align:"center", dataIndex: 'reservationTime' }, { title: '办理手机号', align:"center", dataIndex: 'transactionPhone' }, { title: '应返还佣金', align:"center", dataIndex: 'refundableCommission' }, { title: '实际返还佣金', align:"center", dataIndex: 'actualCommission' }, { title: '返还时间', align:"center", dataIndex: 'refundableTime' }, { title: '首充金额', align:"center", dataIndex: 'amount' }, { title: '状态', align:"center", dataIndex: 'status' }, { title: '指定送卡人', align:"center", dataIndex: 'cardDeliveryPerson' }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: "分销客户id", field: 'distributionCustomersId', component: 'Input', //colProps: {span: 6}, }, { label: "分销客户姓名", field: 'distributionCustomersName', component: 'Input', //colProps: {span: 6}, }, { label: "分销客户手机号", field: 'distributionCustomersPhone', component: 'Input', //colProps: {span: 6}, }, { label: "办卡客户id", field: 'cardApplicationId', component: 'Input', //colProps: {span: 6}, }, { label: "办卡姓名", field: 'cardApplicationName', component: 'Input', //colProps: {span: 6}, }, { label: "办卡手机号", field: 'cardApplicationPhone', component: 'Input', //colProps: {span: 6}, }, { label: "区", field: 'area', component: 'Input', //colProps: {span: 6}, }, { label: "详细地址", field: 'address', component: 'Input', //colProps: {span: 6}, }, { label: "办理手机号", field: 'transactionPhone', component: 'Input', //colProps: {span: 6}, }, { label: "状态", field: 'status', component: 'Input', //colProps: {span: 6}, }, { label: "指定送卡人", field: 'cardDeliveryPerson', component: 'Input', //colProps: {span: 6}, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '分销客户id', field: 'distributionCustomersId', component: 'Input', }, { label: '分销客户姓名', field: 'distributionCustomersName', component: 'Input', }, { label: '分销客户手机号', field: 'distributionCustomersPhone', component: 'Input', }, { label: '办卡客户id', field: 'cardApplicationId', component: 'Input', }, { label: '办卡姓名', field: 'cardApplicationName', component: 'Input', }, { label: '办卡手机号', field: 'cardApplicationPhone', component: 'Input', }, { label: '预约单号', field: 'reservationNumber', component: 'Input', }, { label: '省', field: 'province', component: 'Input', }, { label: '市', field: 'city', component: 'Input', }, { label: '区', field: 'area', component: 'Input', }, { label: '详细地址', field: 'address', component: 'Input', }, { label: '预约时间', field: 'reservationTime', component: 'DatePicker', componentProps: { showTime: true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '办理手机号', field: 'transactionPhone', component: 'Input', }, { label: '应返还佣金', field: 'refundableCommission', component: 'InputNumber', }, { label: '实际返还佣金', field: 'actualCommission', component: 'Input', }, { label: '返还时间', field: 'refundableTime', component: 'DatePicker', componentProps: { showTime: true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '首充金额', field: 'amount', component: 'InputNumber', }, { label: '状态', field: 'status', component: 'Input', }, { label: '指定送卡人', field: 'cardDeliveryPerson', component: 'Input', }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false }, ]; // 高级查询数据 export const superQuerySchema = { distributionCustomersId: {title: '分销客户id',order: 0,view: 'text', type: 'string',}, distributionCustomersName: {title: '分销客户姓名',order: 1,view: 'text', type: 'string',}, distributionCustomersPhone: {title: '分销客户手机号',order: 2,view: 'text', type: 'string',}, cardApplicationId: {title: '办卡客户id',order: 3,view: 'text', type: 'string',}, cardApplicationName: {title: '办卡姓名',order: 4,view: 'text', type: 'string',}, cardApplicationPhone: {title: '办卡手机号',order: 5,view: 'text', type: 'string',}, reservationNumber: {title: '预约单号',order: 6,view: 'text', type: 'string',}, province: {title: '省',order: 7,view: 'text', type: 'string',}, city: {title: '市',order: 8,view: 'text', type: 'string',}, area: {title: '区',order: 9,view: 'text', type: 'string',}, address: {title: '详细地址',order: 10,view: 'text', type: 'string',}, reservationTime: {title: '预约时间',order: 11,view: 'datetime', type: 'string',}, transactionPhone: {title: '办理手机号',order: 12,view: 'text', type: 'string',}, refundableCommission: {title: '应返还佣金',order: 13,view: 'number', type: 'number',}, actualCommission: {title: '实际返还佣金',order: 14,view: 'text', type: 'string',}, refundableTime: {title: '返还时间',order: 15,view: 'datetime', type: 'string',}, amount: {title: '首充金额',order: 16,view: 'number', type: 'number',}, status: {title: '状态',order: 17,view: 'text', type: 'string',}, cardDeliveryPerson: {title: '指定送卡人',order: 18,view: 'text', type: 'string',}, }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[]{ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }
import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { title: '分销客户id', align:"center", dataIndex: 'distributionCustomersId' }, { title: '分销客户姓名', align:"center", dataIndex: 'distributionCustomersName' }, { title: '分销客户手机号', align:"center", dataIndex: 'distributionCustomersPhone' }, { title: '办卡客户id', align:"center", dataIndex: 'cardApplicationId' }, { title: '办卡姓名', align:"center", dataIndex: 'cardApplicationName' }, { title: '办卡手机号', align:"center", dataIndex: 'cardApplicationPhone' }, { title: '预约单号', align:"center", dataIndex: 'reservationNumber' }, { title: '省', align:"center", dataIndex: 'province' }, { title: '市', align:"center", dataIndex: 'city' }, { title: '区', align:"center", dataIndex: 'area' }, { title: '详细地址', align:"center", dataIndex: 'address' }, { title: '预约时间', align:"center", dataIndex: 'reservationTime' }, { title: '办理手机号', align:"center", dataIndex: 'transactionPhone' }, { title: '应返还佣金', align:"center", dataIndex: 'refundableCommission' }, { title: '实际返还佣金', align:"center", dataIndex: 'actualCommission' }, { title: '返还时间', align:"center", dataIndex: 'refundableTime' }, { title: '首充金额', align:"center", dataIndex: 'amount' }, { title: '状态', align:"center", dataIndex: 'status' }, { title: '指定送卡人', align:"center", dataIndex: 'cardDeliveryPerson' }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: "分销客户id", field: 'distributionCustomersId', component: 'Input', //colProps: {span: 6}, }, { label: "分销客户姓名", field: 'distributionCustomersName', component: 'Input', //colProps: {span: 6}, }, { label: "分销客户手机号", field: 'distributionCustomersPhone', component: 'Input', //colProps: {span: 6}, }, { label: "办卡客户id", field: 'cardApplicationId', component: 'Input', //colProps: {span: 6}, }, { label: "办卡姓名", field: 'cardApplicationName', component: 'Input', //colProps: {span: 6}, }, { label: "办卡手机号", field: 'cardApplicationPhone', component: 'Input', //colProps: {span: 6}, }, { label: "区", field: 'area', component: 'Input', //colProps: {span: 6}, }, { label: "详细地址", field: 'address', component: 'Input', //colProps: {span: 6}, }, { label: "办理手机号", field: 'transactionPhone', component: 'Input', //colProps: {span: 6}, }, { label: "状态", field: 'status', component: 'Input', //colProps: {span: 6}, }, { label: "指定送卡人", field: 'cardDeliveryPerson', component: 'Input', //colProps: {span: 6}, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '分销客户id', field: 'distributionCustomersId', component: 'Input', }, { label: '分销客户姓名', field: 'distributionCustomersName', component: 'Input', }, { label: '分销客户手机号', field: 'distributionCustomersPhone', component: 'Input', }, { label: '办卡客户id', field: 'cardApplicationId', component: 'Input', }, { label: '办卡姓名', field: 'cardApplicationName', component: 'Input', }, { label: '办卡手机号', field: 'cardApplicationPhone', component: 'Input', }, { label: '预约单号', field: 'reservationNumber', component: 'Input', }, { label: '省', field: 'province', component: 'Input', }, { label: '市', field: 'city', component: 'Input', }, { label: '区', field: 'area', component: 'Input', }, { label: '详细地址', field: 'address', component: 'Input', }, { label: '预约时间', field: 'reservationTime', component: 'DatePicker', componentProps: { showTime: true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '办理手机号', field: 'transactionPhone', component: 'Input', }, { label: '应返还佣金', field: 'refundableCommission', component: 'InputNumber', }, { label: '实际返还佣金', field: 'actualCommission', component: 'Input', }, { label: '返还时间', field: 'refundableTime', component: 'DatePicker', componentProps: { showTime: true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '首充金额', field: 'amount', component: 'InputNumber', }, { label: '状态', field: 'status', component: 'Input', }, { label: '指定送卡人', field: 'cardDeliveryPerson', component: 'Input', }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false }, ]; // 高级查询数据 export const superQuerySchema = { distributionCustomersId: {title: '分销客户id',order: 0,view: 'text', type: 'string',}, distributionCustomersName: {title: '分销客户姓名',order: 1,view: 'text', type: 'string',}, distributionCustomersPhone: {title: '分销客户手机号',order: 2,view: 'text', type: 'string',}, cardApplicationId: {title: '办卡客户id',order: 3,view: 'text', type: 'string',}, cardApplicationName: {title: '办卡姓名',order: 4,view: 'text', type: 'string',}, cardApplicationPhone: {title: '办卡手机号',order: 5,view: 'text', type: 'string',}, reservationNumber: {title: '预约单号',order: 6,view: 'text', type: 'string',}, province: {title: '省',order: 7,view: 'text', type: 'string',}, city: {title: '市',order: 8,view: 'text', type: 'string',}, area: {title: '区',order: 9,view: 'text', type: 'string',}, address: {title: '详细地址',order: 10,view: 'text', type: 'string',}, reservationTime: {title: '预约时间',order: 11,view: 'datetime', type: 'string',}, transactionPhone: {title: '办理手机号',order: 12,view: 'text', type: 'string',}, refundableCommission: {title: '应返还佣金',order: 13,view: 'number', type: 'number',}, actualCommission: {title: '实际返还佣金',order: 14,view: 'text', type: 'string',}, refundableTime: {title: '返还时间',order: 15,view: 'datetime', type: 'string',}, amount: {title: '首充金额',order: 16,view: 'number', type: 'number',}, status: {title: '状态',order: 17,view: 'text', type: 'string',}, cardDeliveryPerson: {title: '指定送卡人',order: 18,view: 'text', type: 'string',}, }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[]{ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }
Ignore Space
Show notes
View
src/views/customers/components/DispatchOrderModal.vue
<template> <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="派单" :width="500" @ok="handleSubmit" @visible-change="resetForm"> <a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form-item label="区域"> <JAreaLinkage v-model:value="formState.areaIds" :show-all="true" @change="formatArea" /> </a-form-item> <a-form-item label="街道 "> <a-input v-model:value="formState.address" placeholder="请输入街道地址" /> </a-form-item> <a-form-item label=" "> <a href="javascript:;" @click="loadDeliveryList">查询这个区域的送卡人</a> </a-form-item> <a-form-item label="送卡人"> <a-select v-model:value="formData.cardDeliveryPerson" :options="deliveryList" :fieldNames="{ label: 'name', value: 'id' }" style="width: 100%" placeholder="请选择送卡人"> </a-select> </a-form-item> </a-form> </BasicModal> </template> <script lang="ts" setup> import {ref, computed, unref, reactive} from 'vue'; import type { UnwrapRef } from 'vue'; import {BasicModal, useModalInner} from '/@/components/Modal'; import {JAreaLinkage} from '/@/components/Form'; import { getAreaCardDeliveryPersonList, dispatch } from '../CardApplicationCustomers.api'; import { useMessage } from '/@/hooks/web/useMessage'; const { createMessage } = useMessage(); const labelCol = { style: { width: '150px' } }; const wrapperCol = { span: 14 }; // Emits声明 const emit = defineEmits(['register','success']); interface FormState { areaIds?: string[]; province: string; city: string; area: string; address: string; } const formState: UnwrapRef<FormState> = reactive({ areaIds: [], province: '', city: '', area: '', address: '', }); const deliveryList = ref<any[]>([]); function formatArea(value){ if(value && value.length == 3){ formState.province = value[0]; formState.city = value[1]; formState.area = value[2]; }else{ formState.province = ''; formState.city = ''; formState.area = ''; } } function resetForm(visible: boolean){ if(visible){ formState.areaIds = []; formState.province = ''; formState.city = ''; formState.area = ''; formState.address = ''; deliveryList.value = []; formData.value.cardDeliveryPerson = ''; } } //表单赋值 const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { formData.value.id = data?.record?.id || ''; setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); }); const formData = ref<any>({ id: '', cardDeliveryPerson: '' }); //表单提交事件 async function handleSubmit(v) { try { if(!formData.value.id){ createMessage.warning('无效的客户信息'); return Promise.reject('无效的客户信息'); } else if(!formData.value.cardDeliveryPerson){ createMessage.warning('请选择送卡人'); return Promise.reject('请选择送卡人'); } setModalProps({confirmLoading: true}); //提交表单 await dispatch(formData.value); //关闭弹窗 closeModal(); //刷新列表 emit('success'); } catch (error) { return Promise.reject(error); } finally { setModalProps({confirmLoading: false}); } } async function loadDeliveryList() { if(!formState.province || !formState.city){ createMessage.warning('请先选择区域'); return; } const res = await getAreaCardDeliveryPersonList(formState); if(Array.isArray(res)){ deliveryList.value = res; } else { createMessage.error(res || '查询送卡人失败'); } } </script> <style lang="less" scoped> /** 时间和数字输入框样式 */ :deep(.ant-input-number) { width: 100%; } :deep(.ant-calendar-picker) { width: 100%; } </style>
<template> <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="派单" :width="500" @ok="handleSubmit"> <a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form-item label="区域"> <JAreaLinkage v-model:value="formState.areaIds" @change="formatArea" /> </a-form-item> <a-form-item label="街道 "> <a-input v-model:value="formState.address" placeholder="请输入街道地址" /> </a-form-item> <a-form-item label=" "> <a href="javascript:;" @click="loadDeliveryList">查询这个区域的送卡人</a> </a-form-item> <a-form-item label="送卡人"> <a-select v-model:value="formData.cardDeliveryPerson" :options="deliveryList" :fieldNames="{ label: 'name', value: 'id' }" style="width: 100%" placeholder="请选择送卡人"> </a-select> </a-form-item> </a-form> </BasicModal> </template> <script lang="ts" setup> import {ref, computed, unref, reactive} from 'vue'; import type { UnwrapRef } from 'vue'; import {BasicModal, useModalInner} from '/@/components/Modal'; import {JAreaLinkage} from '/@/components/Form'; import { getAreaCardDeliveryPersonList, dispatch } from '../CardApplicationCustomers.api'; import { useMessage } from '/@/hooks/web/useMessage'; const { createMessage } = useMessage(); const labelCol = { style: { width: '150px' } }; const wrapperCol = { span: 14 }; // Emits声明 const emit = defineEmits(['register','success']); interface FormState { areaIds?: string[]; province: string; city: string; area: string; address: string; } const formState: UnwrapRef<FormState> = reactive({ areaIds: [], province: '', city: '', area: '', address: '', }); const deliveryList = ref<any[]>([]); function formatArea(value){ if(value && value.length == 3){ formState.province = value[0]; formState.city = value[1]; formState.area = value[2]; }else{ formState.province = ''; formState.city = ''; formState.area = ''; } } //表单赋值 const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { formData.value.id = data?.record?.id || ''; setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); }); const formData = ref<any>({ id: '', cardDeliveryPerson: '' }); //表单提交事件 async function handleSubmit(v) { try { if(!formData.value.id){ createMessage.warning('无效的客户信息'); return Promise.reject('无效的客户信息'); } else if(!formData.value.cardDeliveryPerson){ createMessage.warning('请选择送卡人'); return Promise.reject('请选择送卡人'); } setModalProps({confirmLoading: true}); //提交表单 await dispatch(formData.value); //关闭弹窗 closeModal(); //刷新列表 emit('success'); } catch (error) { return Promise.reject(error); } finally { setModalProps({confirmLoading: false}); } } async function loadDeliveryList() { if(!formState.province || !formState.city || !formState.area){ createMessage.warning('请先选择区域'); return; } const res = await getAreaCardDeliveryPersonList(formState); if(Array.isArray(res)){ deliveryList.value = res; } else { createMessage.error(res || '查询送卡人失败'); } } </script> <style lang="less" scoped> /** 时间和数字输入框样式 */ :deep(.ant-input-number) { width: 100%; } :deep(.ant-calendar-picker) { width: 100%; } </style>
Show line notes below