| | |
| | | <template> |
| | | <view class="account-detail"> |
| | | <!-- 使用通用页面头部组件 --> |
| | | <PageHeader title="新增来票登记" @back="goBack" /> |
| | | |
| | | <!-- 表单内容 --> |
| | | <van-form @submit="submitForm" ref="formRef" label-width="110px" input-align="right" error-message-align="right" scroll-to-error scroll-to-error-position="center"> |
| | | <!-- 基本信息 --> |
| | | <van-cell-group title="基本信息" inset> |
| | | <van-field |
| | | v-model="form.purchaseLedgerNo" |
| | | label="采购合同号" |
| | | readonly |
| | | placeholder="自动填充" |
| | | /> |
| | | <van-field |
| | | v-model="form.salesContractNo" |
| | | label="销售合同号" |
| | | readonly |
| | | placeholder="自动填充" |
| | | /> |
| | | <van-field |
| | | v-model="form.supplierName" |
| | | label="供应商名称" |
| | | readonly |
| | | placeholder="自动填充" |
| | | /> |
| | | <van-field |
| | | v-model="form.projectName" |
| | | label="项目名称" |
| | | readonly |
| | | placeholder="自动填充" |
| | | /> |
| | | <van-field |
| | | v-model="form.issUer" |
| | | label="录入人" |
| | | readonly |
| | | placeholder="请输入录入人" |
| | | /> |
| | | <van-field |
| | | v-model="form.enterDate" |
| | | label="录入日期" |
| | | readonly |
| | | placeholder="请选择录入日期" |
| | | @click="showCreateTimePicker = true" |
| | | /> |
| | | <van-field |
| | | v-model="form.invoiceNumber" |
| | | label="发票号码" |
| | | <view class="invoice-add"> |
| | | <!-- 使用通用页面头部组件 --> |
| | | <PageHeader title="新增发票" @back="goBack" /> |
| | | |
| | | <!-- 表单内容 --> |
| | | <u-form @submit="submitForm" ref="formRef" label-width="110" input-align="right" error-message-align="right"> |
| | | <!-- 基本信息 --> |
| | | <view class="form-section"> |
| | | <u-form-item label="采购合同号" prop="purchaseLedgerNo" required> |
| | | <u-input v-model="form.purchaseLedgerNo" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="销售合同号" prop="salesContractNo" required> |
| | | <u-input v-model="form.salesContractNo" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="供应商名称" prop="supplierName" required> |
| | | <u-input v-model="form.supplierName" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="项目名称" prop="projectName" required> |
| | | <u-input v-model="form.projectName" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="发票号" prop="invoiceNumber" required> |
| | | <u-input v-model="form.invoiceNumber" placeholder="请输入" clearable /> |
| | | </u-form-item> |
| | | <u-form-item label="发票金额(元)" prop="invoiceAmount" required> |
| | | <u-input v-model="form.invoiceAmount" type="number" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="录入人"> |
| | | <u-input v-model="form.issUer" placeholder="自动填充" disabled /> |
| | | </u-form-item> |
| | | <u-form-item |
| | | label="开票日期" |
| | | prop="entryDate" |
| | | required |
| | | placeholder="请输入发票号码" |
| | | :rules="[{ required: true, message: '请输入发票号码' }]" |
| | | /> |
| | | <van-field |
| | | v-model="form.invoiceAmount" |
| | | label="发票金额(元)" |
| | | @click="showEntryDatePicker = true" |
| | | > |
| | | <u-input |
| | | v-model="form.entryDate" |
| | | placeholder="请选择开票日期" |
| | | readonly |
| | | @click="showEntryDatePicker = true" |
| | | /> |
| | | <template #right> |
| | | <u-icon name="arrow-right" @click="showEntryDatePicker = true"></u-icon> |
| | | </template> |
| | | </u-form-item> |
| | | <u-form-item |
| | | label="录入日期" |
| | | prop="enterDate" |
| | | required |
| | | readonly |
| | | placeholder="自动填充" |
| | | :rules="[{ required: true, message: '请输入发票号码' }]" |
| | | /> |
| | | <van-field |
| | | v-model="form.issueDate" |
| | | label="来票日期" |
| | | readonly |
| | | placeholder="请选择来票日期" |
| | | required |
| | | @click="showIssueDatePicker = true" |
| | | :rules="[{ required: true, message: '请选择来票日期' }]" |
| | | /> |
| | | </van-cell-group> |
| | | |
| | | <!-- 产品信息 --> |
| | | <view class="product-section"> |
| | | <view class="section-header"> |
| | | <text class="section-title">产品信息</text> |
| | | </view> |
| | | |
| | | <view v-if="productData.length === 0" class="empty-state"> |
| | | <van-empty description="暂无产品数据" /> |
| | | </view> |
| | | |
| | | <view v-else class="product-list"> |
| | | <view |
| | | v-for="(item, index) in productData" |
| | | :key="index" |
| | | class="product-card" |
| | | > |
| | | <!-- 产品头部 --> |
| | | <view class="product-header"> |
| | | <view class="product-title"> |
| | | <van-icon name="description" color="#2979ff" size="15" /> |
| | | <text class="product-productCategory">产品 {{ index + 1 }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 产品信息表单 --> |
| | | <view class="product-form"> |
| | | <van-field |
| | | v-model="item.productCategory" |
| | | label="产品大类" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.specificationModel" |
| | | label="规格型号" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.unit" |
| | | label="单位" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.quantity" |
| | | label="数量" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.taxRate" |
| | | label="税率(%)" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.taxInclusiveUnitPrice" |
| | | label="含税单价(元)" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.taxInclusiveTotalPrice" |
| | | label="含税总价(元)" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.taxExclusiveTotalPrice" |
| | | label="不含税总价(元)" |
| | | readonly |
| | | /> |
| | | |
| | | <!-- 本次来票信息 --> |
| | | <van-field |
| | | v-model="item.ticketsNum" |
| | | label="本次来票数" |
| | | type="number" |
| | | placeholder="请输入来票数量" |
| | | @blur="invoiceNumBlur(item)" |
| | | /> |
| | | <van-field |
| | | v-model="item.ticketsAmount" |
| | | label="本次来票金额(元)" |
| | | type="number" |
| | | placeholder="请输入来票金额" |
| | | @blur="invoiceAmountBlur(item)" |
| | | /> |
| | | |
| | | <!-- 未来票信息 --> |
| | | <van-field |
| | | v-model="item.futureTickets" |
| | | label="未来票数" |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="item.futureTicketsAmount" |
| | | label="未来票金额(元)" |
| | | readonly |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 提交按钮 --> |
| | | <view class="footer-btns"> |
| | | <van-button class="cancel-btn" @click="goBack">取消</van-button> |
| | | <van-button class="save-btn" native-type="submit" form-type="submit">保存</van-button> |
| | | @click="showEnterDatePicker = true" |
| | | > |
| | | <u-input |
| | | v-model="form.enterDate" |
| | | placeholder="请选择录入日期" |
| | | readonly |
| | | @click="showEnterDatePicker = true" |
| | | /> |
| | | <template #right> |
| | | <u-icon name="arrow-right" @click="showEnterDatePicker = true"></u-icon> |
| | | </template> |
| | | </u-form-item> |
| | | </view> |
| | | </van-form> |
| | | |
| | | <!-- 产品信息 --> |
| | | <view class="product-section"> |
| | | <view class="section-header"> |
| | | <view> |
| | | <text class="section-title">产品信息</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-if="!productData || productData.length === 0" class="empty-state"> |
| | | <view class="empty-text">暂无产品数据</view> |
| | | </view> |
| | | |
| | | <view v-else class="product-list"> |
| | | <view |
| | | v-for="(item, index) in productData" |
| | | :key="index" |
| | | class="product-card" |
| | | > |
| | | <!-- 产品头部 --> |
| | | <view class="product-header"> |
| | | <view class="product-title"> |
| | | <view class="document-icon"> |
| | | <u-icon name="file-text" size="16" color="#ffffff"></u-icon> |
| | | </view> |
| | | <text class="product-productCategory">产品 {{ index + 1 }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 产品信息表单 --> |
| | | <view class="product-form"> |
| | | <u-form-item label="产品大类" prop="productCategory" border-bottom> |
| | | <u-input v-model="item.productCategory" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="规格型号" prop="specificationModel" border-bottom> |
| | | <u-input v-model="item.specificationModel" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="单位" prop="unit" border-bottom> |
| | | <u-input v-model="item.unit" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="数量" prop="quantity" border-bottom> |
| | | <u-input v-model="item.quantity" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="税率(%)" prop="taxRate" border-bottom> |
| | | <u-input v-model="item.taxRate" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="录入日期" prop="registerDate" border-bottom> |
| | | <u-input v-model="item.registerDate" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="含税单价(元)" prop="taxInclusiveUnitPrice" border-bottom> |
| | | <u-input v-model="item.taxInclusiveUnitPrice" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="含税总价(元)" prop="taxInclusiveTotalPrice" border-bottom> |
| | | <u-input v-model="item.taxInclusiveTotalPrice" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="不含税总价(元)" prop="taxExclusiveTotalPrice" border-bottom> |
| | | <u-input v-model="item.taxExclusiveTotalPrice" placeholder="" disabled /> |
| | | </u-form-item> |
| | | |
| | | <!-- 本次来票信息 --> |
| | | <u-form-item label="本次来票数" prop="ticketsNum" border-bottom> |
| | | <u-input |
| | | v-model="item.ticketsNum" |
| | | type="number" |
| | | placeholder="请输入来票数量" |
| | | @blur="invoiceNumBlur(item)" |
| | | /> |
| | | </u-form-item> |
| | | <u-form-item label="本次来票金额(元)" prop="ticketsAmount" border-bottom> |
| | | <u-input |
| | | v-model="item.ticketsAmount" |
| | | type="number" |
| | | placeholder="请输入来票金额" |
| | | @blur="invoiceAmountBlur(item)" |
| | | /> |
| | | </u-form-item> |
| | | |
| | | <!-- 未来票信息 --> |
| | | <u-form-item label="未来票数" prop="futureTickets" border-bottom> |
| | | <u-input v-model="item.futureTickets" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="未来票金额(元)" prop="futureTicketsAmount" border-bottom> |
| | | <u-input v-model="item.futureTicketsAmount" placeholder="" disabled /> |
| | | </u-form-item> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 使用FooterButtons组件 --> |
| | | <FooterButtons |
| | | @cancel="goBack" |
| | | @confirm="submitForm" |
| | | :loading="submitting" |
| | | /> |
| | | |
| | | <!-- 日期选择器 --> |
| | | <van-popup v-model:show="showIssueDatePicker" position="bottom"> |
| | | <van-date-picker |
| | | v-model="currentIssueDate" |
| | | title="选择来票日期" |
| | | @confirm="onIssueDateConfirm" |
| | | @cancel="showIssueDatePicker = false" |
| | | /> |
| | | </van-popup> |
| | | <!-- 为底部按钮留出空间 --> |
| | | <view style="height: 80px;"></view> |
| | | </u-form> |
| | | |
| | | <van-popup v-model:show="showCreateTimePicker" position="bottom"> |
| | | <van-date-picker |
| | | v-model="currentCreateTime" |
| | | title="选择录入日期" |
| | | @confirm="onCreateTimeConfirm" |
| | | @cancel="showCreateTimePicker = false" |
| | | /> |
| | | </van-popup> |
| | | </view> |
| | | <!-- 开票日期选择器 --> |
| | | <u-popup :show="showEntryDatePicker" mode="bottom" @close="showEntryDatePicker = false"> |
| | | <u-datetime-picker |
| | | :show="true" |
| | | v-model="entryDateValue" |
| | | @confirm="onEntryDateConfirm" |
| | | @cancel="showEntryDatePicker = false" |
| | | mode="date" |
| | | /> |
| | | </u-popup> |
| | | |
| | | <!-- 录入日期选择器 --> |
| | | <u-popup :show="showEnterDatePicker" mode="bottom" @close="showEnterDatePicker = false"> |
| | | <u-datetime-picker |
| | | :show="true" |
| | | v-model="enterDateValue" |
| | | @confirm="onEnterDateConfirm" |
| | | @cancel="showEnterDatePicker = false" |
| | | mode="date" |
| | | /> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted } from 'vue' |
| | | import { showToast, showLoadingToast, closeToast } from 'vant' |
| | | import FooterButtons from '@/components/FooterButtons.vue' |
| | | const showToast = (message) => { |
| | | uni.showToast({ |
| | | title: message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message || '加载中...' |
| | | }) |
| | | } |
| | | |
| | | const closeToast = () => { |
| | | uni.hideLoading() |
| | | } |
| | | import useUserStore from '@/store/modules/user' |
| | | import {addOrUpdateRegistration, getPurchaseNoById} from "@/api/procurementManagement/invoiceEntry"; |
| | | import {getInfo} from "@/api/procurementManagement/invoiceEntry.js"; |
| | | import { formatDateToYMD } from '@/utils/ruoyi' |
| | | |
| | | const userStore = useUserStore() |
| | | const editData = ref(null); |
| | |
| | | supplierName: '', |
| | | projectName: '', |
| | | issUer: '', |
| | | issueDate: '', |
| | | entryDate: '', |
| | | enterDate: '', |
| | | invoiceAmount: '', |
| | | invoiceNumber: '' |
| | | invoiceAmount: '', |
| | | invoiceNumber: '', |
| | | fileIds: [] |
| | | }) |
| | | |
| | | // 产品数据 |
| | | const productData = ref([]) |
| | | |
| | | // 文件上传相关 |
| | | const action = ref('/dev-api/common/upload') |
| | | const getToken = () => { |
| | | return userStore.token || '' |
| | | } |
| | | |
| | | // 日期选择器状态 |
| | | const showIssueDatePicker = ref(false) |
| | | const showCreateTimePicker = ref(false) |
| | | const currentIssueDate = ref([new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()]) |
| | | const currentCreateTime = ref([new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()]) |
| | | const showEntryDatePicker = ref(false) |
| | | const showEnterDatePicker = ref(false) |
| | | const entryDateValue = ref(Date.now()) |
| | | const enterDateValue = ref(Date.now()) |
| | | |
| | | // 提交状态 |
| | | const submitting = ref(false) |
| | |
| | | return Number(value).toFixed(precision) |
| | | } |
| | | |
| | | // 更新未来票数据 |
| | | const updateFutureTicketData = (row) => { |
| | | const totalQuantity = parseFloat(row.quantity) || 0 |
| | | const currentTicketNum = parseFloat(row.ticketsNum) || 0 |
| | | const totalAmount = parseFloat(row.taxInclusiveTotalPrice) || 0 |
| | | const currentTicketAmount = parseFloat(row.ticketsAmount) || 0 |
| | | |
| | | row.futureTickets = Math.max(0, totalQuantity - currentTicketNum).toFixed(2) |
| | | row.futureTicketsAmount = Math.max(0, totalAmount - currentTicketAmount).toFixed(2) |
| | | } |
| | | |
| | | // 来票数量变化处理 |
| | | const invoiceNumBlur = (row) => { |
| | | if (!row.ticketsNum || row.ticketsNum === "") { |
| | | row.ticketsNum = 0; |
| | | } |
| | | if (Number(row.ticketsNum) > Number(row.tempFutureTickets)) { |
| | | showToast('本次来票数不得大于未来票数'); |
| | | row.ticketsNum = 0; |
| | | return; |
| | | } |
| | | // 计算本次来票金额 |
| | | row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2) |
| | | // 计算未来票数 |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2) |
| | | // 计算未来票金额 |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2) |
| | | calculateinvoiceAmount(); |
| | | row.ticketsNum = 0; |
| | | } |
| | | if (Number(row.ticketsNum) > Number(row.tempFutureTickets)) { |
| | | showToast("本次开票数不得大于未开票数"); |
| | | row.ticketsNum = 0; |
| | | return; |
| | | } |
| | | // 计算本次来票金额 |
| | | row.ticketsAmount = row.ticketsNum * row.taxInclusiveUnitPrice; |
| | | // 计算未来票数 |
| | | row.futureTickets = row.tempFutureTickets - row.ticketsNum; |
| | | // 计算未来票金额 |
| | | row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount; |
| | | calculateinvoiceAmount(); |
| | | } |
| | | |
| | | // 来票金额变化处理 |
| | |
| | | row.ticketsAmount = 0; |
| | | } |
| | | // 计算是否超过来票总金额 |
| | | if (row.ticketsAmount > row.tempFutureTicketsAmount) { |
| | | showToast('本次来票金额不得大于未来票金额'); |
| | | if (Number(row.ticketsAmount) > Number(row.taxInclusiveTotalPrice)) { |
| | | showToast('本次来票金额不得大于含税总金额'); |
| | | row.ticketsAmount = 0; |
| | | } |
| | | // 计算本次来票数 |
| | | row.ticketsNum = Number( |
| | | (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2) |
| | | ); |
| | | // 计算未来票数 |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2) |
| | | // 计算未来票金额 |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2) |
| | | // 计算未来票数和未来票金额 |
| | | updateFutureTicketData(row) |
| | | calculateinvoiceAmount(); |
| | | } |
| | | |
| | |
| | | } |
| | | }); |
| | | form.value.invoiceAmount = invoiceAmountTotal.toFixed(2); |
| | | }; |
| | | } |
| | | |
| | | // 来票日期确认 |
| | | const onIssueDateConfirm = ({ selectedValues }) => { |
| | | form.value.issueDate = selectedValues.join('-'); |
| | | currentIssueDate.value = selectedValues; |
| | | showIssueDatePicker.value = false; |
| | | // 文件上传成功回调 |
| | | const uploadSuccess = (res) => { |
| | | if (res && res.data && res.data.fileId) { |
| | | form.value.fileIds.push(res.data.fileId) |
| | | } |
| | | } |
| | | |
| | | // 文件删除回调 |
| | | const removeFile = (index, file) => { |
| | | if (file.fileId) { |
| | | const fileIndex = form.value.fileIds.indexOf(file.fileId) |
| | | if (fileIndex > -1) { |
| | | form.value.fileIds.splice(fileIndex, 1) |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 开票日期确认 |
| | | const onEntryDateConfirm = (e) => { |
| | | form.value.entryDate = formatDateToYMD(e.value) |
| | | entryDateValue.value = e.value |
| | | showEntryDatePicker.value = false; |
| | | }; |
| | | |
| | | // 录入日期确认 |
| | | const onCreateTimeConfirm = (value) => { |
| | | try { |
| | | // 处理不同的值格式 |
| | | let year, month, day; |
| | | |
| | | if (Array.isArray(value)) { |
| | | // 数组格式 [year, month, day] |
| | | [year, month, day] = value; |
| | | } else if (value && typeof value === 'object') { |
| | | // Date对象格式 |
| | | year = value.getFullYear(); |
| | | month = value.getMonth() + 1; |
| | | day = value.getDate(); |
| | | } else { |
| | | // 其他格式,使用当前日期 |
| | | const now = new Date(); |
| | | year = now.getFullYear(); |
| | | month = now.getMonth() + 1; |
| | | day = now.getDate(); |
| | | } |
| | | |
| | | form.value.enterDate = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`; |
| | | form.value.issueDate = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`; |
| | | showCreateTimePicker.value = false; |
| | | } catch (error) { |
| | | console.error('日期处理错误:', error); |
| | | showToast('日期选择失败,请重试'); |
| | | } |
| | | const onEnterDateConfirm = (e) => { |
| | | form.value.enterDate = formatDateToYMD(e.value) |
| | | enterDateValue.value = e.value |
| | | showEnterDatePicker.value = false; |
| | | } |
| | | |
| | | // 格式化日期 |
| | |
| | | // 设置默认日期 |
| | | const today = new Date() |
| | | form.value.enterDate = formatDate(today) |
| | | form.value.issueDate = formatDate(today) |
| | | form.value.entryDate = formatDate(today) |
| | | |
| | | closeToast() |
| | | } catch (error) { |
| | |
| | | const submitForm = async () => { |
| | | try { |
| | | submitting.value = true |
| | | |
| | | // 验证发票号是否填写 |
| | | if (!form.value.invoiceNumber) { |
| | | showToast('请输入发票号') |
| | | return |
| | | } |
| | | |
| | | // 验证产品数据 |
| | | if (productData.value.length === 0) { |
| | |
| | | |
| | | const submitData = { |
| | | ...form.value, |
| | | productData: productData.value |
| | | productData: productData.value |
| | | } |
| | | |
| | | await addOrUpdateRegistration(submitData) |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .account-detail { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | padding-bottom: 5rem; |
| | | } |
| | | @import '@/static/scss/form-common.scss'; |
| | | |
| | | .empty-state { |
| | | padding: 40px 0; |
| | | } |
| | | |
| | | .product-section { |
| | | background: #fff; |
| | | margin-top: 1rem; |
| | | padding: 1rem; |
| | | box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.04); |
| | | } |
| | | |
| | | .section-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 1rem; |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 1rem; |
| | | font-weight: 600; |
| | | color: #333; |
| | | } |
| | | |
| | | .product-list { |
| | | .product-card { |
| | | background: #FFFFFF; |
| | | box-shadow: 0 0 1.25rem 0 rgba(0,57,117,0.08); |
| | | border-radius: 0.5rem 0.5rem 0.5rem 0.5rem; |
| | | padding: 1rem 0.5rem 0 0.5rem; |
| | | position: relative; |
| | | margin-bottom: 1rem; |
| | | } |
| | | } |
| | | |
| | | .product-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 0.5rem 0.75rem 0.5rem; |
| | | border-bottom: 0.0625rem solid #e8e8e8; |
| | | } |
| | | |
| | | .product-title { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .product-productCategory { |
| | | margin-left: 0.5rem; |
| | | font-size: 0.875rem; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | |
| | | .product-form { |
| | | margin-bottom: 1rem; |
| | | } |
| | | .footer-btns { |
| | | position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: #fff; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | padding: 0.75rem 0; |
| | | box-shadow: 0 -0.125rem 0.5rem rgba(0,0,0,0.05); |
| | | z-index: 1000; |
| | | } |
| | | .cancel-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | | color: #FFFFFF; |
| | | width: 6.375rem; |
| | | background: #C7C9CC; |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | .save-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | | color: #FFFFFF; |
| | | width: 14rem; |
| | | background: linear-gradient( 140deg, #00BAFF 0%, #006CFB 100%); |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | // 响应式调整 |
| | | @media (max-width: 768px) { |
| | | .submit-section { |
| | | padding: 12px; |
| | | } |
| | | } |
| | | </style> |