|
|
|
|
@ -0,0 +1,419 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="page-container">
|
|
|
|
|
<AppTitleHeader :title="t('moldInspectionItems.moduleName')" :subTitle="t('moldInspectionItems.subTitle')" :showSubTitle="true" />
|
|
|
|
|
|
|
|
|
|
<!-- 查询区域 -->
|
|
|
|
|
<view class="search-card">
|
|
|
|
|
<view class="search-row">
|
|
|
|
|
<view class="search-input-wrap">
|
|
|
|
|
<text class="iconfont icon-search search-icon"></text>
|
|
|
|
|
<input v-model="searchKeyword" class="search-input" :placeholder="t('moldInspectionItems.searchPlaceholder')" @confirm="handleSearch" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="search-btn" @click="handleSearch">{{ t('functionCommon.search') }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 列表区域 -->
|
|
|
|
|
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore" :lower-threshold="80">
|
|
|
|
|
<view class="list-wrap">
|
|
|
|
|
<view v-for="item in list" :key="item.id" class="type-card" @click="openDetail(item)">
|
|
|
|
|
<view class="card-header">
|
|
|
|
|
<view class="header-left">
|
|
|
|
|
<text class="type-name">{{ textValue(item.subjectName) }}</text>
|
|
|
|
|
<text class="type-code">{{ t('moldInspectionItems.code') }}: {{ textValue(item.subjectCode) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="card-actions">
|
|
|
|
|
<view class="action-btn edit-btn" @click.stop="openEdit(item)">
|
|
|
|
|
<uni-icons type="compose" size="18" color="#ffffff"></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="action-btn delete-btn" @click.stop="confirmDelete(item)">
|
|
|
|
|
<uni-icons type="trash" size="18" color="#ffffff"></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="card-body">
|
|
|
|
|
<view class="row">
|
|
|
|
|
<text class="label">{{ t('moldInspectionItems.inspectionMethod') }}</text>
|
|
|
|
|
<text class="value">{{ dictLabel(inspectionMethodOptions, item.inspectionMethod) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<text class="label">{{ t('moldInspectionItems.valueType') }}</text>
|
|
|
|
|
<text class="value">{{ dictLabel(valueTypeOptions, item.valueType) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<text class="label">{{ t('moldInspectionItems.isEnable') }}</text>
|
|
|
|
|
<text class="value">{{ dictLabel(boolOptions, item.isEnable) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<text class="label">{{ t('moldInspectionItems.creatorName') }}</text>
|
|
|
|
|
<text class="value">{{ textValue(item.creatorName) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<text class="label">{{ t('moldInspectionItems.createTime') }}</text>
|
|
|
|
|
<text class="value">{{ formatDateTime(item.createTime) }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view v-if="loading && pageNo === 1" class="hint">{{ t('functionCommon.loading') }}</view>
|
|
|
|
|
<view v-else-if="!list.length" class="hint">{{ t('moldInspectionItems.empty') }}</view>
|
|
|
|
|
<view v-else-if="loadingMore" class="hint">{{ t('functionCommon.loadingMore') }}</view>
|
|
|
|
|
<view v-else-if="finished" class="hint">{{ t('functionCommon.noMoreData') }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
|
|
<view class="fab-btn" @click="openCreate">
|
|
|
|
|
<uni-icons type="plusempty" size="30" color="#fff"></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="showGoTop" class="go-top-btn" @click="goTop">
|
|
|
|
|
<uni-icons type="arrow-up" size="20" color="#1a3a5c"></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 新增/编辑弹框 -->
|
|
|
|
|
<uni-popup ref="formPopupRef" type="center" background-color="#fff">
|
|
|
|
|
<view class="popup-content">
|
|
|
|
|
<view class="popup-header">
|
|
|
|
|
<text class="popup-title">{{ formMode === 'create' ? t('moldInspectionItems.createTitle') : t('moldInspectionItems.editTitle') }}</text>
|
|
|
|
|
<view class="popup-close" @click="closeForm">
|
|
|
|
|
<text class="close-icon">×</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<scroll-view scroll-y class="form-scroll">
|
|
|
|
|
<view class="form-content">
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.code') }} <text class="required-star">*</text></text>
|
|
|
|
|
<input v-model="formData.subjectCode" class="form-input" type="text" :placeholder="t('moldInspectionItems.placeholderCode')" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.name') }} <text class="required-star">*</text></text>
|
|
|
|
|
<input v-model="formData.subjectName" class="form-input" type="text" :placeholder="t('moldInspectionItems.placeholderName')" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.inspectionMethod') }} <text class="required-star">*</text></text>
|
|
|
|
|
<picker mode="selector" :range="inspectionMethodOptions" range-key="label" :value="inspectionMethodIndex" @change="onInspectionMethodChange">
|
|
|
|
|
<view class="picker-view">{{ inspectionMethodLabel || t('moldInspectionItems.placeholderInspectionMethod') }}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.valueType') }} <text class="required-star">*</text></text>
|
|
|
|
|
<picker mode="selector" :range="valueTypeOptions" range-key="label" :value="valueTypeIndex" @change="onValueTypeChange">
|
|
|
|
|
<view class="picker-view">{{ valueTypeLabel || t('moldInspectionItems.placeholderValueType') }}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.isEnable') }} <text class="required-star">*</text></text>
|
|
|
|
|
<picker mode="selector" :range="boolOptions" range-key="label" :value="boolIndex" @change="onBoolChange">
|
|
|
|
|
<view class="picker-view">{{ boolLabel || t('moldInspectionItems.placeholderIsEnable') }}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-item">
|
|
|
|
|
<text class="form-label">{{ t('moldInspectionItems.judgmentCriteria') }} <text class="required-star">*</text></text>
|
|
|
|
|
<textarea v-model="formData.judgmentCriteria" class="form-textarea" :placeholder="t('moldInspectionItems.placeholderJudgmentCriteria')" maxlength="500" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
<view class="form-footer">
|
|
|
|
|
<view class="footer-btn cancel-btn" @click="closeForm"><text class="btn-text">{{ t('functionCommon.cancel') }}</text></view>
|
|
|
|
|
<view class="footer-btn confirm-btn" @click="submitForm"><text class="btn-text">{{ t('functionCommon.save') }}</text></view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-popup>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { computed, reactive, ref } from 'vue'
|
|
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
|
|
|
|
|
import { useDict } from '@/utils/dict'
|
|
|
|
|
import { getMoldInspectionItemPage, getMoldInspectionItemDetail, createMoldInspectionItem, updateMoldInspectionItem, deleteMoldInspectionItem } from '@/api/mes/moldInspectionItems'
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const { Inspection_method, value_types, infra_boolean_string } = useDict('Inspection_method', 'value_types', 'infra_boolean_string')
|
|
|
|
|
|
|
|
|
|
const formPopupRef = ref(null)
|
|
|
|
|
const searchKeyword = ref('')
|
|
|
|
|
const list = ref([])
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const loadingMore = ref(false)
|
|
|
|
|
const finished = ref(false)
|
|
|
|
|
const pageNo = ref(1)
|
|
|
|
|
const pageSize = ref(10)
|
|
|
|
|
const scrollTop = ref(0)
|
|
|
|
|
const showGoTop = ref(false)
|
|
|
|
|
const formMode = ref('create')
|
|
|
|
|
const formData = reactive({
|
|
|
|
|
id: undefined,
|
|
|
|
|
subjectCode: '',
|
|
|
|
|
subjectName: '',
|
|
|
|
|
inspectionMethod: '',
|
|
|
|
|
valueType: '',
|
|
|
|
|
isEnable: '',
|
|
|
|
|
judgmentCriteria: ''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const inspectionMethodOptions = computed(() => Inspection_method.value || [])
|
|
|
|
|
const valueTypeOptions = computed(() => value_types.value || [])
|
|
|
|
|
const boolOptions = computed(() => infra_boolean_string.value || [])
|
|
|
|
|
|
|
|
|
|
const inspectionMethodLabel = computed(() => dictLabel(inspectionMethodOptions.value, formData.inspectionMethod))
|
|
|
|
|
const valueTypeLabel = computed(() => dictLabel(valueTypeOptions.value, formData.valueType))
|
|
|
|
|
const boolLabel = computed(() => dictLabel(boolOptions.value, formData.isEnable))
|
|
|
|
|
|
|
|
|
|
const inspectionMethodIndex = computed(() => optionIndex(inspectionMethodOptions.value, formData.inspectionMethod))
|
|
|
|
|
const valueTypeIndex = computed(() => optionIndex(valueTypeOptions.value, formData.valueType))
|
|
|
|
|
const boolIndex = computed(() => optionIndex(boolOptions.value, formData.isEnable))
|
|
|
|
|
|
|
|
|
|
function optionIndex(options, value) {
|
|
|
|
|
const idx = options.findIndex((o) => String(o.value) === String(value))
|
|
|
|
|
return idx < 0 ? 0 : idx
|
|
|
|
|
}
|
|
|
|
|
function dictLabel(options, value) {
|
|
|
|
|
const hit = (options || []).find((o) => String(o.value) === String(value))
|
|
|
|
|
return hit ? hit.label : textValue(value)
|
|
|
|
|
}
|
|
|
|
|
function textValue(v) {
|
|
|
|
|
if (v === 0) return '0'
|
|
|
|
|
if (v === null || v === undefined) return '-'
|
|
|
|
|
const s = String(v).trim()
|
|
|
|
|
return s || '-'
|
|
|
|
|
}
|
|
|
|
|
function formatDateTime(v) {
|
|
|
|
|
if (!v) return '-'
|
|
|
|
|
const d = new Date(Number(v))
|
|
|
|
|
if (Number.isNaN(d.getTime())) return textValue(v)
|
|
|
|
|
const p = (n) => String(n).padStart(2, '0')
|
|
|
|
|
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`
|
|
|
|
|
}
|
|
|
|
|
function normalizePageData(res) {
|
|
|
|
|
const root = res && res.data !== undefined ? res.data : res
|
|
|
|
|
const l = root?.list || root?.rows || root?.records || root?.data?.list || []
|
|
|
|
|
const total = root?.total ?? root?.data?.total ?? (Array.isArray(l) ? l.length : 0)
|
|
|
|
|
return { list: Array.isArray(l) ? l : [], total: Number(total || 0) }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function fetchList(reset = true) {
|
|
|
|
|
if (reset) {
|
|
|
|
|
pageNo.value = 1
|
|
|
|
|
finished.value = false
|
|
|
|
|
}
|
|
|
|
|
if (pageNo.value === 1) loading.value = true
|
|
|
|
|
else loadingMore.value = true
|
|
|
|
|
try {
|
|
|
|
|
const params = {
|
|
|
|
|
pageNo: pageNo.value,
|
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
|
subjectCode: searchKeyword.value.trim() || undefined,
|
|
|
|
|
subjectName: searchKeyword.value.trim() || undefined,
|
|
|
|
|
judgmentCriteria: searchKeyword.value.trim() || undefined
|
|
|
|
|
}
|
|
|
|
|
const res = await getMoldInspectionItemPage(params)
|
|
|
|
|
const page = normalizePageData(res)
|
|
|
|
|
if (reset) list.value = page.list
|
|
|
|
|
else list.value = [...list.value, ...page.list]
|
|
|
|
|
finished.value = list.value.length >= page.total || page.list.length < pageSize.value
|
|
|
|
|
} catch (e) {
|
|
|
|
|
if (!reset) pageNo.value = Math.max(1, pageNo.value - 1)
|
|
|
|
|
uni.showToast({ title: t('functionCommon.loadFailed'), icon: 'none' })
|
|
|
|
|
} finally {
|
|
|
|
|
loading.value = false
|
|
|
|
|
loadingMore.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleSearch() { await fetchList(true) }
|
|
|
|
|
async function loadMore() {
|
|
|
|
|
if (loading.value || loadingMore.value || finished.value) return
|
|
|
|
|
pageNo.value += 1
|
|
|
|
|
await fetchList(false)
|
|
|
|
|
}
|
|
|
|
|
function onScroll(e) {
|
|
|
|
|
const top = Number(e?.detail?.scrollTop || 0)
|
|
|
|
|
showGoTop.value = top > 600
|
|
|
|
|
}
|
|
|
|
|
function goTop() { scrollTop.value = 0 }
|
|
|
|
|
|
|
|
|
|
function resetForm() {
|
|
|
|
|
formData.id = undefined
|
|
|
|
|
formData.subjectCode = ''
|
|
|
|
|
formData.subjectName = ''
|
|
|
|
|
formData.inspectionMethod = inspectionMethodOptions.value[0]?.value ?? ''
|
|
|
|
|
formData.valueType = valueTypeOptions.value[0]?.value ?? ''
|
|
|
|
|
formData.isEnable = boolOptions.value[0]?.value ?? ''
|
|
|
|
|
formData.judgmentCriteria = ''
|
|
|
|
|
}
|
|
|
|
|
function openCreate() {
|
|
|
|
|
formMode.value = 'create'
|
|
|
|
|
resetForm()
|
|
|
|
|
formPopupRef.value?.open()
|
|
|
|
|
}
|
|
|
|
|
async function openEdit(item) {
|
|
|
|
|
const id = item?.id
|
|
|
|
|
if (!id) {
|
|
|
|
|
uni.showToast({ title: t('functionCommon.noIdEdit'), icon: 'none' })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
formMode.value = 'update'
|
|
|
|
|
resetForm()
|
|
|
|
|
try {
|
|
|
|
|
const res = await getMoldInspectionItemDetail(id)
|
|
|
|
|
const detail = res?.data || {}
|
|
|
|
|
formData.id = detail.id
|
|
|
|
|
formData.subjectCode = detail.subjectCode || ''
|
|
|
|
|
formData.subjectName = detail.subjectName || ''
|
|
|
|
|
formData.inspectionMethod = detail.inspectionMethod ?? formData.inspectionMethod
|
|
|
|
|
formData.valueType = detail.valueType ?? formData.valueType
|
|
|
|
|
formData.isEnable = detail.isEnable ?? formData.isEnable
|
|
|
|
|
formData.judgmentCriteria = detail.judgmentCriteria || ''
|
|
|
|
|
formPopupRef.value?.open()
|
|
|
|
|
} catch (e) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.loadEditFailed'), icon: 'none' })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async function openDetail(item) {
|
|
|
|
|
if (!item?.id) {
|
|
|
|
|
uni.showToast({ title: t('functionCommon.noIdView'), icon: 'none' })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages_function/pages/moldInspectionItems/detail?id=${encodeURIComponent(String(item.id))}`
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
async function confirmDelete(item) {
|
|
|
|
|
if (!item?.id) {
|
|
|
|
|
uni.showToast({ title: t('functionCommon.noIdDelete'), icon: 'none' })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: t('functionCommon.confirmDelete'),
|
|
|
|
|
content: t('moldInspectionItems.confirmDelete'),
|
|
|
|
|
success: async ({ confirm }) => {
|
|
|
|
|
if (!confirm) return
|
|
|
|
|
try {
|
|
|
|
|
await deleteMoldInspectionItem([item.id])
|
|
|
|
|
uni.showToast({ title: t('functionCommon.deleteSuccess'), icon: 'success' })
|
|
|
|
|
await fetchList(true)
|
|
|
|
|
} catch (e) {
|
|
|
|
|
uni.showToast({ title: t('functionCommon.deleteFailed'), icon: 'none' })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function closeForm() { formPopupRef.value?.close() }
|
|
|
|
|
|
|
|
|
|
function onInspectionMethodChange(e) {
|
|
|
|
|
const idx = Number(e?.detail?.value || 0)
|
|
|
|
|
formData.inspectionMethod = inspectionMethodOptions.value[idx]?.value
|
|
|
|
|
}
|
|
|
|
|
function onValueTypeChange(e) {
|
|
|
|
|
const idx = Number(e?.detail?.value || 0)
|
|
|
|
|
formData.valueType = valueTypeOptions.value[idx]?.value
|
|
|
|
|
}
|
|
|
|
|
function onBoolChange(e) {
|
|
|
|
|
const idx = Number(e?.detail?.value || 0)
|
|
|
|
|
formData.isEnable = boolOptions.value[idx]?.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function validateForm() {
|
|
|
|
|
if (!String(formData.subjectCode || '').trim()) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorSubjectCodeRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (!String(formData.subjectName || '').trim()) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorSubjectNameRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (formData.inspectionMethod === '' || formData.inspectionMethod === undefined || formData.inspectionMethod === null) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorInspectionMethodRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (formData.valueType === '' || formData.valueType === undefined || formData.valueType === null) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorValueTypeRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (formData.isEnable === '' || formData.isEnable === undefined || formData.isEnable === null) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorIsEnableRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (!String(formData.judgmentCriteria || '').trim()) {
|
|
|
|
|
uni.showToast({ title: t('moldInspectionItems.validatorJudgmentCriteriaRequired'), icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
async function submitForm() {
|
|
|
|
|
if (!validateForm()) return
|
|
|
|
|
const payload = {
|
|
|
|
|
id: formMode.value === 'update' ? formData.id : undefined,
|
|
|
|
|
subjectCode: String(formData.subjectCode).trim(),
|
|
|
|
|
subjectName: String(formData.subjectName).trim(),
|
|
|
|
|
inspectionMethod: formData.inspectionMethod,
|
|
|
|
|
valueType: formData.valueType,
|
|
|
|
|
isEnable: formData.isEnable,
|
|
|
|
|
judgmentCriteria: String(formData.judgmentCriteria).trim()
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
if (formMode.value === 'create') {
|
|
|
|
|
await createMoldInspectionItem(payload)
|
|
|
|
|
uni.showToast({ title: t('functionCommon.createSuccess'), icon: 'success' })
|
|
|
|
|
} else {
|
|
|
|
|
await updateMoldInspectionItem(payload)
|
|
|
|
|
uni.showToast({ title: t('functionCommon.updateSuccess'), icon: 'success' })
|
|
|
|
|
}
|
|
|
|
|
closeForm()
|
|
|
|
|
await fetchList(true)
|
|
|
|
|
} catch (e) {
|
|
|
|
|
uni.showToast({ title: t('functionCommon.saveFailed'), icon: 'none' })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onShow(async () => {
|
|
|
|
|
await fetchList(true)
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-container { min-height: 100vh; background-color: #f0f2f5; }
|
|
|
|
|
.search-card { margin: 16rpx 24rpx; display: flex; gap: 16rpx; background: #fff; border-radius: 14rpx; padding: 16rpx; }
|
|
|
|
|
.search-row { display: flex; gap: 12rpx; width: 100%; }
|
|
|
|
|
.search-input-wrap { flex: 1; display: flex; align-items: center; background: #f5f7fa; border-radius: 40rpx; padding: 0 20rpx; }
|
|
|
|
|
.search-icon { color: #909399; font-size: 30rpx; }
|
|
|
|
|
.search-input { flex: 1; height: 68rpx; margin-left: 12rpx; font-size: 26rpx; }
|
|
|
|
|
.search-btn { min-width: 120rpx; height: 68rpx; border-radius: 34rpx; background: #1a3a5c; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26rpx; }
|
|
|
|
|
.list-scroll { height: calc(100vh - 280rpx); }
|
|
|
|
|
.list-wrap { padding: 0 24rpx 130rpx; }
|
|
|
|
|
.type-card { background: #ffffff; border-radius: 18rpx; padding: 24rpx; margin-bottom: 18rpx; box-shadow: 0 4rpx 18rpx rgba(0, 0, 0, 0.05); }
|
|
|
|
|
.card-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18rpx; border-bottom: 1rpx solid #edf0f3; }
|
|
|
|
|
.header-left { display: flex; flex-direction: column; gap: 8rpx; }
|
|
|
|
|
.type-name { font-size: 32rpx; font-weight: 700; color: #1f2d3d; }
|
|
|
|
|
.type-code { font-size: 24rpx; color: #8a9099; }
|
|
|
|
|
.card-actions { display: flex; gap: 14rpx; }
|
|
|
|
|
.action-btn { width: 60rpx; height: 60rpx; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
.edit-btn { background: #1a3a5c; }
|
|
|
|
|
.delete-btn { background: #e34d59; }
|
|
|
|
|
.card-body { padding-top: 16rpx; }
|
|
|
|
|
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 12rpx; }
|
|
|
|
|
.label { font-size: 26rpx; color: #8a9099; }
|
|
|
|
|
.value { font-size: 27rpx; color: #30363d; max-width: 62%; text-align: right; }
|
|
|
|
|
.hint { text-align: center; color: #909399; padding: 24rpx 0; }
|
|
|
|
|
.fab-btn { position: fixed; right: 34rpx; bottom: 120rpx; width: 96rpx; height: 96rpx; border-radius: 50%; background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 10rpx 30rpx rgba(26, 58, 92, 0.3); z-index: 20; }
|
|
|
|
|
.go-top-btn { position: fixed; right: 34rpx; bottom: 240rpx; width: 80rpx; height: 80rpx; border-radius: 50%; background: #fff; box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12); display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
.popup-content { width: 680rpx; max-height: 80vh; background: #fff; border-radius: 24rpx; overflow: hidden; }
|
|
|
|
|
.popup-header { height: 92rpx; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1rpx solid #edf0f3; }
|
|
|
|
|
.popup-title { font-size: 32rpx; font-weight: 700; color: #1f2d3d; }
|
|
|
|
|
.popup-close { position: absolute; right: 24rpx; top: 20rpx; width: 48rpx; height: 48rpx; display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
.close-icon { font-size: 42rpx; color: #9aa0a6; line-height: 1; }
|
|
|
|
|
.form-scroll { max-height: calc(80vh - 180rpx); }
|
|
|
|
|
.form-content { padding: 22rpx 28rpx; }
|
|
|
|
|
.form-item { margin-bottom: 18rpx; }
|
|
|
|
|
.form-label { display: block; font-size: 25rpx; color: #5f6b7a; margin-bottom: 10rpx; }
|
|
|
|
|
.required-star { color: #e34d59; }
|
|
|
|
|
.form-input,.picker-view { min-height: 72rpx; background: #f7f9fc; border-radius: 12rpx; padding: 0 18rpx; display: flex; align-items: center; font-size: 26rpx; color: #2f3a45; }
|
|
|
|
|
.form-textarea { width: 100%; min-height: 140rpx; background: #f7f9fc; border-radius: 12rpx; padding: 14rpx 18rpx; font-size: 26rpx; color: #2f3a45; box-sizing: border-box; }
|
|
|
|
|
.form-footer { height: 88rpx; display: flex; border-top: 1rpx solid #edf0f3; }
|
|
|
|
|
.footer-btn { flex: 1; display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
.btn-text { font-size: 28rpx; }
|
|
|
|
|
.cancel-btn { background: #f4f6fa; color: #5f6b7a; }
|
|
|
|
|
.confirm-btn { background: #1a3a5c; color: #fff; }
|
|
|
|
|
</style>
|