diff --git a/src/views/stock/stock/component/add.vue b/src/views/stock/stock/component/add.vue
index dfaaf238..cdaa87e6 100644
--- a/src/views/stock/stock/component/add.vue
+++ b/src/views/stock/stock/component/add.vue
@@ -213,20 +213,57 @@
-
+
-
-
+
+
+
+
+ 要求合并
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -512,6 +549,13 @@ const handleBoxSpecToggle = (value: any) => {
const prepareSaveData = () => {
const data = { ...formData }
+
+ // 要求合并开启:值提交到打包要求,拣货/复核要求传空字符串;未合并则三项各传各的
+ if (String(data.merge_requirements ?? '').trim().toUpperCase() === 'Y') {
+ data.pick_requirements = ''
+ data.recheck_requirements = ''
+ }
+
if (!data.enable_box_spec) {
data.box_unit = ''
data.quantity_per_box = 0
diff --git a/src/views/stock/stock/component/info.vue b/src/views/stock/stock/component/info.vue
index a0113aa6..eae1e921 100644
--- a/src/views/stock/stock/component/info.vue
+++ b/src/views/stock/stock/component/info.vue
@@ -362,26 +362,81 @@
-
+
-
+
+
+
+
+ 要求合并
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -749,6 +804,12 @@ function toFiniteNumber(v: unknown, fallback = 0): number {
}
function normalizeStockInfoFormNumbers() {
+ // 作业要求:文本字段兜底为空串,合并要求只接受 Y/N(缺省 Y)
+ formData.pick_requirements = formData.pick_requirements ?? ''
+ formData.recheck_requirements = formData.recheck_requirements ?? ''
+ formData.packing_requirements = formData.packing_requirements ?? ''
+ const mergeRaw = String(formData.merge_requirements ?? '').trim().toUpperCase()
+ formData.merge_requirements = mergeRaw === 'N' ? 'N' : 'Y'
formData.tag_price = toFiniteNumber(formData.tag_price, 0)
formData.retail_price = toFiniteNumber(formData.retail_price, 0)
formData.gross_weight = toFiniteNumber(formData.gross_weight, 0)
@@ -872,7 +933,13 @@ async function fetchStockInfo(stockId: number) {
function prepareSaveData() {
const data = { ...formData }
-
+
+ // 要求合并开启:值提交到打包要求,拣货/复核要求传空字符串;未合并则三项各传各的
+ if (String(data.merge_requirements ?? '').trim().toUpperCase() === 'Y') {
+ data.pick_requirements = ''
+ data.recheck_requirements = ''
+ }
+
if (!data.enable_box_spec) {
data.box_unit = ''
data.quantity_per_box = 0
diff --git a/src/views/stock/stock/stock-config.ts b/src/views/stock/stock/stock-config.ts
index efe4e079..cdf55e49 100644
--- a/src/views/stock/stock/stock-config.ts
+++ b/src/views/stock/stock/stock-config.ts
@@ -346,6 +346,20 @@ export const availableFields = [
type: 'boolean',
placeholder: '请选择是否已绑定外部商品'
}),
+ stockScanField('attribute', {
+ value: 'has_requirements',
+ label: '是否有作业要求',
+ type: 'select',
+ placeholder: '请选择作业要求',
+ options: [
+ { value: 'Y', label: '有作业要求' },
+ { value: 'N', label: '无作业要求' },
+ { value: 'pick', label: '拣货要求不为空' },
+ { value: 'recheck', label: '复核要求不为空' },
+ { value: 'packing', label: '打包要求不为空' }
+ ],
+ required: false
+ }),
stockScanField('attribute', {
value: 'level',
label: 'ABC分类',
@@ -383,6 +397,14 @@ export const availableFields = [
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le'],
defaultOperator: 'gt'
}),
+ stockScanField('price', {
+ value: 'gross_weight',
+ label: '毛重',
+ type: 'number',
+ placeholder: '请输入毛重(g)',
+ operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le', 'between'],
+ defaultOperator: 'ge'
+ }),
// ===== 库存信息(合并为一组,对齐波次列表 ScanBox) =====
{ ...scanWorkflowField({
@@ -493,7 +515,11 @@ export const stockDefaultFormData = {
item_name: '',
sku_property: '',
stock_unit: '',
+ // 作业要求:合并要求为 Y/N(Y=表单只填一个「要求」并提交到 packing_requirements,拣货/复核要求传空字符串;N=三项各传各的)
+ pick_requirements: '',
+ recheck_requirements: '',
packing_requirements: '',
+ merge_requirements: 'Y',
length: 0.00,
width: 0.00,
height: 0.00,