Merge branch 'ymf' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into dwb
This commit is contained in:
@@ -88,7 +88,6 @@ import { computed } from 'vue';
|
|||||||
})
|
})
|
||||||
function computeStyle(){
|
function computeStyle(){
|
||||||
return `
|
return `
|
||||||
height:${props.height}rpx;
|
|
||||||
line-height:${props.height}rpx;
|
line-height:${props.height}rpx;
|
||||||
${props.width>=0?('width:'+props.width+'rpx;'):''}
|
${props.width>=0?('width:'+props.width+'rpx;'):''}
|
||||||
${props.plain?('background-color:transparent;'):''}
|
${props.plain?('background-color:transparent;'):''}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
ref,
|
ref,
|
||||||
watch
|
watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
size: {
|
size: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -51,7 +52,7 @@
|
|||||||
default: 0
|
default: 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emits = defineEmits(['change'])
|
const emits = defineEmits(['change','update:page'])
|
||||||
|
|
||||||
let currentPage = ref(props.page === 0 ? 1 : props.page)
|
let currentPage = ref(props.page === 0 ? 1 : props.page)
|
||||||
|
|
||||||
@@ -81,16 +82,17 @@
|
|||||||
function btnClick(isAdd) {
|
function btnClick(isAdd) {
|
||||||
let newPage = currentPage.value * 1 + (isAdd == 'add' ? 1 : -1)
|
let newPage = currentPage.value * 1 + (isAdd == 'add' ? 1 : -1)
|
||||||
if (newPage <= 0) {
|
if (newPage <= 0) {
|
||||||
return
|
return infoBox.showToast('已经是第一页了')
|
||||||
}
|
}
|
||||||
if (newPage > maxPage.value) {
|
if (newPage > maxPage.value) {
|
||||||
return
|
return infoBox.showToast('没有更多页了')
|
||||||
}
|
}
|
||||||
setCurrentPage(newPage)
|
setCurrentPage(newPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => currentPage.value, (newval) => {
|
watch(() => currentPage.value, (newval) => {
|
||||||
emits('change', newval)
|
emits('change', newval)
|
||||||
|
emits('update:page', newval)
|
||||||
defaultPaageIndex.value = newval - 1
|
defaultPaageIndex.value = newval - 1
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -122,8 +124,8 @@
|
|||||||
|
|
||||||
.prve,.next {
|
.prve,.next {
|
||||||
&.disabled {
|
&.disabled {
|
||||||
background-color: #ccc;
|
// background-color: #ccc;
|
||||||
border-color: #ccc;
|
// border-color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
90
components/my-components/my-step.vue
Normal file
90
components/my-components/my-step.vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="u-flex u-p-b-28 item" :class="{'active':active==index}" v-for="(item,index) in list" :key="index">
|
||||||
|
<view class="left ">
|
||||||
|
<view class="circle"></view>
|
||||||
|
<view class="left-line" :class="{hide:index==list.length-1}"></view>
|
||||||
|
</view>
|
||||||
|
<view class="u-p-l-12 ">
|
||||||
|
<view class="u-font-20">{{item[titleKey]||''}}</view>
|
||||||
|
<view class="u-font-24 u-m-t-2">{{item[contentKey]||''}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
active: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
titleKey: {
|
||||||
|
type: String,
|
||||||
|
default: 'title'
|
||||||
|
},
|
||||||
|
contentKey: {
|
||||||
|
type: String,
|
||||||
|
default: 'content'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$leftWidth: 12rpx;
|
||||||
|
$circleSize: 12rpx;
|
||||||
|
$lineWidth: 2rpx;
|
||||||
|
$circleLeft:0;
|
||||||
|
$lineLeft: calc($circleSize / 2 - $lineWidth / 2 );
|
||||||
|
|
||||||
|
.item {
|
||||||
|
color: #999;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: 100%;
|
||||||
|
width: $leftWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: $my-main-color;
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
background: $my-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-line {
|
||||||
|
background-color: $my-main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
position: absolute;
|
||||||
|
top: 6rpx;
|
||||||
|
left: $circleLeft;
|
||||||
|
width: $circleSize;
|
||||||
|
height: $circleSize;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #999;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-line {
|
||||||
|
left: $lineLeft;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 4rpx;
|
||||||
|
top: calc($circleSize + 10rpx);
|
||||||
|
width: $lineWidth;
|
||||||
|
background-color: #999;
|
||||||
|
border-radius: $lineWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -42,7 +42,6 @@ import { computed, ref, watch } from 'vue';
|
|||||||
let current=ref(props.modelValue||props.defaultIndex||0)
|
let current=ref(props.modelValue||props.defaultIndex||0)
|
||||||
function changeCurrent(index){
|
function changeCurrent(index){
|
||||||
current.value=index
|
current.value=index
|
||||||
emit('update:modelValue',index)
|
|
||||||
}
|
}
|
||||||
const computedBlockStyle=computed(()=>{
|
const computedBlockStyle=computed(()=>{
|
||||||
const oneWidth= 100/props.list.length
|
const oneWidth= 100/props.list.length
|
||||||
@@ -52,8 +51,12 @@ import { computed, ref, watch } from 'vue';
|
|||||||
left:left+'%'
|
left:left+'%'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(()=>current.value,()=>{
|
watch(()=>props.modelValue,(newval)=>{
|
||||||
emit('change',current.value)
|
current.value=newval
|
||||||
|
})
|
||||||
|
watch(()=>current.value,(newval)=>{
|
||||||
|
emit('update:modelValue',newval)
|
||||||
|
emit('change',newval)
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
71
components/my-components/my-up-upload.vue
Normal file
71
components/my-components/my-up-upload.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<up-upload :fileList="images" @afterRead="afterRead" @delete="deletePic" :multiple="multiple"
|
||||||
|
:width="width" :height="height"
|
||||||
|
:maxCount="10"></up-upload>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {$uploadFile} from '@/http/yskApi/file.js'
|
||||||
|
import {
|
||||||
|
ref, watch
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
|
const props=defineProps({
|
||||||
|
modelValue:{
|
||||||
|
type:Array,
|
||||||
|
default:()=>[]
|
||||||
|
},
|
||||||
|
width:{
|
||||||
|
type:[String,Number],
|
||||||
|
default:60
|
||||||
|
},
|
||||||
|
height:{
|
||||||
|
type:[String,Number],
|
||||||
|
default:60
|
||||||
|
},
|
||||||
|
multiple:{
|
||||||
|
type:Boolean,
|
||||||
|
default:true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const emits=defineEmits(['update:modelValue'])
|
||||||
|
const images = ref(props.modelValue)
|
||||||
|
function afterRead(e){
|
||||||
|
for(let i in e.file){
|
||||||
|
const file=e.file[i].file
|
||||||
|
$uploadFile(file).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
images.value.push({
|
||||||
|
url: e.file[i].url,
|
||||||
|
serveUrl: res.data[0]
|
||||||
|
})
|
||||||
|
}).catch(res=>{
|
||||||
|
console.log(res);
|
||||||
|
if(res.errMsg){
|
||||||
|
images.value.splice(i,1)
|
||||||
|
uni.showToast({
|
||||||
|
title:'图片大小超出限制',
|
||||||
|
icon:'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function deletePic(e){
|
||||||
|
const {index}=e
|
||||||
|
images.value.splice(index,1)
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(()=>images.value,(newval)=>{
|
||||||
|
emits('update:modelValue',newval)
|
||||||
|
})
|
||||||
|
watch(()=>props.modelValue,(newval)=>{
|
||||||
|
images.value=newval
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -7,7 +7,18 @@ import {
|
|||||||
} from 'js-base64'
|
} from 'js-base64'
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
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
|
* @returns
|
||||||
@@ -17,12 +28,12 @@ export function getCart(params) {
|
|||||||
url: `/api/place/cart`,
|
url: `/api/place/cart`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...params
|
...params
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已上架商品列表
|
* 已上架商品列表
|
||||||
* @returns
|
* @returns
|
||||||
@@ -32,7 +43,7 @@ export function getGoodsLists(params) {
|
|||||||
url: `/api/place/activate`,
|
url: `/api/place/activate`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...params
|
...params
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -47,7 +58,8 @@ export function addCart(data) {
|
|||||||
url: `/api/place/addCart`,
|
url: `/api/place/addCart`,
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -62,7 +74,8 @@ export function $clearCart(data) {
|
|||||||
url: `/api/place/clearCart`,
|
url: `/api/place/clearCart`,
|
||||||
method: "delete",
|
method: "delete",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -77,7 +90,8 @@ export function $removeCart(data) {
|
|||||||
url: `/api/place/removeCart`,
|
url: `/api/place/removeCart`,
|
||||||
method: "delete",
|
method: "delete",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -91,7 +105,7 @@ export function $updateCart(data) {
|
|||||||
url: `/api/place/updateCart`,
|
url: `/api/place/updateCart`,
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -105,7 +119,7 @@ export function $allPack(data) {
|
|||||||
url: `/api/place/pack`,
|
url: `/api/place/pack`,
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -119,7 +133,8 @@ export function $getMasterId(data) {
|
|||||||
url: `/api/place/masterId`,
|
url: `/api/place/masterId`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -133,7 +148,7 @@ export function $getPayType(data) {
|
|||||||
url: `/api/place/payType`,
|
url: `/api/place/payType`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -147,7 +162,8 @@ export function $createOrder(data) {
|
|||||||
url: `/api/place/order`,
|
url: `/api/place/order`,
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -163,7 +179,8 @@ export function $cacheOrder(data) {
|
|||||||
url: `/api/place/pending`,
|
url: `/api/place/pending`,
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -178,7 +195,8 @@ export function $getCacheOrder(data) {
|
|||||||
url: `/api/place/pending/cart`,
|
url: `/api/place/pending/cart`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -190,7 +208,7 @@ export function $setUser(data) {
|
|||||||
url: `/api/place/updateVip`,
|
url: `/api/place/updateVip`,
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -201,7 +219,7 @@ export function $delOrder(data) {
|
|||||||
url: `/api/place/order`,
|
url: `/api/place/order`,
|
||||||
method: "delete",
|
method: "delete",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -212,19 +230,19 @@ export function $payOrder(data) {
|
|||||||
url: '/api/place/pay',
|
url: '/api/place/pay',
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//退单
|
//退单
|
||||||
|
|
||||||
export function $returnCart(data) {
|
export function $returnCart(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/place/returnCart',
|
url: '/api/place/returnCart',
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -235,7 +253,7 @@ export function $choseTable(data) {
|
|||||||
url: '/api/place/choseTable',
|
url: '/api/place/choseTable',
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -247,7 +265,8 @@ export function $choseCount(data) {
|
|||||||
url: '/api/place/choseCount',
|
url: '/api/place/choseCount',
|
||||||
method: "put",
|
method: "put",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
useType: getUseType(),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -259,7 +278,7 @@ export function $fastCreateTable(data) {
|
|||||||
url: '/api/tbShopTable/generate',
|
url: '/api/tbShopTable/generate',
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -271,7 +290,7 @@ export function $printOrder(data) {
|
|||||||
url: '/api/place/printOrder',
|
url: '/api/place/printOrder',
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -283,9 +302,20 @@ export function $printDishes(data) {
|
|||||||
url: '/api/place/printDishes',
|
url: '/api/place/printDishes',
|
||||||
method: "post",
|
method: "post",
|
||||||
data:{
|
data:{
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 就餐模式切换
|
||||||
|
export function $changeUseType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/place/choseModel',
|
||||||
|
method: "put",
|
||||||
|
data:{
|
||||||
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
232
http/yskApi/consumable.js
Normal file
232
http/yskApi/consumable.js
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -5,7 +5,17 @@ import {
|
|||||||
Base64
|
Base64
|
||||||
} from 'js-base64'
|
} from 'js-base64'
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
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) {
|
export function $tbProduct(data) {
|
||||||
return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
||||||
@@ -92,7 +102,8 @@ export function $getStocktakin(data){
|
|||||||
* 上下架商品
|
* 上下架商品
|
||||||
*/
|
*/
|
||||||
export function $updateGrounding(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
|
||||||
662
http/yskApi/shop.js
Normal file
662
http/yskApi/shop.js
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user