From f5171c94984b274604989664d68b9df6dd1febf2 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Tue, 2 Jul 2024 11:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shop.js | 7 + src/components/pay.vue | 12 +- src/components/userList.vue | 7 +- src/layout/myAside.vue | 6 + src/router/index.js | 6 + src/views/saleHome/component/order.vue | 41 ++-- src/views/shop/component/add.vue | 293 ------------------------- src/views/shop/index.vue | 284 ------------------------ src/views/stock/index.vue | 125 +++++++++++ 9 files changed, 181 insertions(+), 600 deletions(-) delete mode 100644 src/views/shop/component/add.vue delete mode 100644 src/views/shop/index.vue create mode 100644 src/views/stock/index.vue diff --git a/src/api/shop.js b/src/api/shop.js index 4dc3b78..41b8c15 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -99,4 +99,11 @@ export function storeStorageInfoListsApi(data) { */ export function storeStorageInfoEditApi(data) { return request.post('/system_store_storage/systemstorestorage/edit', data) +} + +/** + * @description 门店库存列表 + */ +export function storeProductListsApi(data) { + return request.get('/store_product/storeProduct/lists', { params: data }) } \ No newline at end of file diff --git a/src/components/pay.vue b/src/components/pay.vue index 943fcfd..cfd3a5b 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -456,6 +456,7 @@ const handlecodeEnter = () => { if (!uid.value) return ElMessage.error('请先选择用户'); let pay_type = 18; // 采购款支付 if (active.value == 4) pay_type = 19; //礼品券兑换 + if (active.value == 5) pay_type = 3; //余额支付 orderCreateApi({ pay_type: pay_type, is_storage: is_storage, @@ -483,7 +484,7 @@ const aleft = () => { }; const aright = () => { if (!drawer.value || (isFocus.value && input.value.length > 0)) return; - if (active.value != 4) return changeActive(active.value + 1); + if (active.value != 5) return changeActive(active.value + 1); }; onMounted(() => { mitt.on("left", aleft); @@ -513,9 +514,12 @@ onUnmounted(() => {
采购款
-
+
礼品券兑换
+
+ 余额 +
@@ -588,7 +592,7 @@ onUnmounted(() => {
-
+
@@ -617,7 +621,7 @@ onUnmounted(() => { text-align: center; .header { - width: 30rem; + width: 35rem; display: flex; &>div { diff --git a/src/components/userList.vue b/src/components/userList.vue index cbdbd17..d5b083d 100644 --- a/src/components/userList.vue +++ b/src/components/userList.vue @@ -94,7 +94,8 @@ defineExpose({
采购款: {{ item.purchase_funds }}
-
礼品券: {{ item.get_frozen }}
+
礼品券: {{ item.get_frozen?.toFixed(2) || item.get_frozen }}
+
余额: {{ item.now_money }}
@@ -147,7 +148,7 @@ defineExpose({ .item { width: 45%; - height: 6rem; + height: 7rem; border-radius: 0.5rem; cursor: pointer; box-sizing: border-box; @@ -185,7 +186,7 @@ defineExpose({ .bottom { &>div{ - flex: 1; + width: 50%; } } diff --git a/src/layout/myAside.vue b/src/layout/myAside.vue index 3cfbd27..7827f45 100644 --- a/src/layout/myAside.vue +++ b/src/layout/myAside.vue @@ -77,6 +77,12 @@ const list = ref([ ico: "Van", count: 0, }, + { + name: "stock", + title: "商品库存", + ico: "Box", + count: 0, + }, { name: "user", title: "用户", diff --git a/src/router/index.js b/src/router/index.js index 2e3789f..e0afa66 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -53,6 +53,12 @@ const routes = [ meta: { title: '入库登记' }, component: () => import('@/views/putStorage/index.vue'), }, + { + path: '/stock', + name: 'stock', + meta: { title: '入库登记' }, + component: () => import('@/views/stock/index.vue'), + }, { path: '/user', name: 'user', diff --git a/src/views/saleHome/component/order.vue b/src/views/saleHome/component/order.vue index e5868b0..164ee11 100644 --- a/src/views/saleHome/component/order.vue +++ b/src/views/saleHome/component/order.vue @@ -46,7 +46,7 @@ const getList = () => { cartListApi().then((res) => { extend.value = res.data.extend; list.value = res.data.lists || []; - if(!extend.value?.pay_price) userInfo.value.uid = ""; + if (!extend.value?.pay_price) userInfo.value.uid = ""; // if (res.data?.lists?.length > 0) { // list.value = res.data.lists; // allPrice.value = res.data?.lists.reduce((previous, current) => { @@ -114,7 +114,7 @@ const setUser = (row) => { const is_storage = ref(false) -const resetView = ()=>{ +const resetView = () => { is_storage.value = false; getList(); } @@ -156,19 +156,24 @@ onUnmounted(() => {
手机号: {{ userInfo.mobile || userInfo.account }}
- 切换用户 + 切换用户
-
-
+
+
采购款: {{ - userInfo.purchase_funds }}
-
礼品券: {{ userInfo.get_frozen }}
+ userInfo.purchase_funds }}
+
礼品券: {{ userInfo.get_frozen?.toFixed(2) || userInfo.get_frozen + }}
+
余额: {{ userInfo.now_money }}
- 重置 + + 重置 - + +
@@ -234,13 +239,7 @@ onUnmounted(() => {
-->
- +
@@ -292,6 +291,16 @@ onUnmounted(() => { .change-user { font-size: 1rem; } + + .user-money { + display: flex; + flex: 1; + flex-wrap: wrap; + + &>div { + flex-shrink: 0; + } + } } } } diff --git a/src/views/shop/component/add.vue b/src/views/shop/component/add.vue deleted file mode 100644 index 5659e92..0000000 --- a/src/views/shop/component/add.vue +++ /dev/null @@ -1,293 +0,0 @@ - - - - - diff --git a/src/views/shop/index.vue b/src/views/shop/index.vue deleted file mode 100644 index 6205499..0000000 --- a/src/views/shop/index.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/stock/index.vue b/src/views/stock/index.vue new file mode 100644 index 0000000..e2517a3 --- /dev/null +++ b/src/views/stock/index.vue @@ -0,0 +1,125 @@ + + + + +