This commit is contained in:
魏啾 2024-10-23 17:15:35 +08:00
commit 3b373d27df
24 changed files with 467 additions and 280 deletions

View File

@ -59,8 +59,8 @@ const $PermissionObj = {
key: 'yun_xu_guan_li_hui_yuan_xin_xi'
},
{
text: 'yun_xu_xiu_gai_hui_yuan_yu_e',
key: '允许修改会员余额'
key: 'yun_xu_xiu_gai_hui_yuan_yu_e',
text: '允许修改会员余额'
}
],
stock:[

View File

@ -62,9 +62,10 @@ const props = defineProps({
//
async function clickFunc(nav) {
let res =await hasPermission('允许查看经营数据')
console.log(res,'调试11111')
if(!res) return
if(nav.pageUrl=="PAGES_SALES_SUMMARY"){
let res =await hasPermission('允许查看经营数据')
if(!res) return
}
//
if (nav.clickFunc) {
return nav.clickFunc(nav)

View File

@ -75,6 +75,7 @@ function commonsProcess(showLoading, httpReqCallback) {
} = httpData
// 避免混淆重新命名
let bodyData = data
console.log(statusCode,1111111111)
if (statusCode == 500) {
isShowErrorToast = true
return Promise.reject(bodyData) // 跳转到catch函数
@ -124,7 +125,7 @@ function commonsProcess(showLoading, httpReqCallback) {
return Promise.resolve(bodyData)
}).catch(res => {
if(res.status==401){
if(res.status==401||res.status==400){
storageManage.token(null, true)
infoBox.showErrorToast('请登录').then(() => {
go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
@ -183,7 +184,6 @@ function request(args) {
} = args
let headerObject = {}
// headerObject[appConfig.tokenKey] = storageManage.token()
return commonsProcess(showLoading, () => {
return uni.request(
Object.assign({

View File

@ -150,12 +150,12 @@
"unipush" : {
"enable" : true
},
"plugins" : {
"WechatSI" : {
"version" : "0.3.5",
"provider" : "wx069ba97219f66d99"
}
},
// "plugins" : {
// "WechatSI" : {
// "version" : "0.3.5",
// "provider" : "wx069ba97219f66d99"
// }
// },
"requiredBackgroundModes" : [ "audio", "location" ],
"__usePrivacyCheck__" : true,
"libVersion" : "latest"
@ -213,15 +213,15 @@
"/ysk" : ""
}
},
"/yufabu" : {
//
"target" : "https://pre-cashier.sxczgkj.cn",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
"/yufabu" : ""
}
},
"/yufabu" : {
//
"target" : "https://pre-cashier.sxczgkj.cn",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
"/yufabu" : ""
}
},
"/ww" : {
//
"target" : "http://192.168.1.15:8000",

View File

@ -25,7 +25,7 @@
耗材价格
</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>
</li>
<li>
@ -59,13 +59,16 @@
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
text="保存"></up-button>
</view>
<!-- 消息提示 -->
<up-toast ref="uToastRef"></up-toast>
</template>
<script setup>
import {
reactive,
computed,
onMounted
onMounted,
getCurrentInstance
} from 'vue';
import {
tbConsTypeList,
@ -107,13 +110,29 @@
})
})
}
const refs = getCurrentInstance()
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([{
...datas.form,
shopId: uni.getStorageSync("shopId"),
conTypeId: datas.list[datas.nowStatusIndex].id
}]).then(res => {
go.to('PAGES_SALES_CONSUMABLES')
// go.to('PAGES_SALES_CONSUMABLES')
go.back()
})
}
const statusHeight = computed(() => {

View File

@ -6,7 +6,7 @@
</view>
<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)" />
</view>
</li>
@ -126,13 +126,13 @@
})
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
padding: 0 28rpx;
}
</style>
<style scoped lang="less">
ul,
li {
list-style: none;

BIN
pageConsumables/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -114,7 +114,7 @@
conTypeId: datas.list[datas.nowStatusIndex].id,
id: datas.form.id
}]).then(res => {
go.to('PAGES_SALES_CONSUMABLES')
go.back()
})
}
const statusHeight = computed(() => {
@ -126,11 +126,13 @@
datas.showStatus = false
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
ul,
li {

View File

@ -1,7 +1,7 @@
<template>
<view class="ConsumablesTop">
<view @tap="showStatus = !showStatus">
{{datas.title}}
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
</view>
<view>
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
@ -20,7 +20,7 @@
<view :style="{height: '14px'}"></view>
</view>
<ul class="ConsumablesConent">
<ul class="ConsumablesConent" v-if="datas.list.length">
<li v-for="(item,index) in datas.list" :key="index">
<view>
{{item.conName}}
@ -49,12 +49,18 @@
所属商品: {{ filtersSproductId(item.productId)}}
</view>
<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>
</view>
</view>
</li>
<li style="background-color: rgba(0,0,0,0); height: 200rpx;"></li>
</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 @tap="toUrl('PAGES_ADD_CONSUMABLES')">
新增耗材
@ -76,8 +82,13 @@
reactive,
computed
} from 'vue';
import {onShow} from '@dcloudio/uni-app'
import {
onShow
} from '@dcloudio/uni-app'
import go from '@/commons/utils/go.js';
import {
hasPermission
} from '@/commons/utils/hasPermission.js';
import {
viewConInfoFlowget,
tbConsType,
@ -120,6 +131,7 @@
//
gettbConsTypeList()
})
function changeNowStatusIndex(i) {
nowStatusIndex.value = i
showStatus.value = false
@ -159,49 +171,69 @@
report.data.consId = d.id
actionSheet.active = d
}
let sheetClick = (index) => {
if (index == 0) {
//
reportDamage.value.open(actionSheet.activeId);
report.data.name = actionSheet.active.conName
report.data.unit = actionSheet.active.conUnit
//
hasPermission('允许提交报损').then(ele => {
if (ele) {
//
reportDamage.value.open(actionSheet.activeId);
report.data.name = actionSheet.active.conName
report.data.unit = actionSheet.active.conUnit
}
})
} else if (index == 1) {
toUrl('PAGES_EDIT_CONSUMABLES', {
item: JSON.stringify(actionSheet.active)
})
} else if (index == 2) {
toUrl('PAGES_SALES_INVENTORYCHECK', {
item: JSON.stringify(actionSheet.active)
hasPermission('允许耗材盘点').then(ele => {
if (ele) {
toUrl('PAGES_SALES_INVENTORYCHECK', {
item: JSON.stringify(actionSheet.active)
})
}
})
} else if (index == 3) {
console.log(actionSheet.activeId,'调试1')
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
hasPermission('允许耗材入库').then(ele => {
if (ele) {
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
}
})
} else if (index == 4) {
toUrl('PAGES_SALES_OUTBOUND', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
hasPermission('允许耗材出库').then(ele => {
if (ele) {
toUrl('PAGES_SALES_OUTBOUND', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
}
})
}
}
// async function viewpermission(d) {
// let res = await hasPermission(d)
// console.log(res,'1')
// return res
// }
async function getList(d = "") {
viewConInfoFlowget({
shopId: uni.getStorageSync("shopId"),
conName: datas.conName,
conTypeId: d,
size:100,
page:0
size: 100,
page: 0
}).then(res => {
datas.list = res.content
})
}
function inputEvent(d) {
datas.conName = d.detail.value
datas.conName = d.detail.value.replace(/\s*/g,"");
getList()
}
@ -413,7 +445,7 @@
background-color: #fff;
}
.df() {
display: flex;
align-items: center;

View File

@ -100,7 +100,8 @@
conInfoId: datas.form.id,
lpNum: profitNumber._value
}).then(res => {
go.to('PAGES_SALES_CONSUMABLES')
// go.to('PAGES_SALES_CONSUMABLES')
go.back()
})
}
/**
@ -129,11 +130,13 @@
showStatus.value = !showStatus.value
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
.df() {
display: flex;

View File

@ -185,7 +185,7 @@
supplierId: datas.list[nowStatusIndex.value].id,
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
}).then(res => {
go.to('PAGES_SALES_CONSUMABLES')
go.back()
})
}
//
@ -193,11 +193,13 @@
return 30 * datas.status.length + 14 + 'px'
})
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
.df() {
display: flex;

View File

@ -49,6 +49,7 @@
})
onMounted(() => {
let items = JSON.parse(props.item)
console.log(items,'调试1')
getlist()
})
let getlist = () => {
@ -56,17 +57,20 @@
page: 0,
shopId: uni.getStorageSync("shopId"),
size: 30,
sort: "createTime,desc"
sort: "createTime,desc",
conTypeId:JSON.parse(props.item).conTypeId
}).then(res => {
datas.list = res.content
})
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
ul,
li {

View File

@ -22,15 +22,15 @@
<text style="color: red;">*</text> 入库数量
</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>
</li>
<li>
<view>
<text style="color: red;">*</text>单价
<text style="color: red;">*</text>单价
</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>
</li>
<li>
@ -132,6 +132,7 @@
datas.form = assign(datas.form, ...datas.item)
})
const refs = getCurrentInstance()
function toggle() {
go.to('PAGES_ADD_SUPPLIER')
}
@ -167,7 +168,7 @@
})
return
}
if(!datas.form.list.price){
if (!datas.form.list.price) {
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "请输入必填项",
@ -182,7 +183,13 @@
supplierId: datas.list[nowStatusIndex.value].id,
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
}).then(res => {
go.to('PAGES_SALES_CONSUMABLES')
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "保存成功",
})
setTimeout(() => {
go.back()
}, 1000)
})
}
//
@ -191,12 +198,12 @@
return 30 * datas.status.length + 14 + 'px'
})
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
.df() {
display: flex;
align-items: center;

View File

@ -32,10 +32,28 @@
</view>
</view>
</view>
<view class="u-flex-1 u-text-center" @tap="toYue">
<view class="font-bold color-000 pr-16" >{{data.amount}}</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="toYue">
<view class="font-bold color-000 pr-16" >{{data.amount}}</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="color-999">已消费</view>
<view class="u-flex">
<uni-icons type="right" color="#999"></uni-icons>
</view>

View File

@ -25,15 +25,15 @@
<view class="u-font-32">数据统计</view>
<view class="u-m-t-40 u-flex u-row-between">
<view class=" ">
<view>会员数</view>
<view>今日新增()</view>
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.userTotal}}</view>
</view>
<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>
<view class="">
<view>充值金额</view>
<view>总余额()</view>
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.chageTotal}}</view>
</view>
</view>
@ -47,6 +47,9 @@
</view>
<my-pagination @change="pageChange"></my-pagination>
</view>
<view class="fixed_b">
<my-button showShadow @tap="toAddUser" shape="circle">新建用户</my-button>
</view>
</template>
<!-- 导入用户 -->
@ -83,7 +86,6 @@
</view>
</view>
</view>
<view class="fixed_b">
<my-button showShadow @tap="toAddUser" shape="circle">新建用户</my-button>
</view>
@ -166,6 +168,9 @@
import infoBox from "@/commons/utils/infoBox.js"
import * as $Api from '@/http/yskApi/shop-user.js'
import API from '../../http/classApi';
import {
hasPermission
} from '@/commons/utils/hasPermission.js';
let tabsCurrent = ref(0)
const tabsList = ['用户列表', '导入用户']
const remarkModel = ref(null)
@ -185,14 +190,37 @@
const goodsStockModel = ref(null)
const moreOperateList = ['增减余额', '增减积分', '设为会员', '赠送券', '查看详情']
const moreOperateList = ['增减余额', '增减积分', '修改信息', ]
function moreOperateClick() {
moreOperate.value.open()
}
function actionSheetClick(i) {
console.log(i);
if (i == 0) {
hasPermission('允许修改会员余额').then(ele => {
if (ele) {
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
}
})
} else if (i == 1) {
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
} else if (i == 2) {
hasPermission('允许管理会员信息').then(ele => {
if (ele) {
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
}
})
}
}
//
@ -367,12 +395,16 @@
}
</style>
<style lang="scss" scoped>
.after-r,.after-l {
.after-r,
.after-l {
position: relative;
}
.line-l-r{
.line-l-r {
position: relative;
&::after,&:before{
&::after,
&:before {
position: absolute;
content: '';
top: 0;
@ -381,13 +413,16 @@
border-radius: 2px;
background-color: rgba(255, 255, 255, .3);
}
&::after{
&::after {
right: 0;
}
&::before{
&::before {
left: 0;
}
}
.after-r::after {
position: absolute;
content: '';

View File

@ -3,7 +3,8 @@
<view class="index-selected">
<view class="index-time">
<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 }}
</view>
</block>
@ -14,20 +15,20 @@
</view>
<view class="receipts-money">
<text class="money-title">成交金额 ()</text>
<view class="money-num">{{ list.sale.incomeAmountAll||0}}</view>
<view class="money-num">{{ list?list.sale.incomeAmountAll:0}}</view>
</view>
<view class="money-list">
<view class="money-item">
<text class="money-title">消费笔数</text>
<view class="money-num">{{ list.vip.useNum||0 }}</view>
<view class="money-num">{{ list?list.vip.useNum:0 }}</view>
</view>
<view class="money-item">
<text class="money-title">退款金额 ()</text>
<view class="money-num">{{ list.sale.outAmount||0}}</view>
<view class="money-num">{{ list?list.sale.outAmount:0}}</view>
</view>
<view class="money-item">
<text class="money-title">消费金额</text>
<view class="money-num">{{ list.vip.useAmount||0 }}</view>
<view class="money-num">{{ list?list.vip.useAmount:0 }}</view>
</view>
</view>
<view class="money-list" v-if="vdata.memberIsShow">
@ -53,103 +54,128 @@
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { $indexStatistics, $memberInfoCount } from '@/http/apiManager.js';
import cal from '@/commons/utils/cal.js';
import go from '@/commons/utils/go.js';
import ak from '@/commons/utils/ak.js';
import ent from '@/commons/utils/ent.js';
import unionScan from '@/commons/utils/unionScan.js';
import storageManage from '@/commons/utils/storageManage.js';
import {
ref,
reactive,
onMounted
} from 'vue';
import {
$indexStatistics,
$memberInfoCount
} from '@/http/apiManager.js';
import cal from '@/commons/utils/cal.js';
import go from '@/commons/utils/go.js';
import ak from '@/commons/utils/ak.js';
import ent from '@/commons/utils/ent.js';
import unionScan from '@/commons/utils/unionScan.js';
import storageManage from '@/commons/utils/storageManage.js';
import dayjs from 'dayjs' //
import {
summaryTrade,
} from '@/http/yskApi/requestAll.js';
onMounted(() => {
vdata.memberIsShow = ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt;
if (ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt) {
getMemberData();
}
getList()
});
const emits = defineEmits(['click']);
const timeList = [
{ title: '今天', value: 'today' },
{ title: '昨天', value: 'yesterday' },
{ title: '近7天', value: 'circumference' },
{ title: '近30天', value: 'moon' }
];
let list = ref()
const vdata = reactive({
timeSelected: 'today', //
payAmount: -1, //
payCount: -1, //
refundAmount: -1, // 退
refundCount: -1, // 退
memberIsShow: false //
});
const memberData = reactive({});
function getList(){
let startTime, endTime;
if (vdata.timeSelected == 'today') {
startTime = dayjs().format('YYYY-MM-DD') + ' 00:00:00'
endTime = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
} else if (vdata.timeSelected == 'yesterday') {
startTime = formatTime() + ' 00:00:00'
endTime = formatTime() + ' 23:59:59'
} else if (vdata.timeSelected == 'circumference') {
startTime = dayjs().add(-7, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'moon') {
startTime = dayjs().add(-30, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'custom') {
startTime = start
endTime = end
}
summaryTrade({
shopId: uni.getStorageSync('shopId'),
startTime,
endTime,
}).then((res) => {
list.value = res
})
}
//
function changeTimeFunc(val) {
vdata.timeSelected = val;
getList()
// console.log(vdata.timeSelected,'121')
// refData();
// if (vdata.memberIsShow) {
// getMemberData();
// }
}
//
function refData() {
//
$indexStatistics(vdata.timeSelected).then(({ bizData }) => {
vdata.payAmount = bizData.totalSuccAmt;
vdata.payCount = bizData.totalSuccNum;
vdata.refundAmount = bizData.totalRefundAmt;
vdata.refundCount = bizData.totalRefundNum;
});
}
//
function scanFunc() {
unionScan.scan(true).then((res) => {
//
if (res.type == unionScan.QR_TYPE_LOGIN) {
return go.to('PAGES_SCAN_LOGIN', { qrcodeNo: res.originQrVal });
}
//
if (res.type == unionScan.QR_TYPE_QRC) {
return go.to('PAGES_APP_CODE_BIND', { qrcId: res.bizValue });
onMounted(() => {
vdata.memberIsShow = ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt;
if (ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt) {
getMemberData();
}
getList()
});
}
const emits = defineEmits(['click']);
const timeList = [{
title: '今天',
value: 'today'
},
{
title: '昨天',
value: 'yesterday'
},
{
title: '近7天',
value: 'circumference'
},
{
title: '近30天',
value: 'moon'
}
];
let list = ref()
const vdata = reactive({
timeSelected: 'today', //
payAmount: -1, //
payCount: -1, //
refundAmount: -1, // 退
refundCount: -1, // 退
memberIsShow: false //
});
const memberData = reactive({});
function getList() {
let startTime, endTime;
if (vdata.timeSelected == 'today') {
startTime = dayjs().format('YYYY-MM-DD') + ' 00:00:00'
endTime = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
} else if (vdata.timeSelected == 'yesterday') {
startTime = formatTime() + ' 00:00:00'
endTime = formatTime() + ' 23:59:59'
} else if (vdata.timeSelected == 'circumference') {
startTime = dayjs().add(-7, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'moon') {
startTime = dayjs().add(-30, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'custom') {
startTime = start
endTime = end
}
summaryTrade({
shopId: uni.getStorageSync('shopId'),
startTime,
endTime,
}).then((res) => {
list.value = res
})
}
//
function changeTimeFunc(val) {
vdata.timeSelected = val;
getList()
// console.log(vdata.timeSelected,'121')
// refData();
// if (vdata.memberIsShow) {
// getMemberData();
// }
}
//
function refData() {
//
$indexStatistics(vdata.timeSelected).then(({
bizData
}) => {
vdata.payAmount = bizData.totalSuccAmt;
vdata.payCount = bizData.totalSuccNum;
vdata.refundAmount = bizData.totalRefundAmt;
vdata.refundCount = bizData.totalRefundNum;
});
}
//
function scanFunc() {
unionScan.scan(true).then((res) => {
//
if (res.type == unionScan.QR_TYPE_LOGIN) {
return go.to('PAGES_SCAN_LOGIN', {
qrcodeNo: res.originQrVal
});
}
//
if (res.type == unionScan.QR_TYPE_QRC) {
return go.to('PAGES_APP_CODE_BIND', {
qrcId: res.bizValue
});
}
});
}
//
function getdate() {
const dt = new Date();
@ -172,98 +198,116 @@ function scanFunc() {
let d = dateFormat.getDate().toString().padStart(2, '0')
return `${y}-${m}-${d}`
}
const getMemberData = () => {
$memberInfoCount({ queryDateRange: vdata.timeSelected }).then(({ bizData }) => {
Object.assign(memberData, bizData);
const getMemberData = () => {
$memberInfoCount({
queryDateRange: vdata.timeSelected
}).then(({
bizData
}) => {
Object.assign(memberData, bizData);
});
};
defineExpose({
refData
});
};
defineExpose({ refData });
</script>
<style lang="scss" scoped>
.index-header {
width: 680rpx;
margin: 0 auto;
transform: translateY(30rpx);
margin-bottom: 25rpx;
padding: 20rpx;
box-sizing: border-box;
border-radius: $J-b-r32;
background: $jeepay-bg-primary;
backdrop-filter: blur(20rpx);
box-shadow: 0 50rpx 70rpx -60rpx rgba(0, 65, 164, 0.5);
.index-selected {
display: flex;
justify-content: space-between;
.index-time {
.index-header {
width: 680rpx;
margin: 0 auto;
transform: translateY(30rpx);
margin-bottom: 25rpx;
padding: 20rpx;
box-sizing: border-box;
border-radius: $J-b-r32;
background: $jeepay-bg-primary;
backdrop-filter: blur(20rpx);
box-shadow: 0 50rpx 70rpx -60rpx rgba(0, 65, 164, 0.5);
.index-selected {
display: flex;
justify-content: space-between;
align-items: center;
width: 490rpx;
height: 90rpx;
border-radius: 20rpx;
padding: 10rpx;
background-color: rgba($color: #fff, $alpha: 0.1);
.time-item {
flex: 1;
// width: 120rpx;
height: 100%;
font-size: 32rpx;
font-weight: 500;
color: rgba(255, 255, 255, 0.75);
.index-time {
display: flex;
justify-content: space-between;
align-items: center;
width: 490rpx;
height: 90rpx;
border-radius: 20rpx;
padding: 10rpx;
background-color: rgba($color: #fff, $alpha: 0.1);
.time-item {
flex: 1;
// width: 120rpx;
height: 100%;
font-size: 32rpx;
font-weight: 500;
color: rgba(255, 255, 255, 0.75);
}
.time-active {
background-color: $J-bg-ff;
color: $J-color-t21;
border-radius: 12rpx;
}
}
.time-active {
background-color: $J-bg-ff;
color: $J-color-t21;
border-radius: 12rpx;
.index-scan {
width: 110rpx;
height: 110rpx;
border-radius: 20rpx;
background-color: rgba($color: #fff, $alpha: 0.1);
image {
width: 41rpx;
height: 35rpx;
}
}
}
.index-scan {
width: 110rpx;
.receipts-money {
display: flex;
flex-direction: column;
align-items: center;
margin: 30rpx 0;
color: $J-color-tff;
.money-num {
font-size: 70rpx;
font-weight: 500;
}
}
.money-list {
display: flex;
justify-content: space-between;
padding: 0 72rpx;
margin-bottom: 50rpx;
text-align: center;
color: $J-color-tff;
.money-item {
.money-num {
font-size: 32rpx;
font-weight: 500;
}
}
}
.money-title {
margin-bottom: 10rpx;
font-size: 26rpx;
font-weight: 400;
color: $J-color-tSff;
}
.quick-money {
height: 110rpx;
border-radius: 20rpx;
background-color: rgba($color: #fff, $alpha: 0.1);
image {
width: 41rpx;
height: 35rpx;
}
color: $J-color-t29;
}
}
.receipts-money {
display: flex;
flex-direction: column;
align-items: center;
margin: 30rpx 0;
color: $J-color-tff;
.money-num {
font-size: 70rpx;
font-weight: 500;
}
}
.money-list {
display: flex;
justify-content: space-between;
padding: 0 72rpx;
margin-bottom: 50rpx;
text-align: center;
color: $J-color-tff;
.money-item {
.money-num {
font-size: 32rpx;
font-weight: 500;
}
}
}
.money-title {
margin-bottom: 10rpx;
font-size: 26rpx;
font-weight: 400;
color: $J-color-tSff;
}
.quick-money {
height: 110rpx;
border-radius: 20rpx;
color: $J-color-t29;
}
}
</style>
</style>

View File

@ -229,7 +229,7 @@
{
title: '退出登录',
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
icon: '/static/indexImg/icon-login-out.svg',
pageUrl: 'PAGES_LOGIN',
clickFunc:()=>{
storageManage.cleanByLogout()

View File

@ -259,10 +259,12 @@
function accountTypeChange(e) {
// #ifdef H5
if (e == 1) {
// vdata.formData.merchantName = '18049104914'
// vdata.formData.merchantName = ''
// vdata.formData.username = ''
if(e==1){
vdata.formData.merchantName = '18049104914'
vdata.formData.username = '13666666666'
vdata.formData.pwd = '123456'
}else{
vdata.formData.pwd = 'qwer1234'
}
// #endif
}

View File

@ -158,7 +158,6 @@
reactive,
ref,
nextTick,
getCurrentInstance,
watch
} from 'vue';
import myCar from './components/car'
@ -179,7 +178,6 @@
canXiadan.value=await hasPermission('允许下单')
}
xiadanClick()
const instance = getCurrentInstance();
//
const lingshi = reactive({
show: false

View File

@ -5,7 +5,7 @@
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
</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>
</template>
</view>

View File

@ -40,7 +40,13 @@
<view class="line-th color-666 ">{{item.salePrice||item.price}}</view>
</template>
<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>
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
</view>
@ -54,12 +60,15 @@
@tap="tuicai(item,index)"><text class="no-wrap">退菜</text></my-button>
</view>
</template>
<template v-if="orderInfo.status=='closed'">
<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"
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
</view>
<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'">
<my-button :width="128" :height="48" plain shape="circle"
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
</view>
</template>
</template>
</view>
</view>
<!-- <view class="bg-gray u-p-20 u-m-t-20" v-if="orderInfo.remark">
@ -128,8 +137,12 @@
computed
} from 'vue';
import color from '@/commons/color.js'
import {hasPermission} from '@/commons/utils/hasPermission.js'
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
function returnTotalMoney(item){
return (item.price*item.num).toFixed(2)
}
function to2(n){
if(!n){
return 0
@ -142,7 +155,11 @@
}
function tuikuan(item, index) {
emits('tuikuan', item, index)
hasPermission('允许退款').then(res=>{
if(res){
emits('tuikuan', item, index)
}
})
}
function printOrder() {
@ -175,7 +192,7 @@
const goodsPrice = props.data.reduce((prve, cur) => {
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
b) => {
return a + (b.salePrice || b.price) * (b.number || b.num)
return a + b.priceAmount*1
}, 0)
return prve + curTotal
}, 0)

View File

@ -40,7 +40,7 @@
</view>
<view class="u-flex u-flex-1 u-row-right">
<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 File

@ -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

View File

@ -6,6 +6,8 @@
发布APP: HBuilderX 3.6.5 ( 3.6.11 app调试报错 )
H5, 不影响。
###apk下载地址
* <https://mp-3b7dba1a-2dfb-4c7a-a239-2ab2157f829a.cdn.bspapp.com/cloudstorage/__UNI__66E7BD0_20241023141536.apk>
### 全局文件结构
* commons->utils>hasPermission.js 全局权限验证文件