| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010 |
- <!-- 成品入库 - 智能仓储风格 -->
- <template>
- <div class="stock-requisition-page">
- <!-- 背景层 -->
- <div class="bg-layer" :style="{ backgroundImage: `url(${bgImg})` }" />
- <!-- 顶部标题区域 -->
- <div class="header-section">
- <button class="logout-btn" @click="goHome">
- <i class="fas fa-home" />
- <span>主页</span>
- </button>
- <h1 class="page-title">成品入库</h1>
- <!-- 右侧操作按钮 -->
- <div class="header-actions">
- <button class="action-btn add-btn" @click="openModal">
- <i class="fas fa-plus-circle" />
- <span>添加成品</span>
- </button>
- </div>
- </div>
- <!-- 主内容区域 -->
- <main class="main-content">
- <!-- 统计信息 -->
- <div v-if="products.length > 0" class="stats-section">
- <span class="stats-text">当前已添加 {{ products.length }} 条成品记录</span>
- </div>
- <!-- 卡片网格区域 -->
- <div class="card-grid-wrapper">
- <!-- 空状态 -->
- <div v-if="products.length === 0" class="empty-state">
- <i class="fas fa-box-open empty-icon" />
- <p>请添加成品</p>
- </div>
- <!-- 卡片网格 -->
- <div v-else class="card-grid">
- <div v-for="(product, index) in products" :key="product.code || index" class="inventory-card">
- <!-- 卡片序号 -->
- <div class="card-index">{{ index + 1 }}</div>
- <!-- 图片区域 -->
- <div class="card-image">
- <div class="image-placeholder">
- <i class="fas fa-box" />
- </div>
- </div>
- <!-- 信息区域 -->
- <div class="card-info">
- <div class="info-row">
- <span class="info-label">名称:</span>
- <span class="info-value">{{ product.inventoryName || '-' }}</span>
- </div>
- <div class="info-row">
- <span class="info-label">图号:</span>
- <span class="info-value">{{ product.inventoryNo || '-' }}</span>
- </div>
- <div class="info-row location-row">
- <i class="fas fa-map-marker-alt location-icon" />
- <span class="info-value">{{ product.positionName || '-' }}</span>
- </div>
- </div>
- <!-- 操作区域 -->
- <div class="card-action-section">
- <button class="delete-btn" @click.stop="openDeleteDialog(index)">
- <i class="fas fa-trash" style="color: red !important;" /> 删除
- </button>
- </div>
- </div>
- </div>
- </div>
- </main>
- <!-- 底部操作按钮 -->
- <div class="bottom-actions">
- <button class="submit-btn" :disabled="products.length === 0" @click="handleSubmit">
- 提交入库
- </button>
- </div>
- <!-- 新增成品弹窗 -->
- <div v-if="isModalOpen" class="tech-modal-overlay" @click.self="closeModal">
- <div class="tech-modal">
- <!-- <button class="modal-close-btn" @click="closeModal">
- <i class="fas fa-times" />
- </button> -->
- <div class="modal-header">
- <h3>新增成品</h3>
- <p>请填写成品信息</p>
- </div>
- <div class="modal-body">
- <div class="form-item">
- <label>成品名称</label>
- <input v-model="newProduct.inventoryName" type="text" placeholder="请输入成品名称" />
- </div>
- <div class="form-item">
- <label>成品图号</label>
- <input v-model="newProduct.inventoryNo" type="text" placeholder="请输入成品图号" />
- </div>
- <div class="form-item">
- <label>货位选择</label>
- <v-select
- v-model="newProduct.positionId" :options="warehouseLocationOptions"
- :reduce="item => item.positionId" label="positionName" placeholder="请选择货位" :clearable="true"
- :filterable="true" class="dark-select" append-to-body
- >
- <template #no-options>
- <span>无该选项数据</span>
- </template>
- </v-select>
- </div>
- </div>
- <div class="modal-footer">
- <button class="modal-btn cancel" @click="closeModal">取消</button>
- <button class="modal-btn confirm" :disabled="!isFormValid" @click="saveProduct">保存</button>
- </div>
- </div>
- </div>
- <!-- 确认入库弹窗 -->
- <div v-if="showConfirmModal" class="tech-modal-overlay" @click.self="showConfirmModal = false">
- <div class="tech-modal success-modal">
- <!-- <button class="modal-close-btn" @click="showConfirmModal = false">
- <i class="fas fa-times" />
- </button> -->
- <div class="modal-content-row">
- <div class="modal-text">
- <h3>确认入库</h3>
- <p>您确定要将选中的 <span class="highlight">{{ products.length }}</span> 个成品进行入库操作吗?</p>
- </div>
- <div class="modal-icon">
- <div class="icon-box">
- <i class="fas fa-box" />
- <i class="fas fa-check-circle check-icon" />
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button class="modal-btn cancel" @click="showConfirmModal = false">取消</button>
- <button class="modal-btn confirm" @click="executeInbound">确认入库</button>
- </div>
- </div>
- </div>
- <!-- 删除成品确认弹窗 - 科技感风格 -->
- <div v-if="showDeleteModal" class="tech-modal-overlay" @click.self="showDeleteModal = false">
- <div class="tech-modal warning-modal">
- <!-- <button class="modal-close-btn" @click="showDeleteModal = false">
- <i class="fas fa-times" />
- </button> -->
- <div class="modal-content-row">
- <div class="modal-text">
- <h3>确认删除</h3>
- <p>你确认要删除掉该成品吗?</p>
- </div>
- <div class="modal-icon warning">
- <div class="icon-box">
- <i class="fas fa-trash" />
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button class="modal-btn cancel" @click="showDeleteModal = false">取消</button>
- <button class="modal-btn confirm danger" @click="confirmDelete">确认删除</button>
- </div>
- </div>
- </div>
- <!-- Loading -->
- <div v-if="loading" class="loading-overlay">
- <div class="loading-dots">
- <div class="dot" />
- <div class="dot" />
- <div class="dot" />
- </div>
- <span class="loading-text">加载中...</span>
- </div>
- </div>
- </template>
- <script setup>
- import { ref, reactive, onMounted, computed } from 'vue';
- import { useRouter } from 'vue-router';
- import { showNotify } from 'vant';
- import { generateStockIn, getLocatorList } from '../api/finishProduct';
- import vSelect from 'vue-select';
- import 'vue-select/dist/vue-select.css';
- import { gateController } from '../hardware/GateOperate.js';
- import { showErrorDialog } from '../util/errorDialog';
- // 图片资源
- import bgImg from '../assets/images/bj.png';
- const router = useRouter();
- // 返回主页
- const goHome = () => {
- router.push('/home');
- };
- // 加载状态
- const loading = ref(false);
- // 仓库货位数据
- const warehouseLocationOptions = ref([]);
- // 弹窗显示状态
- const isModalOpen = ref(false);
- const showConfirmModal = ref(false);
- const showDeleteModal = ref(false);
- const deleteIndex = ref(-1);
- // 成品列表
- const products = ref([]);
- // 新增成品表单
- const newProduct = reactive({
- inventoryName: '',
- inventoryNo: '',
- positionId: undefined,
- });
- // 表单校验
- const isFormValid = computed(() => {
- return (
- newProduct.inventoryName.trim() !== '' &&
- newProduct.inventoryNo.trim() !== '' &&
- !!newProduct.positionId
- );
- });
- // 打开弹窗
- const openModal = () => {
- resetForm();
- isModalOpen.value = true;
- };
- // 关闭弹窗
- const closeModal = () => {
- isModalOpen.value = false;
- };
- // 重置表单
- const resetForm = () => {
- newProduct.inventoryName = '';
- newProduct.inventoryNo = '';
- newProduct.positionId = undefined;
- };
- // 保存成品
- const saveProduct = () => {
- if (!isFormValid.value) {
- showErrorDialog('请完整填写成品信息');
- return;
- }
- const location = warehouseLocationOptions.value.find(
- item => item.positionId === newProduct.positionId,
- );
- console.log(location);
- products.value.push({
- inventoryName: newProduct.inventoryName.trim(),
- inventoryNo: newProduct.inventoryNo.trim(),
- positionId: newProduct.positionId,
- positionName: location ? location.positionName + ' / ' + location.warehouseName : '',
- });
- showNotify({ type: 'success', message: '成品已添加' });
- isModalOpen.value = false;
- };
- // 执行入库
- const handleSubmit = () => {
- if (products.value.length === 0) {
- showErrorDialog('暂无可提交的成品,请添加成品');
- return;
- }
- showConfirmModal.value = true;
- };
- // 提交入库
- const executeInbound = async () => {
- const count = products.value.length;
- loading.value = true;
- const params = products.value.map(item => {
- return {
- inventoryName: item.inventoryName,
- inventoryNo: item.inventoryNo,
- positionId: item.positionId,
- };
- });
- try {
- const res = await generateStockIn(params);
- if (res.errorCode === 0) {
- // 调用开门操作
- gateController('SHOTOPEN');
- showNotify({ type: 'success', message: `已提交 ${count} 条成品入库记录` });
- router.push('/home');
- } else {
- showErrorDialog(res.errorMessage || '添加失败');
- }
- products.value = [];
- showConfirmModal.value = false;
- } catch (error) {
- console.log(error);
- if(error.status !== 401) showErrorDialog('添加成品失败');
- } finally {
- loading.value = false;
- }
- };
- // 打开删除确认弹窗
- const openDeleteDialog = index => {
- deleteIndex.value = index;
- showDeleteModal.value = true;
- };
- // 确认删除成品
- const confirmDelete = () => {
- if (deleteIndex.value >= 0 && deleteIndex.value < products.value.length) {
- products.value.splice(deleteIndex.value, 1);
- showNotify({ type: 'success', message: '成品已删除' });
- }
- showDeleteModal.value = false;
- deleteIndex.value = -1;
- };
- const getLocators = async () => {
- try {
- const res = await getLocatorList();
- if (res && res.length > 0) {
- warehouseLocationOptions.value = res;
- } else {
- showErrorDialog('获取货位列表失败');
- }
- } catch (error) {
- console.log(error);
- if(error.status !== 401) showErrorDialog('获取货位列表失败');
- }
- };
- onMounted(() => {
- getLocators();
- });
- </script>
- <style scoped>
- /* ========== 基础样式 ========== */
- .stock-requisition-page {
- width: 100%;
- height: 100vh;
- max-height: 100vh;
- position: relative;
- font-family: 'Microsoft YaHei', sans-serif;
- color: #fff;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
- /* 背景层 */
- .bg-layer {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: #041c3d;
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
- z-index: 0;
- }
- /* 成品入库-操作按钮 - 绿色主题 */
- .action-btn {
- background: linear-gradient(90deg, #1a6a5a 0%, #0d5a4a 100%);
- border-color: #2affcf;
- }
- .action-btn:hover {
- background: linear-gradient(90deg, #2a7a6a 0%, #1d6a5a 100%);
- box-shadow: 0 0 20px rgba(42, 255, 207, 0.5);
- }
- .action-btn i {
- color: #2affcf;
- }
- /* ========== 主内容区域 ========== */
- .main-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- padding: 20px 30px;
- position: relative;
- z-index: 10;
- min-height: 0;
- overflow: hidden;
- }
- /* 统计信息 */
- .stats-section {
- background: rgba(9, 61, 140, 0.5);
- border: 1px solid #049FD8;
- border-radius: 12px;
- padding: 15px 20px;
- margin-bottom: 15px;
- flex-shrink: 0;
- }
- .stats-text {
- color: #7ec8ff;
- font-size: 16px;
- }
- /* ========== 卡片网格区域 ========== */
- .card-grid-wrapper {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 0;
- overflow-y: auto;
- overflow-x: hidden;
- padding-bottom: 10px;
- scrollbar-width: none;
- -ms-overflow-style: none;
- }
- .card-grid-wrapper::-webkit-scrollbar {
- display: none;
- }
- /* 空状态 */
- .empty-state {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- color: #7ec8ff;
- padding: 60px 0;
- }
- .empty-icon {
- font-size: 80px;
- margin-bottom: 20px;
- opacity: 0.5;
- }
- .empty-state p {
- font-size: 18px;
- margin: 0;
- }
- /* 卡片网格 - 4列布局 */
- .card-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 20px;
- }
- /* ========== 设备卡片样式 ========== */
- .inventory-card {
- background: rgba(5, 30, 60, 0.8);
- border: 2px solid #0d4a8a;
- border-radius: 12px;
- overflow: hidden;
- transition: all 0.3s ease;
- position: relative;
- }
- .inventory-card:hover {
- border-color: #1e90ff;
- box-shadow: 0 0 20px rgba(30, 144, 255, 0.3);
- transform: translateY(-3px);
- }
- /* 卡片序号 - 左上角 */
- .card-index {
- position: absolute;
- top: 10px;
- left: 10px;
- width: 36px;
- height: 36px;
- background: linear-gradient(135deg, #1e90ff 0%, #00bfff 100%);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16px;
- font-weight: bold;
- color: #fff;
- z-index: 2;
- box-shadow: 0 2px 8px rgba(0, 191, 255, 0.4);
- }
- /* 图片区域 */
- .card-image {
- width: 100%;
- aspect-ratio: 3 / 4;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- margin: 15px;
- margin-bottom: 10px;
- border-radius: 8px;
- width: calc(100% - 30px);
- }
- .image-placeholder {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf0 100%);
- color: #fff;
- font-size: 48px;
- }
- /* 信息区域 */
- .card-info {
- padding: 10px 15px 15px;
- }
- .info-row {
- display: flex;
- align-items: baseline;
- margin-bottom: 6px;
- font-size: 14px;
- }
- .info-row:last-child {
- margin-bottom: 0;
- }
- .info-label {
- color: #7ec8ff;
- white-space: nowrap;
- margin-right: 5px;
- }
- .info-value {
- color: #fff;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- /* 位置行样式 */
- .location-row {
- display: flex;
- align-items: center;
- margin-top: 4px;
- padding-top: 4px;
- border-top: 1px solid rgba(30, 144, 255, 0.2);
- }
- .location-icon {
- color: #00bfff;
- font-size: 12px;
- margin-right: 6px;
- }
- /* ========== 操作区域 ========== */
- .card-action-section {
- padding: 12px 15px;
- border-top: 1px solid rgba(30, 144, 255, 0.3);
- background: rgba(9, 61, 140, 0.3);
- min-height: 50px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* 删除按钮 */
- .delete-btn {
- padding: 8px 20px;
- background: rgba(239, 68, 68, 0.2);
- border: 1px solid #ef4444;
- border-radius: 6px;
- color: #ef4444;
- font-size: 13px;
- cursor: pointer;
- transition: all 0.3s;
- display: flex;
- align-items: center;
- gap: 6px;
- }
- .delete-btn:hover {
- background: rgba(239, 68, 68, 0.4);
- box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
- }
- /* ========== 底部操作按钮 ========== */
- .bottom-actions {
- width: 100%;
- padding: 15px 30px;
- box-sizing: border-box;
- background: rgba(4, 28, 61, 0.95);
- z-index: 20;
- flex-shrink: 0;
- }
- .submit-btn {
- width: 100%;
- padding: 18px 0;
- background: #4a99e2;
- border: none;
- border-radius: 12px;
- font-size: 24px;
- font-weight: bold;
- color: #fff;
- cursor: pointer;
- transition: all 0.3s;
- letter-spacing: 8px;
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
- }
- .submit-btn:hover:not(:disabled) {
- box-shadow: 0 0 30px rgba(74, 153, 226, 0.6);
- transform: translateY(-2px);
- }
- .submit-btn:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
- /* ========== 科技感弹窗样式 ========== */
- .tech-modal-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(4, 28, 61, 0.9);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 2000;
- }
- .tech-modal {
- background: linear-gradient(135deg, #0a3d6d 0%, #041c3d 100%);
- border: 1px solid #049FD8;
- border-radius: 16px;
- width: 90%;
- max-width: 500px;
- position: relative;
- box-shadow: 0 0 40px rgba(4, 159, 216, 0.3);
- }
- .modal-close-btn {
- position: absolute;
- top: 15px;
- right: 15px;
- width: 36px;
- height: 36px;
- background: rgba(255, 255, 255, 0.1);
- border: none;
- border-radius: 50%;
- color: #7ec8ff;
- font-size: 18px;
- cursor: pointer;
- transition: all 0.3s;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .modal-close-btn:hover {
- background: rgba(255, 255, 255, 0.2);
- color: #fff;
- }
- .modal-header {
- padding: 30px 30px 20px;
- }
- .modal-header h3 {
- font-size: 22px;
- font-weight: bold;
- color: #fff;
- margin: 0 0 8px 0;
- }
- .modal-header p {
- font-size: 14px;
- color: #7ec8ff;
- margin: 0;
- }
- .modal-body {
- padding: 0 30px 20px;
- }
- .form-item {
- margin-bottom: 20px;
- }
- .form-item:last-child {
- margin-bottom: 0;
- }
- .form-item label {
- display: block;
- font-size: 14px;
- color: #7ec8ff;
- margin-bottom: 8px;
- font-weight: 500;
- }
- .form-item input {
- width: 100%;
- padding: 12px 15px;
- background: rgba(13, 58, 106, 0.8);
- border: 1px solid #2a7fff;
- border-radius: 8px;
- color: #fff;
- font-size: 15px;
- outline: none;
- transition: all 0.3s;
- box-sizing: border-box;
- }
- .form-item input::placeholder {
- color: #5a8abf;
- }
- .form-item input:focus {
- border-color: #00bfff;
- box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
- }
- .modal-footer {
- padding: 20px 30px 30px;
- display: flex;
- gap: 15px;
- }
- .modal-btn {
- flex: 1;
- padding: 14px 0;
- border-radius: 8px;
- font-size: 16px;
- font-weight: 600;
- cursor: pointer;
- transition: all 0.3s;
- }
- .modal-btn.cancel {
- background: transparent;
- border: 1px solid #2a7fff;
- color: #7ec8ff;
- }
- .modal-btn.cancel:hover {
- background: rgba(42, 127, 255, 0.2);
- }
- .modal-btn.confirm {
- background: linear-gradient(90deg, #1e90ff 0%, #00bfff 100%);
- border: none;
- color: #fff;
- }
- .modal-btn.confirm:hover:not(:disabled) {
- box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
- }
- .modal-btn.confirm:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
- .modal-btn.confirm.danger {
- background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
- }
- .modal-btn.confirm.danger:hover {
- box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
- }
- /* 成功/警告弹窗样式 */
- .modal-content-row {
- padding: 30px;
- display: flex;
- align-items: center;
- gap: 30px;
- }
- .modal-text {
- flex: 1;
- }
- .modal-text h3 {
- font-size: 22px;
- font-weight: bold;
- color: #fff;
- margin: 0 0 12px 0;
- }
- .modal-text p {
- font-size: 15px;
- color: #7ec8ff;
- margin: 0;
- line-height: 1.6;
- }
- .modal-text .highlight {
- color: #00bfff;
- font-weight: bold;
- }
- .modal-icon {
- flex-shrink: 0;
- }
- .icon-box {
- width: 80px;
- height: 80px;
- background: linear-gradient(135deg, #1e90ff 0%, #00bfff 100%);
- border-radius: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 36px;
- color: #fff;
- position: relative;
- transform: perspective(100px) rotateY(-10deg);
- box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
- }
- .icon-box .check-icon {
- position: absolute;
- bottom: -5px;
- right: -5px;
- font-size: 24px;
- color: #10b981;
- background: #041c3d;
- border-radius: 50%;
- padding: 2px;
- }
- .modal-icon.warning .icon-box {
- background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
- box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
- }
- /* Vue Select 深色主题 */
- :deep(.dark-select .vs__dropdown-toggle) {
- background: rgba(13, 58, 106, 0.8);
- border: 1px solid #2a7fff;
- border-radius: 8px;
- padding: 8px 12px;
- min-height: 44px;
- }
- :deep(.dark-select .vs__selected) {
- color: #fff;
- }
- :deep(.dark-select .vs__search) {
- color: #fff;
- }
- :deep(.dark-select .vs__search::placeholder) {
- color: #5a8abf;
- }
- :deep(.dark-select .vs__actions svg) {
- fill: #7ec8ff;
- }
- :deep(.dark-select .vs__dropdown-menu) {
- background: rgba(13, 58, 106, 0.95);
- border: 1px solid #2a7fff;
- border-radius: 8px;
- z-index: 99999;
- }
- :deep(.dark-select .vs__dropdown-option) {
- color: #fff;
- padding: 10px 15px;
- }
- :deep(.dark-select .vs__dropdown-option--highlight) {
- background: rgba(30, 144, 255, 0.3);
- }
- /* ========== 响应式 - 横屏 ========== */
- @media screen and (orientation: landscape) {
- .header-section {
- padding: 10px 20px;
- }
- .page-title {
- font-size: 22px;
- }
- .logout-btn {
- padding: 6px 14px;
- font-size: 13px;
- left: 20px;
- }
- .header-actions {
- right: 20px;
- }
- .action-btn {
- padding: 6px 14px;
- font-size: 12px;
- }
- .main-content {
- padding: 20px;
- }
- .card-grid {
- grid-template-columns: repeat(6, 1fr);
- gap: 15px;
- }
- .card-index {
- width: 24px;
- height: 24px;
- font-size: 11px;
- top: 6px;
- left: 6px;
- }
- .card-image {
- margin: 10px;
- margin-bottom: 8px;
- width: calc(100% - 20px);
- }
- .image-placeholder {
- font-size: 36px;
- }
- .card-info {
- padding: 6px 10px 8px;
- }
- .info-row {
- font-size: 11px;
- margin-bottom: 3px;
- }
- .card-action-section {
- padding: 8px 10px;
- min-height: 40px;
- }
- .delete-btn {
- padding: 5px 12px;
- font-size: 11px;
- }
- .bottom-actions {
- padding: 10px 20px;
- }
- .submit-btn {
- padding: 12px 0;
- font-size: 18px;
- letter-spacing: 6px;
- border-radius: 8px;
- }
- :deep(.v-select .vs__dropdown-toggle,
- .dark-select .vs__dropdown-toggle,
- .filter-select .vs__dropdown-toggle,
- .dialog-select .vs__dropdown-toggle) {
- padding: 8px 12px !important;
- min-height: 48px !important;
- }
- }
- </style>
- <style>
- /* 全局样式:确保 v-select 下拉菜单在模态框之上 */
- .vs__dropdown-menu {
- z-index: 99999 !important;
- }
- /* vue-select 的下拉菜单容器 */
- .vs--open .vs__dropdown-menu {
- z-index: 99999 !important;
- }
- /* 大选择器的下拉菜单 */
- .large-select .vs__dropdown-menu {
- z-index: 99999 !important;
- }
- </style>
|