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

View File

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

View File

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

View File

@ -45,8 +45,9 @@
</view>
</view>
<view>
<view class="">
所属商品: {{ filtersSproductId(item.product)}}
<view style="background-color: #fff;" @tap="show=true;showData = filtersSproductId(item.product)">
所属商品:
{{ filtersSproductId(item.product).length>7?filtersSproductId(item.product).substring(0,6)+'...':filtersSproductId(item.product)}}
</view>
<view class="">
<up-button shape="circle" type="primary" size="mini" color="#999"
@ -73,6 +74,19 @@
</view>
<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>
<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>
<script setup>
@ -98,6 +112,8 @@
} from '@/http/yskApi/requestAll.js';
let reportDamage = ref(null)
let refMoreSheet = ref(null)
let show = ref(false)
let showData = ref()
const report = reactive({
data: {
// 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)
str = ele.name + ',' + str
})
return str
}
let toUrl = (url, d) => {
@ -450,6 +465,24 @@
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() {
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>
<view class="viewrecordsType">
<!-- <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>
@ -7,6 +7,10 @@
{{datas.statusTitle}} <up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
</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 :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 File

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

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: [],
@ -143,23 +139,25 @@
function gettbPlussShopStaffDetail(id) {
tbPlussShopStaffDetail(id).then(res => {
console.log(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 +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() {
getroles().then((res) => {
datas.rolesList = res.content
@ -212,14 +219,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 +240,7 @@
font-weight: bold;
font-size: 28rpx;
color: #333333;
border-bottom: 1px solid #999999;
>input {
padding: 24rpx 0;
@ -260,9 +267,10 @@
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin-top: 50rpx;
margin-left: 50%;
transform: translateX(-50%);
margin: 0 auto;
// margin-top: 50rpx;
// margin-left: 50%;
// transform: translateX(-50%);
}
.bottomBotton2 {

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
})
@ -202,16 +202,19 @@
onLoad(params => {
console.log(params,'调试111')
if (params.id) {
let items = params
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: '新增用户'
@ -236,6 +239,7 @@
status:1,
levelConsume:0,
shopId: uni.getStorageSync("shopId"),
sex:userForm.sex==1?1:2
}
if (res) {
if (option.type == 'add') {
@ -252,6 +256,7 @@
<style scoped>
page {
background: #F9F9F9;
height: 100vh;
}
</style>
<style lang="scss" scoped>

View File

@ -110,7 +110,7 @@
<view class="constantbox">
<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>
@ -187,7 +187,7 @@
} from '@/http/yskApi/pageWorkControl.js'
function toDetail(item) {
go.to('PAGES_WORK_HANDOVER_DETAIL', item)
// go.to('PAGES_WORK_HANDOVER_DETAIL', item)
}
function toSetting() {
@ -348,9 +348,8 @@
const datePicker = ref(null)
function datePickerConfirm(e) {
filters.time.start = new Date(e.start).getTime()
filters.time.end = new Date(e.end).getTime()
console.log(filters);
filters.time.start = new Date(e.start.replaceAll('-', '/')).getTime()
filters.time.end = new Date(e.end.replaceAll('-', '/')).getTime()
getTableData()
}

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>
</view>
</view>
<view class="page-cell m">