diff --git a/src/pages/health/activity/addEdit.vue b/src/pages/health/activity/addEdit.vue
index 54ddf47..7fb5ef2 100644
--- a/src/pages/health/activity/addEdit.vue
+++ b/src/pages/health/activity/addEdit.vue
@@ -3,62 +3,76 @@
{{ title}}
-
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+ inputAlign="left" :customStyle="getInputStyle('typeName')">
+ ▼
+
+
+
+
+
+
+
+
+
+
+
+ ▼
+
-
-
+
+
+ ▼
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+ inputAlign="left" :customStyle="getInputStyle('activityVolumeName')">
+ ▼
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -67,38 +81,69 @@
-
-
-
+
+
+ @cancel="startTimeShow=false"
+ @confirm="startTimeConfirm"
+ itemHeight="88"
+ >
+ @cancel="endTimeShow=false"
+ @confirm="endTimeConfirm"
+ itemHeight="88"
+ >
@@ -337,4 +408,19 @@ function submit() {
font-weight: 500 !important;
letter-spacing: 2rpx !important;
}
-
\ No newline at end of file
+
+/* 强制让错误状态的输入框边框变红 */
+.u-form-item--error .u--input,
+.u-form-item--error .u-input,
+.u-form-item--error .u-input__content,
+.u-form-item--error .u-input__content__field-wrapper {
+ border: 2rpx solid #f56c6c !important;
+ background: #fef0f0 !important;
+}
+
+.u-form-item--error .u--textarea,
+.u-form-item--error .u-textarea {
+ border: 2rpx solid #f56c6c !important;
+ background: #fef0f0 !important;
+}
+
diff --git a/src/pages/health/doctorRecord/addEdit.vue b/src/pages/health/doctorRecord/addEdit.vue
index e7a4fd2..7142ca2 100644
--- a/src/pages/health/doctorRecord/addEdit.vue
+++ b/src/pages/health/doctorRecord/addEdit.vue
@@ -3,47 +3,55 @@
{{ title}}
-
+
+
-
+ inputAlign="left" :customStyle="getInputStyle('personName')">
+ ▼
+
+
-
+ inputAlign="left" :customStyle="getInputStyle('healthRecordName')">
+ ▼
+
+ inputAlign="left" :customStyle="getInputStyle('hospitalName')">
+
-
+ inputAlign="left" :customStyle="getInputStyle('typeName')">
+ ▼
+
+ inputAlign="left" :customStyle="getInputStyle('departments')">
+ inputAlign="left" :customStyle="getInputStyle('doctor')">
+
+
+
+
+ ▼
+
-
-
-
-
+ inputAlign="left" :customStyle="getInputStyle('partner')">
+ inputAlign="left" :customStyle="getInputStyle('totalCost')">
-
+
-
+
-
+
-
+
@@ -151,6 +159,52 @@ rules: {
})
const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
+// 错误字段
+const errorFields = ref([])
+
+// 输入框基础样式
+const inputBaseStyle = {
+ background: '#ffffff',
+ border: '2rpx solid #dcdfe6',
+ borderRadius: '8rpx',
+ padding: '0 24rpx',
+ height: '68rpx',
+ width: '100%',
+ boxSizing: 'border-box'
+}
+
+// 输入框错误样式
+const inputErrorStyle = {
+ background: '#fef0f0',
+ border: '2rpx solid #f56c6c',
+ borderRadius: '8rpx',
+ padding: '0 24rpx',
+ height: '68rpx',
+ width: '100%',
+ boxSizing: 'border-box'
+}
+
+// 根据字段名获取输入框样式
+const getInputStyle = (field) => {
+ return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle
+}
+// 输入框基础样式
+const textareaBaseStyle = {
+ background: '#ffffff',
+ border: '2rpx solid #dcdfe6',
+}
+
+// 输入框错误样式
+const textareaErrorStyle = {
+ background: '#fef0f0',
+ border: '2rpx solid #f56c6c'
+}
+
+// 根据字段名获取输入框样式
+const getTextareaStyle = (field) => {
+ return errorFields.value.includes(field) ? textareaErrorStyle : textareaBaseStyle
+}
+
onLoad((option) => {
form.value.id = option.id
@@ -326,6 +380,12 @@ function submit() {
})
})
}
+ }).catch(errors => {
+ // 验证失败,记录错误字段
+ if (errors && errors.length > 0) {
+ errorFields.value = errors.map(err => err.field)
+ }
+ proxy.$modal.msgError('请填写完整信息')
})
}
@@ -369,6 +429,23 @@ page {
.form-btn {
padding-top: 16rpx;
}
+
+ // 带箭头的输入框容器
+ .input-with-arrow {
+ position: relative;
+ width: 100%;
+
+ .arrow-icon {
+ position: absolute;
+ right: 20rpx;
+ top: 50%;
+ transform: translateY(-50%);
+ color: #c0c4cc;
+ font-size: 20rpx;
+ pointer-events: none;
+ z-index: 10;
+ }
+ }
}
}
@@ -387,4 +464,19 @@ page {
font-weight: 500 !important;
letter-spacing: 2rpx !important;
}
+
+/* 强制让错误状态的输入框边框变红 */
+.u-form-item--error .u--input,
+.u-form-item--error .u-input,
+.u-form-item--error .u-input__content,
+.u-form-item--error .u-input__content__field-wrapper {
+ border: 2rpx solid #f56c6c !important;
+ background: #fef0f0 !important;
+}
+
+.u-form-item--error .u--textarea,
+.u-form-item--error .u-textarea {
+ border: 2rpx solid #f56c6c !important;
+ background: #fef0f0 !important;
+}
\ No newline at end of file
diff --git a/src/pages/health/healthRecord/addEdit.vue b/src/pages/health/healthRecord/addEdit.vue
index 2505284..9698208 100644
--- a/src/pages/health/healthRecord/addEdit.vue
+++ b/src/pages/health/healthRecord/addEdit.vue
@@ -3,48 +3,60 @@
{{ title}}
-
+
-
-
+
+
+ ▼
+
+ inputAlign="left" :customStyle="getInputStyle('name')">
+
-
+ inputAlign="left" :customStyle="getInputStyle('typeName')">
+ ▼
+
-
-
+
+
+ ▼
+
-
-
+
+
+ ▼
+
-
-
+
+
+ ▼
+
-
-
+
+
+ ▼
+
-
+
-
+
-
+