- 仪表盘(views/Home.vue 重写):区间切换(近 7/30/90 天)+ 概览指标卡 + 待办提醒 + 三类单据状态卡(点击跳对应状态列表)+ 两个趋势图 + 库存 Top 商品 + 最近流水; 新增 api/dashboard.ts;趋势用纯 CSS 柱状条实现,不引入图表库 - 列表页支持仪表盘带筛选跳转:Order/InboundOrder/OutboundOrder 的 Index.vue 在 onMounted 读取 route.query.status - 时间统一格式化:新增 utils/datetime.ts(formatDateTime/formatDate), 各页面时间字段一律走该工具(修正 ISO 串直接展示问题,按本地时区还原挂钟时间) - UI 紧凑化:App.vue 全局覆盖 Element Plus 内边距到 10px 左右;各页面/组件 偏大的 padding 收紧,把空间留给内容 - 账号名称/头像:登录注册去昵称、我的页去掉昵称/头像 URL、账号页支持设置名称与头像、 右上角按头像 → 名称首字符 → 账号首字符降级展示 - 出库单/入库单/发货单列表与创建页:去掉操作人输入、物流公司下拉、推送失败标记等 Co-Authored-By: GitHub Copilot <noreply@github.com>
682 lines
22 KiB
Vue
682 lines
22 KiB
Vue
<script setup lang="ts">
|
||
import { computed, onMounted, reactive, ref } from 'vue'
|
||
import { useRouter } from 'vue-router'
|
||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
||
import { createOrderDelivery, parseReceiver } from '@/api/orderDelivery'
|
||
import { getShops, type ShopItem } from '@/api/shop'
|
||
import { getWarehouseOptions, type WarehouseOption } from '@/api/warehouse'
|
||
import { getExpressCompanyOptions, type ExpressCompanyOption } from '@/api/expressCompany'
|
||
import type { ProductSearchItem } from '@/api/product'
|
||
import ProductSelect from '@/components/ProductSelect.vue'
|
||
import VirtualSelect from '@/components/VirtualSelect.vue'
|
||
|
||
/** 订单类型:ORDER 组枚举,默认 JYCK 一般交易出库单 */
|
||
const ORDER_TYPE_OPTIONS = [
|
||
{ value: 'JYCK', label: '一般交易出库单(JYCK)' },
|
||
{ value: 'HHCK', label: '换货出库(HHCK)' },
|
||
{ value: 'BFCK', label: '补发出库(BFCK)' },
|
||
]
|
||
const DEFAULT_ORDER_TYPE = 'JYCK'
|
||
const INVENTORY_TYPE_OPTIONS = [
|
||
{ value: 'ZP', label: '正品(ZP)' },
|
||
{ value: 'CC', label: '残次(CC)' },
|
||
]
|
||
|
||
const router = useRouter()
|
||
const shops = ref<ShopItem[]>([])
|
||
const warehouses = ref<WarehouseOption[]>([])
|
||
const expressCompanies = ref<ExpressCompanyOption[]>([])
|
||
|
||
/* -------------------- 订单信息(页面头部) -------------------- */
|
||
interface HeaderForm {
|
||
shop_id: number | null
|
||
warehouse_id: number | null
|
||
order_type: string
|
||
is_urgency: 'Y' | 'N'
|
||
invoice_flag: 'Y' | 'N'
|
||
logistics_code: string
|
||
logistics_name: string
|
||
total_amount: number
|
||
discount_amount: number
|
||
freight: number
|
||
ar_amount: number
|
||
got_amount: number
|
||
seller_message: string
|
||
name: string
|
||
tel: string
|
||
mobile: string
|
||
email: string
|
||
country_code: string
|
||
province: string
|
||
city: string
|
||
area: string
|
||
town: string
|
||
detail_address: string
|
||
zip_code: string
|
||
}
|
||
|
||
function emptyForm(): HeaderForm {
|
||
return {
|
||
shop_id: null,
|
||
warehouse_id: null,
|
||
order_type: DEFAULT_ORDER_TYPE,
|
||
is_urgency: 'N',
|
||
invoice_flag: 'N',
|
||
logistics_code: '',
|
||
logistics_name: '',
|
||
total_amount: 0,
|
||
discount_amount: 0,
|
||
freight: 0,
|
||
ar_amount: 0,
|
||
got_amount: 0,
|
||
seller_message: '',
|
||
name: '',
|
||
tel: '',
|
||
mobile: '',
|
||
email: '',
|
||
country_code: '',
|
||
province: '',
|
||
city: '',
|
||
area: '',
|
||
town: '',
|
||
detail_address: '',
|
||
zip_code: '',
|
||
}
|
||
}
|
||
|
||
const formRef = ref<FormInstance>()
|
||
const form = reactive<HeaderForm>(emptyForm())
|
||
|
||
/** 电话与手机至少填一个 */
|
||
function validateTelOrMobile(_rule: unknown, _value: unknown, callback: (error?: Error) => void) {
|
||
if (form.tel || form.mobile) callback()
|
||
else callback(new Error('电话与手机至少填写一个'))
|
||
}
|
||
|
||
const rules: FormRules = {
|
||
// 仓库必填:推送 WMS 需要 warehouseCode,且仓库接口配置(app_key/base_url)按仓库维度配置
|
||
warehouse_id: [{ required: true, message: '请选择仓库', trigger: 'change' }],
|
||
// 店铺必填:shopNick 取所选店铺名称,WMS 侧靠它匹配快递策略
|
||
shop_id: [{ required: true, message: '请选择店铺', trigger: 'change' }],
|
||
name: [{ required: true, message: '请输入收件人姓名', trigger: 'blur' }],
|
||
province: [{ required: true, message: '请输入省份', trigger: 'blur' }],
|
||
city: [{ required: true, message: '请输入城市', trigger: 'blur' }],
|
||
area: [{ required: true, message: '请输入区县', trigger: 'blur' }],
|
||
town: [{ required: true, message: '请输入街道/镇', trigger: 'blur' }],
|
||
tel: [{ validator: validateTelOrMobile, trigger: 'blur' }],
|
||
}
|
||
|
||
/** 选择快递公司后自动带出名称 */
|
||
function handleExpressChange(code: string | null) {
|
||
const company = expressCompanies.value.find(c => c.code === code)
|
||
form.logistics_name = company ? company.name : ''
|
||
}
|
||
|
||
/* -------------------- 收件人智能识别(右侧识别区) -------------------- */
|
||
const parseText = ref('')
|
||
const parsing = ref(false)
|
||
|
||
/** 需要回填的收件人字段(与后端识别结果 / 表单一一致) */
|
||
const PARSE_FIELDS = [
|
||
'name', 'tel', 'mobile', 'email', 'country_code',
|
||
'province', 'city', 'area', 'town', 'detail_address', 'zip_code',
|
||
] as const
|
||
|
||
/** 粘贴文本 → AI 抽取 → 回填左侧表单(仅覆盖识别出内容的字段) */
|
||
async function handleParseReceiver() {
|
||
const text = parseText.value.trim()
|
||
if (!text) {
|
||
ElMessage.warning('请先粘贴需要识别的收件人信息')
|
||
return
|
||
}
|
||
parsing.value = true
|
||
try {
|
||
const res = await parseReceiver(text)
|
||
let filled = 0
|
||
for (const key of PARSE_FIELDS) {
|
||
const value = res[key]
|
||
if (!value) continue
|
||
;(form as unknown as Record<string, string>)[key] = value
|
||
filled += 1
|
||
}
|
||
if (filled) ElMessage.success(`识别完成,已填充 ${filled} 个字段`)
|
||
else ElMessage.warning('未识别到有效收件人信息,请调整文本后重试')
|
||
} catch {
|
||
// 拦截器已提示(未配置 AI 密钥 / 识别失败)
|
||
} finally {
|
||
parsing.value = false
|
||
}
|
||
}
|
||
|
||
/** Enter 直接识别并阻止换行;Shift+Enter 保留换行;输入法候选确认不触发 */
|
||
function onParseEnter(e: KeyboardEvent) {
|
||
if (e.isComposing) return
|
||
e.preventDefault()
|
||
handleParseReceiver()
|
||
}
|
||
|
||
/* -------------------- 商品明细(页面下方) -------------------- */
|
||
interface DraftLine {
|
||
product_id: number | null
|
||
item_code: string
|
||
item_name: string
|
||
plan_qty: number
|
||
actual_price: number | null
|
||
inventory_type: 'ZP' | 'CC'
|
||
}
|
||
|
||
const lines = ref<DraftLine[]>([])
|
||
|
||
function addLine() {
|
||
lines.value.push({
|
||
product_id: null,
|
||
item_code: '',
|
||
item_name: '',
|
||
plan_qty: 1,
|
||
actual_price: null,
|
||
inventory_type: 'ZP',
|
||
})
|
||
}
|
||
|
||
function removeLine(index: number) {
|
||
lines.value.splice(index, 1)
|
||
}
|
||
|
||
/** 选择商品后带出编码/名称,单价与数量由人工填写 */
|
||
function onProductSelect(index: number, product: ProductSearchItem) {
|
||
const line = lines.value[index]
|
||
if (!line) return
|
||
line.product_id = product.id
|
||
line.item_code = product.item_code || ''
|
||
line.item_name = product.item_name || ''
|
||
}
|
||
|
||
/** 单行金额 = 数量 × 单价 */
|
||
function lineAmount(line: DraftLine) {
|
||
return (Number(line.plan_qty) || 0) * (Number(line.actual_price) || 0)
|
||
}
|
||
|
||
/** 商品总价(与后端 item_amount 同口径:Σ 计划数量 × 实际单价) */
|
||
const itemsAmount = computed(() => lines.value.reduce((sum, line) => sum + lineAmount(line), 0))
|
||
|
||
/** 商品总数 / 种类数(按商品编码去重) */
|
||
const itemsTotal = computed(() => lines.value.reduce((sum, line) => sum + (Number(line.plan_qty) || 0), 0))
|
||
const itemsKind = computed(() => new Set(lines.value.map(line => line.item_code || `#${line.product_id}`)).size)
|
||
|
||
/* -------------------- 提交 -------------------- */
|
||
const submitting = ref(false)
|
||
|
||
async function submit() {
|
||
if (!formRef.value) return
|
||
|
||
// 店铺必选(手工单必须选店铺):下拉默认命中第一个,不可清除;无店铺则不允许提交
|
||
if (!shops.value.length) {
|
||
ElMessage.warning('暂无可用店铺,请先在「店铺管理」中新建店铺后再创建发货单')
|
||
return
|
||
}
|
||
if (!form.shop_id) {
|
||
ElMessage.warning('请选择店铺')
|
||
return
|
||
}
|
||
|
||
const valid = await formRef.value.validate().catch(() => false)
|
||
if (!valid) return
|
||
|
||
if (!lines.value.length) {
|
||
ElMessage.warning('请至少添加一件商品')
|
||
return
|
||
}
|
||
for (let i = 0; i < lines.value.length; i++) {
|
||
const line = lines.value[i]
|
||
if (!line.item_code && line.product_id == null) {
|
||
ElMessage.warning(`第 ${i + 1} 行:请选择商品`)
|
||
return
|
||
}
|
||
if (!(Number(line.plan_qty) > 0)) {
|
||
ElMessage.warning(`第 ${i + 1} 行:数量必须大于 0`)
|
||
return
|
||
}
|
||
if (line.actual_price == null || String(line.actual_price).trim() === '') {
|
||
ElMessage.warning(`第 ${i + 1} 行:请填写商品单价`)
|
||
return
|
||
}
|
||
if (Number(line.actual_price) < 0) {
|
||
ElMessage.warning(`第 ${i + 1} 行:商品单价不能小于 0`)
|
||
return
|
||
}
|
||
}
|
||
|
||
submitting.value = true
|
||
try {
|
||
await createOrderDelivery({
|
||
warehouse_id: form.warehouse_id,
|
||
shop_id: form.shop_id,
|
||
order_type: form.order_type,
|
||
is_urgency: form.is_urgency,
|
||
invoice_flag: form.invoice_flag,
|
||
logistics_code: form.logistics_code || null,
|
||
logistics_name: form.logistics_name || null,
|
||
total_amount: form.total_amount,
|
||
discount_amount: form.discount_amount,
|
||
freight: form.freight,
|
||
ar_amount: form.ar_amount,
|
||
got_amount: form.got_amount,
|
||
seller_message: form.seller_message || null,
|
||
name: form.name,
|
||
tel: form.tel || null,
|
||
mobile: form.mobile || null,
|
||
email: form.email || null,
|
||
country_code: form.country_code || null,
|
||
province: form.province,
|
||
city: form.city,
|
||
area: form.area,
|
||
town: form.town,
|
||
detail_address: form.detail_address || null,
|
||
zip_code: form.zip_code || null,
|
||
items: lines.value.map((line, index) => ({
|
||
order_line_no: String(index + 1),
|
||
item_code: line.item_code || null,
|
||
item_name: line.item_name || null,
|
||
plan_qty: Number(line.plan_qty),
|
||
actual_price: line.actual_price == null ? null : Number(line.actual_price),
|
||
inventory_type: line.inventory_type,
|
||
})),
|
||
})
|
||
ElMessage.success('发货单创建成功')
|
||
router.push('/order')
|
||
} catch {
|
||
// 拦截器已提示
|
||
} finally {
|
||
submitting.value = false
|
||
}
|
||
}
|
||
|
||
function cancel() {
|
||
router.push('/order')
|
||
}
|
||
|
||
async function fetchOptions() {
|
||
try {
|
||
const [ shopRes, warehouseRes, expressRes ] = await Promise.all([
|
||
getShops({ page: 1, pageSize: 200 }),
|
||
getWarehouseOptions(),
|
||
getExpressCompanyOptions(),
|
||
])
|
||
shops.value = shopRes.list
|
||
warehouses.value = warehouseRes
|
||
expressCompanies.value = expressRes
|
||
// 店铺默认命中第一个(下拉不可清除,必须显式选择才能提交)
|
||
if (!form.shop_id && shops.value.length) {
|
||
form.shop_id = shops.value[0].id
|
||
}
|
||
} catch {
|
||
// 拦截器已提示
|
||
}
|
||
}
|
||
|
||
onMounted(async () => {
|
||
await fetchOptions()
|
||
addLine()
|
||
})
|
||
</script>
|
||
|
||
<template>
|
||
<el-card class="create-card">
|
||
<template #header>
|
||
<div class="page-header">
|
||
<span>创建发货单</span>
|
||
<div>
|
||
<el-button @click="cancel">取消</el-button>
|
||
<el-button type="primary" :loading="submitting" @click="submit">保存</el-button>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<div class="page-scroll">
|
||
<el-form ref="formRef" :model="form" :rules="rules" size="small" label-width="86px" class="compact-form">
|
||
<el-divider content-position="left">订单信息</el-divider>
|
||
<el-row :gutter="16">
|
||
<el-col :span="6">
|
||
<el-form-item label="店铺" prop="shop_id">
|
||
<VirtualSelect
|
||
v-model="form.shop_id"
|
||
:options="shops"
|
||
label-key="name"
|
||
value-key="id"
|
||
:placeholder="shops.length ? '请选择店铺' : '暂无店铺,请先新建店铺'"
|
||
:disabled="!shops.length"
|
||
style="width: 100%"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="仓库" prop="warehouse_id">
|
||
<VirtualSelect
|
||
v-model="form.warehouse_id"
|
||
:options="warehouses"
|
||
label-key="name"
|
||
value-key="id"
|
||
placeholder="请选择仓库"
|
||
clearable
|
||
style="width: 100%"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="订单类型">
|
||
<el-select v-model="form.order_type" style="width: 100%">
|
||
<el-option v-for="opt in ORDER_TYPE_OPTIONS" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="加急">
|
||
<el-radio-group v-model="form.is_urgency">
|
||
<el-radio value="N">否</el-radio>
|
||
<el-radio value="Y">是</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="需要发票">
|
||
<el-radio-group v-model="form.invoice_flag">
|
||
<el-radio value="N">否</el-radio>
|
||
<el-radio value="Y">是</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="物流公司">
|
||
<el-select
|
||
v-model="form.logistics_code"
|
||
placeholder="请选择快递公司"
|
||
clearable
|
||
filterable
|
||
style="width: 100%"
|
||
@change="handleExpressChange"
|
||
>
|
||
<el-option
|
||
v-for="c in expressCompanies"
|
||
:key="c.code"
|
||
:label="`${c.name}(${c.code})`"
|
||
:value="c.code"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="订单总金额">
|
||
<el-input-number v-model="form.total_amount" :min="0" :precision="2" style="width: 100%" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="折扣金额">
|
||
<el-input-number v-model="form.discount_amount" :min="0" :precision="2" style="width: 100%" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="快递费用">
|
||
<el-input-number v-model="form.freight" :min="0" :precision="2" style="width: 100%" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="应收金额">
|
||
<el-input-number v-model="form.ar_amount" :min="0" :precision="2" style="width: 100%" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="已收金额">
|
||
<el-input-number v-model="form.got_amount" :min="0" :precision="2" style="width: 100%" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="留言">
|
||
<el-input v-model="form.seller_message" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-divider content-position="left">收件人</el-divider>
|
||
<el-row :gutter="12">
|
||
<el-col :span="15">
|
||
<el-row :gutter="0">
|
||
<el-col :span="8">
|
||
<el-form-item label="姓名" prop="name">
|
||
<el-input v-model="form.name" placeholder="必填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="电话" prop="tel">
|
||
<el-input v-model="form.tel" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="手机">
|
||
<el-input v-model="form.mobile" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="邮箱">
|
||
<el-input v-model="form.email" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="邮编">
|
||
<el-input v-model="form.zip_code" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="国家编码">
|
||
<el-input v-model="form.country_code" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="省份" prop="province">
|
||
<el-input v-model="form.province" placeholder="必填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="城市" prop="city">
|
||
<el-input v-model="form.city" placeholder="必填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="区县" prop="area">
|
||
<el-input v-model="form.area" placeholder="必填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="街道/镇" prop="town">
|
||
<el-input v-model="form.town" placeholder="必填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="详细地址">
|
||
<el-input v-model="form.detail_address" placeholder="选填" />
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
<el-col :span="9">
|
||
<div class="parse-box">
|
||
<el-input
|
||
v-model="parseText"
|
||
type="textarea"
|
||
resize="none"
|
||
:disabled="parsing"
|
||
placeholder="粘贴收件人信息后按 Enter 识别(Shift+Enter 换行)"
|
||
@keydown.enter.exact="onParseEnter"
|
||
/>
|
||
<div class="parse-tip">
|
||
{{ parsing ? '识别中…' : '填完按 Enter 识别,结果自动填入左侧,可再手动修改' }}
|
||
</div>
|
||
</div>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-divider content-position="left">商品明细</el-divider>
|
||
<div class="items-toolbar">
|
||
<span class="items-title">共 {{ lines.length }} 项</span>
|
||
<span class="items-title">商品总数 {{ itemsTotal }} · 种类 {{ itemsKind }}</span>
|
||
<span class="items-total">商品总价:{{ itemsAmount.toFixed(2) }}</span>
|
||
<el-button type="primary" size="small" @click="addLine">添加商品</el-button>
|
||
</div>
|
||
<el-table :data="lines" size="small" border max-height="240">
|
||
<el-table-column label="商品" min-width="170">
|
||
<template #default="{ row, $index }">
|
||
<ProductSelect
|
||
v-model="row.product_id"
|
||
@select="(p: ProductSearchItem) => onProductSelect($index, p)"
|
||
/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="商品编码" width="120">
|
||
<template #default="{ row }">
|
||
<el-input v-model="row.item_code" placeholder="自动带出" />
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="商品名称" min-width="140">
|
||
<template #default="{ row }">
|
||
<el-input v-model="row.item_name" placeholder="自动带出" />
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="库存类型" width="110">
|
||
<template #default="{ row }">
|
||
<el-select v-model="row.inventory_type" style="width: 100%">
|
||
<el-option
|
||
v-for="opt in INVENTORY_TYPE_OPTIONS"
|
||
:key="opt.value"
|
||
:label="opt.label"
|
||
:value="opt.value"
|
||
/>
|
||
</el-select>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="数量" width="100">
|
||
<template #default="{ row }">
|
||
<el-input-number v-model="row.plan_qty" :min="0" :precision="3" style="width: 100%" />
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="单价" width="110">
|
||
<template #default="{ row }">
|
||
<el-input-number v-model="row.actual_price" :min="0" :precision="2" style="width: 100%" />
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="金额" width="100" align="right">
|
||
<template #default="{ row }">{{ lineAmount(row).toFixed(2) }}</template>
|
||
</el-table-column>
|
||
<el-table-column label="操作" width="64" fixed="right">
|
||
<template #default="{ $index }">
|
||
<el-button link type="danger" @click="removeLine($index)">删除</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</el-form>
|
||
</div>
|
||
</el-card>
|
||
</template>
|
||
|
||
<style scoped>
|
||
.page-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
font-weight: 600;
|
||
}
|
||
/* 紧凑排版:压缩表单项行距、分割线边距与卡片内边距 */
|
||
.compact-form :deep(.el-form-item) {
|
||
margin-bottom: 6px;
|
||
}
|
||
.compact-form :deep(.el-form-item__label) {
|
||
padding-right: 6px;
|
||
}
|
||
/* 数值字段(金额)不必占满整列 */
|
||
.compact-form :deep(.el-input-number) {
|
||
max-width: 124px;
|
||
}
|
||
/* 明细表格内控件本身列宽已很窄,不做限制 */
|
||
.compact-form :deep(.el-table .el-input-number) {
|
||
max-width: none;
|
||
}
|
||
.compact-form :deep(.el-table .cell) {
|
||
padding: 0 6px;
|
||
}
|
||
.compact-form :deep(.el-divider--horizontal) {
|
||
margin: 6px 0 8px;
|
||
}
|
||
.compact-form :deep(.el-divider__text) {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: #303133;
|
||
}
|
||
.create-card {
|
||
flex: 1;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.create-card :deep(.el-card__header) {
|
||
padding: 10px 12px;
|
||
}
|
||
.create-card :deep(.el-card__body) {
|
||
flex: 1;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
padding: 10px 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.page-scroll {
|
||
flex: 1;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
}
|
||
.items-toolbar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
margin-bottom: 8px;
|
||
}
|
||
.items-title {
|
||
color: #606266;
|
||
font-size: 13px;
|
||
}
|
||
.items-total {
|
||
font-weight: 600;
|
||
color: #303133;
|
||
}
|
||
/* 智能识别区(收件人右侧):高度与左侧表单一致,填完回车即识别 */
|
||
.parse-box {
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
max-height: 100%;
|
||
overflow: hidden;
|
||
padding: 8px;
|
||
border: 1px dashed #dcdfe6;
|
||
border-radius: 4px;
|
||
background: #fafafa;
|
||
}
|
||
.parse-box :deep(.el-textarea) {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
}
|
||
.parse-box :deep(.el-textarea__inner) {
|
||
box-sizing: border-box;
|
||
flex: 1 1 auto;
|
||
height: auto;
|
||
min-height: 0;
|
||
overflow: auto;
|
||
}
|
||
.parse-tip {
|
||
flex: 0 0 auto;
|
||
margin-top: 6px;
|
||
color: #909399;
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
}
|
||
</style>
|