diff --git a/src/views/card/delivery/CardDeliveryPerson.data.ts b/src/views/card/delivery/CardDeliveryPerson.data.ts index 507690a..426deef 100644 --- a/src/views/card/delivery/CardDeliveryPerson.data.ts +++ b/src/views/card/delivery/CardDeliveryPerson.data.ts @@ -3,10 +3,11 @@ import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; +import { on } from 'events'; //列表数据 export const columns: BasicColumn[] = [ { - title: '姓名', + title: '送卡人姓名', align:"center", dataIndex: 'name' }, @@ -21,21 +22,6 @@ dataIndex: 'dxWorkNo' }, { - title: '待处理工单数', - align:"center", - dataIndex: 'waitDealWorkNum' - }, - { - title: '已处理工单数', - align:"center", - dataIndex: 'dealWorkNum' - }, - { - title: '总工单数', - align:"center", - dataIndex: 'totalWorkNum' - }, - { title: '应收办卡费用', align:"center", dataIndex: 'receivableFee' @@ -45,21 +31,80 @@ align:"center", dataIndex: 'allFee' }, + { + title: '省市区', + align:"center", + dataIndex: 'area', + }, + { + title: '详细地址', + align:"center", + dataIndex: 'address' + }, + { + title: '状态', + align:"center", + dataIndex: 'status', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'正常',value:'Y'},{text:'失效',value:'N'}]) + }, + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ + { + label: "送卡人姓名", + field: 'name', + component: 'Input', + //colProps: {span: 6}, + }, + { + label: "手机号", + field: 'phone', + component: 'Input', + //colProps: {span: 6}, + }, + { + label: "区", + field: 'area', + component: 'JAreaLinkage', + componentProps: { + saveCode: 'region', + }, + //colProps: {span: 6}, + }, + { + label: "状态", + field: 'status', + component: 'JSwitch', + componentProps:{ + query:true, + }, + //colProps: {span: 6}, + }, ]; //表单数据 export const formSchema: FormSchema[] = [ { - label: '姓名', + label: '送卡人姓名', field: 'name', component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入送卡人姓名!'}, + ]; + }, }, { label: '手机号', field: 'phone', component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入手机号!'}, + { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, + ]; + }, }, { label: '电信工号', @@ -67,29 +112,50 @@ component: 'Input', }, { - label: '待处理工单数', - field: 'waitDealWorkNum', - component: 'InputNumber', - }, - { - label: '已处理工单数', - field: 'dealWorkNum', - component: 'InputNumber', - }, - { - label: '总工单数', - field: 'totalWorkNum', - component: 'InputNumber', - }, - { label: '应收办卡费用', field: 'receivableFee', component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, + ]; + }, }, { label: '全部办卡费用', field: 'allFee', component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, + ]; + }, + }, + { + label: '省市区', + field: 'area', + component: 'JAreaLinkage', + componentProps: { + saveCode: 'all', + showAll: true, + onChange: (value) => { + console.log(value); + } + }, + }, + { + label: '详细地址', + field: 'address', + component: 'Input', + }, + { + label: '状态', + field: 'status', + component: 'JSwitch', + componentProps:{ + }, }, // TODO 主键隐藏字段,目前写死为ID { @@ -102,14 +168,16 @@ // 高级查询数据 export const superQuerySchema = { - name: {title: '姓名',order: 0,view: 'text', type: 'string',}, + name: {title: '送卡人姓名',order: 0,view: 'text', type: 'string',}, phone: {title: '手机号',order: 1,view: 'text', type: 'string',}, dxWorkNo: {title: '电信工号',order: 2,view: 'text', type: 'string',}, - waitDealWorkNum: {title: '待处理工单数',order: 3,view: 'number', type: 'number',}, - dealWorkNum: {title: '已处理工单数',order: 4,view: 'number', type: 'number',}, - totalWorkNum: {title: '总工单数',order: 5,view: 'number', type: 'number',}, - receivableFee: {title: '应收办卡费用',order: 6,view: 'number', type: 'number',}, - allFee: {title: '全部办卡费用',order: 7,view: 'number', type: 'number',}, + receivableFee: {title: '应收办卡费用',order: 3,view: 'number', type: 'number',}, + allFee: {title: '全部办卡费用',order: 4,view: 'number', type: 'number',}, + province: {title: '省',order: 5,view: 'pca', type: 'string',}, + city: {title: '市',order: 6,view: 'pca', type: 'string',}, + area: {title: '区',order: 7,view: 'pca', type: 'string',}, + address: {title: '详细地址',order: 8,view: 'text', type: 'string',}, + status: {title: '状态',order: 9,view: 'switch', type: 'string',}, }; /**