From 21b4b9c5b53304d19411e37e31012cea2878a21d Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 18 Sep 2024 09:21:03 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9C=89=E6=97=B6=E5=80=99=E6=96=87=E5=AD=97=E6=9C=AA=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-button.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/components/my-components/my-button.vue b/components/my-components/my-button.vue index b200523..7bb481f 100644 --- a/components/my-components/my-button.vue +++ b/components/my-components/my-button.vue @@ -88,7 +88,6 @@ import { computed } from 'vue'; }) function computeStyle(){ return ` - height:${props.height}rpx; line-height:${props.height}rpx; ${props.width>=0?('width:'+props.width+'rpx;'):''} ${props.plain?('background-color:transparent;'):''} From e97a3df69d79296ab176fb4a82e0572fa0fd808c Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 16:54:23 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dv-model=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9C=AA=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-tabs.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/my-components/my-tabs.vue b/components/my-components/my-tabs.vue index 6f56623..9a5d15d 100644 --- a/components/my-components/my-tabs.vue +++ b/components/my-components/my-tabs.vue @@ -42,7 +42,6 @@ import { computed, ref, watch } from 'vue'; let current=ref(props.modelValue||props.defaultIndex||0) function changeCurrent(index){ current.value=index - emit('update:modelValue',index) } const computedBlockStyle=computed(()=>{ const oneWidth= 100/props.list.length @@ -52,8 +51,12 @@ import { computed, ref, watch } from 'vue'; left:left+'%' } }) - watch(()=>current.value,()=>{ - emit('change',current.value) + watch(()=>props.modelValue,(newval)=>{ + current.value=newval + }) + watch(()=>current.value,(newval)=>{ + emit('update:modelValue',newval) + emit('change',newval) }) From 7f33b3798bc0882b44dd1b5c8d141eb674f8cf13 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 16:58:01 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E6=95=B0?= =?UTF-8?q?=E5=88=B0=E8=BE=BE=E4=B8=B4=E7=95=8C=E5=80=BC=E6=97=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-pagination.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/my-components/my-pagination.vue b/components/my-components/my-pagination.vue index 2b9bab0..74d67eb 100644 --- a/components/my-components/my-pagination.vue +++ b/components/my-components/my-pagination.vue @@ -29,6 +29,7 @@ ref, watch } from 'vue'; + import infoBox from '@/commons/utils/infoBox.js' const props = defineProps({ size: { type: Number, @@ -51,7 +52,7 @@ default: 0 } }) - const emits = defineEmits(['change']) + const emits = defineEmits(['change','update:page']) let currentPage = ref(props.page === 0 ? 1 : props.page) @@ -81,16 +82,17 @@ function btnClick(isAdd) { let newPage = currentPage.value * 1 + (isAdd == 'add' ? 1 : -1) if (newPage <= 0) { - return + return infoBox.showToast('已经是第一页了') } if (newPage > maxPage.value) { - return + return infoBox.showToast('没有更多页了') } setCurrentPage(newPage) } watch(() => currentPage.value, (newval) => { emits('change', newval) + emits('update:page', newval) defaultPaageIndex.value = newval - 1 }) @@ -122,8 +124,8 @@ .prve,.next { &.disabled { - background-color: #ccc; - border-color: #ccc; + // background-color: #ccc; + // border-color: #ccc; } } From 15b08f0aa2d4957f25931470a8a012e6619316b2 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 16:58:45 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E6=9D=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-step.vue | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 components/my-components/my-step.vue diff --git a/components/my-components/my-step.vue b/components/my-components/my-step.vue new file mode 100644 index 0000000..3f381cf --- /dev/null +++ b/components/my-components/my-step.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file From 2309fc46b633a3782f18fac5fcfeb8bd7ea60ed8 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 16:59:29 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0uview-plus=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E5=B0=81=E8=A3=85=E7=9A=84=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E6=AC=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-up-upload.vue | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 components/my-components/my-up-upload.vue diff --git a/components/my-components/my-up-upload.vue b/components/my-components/my-up-upload.vue new file mode 100644 index 0000000..77f8f85 --- /dev/null +++ b/components/my-components/my-up-upload.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file From 422744f162b687feebab7743beaf476e3d95e001 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 17:00:07 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=96=B0=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=EF=BC=8C=E8=80=97?= =?UTF-8?q?=E6=9D=90=E4=B8=8E=E5=95=86=E5=93=81=E7=BB=91=E5=AE=9A=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/yskApi/goods.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/http/yskApi/goods.js b/http/yskApi/goods.js index 8173c50..8f66df3 100644 --- a/http/yskApi/goods.js +++ b/http/yskApi/goods.js @@ -5,7 +5,17 @@ import { Base64 } from 'js-base64' import infoBox from '@/commons/utils/infoBox.js' - +function objectToUrlParams(obj) { + let params = []; + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + let value = obj[key]; + let param = encodeURIComponent(key) + '=' + encodeURIComponent(value); + params.push(param); + } + } + return params.join('&'); +} /* 商品列表 */ export function $tbProduct(data) { return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET') @@ -92,7 +102,8 @@ export function $getStocktakin(data){ * 上下架商品 */ export function $updateGrounding(data){ - return http.req('/api/stock/grounding', {...data,shopId:uni.getStorageSync('shopId')}, 'PUT') + const ajaxData={...data,shopId:uni.getStorageSync('shopId')} + return http.req('/api/stock/grounding'+`?${objectToUrlParams(ajaxData)}`, ajaxData, 'PUT') } @@ -107,3 +118,14 @@ export const $productSpec=new $API('/api/tbProductSpec',http.req) +// v2 api start + +/* 商品列表 V2 */ +export function $tbProductV2(data) { + return http.req('/api/tbProduct/list/v2', {...data,shopId:uni.getStorageSync('shopId')}, 'GET') +} +/* 耗材与商品绑定关系 */ +export function $tbProskuConV2(data) { + return http.req('/api/tbProskuCon/V2', data, 'POST') +} +// v2 api end \ No newline at end of file From c46315055982cbf30f67596cf8ab845d6cfa40ed Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 17:01:14 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=B1=E9=A4=90=E6=A8=A1=E5=BC=8F=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/yskApi/Instead.js | 78 +++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 24 deletions(-) diff --git a/http/yskApi/Instead.js b/http/yskApi/Instead.js index f086402..6ab725f 100644 --- a/http/yskApi/Instead.js +++ b/http/yskApi/Instead.js @@ -7,7 +7,18 @@ import { } from 'js-base64' import infoBox from '@/commons/utils/infoBox.js' -const request=http.request +const request = http.request + + +//就餐形式,默认堂食后付费 +const useType = 'dine-in-after' + +function getUseType() { + const type = uni.getStorageSync("useType") + return type ? type : useType +} + + /** * 获取当前台桌订单信息 * @returns @@ -17,12 +28,12 @@ export function getCart(params) { url: `/api/place/cart`, method: "get", params:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...params } }); } - /** * 已上架商品列表 * @returns @@ -32,7 +43,7 @@ export function getGoodsLists(params) { url: `/api/place/activate`, method: "get", params:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...params } }); @@ -47,7 +58,8 @@ export function addCart(data) { url: `/api/place/addCart`, method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -62,7 +74,8 @@ export function $clearCart(data) { url: `/api/place/clearCart`, method: "delete", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -77,7 +90,8 @@ export function $removeCart(data) { url: `/api/place/removeCart`, method: "delete", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -91,7 +105,7 @@ export function $updateCart(data) { url: `/api/place/updateCart`, method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -105,7 +119,7 @@ export function $allPack(data) { url: `/api/place/pack`, method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -119,7 +133,8 @@ export function $getMasterId(data) { url: `/api/place/masterId`, method: "get", params:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -133,7 +148,7 @@ export function $getPayType(data) { url: `/api/place/payType`, method: "get", params:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -147,7 +162,8 @@ export function $createOrder(data) { url: `/api/place/order`, method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -163,7 +179,8 @@ export function $cacheOrder(data) { url: `/api/place/pending`, method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -178,7 +195,8 @@ export function $getCacheOrder(data) { url: `/api/place/pending/cart`, method: "get", params:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -190,7 +208,7 @@ export function $setUser(data) { url: `/api/place/updateVip`, method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -201,7 +219,7 @@ export function $delOrder(data) { url: `/api/place/order`, method: "delete", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -212,19 +230,19 @@ export function $payOrder(data) { url: '/api/place/pay', method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); } - //退单 + export function $returnCart(data) { return request({ url: '/api/place/returnCart', method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -235,7 +253,7 @@ export function $choseTable(data) { url: '/api/place/choseTable', method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -247,7 +265,8 @@ export function $choseCount(data) { url: '/api/place/choseCount', method: "put", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), + useType: getUseType(), ...data } }); @@ -259,7 +278,7 @@ export function $fastCreateTable(data) { url: '/api/tbShopTable/generate', method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -271,7 +290,7 @@ export function $printOrder(data) { url: '/api/place/printOrder', method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); @@ -283,9 +302,20 @@ export function $printDishes(data) { url: '/api/place/printDishes', method: "post", data:{ - shopId: uni.getStorageSync('shopId'), + shopId: uni.getStorageSync("shopId"), ...data } }); } +// 就餐模式切换 +export function $changeUseType(data) { + return request({ + url: '/api/place/choseModel', + method: "put", + data:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} From 0b64341d50a14260880f1c0f5772d87dcf08b4f7 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 17:01:43 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/yskApi/shop.js | 662 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 662 insertions(+) create mode 100644 http/yskApi/shop.js diff --git a/http/yskApi/shop.js b/http/yskApi/shop.js new file mode 100644 index 0000000..7c88607 --- /dev/null +++ b/http/yskApi/shop.js @@ -0,0 +1,662 @@ +import http from './http.js' +const request=http.request + +/** + * 商品列表 + * @returns + */ +export function tbProduct(params) { + return request({ + url: "/api/tbProduct", + method: "get", + params + }); +} + +/** + * 删除商品 + * @returns + */ +export function tbProductDelete(data) { + return request({ + url: "/api/tbProduct", + method: "delete", + data + }); +} + +/** + * 商品单位列表 + * @returns + */ +export function tbShopUnit(params) { + return request({ + url: "/api/tbShopUnit", + method: "get", + params + }); +} + +/** + * 店铺基本配置 + * @returns + */ +export function tbShopCurrency(shopId) { + return request({ + url: `/api/tbShopCurrency/${shopId}`, + method: "get" + }); +} + +/** + * 修改店铺信息 + * @returns + */ +export function tbShopCurrencyPut(data) { + return request({ + url: `/api/tbShopCurrency`, + method: "put", + data + }); +} + +/** + * 新增单位 + * @returns + */ +export function tbShopUnitPost(data) { + return request({ + url: `/api/tbShopUnit`, + method: "post", + data + }); +} + +/** + * 更改单位 + * @returns + */ +export function tbShopUnitPut(data) { + return request({ + url: `/api/tbShopUnit`, + method: "put", + data + }); +} + +/** + * 删除单位 + * @returns + */ +export function tbShopUnitDelete(data) { + return request({ + url: `/api/tbShopUnit`, + method: "delete", + data + }); +} + +/** + * 店铺基本配置 + * @returns + */ +export function tbShopCurrencyGet(params) { + return request({ + url: `/api/tbShopUnit`, + method: "get", + params:{ + sort:'id', + shopId: uni.getStorageSync("shopId"), + ...params, + } + }); +} + +/** + * 商品分类列表 + * @returns + */ +export function tbShopCategoryGet(params) { + return request({ + url: `/api/tbShopCategory`, + method: "get", + params + }); +} + +/** + * 新增、编辑分类/新增、编辑子分类 + * @returns + */ +export function tbShopCategoryPost(data, method = "post") { + return request({ + url: `/api/tbShopCategory`, + method: method, + data + }); +} + +/** + * 删除商品分类 + * @returns + */ +export function tbShopCategoryDelete(data) { + return request({ + url: `/api/tbShopCategory`, + method: "delete", + data + }); +} + +/** + * 规格增加 + * @returns + */ +export function tbProductSpecPost(data) { + return request({ + url: `/api/tbProductSpec`, + method: "post", + data + }); +} + +/** + * 规格列表 + * @returns + */ +export function tbProductSpecGet(params) { + return request({ + url: `/api/tbProductSpec`, + method: "get", + params + }); +} + +/** + * 规格更改 + * @returns + */ +export function tbProductSpecPut(data) { + return request({ + url: `/api/tbProductSpec`, + method: "put", + data + }); +} + +/** + * 删除规格 + * @returns + */ +export function tbProductSpecDelete(data) { + return request({ + url: `/api/tbProductSpec`, + method: "DELETE", + data + }); +} + +/** + * 新增分组 + * @returns + */ +export function tbProductGroupPost(data) { + return request({ + url: `/api/tbProductGroup`, + method: "post", + data + }); +} + +/** + * 更改分组 + * @returns + */ +export function tbProductGroupPut(data) { + return request({ + url: `/api/tbProductGroup`, + method: "PUT", + data + }); +} + +/** + * 商品分组列表 + * @returns + */ +export function tbProductGroupGet(params) { + return request({ + url: `/api/tbProductGroup`, + method: "get", + params + }); +} + +/** + * 商品列表(根据分组中的商品id) + * @returns + */ +export function productListGet(productGroup) { + return request({ + url: `/api/tbProductGroup/${productGroup}`, + method: "get" + }); +} + +/** + * 删除分组 + * @returns + */ +export function tbProductGroupDelete(data) { + return request({ + url: `/api/tbProductGroup`, + method: "DELETE", + data + }); +} + +/** + * 添加商品 + * @returns + */ +export function tbProductPost(data) { + return request({ + url: `/api/tbProduct`, + method: "post", + data + }); +} + +/** + * 添加商品 + * @returns + */ +export function tbProductPut(data) { + return request({ + url: `/api/tbProduct`, + method: "put", + data + }); +} + +/** + * 商品详情(单个商品) + * product 商品id + * @returns + */ +export function tbProductGetDetail(product) { + return request({ + url: `/api/tbProduct/${product}`, + method: "get" + }); +} + +/** + * 店铺列表 + * @returns + */ +export function tbShopInfo(params) { + return request({ + url: `/api/tbShopInfo`, + method: "get", + params + }); +} + +/** + * 增加激活码 + * @returns + */ +export function tbMerchantRegisterPost(data) { + return request({ + url: `/api/tbMerchantRegister`, + method: "post", + data + }); +} + +/** + * 激活码列表 + * @returns + */ +export function tbMerchantRegisterList(data) { + return request({ + url: `/api/tbMerchantRegister/list`, + method: "post", + data + }); +} + +/** + * 增加/编辑店铺 + * @returns + */ +export function tbShopInfoPost(data, method = "post") { + return request({ + url: `/api/tbShopInfo`, + method: method, + data + }); +} + +/** + * 详情(配置三方支付) + * @returns + */ +export function tbMerchantThirdApply(shopId) { + return request({ + url: `/api/tbMerchantThirdApply/${shopId}`, + method: "get" + }); +} + +/** + * 修改第三方配置 + * @returns + */ +export function tbMerchantThirdApplyPut(data) { + return request({ + url: `/api/tbMerchantThirdApply`, + method: "put", + data + }); +} + +/** + * 设置热销商品 + * @returns + */ +export function tbProductIsHot(params) { + return request({ + url: `/api/tbProduct/isHot`, + method: "get", + params + }); +} + +/** + * 增加/编辑优惠券 + * @returns + */ +export function tbMerchantCoupon(data, method = "post") { + return request({ + url: `/api/tbMerchantCoupon`, + method: method, + data + }); +} + +/** + * 设置热销商品 + * @returns + */ +export function tbMerchantCouponGet(params) { + return request({ + url: `/api/tbMerchantCoupon`, + method: "get", + params + }); +} + +/** + * 设置热销商品 + * @returns + */ +export function geocode(params) { + return request({ + url: `/api/geocode`, + method: "get", + params + }); +} + +/** + * 新增、修改活动 + * @returns + */ +export function modityActivate(data) { + return request({ + url: `/shop/storage/modityActivate`, + method: "post", + data + }); +} + +/** + * 活动列表 + * @returns + */ +export function findActivate(params) { + return request({ + url: `/shop/storage/findActivate`, + method: "get", + params + }); +} +// 获取店铺会员二维码 +export function getwxacode(data) { + return request({ + url: `/shop/storage/getwxacode`, + method: "post", + data + }); +} +/** + * 商家用户列表 + * @returns + */ +export function queryAllShopUser(params) { + return request({ + url: `/api/tbShopUser/queryAllShopUser`, + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...params + } + }); +} +/** + * 查询商家用户概述信息 + * @returns + */ +export function queryAllShopInfo(params) { + return request({ + url: `/api/tbShopUser/summary`, + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...params + } + }); +} + +/** + * 修改商品排序 + * @returns + */ +export function upProSort(data) { + return request({ + url: `/api/tbProduct/upProSort`, + method: "post", + data + }); +} + +/** + * 修改分组排序 + * @returns + */ +export function upGroupSort(data) { + return request({ + url: `/api/tbProductGroup/upGroupSort`, + method: "post", + data + }); +} + +/** + * 修改分类排序 + * @returns + */ +export function upCategorySort(data) { + return request({ + url: `/api/tbShopCategory/upCategorySort`, + method: "post", + data + }); +} + +/** + * 查询店铺充值记录 + * @returns + */ +export function tbShopUserRecharge(params) { + return request({ + url: `/api/tbShopUser/recharge`, + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...params + } + }); +} + +/** + * 导出充值记录 + * @returns + */ +export function downloadTableRecharge(data) { + return request({ + url: `/api/tbShopUser/recharge/download`, + method: "post", + data: { + shopId: uni.getStorageSync("shopId"), + ...data + }, + responseType: "blob" + }); +} + +/** + * 员工列表 + * @returns + */ +export function tbPlussShopStaffGet(params) { + return request({ + url: `/api/tbPlussShopStaff`, + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...params + } + }); +} + +/** + * 角色列表 + * @returns + */ +export function rolesGet() { + return request({ + url: `/api/roles`, + method: "get" + }); +} + +/** + * 增加员工 + * @returns + */ +export function tbPlussShopStaff(data) { + return request({ + url: `/api/tbPlussShopStaff`, + method: data.id ? "put" : "post", + data: { + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} + +/** + * 通过id获取员工信息 + * @returns + */ +export function tbPlussShopStaffDetail(id) { + return request({ + url: `/api/tbPlussShopStaff/${id}`, + method: "get" + }); +} + +/** + * 更改员工状态 + * @returns + */ +export function updateStatus(data) { + return request({ + url: `/api/tbPlussShopStaff/updateStatus`, + method: "put", + data + }); +} + +/** + * 员工删除 + * @returns + */ +export function shopStaffDelete(data) { + return request({ + url: `/api/tbPlussShopStaff`, + method: "delete", + data + }); +} + +//增减余额 +export function midfiyAccount(data) { + return request({ + url: `/api/tbShopUser/midfiyAccount`, + method: "post", + data + }); +} +// 编辑用户 +export function tbShopUseredit(data) { + return request({ + url: `/api/tbShopUser`, + method: "put", + data + }); +} +// 通过活动id获取赠送商品列表 +export function activate(id) { + return request({ + url: `shop/storage/activate/${id}`, + method: "get" + }); +} + +// 通过活动id获取赠送商品列表 +export function queryShopUserFlow(params) { + return request({ + url: `/api/tbShopUser/queryShopUserFlow`, + method: "get", + params + }); +} + +//新增 + +// 查询员工是否拥有权限 +export function $hasPermission(params) { + return request({ + url: '/api/tbShopPermission/hasPermission', + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...params + } + }); +} + From 90e38665244d3529a7e5ed456c1d3fc85e62126f Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 20 Sep 2024 17:02:21 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=80=97=E6=9D=90?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/yskApi/consumable.js | 232 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 http/yskApi/consumable.js diff --git a/http/yskApi/consumable.js b/http/yskApi/consumable.js new file mode 100644 index 0000000..afbb1d8 --- /dev/null +++ b/http/yskApi/consumable.js @@ -0,0 +1,232 @@ +import http from './http.js' +const request = http.request + + +/** + * 查询耗材类型 + * @returns + */ +export function gettbConsType(params) { + return request({ + url: '/api/tbConsType', + method: "get", + params + }); +} + +/** + * 新增耗材类型 + * @returns + */ +export function posttbConsType(data) { + return request({ + url: '/api/tbConsType', + method: "post", + data + }); +} +/** + * 修改耗材类型 + * @returns + */ +export function puttbConsType(data) { + return request({ + url: '/api/tbConsType', + method: "put", + data + }); +} +/** + * 查询耗材信息 + * @returns + */ +export function gettbConsInfo(params) { + // return request({ + // url: '/api/tbConsInfo', + // method: "get", + // params + // }); + return request({ + url: "/api/viewConInfoFlow", + method: "get", + params: { + ...params, + shopId: uni.getStorageSync("shopId"), + } + }); +} + + +/** + * 耗材入库 + * @returns + */ +export function posttbConsInfostockIn(data) { + return request({ + url: '/api/tbConsInfo/stockIn', + method: "post", + data + }); +} +/** + * 修改单位耗材值耗材 + * @returns + */ +export function postapitbConsInfo(data) { + return request({ + url: '/api/tbConsInfo', + method: "put", + data + }); +} +/** + * 新增耗材信息 + * @returns + */ +export function posttbConsInfo(data) { + return request({ + url: '/api/tbConsInfo', + method: "post", + data + }); +} + +/** + * 查询查询耗材规格信息 + * @returns + */ +export function getviewConSku(params) { + return request({ + url: '/api/viewConSku', + method: "get", + params + }); +} +/** + * 查询查询商品规格 + * @returns + */ +export function gettbProductSpec(params) { + return request({ + url: '/api/viewProductSkuShop', + method: "get", + params + }); +} +/** + * 新增商品规格耗材信息 + * @returns + */ +export function posttbProskuCon(data) { + return request({ + url: '/api/tbProskuCon', + method: "post", + data + }); +} +/** + * 新增商品规格耗材信息-修改后 + * @returns + */ +export function posttbProskuCons(data) { + return request({ + url: '/api/tbProskuCon', + method: "post", + data + }); +} +/** + * 修改商品规格耗材信息状态 + * @returns + */ +export function puttbProskuCon(data) { + return request({ + url: '/api/tbProskuCon', + method: "put", + data + }); +} +// 编辑单位耗材值 +// export function puttbProskuCon(data) { +// return request({ +// url: '/api/tbProskuCon', +// method: "put", +// data +// }); +// } +/** + * 删除商品规格耗材信息状态 + * @returns + */ +export function deletetbProskuCon(data) { + return request({ + url: '/api/tbProskuCon', + method: "delete", + data + }); +} +/** + * 查询耗材流水信息 + * @returns + */ +export function gettbConsInfoFlow(params) { + return request({ + url: '/api/tbConsInfoFlow', + method: "get", + params + }); +} +/** + * 分组查询获取耗材流水信息 + */ +export function viewConInfoFlow(data) { + return request({ + url: "/api/viewConInfoFlow", + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} + +/** + * 查询耗材单位列表 + */ +export function queryTbConUnitInfo(data) { + return request({ + url: "/api/tbConUnit/queryTbConUnitInfo", + method: "get", + params: { + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} + +/** + * 新增耗材单位 + */ +export function addtbConUnit(data) { + return request({ + url: '/api/tbConUnit', + method: "post", + data: { + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} +/** + * 修改耗材单位 + */ +export function edittbConUnit(data) { + return request({ + url: '/api/tbConUnit', + method: "put", + data: { + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} \ No newline at end of file