From 42fc1425aa14f4d5835420dd0033e5464d1c7596 Mon Sep 17 00:00:00 2001 From: XingQue Date: Wed, 22 Jul 2026 16:26:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=8F=91=E5=B8=83/=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=B8=8E=E7=B1=BB=E5=9E=8B=E7=AE=A1=E7=90=86=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=9A=90=E8=97=8F=E5=BC=8F=E5=BD=92=E5=B1=9E=E5=95=86?= =?UTF-8?q?=E5=AE=B6=E7=AB=AF=E7=B1=BB=E5=9E=8B=E9=80=89=E6=8B=A9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/views/product/Detail.vue | 27 +++++++++++++++++++++++++-- src/views/product/List.vue | 27 +++++++++++++++++++++++++++ src/views/product/TypeZone.vue | 24 +++++++++++++++++++++--- 3 files changed, 73 insertions(+), 5 deletions(-) diff --git a/src/views/product/Detail.vue b/src/views/product/Detail.vue index ad89424..3bbbfc2 100644 --- a/src/views/product/Detail.vue +++ b/src/views/product/Detail.vue @@ -74,7 +74,23 @@ -
1点单正常 / 2审核专用 / 3商家端 / 4扫管事码后点单可见(抢单池也可见)
+
1点单正常 / 2审核专用 / 3商家端 / 4扫管事码后点单可见
+ + + + + + + + + + +
有归属时,点单写入订单的抢单类型为该商家端类型
@@ -294,6 +310,7 @@ const form = reactive({ tupian_url: '', guize_tupian: '', shenhezhuangtai: 1, + guishu_leixing_id: null, create_time: null, imagePreview: '', newImageFile: null, @@ -372,6 +389,7 @@ const hasChanges = () => { jieshao: form.jieshao, xiadan_xuzhi: form.xiadan_xuzhi, shenhezhuangtai: form.shenhezhuangtai, + guishu_leixing_id: form.guishu_leixing_id || null, tupian_url: form.tupian_url, guize_tupian: form.guize_tupian } @@ -390,6 +408,7 @@ const hasChanges = () => { jieshao: originalForm.jieshao, xiadan_xuzhi: originalForm.xiadan_xuzhi, shenhezhuangtai: originalForm.shenhezhuangtai, + guishu_leixing_id: originalForm.guishu_leixing_id || null, tupian_url: originalForm.tupian_url, guize_tupian: originalForm.guize_tupian } @@ -416,7 +435,8 @@ const enterEditMode = () => { xiadan_xuzhi: product.value.xiadan_xuzhi || '', tupian_url: product.value.tupian_url, guize_tupian: product.value.guize_tupian, - shenhezhuangtai: product.value.shenhezhuangtai + shenhezhuangtai: product.value.shenhezhuangtai, + guishu_leixing_id: product.value.guishu_leixing_id || null }) Object.assign(form, { id: product.value.id, @@ -437,6 +457,7 @@ const enterEditMode = () => { tupian_url: product.value.tupian_url, guize_tupian: product.value.guize_tupian, shenhezhuangtai: product.value.shenhezhuangtai, + guishu_leixing_id: product.value.guishu_leixing_id || null, create_time: product.value.create_time, imagePreview: '', newImageFile: null, @@ -498,6 +519,7 @@ const saveProduct = async () => { formData.append('jieshao', form.jieshao || '') formData.append('xiadan_xuzhi', form.xiadan_xuzhi || '') formData.append('shenhezhuangtai', form.shenhezhuangtai) + formData.append('guishu_leixing_id', form.guishu_leixing_id || '') // 图片处理:如果有新文件,传文件;否则传原有的 url(可能为空,后端自行处理) if (form.newImageFile) { @@ -644,6 +666,7 @@ const fetchProductDetail = async () => { tupian_url: product.value.tupian_url, guize_tupian: product.value.guize_tupian, shenhezhuangtai: product.value.shenhezhuangtai, + guishu_leixing_id: product.value.guishu_leixing_id || null, create_time: product.value.create_time, imagePreview: '', newImageFile: null, diff --git a/src/views/product/List.vue b/src/views/product/List.vue index 9ad01de..cc5c0b0 100644 --- a/src/views/product/List.vue +++ b/src/views/product/List.vue @@ -192,6 +192,25 @@ /> + + + 正常 + 审核专用 + 商家端 + 隐藏式 + + + + + + +
有归属时,点单写入订单的抢单类型为该商家端类型
+
会员 @@ -607,6 +626,8 @@ const addForm = reactive({ ewai_dashou_fencheng: 0, jieshao: '', xiadan_xuzhi: '', + shenhezhuangtai: 1, + guishu_leixing_id: null, imageFile: null, imagePreview: '' }) @@ -616,9 +637,11 @@ const addRules = { kucun: [{ required: true, message: '请输入库存', trigger: 'blur' }], leixing_id: [{ required: true, message: '请选择类型', trigger: 'change' }], zhuanqu_id: [{ required: true, message: '请选择专区', trigger: 'change' }], + shenhezhuangtai: [{ required: true, message: '请选择审核状态', trigger: 'change' }], yaoqiuleixing: [{ required: true, message: '请选择抢单要求类型', trigger: 'change' }], imageFile: [{ required: true, message: '请上传商品图片', trigger: 'change' }] } +const merchantTypeOptions = computed(() => typeList.value.filter(t => Number(t.shenhezhuangtai) === 3)) const zonesFilteredByType = computed(() => { if (!addForm.leixing_id) return [] let zones = zoneList.value.filter(z => z.leixing_id === addForm.leixing_id) @@ -673,6 +696,8 @@ const resetAddForm = () => { ewai_dashou_fencheng: 0, jieshao: '', xiadan_xuzhi: '', + shenhezhuangtai: 1, + guishu_leixing_id: null, imageFile: null, imagePreview: '' }) @@ -703,6 +728,8 @@ const submitAddProduct = async () => { formData.append('yaoqiuleixing', addForm.yaoqiuleixing) formData.append('jieshao', addForm.jieshao || '') formData.append('xiadan_xuzhi', addForm.xiadan_xuzhi || '') + formData.append('shenhezhuangtai', addForm.shenhezhuangtai) + formData.append('guishu_leixing_id', addForm.shenhezhuangtai === 4 ? (addForm.guishu_leixing_id || '') : '') formData.append('fencheng_type', addForm.fencheng_type) if (addForm.yaoqiuleixing === 1) { if (addForm.huiyuan_id) formData.append('huiyuan_id', addForm.huiyuan_id) diff --git a/src/views/product/TypeZone.vue b/src/views/product/TypeZone.vue index db0cd22..34d0872 100644 --- a/src/views/product/TypeZone.vue +++ b/src/views/product/TypeZone.vue @@ -164,6 +164,17 @@ 隐藏式 + + + + +
点单后订单抢单类型会归到所选商家端类型,抢单池按商家端展示
+
开启后该商品类型为吃龙虾专用类型
@@ -337,10 +348,11 @@ const isTypeEdit = ref(false) const originalType = ref({}) const typeForm = reactive({ id: null, jieshao: '', tupian_url: '', yaoqiuleixing: 1, - huiyuan_id: '', yongjin: null, shenhezhuangtai: 1, + huiyuan_id: '', yongjin: null, shenhezhuangtai: 1, guishu_leixing_id: null, is_special_type: false, is_cross_enabled: false, sync_to_products: false, imageFile: null, imagePreview: '' }) +const merchantTypeOptions = computed(() => typeList.value.filter(t => Number(t.shenhezhuangtai) === 3)) const typeRules = { jieshao: [{ required: true, message: '请输入类型名称', trigger: 'blur' }], yaoqiuleixing: [{ required: true, message: '请选择抢单要求类型', trigger: 'change' }], @@ -364,9 +376,10 @@ const editType = (type) => { jieshao: type.jieshao, tupian_url: type.tupian_url, yaoqiuleixing: Number(type.yaoqiuleixing), - huiyuan_id: type.huiyuan_id || '', + huiyuan_id: type.huiyuan_id or '', yongjin: type.yongjin, shenhezhuangtai: Number(type.shenhezhuangtai), + guishu_leixing_id: type.guishu_leixing_id || null, is_special_type: !!type.is_special_type, is_cross_enabled: type.is_cross_enabled, sync_to_products: false, @@ -379,7 +392,7 @@ const editType = (type) => { const resetTypeForm = () => { Object.assign(typeForm, { id: null, jieshao: '', tupian_url: '', yaoqiuleixing: 1, - huiyuan_id: '', yongjin: null, shenhezhuangtai: 1, + huiyuan_id: '', yongjin: null, shenhezhuangtai: 1, guishu_leixing_id: null, is_special_type: false, is_cross_enabled: false, sync_to_products: false, imageFile: null, imagePreview: '' }) @@ -444,6 +457,11 @@ const submitType = async () => { formData.append('shenhezhuangtai', typeForm.shenhezhuangtai) formData.append('is_special_type', typeForm.is_special_type) formData.append('is_cross_enabled', typeForm.is_cross_enabled) + if (typeForm.shenhezhuangtai === 4) { + formData.append('guishu_leixing_id', typeForm.guishu_leixing_id || '') + } else { + formData.append('guishu_leixing_id', '') + } if (typeForm.yaoqiuleixing === 1) { if (typeForm.huiyuan_id) formData.append('huiyuan_id', typeForm.huiyuan_id) } else {