check.js 11.4 KB
Newer Older
WF1020 committed
1
import Utils from '~/utils';
WF1020 committed
2 3

/**
WF1020 committed
4 5
 * Gitcrj Check规则
 */
WF1020 committed
6
let checkObj = {
WF1020 committed
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
  'liaall.limmod.limpts.oth.pts.extkey': null,
  'gcdgrp.prb.adrelc': null,
  'liaall.limmod.ownref': null,
  'liaall.limmod.ecifno': null,
  'gcdgrp.oth.namelc': null,
  'gcdgrp.blk.disdoc': null,
  'gcdgrp.oth.adrelc': null,
  'liaall.limmod.limpts.oth.pts.nam': null,
  'setmod.dspflg': null,
  'gcdgrp.prb.pts.extkey': null,
  'trnmod.swiadd.strinfs20': null,
  'gcdgrp.prb.namelc': null,
  'gcdgrp.prb.pts.adrblk': null,
  'liaall.limmod.limpts.wrk.pts.nam': null,
  'liaall.limmod.limpts.wrk.pts.extkey': null,
  'gcdgrp.apl.pts.nam': null,
  'gcdgrp.rec.msgdat': null,
  'mtabut.coninf.conexedat': null,
  'liaall.limmod.limpts.nonrevflg1': null,
  'setmod.docamt': null,
  'gcdgrp.oth.pts.extkey': null,
  'gcdgrp.oth.pts.adrblk': null,
  'mtabut.clsflg': null,
  'gctp.gidget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gidgrp.rec.ownref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gctp.gidget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gidgrp.rec.expdat': [
    { type: 'date', required: false, message: '输入正确的日期' },
  ],
  'gidgrp.cbs.opn1.cur': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gidgrp.cbs.opn1.amt': [
    { type: 'string', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    // {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
  ],
  'gcdgrp.rec.ownref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gctp.recget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gctp.recget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gcdgrp.rec.nam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  'gcdgrp.cbs.max.cur': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gcdgrp.cbs.max.amt': [
    { type: 'string', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    // {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
  ],
  'gcdgrp.apl.pts.ref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gcdgrp.cbs.opn1.cur': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gcdgrp.cbs.opn1.amt': [
    { type: 'string', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    // {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
  ],
  'gcdgrp.apl.pts.nam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  'gcdgrp.ben.pts.ref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gidgrp.rec.liadat': [
    { type: 'date', required: false, message: '输入正确的日期' },
  ],
  'gcdgrp.ben.pts.nam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  'gcdgrp.rec.clmdat': [
    { type: 'date', required: false, message: '输入正确的日期' },
  ],
  lettername: [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  rejtypsel: [
    { type: 'string', required: false, message: '必输项' },
    { max: 1, message: '长度不能超过1' },
  ],
  'gcdgrp.prb.pts.ref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gcdgrp.rec.msgdat': [{ type: 'date', required: false, message: '必输项' }],
  'gctp.prbp.ptsget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gcdgrp.prb.pts.extkey': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gctp.prbp.ptsget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gcdgrp.prb.namelc': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'gcdgrp.prb.pts.adrblk': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'gcdgrp.prb.dbfadrblkcn': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'trnmod.swiadd.strinfs20': [
    { type: 'string', required: true, message: '必输项' },
    { max: 50, message: '长度不能超过50' },
  ],
  'gcdgrp.prb.adrelc': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'gctp.othp.ptsget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gcdgrp.oth.pts.extkey': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
  ],
  'gctp.othp.ptsget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
  ],
  'gcdgrp.oth.namelc': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'gcdgrp.oth.pts.adrblk': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
  ],
  'gcdgrp.oth.dbfadrblkcn': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
WF1020 committed
178
  ],
WF1020 committed
179 180 181
  'gcdgrp.oth.adrelc': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
WF1020 committed
182
  ],
WF1020 committed
183 184 185
  'gcdgrp.blk.disdoc': [
    { type: 'string', required: true, message: '必输项' },
    { max: 35, message: '长度不能超过35' },
WF1020 committed
186
  ],
WF1020 committed
187 188 189
  'setmod.ref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
190
  ],
WF1020 committed
191 192 193 194 195 196 197
  'setmod.docamt': [
    { type: 'number', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    {
      pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
      message: '小数位不能超过3位',
    },
WF1020 committed
198
  ],
WF1020 committed
199 200 201
  'setmod.zmqacc': [
    { type: 'string', required: false, message: '必输项' },
    { max: 20, message: '长度不能超过20' },
WF1020 committed
202
  ],
WF1020 committed
203 204 205
  'mtabut.coninf.oitinf.oit.inftxt': [
    { type: 'string', required: true, message: '必输项' },
    { max: 60, message: '长度不能超过60' },
WF1020 committed
206
  ],
WF1020 committed
207 208 209 210 211 212
  'mtabut.coninf.oitset.oit.inftxt': [
    { type: 'string', required: true, message: '必输项' },
    { max: 60, message: '长度不能超过60' },
  ],
  'mtabut.coninf.conexedat': [
    { type: 'date', required: false, message: '输入正确的日期' },
WF1020 committed
213
  ],
WF1020 committed
214 215 216
  'mtabut.coninf.usr.extkey': [
    { type: 'string', required: false, message: '必输项' },
    { max: 8, message: '长度不能超过8' },
WF1020 committed
217 218
  ],

WF1020 committed
219 220 221
  'trnmod.trndoc.advnam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 50, message: '长度不能超过50' },
WF1020 committed
222
  ],
WF1020 committed
223 224 225
  'trnmod.trndoc.amdapl': [
    { type: 'string', required: true, message: '必输项' },
    { max: 50, message: '长度不能超过50' },
WF1020 committed
226 227
  ],

WF1020 committed
228 229 230
  'trnmod.trndoc.advdoc': [
    { type: 'string', required: false, message: '必输项' },
    { max: 1, message: '长度不能超过1' },
WF1020 committed
231
  ],
WF1020 committed
232 233 234
  'trnmod.trndoc.filrecv': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
235
  ],
WF1020 committed
236 237 238
  'trnmod.trndoc.doctrestm': [
    { type: 'string', required: false, message: '必输项' },
    { max: 1, message: '长度不能超过1' },
WF1020 committed
239
  ],
WF1020 committed
240 241 242
  'trnmod.trndoc.condocstm': [
    { type: 'string', required: false, message: '必输项' },
    { max: 1, message: '长度不能超过1' },
WF1020 committed
243
  ],
WF1020 committed
244 245 246
  'trnmod.trndoc.rcvatt.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
WF1020 committed
247
  ],
WF1020 committed
248 249 250
  instxt: [
    { type: 'string', required: true, message: '必输项' },
    { max: 65, message: '长度不能超过65' },
WF1020 committed
251
  ],
WF1020 committed
252 253 254
  'liaall.limmod.ecifno': [
    { type: 'string', required: false, message: '必输项' },
    { max: 22, message: '长度不能超过22' },
WF1020 committed
255
  ],
WF1020 committed
256 257 258
  'liaall.limmod.ownref': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
259
  ],
WF1020 committed
260 261 262
  'liaall.limmod.wrkp.ptsget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
263
  ],
WF1020 committed
264 265 266
  'liaall.limmod.othp.ptsget.sdamod.dadsnd': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
267
  ],
WF1020 committed
268 269 270
  'liaall.limmod.limpts.wrk.pts.extkey': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
271
  ],
WF1020 committed
272 273 274
  'liaall.limmod.wrkp.ptsget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
WF1020 committed
275 276
  ],

WF1020 committed
277 278 279
  'liaall.limmod.limpts.oth.pts.extkey': [
    { type: 'string', required: false, message: '必输项' },
    { max: 16, message: '长度不能超过16' },
WF1020 committed
280
  ],
WF1020 committed
281 282 283
  'liaall.limmod.othp.ptsget.sdamod.seainf': [
    { type: 'string', required: false, message: '必输项' },
    { max: 3, message: '长度不能超过3' },
WF1020 committed
284 285
  ],

WF1020 committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
  'liaall.limmod.comamt': [
    { type: 'number', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    {
      pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
      message: '小数位不能超过3位',
    },
  ],
  'liaall.limmod.limpts.wrk.pts.nam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  'liaall.limmod.limpts.oth.pts.nam': [
    { type: 'string', required: false, message: '必输项' },
    { max: 40, message: '长度不能超过40' },
  ],
  'liaall.limmod.ccvamt': [
    { type: 'number', required: false, message: '必输项' },
    { max: 18, message: '整数位不能超过14位' },
    {
      pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
      message: '小数位不能超过3位',
    },
  ],
  'liaall.limmod.limpts.pfcod1': [
    { type: 'string', required: false, message: '必输项' },
    { max: 14, message: '长度不能超过14' },
  ],
  'liaall.limmod.limpts.pfcod2': [
    { type: 'string', required: false, message: '必输项' },
    { max: 14, message: '长度不能超过14' },
  ],
};
WF1020 committed
319
for (const key in checkObj) {
WF1020 committed
320 321 322
  if (Object.hasOwnProperty.call(checkObj, key)) {
    checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key);
  }
WF1020 committed
323
}
WF1020 committed
324
export default checkObj;