Compare commits

..

No commits in common. "9743cdd36f9c2d6228a81ec6b2be2a27a111d5fe" and "5ccc42fdbc1c937ca645ec83e06045e39e63886b" have entirely different histories.

22 changed files with 116 additions and 118 deletions

View File

@ -67,7 +67,6 @@ export type DeliveryOrderListItem = {
service_fee?: string | null service_fee?: string | null
logistics_name?: string logistics_name?: string
delivery_type?: string | null delivery_type?: string | null
/** 重量类型 */
weight_type?: string | number | null weight_type?: string | number | null
is_urgency?: string is_urgency?: string
invoice_flag?: string invoice_flag?: string
@ -88,7 +87,6 @@ export type DeliveryOrderListItem = {
items?: string items?: string
items_count?: number items_count?: number
items_total?: number items_total?: number
/** 订单商品总重量(g) */
items_weight?: string items_weight?: string
wave_id?: number wave_id?: number
wave_no?: string wave_no?: string
@ -167,7 +165,6 @@ export type DeliveryOrderDetailItem = {
/** order.deliveryOrder.detail 运单信息项 */ /** order.deliveryOrder.detail 运单信息项 */
export type DeliveryOrderDetailExpressItem = { export type DeliveryOrderDetailExpressItem = {
waybill_code?: string waybill_code?: string
/** 称重重量(g) */
weighing_weight?: number | null weighing_weight?: number | null
sys_logistics_code?: string sys_logistics_code?: string
sys_logistics_name?: string sys_logistics_name?: string

View File

@ -63,7 +63,7 @@ export type UpdateExpressWeighingWeightParams = {
order_id: number | string order_id: number | string
/** 订单仅一个运单时可不传;多运单时必填;order_id=0 时必填 */ /** 订单仅一个运单时可不传;多运单时必填;order_id=0 时必填 */
waybill_code?: string waybill_code?: string
/** 称重重量(g),必须大于 0,最多 3 位小数 */ /** 称重重量(kg),必须大于 0,最多 3 位小数 */
weighing_weight: number | string weighing_weight: number | string
} }
@ -80,7 +80,7 @@ export type UpdateExpressWeighingWeightResponse = {
order_id?: number order_id?: number
/** 写入重量的运单号;订单模式及运单号散单模式返回 */ /** 写入重量的运单号;订单模式及运单号散单模式返回 */
waybill_code?: string waybill_code?: string
/** 已写入的称重重量(g) */ /** 已写入的称重重量(kg) */
weighing_weight: number weighing_weight: number
/** 波次号;团购批量模式返回 */ /** 波次号;团购批量模式返回 */
wave_no?: string wave_no?: string
@ -88,7 +88,7 @@ export type UpdateExpressWeighingWeightResponse = {
business_key?: string business_key?: string
/** 波次 ID;团购批量模式返回 */ /** 波次 ID;团购批量模式返回 */
wave_id?: number wave_id?: number
/** 所有拆单重量累加(g);团购批量模式返回 */ /** 所有拆单重量累加(kg);团购批量模式返回 */
total_weight?: number total_weight?: number
/** waybill_code 非空的 business_key 数量;团购批量模式返回 */ /** waybill_code 非空的 business_key 数量;团购批量模式返回 */
split_count?: number split_count?: number

View File

@ -63,7 +63,7 @@ export type ScanOrderSingleListItem = {
store_remark?: string store_remark?: string
intercept_status?: string intercept_status?: string
stock?: unknown[] stock?: unknown[]
/** 订单商品总重量(g) */ /** 订单商品总重量(kg) */
items_weight?: number | string items_weight?: number | string
/** 推荐包材信息,无推荐时为 null */ /** 推荐包材信息,无推荐时为 null */
suggested_package_material?: Record<string, unknown> | null suggested_package_material?: Record<string, unknown> | null

View File

@ -170,7 +170,7 @@ export type WaveGroupOrderFetchListItem = Record<string, unknown> & {
group?: string group?: string
group_count?: number group_count?: number
items_total?: number items_total?: number
/** 总重量 g,取组内首单 items_weight */ /** 总重量 kg,取组内首单 items_weight */
items_weight?: number | string items_weight?: number | string
store_id?: number store_id?: number
store_ids?: number[] store_ids?: number[]

View File

@ -56,7 +56,11 @@
<barcode-img :text="getPreviewValue(item) || '0123456789'" /> <barcode-img :text="getPreviewValue(item) || '0123456789'" />
</template> </template>
<template v-else-if="item.type === 'qrcode'"> <template v-else-if="item.type === 'qrcode'">
<qrcode-img :text="getPreviewValue(item) || ''" /> <img
:src="'https://ye4s.wms.gztbyc.com/qrcode/build?text=' + encodeURIComponent(getPreviewValue(item) || '')"
alt=""
style="width: 100%; height: 100%; object-fit: contain;"
/>
</template> </template>
<template v-else-if="item.type === 'image'"> <template v-else-if="item.type === 'image'">
<img :src="item.content" alt="" style="width: 100%; height: 100%; object-fit: fill;" /> <img :src="item.content" alt="" style="width: 100%; height: 100%; object-fit: fill;" />
@ -122,7 +126,6 @@
import { computed, h, reactive, ref, watch } from 'vue' import { computed, h, reactive, ref, watch } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import JsBarcode from 'jsbarcode' import JsBarcode from 'jsbarcode'
import QRCode from 'qrcode'
import * as receivingApi from '@/api/storage_receiving/receiving' import * as receivingApi from '@/api/storage_receiving/receiving'
import * as templateApi from '@/api/setting.printtemplate/printTemplate' import * as templateApi from '@/api/setting.printtemplate/printTemplate'
import * as stationApi from '@/api/print/print' import * as stationApi from '@/api/print/print'
@ -201,29 +204,6 @@ const barcodeImg = {
} }
} }
const qrcodeImg = {
props: ['text'],
setup(innerProps: any) {
const src = ref('')
const renderQrcode = (val: string) => {
if (!val) {
src.value = ''
return
}
const canvas = document.createElement('canvas')
QRCode.toCanvas(canvas, val, { width: 200, margin: 1 }, (err: Error | null | undefined) => {
if (err) {
src.value = ''
return
}
src.value = canvas.toDataURL()
})
}
watch(() => innerProps.text, (val: string) => renderQrcode(val), { immediate: true })
return () => h('img', { src: src.value, style: { display: 'block', width: '100%', height: '100%', objectFit: 'contain' } })
}
}
const previewInfo = computed(() => { const previewInfo = computed(() => {
const t = templateOptions.value.find((item: any) => item.id === printSettings.template) const t = templateOptions.value.find((item: any) => item.id === printSettings.template)
if (!t) return { width: 0, height: 0 } if (!t) return { width: 0, height: 0 }

View File

@ -54,7 +54,7 @@
{{ formatCellNumber(row.height) }} {{ formatCellNumber(row.height) }}
</template> </template>
<template #column-weight="{ row }"> <template #column-weight="{ row }">
{{ formatCellNumber(row.weight) ? formatCellNumber(row.weight) + 'g' : '--' }} {{ formatCellNumber(row.weight) }}
</template> </template>
<template #column-cost_price="{ row }"> <template #column-cost_price="{ row }">
{{ formatCellNumber(row.cost_price) }} {{ formatCellNumber(row.cost_price) }}
@ -129,7 +129,7 @@ const previewColumns = [
{ prop: 'length', label: '长度', width: '80' }, { prop: 'length', label: '长度', width: '80' },
{ prop: 'width', label: '宽度', width: '80' }, { prop: 'width', label: '宽度', width: '80' },
{ prop: 'height', label: '高度', width: '80' }, { prop: 'height', label: '高度', width: '80' },
{ prop: 'weight', label: '重量(g)', width: '80' }, { prop: 'weight', label: '重量', width: '80' },
{ prop: 'cost_price', label: '成本价', width: '90' }, { prop: 'cost_price', label: '成本价', width: '90' },
{ prop: 'status', label: '状态', width: '70' }, { prop: 'status', label: '状态', width: '70' },
{ prop: 'import_status', label: '导入状态', width: '100' }, { prop: 'import_status', label: '导入状态', width: '100' },

View File

@ -59,7 +59,7 @@
</template> </template>
<template #column-weight="{ row }"> <template #column-weight="{ row }">
{{ formatNumber(row.weight) ? formatNumber(row.weight) + 'g' : '--' }} {{ formatNumber(row.weight) }}
</template> </template>
<template #column-cost_price="{ row }"> <template #column-cost_price="{ row }">
@ -152,7 +152,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="重量(g)" prop="weight"> <el-form-item label="重量" prop="weight">
<el-input-number <el-input-number
v-model="formData.weight" v-model="formData.weight"
:min="0" :min="0"

View File

@ -21,7 +21,7 @@ export const packageMaterialColumns = [
{ prop: 'material_type', label: '包材类型', minWidth: '110', showOverflowTooltip: true }, { prop: 'material_type', label: '包材类型', minWidth: '110', showOverflowTooltip: true },
{ prop: 'spec', label: '规格', minWidth: '120', showOverflowTooltip: true }, { prop: 'spec', label: '规格', minWidth: '120', showOverflowTooltip: true },
{ prop: 'dimensions', label: '尺寸(L×W×H)', minWidth: '140' }, { prop: 'dimensions', label: '尺寸(L×W×H)', minWidth: '140' },
{ prop: 'weight', label: '重量(g)', width: '90' }, { prop: 'weight', label: '重量', width: '90' },
{ prop: 'cost_price', label: '成本价', width: '100' }, { prop: 'cost_price', label: '成本价', width: '100' },
{ prop: 'status', label: '状态', width: '90' }, { prop: 'status', label: '状态', width: '90' },
{ prop: 'actions', label: '操作', width: '150', fixed: 'right' } { prop: 'actions', label: '操作', width: '150', fixed: 'right' }

View File

@ -16,7 +16,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="logistics_name" label="物流公司" min-width="120" show-overflow-tooltip /> <el-table-column prop="logistics_name" label="物流公司" min-width="120" show-overflow-tooltip />
<el-table-column prop="logistics_interface_name" label="快递接口" min-width="120" show-overflow-tooltip /> <el-table-column prop="logistics_interface_name" label="快递接口" min-width="120" show-overflow-tooltip />
<el-table-column label="称重(g)" width="110" align="right"> <el-table-column label="称重(kg)" width="110" align="right">
<template #default="{ row }"> <template #default="{ row }">
{{ formatWeight(row.weighing_weight) }} {{ formatWeight(row.weighing_weight) }}
</template> </template>
@ -46,7 +46,7 @@
<el-form-item label="运单号"> <el-form-item label="运单号">
<el-input :model-value="weighingForm.waybill_code" disabled /> <el-input :model-value="weighingForm.waybill_code" disabled />
</el-form-item> </el-form-item>
<el-form-item label="称重(g)"> <el-form-item label="称重(kg)">
<el-input-number <el-input-number
v-model="weighingForm.weighing_weight" v-model="weighingForm.weighing_weight"
:min="0.001" :min="0.001"
@ -101,7 +101,7 @@ const orderId = computed(() => props.row?.id)
function formatWeight(value: unknown) { function formatWeight(value: unknown) {
if (value === null || value === undefined || value === '') return '—' if (value === null || value === undefined || value === '') return '—'
const num = Number(value) const num = Number(value)
return Number.isFinite(num) ? String(num) + 'g' : String(value) return Number.isFinite(num) ? String(num) : String(value)
} }
function formatTime(value: unknown) { function formatTime(value: unknown) {

View File

@ -43,7 +43,7 @@
<el-table :data="expresses" border stripe size="small" empty-text="暂无运单信息"> <el-table :data="expresses" border stripe size="small" empty-text="暂无运单信息">
<el-table-column prop="waybill_code" label="运单号" min-width="180" show-overflow-tooltip /> <el-table-column prop="waybill_code" label="运单号" min-width="180" show-overflow-tooltip />
<el-table-column prop="logistics_name" label="物流公司" min-width="140" show-overflow-tooltip /> <el-table-column prop="logistics_name" label="物流公司" min-width="140" show-overflow-tooltip />
<el-table-column label="称重(g)" width="100" align="right"> <el-table-column label="称重(kg)" width="100" align="right">
<template #default="{ row }"> <template #default="{ row }">
{{ formatWeight(row.weighing_weight) }} {{ formatWeight(row.weighing_weight) }}
</template> </template>
@ -97,7 +97,7 @@ function formatAmount(value: unknown) {
function formatWeight(value: unknown) { function formatWeight(value: unknown) {
if (value === null || value === undefined || value === '') return '—' if (value === null || value === undefined || value === '') return '—'
const num = Number(value) const num = Number(value)
return Number.isFinite(num) ? String(num) + 'g' : String(value) return Number.isFinite(num) ? String(num) : String(value)
} }
function formatExpressTime(value: unknown) { function formatExpressTime(value: unknown) {

View File

@ -142,13 +142,6 @@ export const COMMON_TRANSLATIONS: Record<string, Record<string, string>> = {
'1': '轻货', '1': '轻货',
'2': '重货', '2': '重货',
'3': '冷链' '3': '冷链'
},
create_channel: {
'QM': '奇门',
'API': 'API',
'IMPORT': '导入',
'MANUAL': '手动',
'PLATFORM': '平台'
} }
} }
@ -767,7 +760,7 @@ export const orderDetailFullSections: OrderDetailSectionConfig[] = [
title: '流程与状态', title: '流程与状态',
column: 4, column: 4,
fields: [ fields: [
{ prop: 'status', label: '订单状态', tag: true, formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态', tag: true },
{ prop: 'step', label: '流程步骤' }, { prop: 'step', label: '流程步骤' },
{ prop: 'sync_status', label: '同步状态', tag: true }, { prop: 'sync_status', label: '同步状态', tag: true },
{ prop: 'inspection_status', label: '审核状态', tag: true }, { prop: 'inspection_status', label: '审核状态', tag: true },
@ -832,7 +825,7 @@ export const orderDetailFullSections: OrderDetailSectionConfig[] = [
{ prop: 'items', label: '商品明细摘要', span: 4 }, { prop: 'items', label: '商品明细摘要', span: 4 },
{ prop: 'items_count', label: '商品种类' }, { prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' }, { prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量(g)' }, { prop: 'items_weight', label: '商品重量kg' },
{ prop: 'items_hash', label: '商品哈希', span: 2 }, { prop: 'items_hash', label: '商品哈希', span: 2 },
{ prop: 'items_crc', label: '商品CRC' } { prop: 'items_crc', label: '商品CRC' }
] ]
@ -866,7 +859,7 @@ export const orderDetailCompactSections: OrderDetailSectionConfig[] = [
{ prop: 'create_channel', label: '来源' }, { prop: 'create_channel', label: '来源' },
{ prop: 'shop_nick', label: '店铺名称' }, { prop: 'shop_nick', label: '店铺名称' },
{ prop: 'buyer_nick', label: '买家昵称' }, { prop: 'buyer_nick', label: '买家昵称' },
{ prop: 'status', label: '订单状态', tag: true, formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态', tag: true },
{ prop: 'source_order_codes', label: '平台交易单号' }, { prop: 'source_order_codes', label: '平台交易单号' },
{ prop: 'is_urgency', label: '是否紧急', tag: true }, { prop: 'is_urgency', label: '是否紧急', tag: true },
{ prop: 'seller_nick', label: '卖家昵称' }, { prop: 'seller_nick', label: '卖家昵称' },
@ -914,7 +907,7 @@ export const orderDetailCompactSections: OrderDetailSectionConfig[] = [
{ prop: 'freight', label: '运费', amount: true }, { prop: 'freight', label: '运费', amount: true },
{ prop: 'items_count', label: '商品种类' }, { prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' }, { prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量(g)' } { prop: 'items_weight', label: '商品重量kg' }
] ]
}, },
{ {
@ -1396,7 +1389,7 @@ export const deliveryColumns = applyOrderListCopyActions([
{ prop: 'province', label: '省份', width: '90' }, { prop: 'province', label: '省份', width: '90' },
{ prop: 'city', label: '城市', width: '90' }, { prop: 'city', label: '城市', width: '90' },
{ prop: 'area', label: '区/县', width: '90' }, { prop: 'area', label: '区/县', width: '90' },
{ prop: 'status', label: '订单状态', width: '100', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态', width: '100' },
{ prop: 'outbound_status', label: '数据归档', width: '100' }, { prop: 'outbound_status', label: '数据归档', width: '100' },
{ prop: 'sync_status', label: '同步状态', width: '100' }, { prop: 'sync_status', label: '同步状态', width: '100' },
{ prop: 'inspection_status', label: '审核状态', width: '100' }, { prop: 'inspection_status', label: '审核状态', width: '100' },
@ -1421,7 +1414,7 @@ export const deliveryColumns = applyOrderListCopyActions([
{ prop: 'basket_number', label: '篮号', width: '90' }, { prop: 'basket_number', label: '篮号', width: '90' },
{ prop: 'items_count', label: '商品种类', width: '90' }, { prop: 'items_count', label: '商品种类', width: '90' },
{ prop: 'items_total', label: '商品总数', width: '90' }, { prop: 'items_total', label: '商品总数', width: '90' },
{ prop: 'items_weight', label: '商品重量(g)', width: '90' }, { prop: 'items_weight', label: '商品重量kg', width: '90' },
{ prop: 'total_amount', label: '订单金额', width: '100' }, { prop: 'total_amount', label: '订单金额', width: '100' },
{ prop: 'item_amount', label: '商品金额', width: '100' }, { prop: 'item_amount', label: '商品金额', width: '100' },
{ prop: 'freight', label: '运费', width: '90' }, { prop: 'freight', label: '运费', width: '90' },
@ -1445,7 +1438,7 @@ export const deliverydetail = [
{ label: '商品SKU', prop: 'items' }, { label: '商品SKU', prop: 'items' },
{ label: '商品种类数', prop: 'items_count' }, { label: '商品种类数', prop: 'items_count' },
{ label: '商品总数', prop: 'items_total' }, { label: '商品总数', prop: 'items_total' },
{ label: '商品重量(g)', prop: 'items_weight' }, { label: '商品重量kg', prop: 'items_weight' },
{ label: '货主', prop: 'store_id' }, { label: '货主', prop: 'store_id' },
{ label: '国家编码', prop: 'country_code' }, { label: '国家编码', prop: 'country_code' },
{ label: '详细地址', prop: 'detail_address' }, { label: '详细地址', prop: 'detail_address' },
@ -1521,7 +1514,7 @@ export const reviewColums = applyOrderListCopyActions([
{ prop: 'logistics_name', label: '快递', width: '120' }, { prop: 'logistics_name', label: '快递', width: '120' },
{ prop: 'items_total', label: '商品总数', width: '100' }, { prop: 'items_total', label: '商品总数', width: '100' },
{ prop: 'items_count', label: '商品种类', width: '100' }, { prop: 'items_count', label: '商品种类', width: '100' },
{ prop: 'items_weight', label: '商品重量(g)', width: '110' }, { prop: 'items_weight', label: '商品重量kg', width: '110' },
{ prop: 'total_amount', label: '订单金额', width: '110' }, { prop: 'total_amount', label: '订单金额', width: '110' },
{ prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter }, { prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter },
{ prop: 'operator_name', label: '审核人', width: '100' }, { prop: 'operator_name', label: '审核人', width: '100' },
@ -1541,7 +1534,7 @@ export const reviewOrderDetail = [
{ prop: 'shop_nick', label: '店铺名称' }, { prop: 'shop_nick', label: '店铺名称' },
{ prop: 'buyer_nick', label: '买家昵称' }, { prop: 'buyer_nick', label: '买家昵称' },
{ prop: 'seller_nick', label: '卖家昵称' }, { prop: 'seller_nick', label: '卖家昵称' },
{ prop: 'status', label: '订单状态', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态' },
{ prop: 'is_urgency', label: '是否紧急' }, { prop: 'is_urgency', label: '是否紧急' },
{ prop: 'invoice_flag', label: '发票标记' }, { prop: 'invoice_flag', label: '发票标记' },
{ prop: 'sync_status', label: '同步状态' }, { prop: 'sync_status', label: '同步状态' },
@ -1559,7 +1552,7 @@ export const reviewOrderDetail = [
{ prop: 'items', label: '商品清单', span: 3 }, { prop: 'items', label: '商品清单', span: 3 },
{ prop: 'items_count', label: '商品种类' }, { prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' }, { prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量(g)' }, { prop: 'items_weight', label: '商品重量kg' },
// 收货与物流 // 收货与物流
{ prop: 'name', label: '收件人' }, { prop: 'name', label: '收件人' },
@ -1688,7 +1681,7 @@ export const pendingCloums = [
{ prop: 'express_numbers', label: '运单号', width: '160', formatter: waybillCodesFormatter }, { prop: 'express_numbers', label: '运单号', width: '160', formatter: waybillCodesFormatter },
{ prop: 'items_count', label: '商品种类', width: '100' }, { prop: 'items_count', label: '商品种类', width: '100' },
{ prop: 'items_total', label: '商品总数', width: '100' }, { prop: 'items_total', label: '商品总数', width: '100' },
{ prop: 'items_weight', label: '商品重量(g)', width: '110' }, { prop: 'items_weight', label: '商品重量kg', width: '110' },
{ prop: 'province', label: '省份', width: '100' }, { prop: 'province', label: '省份', width: '100' },
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter }, { prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
{ prop: 'pay_time', label: '支付时间', width: '160', formatter: orderTimeFormatter }, { prop: 'pay_time', label: '支付时间', width: '160', formatter: orderTimeFormatter },
@ -1714,7 +1707,7 @@ export const ORDER_LIST_FIELD_LABELS: Record<string, string> = {
buyer_message: '买家留言', buyer_message: '买家留言',
pre_delivery_order_code: '前置单号', pre_delivery_order_code: '前置单号',
delivery_time: '配送时间', delivery_time: '配送时间',
items_weight: '商品重量(g)', items_weight: '商品重量kg',
waybill_codes: '运单号', waybill_codes: '运单号',
weight_type: '重量类型', weight_type: '重量类型',
} }
@ -1761,7 +1754,7 @@ export const pendingOrderDetail = [
{ prop: 'shop_nick', label: '店铺名称' }, { prop: 'shop_nick', label: '店铺名称' },
{ prop: 'buyer_nick', label: '买家昵称' }, { prop: 'buyer_nick', label: '买家昵称' },
{ prop: 'seller_nick', label: '卖家昵称' }, { prop: 'seller_nick', label: '卖家昵称' },
{ prop: 'status', label: '订单状态', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态' },
{ prop: 'sync_status', label: '同步状态' }, { prop: 'sync_status', label: '同步状态' },
{ prop: 'is_urgency', label: '是否紧急' }, { prop: 'is_urgency', label: '是否紧急' },
{ prop: 'invoice_flag', label: '发票标记' }, { prop: 'invoice_flag', label: '发票标记' },
@ -1778,7 +1771,7 @@ export const pendingOrderDetail = [
{ prop: 'items', label: '商品清单', span: 3 }, { prop: 'items', label: '商品清单', span: 3 },
{ prop: 'items_count', label: '商品种类' }, { prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' }, { prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量(g)' }, { prop: 'items_weight', label: '商品重量kg' },
// 收货与物流 // 收货与物流
{ prop: 'name', label: '收件人' }, { prop: 'name', label: '收件人' },
@ -1928,14 +1921,14 @@ export const workbenchColumns = applyOrderListCopyActions([
{ prop: 'mobile', label: '电话', minWidth: 120 }, { prop: 'mobile', label: '电话', minWidth: 120 },
{ prop: 'buyer_message', label: '买家留言', minWidth: 180 }, { prop: 'buyer_message', label: '买家留言', minWidth: 180 },
{ prop: 'is_urgency', label: '是否紧急', minWidth: 100 }, { prop: 'is_urgency', label: '是否紧急', minWidth: 100 },
{ prop: 'status', label: '订单状态', minWidth: 120, formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态', minWidth: 120 },
{ prop: 'sync_status', label: '同步状态', minWidth: 110 }, { prop: 'sync_status', label: '同步状态', minWidth: 110 },
{ prop: 'inspection_status', label: '审核状态', minWidth: 110 }, { prop: 'inspection_status', label: '审核状态', minWidth: 110 },
{ prop: 'outbound_status', label: '数据归档', minWidth: 120 }, { prop: 'outbound_status', label: '数据归档', minWidth: 120 },
{ prop: 'logistics_name', label: '快递', minWidth: 120 }, { prop: 'logistics_name', label: '快递', minWidth: 120 },
{ prop: 'waybill_codes', label: '运单号', minWidth: 140, formatter: waybillCodesFormatter }, { prop: 'waybill_codes', label: '运单号', minWidth: 140, formatter: waybillCodesFormatter },
{ prop: 'items_total', label: '商品总数', minWidth: 100 }, { prop: 'items_total', label: '商品总数', minWidth: 100 },
{ prop: 'items_weight', label: '商品重量(g)', minWidth: 110 }, { prop: 'items_weight', label: '商品重量kg', minWidth: 110 },
{ prop: 'total_amount', label: '订单金额', minWidth: 110 }, { prop: 'total_amount', label: '订单金额', minWidth: 110 },
{ prop: 'create_at', label: '创建时间', minWidth: 170, formatter: orderTimeFormatter }, { prop: 'create_at', label: '创建时间', minWidth: 170, formatter: orderTimeFormatter },
{ prop: 'updated_at', label: '更新时间', minWidth: 170, formatter: orderTimeFormatter } { prop: 'updated_at', label: '更新时间', minWidth: 170, formatter: orderTimeFormatter }
@ -2012,7 +2005,7 @@ export const expectionColumns = [
{ prop: 'pre_delivery_order_code', label: '前置单号', width: '140' }, { prop: 'pre_delivery_order_code', label: '前置单号', width: '140' },
{ prop: 'order_flag', label: '订单标记', minWidth: '260' }, { prop: 'order_flag', label: '订单标记', minWidth: '260' },
{ prop: 'items_total', label: '商品总数', width: '100' }, { prop: 'items_total', label: '商品总数', width: '100' },
{ prop: 'items_weight', label: '商品重量(g)', width: '110' }, { prop: 'items_weight', label: '商品重量kg', width: '110' },
{ prop: 'total_amount', label: '订单金额', width: '110' }, { prop: 'total_amount', label: '订单金额', width: '110' },
{ prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter }, { prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter },
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter }, { prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
@ -2026,7 +2019,7 @@ export const expectionOrderDetail = [
{ prop: 'shop_nick', label: '店铺名称' }, { prop: 'shop_nick', label: '店铺名称' },
{ prop: 'sys_platform_name', label: '平台' }, { prop: 'sys_platform_name', label: '平台' },
{ prop: 'create_channel', label: '来源' }, { prop: 'create_channel', label: '来源' },
{ prop: 'status', label: '订单状态', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态' },
{ prop: 'intercept_status', label: '拦截状态' }, { prop: 'intercept_status', label: '拦截状态' },
// 异常/状态标记 // 异常/状态标记
@ -2050,7 +2043,7 @@ export const expectionOrderDetail = [
// 统计信息 // 统计信息
{ prop: 'items_count', label: '商品种类' }, { prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' }, { prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量(g)' }, { prop: 'items_weight', label: '商品重量kg' },
// 时间信息 // 时间信息
{ prop: 'create_at', label: '创建时间' }, { prop: 'create_at', label: '创建时间' },
@ -2109,9 +2102,9 @@ export const archiveColumns = applyOrderListCopyActions([
{ prop: 'name', label: '收件人', width: '120' }, { prop: 'name', label: '收件人', width: '120' },
{ prop: 'mobile', label: '电话', width: '120' }, { prop: 'mobile', label: '电话', width: '120' },
{ prop: 'buyer_message', label: '买家留言', minWidth: '180' }, { prop: 'buyer_message', label: '买家留言', minWidth: '180' },
{ prop: 'items_weight', label: '商品重量(g)', width: '110' }, { prop: 'items_weight', label: '商品重量kg', width: '110' },
{ prop: 'logistics_name', label: '快递', width: '120' }, { prop: 'logistics_name', label: '快递', width: '120' },
{ prop: 'status', label: '订单状态', width: '100', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态', width: '100' },
{ prop: 'create_at', label: '创建时间', width: '160' }, { prop: 'create_at', label: '创建时间', width: '160' },
{ prop: 'updated_at', label: '归档时间', width: '160' }, { prop: 'updated_at', label: '归档时间', width: '160' },
]) ])
@ -2124,7 +2117,7 @@ export const archiveOrderDetail = [
{ prop: 'shop_nick', label: '店铺名称' }, { prop: 'shop_nick', label: '店铺名称' },
{ prop: 'sys_platform_name', label: '平台' }, { prop: 'sys_platform_name', label: '平台' },
{ prop: 'create_channel', label: '来源' }, { prop: 'create_channel', label: '来源' },
{ prop: 'status', label: '订单状态', formatter: (row: any) => translateOrderField('status', row.status) }, { prop: 'status', label: '订单状态' },
// 收货信息 // 收货信息
{ prop: 'name', label: '收件人' }, { prop: 'name', label: '收件人' },

View File

@ -14,7 +14,7 @@
class="weighing-form-alert" class="weighing-form-alert"
> >
<template #title> <template #title>
支持运单号模式(order_id=0)与订单模式(order_id 为正整数)。称重重量单位为 g,须大于 0 的整数。 支持运单号模式(order_id=0)与订单模式(order_id 为正整数)。称重重量单位为 kg,须大于 0,最多 3 位小数。
</template> </template>
</el-alert> --> </el-alert> -->
@ -66,12 +66,19 @@
</el-form-item> </el-form-item>
</template> </template>
<el-form-item label="称重重量(g)" prop="weighing_weight"> <el-form-item label="重量单位">
<el-radio-group v-model="formModel.weight_unit">
<el-radio value="kg">kg</el-radio>
<el-radio value="g">g</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="称重重量" prop="weighing_weight">
<el-input-number <el-input-number
v-model="formModel.weighing_weight" v-model="formModel.weighing_weight"
:min="1" :min="formModel.weight_unit === 'g' ? 1 : 0.001"
:precision="0" :precision="formModel.weight_unit === 'g' ? 0 : 3"
:step="1" :step="formModel.weight_unit === 'g' ? 1 : 0.1"
controls-position="right" controls-position="right"
placeholder="请输入称重重量" placeholder="请输入称重重量"
style="width: 100%" style="width: 100%"
@ -119,6 +126,7 @@ const formModel = reactive({
waybill_code: '', waybill_code: '',
order_id: undefined as number | undefined, order_id: undefined as number | undefined,
order_waybill_code: '', order_waybill_code: '',
weight_unit: 'kg' as 'kg' | 'g',
weighing_weight: undefined as number | undefined weighing_weight: undefined as number | undefined
}) })
@ -128,10 +136,13 @@ function validateWeighingWeight(_rule: unknown, value: unknown, callback: (error
callback(new Error('称重重量须大于 0')) callback(new Error('称重重量须大于 0'))
return return
} }
if (!Number.isInteger(num)) { if (formModel.weight_unit === 'kg') {
callback(new Error('称重重量必须为整数(g)')) const rounded = Number(num.toFixed(3))
if (Math.abs(num - rounded) > 1e-9) {
callback(new Error('kg 单位最多 3 位小数'))
return return
} }
}
callback() callback()
} }
@ -181,12 +192,34 @@ function resetForm() {
formModel.waybill_code = props.initialWaybillCode?.trim() || '' formModel.waybill_code = props.initialWaybillCode?.trim() || ''
formModel.order_id = undefined formModel.order_id = undefined
formModel.order_waybill_code = '' formModel.order_waybill_code = ''
formModel.weight_unit = loadWeightUnit()
formModel.weighing_weight = undefined formModel.weighing_weight = undefined
formRef.value?.clearValidate() formRef.value?.clearValidate()
} }
function loadWeightUnit(): 'kg' | 'g' {
try {
const unit = localStorage.getItem('order_weighing_unit')
return unit === 'g' ? 'g' : 'kg'
} catch {
return 'kg'
}
}
function saveWeightUnit(unit: 'kg' | 'g') {
try {
localStorage.setItem('order_weighing_unit', unit)
} catch {
/* ignore */
}
}
function buildPayload(): UpdateExpressWeighingWeightParams { function buildPayload(): UpdateExpressWeighingWeightParams {
const weighingWeight = Number(formModel.weighing_weight) const rawWeight = Number(formModel.weighing_weight)
const weighingWeight =
formModel.weight_unit === 'g'
? Number((rawWeight / 1000).toFixed(3))
: Number(rawWeight.toFixed(3))
if (formModel.weighing_mode === 'waybill') { if (formModel.weighing_mode === 'waybill') {
return { return {
@ -224,7 +257,7 @@ async function handleSubmit() {
if (!isOrderIndexApiSuccess(res)) { if (!isOrderIndexApiSuccess(res)) {
throw new Error(res?.message || '称重保存失败') throw new Error(res?.message || '称重保存失败')
} }
saveWeightUnit(formModel.weight_unit)
const detail = parseUpdateExpressWeighingWeightResponse(res) const detail = parseUpdateExpressWeighingWeightResponse(res)
ElMessage.success(res?.message || '称重保存成功') ElMessage.success(res?.message || '称重保存成功')
applySuccessResult(payload, detail) applySuccessResult(payload, detail)

View File

@ -9,11 +9,11 @@
<div class="result-title">{{ lastResult.wave_no || lastResult.waybill || '称重结果' }}</div> <div class="result-title">{{ lastResult.wave_no || lastResult.waybill || '称重结果' }}</div>
<div class="result-weights"> <div class="result-weights">
<div class="weight-row"> <div class="weight-row">
<el-tag size="default" :type="weightWarnType" class="weight-tag">{{ lastResult.weighing_weight }} g</el-tag> <el-tag size="default" :type="weightWarnType" class="weight-tag">{{ lastResult.weighing_weight }} kg</el-tag>
<span class="weight-label">称重</span> <span class="weight-label">称重</span>
</div> </div>
<div class="weight-row" v-if="lastResult.total_weight != null"> <div class="weight-row" v-if="lastResult.total_weight != null">
<el-tag size="default" type="info" class="weight-tag">{{ lastResult.total_weight }} g</el-tag> <el-tag size="default" type="info" class="weight-tag">{{ lastResult.total_weight }} kg</el-tag>
<span class="weight-label">系统</span> <span class="weight-label">系统</span>
</div> </div>
</div> </div>
@ -40,7 +40,7 @@
:class="{ 'has-waybill': s.waybill_code }" :class="{ 'has-waybill': s.waybill_code }"
> >
<span class="split-key">{{ s.business_key }}</span> <span class="split-key">{{ s.business_key }}</span>
<span class="split-weight">{{ s.weighing_weight }} g</span> <span class="split-weight">{{ s.weighing_weight }} kg</span>
<span class="split-waybill" v-if="s.waybill_code">{{ s.waybill_code }}</span> <span class="split-waybill" v-if="s.waybill_code">{{ s.waybill_code }}</span>
<span class="split-waybill empty" v-else>待分配</span> <span class="split-waybill empty" v-else>待分配</span>
</div> </div>
@ -88,7 +88,7 @@
@refresh="loadList" @refresh="loadList"
> >
<template #column-weighing_weight="{ row }"> <template #column-weighing_weight="{ row }">
<span v-if="row.weighing_weight != null">{{ row.weighing_weight }} g</span> <span v-if="row.weighing_weight != null">{{ row.weighing_weight }} kg</span>
<span v-else style="color:#c0c4cc">未称重</span> <span v-else style="color:#c0c4cc">未称重</span>
</template> </template>

View File

@ -178,7 +178,7 @@
@closed="resetWeighingForm" @closed="resetWeighingForm"
> >
<el-form ref="weighingFormRef" :model="weighingForm" :rules="weighingRules" label-width="80px" @submit.prevent> <el-form ref="weighingFormRef" :model="weighingForm" :rules="weighingRules" label-width="80px" @submit.prevent>
<el-form-item label="重量(g)" prop="weight"> <el-form-item label="重量" prop="weight">
<el-input-number <el-input-number
ref="weighingInputRef" ref="weighingInputRef"
v-model="weighingForm.weight" v-model="weighingForm.weight"
@ -187,7 +187,7 @@
:precision="3" :precision="3"
:step="0.001" :step="0.001"
style="width: 100%" style="width: 100%"
placeholder="请输入重量(g)" placeholder="请输入重量(kg)"
@keyup.enter.prevent="submitWeighing" @keyup.enter.prevent="submitWeighing"
/> />
</el-form-item> </el-form-item>
@ -1769,7 +1769,7 @@ async function submitWeighing() {
payload.recheck_status, payload.recheck_status,
payload.recheck_time payload.recheck_time
].filter((x) => x != null && String(x) !== '') ].filter((x) => x != null && String(x) !== '')
ElMessage.success(parts.length ? `复核成功:${parts.join(' / ')},称重 ${weight} g` : `复核已记录,称重 ${weight} g`) ElMessage.success(parts.length ? `复核成功:${parts.join(' / ')},称重 ${weight} kg` : `复核已记录,称重 ${weight} kg`)
weighingDialogVisible.value = false weighingDialogVisible.value = false
weighingBeforeConfirm.value = false weighingBeforeConfirm.value = false
await finishConfirmAndAdvance() await finishConfirmAndAdvance()

View File

@ -17,7 +17,7 @@ export const recheckOrderSingleListColumns = [
{ prop: 'recheck_status', label: '复核状态', width: '96' }, { prop: 'recheck_status', label: '复核状态', width: '96' },
{ prop: 'items_count', label: 'SKU数', width: '72', align: 'right' }, { prop: 'items_count', label: 'SKU数', width: '72', align: 'right' },
{ prop: 'items_total', label: '件数', width: '72', align: 'right' }, { prop: 'items_total', label: '件数', width: '72', align: 'right' },
{ prop: 'items_weight', label: '重量(g)', width: '80', align: 'right' }, { prop: 'items_weight', label: '重量', width: '80', align: 'right' },
{ prop: 'pick_time', label: '拣货时间', width: '150' }, { prop: 'pick_time', label: '拣货时间', width: '150' },
{ prop: 'recheck_time', label: '复核时间', width: '150' } { prop: 'recheck_time', label: '复核时间', width: '150' }
] ]

View File

@ -249,7 +249,7 @@ export const fallbackOrderColumns = applyWaveListCopyActions([
{ prop: 'province', label: '省份', minWidth: 100 }, { prop: 'province', label: '省份', minWidth: 100 },
{ prop: 'items_count', label: '商品种数', minWidth: 100 }, { prop: 'items_count', label: '商品种数', minWidth: 100 },
{ prop: 'items_total', label: '商品总数', minWidth: 100 }, { prop: 'items_total', label: '商品总数', minWidth: 100 },
{ prop: 'items_weight', label: '商品重量(g)', minWidth: 110 }, { prop: 'items_weight', label: '商品重量kg', minWidth: 110 },
{ prop: 'item_snapshot', label: '商品快照', minWidth: 260 }, { prop: 'item_snapshot', label: '商品快照', minWidth: 260 },
{ prop: 'wave_scan_result', label: '扫描结果', minWidth: 110 }, { prop: 'wave_scan_result', label: '扫描结果', minWidth: 110 },
{ prop: 'buyer_message', label: '买家留言', minWidth: 180 }, { prop: 'buyer_message', label: '买家留言', minWidth: 180 },

View File

@ -124,7 +124,7 @@
<el-descriptions-item label="商家编码">{{ selectedRow.goods_code || '—' }}</el-descriptions-item> <el-descriptions-item label="商家编码">{{ selectedRow.goods_code || '—' }}</el-descriptions-item>
<el-descriptions-item label="品牌">{{ selectedRow.brand_name || '—' }}</el-descriptions-item> <el-descriptions-item label="品牌">{{ selectedRow.brand_name || '—' }}</el-descriptions-item>
<el-descriptions-item label="库存单位">{{ selectedRow.stock_unit || '—' }}</el-descriptions-item> <el-descriptions-item label="库存单位">{{ selectedRow.stock_unit || '—' }}</el-descriptions-item>
<el-descriptions-item label="毛重">{{ selectedRow.gross_weight != null ? selectedRow.gross_weight + 'g' : '—' }}</el-descriptions-item> <el-descriptions-item label="毛重">{{ selectedRow.gross_weight ?? '—' }}</el-descriptions-item>
<el-descriptions-item label="条码" :span="2"> <el-descriptions-item label="条码" :span="2">
<template v-if="selectedRow.barcodes && selectedRow.barcodes.length"> <template v-if="selectedRow.barcodes && selectedRow.barcodes.length">
<el-tag <el-tag

View File

@ -78,7 +78,7 @@ export const stockColumns = [
}, },
{ {
prop: 'gross_weight', prop: 'gross_weight',
label: '毛重(g)', label: '毛重',
width: '100', width: '100',
formatter: (row: any) => row.gross_weight ? `${formatNumber(row.gross_weight, 0)}g` : '--' formatter: (row: any) => row.gross_weight ? `${formatNumber(row.gross_weight, 0)}g` : '--'
}, },
@ -212,7 +212,7 @@ export const stockColumns = [
}, },
{ {
prop: 'net_weight', prop: 'net_weight',
label: '净重(g)', label: '净重',
width: '100', width: '100',
formatter: (row: any) => row.net_weight ? `${formatNumber(row.net_weight, 0)}g` : '--' formatter: (row: any) => row.net_weight ? `${formatNumber(row.net_weight, 0)}g` : '--'
}, },
@ -507,11 +507,6 @@ export const stockFormRules = {
stock_unit: [{ required: true, message: '库存单位不能为空', trigger: 'change' }], stock_unit: [{ required: true, message: '库存单位不能为空', trigger: 'change' }],
gross_weight: [ gross_weight: [
{ required: true, message: '毛重不能为空', trigger: 'blur' }, { required: true, message: '毛重不能为空', trigger: 'blur' },
{
pattern: /^(0|[1-9]\d*)$/,
message: '毛重必须为非负整数(g)',
trigger: 'blur'
},
{ {
validator: (rule: any, value: any, callback: any) => { validator: (rule: any, value: any, callback: any) => {
if (value < 0) callback(new Error('毛重不能小于0')) if (value < 0) callback(new Error('毛重不能小于0'))

View File

@ -238,7 +238,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"><el-form-item label="毛重/重量(g)"><el-input-number v-model="editForm.weight" :min="0" :precision="0" :controls="false" style="width: 100%" /></el-form-item></el-col> <el-col :span="12"><el-form-item label="毛重/重量"><el-input v-model="editForm.weight" clearable /></el-form-item></el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="SKU"> <el-form-item label="SKU">
@ -265,7 +265,7 @@
<el-col :span="12"><el-form-item label="箱长"><el-input v-model="editForm.box_length" clearable /></el-form-item></el-col> <el-col :span="12"><el-form-item label="箱长"><el-input v-model="editForm.box_length" clearable /></el-form-item></el-col>
<el-col :span="12"><el-form-item label="箱宽"><el-input v-model="editForm.box_width" clearable /></el-form-item></el-col> <el-col :span="12"><el-form-item label="箱宽"><el-input v-model="editForm.box_width" clearable /></el-form-item></el-col>
<el-col :span="12"><el-form-item label="箱高"><el-input v-model="editForm.box_height" clearable /></el-form-item></el-col> <el-col :span="12"><el-form-item label="箱高"><el-input v-model="editForm.box_height" clearable /></el-form-item></el-col>
<el-col :span="12"><el-form-item label="实测箱重(g)"><el-input-number v-model="editForm.box_weight" :min="0" :precision="0" :controls="false" style="width: 100%" /></el-form-item></el-col> <el-col :span="12"><el-form-item label="实测箱重"><el-input v-model="editForm.box_weight" clearable /></el-form-item></el-col>
<el-col :span="24"><el-form-item label="备注"><el-input v-model="editForm.remark" type="textarea" :rows="3" clearable /></el-form-item></el-col> <el-col :span="24"><el-form-item label="备注"><el-input v-model="editForm.remark" type="textarea" :rows="3" clearable /></el-form-item></el-col>
</el-row> </el-row>
@ -337,7 +337,7 @@
{ prop: 'item_name', label: '商品名称', minWidth: '220' }, { prop: 'item_name', label: '商品名称', minWidth: '220' },
{ prop: 'barcodes', label: '条码', width: '180' }, { prop: 'barcodes', label: '条码', width: '180' },
{ prop: 'store_name', label: '货主', width: '180' }, { prop: 'store_name', label: '货主', width: '180' },
{ prop: 'weight', label: '重量(g)', width: '110', align: 'right' } { prop: 'weight', label: '重量', width: '110', align: 'right' }
]" ]"
@selection-change="handleSystemProductSelectionChange" @selection-change="handleSystemProductSelectionChange"
@row-click="handleSystemProductRowClick" @row-click="handleSystemProductRowClick"
@ -2213,18 +2213,6 @@ const submitEditDetail = async () => {
const itemPayload: any = {} const itemPayload: any = {}
// 重量字段必须为整数(g)
for (const wf of ['weight', 'box_weight'] as const) {
const raw = editForm[wf]
if (raw !== '' && raw !== null && raw !== undefined) {
const n = Number(raw)
if (!Number.isInteger(n) || n < 0) {
ElMessage.warning(`${wf === 'weight' ? '毛重/重量' : '实测箱重'}必须为非负整数(g)`)
return
}
}
}
const numberFields = [ const numberFields = [
'actual_quantity', 'actual_quantity',
'box_quantity', 'box_quantity',

View File

@ -1526,7 +1526,7 @@ async function handleExport(mode: 'waybill' | 'item' = 'waybill') {
'实收数量': item.actual_quantity ?? '', '实收数量': item.actual_quantity ?? '',
'箱数': item.box_quantity ?? '', '箱数': item.box_quantity ?? '',
'箱规': item.boxes_per_pallet ?? '', '箱规': item.boxes_per_pallet ?? '',
'重量(g)': item.weight ?? '', '重量': item.weight ?? '',
'批次号': item.batch_number || '', '批次号': item.batch_number || '',
'生产日期': item.production_date || '', '生产日期': item.production_date || '',
'有效期': item.expiry_date || '', '有效期': item.expiry_date || '',

View File

@ -406,7 +406,7 @@ export const productdetail = [
{ prop: 'actual_quantity', label: '实际收货数量', width: '160' }, { prop: 'actual_quantity', label: '实际收货数量', width: '160' },
{ prop: 'box_quantity', label: '箱数', width: '160' }, { prop: 'box_quantity', label: '箱数', width: '160' },
{ prop: 'boxes_per_pallet', label: '箱规', width: '160' }, { prop: 'boxes_per_pallet', label: '箱规', width: '160' },
{ prop: 'weight', label: '重量(g)', width: '160' }, { prop: 'weight', label: '重量', width: '160' },
{ prop: 'pallet_quantity', label: '托盘数', width: '160' }, { prop: 'pallet_quantity', label: '托盘数', width: '160' },
{ prop: 'receiving_time', label: '收货时间', width: '160' }, { prop: 'receiving_time', label: '收货时间', width: '160' },
{ prop: 'receiving_status', label: '收货状态', width: '160' }, { prop: 'receiving_status', label: '收货状态', width: '160' },
@ -445,7 +445,7 @@ export const productquick = [
{ prop: 'actual_quantity', label: '收货数量', width: '100', align: 'right' }, { prop: 'actual_quantity', label: '收货数量', width: '100', align: 'right' },
{ prop: 'box_quantity', label: '箱数', width: '100', align: 'right' }, { prop: 'box_quantity', label: '箱数', width: '100', align: 'right' },
{ prop: 'boxes_per_pallet', label: '箱规', width: '100', align: 'right' }, { prop: 'boxes_per_pallet', label: '箱规', width: '100', align: 'right' },
{ prop: 'weight', label: '重量(g)', width: '100', align: 'right' }, { prop: 'weight', label: '重量', width: '100', align: 'right' },
{ prop: 'batch_number', label: '批次号', width: '120' }, { prop: 'batch_number', label: '批次号', width: '120' },
{ prop: 'production_date', label: '生产日期', width: '120' }, { prop: 'production_date', label: '生产日期', width: '120' },
{ prop: 'expiry_date', label: '到期日期', width: '120' }, { prop: 'expiry_date', label: '到期日期', width: '120' },
@ -495,7 +495,7 @@ export const printFormConfig = [
{ prop: 'barcode', label: '商品条码', type: 'input' }, { prop: 'barcode', label: '商品条码', type: 'input' },
{ prop: 'box_quantity', label: '箱数', type: 'number' }, { prop: 'box_quantity', label: '箱数', type: 'number' },
{ prop: 'boxes_per_pallet', label: '箱规', type: 'number' }, { prop: 'boxes_per_pallet', label: '箱规', type: 'number' },
{ prop: 'weight', label: '重量(g)', type: 'number' }, { prop: 'weight', label: '重量', type: 'number' },
{ prop: 'actual_quantity', label: '实际收货数量', type: 'number' }, { prop: 'actual_quantity', label: '实际收货数量', type: 'number' },
{ prop: 'remark', label: '明细备注', type: 'input' }, { prop: 'remark', label: '明细备注', type: 'input' },
]} ]}

View File

@ -30,6 +30,16 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="承重限制" prop="max_weight">
<el-input-number
v-model="formData.max_weight"
:min="0"
:step="0.1"
style="width: 100%"
placeholder="最大承重(kg)"
/>
</el-form-item>
<el-form-item label="仓位状态" prop="space_status"> <el-form-item label="仓位状态" prop="space_status">
<el-select <el-select
v-model="formData.space_status" v-model="formData.space_status"
@ -94,6 +104,7 @@ const formData = reactive<any>({
space_code: '', space_code: '',
custom_name: '', custom_name: '',
custom_barcode: '', custom_barcode: '',
max_weight: null,
space_status: 'AVAILABLE', space_status: 'AVAILABLE',
is_enabled: 1 is_enabled: 1
}) })
@ -118,6 +129,7 @@ watch(() => props.space, (newSpace) => {
formData.space_code = newSpace.space_code formData.space_code = newSpace.space_code
formData.custom_name = newSpace.custom_name || '' formData.custom_name = newSpace.custom_name || ''
formData.custom_barcode = newSpace.custom_barcode || '' formData.custom_barcode = newSpace.custom_barcode || ''
formData.max_weight = newSpace.max_weight
formData.space_status = newSpace.space_status formData.space_status = newSpace.space_status
formData.is_enabled = newSpace.is_enabled ? 1 : 0 formData.is_enabled = newSpace.is_enabled ? 1 : 0
} }