BusinessPayOrder.data.ts 5.95 KB
Newer Older
zhangsan's avatar
zhangsan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
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: 'userId'
   },
   {
    title: '用户姓名',
    align:"center",
    dataIndex: 'userName'
   },
   {
    title: '用户手机号',
    align:"center",
    dataIndex: 'userPhone'
   },
   {
    title: '商品编码',
    align:"center",
    dataIndex: 'productCode'
   },
   {
    title: '金额',
    align:"center",
    dataIndex: 'amount'
   },
   /* {
    title: '描述',
    align:"center",
    dataIndex: 'description'
   },
   {
    title: '回调地址',
    align:"center",
    dataIndex: 'notifyUrl'
   }, */
   {
    title: '状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '上级ID',
    align:"center",
    dataIndex: 'pid'
   },
   {
    title: '上级2ID',
    align:"center",
    dataIndex: 'pid2'
   },
   {
    title: '上级3ID',
    align:"center",
    dataIndex: 'pid3'
   },
   /* {
    title: '请求报文',
    align:"center",
    dataIndex: 'requestData'
   },
   {
    title: '返回报文',
    align:"center",
    dataIndex: 'returnData'
   },
   {
    title: '回调报文',
    align:"center",
    dataIndex: 'notifyData'
   },
   {
    title: '预留字段',
    align:"center",
    dataIndex: 'a1'
   },
   {
    title: '预留字段',
    align:"center",
    dataIndex: 'a2'
   },
   {
    title: '预留字段',
    align:"center",
    dataIndex: 'a3'
   },
   {
    title: '预留字段',
    align:"center",
    dataIndex: 'a4'
   },
   {
    title: '预留字段',
    align:"center",
    dataIndex: 'a5'
   }, */
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "用户姓名",
      field: 'userName',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "用户手机号",
      field: 'userPhone',
      component: 'Input',
      //colProps: {span: 6},
 	},
  {
      label: "状态",
      field: 'status',
      component: 'JSelectMultiple',
      componentProps:{
          dictCode:"payorder_status"
      },
      //colProps: {span: 6},
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户ID',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '用户姓名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '用户手机号',
    field: 'userPhone',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: false},
                 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
          ];
     },
  },
  {
    label: '商品编码',
    field: 'productCode',
    component: 'Input',
  },
  {
    label: '金额',
    field: 'amount',
    component: 'InputNumber',
  },
  {
    label: '描述',
    field: 'description',
    component: 'Input',
  },
  {
    label: '回调地址',
    field: 'notifyUrl',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"payorder_status"
     },
  },
  {
    label: '上级ID',
    field: 'pid',
    component: 'Input',
  },
  {
    label: '上级2ID',
    field: 'pid2',
    component: 'Input',
  },
  {
    label: '上级3ID',
    field: 'pid3',
    component: 'Input',
  },
  {
    label: '请求报文',
    field: 'requestData',
    component: 'Input',
  },
  {
    label: '返回报文',
    field: 'returnData',
    component: 'Input',
  },
  {
    label: '回调报文',
    field: 'notifyData',
    component: 'Input',
  },
  {
    label: '预留字段',
    field: 'a1',
    component: 'Input',
  },
  {
    label: '预留字段',
    field: 'a2',
    component: 'Input',
  },
  {
    label: '预留字段',
    field: 'a3',
    component: 'Input',
  },
  {
    label: '预留字段',
    field: 'a4',
    component: 'Input',
  },
  {
    label: '预留字段',
    field: 'a5',
    component: 'Input',
  },
	// TODO 主键隐藏字段,目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  userId: {title: '用户ID',order: 0,view: 'text', type: 'string',},
  userName: {title: '用户姓名',order: 1,view: 'text', type: 'string',},
  userPhone: {title: '用户手机号',order: 2,view: 'text', type: 'string',},
  productCode: {title: '商品编码',order: 3,view: 'text', type: 'string',},
  amount: {title: '金额',order: 4,view: 'number', type: 'number',},
  description: {title: '描述',order: 5,view: 'text', type: 'string',},
  notifyUrl: {title: '回调地址',order: 6,view: 'text', type: 'string',},
  status: {title: '状态',order: 7,view: 'text', type: 'string',dictCode: 'payorder_status',},
  pid: {title: '上级ID',order: 8,view: 'text', type: 'string',},
  pid2: {title: '上级2ID',order: 9,view: 'text', type: 'string',},
  pid3: {title: '上级3ID',order: 10,view: 'text', type: 'string',},
  requestData: {title: '请求报文',order: 11,view: 'text', type: 'string',},
  returnData: {title: '返回报文',order: 12,view: 'text', type: 'string',},
  notifyData: {title: '回调报文',order: 13,view: 'text', type: 'string',},
  a1: {title: '预留字段',order: 14,view: 'text', type: 'string',},
  a2: {title: '预留字段',order: 15,view: 'text', type: 'string',},
  a3: {title: '预留字段',order: 16,view: 'text', type: 'string',},
  a4: {title: '预留字段',order: 17,view: 'text', type: 'string',},
  a5: {title: '预留字段',order: 18,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  return formSchema;
}