This commit is contained in:
2024-11-05 16:47:42 +08:00
11 changed files with 95 additions and 97 deletions

View File

@@ -83,6 +83,9 @@
title: '保存成功' title: '保存成功'
}) })
Object.assign(form, res) Object.assign(form, res)
setTimeout(()=>{
uni.navigateBack()
},1500)
} }
onShow(() => { onShow(() => {
getlist() getlist()

View File

@@ -25,7 +25,7 @@
耗材价格 耗材价格
</view> </view>
<view> <view>
<input class="uni-input" placeholder="请输入耗材价格" type="number" v-model="datas.form.price" > <input class="uni-input" placeholder="请输入耗材价格" type="number" v-model="datas.form.price">
</view> </view>
</view> </view>
<view> <view>
@@ -33,7 +33,7 @@
预警值 预警值
</view> </view>
<view> <view>
<input type="text" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id=""> <input type="number" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id="">
</view> </view>
</view> </view>
<!-- <li style="justify-content: space-between;"> <!-- <li style="justify-content: space-between;">
@@ -110,6 +110,9 @@
let sumbit = () => { let sumbit = () => {
tbConsTypeput([{ tbConsTypeput([{
...datas.form, ...datas.form,
status: datas.form.status * 1,
isCheck: datas.form.isCheck * 1,
conWarning: datas.form.conWarning * 1,
shopId: uni.getStorageSync("shopId"), shopId: uni.getStorageSync("shopId"),
conTypeId: datas.list[datas.nowStatusIndex].id, conTypeId: datas.list[datas.nowStatusIndex].id,
id: datas.form.id id: datas.form.id
@@ -132,8 +135,6 @@
} }
</style> </style>
<style scoped lang="less"> <style scoped lang="less">
ul, ul,
li { li {
list-style: none; list-style: none;
@@ -186,6 +187,7 @@
.bottombutton { .bottombutton {
margin-top: 84rpx; margin-top: 84rpx;
padding: 0 24rpx; padding: 0 24rpx;
>button { >button {
width: 530rpx; width: 530rpx;
height: 80rpx; height: 80rpx;

View File

@@ -45,8 +45,9 @@
</view> </view>
</view> </view>
<view> <view>
<view class=""> <view style="background-color: #fff;" @tap="show=true;showData = filtersSproductId(item.product)">
所属商品: {{ filtersSproductId(item.product)}} 所属商品:
{{ filtersSproductId(item.product).length>7?filtersSproductId(item.product).substring(0,6)+'...':filtersSproductId(item.product)}}
</view> </view>
<view class=""> <view class="">
<up-button shape="circle" type="primary" size="mini" color="#999" <up-button shape="circle" type="primary" size="mini" color="#999"
@@ -73,6 +74,19 @@
</view> </view>
<my-action-sheet @itemClick="sheetClick" ref="refMoreSheet" :list="actionSheet.list"></my-action-sheet> <my-action-sheet @itemClick="sheetClick" ref="refMoreSheet" :list="actionSheet.list"></my-action-sheet>
<my-reportDamage ref="reportDamage" title="耗材报损" :item="report.data" @affirm="affirm"></my-reportDamage> <my-reportDamage ref="reportDamage" title="耗材报损" :item="report.data" @affirm="affirm"></my-reportDamage>
<up-popup :show="show" :round="18" mode="center" >
<view class="zhezhaopop">
<view class="">
<span></span>
<span></span>
<up-icon @tap="show=false" name="close-circle-fill"></up-icon>
</view>
<view class="">
{{showData}}
</view>
</view>
</up-popup>
</template> </template>
<script setup> <script setup>
@@ -98,6 +112,8 @@
} from '@/http/yskApi/requestAll.js'; } from '@/http/yskApi/requestAll.js';
let reportDamage = ref(null) let reportDamage = ref(null)
let refMoreSheet = ref(null) let refMoreSheet = ref(null)
let show = ref(false)
let showData = ref()
const report = reactive({ const report = reactive({
data: { data: {
// thumbnail: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240918/a17a62b7b55a4b65a2a2542050672b34.png', // thumbnail: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240918/a17a62b7b55a4b65a2a2542050672b34.png',
@@ -251,7 +267,6 @@
// const productName = ele.slice(startIndex + 1, ele.length) // const productName = ele.slice(startIndex + 1, ele.length)
str = ele.name + ',' + str str = ele.name + ',' + str
}) })
return str return str
} }
let toUrl = (url, d) => { let toUrl = (url, d) => {
@@ -450,6 +465,24 @@
background-color: #fff; background-color: #fff;
} }
.zhezhaopop {
padding: 34rpx 32rpx;
width: 594rpx;
>view:first-child {
.df;
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;
}
}
}
.df() { .df() {
display: flex; display: flex;

BIN
pageConsumables/time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="viewrecordsType"> <!-- <view class="viewrecordsType">
<view style="display: flex;align-items: center;" @tap="popPu"> <view style="display: flex;align-items: center;" @tap="popPu">
筛选时间<up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon> 筛选时间<up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
</view> </view>
@@ -7,6 +7,10 @@
{{datas.statusTitle}} <up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon> {{datas.statusTitle}} <up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
</view> </view>
</view> -->
<view style="position: fixed;right: 50rpx;top: 80vh;background-color: #fff;border-radius: 50%;width: 65rpx;height: 65rpx;display: flex;align-items: center;justify-content: center;">
<image src="./time.png" style="width: 50rpx;height: 50rpx;" @tap="popPu"
mode=""></image>
</view> </view>
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide"> <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" <view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"

View File

@@ -39,9 +39,7 @@ onShow(() => {
}) })
const saveImage = () => { const saveImage = () => {
// #ifdef APP-PLUS
uni.downloadFile({ uni.downloadFile({
url: vdata.QrcodeUrl, url: vdata.QrcodeUrl,
success: (res) => { success: (res) => {
@@ -65,64 +63,10 @@ const saveImage = () => {
infoBox.showErrorToast('保存失败') 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 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-wrapper { .page-wrapper {

View File

@@ -6,14 +6,12 @@
<text style="color: red;">*</text>员工姓名 <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 />
</view> </view>
<view> <view>
<view> <view>
<text style="color: red;">*</text>手机号 <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 />
</view> </view>
<view> <view>
@@ -21,7 +19,6 @@
<text style="color: red;">*</text>员工编号 <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 />
</view> </view>
<view> <view>
@@ -29,14 +26,12 @@
<text style="color: red;">*</text>员工账号 <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 />
</view> </view>
<view> <view>
<view> <view>
登录密码 登录密码
</view> </view>
<input type="text" v-model="datas.formData.password" placeholder="请输入登录密码不填写默认123456" /> <input type="text" v-model="datas.formData.password" placeholder="请输入登录密码不填写默认123456" />
<hr />
</view> </view>
<view> <view>
<view> <view>
@@ -46,21 +41,21 @@
<up-radio label="折扣" name="1"></up-radio> <up-radio label="折扣" name="1"></up-radio>
<up-radio style="margin: 18px 10px;" label="金额" name="0"></up-radio> <up-radio style="margin: 18px 10px;" label="金额" name="0"></up-radio>
</up-radio-group> </up-radio-group>
<hr />
</view> </view>
<view> <view>
<view> <view>
最低优惠折扣 最低优惠折扣
</view> </view>
<input type="text" v-model="datas.formData.maxDiscountAmount" placeholder="0" /> <input v-if="datas.formData.discountType==1" @blur="maxdisinput" type="number"
<hr /> v-model="datas.formData.maxDiscountAmount" placeholder="请输入最低优惠折扣" />
<input v-if="datas.formData.discountType==0" type="number" v-model="datas.formData.maxDiscountAmount"
placeholder="请输入最低优惠折扣" />
</view> </view>
<view> <view>
<view> <view>
<text style="color: red;">*</text> 角色 <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 />
</view> </view>
</view> </view>
<view class="h7">员工权限设置</view> <view class="h7">员工权限设置</view>
@@ -117,7 +112,8 @@
let datas = reactive({ let datas = reactive({
formData: { formData: {
permissions: [], permissions: [],
maxDiscountAmount:0 maxDiscountAmount: 0,
discountType:0
}, },
rolesList: [], rolesList: [],
columns: [], columns: [],
@@ -143,23 +139,25 @@
function gettbPlussShopStaffDetail(id) { function gettbPlussShopStaffDetail(id) {
tbPlussShopStaffDetail(id).then(res => { tbPlussShopStaffDetail(id).then(res => {
console.log(res,'编辑员工后的提示')
datas.formData = res datas.formData = res
if (datas.rolesList) { 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() { 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({ currentInstance.ctx.$refs.uToastRef.show({
message: "请填写必填项", message: "请填写必填项",
type: 'default', type: 'default',
}) })
return 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()
@@ -187,6 +185,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() { function getrolesEvent() {
getroles().then((res) => { getroles().then((res) => {
datas.rolesList = res.content datas.rolesList = res.content
@@ -212,14 +219,13 @@
} }
</style> </style>
<style scoped lang="less"> <style scoped lang="less">
.h7 { .h7 {
margin: 32rpx 0; margin: 32rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
width: 400rpx;
} }
.content { .content {
@@ -234,6 +240,7 @@
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
border-bottom: 1px solid #999999;
>input { >input {
padding: 24rpx 0; padding: 24rpx 0;
@@ -260,9 +267,10 @@
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
margin-top: 50rpx; margin: 0 auto;
margin-left: 50%; // margin-top: 50rpx;
transform: translateX(-50%); // margin-left: 50%;
// transform: translateX(-50%);
} }
.bottomBotton2 { .bottomBotton2 {

View File

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

View File

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

View File

@@ -110,7 +110,7 @@
<view class="constantbox"> <view class="constantbox">
<view class="constantboxitem"> <view class="constantboxitem">
<view class="head">班次号</view> <view class="head">班次号</view>
<view class="head">班次</view> <!-- <view class="head">班次</view> -->
<view class="head">交班人</view> <view class="head">交班人</view>
<view class="head">开班时间</view> <view class="head">开班时间</view>
<view class="head">交班时间</view> <view class="head">交班时间</view>
@@ -187,7 +187,7 @@
} from '@/http/yskApi/pageWorkControl.js' } from '@/http/yskApi/pageWorkControl.js'
function toDetail(item) { function toDetail(item) {
go.to('PAGES_WORK_HANDOVER_DETAIL', item) // go.to('PAGES_WORK_HANDOVER_DETAIL', item)
} }
function toSetting() { function toSetting() {
@@ -348,9 +348,8 @@
const datePicker = ref(null) const datePicker = ref(null)
function datePickerConfirm(e) { function datePickerConfirm(e) {
filters.time.start = new Date(e.start).getTime() filters.time.start = new Date(e.start.replaceAll('-', '/')).getTime()
filters.time.end = new Date(e.end).getTime() filters.time.end = new Date(e.end.replaceAll('-', '/')).getTime()
console.log(filters);
getTableData() getTableData()
} }

View File

@@ -46,7 +46,7 @@
<view class="right"> <view class="right">
<view> <view>
<up-checkbox-group><up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"> </up-checkbox></up-checkbox-group> <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>
</view> </view>
</view> </view>
<view class="page-cell m"> <view class="page-cell m">