Merge branch 'test' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into gh
This commit is contained in:
commit
865e1780db
3
App.vue
3
App.vue
|
|
@ -3,10 +3,7 @@
|
||||||
App.vue本身不是页面,这里不能编写视图元素,也就是没有<template>
|
App.vue本身不是页面,这里不能编写视图元素,也就是没有<template>
|
||||||
-->
|
-->
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
|
||||||
import appConfig from '@/config/appConfig.js';
|
|
||||||
import { onLaunch } from '@dcloudio/uni-app';
|
import { onLaunch } from '@dcloudio/uni-app';
|
||||||
import { checkCurrVersion, getExtStoreId } from '@/commons/utils/versionManage.js';
|
|
||||||
|
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
// console.log(uni.getExtConfigSync(),'uni.getExtConfigSync()')
|
// console.log(uni.getExtConfigSync(),'uni.getExtConfigSync()')
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ const $PermissionObj = {
|
||||||
key: 'yun_xu_guan_li_hui_yuan_xin_xi'
|
key: 'yun_xu_guan_li_hui_yuan_xin_xi'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'yun_xu_xiu_gai_hui_yuan_yu_e',
|
key: 'yun_xu_xiu_gai_hui_yuan_yu_e',
|
||||||
key: '允许修改会员余额'
|
text: '允许修改会员余额'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
stock:[
|
stock:[
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,11 @@ const model = {
|
||||||
// 1. 清空app级别缓存。
|
// 1. 清空app级别缓存。
|
||||||
Object.keys(appCache).forEach(k => appCache[k] = null)
|
Object.keys(appCache).forEach(k => appCache[k] = null)
|
||||||
const merchantName=uni.getStorageSync('merchantName')
|
const merchantName=uni.getStorageSync('merchantName')
|
||||||
|
const MerchantId=uni.getStorageSync('MerchantId')
|
||||||
let envName = model.env() // 获取到当前的环境变量
|
let envName = model.env() // 获取到当前的环境变量
|
||||||
uni.clearStorageSync() // 清除所有的缓存信息
|
uni.clearStorageSync() // 清除所有的缓存信息
|
||||||
uni.setStorageSync('merchantName',merchantName)
|
uni.setStorageSync('merchantName',merchantName)
|
||||||
|
uni.setStorageSync('MerchantId',MerchantId)
|
||||||
model.env(envName) // 重置env
|
model.env(envName) // 重置env
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -124,6 +126,48 @@ const model = {
|
||||||
return appCache.useType
|
return appCache.useType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 缓存代客下单商品
|
||||||
|
cacheGoods: (val, isDelete = false) => {
|
||||||
|
if (isDelete) {
|
||||||
|
appCache.cacheGoods = ""
|
||||||
|
return uni.removeStorageSync('cacheGoods')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
// 有值,为放置
|
||||||
|
appCache.cacheGoods = val
|
||||||
|
uni.setStorageSync('cacheGoods', val)
|
||||||
|
} else {
|
||||||
|
// 否则为获取
|
||||||
|
|
||||||
|
if (!appCache.cacheGoods) {
|
||||||
|
//缓存取不到,获取应用本地信息
|
||||||
|
appCache.cacheGoods = uni.getStorageSync('cacheGoods')
|
||||||
|
}
|
||||||
|
return appCache.cacheGoods
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 缓存代客下单商品节点信息缓存
|
||||||
|
cacheGoodsNode: (val, isDelete = false) => {
|
||||||
|
if (isDelete) {
|
||||||
|
appCache.cacheGoodsNode = ""
|
||||||
|
return uni.removeStorageSync('cacheGoodsNode')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
// 有值,为放置
|
||||||
|
appCache.cacheGoodsNode = val
|
||||||
|
uni.setStorageSync('cacheGoodsNode', val)
|
||||||
|
} else {
|
||||||
|
// 否则为获取
|
||||||
|
|
||||||
|
if (!appCache.cacheGoodsNode) {
|
||||||
|
//缓存取不到,获取应用本地信息
|
||||||
|
appCache.cacheGoodsNode = uni.getStorageSync('cacheGoodsNode')
|
||||||
|
}
|
||||||
|
return appCache.cacheGoodsNode
|
||||||
|
}
|
||||||
|
},
|
||||||
// 已经登录的用户记录
|
// 已经登录的用户记录
|
||||||
loggedInUser: (addUserName = null, removeUserName = null) => {
|
loggedInUser: (addUserName = null, removeUserName = null) => {
|
||||||
let key = "loggedInUserList"
|
let key = "loggedInUserList"
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@
|
||||||
<view class="bg-img-view" :style="vdata.bgImgStyle">
|
<view class="bg-img-view" :style="vdata.bgImgStyle">
|
||||||
|
|
||||||
<!-- 背景颜色view -->
|
<!-- 背景颜色view -->
|
||||||
<view class="bg-color-view" :style="vdata.bgColorStyle">
|
<view class="bg-color-view" :style="vdata.bgColorStyle" style="border-radius:0;background-color: #318AFE!important;">
|
||||||
|
<view class="bgbottomStyle">
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 解决定位层级问题 -->
|
<!-- 解决定位层级问题 -->
|
||||||
<view class="bg-main">
|
<view class="bg-main">
|
||||||
|
|
@ -93,7 +95,7 @@ onMounted(() => {
|
||||||
right: 0,
|
right: 0,
|
||||||
height: '550rpx',
|
height: '550rpx',
|
||||||
borderRadius: '0 0 32rpx 32rpx',
|
borderRadius: '0 0 32rpx 32rpx',
|
||||||
background: 'linear-gradient(270deg, rgba(72, 192, 255, 1) 0%, rgba(51, 157, 255, 1) 100%)',
|
// background: 'linear-gradient(270deg, rgba(72, 192, 255, 1) 0%, rgba(51, 157, 255, 1) 100%)',
|
||||||
}
|
}
|
||||||
vdata.bgColorStyle = Object.assign(defStyle, props.bgColorStyle)
|
vdata.bgColorStyle = Object.assign(defStyle, props.bgColorStyle)
|
||||||
}
|
}
|
||||||
|
|
@ -104,4 +106,13 @@ onMounted(() => {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
.bgbottomStyle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -2rpx;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
width: 750rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
background: linear-gradient( 180deg, rgba(195,215,235,0) 0%, #F9F9F9 100%);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,9 @@
|
||||||
import { reactive, ref, computed } from "vue"
|
import { reactive, ref, computed } from "vue"
|
||||||
import go from "@/commons/utils/go.js"
|
import go from "@/commons/utils/go.js"
|
||||||
import ent from '@/commons/utils/ent.js'
|
import ent from '@/commons/utils/ent.js'
|
||||||
|
import {
|
||||||
|
hasPermission
|
||||||
|
} from '@/commons/utils/hasPermission.js';
|
||||||
// 定义组件参数
|
// 定义组件参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
//显示类型: 支持 grid-宫格 list-列表
|
//显示类型: 支持 grid-宫格 list-列表
|
||||||
|
|
@ -59,7 +61,11 @@ const props = defineProps({
|
||||||
})
|
})
|
||||||
|
|
||||||
// 点击事件
|
// 点击事件
|
||||||
function clickFunc(nav) {
|
async function clickFunc(nav) {
|
||||||
|
if(nav.pageUrl=="PAGES_SALES_SUMMARY"){
|
||||||
|
let res =await hasPermission('允许查看经营数据')
|
||||||
|
if(!res) return
|
||||||
|
}
|
||||||
// 包含回调事件
|
// 包含回调事件
|
||||||
if (nav.clickFunc) {
|
if (nav.clickFunc) {
|
||||||
return nav.clickFunc(nav)
|
return nav.clickFunc(nav)
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,15 @@ export function getCart(params) {
|
||||||
* 已上架商品列表
|
* 已上架商品列表
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getGoodsLists(params) {
|
export function getGoodsLists(params,showLoading=true) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/place/activate`,
|
url: `/api/place/activate`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:{
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...params
|
...params
|
||||||
}
|
},
|
||||||
|
showLoading
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
import http from './http.js'
|
||||||
|
const request = http.request
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品报损
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function get(params) {
|
||||||
|
return request({
|
||||||
|
url: `/freeDine`,
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
...params
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材报损
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: `/freeDine`,
|
||||||
|
method: 'put',
|
||||||
|
params: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -16,12 +16,16 @@ import {
|
||||||
import infoBox from "@/commons/utils/infoBox.js"
|
import infoBox from "@/commons/utils/infoBox.js"
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
// 测试服
|
// 测试服
|
||||||
let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||||
// let baseUrl = 'http://192.168.1.15:8000'
|
|
||||||
|
//预发布
|
||||||
|
let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||||
|
|
||||||
// 王伟本地测
|
// 王伟本地测
|
||||||
// let baseUrl = '/ww'
|
// let baseUrl = '/ww'
|
||||||
// let baseUrl = 'http://192.168.1.15:8000'
|
// let baseUrl = 'http://192.168.1.15:8000'
|
||||||
|
// 巩
|
||||||
|
// let baseUrl = 'http://192.168.1.9:8000'
|
||||||
// 多少 ms 以内, 不提示loading
|
// 多少 ms 以内, 不提示loading
|
||||||
const loadingShowTime = 200
|
const loadingShowTime = 200
|
||||||
|
|
||||||
|
|
@ -127,6 +131,12 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||||
go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// if(res.status==400){
|
||||||
|
// storageManage.token(null, true)
|
||||||
|
// infoBox.showErrorToast('').then(() => {
|
||||||
|
// go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
if(res.status==500){
|
if(res.status==500){
|
||||||
storageManage.token(null, true)
|
storageManage.token(null, true)
|
||||||
infoBox.showErrorToast('请登录').then(() => {
|
infoBox.showErrorToast('请登录').then(() => {
|
||||||
|
|
@ -180,7 +190,6 @@ function request(args) {
|
||||||
} = args
|
} = args
|
||||||
let headerObject = {}
|
let headerObject = {}
|
||||||
// headerObject[appConfig.tokenKey] = storageManage.token()
|
// headerObject[appConfig.tokenKey] = storageManage.token()
|
||||||
|
|
||||||
return commonsProcess(showLoading, () => {
|
return commonsProcess(showLoading, () => {
|
||||||
return uni.request(
|
return uni.request(
|
||||||
Object.assign({
|
Object.assign({
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import http from './http.js'
|
||||||
|
const request=http.request
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订阅二维码
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getSubQrCode(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/msg/subQrCode`,
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,13 @@ export function summaryTrade(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function tbConsInfoFlowcount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/tbConsInfoFlow/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 供应商列表
|
// 供应商列表
|
||||||
export function tbShopPurveyorTransact(params) {
|
export function tbShopPurveyorTransact(params) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -196,7 +203,34 @@ export function callTabletakeNumber(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 增减余额
|
||||||
|
export function midfiyAccount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/tbShopUser/midfiyAccount',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增会员
|
||||||
|
export function member(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/member',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改会员
|
||||||
|
export function tbShopUser(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/tbShopUser`,
|
||||||
|
method: "put",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
export function callTablecallRecord(params) {
|
export function callTablecallRecord(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/callTable/callRecord',
|
url: '/callTable/callRecord',
|
||||||
|
|
@ -220,10 +254,11 @@ export function callTablecall(data) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 获取员工列表
|
// 获取员工列表
|
||||||
export function rolesGet() {
|
export function rolesGet(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/tbPlussShopStaff`,
|
url: `/api/tbPlussShopStaff`,
|
||||||
method: "get"
|
method: "get",
|
||||||
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 删除员工
|
// 删除员工
|
||||||
|
|
@ -249,6 +284,12 @@ export function getroles() {
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
export function tbConsTypes() {
|
||||||
|
return request({
|
||||||
|
url: `/api/tbConsType`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
}
|
||||||
export function tbPlussShopStaff(data) {
|
export function tbPlussShopStaff(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/tbPlussShopStaff`,
|
url: `/api/tbPlussShopStaff`,
|
||||||
|
|
@ -264,3 +305,11 @@ export function viewConInfoFlowget(data) {
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 耗材记录
|
||||||
|
export function tbConsInfoFlowstock(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/tbConsInfoFlow/stock`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
// 桌台管理
|
// 桌台管理
|
||||||
import http from './http.js'
|
import http from './http.js'
|
||||||
|
const request=http.request
|
||||||
import $API from '@/http/classApi.js'
|
import $API from '@/http/classApi.js'
|
||||||
import appConfig from '@/config/appConfig.js'
|
import appConfig from '@/config/appConfig.js'
|
||||||
import {
|
import {
|
||||||
|
|
@ -11,4 +12,15 @@ import infoBox from '@/commons/utils/infoBox.js'
|
||||||
export const $tableArea=new $API('/api/tbShopArea',http.req)
|
export const $tableArea=new $API('/api/tbShopArea',http.req)
|
||||||
/* 台桌 */
|
/* 台桌 */
|
||||||
export const $table=new $API('/api/tbShopTable',http.req)
|
export const $table=new $API('/api/tbShopTable',http.req)
|
||||||
|
/* 绑定 */
|
||||||
|
// export const $bind=new $API('/api/tbShopTable/bind',http.req)
|
||||||
|
export function $bind(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/tbShopTable/bind",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "银收客",
|
"name" : "银收客",
|
||||||
"appid" : "__UNI__66E7BD0",
|
"appid" : "__UNI__02A31D8",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : 100,
|
"versionCode" : 100,
|
||||||
|
|
@ -150,12 +150,12 @@
|
||||||
"unipush" : {
|
"unipush" : {
|
||||||
"enable" : true
|
"enable" : true
|
||||||
},
|
},
|
||||||
"plugins" : {
|
// "plugins" : {
|
||||||
"WechatSI" : {
|
// "WechatSI" : {
|
||||||
"version" : "0.3.5",
|
// "version" : "0.3.5",
|
||||||
"provider" : "wx069ba97219f66d99"
|
// "provider" : "wx069ba97219f66d99"
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
"requiredBackgroundModes" : [ "audio", "location" ],
|
"requiredBackgroundModes" : [ "audio", "location" ],
|
||||||
"__usePrivacyCheck__" : true,
|
"__usePrivacyCheck__" : true,
|
||||||
"libVersion" : "latest"
|
"libVersion" : "latest"
|
||||||
|
|
@ -213,6 +213,15 @@
|
||||||
"/ysk" : ""
|
"/ysk" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/yufabu" : {
|
||||||
|
// 需要被代理的后台地址
|
||||||
|
"target" : "https://pre-cashier.sxczgkj.cn",
|
||||||
|
"changeOrigin" : true,
|
||||||
|
"secure" : false,
|
||||||
|
"pathRewrite" : {
|
||||||
|
"/yufabu" : ""
|
||||||
|
}
|
||||||
|
},
|
||||||
"/ww" : {
|
"/ww" : {
|
||||||
// 需要被代理的后台地址
|
// 需要被代理的后台地址
|
||||||
"target" : "http://192.168.1.15:8000",
|
"target" : "http://192.168.1.15:8000",
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,169 @@
|
||||||
|
<template>
|
||||||
|
<view class="boxconstant">
|
||||||
|
<view class="boxconstantbox"
|
||||||
|
style="border-radius: 18px 18px 0 0;padding:32rpx 24rpx 0 24rpx;border-bottom: 2rpx solid #E5E5E5;">
|
||||||
|
<view class="boxconstantbox_one">
|
||||||
|
充值设置
|
||||||
|
</view>
|
||||||
|
<view class="boxconstantbox_tow">
|
||||||
|
<text>用户消费结账时,成功充值成功</text>
|
||||||
|
<input class="text" v-model="form.rechargeTimes"></input>
|
||||||
|
<text>倍的金额本单即可享受免单</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="boxconstantbox" style="padding:32rpx 24rpx 0 24rpx; border-radius: 0 0 18px 18px;">
|
||||||
|
<view class="boxconstantbox_one">
|
||||||
|
充值门槛
|
||||||
|
</view>
|
||||||
|
<view class="boxconstantbox_tow">
|
||||||
|
<text>订单支付金额需满</text>
|
||||||
|
<input class="text" v-model="form.rechargeThreshold"></input>
|
||||||
|
<text> 元,才能使用</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="oneboxconstant">
|
||||||
|
<view class="oneboxconstant_one">
|
||||||
|
功能启用
|
||||||
|
</view>
|
||||||
|
<up-switch v-model="form.enable" size="18"></up-switch>
|
||||||
|
</view>
|
||||||
|
<view class="boxconstantbox"
|
||||||
|
style="margin-top:24rpx; padding:32rpx 24rpx 0 24rpx; border-radius: 0 0 18px 18px;">
|
||||||
|
<view class="boxconstantbox_one">
|
||||||
|
充值说明
|
||||||
|
</view>
|
||||||
|
<view class="boxconstantbox_tow">
|
||||||
|
<up-textarea v-model="form.rechargeDesc" placeholder="请输入内容"></up-textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="save" @click="editlist">
|
||||||
|
保存
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
watch
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
|
import {
|
||||||
|
get,
|
||||||
|
edit
|
||||||
|
} from '@/http/yskApi/bwc.js'
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
id: '',
|
||||||
|
enable: '',
|
||||||
|
rechargeTimes: '',
|
||||||
|
rechargeThreshold: '',
|
||||||
|
withCoupon: '',
|
||||||
|
withPoints: '',
|
||||||
|
rechargeDesc: '',
|
||||||
|
useTypeList: [],
|
||||||
|
childShopIdList: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const getlist = async () => {
|
||||||
|
let res = await get()
|
||||||
|
console.log(res)
|
||||||
|
Object.assign(form, res)
|
||||||
|
}
|
||||||
|
const editlist = async () => {
|
||||||
|
let res = await edit(form)
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功'
|
||||||
|
})
|
||||||
|
Object.assign(form, res)
|
||||||
|
}
|
||||||
|
onShow(() => {
|
||||||
|
getlist()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background: #F9F9F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxconstant {
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
|
||||||
|
.boxconstantbox {
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
width: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
|
||||||
|
.boxconstantbox_one {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxconstantbox_tow {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin: 0 12rpx;
|
||||||
|
width: 118rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
border: 2rpx solid #E5E5E5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.oneboxconstant {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
|
||||||
|
.oneboxconstant_one {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.save {
|
||||||
|
margin: 100rpx auto 50rpx auto;
|
||||||
|
width: 530rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #318AFE;
|
||||||
|
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -207,14 +207,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<uni-forms-item label="分类名称" required name="name">
|
<uni-forms-item label="分类名称" required name="name">
|
||||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput padding-none :placeholderStyle="placeholderStyle"
|
||||||
v-model="categoryChild.name" placeholder="输入分类名称" />
|
:inputBorder="inputBorder" v-model="categoryChild.name" placeholder="输入分类名称" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="option.type==='edit'">
|
<template v-if="option.type==='edit'">
|
||||||
<uni-forms-item label="排序" required name="sort">
|
<uni-forms-item label="排序" required name="sort">
|
||||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput padding-none :placeholderStyle="placeholderStyle"
|
||||||
v-model="categoryChild.sort" type="number" placeholder="排序越小越靠前" />
|
:inputBorder="inputBorder" v-model="categoryChild.sort" type="number"
|
||||||
|
placeholder="排序越小越靠前" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</template>
|
</template>
|
||||||
<uni-forms-item label="">
|
<uni-forms-item label="">
|
||||||
|
|
@ -241,9 +242,11 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</my-model>
|
</my-model>
|
||||||
|
|
||||||
|
<up-modal title="提示" content="确认删除该分类吗?" :show="modal.del" showCancelButton closeOnClickOverlay
|
||||||
|
@confirm="confirmModelConfirm" @cancel="setModalShow('del',false)" @close="setModalShow('del',false)"
|
||||||
|
width="300px"></up-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -269,7 +272,28 @@
|
||||||
onBeforeMount,
|
onBeforeMount,
|
||||||
watch
|
watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
const modal = reactive({
|
||||||
|
key: '',
|
||||||
|
del: false
|
||||||
|
})
|
||||||
|
|
||||||
|
function confirmModelConfirm() {
|
||||||
|
if (modal.key == 'del') {
|
||||||
|
$productCategory.del([selItem.data.id]).then(res => {
|
||||||
|
category.childrenList.splice(selItem.index, 1)
|
||||||
|
infoBox.showToast('删除成功')
|
||||||
|
uni.setStorageSync('cateItem', category)
|
||||||
|
})
|
||||||
|
modal.del=false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setModalShow(key = 'show', show = true) {
|
||||||
|
modal.key = key
|
||||||
|
modal[key] = show
|
||||||
|
console.log(modal);
|
||||||
|
}
|
||||||
|
|
||||||
const refAddChilCate = ref(null)
|
const refAddChilCate = ref(null)
|
||||||
const refAddChilCateTitle = ref('添加子分类')
|
const refAddChilCateTitle = ref('添加子分类')
|
||||||
|
|
@ -339,19 +363,21 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
return uni.showModal({
|
setModalShow('del', true)
|
||||||
title: '提示',
|
return
|
||||||
content: '确认删除该分类吗?',
|
// return uni.showModal({
|
||||||
success(res) {
|
// title: '提示',
|
||||||
if (res.confirm) {
|
// content: '确认删除该分类吗?',
|
||||||
$productCategory.del([selItem.data.id]).then(res => {
|
// success(res) {
|
||||||
category.childrenList.splice(selItem.index, 1)
|
// if (res.confirm) {
|
||||||
infoBox.showToast('删除成功')
|
// $productCategory.del([selItem.data.id]).then(res => {
|
||||||
uni.setStorageSync('cateItem', category)
|
// category.childrenList.splice(selItem.index, 1)
|
||||||
})
|
// infoBox.showToast('删除成功')
|
||||||
}
|
// uni.setStorageSync('cateItem', category)
|
||||||
}
|
// })
|
||||||
})
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -676,13 +702,16 @@
|
||||||
$icon-line-width: 20rpx;
|
$icon-line-width: 20rpx;
|
||||||
$icon-line-height: 4rpx;
|
$icon-line-height: 4rpx;
|
||||||
@import '@/commons/style/reset-uni-form.scss';
|
@import '@/commons/style/reset-uni-form.scss';
|
||||||
|
|
||||||
::v-deep .uni-forms-item--border {
|
::v-deep .uni-forms-item--border {
|
||||||
padding-top: 24rpx;
|
padding-top: 24rpx;
|
||||||
padding-bottom: 24rpx;
|
padding-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label {
|
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label {
|
||||||
padding-bottom: 16rpx;
|
padding-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-icon {
|
.category-icon {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
|
|
@ -697,9 +726,11 @@
|
||||||
.my-switch {
|
.my-switch {
|
||||||
transform: scale(0.7);
|
transform: scale(0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-forms-item__content {
|
::v-deep .uni-forms-item__content {
|
||||||
min-height: inherit;
|
min-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .uni-forms-item__error {
|
::v-deep .uni-forms-item__error {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
耗材价格
|
耗材价格
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入耗材价格" v-model="datas.form.price" name="" id="">
|
<input placeholder="请输入耗材价格" type="number" v-model="datas.form.price" name="" id="">
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -59,13 +59,16 @@
|
||||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||||
text="保存"></up-button>
|
text="保存"></up-button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
computed,
|
computed,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
tbConsTypeList,
|
tbConsTypeList,
|
||||||
|
|
@ -107,13 +110,29 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const refs = getCurrentInstance()
|
||||||
let sumbit = () => {
|
let sumbit = () => {
|
||||||
|
if (!datas.form.conUnit) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "单位不能为空"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!datas.form.price) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "价格不能为空"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
tbConsInfoAddlist([{
|
tbConsInfoAddlist([{
|
||||||
...datas.form,
|
...datas.form,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
conTypeId: datas.list[datas.nowStatusIndex].id
|
conTypeId: datas.list[datas.nowStatusIndex].id
|
||||||
}]).then(res => {
|
}]).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
// go.to('PAGES_SALES_CONSUMABLES')
|
||||||
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const statusHeight = computed(() => {
|
const statusHeight = computed(() => {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
是否启用
|
是否启用
|
||||||
<up-switch checked="true" activeValue="1" inactiveValue="0" @change="switchChangeEvent($event,item)"
|
<up-switch checked="true" :activeValue="1" :inactiveValue="0" @change="switchChangeEvent($event,item)"
|
||||||
:modelValue="item.status" style="transform:scale(0.7)" />
|
:modelValue="item.status" style="transform:scale(0.7)" />
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -126,13 +126,13 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
|
|
@ -86,7 +86,7 @@
|
||||||
})
|
})
|
||||||
let show = ref(props.show)
|
let show = ref(props.show)
|
||||||
let type = ref(props.type)
|
let type = ref(props.type)
|
||||||
let itemData = ref(props.item)
|
let consId = ref()
|
||||||
watch(() => props.show, (newval) => {
|
watch(() => props.show, (newval) => {
|
||||||
show.value = newval
|
show.value = newval
|
||||||
})
|
})
|
||||||
|
|
@ -104,7 +104,10 @@
|
||||||
/**
|
/**
|
||||||
* 打开报损弹窗
|
* 打开报损弹窗
|
||||||
*/
|
*/
|
||||||
function open() {
|
function open(d) {
|
||||||
|
if(d){
|
||||||
|
consId.value = d
|
||||||
|
}
|
||||||
show.value = true;
|
show.value = true;
|
||||||
emits('open')
|
emits('open')
|
||||||
}
|
}
|
||||||
|
|
@ -179,9 +182,10 @@
|
||||||
* 确认
|
* 确认
|
||||||
*/
|
*/
|
||||||
function affirm() {
|
function affirm() {
|
||||||
|
console.log(consId.value,'调试1')
|
||||||
let params = {
|
let params = {
|
||||||
coverImg: vdata.imgUrlList,
|
coverImg: vdata.imgUrlList,
|
||||||
consId: itemData.value.consId,
|
consId: consId.value,
|
||||||
amount: vdata.stockNumber,
|
amount: vdata.stockNumber,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,9 @@
|
||||||
...datas.form,
|
...datas.form,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
conTypeId: datas.list[datas.nowStatusIndex].id,
|
conTypeId: datas.list[datas.nowStatusIndex].id,
|
||||||
id: datas.form.consId
|
id: datas.form.id
|
||||||
}]).then(res => {
|
}]).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const statusHeight = computed(() => {
|
const statusHeight = computed(() => {
|
||||||
|
|
@ -126,11 +126,13 @@
|
||||||
datas.showStatus = false
|
datas.showStatus = false
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="ConsumablesTop">
|
<view class="ConsumablesTop">
|
||||||
<view @tap="showStatus = !showStatus">
|
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||||
{{datas.title}}
|
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<view :style="{height: '14px'}"></view>
|
<view :style="{height: '14px'}"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<ul class="ConsumablesConent">
|
<ul class="ConsumablesConent" v-if="datas.list.length">
|
||||||
<li v-for="(item,index) in datas.list" :key="index">
|
<li v-for="(item,index) in datas.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
{{item.conName}}
|
{{item.conName}}
|
||||||
|
|
@ -49,12 +49,18 @@
|
||||||
所属商品: {{ filtersSproductId(item.productId)}}
|
所属商品: {{ filtersSproductId(item.productId)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<up-button type="primary" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true" text="查看记录"></up-button>
|
<up-button type="primary" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
||||||
|
:plain="true" text="查看记录"></up-button>
|
||||||
<up-button type="primary" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
<up-button type="primary" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
|
<li style="background-color: rgba(0,0,0,0); height: 200rpx;"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<view v-else style="text-align: center;">
|
||||||
|
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||||
|
<view style="font-size: 28rpx;color: #999;">暂无数据</view>
|
||||||
|
</view>
|
||||||
<view class="ConsumablesBottom">
|
<view class="ConsumablesBottom">
|
||||||
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')">
|
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')">
|
||||||
新增耗材
|
新增耗材
|
||||||
|
|
@ -74,10 +80,15 @@
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted,
|
|
||||||
computed
|
computed
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
|
import {
|
||||||
|
hasPermission
|
||||||
|
} from '@/commons/utils/hasPermission.js';
|
||||||
import {
|
import {
|
||||||
viewConInfoFlowget,
|
viewConInfoFlowget,
|
||||||
tbConsType,
|
tbConsType,
|
||||||
|
|
@ -115,7 +126,7 @@
|
||||||
})
|
})
|
||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
let nowStatusIndex = ref(0)
|
let nowStatusIndex = ref(0)
|
||||||
onMounted(() => {
|
onShow(() => {
|
||||||
getList()
|
getList()
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
gettbConsTypeList()
|
gettbConsTypeList()
|
||||||
|
|
@ -156,38 +167,59 @@
|
||||||
|
|
||||||
let toggle = (d) => {
|
let toggle = (d) => {
|
||||||
refMoreSheet.value.open()
|
refMoreSheet.value.open()
|
||||||
actionSheet.activeId = d.consId
|
actionSheet.activeId = d.id
|
||||||
report.data.consId = d.consId
|
report.data.consId = d.id
|
||||||
actionSheet.active = d
|
actionSheet.active = d
|
||||||
}
|
}
|
||||||
|
|
||||||
let sheetClick = (index) => {
|
let sheetClick = (index) => {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
|
// 权限
|
||||||
|
hasPermission('允许提交报损').then(ele => {
|
||||||
|
if (ele) {
|
||||||
//打开报损弹窗
|
//打开报损弹窗
|
||||||
reportDamage.value.open();
|
reportDamage.value.open(actionSheet.activeId);
|
||||||
report.data.name = actionSheet.active.conName
|
report.data.name = actionSheet.active.conName
|
||||||
report.data.unit = actionSheet.active.conUnit
|
report.data.unit = actionSheet.active.conUnit
|
||||||
|
}
|
||||||
|
})
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
toUrl('PAGES_EDIT_CONSUMABLES', {
|
toUrl('PAGES_EDIT_CONSUMABLES', {
|
||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
})
|
})
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
|
hasPermission('允许耗材盘点').then(ele => {
|
||||||
|
if (ele) {
|
||||||
toUrl('PAGES_SALES_INVENTORYCHECK', {
|
toUrl('PAGES_SALES_INVENTORYCHECK', {
|
||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
} else if (index == 3) {
|
} else if (index == 3) {
|
||||||
|
hasPermission('允许耗材入库').then(ele => {
|
||||||
|
if (ele) {
|
||||||
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
||||||
consId: actionSheet.activeId,
|
consId: actionSheet.activeId,
|
||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
} else if (index == 4) {
|
} else if (index == 4) {
|
||||||
|
hasPermission('允许耗材出库').then(ele => {
|
||||||
|
if (ele) {
|
||||||
toUrl('PAGES_SALES_OUTBOUND', {
|
toUrl('PAGES_SALES_OUTBOUND', {
|
||||||
consId: actionSheet.activeId,
|
consId: actionSheet.activeId,
|
||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// async function viewpermission(d) {
|
||||||
|
// let res = await hasPermission(d)
|
||||||
|
// console.log(res,'调试1')
|
||||||
|
// return res
|
||||||
|
// }
|
||||||
async function getList(d = "") {
|
async function getList(d = "") {
|
||||||
viewConInfoFlowget({
|
viewConInfoFlowget({
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
|
@ -201,7 +233,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function inputEvent(d) {
|
function inputEvent(d) {
|
||||||
datas.conName = d.detail.value
|
datas.conName = d.detail.value.replace(/\s*/g,"");
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,7 +328,8 @@
|
||||||
.df;
|
.df;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
width: 90rpx;
|
// width: 90rpx;
|
||||||
|
padding: 2rpx 10rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
background: #EBF4FC;
|
background: #EBF4FC;
|
||||||
|
|
|
||||||
|
|
@ -97,10 +97,11 @@
|
||||||
function toggle() {
|
function toggle() {
|
||||||
tbConsInfotbConCheck({
|
tbConsInfotbConCheck({
|
||||||
stockNumber: datas.item.balance,
|
stockNumber: datas.item.balance,
|
||||||
conInfoId: datas.form.consId,
|
conInfoId: datas.form.id,
|
||||||
lpNum: profitNumber._value
|
lpNum: profitNumber._value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
// go.to('PAGES_SALES_CONSUMABLES')
|
||||||
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -129,11 +130,13 @@
|
||||||
showStatus.value = !showStatus.value
|
showStatus.value = !showStatus.value
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.df() {
|
.df() {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
出库数量
|
<text style="color: red;">*</text>出库数量
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
单价
|
<text style="color: red;">*</text>单价
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||||
|
|
@ -84,6 +84,8 @@
|
||||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||||
text="取消"></up-button> -->
|
text="取消"></up-button> -->
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -92,7 +94,8 @@
|
||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
|
|
@ -102,6 +105,7 @@
|
||||||
tbShopPurveyor
|
tbShopPurveyor
|
||||||
} from '@/http/yskApi/requestAll.js';
|
} from '@/http/yskApi/requestAll.js';
|
||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
|
const refs = getCurrentInstance()
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
// 供应商列表
|
// 供应商列表
|
||||||
list: [],
|
list: [],
|
||||||
|
|
@ -156,15 +160,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function sumbit() {
|
function sumbit() {
|
||||||
|
|
||||||
|
if (!datas.form.list.stockNumber) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!datas.form.list.price){
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
datas.form.list.conInfoId = props.consId
|
datas.form.list.conInfoId = props.consId
|
||||||
datas.form.list = [datas.form.list]
|
datas.form.list = [datas.form.list]
|
||||||
|
|
||||||
|
|
||||||
tbConsInfostockInOut({
|
tbConsInfostockInOut({
|
||||||
...datas.form,
|
...datas.form,
|
||||||
// 供应商id
|
// 供应商id
|
||||||
supplierId: datas.list[nowStatusIndex.value].id,
|
supplierId: datas.list[nowStatusIndex.value].id,
|
||||||
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取供应商
|
// 获取供应商
|
||||||
|
|
@ -172,11 +193,13 @@
|
||||||
return 30 * datas.status.length + 14 + 'px'
|
return 30 * datas.status.length + 14 + 'px'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.df() {
|
.df() {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,101 @@
|
||||||
<template>
|
<template>
|
||||||
|
<view class="viewrecordsType">
|
||||||
|
<view style="display: flex;align-items: center;" @tap="popPu">
|
||||||
|
筛选时间<up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||||
|
{{datas.statusTitle}} <up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||||
|
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||||
|
v-for="(item,index) in datas.status" :key="index">
|
||||||
|
<view :class="{'color-main':nowStatusIndex===index}">{{item.conTypeName}}</view>
|
||||||
|
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view :style="{height: '14px'}"></view>
|
||||||
|
</view>
|
||||||
|
<view class="viewrecordsTop">
|
||||||
|
<view style="padding:32rpx 16rpx;">
|
||||||
|
<view class="">
|
||||||
|
增加数量 <text
|
||||||
|
style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.addCountNumber:''}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="df viewdf">
|
||||||
|
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
||||||
|
<view style="color: #999999;">
|
||||||
|
入库
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.countList?datas.countList.stockInNumber:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||||
|
<view style="color: #999999;">
|
||||||
|
手动增加
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.countList?datas.countList.addNumber:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="padding:32rpx 16rpx;">
|
||||||
|
<view class="">
|
||||||
|
减少数量 <text
|
||||||
|
style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="df viewdf">
|
||||||
|
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
|
||||||
|
<view style="color: #999999;">
|
||||||
|
手动减少
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.countList?datas.countList.subNumber:0}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
||||||
|
<view style="color: #999999;">
|
||||||
|
出库
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.countList?datas.countList.stockOutNumber:0}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||||
|
<view style="color: #999999;">
|
||||||
|
商品消耗
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.countList?datas.countList.saleNumber:0}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<ul class="viewrecords">
|
<ul class="viewrecords">
|
||||||
<li v-for="item in datas.list" :key="item.id">
|
<li v-for="item in datas.list" :key="item.id">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
|
||||||
{{item.conName}}
|
|
||||||
</view>
|
|
||||||
<view class="">
|
<view class="">
|
||||||
{{item.createTime}}
|
{{item.createTime}}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{item.operator}} {{item.bizName}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
<view style="font-size: 24rpx;color: #666666;">
|
||||||
{{item.balance}}
|
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
||||||
|
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> - {{ item.amount|0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;color: #666666;">
|
<view style="font-size: 24rpx;color: #666666;">
|
||||||
现有库存
|
剩余库存 {{item.balance}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
<view :style="{color:item.bizType=='+'?'#1bca72':'red'}" style="font-weight: 400;">
|
||||||
{{ item.bizType }}{{ item.amount|0 }}
|
{{ item.bizType }}{{ item.amount|0 }}
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;color: #666666;">
|
<view style="font-size: 24rpx;color: #666666;">
|
||||||
|
|
@ -29,51 +105,153 @@
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<datePickerview @confirm="datePickerConfirm" ref="datePicker"></datePickerview>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onMounted,
|
onMounted,
|
||||||
reactive
|
reactive,
|
||||||
|
ref,
|
||||||
|
computed,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import datePickerview from './components/my-date-pickerview.vue'
|
||||||
|
import color from '@/commons/color.js';
|
||||||
import {
|
import {
|
||||||
viewConInfoFlowget
|
tbConsInfoFlowstock,
|
||||||
|
tbConsInfoFlowcount,
|
||||||
|
tbConsTypes
|
||||||
} from '@/http/yskApi/requestAll.js';
|
} from '@/http/yskApi/requestAll.js';
|
||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
list: []
|
list: [],
|
||||||
|
countList: null,
|
||||||
|
// 类型
|
||||||
|
status: [],
|
||||||
|
statusTitle: "类型"
|
||||||
})
|
})
|
||||||
|
let showStatus = ref(false)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let items = JSON.parse(props.item)
|
let items = JSON.parse(props.item)
|
||||||
|
// console.log(items, '调试1')
|
||||||
getlist()
|
getlist()
|
||||||
})
|
})
|
||||||
let getlist = () => {
|
const refs = getCurrentInstance()
|
||||||
viewConInfoFlowget({
|
let popPu = () => {
|
||||||
|
refs.ctx.$refs.datePicker.toggle()
|
||||||
|
}
|
||||||
|
|
||||||
|
function datePickerConfirm(e) {
|
||||||
|
getlist("", e.start, e.end)
|
||||||
|
}
|
||||||
|
|
||||||
|
function inventory(a, b, c) {
|
||||||
|
let data = 0
|
||||||
|
if (b == '-') {
|
||||||
|
data = a + c
|
||||||
|
} else {
|
||||||
|
data = a - c
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
let nowStatusIndex = ref(0)
|
||||||
|
|
||||||
|
function changeNowStatusIndex(i) {
|
||||||
|
nowStatusIndex.value = i
|
||||||
|
showStatus.value = false
|
||||||
|
datas.statusTitle = datas.status[i].conTypeName
|
||||||
|
getlist(datas.status[i].id)
|
||||||
|
}
|
||||||
|
const statusHeight = computed(() => {
|
||||||
|
return 30 * datas.status.length + 14 + 'px'
|
||||||
|
})
|
||||||
|
let getlist = (conTypeId = "", start, end) => {
|
||||||
|
// 列表
|
||||||
|
tbConsInfoFlowstock({
|
||||||
page: 0,
|
page: 0,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
size: 30,
|
size: 30,
|
||||||
sort: "createTime,desc"
|
consId: JSON.parse(props.item).conTypeId,
|
||||||
|
column: "addCountNumber",
|
||||||
|
conTypeId,
|
||||||
|
|
||||||
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
datas.list = res.content
|
datas.list = res.content
|
||||||
})
|
})
|
||||||
|
// 顶部数据
|
||||||
|
tbConsInfoFlowcount({
|
||||||
|
page: 0,
|
||||||
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
size: 30,
|
||||||
|
sort: "createTime,desc",
|
||||||
|
conTypeId,
|
||||||
|
startTime: start,
|
||||||
|
endTime: end,
|
||||||
|
}).then(res => {
|
||||||
|
datas.countList = res
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取顶部类型/
|
||||||
|
tbConsTypes({
|
||||||
|
page: 0,
|
||||||
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
size: 100,
|
||||||
|
}).then(res => {
|
||||||
|
datas.status = res.content
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.viewrecordsType {
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewrecordsTop {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// justify-content: space-between;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
|
||||||
|
.viewdf {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 336rpx;
|
||||||
|
height: 220rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:last-child {
|
||||||
|
margin-left: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.viewrecords {
|
.viewrecords {
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
|
|
||||||
|
|
@ -109,4 +287,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
margin: 0 32rpx;
|
||||||
|
position: absolute;
|
||||||
|
// top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.df {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -19,18 +19,18 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
入库数量
|
<text style="color: red;">*</text> 入库数量
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
单价
|
<text style="color: red;">*</text>单价
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
<input type="number" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -84,6 +84,8 @@
|
||||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||||
text="取消"></up-button> -->
|
text="取消"></up-button> -->
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -92,7 +94,8 @@
|
||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
|
|
@ -126,7 +129,9 @@
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
datas.item = JSON.parse(props.item)
|
datas.item = JSON.parse(props.item)
|
||||||
|
datas.form = assign(datas.form, ...datas.item)
|
||||||
})
|
})
|
||||||
|
const refs = getCurrentInstance()
|
||||||
|
|
||||||
function toggle() {
|
function toggle() {
|
||||||
go.to('PAGES_ADD_SUPPLIER')
|
go.to('PAGES_ADD_SUPPLIER')
|
||||||
|
|
@ -156,7 +161,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function sumbit() {
|
function sumbit() {
|
||||||
datas.form.list.conInfoId = props.consId
|
if (!datas.form.list.stockNumber) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!datas.form.list.price) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
datas.form.list.conInfoId = datas.item.id
|
||||||
datas.form.list = [datas.form.list]
|
datas.form.list = [datas.form.list]
|
||||||
tbConsInfostockInOut({
|
tbConsInfostockInOut({
|
||||||
...datas.form,
|
...datas.form,
|
||||||
|
|
@ -164,7 +183,13 @@
|
||||||
supplierId: datas.list[nowStatusIndex.value].id,
|
supplierId: datas.list[nowStatusIndex.value].id,
|
||||||
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "保存成功",
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
go.back()
|
||||||
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取供应商
|
// 获取供应商
|
||||||
|
|
@ -173,12 +198,12 @@
|
||||||
return 30 * datas.status.length + 14 + 'px'
|
return 30 * datas.status.length + 14 + 'px'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
.df() {
|
.df() {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
// value=2完成
|
// value=2完成
|
||||||
callTableput({
|
callTableput({
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync('shopId'),
|
||||||
state: 1,
|
state: 2,
|
||||||
callQueueId: datas.dialId
|
callQueueId: datas.dialId
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getList()
|
getList()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
<template>
|
||||||
|
<view class="page-wrapper">
|
||||||
|
<view class="content">
|
||||||
|
<view class="title">消息订阅码</view>
|
||||||
|
<view ref="qrcode" class="qrcode">
|
||||||
|
<image :src="vdata.QrcodeUrl" style="width: 100%;height: 100%;" mode="scaleToFill" />
|
||||||
|
</view>
|
||||||
|
<view class="bom">
|
||||||
|
<view @click="saveImage">保存订阅码</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
|
import qrCode from '@/commons/utils/qrCode.js'
|
||||||
|
import { getSubQrCode } from '@/http/yskApi/pageNotification.js'
|
||||||
|
import { saveHeadImgFile } from '@/commons/utils/saveImg.js'
|
||||||
|
const vdata = reactive({
|
||||||
|
size: 20,
|
||||||
|
QrcodeUrl: "",
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
getSubQrCode().then((res) => {
|
||||||
|
vdata.QrcodeUrl = res;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const saveImage = () => {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
saveQrcodeImg()
|
||||||
|
uni.downloadFile({
|
||||||
|
url: vdata.QrcodeUrl,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
success: (r) => {
|
||||||
|
infoBox.showSuccessToast('保存成功')
|
||||||
|
uni.vibrateShort()
|
||||||
|
},
|
||||||
|
fail: (er) => {
|
||||||
|
console.log(er)
|
||||||
|
infoBox.showErrorToast('保存失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err)
|
||||||
|
infoBox.showErrorToast('保存失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
//#ifdef MP-WEIXIN
|
||||||
|
downloadQR()
|
||||||
|
//#endif
|
||||||
|
}
|
||||||
|
//#ifdef MP-WEIXIN
|
||||||
|
function downloadQR() {
|
||||||
|
wx.getSetting({
|
||||||
|
//获取权限
|
||||||
|
success(res) {
|
||||||
|
console.log(res)
|
||||||
|
if (res.authSetting['scope.writePhotosAlbum']) {
|
||||||
|
saveWxQrcodeImg(vdata.QrcodeUrl)
|
||||||
|
} else {
|
||||||
|
wx.authorize({
|
||||||
|
scope: 'scope.writePhotosAlbum',
|
||||||
|
success() {
|
||||||
|
saveWxQrcodeImg(vdata.QrcodeUrl)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//#endif
|
||||||
|
const saveQrcodeImg = () => {
|
||||||
|
saveHeadImgFile(vdata.QrcodeUrl, 80)
|
||||||
|
.then((success) => {
|
||||||
|
infoBox.showSuccessToast('保存成功')
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
infoBox.showErrorToast('保存失败')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveWxQrcodeImg = (data) => {
|
||||||
|
const fileManager = wx.getFileSystemManager()
|
||||||
|
console.log( )
|
||||||
|
const filePath = wx.env.USER_DATA_PATH + '/qrCode'+new Date().getTime()+'.png'
|
||||||
|
//这块是定义图片的名称,可自定义其他
|
||||||
|
fileManager.writeFile({
|
||||||
|
filePath: filePath,
|
||||||
|
data: data.slice(22),
|
||||||
|
encoding: 'base64',
|
||||||
|
success: (res) => {
|
||||||
|
wx.saveImageToPhotosAlbum({
|
||||||
|
filePath: filePath,
|
||||||
|
success: function (res) {
|
||||||
|
//保存成功
|
||||||
|
infoBox.showSuccessToast('保存成功')
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log(err)
|
||||||
|
//保存失败
|
||||||
|
infoBox.showErrorToast('保存失败')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
infoBox.showErrorToast('保存失败')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-wrapper {
|
||||||
|
min-height: calc(100vh - 90rpx);
|
||||||
|
padding: 48rpx 52rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.content{
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 64rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.qrcode{
|
||||||
|
width: 416rpx;
|
||||||
|
height: 416rpx;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
border: 2rpx solid #333;
|
||||||
|
padding: 15rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
::v-deep .u-qrcode,::v-deep .u-qrcode__content,::v-deep .u-qrcode__canvas{
|
||||||
|
width: 100%!important;
|
||||||
|
height: 100%!important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.bom{
|
||||||
|
display: flex;
|
||||||
|
margin-top: 110rpx;
|
||||||
|
view{
|
||||||
|
width: 218rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #318AFE;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
view:nth-child(1){
|
||||||
|
color: #318AFE;
|
||||||
|
border: 2rpx solid #318AFE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-p-b-24 u-m-b-24 border-bottom">
|
<view class="u-p-b-24 u-m-b-24 border-bottom">
|
||||||
<view class="title">分类打印</view>
|
<view class="title">分类打印(仅打印制作单[厨房])</view>
|
||||||
<view class="u-m-t-16">
|
<view class="u-m-t-16">
|
||||||
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'classifyPrint')">
|
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'classifyPrint')">
|
||||||
<label class="radio u-m-r-60">
|
<label class="radio u-m-r-60">
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,6 @@
|
||||||
import {
|
import {
|
||||||
formatPrice
|
formatPrice
|
||||||
} from "@/commons/utils/format.js";
|
} from "@/commons/utils/format.js";
|
||||||
import {
|
|
||||||
TRUE
|
|
||||||
} from 'sass';
|
|
||||||
|
|
||||||
function priceFormat(item, key, val) {
|
function priceFormat(item, key, val) {
|
||||||
let min = 0;
|
let min = 0;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@
|
||||||
@click="guigeClick(index)">
|
@click="guigeClick(index)">
|
||||||
<text>{{item.specSnap||item.name}}</text>
|
<text>{{item.specSnap||item.name}}</text>
|
||||||
<view class="tag-primary tag" v-if="item.isGrounding">上架中</view>
|
<view class="tag-primary tag" v-if="item.isGrounding">上架中</view>
|
||||||
<view class="tag-gray tag" v-else>已下架</view>
|
<view class="tag-gray tag" v-if="item.isPauseSale">已售罄</view>
|
||||||
|
<view class="tag-gray tag" v-if="!item.isGrounding">已下架</view>
|
||||||
|
|
||||||
<!-- <template v-if="item.isPauseSale">
|
<!-- <template v-if="item.isPauseSale">
|
||||||
<view class="tag-gray tag" >已售罄</view>
|
<view class="tag-gray tag" >已售罄</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -113,9 +115,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
<edit-stock :category="pageData.categoryList" v-model:show="popup.stock.show" @save="changeStockConfirm"
|
<edit-stock :category="pageData.categoryList" v-model:show="popup.stock.show" @save="changeStockConfirm"
|
||||||
:goods="pageData.selGoods"></edit-stock>
|
:goods="pageData.selGoods"></edit-stock>
|
||||||
<!-- 规格弹窗 -->
|
<!-- 规格弹窗 -->
|
||||||
<edit-guige @isGroundingChange="isGroundingChange" v-model:show="popup.guige.show"
|
<edit-guige @isGroundingChange="isGroundingChange" v-model:show="popup.guige.show" @isPauseSaleChange="isPauseSaleChange"
|
||||||
:goods="popup.guige.data"></edit-guige>
|
:goods="popup.guige.data"></edit-guige>
|
||||||
<!-- 报损 -->
|
<!-- 报损 -->
|
||||||
<baosun-vue :category="pageData.categoryList" v-model:show="popup.baosun.show"
|
<baosun-vue :category="pageData.categoryList" v-model:show="popup.baosun.show"
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,12 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item,index) in tableList" :key="item.productId">
|
<tr v-for="(item,index) in tableList" :key="item.productId">
|
||||||
<td style="width: 500rpx;padding-left: 16rpx;">
|
<td style="width: 500rpx;padding-left: 16rpx;">
|
||||||
<image v-if="index==0" src="../pageTable/index/images/1.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
|
<image v-if="index==0" src="../pageTable/index/images/1.png" style="width: 22rpx;height: 30rpx;"
|
||||||
<image v-else-if="index==1" src="../pageTable/index/images/2.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
|
mode=""></image>
|
||||||
<image v-else-if="index==2" src="../pageTable/index/images/3.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
|
<image v-else-if="index==1" src="../pageTable/index/images/2.png"
|
||||||
|
style="width: 22rpx;height: 30rpx;" mode=""></image>
|
||||||
|
<image v-else-if="index==2" src="../pageTable/index/images/3.png"
|
||||||
|
style="width: 22rpx;height: 30rpx;" mode=""></image>
|
||||||
<span v-else>{{index}}</span>
|
<span v-else>{{index}}</span>
|
||||||
{{item.productName}}
|
{{item.productName}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -142,11 +145,19 @@
|
||||||
startTime = formatTime() + ' 00:00:00'
|
startTime = formatTime() + ' 00:00:00'
|
||||||
endTime = formatTime() + ' 23:59:59'
|
endTime = formatTime() + ' 23:59:59'
|
||||||
} else if (selected.value == 'circumference') {
|
} else if (selected.value == 'circumference') {
|
||||||
startTime = dayjs().add(-7, 'day').format('YYYY-MM-DD 00:00:00')
|
var now = new Date();
|
||||||
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
|
var nowTime = now.getTime();
|
||||||
|
var day = now.getDay();
|
||||||
|
var oneDayTime = 24 * 60 * 60 * 1000;
|
||||||
|
//显示周一
|
||||||
|
var MondayTime = nowTime - (day - 1) * oneDayTime;
|
||||||
|
//显示周日
|
||||||
|
var SundayTime = nowTime + (7 - day) * oneDayTime;
|
||||||
|
startTime = dayjs(MondayTime).format('YYYY-MM-DD 00:00:00')
|
||||||
|
endTime = dayjs(SundayTime).format('YYYY-MM-DD 23:59:59')
|
||||||
} else if (selected.value == 'moon') {
|
} else if (selected.value == 'moon') {
|
||||||
startTime = dayjs().add(-30, 'day').format('YYYY-MM-DD 00:00:00')
|
startTime = dayjs().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
|
endTime = dayjs().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
} else if (selected.value == 'custom') {
|
} else if (selected.value == 'custom') {
|
||||||
startTime = start
|
startTime = start
|
||||||
endTime = end
|
endTime = end
|
||||||
|
|
@ -171,6 +182,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeTime(e) {
|
function changeTime(e) {
|
||||||
|
|
||||||
selected.value = e
|
selected.value = e
|
||||||
if (e == 'custom') {
|
if (e == 'custom') {
|
||||||
currentInstance.ctx.$refs.datePicker.toggle()
|
currentInstance.ctx.$refs.datePicker.toggle()
|
||||||
|
|
@ -196,7 +208,7 @@
|
||||||
dateProduct({
|
dateProduct({
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync('shopId'),
|
||||||
day: day.value,
|
day: day.value,
|
||||||
page: 1,
|
page: 0,
|
||||||
size: 5
|
size: 5
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
tableList.value = res.productList.content
|
tableList.value = res.productList.content
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
员工姓名
|
<text style="color: red;">*</text>员工姓名
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
|
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
|
||||||
<hr />
|
<hr />
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
手机号
|
<text style="color: red;">*</text>手机号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
|
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
|
||||||
<hr />
|
<hr />
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
员工编号
|
<text style="color: red;">*</text>员工编号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
|
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
|
||||||
<hr />
|
<hr />
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
员工账号
|
<text style="color: red;">*</text>员工账号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
|
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
|
||||||
<hr />
|
<hr />
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
角色
|
<text style="color: red;">*</text> 角色
|
||||||
</view>
|
</view>
|
||||||
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
|
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
@ -78,9 +78,11 @@
|
||||||
<view class="bottomBotton" @tap="sumbitEvent">
|
<view class="bottomBotton" @tap="sumbitEvent">
|
||||||
保存
|
保存
|
||||||
</view>
|
</view>
|
||||||
<view class="bottomBotton2" @tap="toUrl">
|
<!-- <view class="bottomBotton2" @tap="toUrl">
|
||||||
取消
|
取消
|
||||||
</view>
|
</view> -->
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
<!-- 角色选择器 -->
|
<!-- 角色选择器 -->
|
||||||
<up-picker :show="show" @confirm="confirm" @cancel="show = false" :columns="columns"></up-picker>
|
<up-picker :show="show" @confirm="confirm" @cancel="show = false" :columns="columns"></up-picker>
|
||||||
<!-- 弹窗 -->
|
<!-- 弹窗 -->
|
||||||
|
|
@ -149,6 +151,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function sumbitEvent() {
|
function sumbitEvent() {
|
||||||
|
// 效验
|
||||||
|
if(!datas.formData.name||!datas.formData.phone||!datas.formData.code||!datas.formData.account){
|
||||||
|
currentInstance.ctx.$refs.uToastRef.show({
|
||||||
|
message: "请填写必填项",
|
||||||
|
type: 'default',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let rolesId = datas.rolesList.filter(ele => ele.name == datas.rolesdata)
|
let rolesId = datas.rolesList.filter(ele => ele.name == datas.rolesdata)
|
||||||
if (rolesId.length == 0) {
|
if (rolesId.length == 0) {
|
||||||
currentInstance.ctx.$refs.message.open()
|
currentInstance.ctx.$refs.message.open()
|
||||||
|
|
@ -166,7 +177,7 @@
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
...datas.formData
|
...datas.formData
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
toUrl()
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -195,12 +206,14 @@
|
||||||
go.to('PAGES_STAFF')
|
go.to('PAGES_STAFF')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
padding: 32rpx 28rpx;
|
padding: 32rpx 28rpx;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.h7 {
|
.h7 {
|
||||||
margin: 32rpx 0;
|
margin: 32rpx 0;
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
|
|
@ -3,7 +3,7 @@
|
||||||
<li v-for="item in datas.list " :key="item.id">
|
<li v-for="item in datas.list " :key="item.id">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
<view class="">
|
||||||
<span style="font-size: 28rpx;color: #333333; ">{{item.name}}</span>
|
<span style="font-size: 28rpx;color: #333333; ">{{item.name}} </span>
|
||||||
<span style="font-size: 24rpx;color: #999; ">{{item.code}}</span>
|
<span style="font-size: 24rpx;color: #999; ">{{item.code}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="font-size: 24rpx;color: #666666;">
|
<view class="" style="font-size: 24rpx;color: #666666;">
|
||||||
|
|
@ -25,7 +25,12 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</li>
|
||||||
|
<li style="background-color: rgba(0,0,0,0);"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<view v-if="datas.list.length==0" style="text-align: center;">
|
||||||
|
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||||
|
<view style="font-size: 28rpx;color: #999;">暂无员工</view>
|
||||||
|
</view>
|
||||||
<view class="bottomBotton" @tap="toUrl">
|
<view class="bottomBotton" @tap="toUrl">
|
||||||
添加员工
|
添加员工
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -41,6 +46,9 @@
|
||||||
watch,
|
watch,
|
||||||
onMounted
|
onMounted
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import {
|
import {
|
||||||
rolesGet,
|
rolesGet,
|
||||||
|
|
@ -53,7 +61,7 @@
|
||||||
// 删除员工id
|
// 删除员工id
|
||||||
rolesId: ""
|
rolesId: ""
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onShow(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -94,25 +102,27 @@
|
||||||
function getList() {
|
function getList() {
|
||||||
rolesGet({
|
rolesGet({
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
page: 1,
|
page: 0,
|
||||||
size: 100
|
size: 100
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
datas.list = res.content
|
datas.list = res.content
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style lang="less" scoped>
|
|
||||||
* {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
// * {
|
||||||
|
// padding: 0;
|
||||||
|
// margin: 0;
|
||||||
|
// text-decoration: none;
|
||||||
|
// outline: none;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="u-flex u-row-center u-m-t-16">
|
<view class="u-flex u-row-center u-m-t-16">
|
||||||
<template v-if="data.tableId">
|
<template v-if="data.tableId">
|
||||||
|
<template v-if="data.status =='unbind' ">
|
||||||
|
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">
|
||||||
|
绑定码牌
|
||||||
|
</my-button>
|
||||||
|
</template>
|
||||||
<template v-if="data.status=='idle'||(data.status=='using'&&!data.orderId) ">
|
<template v-if="data.status=='idle'||(data.status=='using'&&!data.orderId) ">
|
||||||
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">
|
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">
|
||||||
选择
|
选择
|
||||||
|
|
@ -80,7 +85,7 @@
|
||||||
} from '@/http/yskApi/table.js'
|
} from '@/http/yskApi/table.js'
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
const status = $status
|
const status = $status
|
||||||
const emits = defineEmits(['more', 'update'])
|
const emits = defineEmits(['more', 'update', 'bind'])
|
||||||
|
|
||||||
function returnStutasText(key) {
|
function returnStutasText(key) {
|
||||||
key = returnIsUseing(key)
|
key = returnIsUseing(key)
|
||||||
|
|
@ -147,6 +152,10 @@
|
||||||
emits('more')
|
emits('more')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bind() {
|
||||||
|
emits('bind',props.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async function diancan() {
|
async function diancan() {
|
||||||
hasPermission('允许下单').then(res=>{
|
hasPermission('允许下单').then(res=>{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
<view class="u-m-t-30 u-flex u-flex-wrap u-row-between">
|
<view class="u-m-t-30 u-flex u-flex-wrap u-row-between">
|
||||||
<view class="u-m-b-30" v-for="(item,index) in tables.list" :key="index">
|
<view class="u-m-b-30" v-for="(item,index) in tables.list" :key="index">
|
||||||
<table-item @update="getTable" :areaMap="areaMap" @more="moreShow(item)" :data="item"></table-item>
|
<table-item @bind="unBind" @update="getTable" :areaMap="areaMap" @more="moreShow(item)" :data="item"></table-item>
|
||||||
</view>
|
</view>
|
||||||
<my-img-empty v-if="tables.hasAjax&&!tables.list.length" tips="未找到相关桌台"></my-img-empty>
|
<my-img-empty v-if="tables.hasAjax&&!tables.list.length" tips="未找到相关桌台"></my-img-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -80,7 +80,8 @@
|
||||||
} from '@/commons/table-status.js'
|
} from '@/commons/table-status.js'
|
||||||
import {
|
import {
|
||||||
$table,
|
$table,
|
||||||
$tableArea
|
$tableArea,
|
||||||
|
$bind
|
||||||
} from '@/http/yskApi/table.js'
|
} from '@/http/yskApi/table.js'
|
||||||
import {
|
import {
|
||||||
objToArrary
|
objToArrary
|
||||||
|
|
@ -111,7 +112,7 @@
|
||||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||||
const refMoreSheet = ref(null)
|
const refMoreSheet = ref(null)
|
||||||
const actionSheet = reactive({
|
const actionSheet = reactive({
|
||||||
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单'],
|
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单','绑定码牌'],
|
||||||
title: '',
|
title: '',
|
||||||
selTable: ''
|
selTable: ''
|
||||||
})
|
})
|
||||||
|
|
@ -175,10 +176,51 @@
|
||||||
//打印订单
|
//打印订单
|
||||||
const res = await $fun.printOrder(actionSheet.selTable.tableId)
|
const res = await $fun.printOrder(actionSheet.selTable.tableId)
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
if (index == 6) {
|
||||||
|
//打印订单
|
||||||
|
scanCode(item)
|
||||||
|
// const res = await $fun.printOrder(actionSheet.selTable.tableId)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
infoBox.showToast('待开放,请敬请期待!')
|
infoBox.showToast('待开放,请敬请期待!')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unBind (item) {
|
||||||
|
scanCode(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
function scanCode(item) {
|
||||||
|
if ( item.status != 'unbind') {
|
||||||
|
infoBox.showToast('当前桌台已绑定')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
success: function(res) {
|
||||||
|
console.log('条码类型:' + res.scanType);
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
let params = getQueryString(res.result);
|
||||||
|
$bind({
|
||||||
|
"code": params.code,
|
||||||
|
"id": item.id,
|
||||||
|
}).then(res => {
|
||||||
|
getTable()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getQueryString(url) { //解码
|
||||||
|
let params = {};
|
||||||
|
// 正则表达式来匹配URL中的查询字符串
|
||||||
|
let reg = /(?:\?|#|&){1}([^=]*)=([^&]*)/g;
|
||||||
|
url.replace(reg, (match, key, value) => {
|
||||||
|
params[key] = value;
|
||||||
|
});
|
||||||
|
return params;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const refTable = ref(null)
|
const refTable = ref(null)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
<uni-forms :model="userForm" :rules="rules" err-show-type="toast" validateTrigger="submit" ref="form"
|
<uni-forms :model="userForm" :rules="rules" err-show-type="toast" validateTrigger="submit" ref="form"
|
||||||
:border="true" label-position="top" label-width="350">
|
:border="true" label-position="top" label-width="350">
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<uni-forms-item label="用户名" required name="name">
|
<uni-forms-item label="用户名" required name="nickName">
|
||||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||||
v-model="userForm.name" placeholder="填写用户名" />
|
v-model="userForm.nickName" placeholder="填写用户名" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="手机号" required name="phone">
|
<uni-forms-item label="手机号" required name="phone">
|
||||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||||
|
|
@ -20,36 +20,53 @@
|
||||||
|
|
||||||
</uni-forms-item> -->
|
</uni-forms-item> -->
|
||||||
|
|
||||||
<uni-forms-item label="生日" required name="birthday">
|
<uni-forms-item label="生日" required name="birthDay">
|
||||||
<view style="display: none;">
|
<view style="display: none;">
|
||||||
<uni-easyinput paddingNone :inputBorder="inputBorder" v-model="userForm.birthday"
|
<uni-easyinput paddingNone :inputBorder="inputBorder" v-model="userForm.birthDay"
|
||||||
placeholder="选择日期" />
|
placeholder="选择日期" />
|
||||||
</view>
|
</view>
|
||||||
<picker mode="date" :value="date" :start="startDate" :end="endDate"
|
<picker mode="date" :value="date" :start="startDate" :end="endDate"
|
||||||
@change="bindDateChange">
|
@change="bindDateChange">
|
||||||
<view class="u-flex u-row-between u-p-b-10 lh40">
|
<view class="u-flex u-row-between u-p-b-10 lh40">
|
||||||
<view class="color-333">{{userForm.birthday||'选择日期'}}</view>
|
<view class="color-333">{{userForm.birthDay||'选择日期'}}</view>
|
||||||
<uni-icons type="right"></uni-icons>
|
<uni-icons type="right"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="用户余额" required name="balance">
|
|
||||||
|
<uni-forms-item label="性别" required name="birthDay">
|
||||||
|
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'sex')">
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="1" :checked="userForm.sex == '1'" class="scale7" />
|
||||||
|
<text>男</text>
|
||||||
|
</label>
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="2" :checked="userForm.sex == '2'" class="scale7" />
|
||||||
|
<text>女</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <uni-forms-item label="用户余额" required name="balance">
|
||||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||||
v-model="userForm.balance" placeholder="填写余额" />
|
v-model="userForm.balance" placeholder="填写余额" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="用户积分" required name="integral">
|
<uni-forms-item label="用户积分" required name="integral">
|
||||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||||
v-model="userForm.integral" placeholder="填写积分" />
|
v-model="userForm.integral" placeholder="填写积分" />
|
||||||
</uni-forms-item>
|
</uni-forms-item> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="block border-top-0">
|
<!-- <view class="block border-top-0">
|
||||||
<uni-forms-item label="" required>
|
<uni-forms-item label="" required>
|
||||||
<view class="u-flex u-row-between lh40">
|
<view class="u-flex u-row-between lh40">
|
||||||
<view class="label-title">会员</view>
|
<view class="label-title">状态</view>
|
||||||
<my-switch v-model="userForm.isVip"></my-switch>
|
<my-switch v-model="userForm.isVip"></my-switch>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -67,6 +84,13 @@
|
||||||
import infoBox from '@/commons/utils/infoBox.js';
|
import infoBox from '@/commons/utils/infoBox.js';
|
||||||
import mySwitch from '@/components/my-components/my-switch.vue'
|
import mySwitch from '@/components/my-components/my-switch.vue'
|
||||||
import myButton from '@/components/my-components/my-button.vue'
|
import myButton from '@/components/my-components/my-button.vue'
|
||||||
|
import {
|
||||||
|
member,
|
||||||
|
tbShopUser
|
||||||
|
} from '@/http/yskApi/requestAll.js';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReady
|
onReady
|
||||||
|
|
@ -87,7 +111,7 @@
|
||||||
const bottom = ref(null)
|
const bottom = ref(null)
|
||||||
//表单验证
|
//表单验证
|
||||||
const rules = {
|
const rules = {
|
||||||
name: {
|
nickName: {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '请填写用户名'
|
errorMessage: '请填写用户名'
|
||||||
|
|
@ -140,20 +164,22 @@
|
||||||
|
|
||||||
function bindDateChange(e) {
|
function bindDateChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
userForm.birthday = e.detail.value
|
userForm.birthDay = e.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFieldChange(e) {
|
function onFieldChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
// 用户表单
|
// 用户表单
|
||||||
const userForm = reactive({
|
let userForm = reactive({
|
||||||
name: '',
|
nickName: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
birthday: '',
|
birthDay: '',
|
||||||
balance: '',
|
balance: '',
|
||||||
integral: '',
|
integral: '',
|
||||||
isVip: false,
|
isVip: false,
|
||||||
|
level: 1,
|
||||||
|
sex: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -173,23 +199,48 @@
|
||||||
|
|
||||||
|
|
||||||
onLoad(params => {
|
onLoad(params => {
|
||||||
|
if (params.item) {
|
||||||
if (isEmpty(params)) {
|
let items = JSON.parse(params.item)
|
||||||
option.type = params.type ? params.type : 'add'
|
|
||||||
}
|
|
||||||
console.log(option.type);
|
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: option.type === 'add' ? '添加用户' : '编辑用户'
|
title: '编辑用户'
|
||||||
})
|
})
|
||||||
|
items.phone = items.telephone
|
||||||
|
items.sex = items.sex == '男' ? 1 : 2
|
||||||
|
userForm = items
|
||||||
|
option.type = 'edit'
|
||||||
|
} else {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '新增用户'
|
||||||
|
})
|
||||||
|
option.type = 'add'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function sizeChange(e, name) {
|
||||||
|
userForm[name] = e.detail.value
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
form.value.validate().then(res => {
|
form.value.validate().then(async res => {
|
||||||
console.log(res)
|
let obj = {
|
||||||
|
...userForm,
|
||||||
|
name: userForm.nickName,
|
||||||
|
telephone: userForm.phone,
|
||||||
|
birthday:userForm.birthDay,
|
||||||
|
status:1,
|
||||||
|
levelConsume:0,
|
||||||
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
}
|
||||||
|
if (res) {
|
||||||
|
if (option.type == 'add') {
|
||||||
|
const ele = await member(obj)
|
||||||
|
} else {
|
||||||
|
const ele = await tbShopUser(obj)
|
||||||
|
}
|
||||||
|
go.back()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 429 B |
|
|
@ -5,19 +5,24 @@
|
||||||
<image v-if="data.headImg" :src="data.headImg" class="img"></image>
|
<image v-if="data.headImg" :src="data.headImg" class="img"></image>
|
||||||
<view class="img" v-else></view>
|
<view class="img" v-else></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-p-l-30 u-flex-1">
|
<view class="u-p-l-30 u-flex-1" style="position: relative;">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<view class="color-000 font-bold">{{data.nickName}}</view>
|
<view class="color-000 font-bold">{{data.nickName}}</view>
|
||||||
|
<image style="width: 24rpx;height: 24rpx;" v-if="data.sex=='男'" src="./men.png" mode=""></image>
|
||||||
|
<image style="width: 24rpx;height: 24rpx;" v-if="data.sex=='女'" src="./women.png" mode=""></image>
|
||||||
<view class="color-999 u-m-l-40" @click="remark">备注</view>
|
<view class="color-999 u-m-l-40" @click="remark">备注</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-6 u-flex u-row-between">
|
<!-- <view class="u-m-t-6 u-flex u-row-between">
|
||||||
<view class="vip isvip" v-if="data.isVip">会员</view>
|
<view class="vip isvip" v-if="data.isVip">会员</view>
|
||||||
<view class=" vip noVip" v-else>非会员</view>
|
<view class=" vip noVip" v-else>非会员</view>
|
||||||
<view class="color-main" @click="bindMoblie">绑定号码</view>
|
<view class="color-main" @click="bindMoblie">绑定号码</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="u-m-t-6 color-666 ">
|
<view class="u-m-t-30 color-666 ">
|
||||||
{{data.telephone||''}}
|
{{data.telephone||''}}
|
||||||
</view>
|
</view>
|
||||||
|
<view style="position: absolute;right: 0;top: 0;border-radius: 4rpx 4rpx 4rpx 4rpx;background: #EAF4FD;font-weight: 400;font-size: 20rpx;color: #318AFE;">
|
||||||
|
会员等级{{data.isVip}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -32,7 +37,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex-1 u-text-center" @tap="toUser">
|
<view class="u-flex-1 u-text-center" @tap="toYue">
|
||||||
<view class="font-bold color-000 pr-16" >{{data.totalScore}}</view>
|
<view class="font-bold color-000 pr-16" >{{data.totalScore}}</view>
|
||||||
<view class="u-flex u-row-center" >
|
<view class="u-flex u-row-center" >
|
||||||
<view class="color-999">积分</view>
|
<view class="color-999">积分</view>
|
||||||
|
|
@ -41,6 +46,24 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="u-flex-1 u-text-center" @tap="toYue">
|
||||||
|
<view class="font-bold color-000 pr-16" >{{0}}</view>
|
||||||
|
<view class="u-flex u-row-center" >
|
||||||
|
<view class="color-999">优惠券</view>
|
||||||
|
<view class="u-flex">
|
||||||
|
<uni-icons type="right" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="u-flex-1 u-text-center" @tap="toUser">
|
||||||
|
<view class="font-bold color-000 pr-16">{{data.totalScore}}</view>
|
||||||
|
<view class="u-flex u-row-center">
|
||||||
|
<view class="color-999">已消费</view>
|
||||||
|
<view class="u-flex">
|
||||||
|
<uni-icons type="right" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
<!-- <view class="u-flex-1 u-text-center">
|
<!-- <view class="u-flex-1 u-text-center">
|
||||||
<view class="font-bold color-000 pr-16">0</view>
|
<view class="font-bold color-000 pr-16">0</view>
|
||||||
<view class="u-flex u-row-center">
|
<view class="u-flex u-row-center">
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 425 B |
|
|
@ -25,15 +25,15 @@
|
||||||
<view class="u-font-32">数据统计</view>
|
<view class="u-font-32">数据统计</view>
|
||||||
<view class="u-m-t-40 u-flex u-row-between">
|
<view class="u-m-t-40 u-flex u-row-between">
|
||||||
<view class=" ">
|
<view class=" ">
|
||||||
<view>会员数</view>
|
<view>今日新增(人)</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.userTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.userTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line-l-r u-p-l-30 u-p-r-30">
|
<view class="line-l-r u-p-l-30 u-p-r-30">
|
||||||
<view>会员余额</view>
|
<view>总用户量(人)</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.balanceTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.balanceTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view>充值金额</view>
|
<view>总余额(元)</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.chageTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.chageTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -47,6 +47,9 @@
|
||||||
</view>
|
</view>
|
||||||
<my-pagination @change="pageChange"></my-pagination>
|
<my-pagination @change="pageChange"></my-pagination>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="fixed_b">
|
||||||
|
<my-button showShadow @tap="toAddUser" shape="circle">新建用户</my-button>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 导入用户 -->
|
<!-- 导入用户 -->
|
||||||
|
|
@ -83,7 +86,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="fixed_b">
|
<view class="fixed_b">
|
||||||
<my-button showShadow @tap="toAddUser" shape="circle">新建用户</my-button>
|
<my-button showShadow @tap="toAddUser" shape="circle">新建用户</my-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -152,6 +154,94 @@
|
||||||
|
|
||||||
<my-action-sheet @itemClick="actionSheetClick" ref="moreOperate" :list="moreOperateList"></my-action-sheet>
|
<my-action-sheet @itemClick="actionSheetClick" ref="moreOperate" :list="moreOperateList"></my-action-sheet>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 增减余额 -->
|
||||||
|
<up-popup :show="datas.show" :round="18" mode="center" @close="close">
|
||||||
|
<view class="zhezhaopop">
|
||||||
|
<view class="">
|
||||||
|
<span></span>
|
||||||
|
<span>增减余额</span>
|
||||||
|
<up-icon @tap="confirm" name="close-circle-fill"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view style="display: flex;align-items: center;padding: 24rpx;">
|
||||||
|
<image v-if="datas.activeUser.headImg" :src="datas.activeUser.headImg"
|
||||||
|
style="width: 52rpx;height: 52rpx;;background-color: #eee;"></image>
|
||||||
|
<view style="width: 52rpx;height: 52rpx;;background-color: #eee;" v-else>
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 12rpx;">
|
||||||
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
{{datas.activeUser.nickName}}
|
||||||
|
</view>
|
||||||
|
<view style="font-weight: 400;font-size: 24rpx;color: #999999;">
|
||||||
|
当前余额:{{datas.activeUser.amount}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zhezhaopopthree">
|
||||||
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
增减
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-16">
|
||||||
|
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'operationType')">
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="in" :checked="datas.form.operationType == 'in'" class="scale7" />
|
||||||
|
<text>增加</text>
|
||||||
|
</label>
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="out" :checked="datas.form.operationType == 'out'" class="scale7" />
|
||||||
|
<text>扣除</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zhezhaopopthree" v-if="datas.form.operationType=='in'">
|
||||||
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
类型
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-16">
|
||||||
|
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'type')">
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="inMoney" :checked="datas.form.type == 'inMoney'" class="scale7" />
|
||||||
|
<text>充值</text>
|
||||||
|
</label>
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="consumeIn" :checked="datas.form.type == 'consumeIn'" class="scale7" />
|
||||||
|
<text>消费退款</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zhezhaopopthree" v-else>
|
||||||
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
类型
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-16">
|
||||||
|
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'type')">
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="consumeOut" :checked="datas.form.type == 'consumeOut'" class="scale7" />
|
||||||
|
<text>消费</text>
|
||||||
|
</label>
|
||||||
|
<label class="radio u-m-r-60">
|
||||||
|
<radio value="inMoneyOut" :checked="datas.form.type == 'inMoneyOut'" class="scale7" />
|
||||||
|
<text>充值退款</text>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zhezhaopopfour">
|
||||||
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
充值余额
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<input type="number" v-model="datas.form.amount" placeholder="请输入充值余额" />
|
||||||
|
<view class="">
|
||||||
|
元
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<up-button text="确认" @tap="callTabletakeNumberEvent" type="primary" class="buttomStyle"
|
||||||
|
shape="circle"></up-button>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -166,16 +256,47 @@
|
||||||
import infoBox from "@/commons/utils/infoBox.js"
|
import infoBox from "@/commons/utils/infoBox.js"
|
||||||
import * as $Api from '@/http/yskApi/shop-user.js'
|
import * as $Api from '@/http/yskApi/shop-user.js'
|
||||||
import API from '../../http/classApi';
|
import API from '../../http/classApi';
|
||||||
|
|
||||||
|
import {
|
||||||
|
midfiyAccount
|
||||||
|
} from '@/http/yskApi/requestAll.js';
|
||||||
|
|
||||||
|
import {
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
hasPermission
|
||||||
|
} from '@/commons/utils/hasPermission.js';
|
||||||
let tabsCurrent = ref(0)
|
let tabsCurrent = ref(0)
|
||||||
const tabsList = ['用户列表', '导入用户']
|
const tabsList = ['用户列表', '导入用户']
|
||||||
const remarkModel = ref(null)
|
const remarkModel = ref(null)
|
||||||
const phoneModel = ref(null)
|
const phoneModel = ref(null)
|
||||||
const moreOperate = ref(null)
|
const moreOperate = ref(null)
|
||||||
|
let datas = reactive({
|
||||||
|
show: false,
|
||||||
|
form: {
|
||||||
|
operationType: 'in'
|
||||||
|
},
|
||||||
|
activeUser: null
|
||||||
|
})
|
||||||
|
let close = () => {
|
||||||
|
datas.form = {}
|
||||||
|
}
|
||||||
|
const confirm = () => {
|
||||||
|
datas.show = false;
|
||||||
|
};
|
||||||
|
|
||||||
function toAddUser() {
|
function toAddUser() {
|
||||||
go.to('PAGES_USER_ADD')
|
go.to('PAGES_USER_ADD')
|
||||||
}
|
}
|
||||||
|
let callTabletakeNumberEvent = async () => {
|
||||||
|
let res = await midfiyAccount({
|
||||||
|
id: datas.activeUser.id,
|
||||||
|
...datas.form
|
||||||
|
})
|
||||||
|
datas.show = false;
|
||||||
|
getUser()
|
||||||
|
}
|
||||||
const remarModelData = reactive({
|
const remarModelData = reactive({
|
||||||
remark: ''
|
remark: ''
|
||||||
})
|
})
|
||||||
|
|
@ -183,16 +304,41 @@
|
||||||
phone: ''
|
phone: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function sizeChange(e, name) {
|
||||||
|
datas.form[name] = e.detail.value
|
||||||
|
}
|
||||||
const goodsStockModel = ref(null)
|
const goodsStockModel = ref(null)
|
||||||
|
|
||||||
const moreOperateList = ['增减余额', '增减积分', '设为会员', '赠送券', '查看详情']
|
const moreOperateList = ['增减余额', '修改信息', ]
|
||||||
|
|
||||||
function moreOperateClick() {
|
function moreOperateClick(d) {
|
||||||
|
datas.activeUser = pageData.userList[d]
|
||||||
moreOperate.value.open()
|
moreOperate.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
++page.value
|
||||||
|
getUser()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function actionSheetClick(i) {
|
function actionSheetClick(i) {
|
||||||
console.log(i);
|
if (i == 0) {
|
||||||
|
hasPermission('允许修改会员余额').then(ele => {
|
||||||
|
if (ele) {
|
||||||
|
datas.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (i == 1) {
|
||||||
|
hasPermission('允许管理会员信息').then(ele => {
|
||||||
|
if (ele) {
|
||||||
|
go.to('PAGES_USER_ADD', {
|
||||||
|
item: JSON.stringify(datas.activeUser)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改备注弹窗展示
|
//修改备注弹窗展示
|
||||||
|
|
@ -304,7 +450,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchFunc() {
|
function searchFunc() {
|
||||||
console.log('searchFunc');
|
page.value = 0
|
||||||
|
getUser()
|
||||||
}
|
}
|
||||||
|
|
||||||
let showChecked = ref(false)
|
let showChecked = ref(false)
|
||||||
|
|
@ -343,17 +490,26 @@
|
||||||
function cateClick(cate) {
|
function cateClick(cate) {
|
||||||
console.log(cate);
|
console.log(cate);
|
||||||
}
|
}
|
||||||
|
let page = ref(0)
|
||||||
async function getUser() {
|
async function getUser() {
|
||||||
const {
|
const {
|
||||||
content
|
content
|
||||||
} = await $Api.queryAllShopUser()
|
} = await $Api.queryAllShopUser({
|
||||||
|
isVip: 1,
|
||||||
|
size: 10,
|
||||||
|
page: page.value,
|
||||||
|
name: pageData.search.value
|
||||||
|
})
|
||||||
|
if (page.value == 0) {
|
||||||
pageData.userList = content
|
pageData.userList = content
|
||||||
|
} else {
|
||||||
|
pageData.userList.push(...content)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
async function getAllShopInfo() {
|
async function getAllShopInfo() {
|
||||||
const res = await $Api.queryAllShopInfo()
|
const res = await $Api.queryAllShopInfo()
|
||||||
pageData.allShopInfo = res
|
pageData.allShopInfo = res
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
@ -367,12 +523,16 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.after-r,.after-l {
|
.after-r,
|
||||||
|
.after-l {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-l-r {
|
.line-l-r {
|
||||||
position: relative;
|
position: relative;
|
||||||
&::after,&:before{
|
|
||||||
|
&::after,
|
||||||
|
&:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -381,13 +541,16 @@
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: rgba(255, 255, 255, .3);
|
background-color: rgba(255, 255, 255, .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.after-r::after {
|
.after-r::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
|
|
@ -497,6 +660,99 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.zhezhaopop {
|
||||||
|
padding: 34rpx 32rpx;
|
||||||
|
width: 594rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
|
||||||
|
>view:first-child {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
>span:nth-child(2) {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(2) {
|
||||||
|
margin: 48rpx auto;
|
||||||
|
width: 492rpx;
|
||||||
|
height: 124rpx;
|
||||||
|
background: #FAFAFA;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zhezhaopopthree {
|
||||||
|
>view:nth-child(2) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
width: 186rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
border: 2rpx solid #E5E5E5;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectvalue {
|
||||||
|
color: #318AFE;
|
||||||
|
border: 2rpx solid #318AFE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.zhezhaopopfour {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
|
||||||
|
>view:nth-child(2) {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
>input {
|
||||||
|
width: 372rpx;
|
||||||
|
height: 84rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||||
|
border: 2rpx solid #E5E5E5;
|
||||||
|
padding-left: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view {
|
||||||
|
width: 124rpx;
|
||||||
|
height: 86rpx;
|
||||||
|
line-height: 84rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #F7F7FA;
|
||||||
|
border-radius: 0rpx 8rpx 8rpx 0rpx;
|
||||||
|
border: 2rpx solid #E5E5E5;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttomStyle {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
width: 506rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
|
||||||
429
pages.json
429
pages.json
|
|
@ -9,22 +9,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
// {
|
|
||||||
// "path": "pages/adStart/adStart",
|
|
||||||
// "style": {
|
|
||||||
// "navigationBarTitleText": "开屏广告",
|
|
||||||
// "navigationStyle": "custom"
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "pageId": "PAGES_INDEX",
|
|
||||||
// "path": "pages/index/indexCopy",
|
|
||||||
// "style": {
|
|
||||||
// "navigationBarTitleText": "首页",
|
|
||||||
// "navigationStyle": "custom",
|
|
||||||
// "enablePullDownRefresh": true
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
"pageId": "PAGES_INDEX",
|
"pageId": "PAGES_INDEX",
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
|
|
@ -44,58 +28,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pageId": "PAGES_REGISTER",
|
"pageId": "PAGES_ME",
|
||||||
"path": "pages/login/register",
|
"path": "pages/user/user",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "注册(自定义导航)",
|
"navigationBarTitleText": "我的(自定义导航)",
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_STATIC_AGREEMENT",
|
|
||||||
"path": "pages/login/serviceAgreement",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "服务协议"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_STATIC_POLICY",
|
|
||||||
"path": "pages/login/privacyPolicy",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "隐私政策"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_SCAN_LOGIN",
|
|
||||||
"path": "pages/index/scan",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "扫码登录中间页(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_PAY_ORDER",
|
|
||||||
"path": "pages/order/order",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "订单(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_PAY_ORDER_DETAIL",
|
|
||||||
"path": "pages/order/orderDetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "订单详情(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_REFUND_ORDER",
|
|
||||||
"path": "pages/order/refund",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "退款(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -126,323 +62,6 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择门店"
|
"navigationBarTitleText": "选择门店"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_USER_SETUP",
|
|
||||||
"path": "pages/userSetUp/userSetUp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "设置"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_RESET_PAYPWD",
|
|
||||||
"path": "pages/userSetUp/payPassword",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "支付密码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_RESET_PWD",
|
|
||||||
"path": "pages/userSetUp/accountPwd",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "账号密码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_SYS_CONFIG",
|
|
||||||
"path": "pages/userSetUp/systemSetUp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "系统设置"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_SAFE_CONFIG",
|
|
||||||
"path": "pages/userSetUp/safeSetUp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "安全设置"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_ACCOUNTSETUP",
|
|
||||||
"path": "pages/userSetUp/accountSetUp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "账号设置(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_ME",
|
|
||||||
"path": "pages/user/user",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "我的(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_ABOUTMCH",
|
|
||||||
"path": "pages/aboutMch/aboutMch",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "关于我们(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_QUICK_PAY",
|
|
||||||
"path": "pages/quickMoney/quickMoney",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "快捷收银"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_QR_CASHIER",
|
|
||||||
"path": "pages/quickMoney/qrCashier",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "聚合收款码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MCH_INFO",
|
|
||||||
"path": "pages/mchInfo/mchInfo",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商户信息"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_NOTICE_USER",
|
|
||||||
"path": "pages/noticeManage/noticeManage",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "通知人管理(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_NOTICE_BING_USER",
|
|
||||||
"path": "pages/noticeManage/bindUser",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "通知接收人管理",
|
|
||||||
"navigationBarBackgroundColor": "#fff"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_STAT",
|
|
||||||
"path": "pages/statPage/statPage",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "统计报表(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_NOTICE_LIST",
|
|
||||||
"path": "pages/noticePage/noticeList",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "全部公告",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_NOTICE_DETAIL",
|
|
||||||
"path": "pages/noticePage/noticeDetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "公告详情"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_APPLYMENT",
|
|
||||||
"path": "pages/applyment/list",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "进件管理",
|
|
||||||
"navigationBarBackgroundColor": "#f7f7f7",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_ADDAPP",
|
|
||||||
"path": "pages/applyment/addApp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "添加应用",
|
|
||||||
"navigationBarBackgroundColor": "#f7f7f7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_APPLYMENT_BUSINESS",
|
|
||||||
"path": "pages/applyment/business",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商户管理",
|
|
||||||
"navigationBarBackgroundColor": "#f7f7f7",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_APPLYMENT_SELECETDPAY",
|
|
||||||
"path": "pages/applyment/selectedPay",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "选择进件渠道",
|
|
||||||
"navigationBarBackgroundColor": "#f7f7f7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_APPLYMENT_H5_DETAIL",
|
|
||||||
"path": "pages/applyment/h5/applyDetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "进件详情",
|
|
||||||
"navigationBarBackgroundColor": "#F5F6FC"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_APPLYMENT_H5_OPTION",
|
|
||||||
"path": "pages/applyment/h5/applyOption",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "进件配置/签约开通",
|
|
||||||
"navigationBarBackgroundColor": "#F5F6FC"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_FORGET_PASSWORD",
|
|
||||||
"path": "pages/login/forgetPassword",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "找回密码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_SET_NEW_PASSWORD",
|
|
||||||
"path": "pages/login/setNewPassword",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "设置新密码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_EDIT_FORM",
|
|
||||||
"path": "pages/userSetUp/editForm",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "修改用户姓名",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_AD_H5",
|
|
||||||
"path": "pages/adH5/adH5",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_AD_ALIOPERATION",
|
|
||||||
"path": "pages/aliOperation/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "支付宝代运营授权(自定义)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_CENTER",
|
|
||||||
"path": "pages/memberCenter/index",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER",
|
|
||||||
"path": "pages/memberCenter/member/member",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员管理(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_EDIT",
|
|
||||||
"path": "pages/memberCenter/member/edit",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员编辑(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_DETAIL",
|
|
||||||
"path": "pages/memberCenter/member/detail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员详情(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_RECHARGE_RULE",
|
|
||||||
"path": "pages/memberCenter/rechargeRule/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "充值规则管理(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_RECHARGE_RULE_EDIT",
|
|
||||||
"path": "pages/memberCenter/rechargeRule/edit",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "充值规则编辑(自定义导航)",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_ACCOUNT_HISTORY",
|
|
||||||
"path": "pages/memberCenter/accountHistory/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员账户流水(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_ACCOUNT_HISTORY_DETAIL",
|
|
||||||
"path": "pages/memberCenter/accountHistory/detail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "流水详情"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_RECHARGE_RECORD",
|
|
||||||
"path": "pages/memberCenter/rechargeRecord/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员充值记录(自定义导航)",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_RECHARGE_RECORD_DETAIL",
|
|
||||||
"path": "pages/memberCenter/rechargeRecord/detail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "充值记录详情"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_MEMBER_RECHARGE_MEMBERMANUAL",
|
|
||||||
"path": "pages/memberCenter/member/memberManual",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "会员调账"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pageId": "PAGES_LIST_SEARCH",
|
|
||||||
"path": "pages/list/search",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "搜索"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/release/release",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
|
|
||||||
}, {
|
|
||||||
"pageId": "PAGES_WEBVIEW",
|
|
||||||
"path": "pages/webview/webview"
|
|
||||||
}, {
|
|
||||||
"pageId": "PAGES_INVOICE",
|
|
||||||
"path": "pages/invoice/invoice"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
|
|
@ -1138,6 +757,17 @@
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"root": "pageBwc",
|
||||||
|
"pages": [{
|
||||||
|
"pageId": "PAGES_BWC",
|
||||||
|
"path": "index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "霸王餐"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"root": "pageBooking",
|
"root": "pageBooking",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
|
@ -1285,8 +915,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品销售排行"
|
"navigationBarTitleText": "商品销售排行"
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"root": "pageLineUp",
|
"root": "pageLineUp",
|
||||||
|
|
@ -1400,10 +1029,8 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "账单付款记录"
|
"navigationBarTitleText": "账单付款记录"
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"root": "pagePrinter",
|
"root": "pagePrinter",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
|
@ -1450,12 +1077,22 @@
|
||||||
{
|
{
|
||||||
"pageId": "PAGES_GOODS_GROUP_EDIT_GOODS",
|
"pageId": "PAGES_GOODS_GROUP_EDIT_GOODS",
|
||||||
"path": "edit-group-goods/edit-group-goods",
|
"path": "edit-group-goods/edit-group-goods",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
|
||||||
"navigationBarTitleText": "管理商品"
|
"navigationBarTitleText": "管理商品"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "pageNotification",
|
||||||
|
"pages": [{
|
||||||
|
"pageId": "PAGES_NOTIFICATION_INDEX",
|
||||||
|
"path": "index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "订阅通知"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
@ -1485,15 +1122,7 @@
|
||||||
"iconPath": "static/tabImg/index.png",
|
"iconPath": "static/tabImg/index.png",
|
||||||
"selectedIconPath": "static/tabImg/index-select.png",
|
"selectedIconPath": "static/tabImg/index-select.png",
|
||||||
"text": "首页"
|
"text": "首页"
|
||||||
}
|
},
|
||||||
// ,
|
|
||||||
// {
|
|
||||||
// "pagePath": "pages/order/order",
|
|
||||||
// "iconPath": "static/tabImg/order.png",
|
|
||||||
// "selectedIconPath": "static/tabImg/order-select.png",
|
|
||||||
// "text": "订单"
|
|
||||||
// }
|
|
||||||
,
|
|
||||||
{
|
{
|
||||||
"pagePath": "pages/user/user",
|
"pagePath": "pages/user/user",
|
||||||
"iconPath": "static/tabImg/user.png",
|
"iconPath": "static/tabImg/user.png",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<view class="index-selected">
|
<view class="index-selected">
|
||||||
<view class="index-time">
|
<view class="index-time">
|
||||||
<block v-for="v in timeList" :key="v.value">
|
<block v-for="v in timeList" :key="v.value">
|
||||||
<view class="time-item flex-center" :class="{ 'time-active': vdata.timeSelected == v.value }" @tap.stop="changeTimeFunc(v.value)">
|
<view class="time-item flex-center" :class="{ 'time-active': vdata.timeSelected == v.value }"
|
||||||
|
@tap.stop="changeTimeFunc(v.value)">
|
||||||
{{ v.title }}
|
{{ v.title }}
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
@ -14,20 +15,20 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="receipts-money">
|
<view class="receipts-money">
|
||||||
<text class="money-title">成交金额 (元)</text>
|
<text class="money-title">成交金额 (元)</text>
|
||||||
<view class="money-num">{{ list.sale.incomeAmountAll}}</view>
|
<view class="money-num">{{ list?list.sale.incomeAmountAll:0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-list">
|
<view class="money-list">
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">消费笔数</text>
|
<text class="money-title">消费笔数</text>
|
||||||
<view class="money-num">{{ list.vip.useNum }}</view>
|
<view class="money-num">{{ list?list.vip.useNum:0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">退款金额 (元)</text>
|
<text class="money-title">退款金额 (元)</text>
|
||||||
<view class="money-num">{{ list.sale.outAmount}}</view>
|
<view class="money-num">{{ list?list.sale.outAmount:0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">消费笔数</text>
|
<text class="money-title">消费金额</text>
|
||||||
<view class="money-num">{{ list.count.useNum }}</view>
|
<view class="money-num">{{ list?list.vip.useAmount:0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-list" v-if="vdata.memberIsShow">
|
<view class="money-list" v-if="vdata.memberIsShow">
|
||||||
|
|
@ -53,8 +54,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import {
|
||||||
import { $indexStatistics, $memberInfoCount } from '@/http/apiManager.js';
|
ref,
|
||||||
|
reactive,
|
||||||
|
onMounted
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
$indexStatistics,
|
||||||
|
$memberInfoCount
|
||||||
|
} from '@/http/apiManager.js';
|
||||||
import cal from '@/commons/utils/cal.js';
|
import cal from '@/commons/utils/cal.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import ak from '@/commons/utils/ak.js';
|
import ak from '@/commons/utils/ak.js';
|
||||||
|
|
@ -73,11 +81,22 @@ onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
});
|
});
|
||||||
const emits = defineEmits(['click']);
|
const emits = defineEmits(['click']);
|
||||||
const timeList = [
|
const timeList = [{
|
||||||
{ title: '今天', value: 'today' },
|
title: '今天',
|
||||||
{ title: '昨天', value: 'yesterday' },
|
value: 'today'
|
||||||
{ title: '近7天', value: 'circumference' },
|
},
|
||||||
{ title: '近30天', value: 'moon' }
|
{
|
||||||
|
title: '昨天',
|
||||||
|
value: 'yesterday'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '近7天',
|
||||||
|
value: 'circumference'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '近30天',
|
||||||
|
value: 'moon'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
let list = ref()
|
let list = ref()
|
||||||
const vdata = reactive({
|
const vdata = reactive({
|
||||||
|
|
@ -89,6 +108,7 @@ const vdata = reactive({
|
||||||
memberIsShow: false //是否开启会员模块
|
memberIsShow: false //是否开启会员模块
|
||||||
});
|
});
|
||||||
const memberData = reactive({});
|
const memberData = reactive({});
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
let startTime, endTime;
|
let startTime, endTime;
|
||||||
if (vdata.timeSelected == 'today') {
|
if (vdata.timeSelected == 'today') {
|
||||||
|
|
@ -128,7 +148,9 @@ function changeTimeFunc(val) {
|
||||||
// 根据选择请求数据
|
// 根据选择请求数据
|
||||||
function refData() {
|
function refData() {
|
||||||
// 获取 统计数据
|
// 获取 统计数据
|
||||||
$indexStatistics(vdata.timeSelected).then(({ bizData }) => {
|
$indexStatistics(vdata.timeSelected).then(({
|
||||||
|
bizData
|
||||||
|
}) => {
|
||||||
vdata.payAmount = bizData.totalSuccAmt;
|
vdata.payAmount = bizData.totalSuccAmt;
|
||||||
vdata.payCount = bizData.totalSuccNum;
|
vdata.payCount = bizData.totalSuccNum;
|
||||||
vdata.refundAmount = bizData.totalRefundAmt;
|
vdata.refundAmount = bizData.totalRefundAmt;
|
||||||
|
|
@ -141,12 +163,16 @@ function scanFunc() {
|
||||||
unionScan.scan(true).then((res) => {
|
unionScan.scan(true).then((res) => {
|
||||||
// 登录类型
|
// 登录类型
|
||||||
if (res.type == unionScan.QR_TYPE_LOGIN) {
|
if (res.type == unionScan.QR_TYPE_LOGIN) {
|
||||||
return go.to('PAGES_SCAN_LOGIN', { qrcodeNo: res.originQrVal });
|
return go.to('PAGES_SCAN_LOGIN', {
|
||||||
|
qrcodeNo: res.originQrVal
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 二维码
|
// 二维码
|
||||||
if (res.type == unionScan.QR_TYPE_QRC) {
|
if (res.type == unionScan.QR_TYPE_QRC) {
|
||||||
return go.to('PAGES_APP_CODE_BIND', { qrcId: res.bizValue });
|
return go.to('PAGES_APP_CODE_BIND', {
|
||||||
|
qrcId: res.bizValue
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -173,11 +199,17 @@ function scanFunc() {
|
||||||
return `${y}-${m}-${d}`
|
return `${y}-${m}-${d}`
|
||||||
}
|
}
|
||||||
const getMemberData = () => {
|
const getMemberData = () => {
|
||||||
$memberInfoCount({ queryDateRange: vdata.timeSelected }).then(({ bizData }) => {
|
$memberInfoCount({
|
||||||
|
queryDateRange: vdata.timeSelected
|
||||||
|
}).then(({
|
||||||
|
bizData
|
||||||
|
}) => {
|
||||||
Object.assign(memberData, bizData);
|
Object.assign(memberData, bizData);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
defineExpose({ refData });
|
defineExpose({
|
||||||
|
refData
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -192,9 +224,11 @@ defineExpose({ refData });
|
||||||
background: $jeepay-bg-primary;
|
background: $jeepay-bg-primary;
|
||||||
backdrop-filter: blur(20rpx);
|
backdrop-filter: blur(20rpx);
|
||||||
box-shadow: 0 50rpx 70rpx -60rpx rgba(0, 65, 164, 0.5);
|
box-shadow: 0 50rpx 70rpx -60rpx rgba(0, 65, 164, 0.5);
|
||||||
|
|
||||||
.index-selected {
|
.index-selected {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.index-time {
|
.index-time {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -204,6 +238,7 @@ defineExpose({ refData });
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
background-color: rgba($color: #fff, $alpha: 0.1);
|
background-color: rgba($color: #fff, $alpha: 0.1);
|
||||||
|
|
||||||
.time-item {
|
.time-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
// width: 120rpx;
|
// width: 120rpx;
|
||||||
|
|
@ -212,34 +247,40 @@ defineExpose({ refData });
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(255, 255, 255, 0.75);
|
color: rgba(255, 255, 255, 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-active {
|
.time-active {
|
||||||
background-color: $J-bg-ff;
|
background-color: $J-bg-ff;
|
||||||
color: $J-color-t21;
|
color: $J-color-t21;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.index-scan {
|
.index-scan {
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background-color: rgba($color: #fff, $alpha: 0.1);
|
background-color: rgba($color: #fff, $alpha: 0.1);
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 41rpx;
|
width: 41rpx;
|
||||||
height: 35rpx;
|
height: 35rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.receipts-money {
|
.receipts-money {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
color: $J-color-tff;
|
color: $J-color-tff;
|
||||||
|
|
||||||
.money-num {
|
.money-num {
|
||||||
font-size: 70rpx;
|
font-size: 70rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-list {
|
.money-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -247,6 +288,7 @@ defineExpose({ refData });
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $J-color-tff;
|
color: $J-color-tff;
|
||||||
|
|
||||||
.money-item {
|
.money-item {
|
||||||
.money-num {
|
.money-num {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
@ -254,12 +296,14 @@ defineExpose({ refData });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-title {
|
.money-title {
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: $J-color-tSff;
|
color: $J-color-tSff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-money {
|
.quick-money {
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,448 @@
|
||||||
|
<template>
|
||||||
|
<view class="mask" v-if="show" @tap="close">
|
||||||
|
<view class="box" @tap.stop="nullFunction">
|
||||||
|
<view class="u-flex u-relative u-row-center u-p-30 top">
|
||||||
|
<view class="font-bold u-font-32">筛选日期时间</view>
|
||||||
|
<view class="close" @tap="close">
|
||||||
|
<uni-icons type="closeempty" size="24"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- <view class="u-p-30 u-flex u-flex-wrap gap-20 fastTime">
|
||||||
|
<view class="item" v-for="(item,index) in fastTime" :key="index" @tap="changeTime(item.key)">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<picker-view :immediate-change="true" @pickend="pickend" :value="value" @change="bindChange"
|
||||||
|
class="picker-view">
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in minutes" :key="index">{{item}}分</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}秒</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
<view class="u-text-center color-999">至</view>
|
||||||
|
<picker-view :immediate-change="true" :value="value1" @pickend="pickend1" @change="bindChange1"
|
||||||
|
class="picker-view">
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in days1" :key="index">{{item}}日</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in minutes" :key="index">{{item}}分</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}秒</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
|
||||||
|
<!-- 站位 -->
|
||||||
|
<view style="height: 80px;"></view>
|
||||||
|
<view class="fixed_b">
|
||||||
|
<my-button shape="circle" @tap="confirm">确定</my-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import myButton from "@/components/my-components/my-button.vue"
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
const $nowDate = new Date()
|
||||||
|
const nowDate = {
|
||||||
|
year: $nowDate.getFullYear(),
|
||||||
|
month: $nowDate.getMonth() + 1,
|
||||||
|
day: $nowDate.getDate(),
|
||||||
|
hours: $nowDate.getHours(),
|
||||||
|
minutes: $nowDate.getMinutes(),
|
||||||
|
seconds: $nowDate.getSeconds()
|
||||||
|
}
|
||||||
|
const yearsLen = 30
|
||||||
|
const years = new Array(yearsLen).fill(1).map((v, index) => {
|
||||||
|
return nowDate.year - index
|
||||||
|
}).reverse()
|
||||||
|
const months = new Array(12).fill(1).map((v, index) => {
|
||||||
|
return index + 1
|
||||||
|
})
|
||||||
|
const days = ref(new Array(getMonthArea($nowDate, 'end').getDate()).fill(1).map((v, index) => {
|
||||||
|
return index + 1
|
||||||
|
}))
|
||||||
|
const days1 = ref(new Array(getMonthArea($nowDate, 'end').getDate()).fill(1).map((v, index) => {
|
||||||
|
return index + 1
|
||||||
|
}))
|
||||||
|
const hours = new Array(24).fill(1).map((v, index) => {
|
||||||
|
return index
|
||||||
|
})
|
||||||
|
const minutes = new Array(60).fill(1).map((v, index) => {
|
||||||
|
return index
|
||||||
|
})
|
||||||
|
const seconds = new Array(60).fill(1).map((v, index) => {
|
||||||
|
return index
|
||||||
|
})
|
||||||
|
const fastTime = reactive([{
|
||||||
|
title: '今日',
|
||||||
|
key: 'now'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '昨日',
|
||||||
|
key: 'prve'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '本月',
|
||||||
|
key: 'nowMonth'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '上月',
|
||||||
|
key: 'prveMonth'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function setPrveDay() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setNowMoneth() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setprveMoneth() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function setDay(start, end) {
|
||||||
|
value.value = [
|
||||||
|
start.year,
|
||||||
|
start.month,
|
||||||
|
start.day,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
]
|
||||||
|
value1.value = [
|
||||||
|
end.year,
|
||||||
|
end.month,
|
||||||
|
end.day,
|
||||||
|
23,
|
||||||
|
59,
|
||||||
|
59,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTime(key) {
|
||||||
|
const yearIndex = years.findIndex(v => v == nowDate.year)
|
||||||
|
const prveyearIndex = years.findIndex(v => v == nowDate.year) - 1
|
||||||
|
const nowMonthIndex = nowDate.month - 1
|
||||||
|
const nowDayIndex = nowDate.day - 1
|
||||||
|
const dataMap = {
|
||||||
|
now: function() {
|
||||||
|
return {
|
||||||
|
start: {
|
||||||
|
year: yearIndex,
|
||||||
|
month: nowMonthIndex,
|
||||||
|
day: nowDayIndex
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
year: yearIndex,
|
||||||
|
month: nowMonthIndex,
|
||||||
|
day: nowDayIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
prve: function() {
|
||||||
|
const oneDay=1000*60*60*24
|
||||||
|
const date=new Date(new Date(nowDate.year,nowDate.month,nowDate.day,0,0,0).getTime()-oneDay)
|
||||||
|
return {
|
||||||
|
start: {
|
||||||
|
year:years.findIndex(v=>v==date.getFullYear()),
|
||||||
|
month:date.getMonth()-1<0?11:date.getMonth()-1,
|
||||||
|
day: date.getDate()-1
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
year:years.findIndex(v=>v==date.getFullYear()),
|
||||||
|
month:date.getMonth()-1<0?11:date.getMonth()-1,
|
||||||
|
day: date.getDate()-1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nowMonth: function() {
|
||||||
|
return {
|
||||||
|
start: {
|
||||||
|
year:yearIndex,
|
||||||
|
month:nowMonthIndex,
|
||||||
|
day: 0
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
year:yearIndex,
|
||||||
|
month:nowMonthIndex,
|
||||||
|
day:new Date(nowDate.year, nowDate.month , 0).getDate() - 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
prveMonth: function() {
|
||||||
|
const oneDay=1000*60*60*24
|
||||||
|
const date=new Date(new Date(nowDate.year, nowDate.month-1,0,0,0).getTime()-oneDay)
|
||||||
|
console.log(date.getMonth());
|
||||||
|
return {
|
||||||
|
start: {
|
||||||
|
year:years.findIndex(v=>v==date.getFullYear()),
|
||||||
|
month:date.getMonth(),
|
||||||
|
day: 0
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
year:years.findIndex(v=>v==date.getFullYear()),
|
||||||
|
month:date.getMonth(),
|
||||||
|
day: date.getDate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const data = dataMap[key]()
|
||||||
|
setDay(data.start, data.end)
|
||||||
|
changeDays(false,value.value)
|
||||||
|
changeDays(true,value1.value)
|
||||||
|
|
||||||
|
console.log(value1.value);
|
||||||
|
const start = returnDateString(value.value)
|
||||||
|
const end = returnDateString(value1.value)
|
||||||
|
|
||||||
|
emits('confirm', {
|
||||||
|
text: `${start}——${end}`,
|
||||||
|
start,
|
||||||
|
end
|
||||||
|
})
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
let value = ref([
|
||||||
|
years.length - 1,
|
||||||
|
nowDate.month - 1,
|
||||||
|
nowDate.day - 1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
])
|
||||||
|
let value1 = ref([
|
||||||
|
years.length - 1,
|
||||||
|
nowDate.month - 1,
|
||||||
|
nowDate.day - 1,
|
||||||
|
23,
|
||||||
|
59,
|
||||||
|
59,
|
||||||
|
])
|
||||||
|
|
||||||
|
let show = ref(false)
|
||||||
|
const emits = defineEmits('close', 'open', 'confirm')
|
||||||
|
|
||||||
|
function toggle() {
|
||||||
|
show.value = !show.value
|
||||||
|
if (show.value) {
|
||||||
|
emits('open', true)
|
||||||
|
} else {
|
||||||
|
emits('close', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
show.value = false
|
||||||
|
emits('close', false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
show.value = true
|
||||||
|
emits('open', true)
|
||||||
|
}
|
||||||
|
|
||||||
|
function returnDateString(arr) {
|
||||||
|
const year = years[arr[0]]
|
||||||
|
const month = arr[1] + 1
|
||||||
|
const day = arr[2] + 1
|
||||||
|
const hour = ('0' + arr[3]).slice(-2)
|
||||||
|
const min = ('0' + arr[4]).slice(-2)
|
||||||
|
const sen = ('0' + arr[5]).slice(-2)
|
||||||
|
return `${year}-${month}-${day} ${hour}:${min}:${sen}`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function confirm(e) {
|
||||||
|
const start = returnDateString(value.value)
|
||||||
|
const end = returnDateString(value1.value)
|
||||||
|
console.log(start);
|
||||||
|
console.log(end);
|
||||||
|
emits('confirm', {
|
||||||
|
text: `${start}——${end}`,
|
||||||
|
start,
|
||||||
|
end
|
||||||
|
})
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
|
||||||
|
function returnMonthStart(arr) {
|
||||||
|
return new Date(years[arr[0]], months[arr[1]] - 1, 1).getDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
function returnMonthEnd(arr) {
|
||||||
|
return new Date(years[arr[0]], months[arr[1]], 0).getDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeDays(isDays1,arr){
|
||||||
|
const end = returnMonthEnd(arr)
|
||||||
|
if (end) {
|
||||||
|
if(isDays1){
|
||||||
|
days1.value= new Array(end).fill(1).map((v,
|
||||||
|
index) => {
|
||||||
|
return index + 1
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
days.value= new Array(end).fill(1).map((v,
|
||||||
|
index) => {
|
||||||
|
return index + 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function bindChange(e) {
|
||||||
|
value.value = e.detail.value
|
||||||
|
changeDays(false, e.detail.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function bindChange1(e) {
|
||||||
|
value1.value = e.detail.value
|
||||||
|
changeDays(true, e.detail.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDayDate(date = new Date(), type) {
|
||||||
|
const now = date
|
||||||
|
if (type === 'start') {
|
||||||
|
const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||||
|
return startOfDay
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
const endOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
||||||
|
return endOfDay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMonthArea(date = new Date(), type) {
|
||||||
|
let now = date
|
||||||
|
let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1);
|
||||||
|
let currentMonthEnd = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
|
||||||
|
if (type === 'start') {
|
||||||
|
return currentMonthStart
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
return currentMonthEnd;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
start: currentMonthStart,
|
||||||
|
end: currentMonthEnd
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function nullFunction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function pickend(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
function pickend1(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
close,
|
||||||
|
open,
|
||||||
|
confirm,
|
||||||
|
toggle
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.fastTime {
|
||||||
|
.item {
|
||||||
|
background-color: rgb(247, 247, 247);
|
||||||
|
padding: 6rpx 40rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .7);
|
||||||
|
|
||||||
|
.box {
|
||||||
|
position: absolute;
|
||||||
|
background-color: #fff;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed_b {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 30rpx;
|
||||||
|
z-index: 100;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker-view {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
line-height: 34px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,214 @@
|
||||||
|
<template>
|
||||||
|
<view class="statistics">
|
||||||
|
<view class="statisticsBox">
|
||||||
|
|
||||||
|
<view class="time-wrapper">
|
||||||
|
<view v-for="(v, i) in timeList" :key="i" class="timelistbox">
|
||||||
|
<view class="time-item" @tap="changeTime(v.value)" :class="{ 'time-selected':v.value==selected }">
|
||||||
|
{{v.label}}
|
||||||
|
</view>
|
||||||
|
<view class="xian" v-if="v.value==selected "> </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<ul class="payList">
|
||||||
|
<li v-for="item in list" :key="item.id">
|
||||||
|
<view class="">
|
||||||
|
{{item.payType}}
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{item.payAmount}}
|
||||||
|
</view>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<datePickerview @confirm="datePickerConfirm" ref="datePicker" style="z-index: 999;"></datePickerview>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
summaryTrade,
|
||||||
|
} from '@/http/yskApi/requestAll.js';
|
||||||
|
import dayjs from 'dayjs' //时间格式库
|
||||||
|
import {
|
||||||
|
getCurrentInstance,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import datePickerview from './my-date-pickerview.vue'
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
let selected = ref('today')
|
||||||
|
let list = ref()
|
||||||
|
const emit = defineEmits(['totalRevenue'])
|
||||||
|
const timeList = [{
|
||||||
|
label: '今天',
|
||||||
|
value: 'today'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '昨天',
|
||||||
|
value: 'yesterday'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '本周',
|
||||||
|
value: 'circumference'
|
||||||
|
}, {
|
||||||
|
label: '本月',
|
||||||
|
value: 'moon'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自定义',
|
||||||
|
value: 'custom'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const currentInstance = getCurrentInstance()
|
||||||
|
onLoad((options) => {
|
||||||
|
getlist()
|
||||||
|
});
|
||||||
|
|
||||||
|
function getlist(start, end) {
|
||||||
|
let startTime, endTime;
|
||||||
|
if (selected.value == 'today') {
|
||||||
|
startTime = dayjs().format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
|
endTime = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
} else if (selected.value == 'yesterday') {
|
||||||
|
startTime = formatTime() + ' 00:00:00'
|
||||||
|
endTime = formatTime() + ' 23:59:59'
|
||||||
|
} else if (selected.value == 'circumference') {
|
||||||
|
var now = new Date();
|
||||||
|
var nowTime = now.getTime();
|
||||||
|
var day = now.getDay();
|
||||||
|
var oneDayTime = 24 * 60 * 60 * 1000;
|
||||||
|
//显示周一
|
||||||
|
var MondayTime = nowTime - (day - 1) * oneDayTime;
|
||||||
|
//显示周日
|
||||||
|
var SundayTime = nowTime + (7 - day) * oneDayTime;
|
||||||
|
startTime = dayjs(MondayTime).format('YYYY-MM-DD 00:00:00')
|
||||||
|
endTime = dayjs(SundayTime).format('YYYY-MM-DD 23:59:59')
|
||||||
|
} else if (selected.value == 'moon') {
|
||||||
|
startTime = dayjs().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
|
endTime = dayjs().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
} else if (selected.value == 'custom') {
|
||||||
|
startTime = start
|
||||||
|
endTime = end
|
||||||
|
}
|
||||||
|
summaryTrade({
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
startTime,
|
||||||
|
endTime,
|
||||||
|
}).then((res) => {
|
||||||
|
list.value = res.sale.payCount.slice(0, 4)
|
||||||
|
emit('totalRevenue',res.sale.incomeAmountAll)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function datePickerConfirm(e) {
|
||||||
|
getlist(e.start, e.end)
|
||||||
|
}
|
||||||
|
// 获取当前时间
|
||||||
|
function getdate() {
|
||||||
|
const dt = new Date();
|
||||||
|
const y = dt.getFullYear();
|
||||||
|
const m = (dt.getMonth() + 1 + "").padStart(2, "0");
|
||||||
|
const d = (dt.getDate() + "").padStart(2, "0");
|
||||||
|
const hh = (dt.getHours() + "").padStart(2, "0");
|
||||||
|
const mm = (dt.getMinutes() + "").padStart(2, "0");
|
||||||
|
const ss = (dt.getSeconds() + "").padStart(2, "0");
|
||||||
|
return `${y}-${m}-${d}`;
|
||||||
|
}
|
||||||
|
// 获取昨天时间
|
||||||
|
const formatTime = () => {
|
||||||
|
let strDate = getdate()
|
||||||
|
let dateFormat = new Date(strDate);
|
||||||
|
dateFormat = dateFormat.setDate(dateFormat.getDate() - 1);
|
||||||
|
dateFormat = new Date(dateFormat);
|
||||||
|
let y = dateFormat.getFullYear()
|
||||||
|
let m = (dateFormat.getMonth() + 1).toString().padStart(2, '0')
|
||||||
|
let d = dateFormat.getDate().toString().padStart(2, '0')
|
||||||
|
return `${y}-${m}-${d}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTime(e) {
|
||||||
|
selected.value = e
|
||||||
|
if (e == 'custom') {
|
||||||
|
currentInstance.ctx.$refs.datePicker.toggle()
|
||||||
|
} else {
|
||||||
|
getlist()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
ul,
|
||||||
|
li {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistics {
|
||||||
|
padding: 0 28rpx;
|
||||||
|
|
||||||
|
.statisticsBox {
|
||||||
|
width: 694rpx;
|
||||||
|
height: 260rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||||
|
|
||||||
|
.time-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding-bottom: 16rpx;
|
||||||
|
padding-top: 16rpx;
|
||||||
|
margin-top: 54rpx;
|
||||||
|
|
||||||
|
.timelistbox {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.time-item {
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xian {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 3rpx;
|
||||||
|
background-color: #318AFE;
|
||||||
|
// position: absolute;
|
||||||
|
// left: 16rpx;
|
||||||
|
// bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-selected {
|
||||||
|
color: #318afe;
|
||||||
|
font-size: 32rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payList {
|
||||||
|
display: flex;
|
||||||
|
// justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
|
||||||
|
>li {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
width: 170rpx;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -2,18 +2,22 @@
|
||||||
<template>
|
<template>
|
||||||
<JeepayBackground :bgColorStyle="{}">
|
<JeepayBackground :bgColorStyle="{}">
|
||||||
<!-- 导航条 -->
|
<!-- 导航条 -->
|
||||||
<JeepayCustomNavbar title="首页" textColor="#fff"
|
<JeepayCustomNavbar title="首页" textColor="#fff" bgDefaultColor="#318AFE" />
|
||||||
bgDefaultColor="linear-gradient(270deg, rgba(72, 192, 255, 1) 0%, rgba(51, 157, 255, 1) 100%)" />
|
<view class="income">
|
||||||
|
<view>总收入</view>
|
||||||
|
<view>¥{{totalRevenuedata}}</view>
|
||||||
|
<view>后海&双屿</view>
|
||||||
|
</view>
|
||||||
<!-- 统计 or 快捷扫码 -->
|
<!-- 统计 or 快捷扫码 -->
|
||||||
<Stats ref="statsRef" />
|
<!-- <Stats ref="statsRef" /> -->
|
||||||
|
<statistics @totalRevenue="totalRevenue"></statistics>
|
||||||
<!-- 导航栅格 -->
|
<!-- 导航栅格 -->
|
||||||
<JeepayNavigation :navList="navList" type="grid" />
|
<JeepayNavigation :navList="navList" type="grid" />
|
||||||
</JeepayBackground>
|
</JeepayBackground>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref,
|
ref,
|
||||||
|
|
@ -32,20 +36,22 @@
|
||||||
} from '@/http/apiManager.js';
|
} from '@/http/apiManager.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import Stats from './components/Stats.vue';
|
import Stats from './components/Stats.vue';
|
||||||
import registerPush from '@/commons/utils/pushmsg/registerPush.js';
|
import statistics from './components/statistics.vue'
|
||||||
import pushMsgManage from '@/commons/utils/pushmsg/pushMsgManage.js';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onPullDownRefresh,
|
onPullDownRefresh,
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import storageManage from '@/commons/utils/storageManage.js';
|
import storageManage from '@/commons/utils/storageManage.js';
|
||||||
import {
|
import {
|
||||||
$adList
|
hasPermission
|
||||||
} from '@/http/apiManager.js';
|
} from '@/commons/utils/hasPermission.js'
|
||||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
|
||||||
uni.hideTabBar()
|
uni.hideTabBar()
|
||||||
onLoad((options) => {});
|
onLoad((options) => {
|
||||||
|
});
|
||||||
|
let totalRevenuedata = ref()
|
||||||
|
let totalRevenue= (d)=>{
|
||||||
|
totalRevenuedata.value=d
|
||||||
|
}
|
||||||
// 导航列表
|
// 导航列表
|
||||||
const navList = [
|
const navList = [
|
||||||
// {
|
// {
|
||||||
|
|
@ -119,11 +125,11 @@
|
||||||
icon: '/static/indexImg/icon-work.svg',
|
icon: '/static/indexImg/icon-work.svg',
|
||||||
pageUrl: 'PAGES_WORK_INDEX',
|
pageUrl: 'PAGES_WORK_INDEX',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '极速开票',
|
// title: '极速开票',
|
||||||
icon: '/static/indexImg/red-envelope.svg',
|
// icon: '/static/indexImg/red-envelope.svg',
|
||||||
pageUrl: 'PAGES_INVOICE'
|
// pageUrl: 'PAGES_INVOICE'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '排队',
|
title: '排队',
|
||||||
icon: '/static/indexImg/icon-line-up.svg',
|
icon: '/static/indexImg/icon-line-up.svg',
|
||||||
|
|
@ -144,6 +150,11 @@
|
||||||
icon: '/static/coupon/icon_coupon.svg',
|
icon: '/static/coupon/icon_coupon.svg',
|
||||||
pageUrl: 'PAGES_COUPON_INDEX',
|
pageUrl: 'PAGES_COUPON_INDEX',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '订阅通知',
|
||||||
|
icon: '/static/indexImg/icon-notification.svg',
|
||||||
|
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||||
|
},
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '进销存',
|
// // // title: '进销存',
|
||||||
// // // icon: '/static/indexImg/icon-invoicing.svg',
|
// // // icon: '/static/indexImg/icon-invoicing.svg',
|
||||||
|
|
@ -219,6 +230,10 @@
|
||||||
// pageUrl: 'PAGES_AD_LIST',
|
// pageUrl: 'PAGES_AD_LIST',
|
||||||
// entId: 'ENT_ADVERT_CONTROL'
|
// entId: 'ENT_ADVERT_CONTROL'
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: '营销红包',
|
// title: '营销红包',
|
||||||
// icon: '/static/indexImg/red-envelope.svg',
|
// icon: '/static/indexImg/red-envelope.svg',
|
||||||
|
|
@ -226,15 +241,10 @@
|
||||||
// entId: 'ENT_MCH_MEMBER'
|
// entId: 'ENT_MCH_MEMBER'
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// {
|
|
||||||
// title: '优惠券',
|
|
||||||
// icon: '/static/indexImg/red-envelope.svg',
|
|
||||||
// pageUrl: 'PAGES_COUPON_INDEX'
|
|
||||||
// },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '退出登录',
|
title: '退出登录',
|
||||||
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
icon: '/static/indexImg/icon-login-out.svg',
|
||||||
pageUrl: 'PAGES_LOGIN',
|
pageUrl: 'PAGES_LOGIN',
|
||||||
clickFunc: () => {
|
clickFunc: () => {
|
||||||
storageManage.cleanByLogout()
|
storageManage.cleanByLogout()
|
||||||
|
|
@ -250,7 +260,6 @@
|
||||||
navList.splice(index, 1);
|
navList.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const statsRef = ref();
|
|
||||||
|
|
||||||
const vdata = reactive({
|
const vdata = reactive({
|
||||||
noticeList: [], // 公告列表
|
noticeList: [], // 公告列表
|
||||||
|
|
@ -313,4 +322,30 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
.income {
|
||||||
|
>view {
|
||||||
|
text-align: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(1) {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 84rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(2) {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(3) {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -14,7 +14,8 @@
|
||||||
<!-- 不需要label, 需要修改: label-width="0" -->
|
<!-- 不需要label, 需要修改: label-width="0" -->
|
||||||
<uni-forms ref="loginFormRef" label-width="0" :model="vdata.formData" :rules="rules">
|
<uni-forms ref="loginFormRef" label-width="0" :model="vdata.formData" :rules="rules">
|
||||||
<view class="u-p-b-30">
|
<view class="u-p-b-30">
|
||||||
<my-tabs size="large" @change="accountTypeChange" v-model="accountType.sel" :list="accountType.list" textKey="label"></my-tabs>
|
<my-tabs size="large" @change="accountTypeChange" v-model="accountType.sel" :list="accountType.list"
|
||||||
|
textKey="label"></my-tabs>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="vdata.loginType == 'pwd' ">
|
<view v-if="vdata.loginType == 'pwd' ">
|
||||||
<template v-if="accountType.sel==1">
|
<template v-if="accountType.sel==1">
|
||||||
|
|
@ -175,9 +176,14 @@
|
||||||
} from '@/http/yskApi/login.js';
|
} from '@/http/yskApi/login.js';
|
||||||
|
|
||||||
const accountType = reactive({
|
const accountType = reactive({
|
||||||
list:[
|
list: [{
|
||||||
{label:'商户',value:'merchant'},
|
label: '商户',
|
||||||
{label:'员工',value:'staff'},
|
value: 'merchant'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '员工',
|
||||||
|
value: 'staff'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
sel: 0
|
sel: 0
|
||||||
})
|
})
|
||||||
|
|
@ -185,12 +191,6 @@
|
||||||
const loginFormRef = ref()
|
const loginFormRef = ref()
|
||||||
const envChangeTipsRef = ref()
|
const envChangeTipsRef = ref()
|
||||||
const refAgr = ref()
|
const refAgr = ref()
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
// 控制 音乐播放 和暂停
|
|
||||||
import {
|
|
||||||
getPushStatus
|
|
||||||
} from "@/commons/utils/pushmsg/wxTextToSpeach.js"
|
|
||||||
// #endif
|
|
||||||
const rules = {
|
const rules = {
|
||||||
merchantName: {
|
merchantName: {
|
||||||
rules: [formUtil.rules.requiredInputShowToast('商户号')],
|
rules: [formUtil.rules.requiredInputShowToast('商户号')],
|
||||||
|
|
@ -239,14 +239,16 @@
|
||||||
|
|
||||||
})
|
})
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// vdata.formData.username = '18049104914'
|
// vdata.formData.username = '15699991111'
|
||||||
// vdata.formData.pwd = '123456'
|
// vdata.formData.pwd = '123456'
|
||||||
vdata.formData.username = '15699991111'
|
vdata.formData.username = ''
|
||||||
vdata.formData.pwd = 'qwer1234'
|
vdata.formData.pwd = ''
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
vdata.formData.username = '15699991111'
|
vdata.formData.username = ''
|
||||||
vdata.formData.pwd = 'qwer1234'
|
vdata.formData.pwd = ''
|
||||||
|
// vdata.formData.username = '15699991111'
|
||||||
|
// vdata.formData.pwd = 'qwer1234'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
function accountTypeChange(e) {
|
function accountTypeChange(e) {
|
||||||
|
|
@ -254,6 +256,9 @@
|
||||||
if(e==1){
|
if(e==1){
|
||||||
vdata.formData.merchantName = '18049104914'
|
vdata.formData.merchantName = '18049104914'
|
||||||
vdata.formData.username = '13666666666'
|
vdata.formData.username = '13666666666'
|
||||||
|
vdata.formData.pwd = '123456'
|
||||||
|
}else{
|
||||||
|
vdata.formData.pwd = 'qwer1234'
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
@ -277,7 +282,13 @@
|
||||||
// vdata.siteInfos = storageManage.siteInfos(bizData)
|
// vdata.siteInfos = storageManage.siteInfos(bizData)
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
// 获取商户信息,有就回显
|
||||||
|
let info = uni.getStorageSync('MerchantId')
|
||||||
|
// console.log(info.merchantName,'调试121')
|
||||||
|
if (info.merchantName) {
|
||||||
|
vdata.formData.merchantName = info.merchantName
|
||||||
|
vdata.formData.username = info.username
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 切换登录方式
|
// 切换登录方式
|
||||||
|
|
@ -312,12 +323,17 @@
|
||||||
if (loginPromise == null) {
|
if (loginPromise == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 请求后的操作
|
// 请求后的操作
|
||||||
loginPromise.then(res => {
|
loginPromise.then(res => {
|
||||||
console.log(res);
|
|
||||||
// 登录成功
|
// 登录成功
|
||||||
loginFinishFunc(res)
|
loginFinishFunc(res)
|
||||||
|
// 保存商户号
|
||||||
|
uni.setStorageSync('MerchantId', {
|
||||||
|
merchantName: vdata.formData.merchantName,
|
||||||
|
username: vdata.formData.username,
|
||||||
|
})
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
getCode()
|
getCode()
|
||||||
})
|
})
|
||||||
|
|
@ -355,6 +371,7 @@
|
||||||
storageManage.shopId(loginBizData.shopId)
|
storageManage.shopId(loginBizData.shopId)
|
||||||
storageManage.shopUserId(loginBizData.user.user.id)
|
storageManage.shopUserId(loginBizData.user.user.id)
|
||||||
storageManage.userInfo(loginBizData)
|
storageManage.userInfo(loginBizData)
|
||||||
|
|
||||||
// 跳转到首页
|
// 跳转到首页
|
||||||
go.to("PAGES_INDEX", {
|
go.to("PAGES_INDEX", {
|
||||||
isGetCid: true
|
isGetCid: true
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="page-cell">
|
<view class="page-cell">
|
||||||
<view class="label">头像</view>
|
<view class="label">头像</view>
|
||||||
<view class="right" @tap="uploadImg.preview()">
|
<view class="right" @tap="uploadImg.preview()">
|
||||||
<up-avatar class="fileImg" :src="vdata.shopInfo.coverImg?vdata.shopInfo.coverImg:''"></up-avatar>
|
<up-avatar class="fileImg" :src="vdata.shopInfo.coverImg?vdata.shopInfo.coverImg:''" mode="aspectFill"></up-avatar>
|
||||||
<view class="file" @tap="chooseAndUploadAvatar('coverImg')"></view>
|
<view class="file" @tap="chooseAndUploadAvatar('coverImg')"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
||||||
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
||||||
<view class="u-absolute goods bg-fff">
|
<view class="u-absolute goods bg-fff">
|
||||||
|
|
@ -7,7 +9,7 @@
|
||||||
<view>已添加{{goodsNumber}}件商品</view>
|
<view>已添加{{goodsNumber}}件商品</view>
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10" @tap="clear">清空</text>
|
<text class="u-m-l-10" @tap="setModalShow('clear',true)">清空</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="tranistion" :style="{height:switchGoods?'50vh':0 }">
|
<scroll-view scroll-y="true" class="tranistion" :style="{height:switchGoods?'50vh':0 }">
|
||||||
|
|
@ -21,11 +23,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(item,index) in data"
|
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
||||||
:key="index">
|
v-for="(item,index) in data" :key="index">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view>{{item.name}}</view>
|
<view class="u-line-1">{{item.name}}</view>
|
||||||
<view class="u-m-t-10 u-font-24 color-666">{{item.specSnap||''}}</view>
|
<view class="u-m-t-10 u-font-24 color-666 u-line-1">{{item.specSnap||''}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<view class="font-bold red u-m-r-32">¥{{formatPrice(item.salePrice*item.number) }}</view>
|
<view class="font-bold red u-m-r-32">¥{{formatPrice(item.salePrice*item.number) }}</view>
|
||||||
|
|
@ -59,16 +61,23 @@
|
||||||
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
|
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
|
||||||
</my-button>
|
</my-button>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<up-modal title="提示" content="是否清空全部已添加的商品?" :show="modal.clear" showCancelButton closeOnClickOverlay @confirm="confirmModelConfirm"
|
||||||
|
@cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)" width="300px"></up-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import infoBox from '@/commons/utils/infoBox.js';
|
import infoBox from '@/commons/utils/infoBox.js';
|
||||||
import {formatPrice} from '@/commons/utils/format.js';
|
import {
|
||||||
|
formatPrice
|
||||||
|
} from '@/commons/utils/format.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -79,7 +88,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isCreateOrderToDetail: {
|
isCreateOrderToDetail: {
|
||||||
type:Boolean,default:false
|
type: Boolean,
|
||||||
|
default: false
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -102,6 +112,27 @@
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const modal = reactive({
|
||||||
|
key: '',
|
||||||
|
clear:false
|
||||||
|
})
|
||||||
|
|
||||||
|
function confirmModelConfirm() {
|
||||||
|
if (modal.key == 'clear') {
|
||||||
|
clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setModalShow(key = 'show', show = true) {
|
||||||
|
if (key == 'clear'&&show&&props.data.length<=0) {
|
||||||
|
return infoBox.showToast('购物车是空的!')
|
||||||
|
}
|
||||||
|
modal.key = key
|
||||||
|
modal[key] = show
|
||||||
|
console.log(modal);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const edmits = defineEmits(['clear', 'updateNumber'])
|
const edmits = defineEmits(['clear', 'updateNumber'])
|
||||||
|
|
||||||
|
|
@ -125,10 +156,21 @@
|
||||||
if (props.data.length <= 0) {
|
if (props.data.length <= 0) {
|
||||||
return infoBox.showToast('还没有选择商品')
|
return infoBox.showToast('还没有选择商品')
|
||||||
}
|
}
|
||||||
const {tableId,name,maxCapacity,status,type}=props.table
|
const {
|
||||||
|
tableId,
|
||||||
|
name,
|
||||||
|
maxCapacity,
|
||||||
|
status,
|
||||||
|
type
|
||||||
|
} = props.table
|
||||||
go.to('PAGES_CONFIRM_ORDER', {
|
go.to('PAGES_CONFIRM_ORDER', {
|
||||||
masterId:props.masterId,type,
|
masterId: props.masterId,
|
||||||
tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail?1:0
|
type,
|
||||||
|
tableId,
|
||||||
|
name,
|
||||||
|
maxCapacity,
|
||||||
|
status,
|
||||||
|
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -158,17 +200,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
uni.showModal({
|
setModalShow('clear',false)
|
||||||
title: '提示',
|
|
||||||
content: '是否清空全部已添加的商品?',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
edmits('clear')
|
edmits('clear')
|
||||||
hideGoods()
|
hideGoods()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
import myButton from '@/components/my-components/my-button.vue'
|
import myButton from '@/components/my-components/my-button.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -249,6 +284,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,10 @@
|
||||||
if (!goods.value) {
|
if (!goods.value) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
console.log(util.isCanBuy({
|
return util.isCanBuy(
|
||||||
...goods.value,
|
goods.value,
|
||||||
isStock: props.goodsData.isStock
|
props.goodsData
|
||||||
}));
|
)
|
||||||
return util.isCanBuy({
|
|
||||||
...goods.value,
|
|
||||||
isStock: props.goodsData.isStock
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="u-relative u-flex item">
|
<view class="u-relative u-flex item">
|
||||||
<image lazy-load class="img" :src="data.coverImg" mode="" :style="computedImgStyle()"></image>
|
|
||||||
|
<up-image :src="data.coverImg" mode="aspectFill" :width="img.width" :height="img.height"></up-image>
|
||||||
|
<!-- <image lazy-load class="img" :src="data.coverImg" mode="aspectFill" :style="computedImgStyle()"></image> -->
|
||||||
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
|
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
|
||||||
<view>
|
<view>
|
||||||
<view>{{data.name}}</view>
|
<view>
|
||||||
|
<text class="u-line-2">{{data.name}}</text>
|
||||||
|
</view>
|
||||||
<view class="u-font-32 font-bold u-m-t-16">
|
<view class="u-font-32 font-bold u-m-t-16">
|
||||||
¥{{data.price}}
|
¥{{data.price}}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -131,7 +135,7 @@
|
||||||
.btn-hover-class {
|
.btn-hover-class {
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
|
image{will-change: transform}
|
||||||
.item {
|
.item {
|
||||||
// width: 250rpx;
|
// width: 250rpx;
|
||||||
// height: 272rpx;
|
// height: 272rpx;
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
:scroll-top="data.scrollTop" :scroll-into-view="data.itemId">
|
:scroll-top="data.scrollTop" :scroll-into-view="data.itemId">
|
||||||
<view v-for="(item,index) in data.tabbar" :key="index" class="u-tab-item"
|
<view v-for="(item,index) in data.tabbar" :key="index" class="u-tab-item"
|
||||||
:class="[data.current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
:class="[data.current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
||||||
<text class="u-line-1">{{item.name}}</text>
|
<text class="u-line-3">{{item.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view :scroll-top="data.scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
<scroll-view :scroll-top="data.scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
||||||
|
|
@ -76,9 +76,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view class="thumb-box" v-for="(goodsItem, goodsIndex) in item.foods" :key="goodsIndex">
|
<view class="thumb-box" v-for="(goodsItem, goodsIndex) in item.foods" :key="goodsIndex">
|
||||||
<goods-item @chooseGuige="chooseGuige($event,index)"
|
<list-goods-item @chooseGuige="chooseGuige($event,index)"
|
||||||
@add="goodsUpdate($event,index,true)" @reduce="goodsUpdate($event,index,false)"
|
@add="goodsUpdate($event,index,true)" @reduce="goodsUpdate($event,index,false)"
|
||||||
:index="goodsIndex" :data="goodsItem"></goods-item>
|
:index="goodsIndex" :data="goodsItem"></list-goods-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <template v-if="item.name==='附加费'">
|
<!-- <template v-if="item.name==='附加费'">
|
||||||
|
|
@ -100,11 +100,11 @@
|
||||||
<view class="u-font-28 color-666 ">搜索</view>
|
<view class="u-font-28 color-666 ">搜索</view>
|
||||||
<view class="u-flex u-m-t-20 u-flex-wrap u-row-between">
|
<view class="u-flex u-m-t-20 u-flex-wrap u-row-between">
|
||||||
<view class="u-m-b-30" v-for="(goodsItem, goodsIndex) in searchResult" :key="goodsIndex">
|
<view class="u-m-b-30" v-for="(goodsItem, goodsIndex) in searchResult" :key="goodsIndex">
|
||||||
<goods-item :img="{width:'330rpx',height:'330rpx'}"
|
<list-goods-item :img="{width:'330rpx',height:'330rpx'}"
|
||||||
@chooseGuige="chooseGuige(goodsItem.goodsIndex,goodsItem.index)"
|
@chooseGuige="chooseGuige(goodsItem.goodsIndex,goodsItem.index)"
|
||||||
@add="searchGoodsUpdate(goodsItem,goodsIndex,true)"
|
@add="searchGoodsUpdate(goodsItem,goodsIndex,true)"
|
||||||
@reduce="searchGoodsUpdate(goodsItem,goodsIndex,false)" :index="goodsItem.goodsIndex"
|
@reduce="searchGoodsUpdate(goodsItem,goodsIndex,false)" :index="goodsItem.goodsIndex"
|
||||||
:data="goodsItem"></goods-item>
|
:data="goodsItem"></list-goods-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
import util from './util.js';
|
import util from './util.js';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import guigeModel from './components/guige'
|
import guigeModel from './components/guige'
|
||||||
import goodsItem from './components/goods-item'
|
import listGoodsItem from './components/list-goods-item.vue'
|
||||||
import mySurcharge from './components/surcharge'
|
import mySurcharge from './components/surcharge'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
|
@ -158,8 +158,7 @@
|
||||||
reactive,
|
reactive,
|
||||||
ref,
|
ref,
|
||||||
nextTick,
|
nextTick,
|
||||||
getCurrentInstance,
|
watch,getCurrentInstance
|
||||||
watch
|
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import myCar from './components/car'
|
import myCar from './components/car'
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
|
|
@ -167,6 +166,7 @@
|
||||||
import {
|
import {
|
||||||
getNowCart
|
getNowCart
|
||||||
} from '@/pagesCreateOrder/util.js'
|
} from '@/pagesCreateOrder/util.js'
|
||||||
|
import storageManage from '@/commons/utils/storageManage.js'
|
||||||
import {
|
import {
|
||||||
$returnUseType
|
$returnUseType
|
||||||
} from './util.js'
|
} from './util.js'
|
||||||
|
|
@ -174,12 +174,12 @@
|
||||||
tbShopInfo
|
tbShopInfo
|
||||||
} from '@/http/yskApi/user.js'
|
} from '@/http/yskApi/user.js'
|
||||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||||
|
const instance = getCurrentInstance();
|
||||||
let canXiadan=ref(false)
|
let canXiadan=ref(false)
|
||||||
async function xiadanClick(){
|
async function xiadanClick(){
|
||||||
canXiadan.value=await hasPermission('允许下单')
|
canXiadan.value=await hasPermission('允许下单')
|
||||||
}
|
}
|
||||||
xiadanClick()
|
xiadanClick()
|
||||||
const instance = getCurrentInstance();
|
|
||||||
//临时菜
|
//临时菜
|
||||||
const lingshi = reactive({
|
const lingshi = reactive({
|
||||||
show: false
|
show: false
|
||||||
|
|
@ -198,9 +198,9 @@
|
||||||
menuHeight: 0, // 左边菜单的高度
|
menuHeight: 0, // 左边菜单的高度
|
||||||
menuItemHeight: 0, // 左边菜单item的高度
|
menuItemHeight: 0, // 左边菜单item的高度
|
||||||
itemId: '', // 栏目右边scroll-view用于滚动的id
|
itemId: '', // 栏目右边scroll-view用于滚动的id
|
||||||
tabbar: [],
|
tabbar: storageManage.cacheGoods()||[],
|
||||||
menuItemPos: [],
|
menuItemPos: [],
|
||||||
arr: [],
|
arr: storageManage.cacheGoodsNode()||[],//左右联动布局节点信息
|
||||||
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
|
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
|
||||||
timer: null, // 定时器
|
timer: null, // 定时器
|
||||||
topZhanwei: 136 + 24,
|
topZhanwei: 136 + 24,
|
||||||
|
|
@ -287,6 +287,8 @@
|
||||||
return v.foods.length
|
return v.foods.length
|
||||||
})
|
})
|
||||||
data.tabbar = tabbar
|
data.tabbar = tabbar
|
||||||
|
storageManage.cacheGoods(data.tabbar)
|
||||||
|
getMenuItemTop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -303,7 +305,8 @@
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 300
|
size: 300
|
||||||
}) {
|
}) {
|
||||||
return Api.getGoodsLists(par)
|
const showLoading=data.tabbar.length<=0?true:false
|
||||||
|
return Api.getGoodsLists(par,showLoading)
|
||||||
}
|
}
|
||||||
//获取购物车数据
|
//获取购物车数据
|
||||||
async function getCart(par = {
|
async function getCart(par = {
|
||||||
|
|
@ -397,6 +400,7 @@
|
||||||
|
|
||||||
//获取桌台信息
|
//获取桌台信息
|
||||||
async function getTableInfo() {
|
async function getTableInfo() {
|
||||||
|
if(data.table.tableId){
|
||||||
const res = await $table.get({
|
const res = await $table.get({
|
||||||
qrcode: data.table.tableId
|
qrcode: data.table.tableId
|
||||||
})
|
})
|
||||||
|
|
@ -405,6 +409,7 @@
|
||||||
// data.table=res.content[0]
|
// data.table=res.content[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let $originGoods = []
|
let $originGoods = []
|
||||||
let $category = []
|
let $category = []
|
||||||
async function init() {
|
async function init() {
|
||||||
|
|
@ -435,6 +440,10 @@
|
||||||
$originGoods = goods
|
$originGoods = goods
|
||||||
if (!data.table.tableId) {
|
if (!data.table.tableId) {
|
||||||
//无桌台
|
//无桌台
|
||||||
|
const {
|
||||||
|
masterId
|
||||||
|
} = await getMasterId()
|
||||||
|
data.masterId = masterId
|
||||||
setTabBar(category, goods, [])
|
setTabBar(category, goods, [])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -582,7 +591,7 @@
|
||||||
return prve;
|
return prve;
|
||||||
}, {});
|
}, {});
|
||||||
const canBudyGoods = specList
|
const canBudyGoods = specList
|
||||||
.filter((v) => util.isCanBuy(v))
|
.filter((v) => util.isCanBuy(v,guigeModelData.chooseGoods.item))
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
|
const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
|
||||||
return prve + skuMapNumber[cur];
|
return prve + skuMapNumber[cur];
|
||||||
|
|
@ -671,7 +680,7 @@
|
||||||
prve[i] = matchArr
|
prve[i] = matchArr
|
||||||
.filter((v) => v.specSnap.match(i))
|
.filter((v) => v.specSnap.match(i))
|
||||||
.every((v) => {
|
.every((v) => {
|
||||||
return !util.isCanBuy(v)
|
return !util.isCanBuy(v,guigeModelData.chooseGoods.item)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -796,7 +805,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function canAddGoods() {
|
function canAddGoods() {
|
||||||
return data.table.tableId
|
// return data.table.tableId
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) {
|
function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) {
|
||||||
|
|
@ -808,11 +818,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) {
|
async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) {
|
||||||
if (!canAddGoods()) {
|
// if (!canAddGoods()) {
|
||||||
return infoBox.showToast('请先选择桌台', 0.5).then(res => {
|
// return infoBox.showToast('请先选择桌台', 0.5).then(res => {
|
||||||
chooseTable()
|
// chooseTable()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
const $goods = data.tabbar[index].foods[foodsindex]
|
const $goods = data.tabbar[index].foods[foodsindex]
|
||||||
if ($goods.isDan) {
|
if ($goods.isDan) {
|
||||||
//单规格
|
//单规格
|
||||||
|
|
@ -963,6 +973,7 @@
|
||||||
rects.forEach((rect) => {
|
rects.forEach((rect) => {
|
||||||
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
|
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
|
||||||
data.arr.push(rect.top - rects[0].top);
|
data.arr.push(rect.top - rects[0].top);
|
||||||
|
storageManage.cacheGoodsNode(data.arr)
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
}).exec()
|
}).exec()
|
||||||
|
|
@ -1002,7 +1013,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
function watchChooseuser() {
|
function watchChooseuser() {
|
||||||
|
|
@ -1171,6 +1182,8 @@
|
||||||
color: #444;
|
color: #444;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-left: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-tab-item-active {
|
.u-tab-item-active {
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,15 @@ export function $returnUseType(shop, useType) {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
//判断商品是否可以下单
|
//判断商品是否可以下单
|
||||||
export function isCanBuy(goods, isStock) {
|
export function isCanBuy(skuGoods,goods) {
|
||||||
return goods.isGrounding && goods.isPauseSale == 0 && (isStock ? goods.stockNumber > 0 : true);
|
if(goods.typeEnum=='normal'){
|
||||||
|
//单规格
|
||||||
|
return goods.isGrounding&&goods.isPauseSale==0&&(goods.isStock?goods.stockNumber>0:true);
|
||||||
|
}else{
|
||||||
|
//多规格
|
||||||
|
return goods.isGrounding&&goods.isPauseSale==0&&skuGoods.isGrounding&&skuGoods.isPauseSale==0&&(goods.isStock?goods.stockNumber>0:true);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
|
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
|
||||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="orderInfo.status=='closed'">
|
<template v-if="orderInfo.status=='closed'&&data.status!='return'">
|
||||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,13 @@
|
||||||
<view class="line-th color-666 ">¥{{item.salePrice||item.price}}</view>
|
<view class="line-th color-666 ">¥{{item.salePrice||item.price}}</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view>¥{{item.salePrice||item.price}}</view>
|
<template v-if="item.priceAmount<=0">
|
||||||
|
<view>¥0.00</view>
|
||||||
|
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view>¥{{item.priceAmount}}</view>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
|
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -54,12 +60,15 @@
|
||||||
@tap="tuicai(item,index)"><text class="no-wrap">退菜</text></my-button>
|
@tap="tuicai(item,index)"><text class="no-wrap">退菜</text></my-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="orderInfo.status=='closed'">
|
<template v-if="item.status!='refund'">
|
||||||
|
<template v-if="orderInfo.status=='closed'||orderInfo.status=='refund'">
|
||||||
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
||||||
<my-button :width="128" :height="48" plain shape="circle"
|
<my-button :width="128" :height="48" plain shape="circle"
|
||||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="bg-gray u-p-20 u-m-t-20" v-if="orderInfo.remark">
|
<!-- <view class="bg-gray u-p-20 u-m-t-20" v-if="orderInfo.remark">
|
||||||
|
|
@ -128,8 +137,12 @@
|
||||||
computed
|
computed
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js'
|
import color from '@/commons/color.js'
|
||||||
|
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||||
|
|
||||||
|
function returnTotalMoney(item){
|
||||||
|
return (item.price*item.num).toFixed(2)
|
||||||
|
}
|
||||||
function to2(n){
|
function to2(n){
|
||||||
if(!n){
|
if(!n){
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -142,8 +155,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function tuikuan(item, index) {
|
function tuikuan(item, index) {
|
||||||
|
hasPermission('允许退款').then(res=>{
|
||||||
|
if(res){
|
||||||
emits('tuikuan', item, index)
|
emits('tuikuan', item, index)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function printOrder() {
|
function printOrder() {
|
||||||
emits('printOrder')
|
emits('printOrder')
|
||||||
|
|
@ -175,7 +192,7 @@
|
||||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||||
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
|
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
|
||||||
b) => {
|
b) => {
|
||||||
return a + (b.salePrice || b.price) * (b.number || b.num)
|
return a + b.priceAmount*1
|
||||||
}, 0)
|
}, 0)
|
||||||
return prve + curTotal
|
return prve + curTotal
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-flex-1 u-row-right">
|
<view class="u-flex u-flex-1 u-row-right">
|
||||||
<view>×{{item.num}}</view>
|
<view>×{{item.num}}</view>
|
||||||
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.price}}</view>
|
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.priceAmount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,8 @@
|
||||||
function setUser(par) {
|
function setUser(par) {
|
||||||
console.log(option);
|
console.log(option);
|
||||||
const submitPar = {
|
const submitPar = {
|
||||||
masterId: option.masterId,
|
tableId: order.tableId,
|
||||||
tableId: option.tableId,
|
masterId: order.masterId,
|
||||||
vipUserId: user.value.id ? user.value.id : '',
|
vipUserId: user.value.id ? user.value.id : '',
|
||||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729662523365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4294" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M512 493.568c-32.256 0-58.88-26.112-58.88-58.88V58.88C453.12 26.112 479.744 0 512 0s58.88 26.112 58.88 58.88v375.808c0 32.256-26.624 58.88-58.88 58.88z" fill="#318AFE" p-id="4295"></path><path d="M512 1024c-273.92 0-496.64-222.72-496.64-496.64 0-202.752 121.344-382.976 309.248-459.776 30.208-12.288 64.512 2.048 76.8 32.256 12.288 30.208-2.048 64.512-32.256 76.8C225.792 235.008 133.12 372.736 133.12 527.36c0 208.896 169.984 378.88 378.88 378.88s378.88-169.984 378.88-378.88c0-154.624-92.672-292.352-236.032-351.232-30.208-12.288-44.544-46.592-32.256-76.8 12.288-30.208 46.592-44.544 76.8-32.256 187.904 76.8 309.248 257.024 309.248 459.776 0 274.432-222.72 497.152-496.64 497.152z" fill="#318AFE" p-id="4296"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><defs><style>.a{fill:#80bcff;}.b{clip-path:url(#a);}.c{fill:#4c99fe;}.d{fill:#197dff;}</style><clipPath id="a"><rect class="a" width="32" height="32" transform="translate(329 962)"/></clipPath></defs><g class="b" transform="translate(-329 -962)"><g transform="translate(202.143 843.263)"><path class="c" d="M286.412,444.28m-9.08,0a9.08,9.08,0,1,0,9.08-9.08,9.08,9.08,0,0,0-9.08,9.08Z" transform="translate(-143.555 -303.517)"/><path class="d" d="M450.476,127.721A2.432,2.432,0,0,1,448,125.245v-3.3a2.476,2.476,0,1,1,4.953,0v3.3A2.483,2.483,0,0,1,450.476,127.721Z" transform="translate(-307.619)"/><path class="c" d="M213.791,210.185h-18.82A2.959,2.959,0,0,1,192,207.213v-7.1a12.381,12.381,0,1,1,24.763,0v7.1A2.959,2.959,0,0,1,213.791,210.185Z" transform="translate(-61.524 -65.625)"/><path class="d" d="M155.239,644.953H130.476a2.476,2.476,0,1,1,0-4.953h24.763a2.476,2.476,0,1,1,0,4.953Z" transform="translate(0 -500.393)"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
2
开发文档.md
2
开发文档.md
|
|
@ -6,6 +6,8 @@
|
||||||
发布APP: HBuilderX 3.6.5 ( 3.6.11 app调试报错 )
|
发布APP: HBuilderX 3.6.5 ( 3.6.11 app调试报错 )
|
||||||
H5, 不影响。
|
H5, 不影响。
|
||||||
|
|
||||||
|
###apk下载地址
|
||||||
|
* <https://mp-3b7dba1a-2dfb-4c7a-a239-2ab2157f829a.cdn.bspapp.com/cloudstorage/__UNI__66E7BD0_20241023161228.apk >
|
||||||
|
|
||||||
### 全局文件结构
|
### 全局文件结构
|
||||||
* commons->utils>hasPermission.js 全局权限验证文件
|
* commons->utils>hasPermission.js 全局权限验证文件
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue