This commit is contained in:
魏啾 2024-11-04 15:48:13 +08:00
commit 4bd5d2b643
18 changed files with 117 additions and 64 deletions

View File

@ -71,7 +71,8 @@
</uni-forms-item> -->
</view>
<template v-if="option.type==='edit'">
<!-- <template v-if="option.type==='edit'"> -->
<template v-if="false">
<view class="font-bold u-m-t-32 u-m-b-32">子分类</view>
<view class="block u-p-t-32 u-p-b-32" v-if=" category.childrenList.length">
<view class="u-flex u-text-center u-font-24">
@ -175,14 +176,14 @@
</template>
</uni-forms>
</view>
<template v-if="option.type==='edit'">
<!-- <template v-if="option.type==='edit'">
<view class="u-flex block u-p-l-20 u-p-r-20 u-p-t-28 u-p-b-28" @click="addcategoryChildren">
<view class="icon icon-add u-m-r-22 ">
</view>
<view class="color-main">添加子分类</view>
</view>
</template>
</template> -->
<view class="save-btn-box">

View File

@ -100,6 +100,9 @@
onMounted,
getCurrentInstance
} from 'vue';
import {
onShow,
} from '@dcloudio/uni-app';
import color from '@/commons/color.js';
import go from '@/commons/utils/go.js';
import {
@ -131,10 +134,11 @@
}
})
onMounted(() => {
getList()
datas.item = JSON.parse(props.item)
})
onShow(() => {
getList()
})
function toggle() {
go.to('PAGES_ADD_SUPPLIER')
}

View File

@ -104,6 +104,9 @@
onMounted,
getCurrentInstance
} from 'vue';
import {
onShow,
} from '@dcloudio/uni-app';
import color from '@/commons/color.js';
import go from '@/commons/utils/go.js';
import {
@ -134,10 +137,12 @@
}
})
onMounted(() => {
getList()
datas.item = JSON.parse(props.item)
datas.form = assign(datas.form, ...datas.item)
})
onShow(() => {
getList()
})
const refs = getCurrentInstance()
function toggle() {

View File

@ -89,7 +89,8 @@
reactive,
ref,
watch,
nextTick
nextTick,
onMounted
} from 'vue';
import {
returnSkuSnap,
@ -138,7 +139,10 @@
}
}
})
let data = ref(props.goods)
let data = ref({
lowPrice: 0,
skuList: []
})
const rules = {
'lowPrice': [{
type: 'Number',
@ -221,6 +225,10 @@
// skuSnap: JSON.stringify(skuSnap)
// })
// }
onMounted(()=>{
refForm.value.setRules(rules)
})
</script>
<style lang="scss" scoped>

View File

@ -170,7 +170,9 @@
active: 0
})
const data = ref(props.goods)
const data = ref({
name:''
})
const emits = defineEmits(['update:show', 'save'])
const form = reactive({
note: ''
@ -252,6 +254,10 @@
// skuSnap: JSON.stringify(skuSnap)
// })
// }
onMounted(()=>{
refForm.value.setRules(rules)
})
</script>
<style lang="scss" scoped>

View File

@ -5,14 +5,14 @@
<view class="u-flex ">
<view class="u-flex u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="timeToggle">
<text class="u-m-r-12 no-wrap" :class="{'color-main':filters.time.start&&filters.time.end}">筛选时间</text>
<image src="/pageInvoicing/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
<image src="/pageProduct/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
mode="">
</image>
</view>
<view class="u-flex u-m-l-60 u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="showTypesToggle">
<text class="u-m-r-12" v-if="types.active===''"> 选择类型</text>
<text class="u-m-r-12 no-wrap color-main" v-else>{{types.list[types.active].text}}</text>
<image src="/pageInvoicing/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
<image src="/pageProduct/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
mode="">
</image>
</view>
@ -67,7 +67,7 @@
</view>
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker"></my-date-pickerview>
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker" mode="all"></my-date-pickerview>
<my-mask ref="mask" @close="hideType"></my-mask>
</view>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8.42" height="4.945" viewBox="0 0 8.42 4.945"><defs><style>.a{fill:#333;}</style></defs><path class="a" d="M230.634,368.187a.7.7,0,0,0-.513-.187l-7,.047a.7.7,0,0,0-.513.187.676.676,0,0,0,0,.979l3.5,3.5c.047.047.14.093.187.14l.047.047a.731.731,0,0,0,.746-.14l3.5-3.546A.735.735,0,0,0,230.634,368.187Z" transform="translate(-222.4 -368)"/></svg>

After

Width:  |  Height:  |  Size: 390 B

View File

@ -24,7 +24,7 @@
<picker-view-column>
<view class="item" v-for="(item,index) in days" :key="index">{{item}}</view>
</picker-view-column>
<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>
@ -32,7 +32,7 @@
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}</view>
</picker-view-column>
</picker-view-column> -->
</picker-view>
<view class="u-text-center color-999"></view>
<picker-view :immediate-change="true" :value="value1" @pickend="pickend1" @change="bindChange1"
@ -46,7 +46,7 @@
<picker-view-column>
<view class="item" v-for="(item,index) in days1" :key="index">{{item}}</view>
</picker-view-column>
<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>
@ -54,7 +54,7 @@
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}</view>
</picker-view-column>
</picker-view-column> -->
</picker-view>
<!-- 站位 -->

View File

@ -192,8 +192,10 @@
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
let s = start.substring(0, start.indexOf(' '))
let e = end.substring(0, end.indexOf(' '))
startTime = s + ' 00:00:00'
endTime = e + ' 23:59:59'
}
summaryTrade({
shopId: uni.getStorageSync('shopId'),

View File

@ -6,14 +6,12 @@
<text style="color: red;">*</text>员工姓名
</view>
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
<hr />
</view>
<view>
<view>
<text style="color: red;">*</text>手机号
</view>
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
<hr />
</view>
<view>
@ -21,7 +19,6 @@
<text style="color: red;">*</text>员工编号
</view>
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
<hr />
</view>
<view>
@ -29,14 +26,12 @@
<text style="color: red;">*</text>员工账号
</view>
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
<hr />
</view>
<view>
<view>
登录密码
</view>
<input type="text" v-model="datas.formData.password" placeholder="请输入登录密码不填写默认123456" />
<hr />
</view>
<view>
<view>
@ -46,21 +41,21 @@
<up-radio label="折扣" name="1"></up-radio>
<up-radio style="margin: 18px 10px;" label="金额" name="0"></up-radio>
</up-radio-group>
<hr />
</view>
<view>
<view>
最低优惠折扣
</view>
<input type="text" v-model="datas.formData.maxDiscountAmount" placeholder="0" />
<hr />
<input v-if="datas.formData.discountType==1" @blur="maxdisinput" type="number"
v-model="datas.formData.maxDiscountAmount" placeholder="请输入最低优惠折扣" />
<input v-if="datas.formData.discountType==0" type="number" v-model="datas.formData.maxDiscountAmount"
placeholder="请输入最低优惠折扣" />
</view>
<view>
<view>
<text style="color: red;">*</text> 角色
</view>
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
<hr />
</view>
</view>
<view class="h7">员工权限设置</view>
@ -117,7 +112,8 @@
let datas = reactive({
formData: {
permissions: [],
maxDiscountAmount:0
maxDiscountAmount: 0,
discountType:0
},
rolesList: [],
columns: [],
@ -145,21 +141,22 @@
tbPlussShopStaffDetail(id).then(res => {
datas.formData = res
if (datas.rolesList) {
datas.rolesdata = datas.rolesList.filter(ele => ele.id == res.roleId)[0].name
let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId)
datas.rolesdata = rolefilter[0].name
}
})
}
function sumbitEvent() {
//
if(!datas.formData.name||!datas.formData.phone||!datas.formData.code||!datas.formData.account){
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)
if (rolesId.length == 0) {
currentInstance.ctx.$refs.message.open()
@ -187,6 +184,15 @@
})
}
function maxdisinput(d) {
let num = d.detail.value * 1
if (num >= 1) {
datas.formData.maxDiscountAmount = 0.99
}else{
datas.formData.maxDiscountAmount = d.detail.value.substring(0,4)
}
}
function getrolesEvent() {
getroles().then((res) => {
datas.rolesList = res.content
@ -212,14 +218,13 @@
}
</style>
<style scoped lang="less">
.h7 {
margin: 32rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
width: 400rpx;
}
.content {
@ -234,6 +239,7 @@
font-weight: bold;
font-size: 28rpx;
color: #333333;
border-bottom: 1px solid #999999;
>input {
padding: 24rpx 0;

View File

@ -12,14 +12,14 @@
</view>
<view class="">
<view style="display: flex;justify-content: center;align-items: center;">
<span style="font-size: 28rpx;color: #999999;">是否启用</span>
<span style="font-size: 28rpx;color: #999999;">是否启用</span>&nbsp;&nbsp;
<up-switch :activeValue="1" :inactiveValue="0" v-model="item.status" size="18"
@change="switch2Change($event,item)"></up-switch>
</view>
<view class="df">
<up-button size="small" style="border-radius: 28rpx 28rpx 28rpx 28rpx;"
@tap="datas.show = true;datas.rolesId=item.id" text="删除"></up-button>
<up-button type="primary" plain size="small"
<up-button size="small" shape="circle" style="border-radius: 28rpx 28rpx 28rpx 28rpx;"
@tap="datas.show = true;datas.rolesId=item.id" text="删除"></up-button>&nbsp;&nbsp;
<up-button type="primary" shape="circle" plain size="small"
style="border-radius: 28rpx 28rpx 28rpx 28rpx;margin-left: 16rpx;" @tap="toUrl(item)"
text="编辑"></up-button>
</view>

View File

@ -180,7 +180,7 @@
birthDay: '',
balance: '',
integral: '',
isVip: false,
isVip: true,
level: 1,
sex: 1
})
@ -207,10 +207,14 @@
uni.setNavigationBarTitle({
title: '编辑用户'
})
items.phone = items.telephone
items.sex = items.sex == '男' ? 1 : 2
userForm = items
// userForm = items
userForm.nickName=items.nickName
userForm.birthDay=items.birthDay
userForm.id=items.id
userForm.phone = items.telephone
userForm.sex = items.sex == '男' ? 1 : 2
option.type = 'edit'
console.log(userForm,'调试111')
} else {
uni.setNavigationBarTitle({
title: '新增用户'
@ -235,6 +239,7 @@
status:1,
levelConsume:0,
shopId: uni.getStorageSync("shopId"),
sex:userForm.sex==1?1:2
}
if (res) {
if (option.type == 'add') {
@ -251,6 +256,7 @@
<style scoped>
page {
background: #F9F9F9;
height: 100vh;
}
</style>
<style lang="scss" scoped>

View File

@ -283,7 +283,10 @@
activeUser: null
})
let close = () => {
datas.form = {}
datas.form = {
operationType: 'in',
type: 'inMoney'
}
}
const confirm = () => {
datas.show = false;

View File

@ -49,13 +49,15 @@
} from '@dcloudio/uni-app';
let selected = ref('today')
let showAll = ref(false);
let $list=[]
let $list = []
function toggleShowAll() {
showAll.value = !showAll.value
setList()
}
function setList(){
list.value=showAll.value?$list:$list.slice(0,4)
function setList() {
list.value = showAll.value ? $list : $list.slice(0, 4)
}
let list = ref()
const emit = defineEmits(['totalRevenue'])
@ -90,6 +92,7 @@
})
}
});
function getlist(start, end) {
let startTime, endTime;
if (selected.value == 'today') {
@ -113,15 +116,17 @@
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
let s = start.substring(0, start.indexOf(' '))
let e = end.substring(0, end.indexOf(' '))
startTime = s + ' 00:00:00'
endTime = e + ' 23:59:59'
}
summaryTrade({
shopId: uni.getStorageSync('shopId'),
startTime,
endTime,
}).then((res) => {
$list=res.sale.payCount
$list = res.sale.payCount
setList()
emit('totalRevenue', res.sale.incomeAmountAll)
})

View File

@ -46,7 +46,7 @@
<view class="right">
<view>
<up-checkbox-group><up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"> </up-checkbox></up-checkbox-group>
</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon>
</view></up-icon>
</view>
</view>
<view class="page-cell m">

View File

@ -109,7 +109,7 @@
<view class="u-flex u-row-between u-m-t-32">
<view>退款金额</view>
<view class="color-999">
<text class="">{{orderInfo.refundAmount}}</text>
<text class="">{{(orderInfo.refundAmount).toFixed(2)}}</text>
</view>
</view>
<view class="u-flex u-row-between u-m-t-32">

View File

@ -221,7 +221,7 @@
if(!canJieZhang){
return
}
const userId=orderDetail.info.userId||''
const memberId=orderDetail.info.memberId||''
clearEmit()
go.to('PAGES_ORDER_PAY', {
tableId: options.tableId|| orderDetail.info.tableId,
@ -229,7 +229,7 @@
masterId: options.masterId,
orderId: orderDetail.info.id,
discount: 1,
userId
memberId
})
}
@ -243,8 +243,8 @@
const options = reactive({})
async function init() {
const res = await orderApi.tbOrderInfoDetail(options.id)
if(res.userId){
queryAllShopUser({id:res.userId}).then(res=>{
if(res.memberId){
queryAllShopUser({id:res.memberId}).then(res=>{
if(res.content[0]){
user.value=res.content[0]
}
@ -320,6 +320,7 @@
//
function setUser(par) {
const submitPar = {
orderId:options.id||'',
masterId: options.masterId,
tableId: options.tableId|| orderDetail.info.tableId,
vipUserId: user.value.id ? user.value.id : '',

View File

@ -42,13 +42,18 @@
<view class="u-flex u-row-between u-p-t-30 u-p-b-30 border-bottom">
<view class="u-flex">
<image class="icon" :src="item.icon" mode=""></image>
<text class="u-m-l-10">{{item.payName}}</text>
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
</view>
<view class="u-flex color-999 u-font-24">
<view class="u-m-r-20" v-if="item.payType=='vipPay'">
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
<text>余额</text>
<text>{{user.amount||'0'}}</text>
<view>
<text>会员</text>
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
</view>
<view>
<text>余额</text>
<text>{{user.amount||'0'}}</text>
</view>
</view>
<my-radio @click="changePayType(index,item)"
:modelValue="index==pays.payTypes.selIndex">
@ -195,7 +200,7 @@
type: data.id ? 0 : 1 //0 1
}).then(res=>{
user.value = data
order.userId=data.id
order.memberId=data.id
})
})
}
@ -286,7 +291,7 @@
masterId: order.masterId,
orderId: order.id || order.orderId,
payType,
vipUserId: order.userId,
vipUserId: order.memberId,
discount: 1,
code: ''
})
@ -337,11 +342,11 @@
})
let payCodeUrl = ref('')
async function init() {
const res = await orderApi.tbOrderInfoDetail(order.orderId)
Object.assign(order, res)
if (order.userId) {
const orderRes = await orderApi.tbOrderInfoDetail(order.orderId)
Object.assign(order, orderRes)
if (orderRes.memberId) {
queryAllShopUser({
id: order.userId
id: orderRes.memberId
}).then(res => {
if(res.content[0]){
user.value =res.content[0]