From 7952797c47a0a5149435d448eafd268091732e74 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 08 Mar 2024 13:09:22 +0800
Subject: [PATCH] fix:整改附件必填
---
pages/actionChange/components/rectificationInfor.vue | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/pages/actionChange/components/rectificationInfor.vue b/pages/actionChange/components/rectificationInfor.vue
index cd7a7ee..c0a3476 100644
--- a/pages/actionChange/components/rectificationInfor.vue
+++ b/pages/actionChange/components/rectificationInfor.vue
@@ -55,12 +55,16 @@
</u-form-item>
</view>
<view class="formItemContent">
- <u-form-item label="������������:" :border-bottom="false">
+ <u-form-item label="������������:" :border-bottom="false" :required="!pageState"
+ prop="fileListRequired">
<view class="fileBox" v-if="pageState">
<cl-upload v-model="fileList" :add="false" :action="`''`" cloud-type="other"
:remove="false" />
</view>
<view class="fileBox" v-else>
+ <view class="overFile">
+ <u--input v-model="form.fileListRequired" border="none"></u--input>
+ </view>
<fileUpload class="rowTipContenetAll" :sys-code="sysCode"
@handleFile="handleFile" />
</view>
@@ -112,6 +116,7 @@
isChange: 1,
changeName: '',
changeDescribe: '',
+ fileListRequired: ''
},
dictObj: JSON.parse(uni.getStorageSync('dictObj') || '[]'),
fileList: [],
@@ -128,7 +133,12 @@
message: '���������',
trigger: ['blur', 'change']
},
- }
+ 'fileListRequired': {
+ required: true,
+ message: '���������������',
+ trigger: ['blur', 'change']
+ }
+ },
}
},
onLoad: function(option) {
@@ -158,12 +168,16 @@
},
handleFile(data) {
this.fileBaseList = data
+ console.log('data', data)
+ this.form.fileListRequired = data.length > 0 ? '12323' : null
+ console.log('this.fileListRequired', this.form.fileListRequired)
this.form.fileChangeList = this.fileBaseList
},
formVali() {
return new Promise((resolve, reject) => {
if (!this.pageState) {
this.$refs.uForm.validate().then(res => {
+ console.log('res', res)
resolve(true)
}).catch(errors => {
reject(false)
@@ -182,6 +196,15 @@
margin: 19.23rpx 0px !important;
}
+ .fileBox {
+ .overFile {
+ z-index: -100;
+ position: absolute !important;
+ height: 96px !important;
+ opacity: 0;
+ }
+ }
+
.workOrderDetail {
border: 1px solid #bbb;
border-radius: 5px;
--
Gitblit v1.8.0