From 1a2731cf2b2f5ffee0a1a6809b4f0106e7cc2b2c Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 17 Jul 2024 14:39:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=EF=BC=8C=E8=B0=83=E6=95=B4=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E3=80=81=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E3=80=81=E5=95=86=E5=93=81=E5=8D=95=E4=BD=8D=E7=AD=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E6=9D=A1?= =?UTF-8?q?=E7=A0=81=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B6=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=89=80=E5=B1=9E=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E8=A1=A8=E5=8D=95=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .../store/store_branch_product/index.vue | 182 ++++-- src/views/store/store_product/edit.vue | 610 ++++++++++-------- src/views/store/store_product/index.vue | 295 ++++++--- src/views/user/indexList.vue | 69 +- 5 files changed, 726 insertions(+), 434 deletions(-) diff --git a/.env.development b/.env.development index 6df9ba570..c41c52b7c 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ NODE_ENV = 'development' VITE_NOW_TYPE = 'dist' # Base API -# VITE_APP_BASE_URL='http://192.168.1.22:8545' -VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn' +VITE_APP_BASE_URL='http://192.168.1.22:8545' +# VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn' # VITE_APP_BASE_URL='https://multi-store.lihaink.cn' diff --git a/src/views/store/store_branch_product/index.vue b/src/views/store/store_branch_product/index.vue index 56bc8fa95..1b8041f24 100644 --- a/src/views/store/store_branch_product/index.vue +++ b/src/views/store/store_branch_product/index.vue @@ -1,24 +1,46 @@ - + - - + + - + - + - + 查询 重置 @@ -48,25 +70,73 @@ - + - + - + + + + - + - + - + - 编辑 + 编辑 @@ -77,7 +147,13 @@ - + @@ -96,7 +172,6 @@ const editRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) - // 查询条件 const queryParams = reactive({ store_id: '', @@ -148,26 +223,28 @@ const handleDelete = async (id: number | any[]) => { getLists() -const storeloading = ref(false); -const storeList = ref([]); -const remoteMethod = (e:string='') => { - storeloading.value = true; +const storeloading = ref(false) +const storeList = ref([]) +const remoteMethod = (e = '') => { + storeloading.value = true apiSystemStoreLists({ name: e, page_size: 50 - }).then(res => { - storeList.value = res.lists; - setTimeout(()=>{ - storeloading.value = false; - },300) - }).catch(err => { - setTimeout(()=>{ - storeloading.value = false; - },300) }) + .then((res) => { + storeList.value = res.lists + setTimeout(() => { + storeloading.value = false + }, 300) + }) + .catch((err) => { + setTimeout(() => { + storeloading.value = false + }, 300) + }) } -const statusChange = (row:any)=>{ +const statusChange = (row: any) => { apiStoreBranchProductUpdate({ id: row.id, store_name: row.store_name, @@ -179,24 +256,23 @@ const statusChange = (row:any)=>{ } const producStatus = ref('0') -const changeProducStatus = (e: any)=>{ - if(e==0) { - queryParams.status = null; - queryParams.stock = null; - }else if(e==1){ - queryParams.status = 1; - queryParams.stock = null; - }else if(e==2){ - queryParams.status = 0; - queryParams.stock = null; - }else if(e==3){ - queryParams.status = null; - queryParams.stock = 10; - }else if(e==4){ - queryParams.status = null; - queryParams.stock = 0; +const changeProducStatus = (e: any) => { + if (e == 0) { + queryParams.status = null + queryParams.stock = null + } else if (e == 1) { + queryParams.status = 1 + queryParams.stock = null + } else if (e == 2) { + queryParams.status = 0 + queryParams.stock = null + } else if (e == 3) { + queryParams.status = null + queryParams.stock = 10 + } else if (e == 4) { + queryParams.status = null + queryParams.stock = 0 } - getLists(); + getLists() } - diff --git a/src/views/store/store_product/edit.vue b/src/views/store/store_product/edit.vue index a87ea760f..c7ab41047 100644 --- a/src/views/store/store_product/edit.vue +++ b/src/views/store/store_product/edit.vue @@ -1,114 +1,213 @@ - {{ mode == "add" ? "添加商品" : "编辑商品" }} + {{ mode == 'add' ? '添加商品' : '编辑商品' }} - - - - - - - - - - - - - - - 普通产品 - 供销系列产品 - 兑换产品 - 赠品 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 支持 - 不支持 - - - - - 全部门店 - 部分门店 - - 可选择将商品同步到哪些门店使用 - - 添加门店 - - - - - - - - - - - - - - {{ row.is_show ? '营业' : '打烊' }} - - - - - - 删除 - - - - - - - 提交 - - + + + 支持 + 不支持 + + + + + 全部门店 + 部分门店 + + 可选择将商品同步到哪些门店使用 + + 添加门店 + + + + + + + + + + + + + + {{ row.is_show ? '营业' : '打烊' }} + + + + + + 删除 + + + + + + + 提交 + + @@ -117,95 +216,92 @@ \ No newline at end of file +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + diff --git a/src/views/store/store_product/index.vue b/src/views/store/store_product/index.vue index 91f1b0827..ced359fce 100644 --- a/src/views/store/store_product/index.vue +++ b/src/views/store/store_product/index.vue @@ -3,11 +3,25 @@ - + - + 查询 @@ -16,24 +30,31 @@ - - - 新增 - + + 新增 - + 删除 - - - 导入商品到门店 - + + 导入商品到门店 @@ -41,48 +62,118 @@ - + - - - - - - - - - - - + + + + + + + + + + + - - 上架 - - - 下架 - + 上架 + 下架 - + - - - 编辑 - + + 编辑 - + 详情 - + 删除 @@ -98,64 +189,60 @@ diff --git a/src/views/user/indexList.vue b/src/views/user/indexList.vue index b6171cd4f..9c2c7c376 100644 --- a/src/views/user/indexList.vue +++ b/src/views/user/indexList.vue @@ -3,16 +3,31 @@ - + - + - + 查询 @@ -31,7 +46,7 @@ 删除 --> - + @@ -44,14 +59,14 @@ - + - + @@ -64,10 +79,20 @@ - + 编辑 - + 详情