check.js 5.52 KB
import {checkRuleOfTCP} from "RcpmisRules"
export default {
    data() {
        return {
					rules:checkRuleOfTCP().call({module:"TCPDEL"}).call(this,this)
            // rules: {


            //     // "pblmod.pbl.reldat": [
            //     //     {type: "string", required: false, message: "输入正确的日期"}
            //     // ],


            //     "recgrp.ads.levyno": [
            //         {type: "string", required: false, message: "必输项"},
            //         {max: 24, message: "长度不能超过24"}
            //     ],


            //     "recgrp.ads.banktrano": [
            //         {type: "string", required: false, message: "必输项"},
            //         {max: 22, message: "长度不能超过22"}
            //     ],
            //     // "recgrp.ads.actiondesc": [
            //     //     {type: "string", required: false, message: "必输项"},
            //     //     {max: 32, message: "长度不能超过32"}
            //     // ],

            //     "recgrp.ads.bankorgcode": [
            //         {type: "string", required: false, message: "必输项"},
            //         {max: 12, message: "长度不能超过12"}
            //     ],
            //     "recgrp.ads.openorgcode": [
            //         {type: "string", required: true, message: "必输项"},
            //         {max: 18, message: "若存在18位的统一社会信用代码则填写统一社会信用代码,否则填写9位企业机构代码"},
            //         {
            //             pattern: /[A-Z0-9]$/,
            //             message: "仅支持数字和大写字母",
            //         },
            //         {
            //             validator: function (rule, value, callback) {
            //                 if (value.length === 9 || value.length === 18) {
            //                     callback();

            //                 } else {
            //                     return callback(new Error('若存在18位的统一社会信用代码则填写统一社会信用代码,否则填写9位企业机构代码'));
            //                 }
            //             }
            //         }
            //     ],
            //     "recgrp.ads.owenername": [
            //         {type: "string", required: true, message: "必输项"},
            //         {max: 63, message: "长度不能超过63"}
            //     ],
            //     "recgrp.ads.bicbkacct": [
            //         {type: "string", required: false, message: "必输项"},
            //         {max: 32, message: "长度不能超过32"}
            //     ],
            //     "recgrp.ads.counterorgcode": [
            //         {type: "string", required: true, message: "必输项"},
            //         {max: 18, message: "若存在18位的统一社会信用代码则填写统一社会信用代码,否则填写9位企业机构代码"},
            //         {
            //             pattern: /[A-Z0-9]$/,
            //             message: "仅支持数字和大写字母",
            //         },
            //         {
            //             validator: function (rule, value, callback) {
            //                 if (value.length === 9 || value.length === 18) {
            //                     callback();

            //                 } else {
            //                     return callback(new Error('若存在18位的统一社会信用代码则填写统一社会信用代码,否则填写9位企业机构代码'));
            //                 }
            //             }
            //         }
            //     ],
            //     "recgrp.ads.countername": [
            //         {type: "string", required: true, message: "必输项"},
            //         {max: 63, message: "长度不能超过63"}
            //     ],
            //     "recgrp.ads.transdate": [
            //         {type: "string", required: false, message: "输入正确的日期"}
            //     ],

            //     "recgrp.ads.transamt": [
            //         {required: true, message: "必输项"},
            //         {
            //             pattern: /^-?[1-9]\d{0,14}(\.\d{1,3})?$|^0(\.\d{1,3})?$/,
            //             message: "整数位不能超过15位,小数位不能超过2位",
            //         },
            //         {
            //             validator: function (rule, value, callback) {
            //                 if (value < 0) {
            //                     return callback(new Error('The amount has to be positive'));
            //                 } else {
            //                     //校验通过
            //                     callback();
            //                 }
            //             }, trigger: ['blur', 'change']
            //         }
            //     ],

            //     "recgrp.ads.actiondesc": [{
            //         validator: (rule, value, callback) => {
            //             let opertype = this.model.recgrp.ads.opertype;
            //             if (opertype === '2' || opertype === '3') {
            //                 if (!value) {
            //                     callback(new Error('必输项'))
            //                 }
            //             }
            //             callback()
            //         }
            //     }],

            //     "recgrp.ads.addword": [
            //         {type: "string", required: true, message: "必输项"},
            //         {max: 63, message: "长度不能超过63"}
            //     ],

            // }
        }
    }
}