From d40137d6f8729f7f0ede5151a6e6be3ae3492451 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 14 十一月 2023 11:21:06 +0800 Subject: [PATCH] 前端代码联调 --- Source/UBCS-WEB/src/views/code/code.vue | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index 0048ae0..3bb59dd 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -587,7 +587,7 @@ > <!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� --> <div class="add-basicsec-total"> - <el-form :model="form" class="add-basicsec-form"> + <el-form :model="form" class="add-basicsec-form" :rules="rules" > <span class="left"> <el-form-item :label-width="leftFormLabelWidth" @@ -886,7 +886,7 @@ :referConfig="this.referConfig || {}" :display="true" :value="form.customCodeSerialClass" - :text="form.customCodeSerialClass" + :text="form.customCodeSerialClassText" @setReferValue="setReferValue" ></vciWebRefer> <!-- <el-input--> @@ -1027,9 +1027,9 @@ <!-- 鏃ユ湡鐮佹 --> <div v-show="form.secType === 'codedatesec' ? true : false"> <el-form-item + prop="Dateformat" :label-width="rightFormLabelWidth" label="鏃ユ湡鏍煎紡:" - required > <el-input ref="codeDateFormatStr" @@ -1350,9 +1350,24 @@ components: { vciWebRefer }, data() { return { + rules: { + Dateformat: [ + { + required: true, + trigger: 'blur', + validator: (rule, value, callback) => { + const Formats = ['yy', 'yyyy', 'yyyy-MM', 'yy-MM', 'yyyy-MM-dd','yy-MM-dd', 'yyyy-MM-dd HH:mm:ss', 'yy-MM-dd HH:mm:ss', 'HH:mm:ss']; + if (!Formats.includes(this.form.codeDateFormatStr)) { + return callback(new Error('璇疯緭鍏ユ纭棩鏈熸牸寮忥紝渚嬪yyyy-MM-dd锛堝苟鍖哄垎澶у皬鍐欙級锛�')); + } + callback(); + } + } + ] + }, referConfig:{ title: '鑷畾涔夋祦姘村弬鐓�', - showField: 'customCodeSerialClass', + showField: 'customCodeSerialClassText', field: 'customCodeSerialClass', fieldMap: {}, placeholder:'璇烽�夋嫨鑷畾涔夋祦姘�', @@ -1375,10 +1390,10 @@ {title: '绫诲叏璺緞', field: 'classFullName', width: 300}, {title: '鎻忚堪', field: 'description'} ], - // queryColumns: [ - // {field: 'id', title: '绠楁硶缂栧彿'}, - // {field: 'name', title: '绠楁硶鍚嶇О'} - // ] + queryColumns: [ + // {field: 'id', title: '绠楁硶缂栧彿'}, + // {field: 'name', title: '绠楁硶鍚嶇О'} + ] } } }, -- Gitblit v1.9.3