From 4eb15ae0abd7c46284a626fc9629143631fc8d89 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sun, 1 Sep 2024 22:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=9C=A8details.vue?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=BC=9A=E5=91=98=E4=BB=B7=E6=A0=BC=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=92=8C=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=86=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/store/store_product/details.vue | 140 +++++++++++++--------- 1 file changed, 85 insertions(+), 55 deletions(-) diff --git a/src/views/store/store_product/details.vue b/src/views/store/store_product/details.vue index fc916d45..3dea681a 100644 --- a/src/views/store/store_product/details.vue +++ b/src/views/store/store_product/details.vue @@ -45,6 +45,54 @@ + + 添加会员价格 + + +
+
+ + + + + + + + + + +
+
+ +
+
@@ -133,22 +181,43 @@ - - - - + - + + + + + + + + + + @@ -177,8 +246,9 @@ defineProps({ } }) const emit = defineEmits(['success', 'close']) -const popupRef = shallowRef>() -const mode = ref('add') +const dialogShop = ref(false) +const vipPriceList = ref([]) + const isOpen = ref(false) const activeName = ref('first') const handleClick = (tab: any) => { @@ -203,7 +273,12 @@ const formData = reactive({ rose: '0', manufacturer_information: '' }) - +const handleEdit = () => { + console.log(12) +} +const handleDeletes = () => { + console.log(12) +} // 获取详情 const setFormData = async (data: Record) => { queryParams.product_id = data.id @@ -216,24 +291,6 @@ const setFormData = async (data: Record) => { } } -const cMark = (str: any) => { - if (str) { - return str.replace(/(\d{5,})/g, (match: string) => { - let replacement - // 判断数字长度,执行不同替换逻辑 - if (match.length >= 11) { - // 对于11位以上的连续数字,替换倒数第四到倒数第八位为星号 - replacement = match.slice(0, -8) + '****' + match.slice(-4) - } else { - // 对于5到11位的数字,替换最后四位为星号 - replacement = match.slice(0, -4) + '****' - } - return replacement - }) - } - return '-' -} - const getDetail = async (row: Record) => { queryParams.product_id = row.id const data = await apiStoreProductDetail({ @@ -249,11 +306,6 @@ const open = () => { removeList.clear() } -// 关闭回调 -const handleClose = () => { - emit('close') -} - // 查询条件 const queryParams = reactive({ product_id: '' @@ -297,28 +349,6 @@ const stockList = ref(new Map()) const handleChange = (row: any) => { stockList.value.set(row.id, row.new_stock) } -const submitStock = () => { - feedback - .confirm('确定修改库存吗?') - .then(async () => { - const data = Array.from(stockList.value.entries()).map(([key, value]) => { - return { - id: key, - stock: value - } - }) - apiStoreBranchProductEdit({ - data - }).then((res) => { - isEidtStock.value = false - stockList.value.clear() - getLists() - }) - }) - .catch(() => { - // on cancel - }) -} // 编辑门店价格 const dialogFormVisible = ref(false)