From 78caa769e452f63288743b8997f7b4c21bb06ce5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 06 十一月 2026 19:00:38 +0800
Subject: [PATCH] feat(crm,mes): 扩展客户字段与重构批次号生成逻辑
---
src/views/mes/qc/seedRange/index.vue | 505 ++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 451 insertions(+), 54 deletions(-)
diff --git a/src/views/mes/qc/seedRange/index.vue b/src/views/mes/qc/seedRange/index.vue
index 72b6e4b..ef228ed 100644
--- a/src/views/mes/qc/seedRange/index.vue
+++ b/src/views/mes/qc/seedRange/index.vue
@@ -1,91 +1,488 @@
<script setup lang="ts">
-import { computed, onMounted, ref } from 'vue';
-import { message } from 'ant-design-vue';
+import { computed, onMounted, reactive, ref } from 'vue';
+
import { useAccess } from '@vben/access';
-import { getSeedIndicatorRanges, saveSeedIndicatorRanges } from '#/api/mes/qc/seedQuality';
+import { IconifyIcon } from '@vben/icons';
+import { message } from 'ant-design-vue';
-const definitions = [
- { indicatorCode: 'purity', name: '绾害' },
- { indicatorCode: 'cleanliness', name: '鍑�搴�' },
- { indicatorCode: 'germination_rate', name: '鍙戣娊鐜�' },
- { indicatorCode: 'moisture', name: '姘村垎' },
-];
-const ranges = ref(definitions.map((item) => ({ ...item, minValue: undefined as number | undefined, maxValue: undefined as number | undefined })));
-const loading = ref(false);
-const saving = ref(false);
+import type { SeedIndicatorRange } from '#/api/mes/qc/seedQuality';
+
+import {
+ copyDefaultSeedIndicatorRanges,
+ createSeedIndicatorRange,
+ deleteSeedIndicatorRange,
+ getSeedIndicatorRanges,
+ updateSeedIndicatorRange,
+} from '#/api/mes/qc/seedQuality';
+import { getItemPage } from '#/api/mdm/item';
+
+interface ProductOption {
+ id: number;
+ code: string;
+ name: string;
+}
+
const { hasAccessByCodes } = useAccess();
-const complete = computed(() => ranges.value.every((item) =>
- item.minValue !== undefined && item.maxValue !== undefined && item.minValue <= item.maxValue));
+const canEdit = computed(() => hasAccessByCodes(['mes:qc-seed-range:update']));
-async function load() {
+const products = ref<ProductOption[]>([]);
+const productLoading = ref(false);
+const selectedItemId = ref<number>();
+const selectedProduct = computed(() => products.value.find((item) => item.id === selectedItemId.value));
+
+const items = ref<SeedIndicatorRange[]>([]);
+const loading = ref(false);
+const copying = ref(false);
+const togglingId = ref<number>();
+
+const enabledCount = computed(() => items.value.filter((item) => item.status === 0).length);
+const disabledCount = computed(() => items.value.length - enabledCount.value);
+
+const columns = [
+ { title: '璐ㄦ椤�', dataIndex: 'indicatorName', key: 'indicatorName', width: 200 },
+ { title: '缂栫爜', dataIndex: 'indicatorCode', key: 'indicatorCode', width: 180 },
+ { title: '鍚堟牸鑼冨洿', key: 'range', width: 180 },
+ { title: '鎺掑簭', dataIndex: 'sort', key: 'sort', width: 90, align: 'center' as const },
+ { title: '鐘舵��', key: 'status', width: 120, align: 'center' as const },
+ { title: '鎿嶄綔', key: 'action', width: 150, align: 'center' as const, fixed: 'right' as const },
+];
+
+const modalOpen = ref(false);
+const saving = ref(false);
+const editingId = ref<number>();
+const form = reactive({
+ indicatorCode: '',
+ indicatorName: '',
+ unit: '%',
+ minValue: undefined as number | undefined,
+ maxValue: undefined as number | undefined,
+ sort: 0,
+ status: 0,
+});
+
+function formatNumber(value?: number | string) {
+ const num = Number(value);
+ return Number.isFinite(num) ? String(num) : '鈥�';
+}
+
+function rangeText(row: SeedIndicatorRange) {
+ return `${formatNumber(row.minValue)} ~ ${formatNumber(row.maxValue)}${row.unit ? ` ${row.unit}` : ''}`;
+}
+
+async function loadProducts(search?: string) {
+ productLoading.value = true;
+ try {
+ const page = await getItemPage({
+ pageNo: 1,
+ pageSize: 100,
+ status: 0,
+ name: search?.trim() || undefined,
+ });
+ const list = (page.list || []).map((item) => ({
+ id: Number(item.id),
+ code: item.code,
+ name: item.name,
+ }));
+ if (selectedProduct.value && !list.some((item) => item.id === selectedProduct.value?.id)) {
+ list.unshift(selectedProduct.value);
+ }
+ products.value = list;
+ } catch (error) {
+ message.error((error as Error).message || '璇诲彇浜у搧鍒楄〃澶辫触');
+ } finally {
+ productLoading.value = false;
+ }
+}
+
+async function loadItems() {
+ if (!selectedItemId.value) {
+ items.value = [];
+ return;
+ }
loading.value = true;
try {
- const data = await getSeedIndicatorRanges();
- ranges.value = definitions.map((item) => {
- const saved = data.find((row) => row.indicatorCode === item.indicatorCode);
- return { ...item, minValue: saved ? Number(saved.minValue) : undefined,
- maxValue: saved ? Number(saved.maxValue) : undefined };
- });
+ items.value = await getSeedIndicatorRanges({ itemId: selectedItemId.value });
} catch (error) {
- message.error((error as Error).message || '璇诲彇鍚堟牸鑼冨洿澶辫触');
+ items.value = [];
+ message.error((error as Error).message || '璇诲彇璐ㄦ椤瑰け璐�');
} finally {
loading.value = false;
}
}
-async function save() {
- if (!complete.value || ranges.value.some((item) => item.minValue! < 0 || item.maxValue! > 100)) {
- message.warning('璇蜂负鍥涢」鎸囨爣閰嶇疆 0鈥�100% 鐨勬湁鏁堜笂涓嬮檺');
+async function onProductChange(value: number) {
+ selectedItemId.value = value;
+ await loadItems();
+}
+
+function resetForm() {
+ form.indicatorCode = '';
+ form.indicatorName = '';
+ form.unit = '%';
+ form.minValue = undefined;
+ form.maxValue = undefined;
+ form.sort = 0;
+ form.status = 0;
+}
+
+function openCreate() {
+ if (!selectedItemId.value) {
+ message.warning('璇峰厛閫夋嫨浜у搧');
return;
}
+ editingId.value = undefined;
+ resetForm();
+ form.sort = items.value.length * 10 + 10;
+ modalOpen.value = true;
+}
+
+function openEdit(row: SeedIndicatorRange) {
+ editingId.value = row.id;
+ form.indicatorCode = row.indicatorCode;
+ form.indicatorName = row.indicatorName;
+ form.unit = row.unit || '%';
+ form.minValue = Number(row.minValue);
+ form.maxValue = Number(row.maxValue);
+ form.sort = row.sort ?? 0;
+ form.status = row.status ?? 0;
+ modalOpen.value = true;
+}
+
+function validateForm() {
+ if (!form.indicatorName.trim()) {
+ message.warning('璇峰~鍐欒川妫�椤瑰悕绉�');
+ return false;
+ }
+ if (!/^[A-Za-z][A-Za-z0-9_]{0,63}$/.test(form.indicatorCode.trim())) {
+ message.warning('缂栫爜蹇呴』浠ュ瓧姣嶅紑澶达紝浠呭彲鍖呭惈瀛楁瘝銆佹暟瀛楀拰涓嬪垝绾�');
+ return false;
+ }
+ if (form.minValue === undefined || form.maxValue === undefined) {
+ message.warning('璇峰~鍐欏悎鏍间笂涓嬮檺');
+ return false;
+ }
+ if (Number(form.minValue) < 0 || Number(form.maxValue) < 0) {
+ message.warning('鍚堟牸涓婁笅闄愪笉鑳戒负璐熸暟');
+ return false;
+ }
+ if (Number(form.minValue) > Number(form.maxValue)) {
+ message.warning('鍚堟牸涓嬮檺涓嶈兘澶т簬涓婇檺');
+ return false;
+ }
+ return true;
+}
+
+async function submitForm() {
+ if (!selectedItemId.value || !validateForm()) return;
saving.value = true;
+ const payload = {
+ itemId: selectedItemId.value,
+ indicatorCode: form.indicatorCode.trim(),
+ indicatorName: form.indicatorName.trim(),
+ unit: form.unit?.trim() || '%',
+ minValue: Number(form.minValue),
+ maxValue: Number(form.maxValue),
+ sort: form.sort ?? 0,
+ status: form.status ?? 0,
+ };
try {
- await saveSeedIndicatorRanges(ranges.value.map((item) => ({
- indicatorCode: item.indicatorCode,
- minValue: item.minValue!, maxValue: item.maxValue!,
- })));
- message.success('榛樿鍚堟牸鑼冨洿宸蹭繚瀛橈紝妫�楠屾椂浠嶅彲鎸夊疄闄呮儏鍐佃皟鏁�');
- await load();
+ if (editingId.value) {
+ await updateSeedIndicatorRange(editingId.value, payload);
+ message.success('璐ㄦ椤瑰凡鏇存柊');
+ } else {
+ await createSeedIndicatorRange(payload);
+ message.success('璐ㄦ椤瑰凡鏂板');
+ }
+ modalOpen.value = false;
+ await loadItems();
} catch (error) {
- message.error((error as Error).message || '淇濆瓨鍚堟牸鑼冨洿澶辫触');
+ message.error((error as Error).message || '淇濆瓨璐ㄦ椤瑰け璐�');
} finally {
saving.value = false;
}
}
-onMounted(load);
+async function removeItem(row: SeedIndicatorRange) {
+ try {
+ await deleteSeedIndicatorRange(row.id);
+ message.success('璐ㄦ椤瑰凡鍒犻櫎');
+ await loadItems();
+ } catch (error) {
+ message.error((error as Error).message || '鍒犻櫎璐ㄦ椤瑰け璐�');
+ }
+}
+
+async function toggleStatus(row: SeedIndicatorRange) {
+ if (!canEdit.value || !selectedItemId.value) return;
+ const next = row.status === 0 ? 1 : 0;
+ togglingId.value = row.id;
+ try {
+ await updateSeedIndicatorRange(row.id, {
+ itemId: selectedItemId.value,
+ indicatorCode: row.indicatorCode,
+ indicatorName: row.indicatorName,
+ unit: row.unit || '%',
+ minValue: Number(row.minValue),
+ maxValue: Number(row.maxValue),
+ sort: row.sort ?? 0,
+ status: next,
+ });
+ row.status = next;
+ message.success(next === 0 ? '宸插惎鐢�' : '宸插仠鐢�');
+ } catch (error) {
+ message.error((error as Error).message || '鏇存柊鐘舵�佸け璐�');
+ } finally {
+ togglingId.value = undefined;
+ }
+}
+
+async function copyDefaults() {
+ if (!selectedItemId.value) return;
+ copying.value = true;
+ try {
+ const count = await copyDefaultSeedIndicatorRanges(selectedItemId.value);
+ message.success(count ? `宸插鍒� ${count} 涓�氱敤榛樿椤筦 : '娌℃湁鍙鍒剁殑閫氱敤榛樿椤�');
+ await loadItems();
+ } catch (error) {
+ message.error((error as Error).message || '澶嶅埗榛樿椤瑰け璐�');
+ } finally {
+ copying.value = false;
+ }
+}
+
+onMounted(async () => {
+ await loadProducts();
+ if (products.value.length) {
+ selectedItemId.value = products.value[0]!.id;
+ await loadItems();
+ }
+});
</script>
<template>
<div class="range-page">
<header class="page-header">
- <div><div class="eyebrow">MES / 璐ㄩ噺绠$悊</div><h1>璐ㄦ椤瑰悎鏍艰寖鍥撮厤缃�</h1>
- <p>涓哄垵妫�鍜屽妫�鎻愪緵鍥涢」鎸囨爣鐨勯粯璁よ寖鍥淬��</p></div>
- </header>
- <a-alert type="info" show-icon message="杩欓噷閰嶇疆鐨勬槸濉啓妯℃澘" description="妫�楠屽憳鍙互淇敼鏈鍚堟牸涓婁笅闄愶紱瀹為檯鎻愪氦鐨勪笂涓嬮檺鍜屽疄娴嬪�间竴鍚屼繚瀛橈紝鍘嗗彶璁板綍涓嶅彈妯℃澘淇敼褰卞搷銆�" />
- <a-card class="range-card" :loading="loading" :bordered="false">
- <div class="grid-head"><span>璐ㄦ椤�</span><span>鍚堟牸涓嬮檺</span><span>鍚堟牸涓婇檺</span><span>鍗曚綅</span></div>
- <div v-for="item in ranges" :key="item.indicatorCode" class="range-row">
- <strong>{{ item.name }}</strong>
- <a-input-number v-model:value="item.minValue" :min="0" :max="100" :precision="3" :disabled="!hasAccessByCodes(['mes:qc-seed-range:update'])" placeholder="涓嬮檺" />
- <a-input-number v-model:value="item.maxValue" :min="0" :max="100" :precision="3" :disabled="!hasAccessByCodes(['mes:qc-seed-range:update'])" placeholder="涓婇檺" />
- <span>%</span>
+ <div class="header-main">
+ <div class="eyebrow">MES / 璐ㄩ噺绠$悊</div>
+ <h1>璐ㄦ椤瑰悎鏍艰寖鍥撮厤缃�</h1>
+ <p>鎸変骇鍝佺淮鎶よ川妫�椤逛笌榛樿鍚堟牸鑼冨洿锛屽垵妫�涓庡妫�鎸夎浜у搧鐨勮川妫�椤瑰綍鍏ャ��</p>
</div>
- <div class="actions">
- <a-button @click="load">鍒锋柊</a-button>
- <a-button v-if="hasAccessByCodes(['mes:qc-seed-range:update'])" type="primary" :loading="saving" :disabled="!complete" @click="save">淇濆瓨鍚堟牸鑼冨洿</a-button>
+ <div class="header-badge"><IconifyIcon icon="ep:box" /> 浜у搧缁村害閰嶇疆</div>
+ </header>
+
+ <a-alert
+ type="info"
+ show-icon
+ message="閰嶇疆瑙勫垯"
+ description="姣忎釜璐ㄦ椤瑰繀椤荤粦瀹氫骇鍝併�傛楠屽憳浠嶅彲淇敼鏈鍚堟牸涓婁笅闄愶紝瀹為檯鎻愪氦鐨勮寖鍥村拰瀹炴祴鍊间細闅忚褰曚繚瀛橈紝鍘嗗彶璁板綍涓嶅彈妯℃澘淇敼褰卞搷銆�"
+ />
+
+ <a-card class="range-card" :bordered="false">
+ <div class="toolbar">
+ <div class="toolbar-select">
+ <span class="toolbar-label">閫夋嫨浜у搧</span>
+ <a-select
+ :value="selectedItemId"
+ class="product-select"
+ show-search
+ :filter-option="false"
+ :loading="productLoading"
+ placeholder="鎼滅储浜у搧缂栫爜鎴栧悕绉�"
+ :options="products.map((item) => ({ label: `${item.name}锛�${item.code}锛塦, value: item.id }))"
+ @change="onProductChange"
+ @search="loadProducts"
+ />
+ </div>
+ <div class="toolbar-actions">
+ <a-button :loading="loading" @click="loadItems">鍒锋柊</a-button>
+ <a-button v-if="canEdit" :loading="copying" :disabled="!selectedItemId" @click="copyDefaults">
+ 澶嶅埗閫氱敤榛樿椤�
+ </a-button>
+ <a-button v-if="canEdit" type="primary" :disabled="!selectedItemId" @click="openCreate">
+ <IconifyIcon icon="ep:plus" /> 鏂板璐ㄦ椤�
+ </a-button>
+ </div>
+ </div>
+
+ <div v-if="selectedProduct" class="product-summary">
+ <div class="product-identity">
+ <span class="product-name">{{ selectedProduct.name }}</span>
+ <span class="product-code">{{ selectedProduct.code }}</span>
+ </div>
+ <div class="product-stats">
+ <span class="stat"><b>{{ items.length }}</b> 涓川妫�椤�</span>
+ <span class="stat stat-success"><b>{{ enabledCount }}</b> 鍚敤</span>
+ <span class="stat stat-muted"><b>{{ disabledCount }}</b> 鍋滅敤</span>
+ </div>
+ </div>
+
+ <div v-if="!selectedItemId" class="placeholder-box">
+ <IconifyIcon icon="ep:search" class="placeholder-icon" />
+ <p>璇烽�夋嫨浜у搧鍚庣淮鎶よ川妫�椤�</p>
+ </div>
+
+ <a-table
+ v-else
+ :columns="columns"
+ :data-source="items"
+ :loading="loading"
+ :pagination="false"
+ :scroll="{ x: 920 }"
+ row-key="id"
+ size="middle"
+ >
+ <template #bodyCell="{ column, record }">
+ <template v-if="column.key === 'range'">
+ <span class="range-text">{{ rangeText(record) }}</span>
+ </template>
+ <template v-else-if="column.key === 'status'">
+ <a-switch
+ v-if="canEdit"
+ :checked="record.status === 0"
+ :loading="togglingId === record.id"
+ size="small"
+ @change="toggleStatus(record)"
+ />
+ <a-tag v-else :color="record.status === 0 ? 'success' : 'default'">
+ {{ record.status === 0 ? '鍚敤' : '鍋滅敤' }}
+ </a-tag>
+ </template>
+ <template v-else-if="column.key === 'action'">
+ <div v-if="canEdit" class="row-actions">
+ <a-button type="link" size="small" @click="openEdit(record)">缂栬緫</a-button>
+ <a-popconfirm
+ title="纭鍒犻櫎璇ヨ川妫�椤癸紵"
+ description="鍘嗗彶璐ㄦ璁板綍涓嶅彈褰卞搷銆�"
+ ok-text="鍒犻櫎"
+ cancel-text="鍙栨秷"
+ @confirm="removeItem(record)"
+ >
+ <a-button type="link" size="small" danger>鍒犻櫎</a-button>
+ </a-popconfirm>
+ </div>
+ <span v-else class="muted">鈥�</span>
+ </template>
+ </template>
+ </a-table>
+
+ <div v-if="selectedItemId && !loading && !items.length" class="empty-state">
+ <IconifyIcon icon="ep:document-add" class="empty-icon" />
+ <p class="empty-title">璇ヤ骇鍝佸皻鏈厤缃川妫�椤�</p>
+ <p class="empty-desc">鏈厤缃椂璐ㄦ灏嗕娇鐢ㄩ�氱敤榛樿椤癸紝鍙鍒跺悗鎸夐渶璋冩暣銆�</p>
+ <div v-if="canEdit" class="empty-actions">
+ <a-button type="primary" @click="openCreate">鏂板璐ㄦ椤�</a-button>
+ <a-button :loading="copying" @click="copyDefaults">澶嶅埗閫氱敤榛樿椤�</a-button>
+ </div>
</div>
</a-card>
+
+ <a-modal
+ v-model:open="modalOpen"
+ :title="editingId ? '缂栬緫璐ㄦ椤�' : '鏂板璐ㄦ椤�'"
+ :confirm-loading="saving"
+ ok-text="淇濆瓨"
+ cancel-text="鍙栨秷"
+ width="560px"
+ @ok="submitForm"
+ >
+ <div class="modal-product">
+ <span class="modal-product-label">缁戝畾浜у搧</span>
+ <span class="modal-product-value">{{ selectedProduct ? `${selectedProduct.name}锛�${selectedProduct.code}锛塦 : '鈥�' }}</span>
+ </div>
+
+ <div class="form-section">
+ <div class="form-section-title">鍩烘湰淇℃伅</div>
+ <div class="form-grid">
+ <a-form-item label="璐ㄦ椤瑰悕绉�" required>
+ <a-input v-model:value="form.indicatorName" :maxlength="64" placeholder="濡傦細绾害" />
+ </a-form-item>
+ <a-form-item label="璐ㄦ椤圭紪鐮�" required>
+ <a-input
+ v-model:value="form.indicatorCode"
+ :disabled="!!editingId"
+ :maxlength="64"
+ placeholder="濡傦細purity"
+ />
+ </a-form-item>
+ <a-form-item label="鍗曚綅">
+ <a-input v-model:value="form.unit" :maxlength="16" placeholder="濡傦細%銆佺矑/鍏枻" />
+ </a-form-item>
+ <a-form-item label="鐘舵��">
+ <a-select v-model:value="form.status">
+ <a-select-option :value="0">鍚敤</a-select-option>
+ <a-select-option :value="1">鍋滅敤</a-select-option>
+ </a-select>
+ </a-form-item>
+ </div>
+ </div>
+
+ <div class="form-section">
+ <div class="form-section-title">鍚堟牸鑼冨洿</div>
+ <div class="range-row">
+ <a-form-item label="鍚堟牸涓嬮檺" required>
+ <a-input-number v-model:value="form.minValue" class="full-width" :min="0" :precision="3" placeholder="涓嬮檺" />
+ </a-form-item>
+ <span class="range-separator">~</span>
+ <a-form-item label="鍚堟牸涓婇檺" required>
+ <a-input-number v-model:value="form.maxValue" class="full-width" :min="0" :precision="3" placeholder="涓婇檺" />
+ </a-form-item>
+ <a-form-item label="鎺掑簭">
+ <a-input-number v-model:value="form.sort" class="full-width" :min="0" :precision="0" />
+ </a-form-item>
+ </div>
+ </div>
+ </a-modal>
</div>
</template>
<style scoped>
.range-page { padding: 24px; min-height: 100%; background: #f4f7fb; }
-.page-header { margin-bottom: 20px; }.eyebrow { color: #1677ff; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
-h1 { margin: 6px 0; color: #172033; font-size: 28px; }.page-header p { margin: 0; color: #718096; }
-.range-card { margin-top: 16px; border-radius: 10px; box-shadow: 0 3px 12px #243b5310; }
-.grid-head, .range-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) 70px; align-items: center; gap: 16px; padding: 12px 16px; }
-.grid-head { color: #718096; background: #f7f9fc; font-weight: 600; }.range-row { border-bottom: 1px solid #e8edf5; }.range-row :deep(.ant-input-number) { width: 100%; }
-.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
-@media (max-width: 640px) { .range-page { padding: 14px; }.grid-head { display: none; }.range-row { grid-template-columns: 1fr 1fr; }.range-row strong { grid-column: 1 / -1; } }
+.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
+.header-main { min-width: 0; }
+.eyebrow { color: #1677ff; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
+h1 { margin: 6px 0; color: #172033; font-size: 28px; }
+.page-header p { margin: 0; color: #718096; }
+.header-badge { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #cfe0fb; border-radius: 7px; color: #1677ff; background: #f0f6ff; font-size: 13px; font-weight: 600; }
+.range-card { margin-top: 16px; border-radius: 12px; box-shadow: 0 3px 12px #243b5310; }
+.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 14px; }
+.toolbar-select { display: flex; align-items: center; gap: 10px; }
+.toolbar-label { color: #59677b; font-size: 13px; font-weight: 600; white-space: nowrap; }
+.product-select { width: min(360px, 100%); }
+.toolbar-actions { display: flex; align-items: center; gap: 10px; }
+.product-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid #d6e8ff; border-radius: 10px; background: linear-gradient(90deg, #f7fbff, #fbfdff); }
+.product-identity { display: flex; align-items: baseline; gap: 10px; }
+.product-name { font-size: 16px; font-weight: 700; color: #172033; }
+.product-code { color: #718096; font-size: 13px; }
+.product-stats { display: flex; align-items: center; gap: 16px; }
+.stat { color: #59677b; font-size: 13px; }
+.stat b { color: #172033; font-size: 15px; }
+.stat-success b { color: #1a9c5b; }
+.stat-muted b { color: #98a2b3; }
+.range-text { font-variant-numeric: tabular-nums; color: #2b3a55; }
+.row-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }
+.muted { color: #98a2b3; }
+.placeholder-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 0; color: #98a2b3; }
+.placeholder-icon { font-size: 30px; }
+.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 0 36px; text-align: center; }
+.empty-icon { font-size: 40px; color: #c2cddb; }
+.empty-title { margin: 4px 0 0; color: #3b4a60; font-size: 15px; font-weight: 600; }
+.empty-desc { margin: 0; color: #98a2b3; font-size: 13px; }
+.empty-actions { display: flex; gap: 10px; margin-top: 12px; }
+.modal-product { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 10px 14px; border-radius: 8px; background: #f5f8fd; }
+.modal-product-label { color: #718096; font-size: 13px; }
+.modal-product-value { color: #172033; font-size: 14px; font-weight: 600; }
+.form-section + .form-section { margin-top: 6px; }
+.form-section-title { margin-bottom: 10px; padding-left: 8px; border-left: 3px solid #1677ff; color: #2b3a55; font-size: 14px; font-weight: 600; }
+.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
+.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 0 10px; }
+.range-separator { padding-top: 32px; color: #98a2b3; }
+.full-width { width: 100%; }
+@media (max-width: 720px) {
+ .range-page { padding: 14px; }
+ .page-header { display: block; }
+ .header-badge { margin-top: 14px; }
+ .toolbar, .product-summary { align-items: flex-start; }
+ .form-grid, .range-row { grid-template-columns: 1fr; }
+ .range-separator { display: none; }
+}
</style>
--
Gitblit v1.9.3