Merge branch 'dev_1.0.0' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into ymf
This commit is contained in:
27
commons/utils/goodsUtil.js
Normal file
27
commons/utils/goodsUtil.js
Normal file
@@ -0,0 +1,27 @@
|
||||
export function canComputedPackFee(v) {
|
||||
return v.pack && v.status != 'return' && v.status != 'refund' && v.status != 'refunding'
|
||||
}
|
||||
export function returnCanComputedGoodsArr(arr) {
|
||||
return arr.filter(v=>canComputedPackFee(v))
|
||||
}
|
||||
export function returnPackFee(arr) {
|
||||
return arr.reduce((prve, cur) => {
|
||||
return prve + cur.packAmount
|
||||
}, 0).toFixed(2)
|
||||
}
|
||||
|
||||
export function canTuicai(orderInfo,item){
|
||||
return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'&& item.status!='return'
|
||||
}
|
||||
export function canTuiKuan(orderInfo,item){
|
||||
return orderInfo.status!='unpaid'&& item.status!='return'&&item.status!='refund'&&item.status!='refunding'
|
||||
}
|
||||
export function isTui(item){
|
||||
return item.status=='return'||item.status=='refund'||item.status=='refunding'
|
||||
}
|
||||
export function numSum(arr){
|
||||
const sum=arr.reduce((a,b)=>{
|
||||
return a+b*100
|
||||
},0)
|
||||
return (sum/100).toFixed(2)
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<view class="u-m-t-40 u-flex ">
|
||||
<view>实收金额</view>
|
||||
<view class="u-m-l-32 border u-p-l-10 u-p-r-10 u-flex-1">
|
||||
<uni-easyinput style="digit" @input="currentPriceInput" @change="currentPriceChange" paddingNone :inputBorder="false"
|
||||
<uni-easyinput type="number" @input="currentPriceInput" @change="currentPriceChange" paddingNone :inputBorder="false"
|
||||
v-model="form.currentPrice"
|
||||
placeholder="输入实际金额"></uni-easyinput>
|
||||
</view>
|
||||
@@ -20,7 +20,7 @@
|
||||
<view>优惠折扣</view>
|
||||
<view class="u-m-l-32 u-flex-1 u-flex border u-p-l-10 u-p-r-10">
|
||||
<view class="u-flex-1">
|
||||
<uni-easyinput @input="discountInput" @change="discountChange" style="digit" paddingNone :inputBorder="false"
|
||||
<uni-easyinput type="number" @input="discountInput" @change="discountChange" paddingNone :inputBorder="false"
|
||||
v-model="form.discount"
|
||||
placeholder="输入折扣"></uni-easyinput>
|
||||
</view>
|
||||
|
||||
@@ -467,14 +467,19 @@
|
||||
const startTotal = returnDateString(e.detail.value, true).getTime()
|
||||
const endTotal = returnDateString(value1.value, true).getTime()
|
||||
value.value = e.detail.value
|
||||
|
||||
nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
if (props.isArea) {
|
||||
value.value = startTotal > endTotal ? value1.value : e.detail.value
|
||||
}
|
||||
console.log(value.value);
|
||||
debounce(changeDays(false, value.value), 100)
|
||||
})
|
||||
},10)
|
||||
// nextTick(() => {
|
||||
// if (props.isArea) {
|
||||
// value.value = startTotal > endTotal ? value1.value : e.detail.value
|
||||
// }
|
||||
// console.log(value.value);
|
||||
// debounce(changeDays(false, value.value), 100)
|
||||
// })
|
||||
}
|
||||
|
||||
function bindChange1(e) {
|
||||
|
||||
@@ -91,9 +91,6 @@
|
||||
// }
|
||||
// })
|
||||
onMounted(() => {
|
||||
// console.log(props,'调试121')
|
||||
// let obj = JSON.parse(props.item)
|
||||
// console.log(obj,'调试121')
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
@@ -112,7 +109,8 @@
|
||||
}
|
||||
const refs = getCurrentInstance()
|
||||
let sumbit = () => {
|
||||
if (!datas.form.conUnit) {
|
||||
let conUnitdata = datas.form.conUnit.replace(/(^\s*)|(\s*$)/g, "")
|
||||
if (!conUnitdata) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "单位不能为空"
|
||||
@@ -150,11 +148,8 @@
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
|
||||
.topTitle {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
@@ -201,6 +196,7 @@
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
供应商
|
||||
<text style="color: red;">*</text> 供应商
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
||||
@@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
联系电话
|
||||
<text style="color: red;">*</text> 联系电话
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
||||
@@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
地址
|
||||
<text style="color: red;">*</text> 地址
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
||||
@@ -39,6 +39,8 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -47,7 +49,8 @@
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
@@ -59,10 +62,17 @@
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
},
|
||||
})
|
||||
|
||||
const currentInstance = getCurrentInstance()
|
||||
function sumbit() {
|
||||
if(!datas.form.purveyorName||!datas.form.purveyorTelephone||!datas.form.address){
|
||||
currentInstance.ctx.$refs.uToastRef.show({
|
||||
message: "请填写必填项",
|
||||
type: 'default',
|
||||
})
|
||||
return
|
||||
}
|
||||
tbShopPurveyorpost(datas.form).then(res => {
|
||||
go.to('PAGES_SUPPLIER')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -182,7 +182,6 @@
|
||||
* 确认
|
||||
*/
|
||||
function affirm() {
|
||||
console.log(consId.value,'调试1')
|
||||
let params = {
|
||||
coverImg: vdata.imgUrlList,
|
||||
consId: consId.value,
|
||||
@@ -193,6 +192,7 @@
|
||||
show.value = false;
|
||||
vdata.imgUrlList = [];
|
||||
vdata.stockNumber = 1;
|
||||
emits('affirm','')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="ConsumablesTop">
|
||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
</view>
|
||||
<view>
|
||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||
@@ -46,12 +46,14 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="">
|
||||
所属商品: {{ filtersSproductId(item.productId)}}
|
||||
所属商品: {{ filtersSproductId(item.product)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
||||
:plain="true" text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999"
|
||||
@tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true"
|
||||
text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true"
|
||||
text="更多操作"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -162,14 +164,16 @@
|
||||
* 报损确认
|
||||
*/
|
||||
function affirm() {
|
||||
console.log(2)
|
||||
getList()
|
||||
// 获取分类列表
|
||||
gettbConsTypeList()
|
||||
}
|
||||
|
||||
let toggle = (d) => {
|
||||
refMoreSheet.value.open()
|
||||
actionSheet.active = d
|
||||
actionSheet.activeId = d.id
|
||||
report.data.consId = d.id
|
||||
actionSheet.active = d
|
||||
}
|
||||
|
||||
let sheetClick = (index) => {
|
||||
@@ -217,7 +221,6 @@
|
||||
}
|
||||
// async function viewpermission(d) {
|
||||
// let res = await hasPermission(d)
|
||||
// console.log(res,'调试1')
|
||||
// return res
|
||||
// }
|
||||
async function getList(d = "") {
|
||||
@@ -233,19 +236,20 @@
|
||||
}
|
||||
|
||||
function inputEvent(d) {
|
||||
datas.conName = d.detail.value.replace(/\s*/g,"");
|
||||
datas.conName = d.detail.value.replace(/\s*/g, "");
|
||||
getList()
|
||||
}
|
||||
|
||||
function filtersSproductId(d) {
|
||||
if (!d) return ''
|
||||
const dataArr = d.split(',')
|
||||
// const dataArr = d.split(',')
|
||||
let str = ''
|
||||
dataArr.forEach(ele => {
|
||||
const startIndex = ele.indexOf('_')
|
||||
d.forEach(ele => {
|
||||
// str += ele.name
|
||||
// const startIndex = ele.indexOf('_')
|
||||
// const productId = ele.slice(0, startIndex)
|
||||
const productName = ele.slice(startIndex + 1, ele.length)
|
||||
str = productName + ',' + str
|
||||
// const productName = ele.slice(startIndex + 1, ele.length)
|
||||
str = ele.name + ',' + str
|
||||
})
|
||||
|
||||
return str
|
||||
@@ -258,10 +262,8 @@
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
let showStatus = ref(false)
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object
|
||||
type: ''
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
@@ -82,16 +82,19 @@
|
||||
})
|
||||
let profitPrice = computed(() => {
|
||||
// 如果剩余数量为负数
|
||||
// if (datas.item.balance < 0) {
|
||||
// let a = datas.item.balance * -1
|
||||
// return formatDecimal((a - datas.form.balance) * datas.item.price)
|
||||
// } else {
|
||||
return formatDecimal((datas.item.balance - datas.form.balance) * datas.item.price)
|
||||
// }
|
||||
if (datas.form.balance == '-') {
|
||||
return (0 - datas.item.balance) * datas.item.price
|
||||
} else {
|
||||
return (datas.form.balance - datas.item.balance) * datas.item.price
|
||||
}
|
||||
})
|
||||
let profitNumber = computed(() => {
|
||||
// 盈亏数量
|
||||
return datas.item.balance - datas.form.balance
|
||||
if (datas.form.balance == '-') {
|
||||
return 0 - datas.item.balance
|
||||
} else {
|
||||
return datas.form.balance - datas.item.balance
|
||||
}
|
||||
})
|
||||
|
||||
function toggle() {
|
||||
@@ -136,8 +139,6 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -198,6 +199,7 @@
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
|
||||
@@ -1,62 +1,66 @@
|
||||
<template>
|
||||
<view class="supplier">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image src="./profile.png" style="width: 64rpx;height: 64rpx;" mode=""></image>
|
||||
<view style="margin-left: 16rpx;">
|
||||
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||
{{item.purveyorName}}
|
||||
<template v-if="datas.list.length>0">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image src="./profile.png" style="width: 64rpx;height: 64rpx;" mode=""></image>
|
||||
<view style="margin-left: 16rpx;">
|
||||
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||
{{item.purveyorName}}
|
||||
</view>
|
||||
<text style="color: #999;">{{item.purveyorTelephone}}</text>
|
||||
</view>
|
||||
<text style="color: #999;">{{item.purveyorTelephone}}</text>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
||||
{{ item.type == 0 ? '待支付' : '已完结' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
||||
{{item.waitAmount}}
|
||||
</view>
|
||||
<view class="">
|
||||
剩余支付金额
|
||||
</view>
|
||||
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
||||
{{ item.type == 0 ? '待支付' : '已完结' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="color: #318AFE;">
|
||||
{{item.waitCount}}未付
|
||||
<view class="">
|
||||
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
||||
{{item.waitAmount}}
|
||||
</view>
|
||||
<view class="">
|
||||
剩余支付金额
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
待付款笔数
|
||||
<view style="color: #318AFE;">
|
||||
{{item.waitCount}}未付
|
||||
</view>
|
||||
<view class="">
|
||||
待付款笔数
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>上次进货日期</span>
|
||||
<span v-if="item.lastTransactAt">{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>地址</span>
|
||||
<span>{{item.address}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>备注</span>
|
||||
<span>{{item.remark}}</span>
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button type="primary" shape="circle" size="mini"
|
||||
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||
@tap="deleteEvent(item.id)" :plain="true" text="删除">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||
style="background-color: #318AFE;color: #fff;"
|
||||
@tap="toUrl('PAGES_PAYMENT_SETTLEMENT',{id:item.id})" :plain="true" text="结款记录"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>上次进货日期</span>
|
||||
<span>{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>地址</span>
|
||||
<span>{{item.address}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>备注</span>
|
||||
<span>{{item.remark}}</span>
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button type="primary" shape="circle" size="mini"
|
||||
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary" @tap="deleteEvent(item.id)"
|
||||
:plain="true" text="删除">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||
style="background-color: #318AFE;color: #fff;"
|
||||
@tap="toUrl('PAGES_PAYMENT_SETTLEMENT',{id:item.id})" :plain="true" text="结款记录"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 200rpx;"> </view>
|
||||
</template>
|
||||
<view v-else style="text-align: center;background-color: #f9f9f9;">暂无数据</view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toUrl('PAGES_ADD_SUPPLIER')"
|
||||
@@ -69,6 +73,9 @@
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app';
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
@@ -78,7 +85,7 @@
|
||||
let datas = reactive({
|
||||
list: []
|
||||
})
|
||||
onMounted(() => {
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
let deleteEvent = (id) => {
|
||||
|
||||
@@ -18,57 +18,60 @@
|
||||
</view>
|
||||
<view class="viewrecordsTop">
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view class="">
|
||||
<view @tap="getNewdata('addCountNumber')">
|
||||
增加数量 <text
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.addCountNumber:''}}</text>
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList.addCountNumber?datas.countList.addCountNumber:'0'}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
||||
<view @tap="getNewdata('stockInNumber')"
|
||||
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:''}}
|
||||
{{datas.countList.stockInNumber?datas.countList.stockInNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||
<view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
手动增加
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList?datas.countList.addNumber:''}}
|
||||
{{datas.countList.addNumber?datas.countList.addNumber:'0'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view class="">
|
||||
<view class="" @tap="getNewdata('subCountNumber')">
|
||||
减少数量 <text
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text>
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList.subCountNumber?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 @tap="getNewdata('subNumber')"
|
||||
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}}
|
||||
{{datas.countList.subNumber?datas.countList.subNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
||||
<view @tap="getNewdata('stockOutNumber')"
|
||||
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}}
|
||||
{{datas.countList.stockOutNumber?datas.countList.stockOutNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||
<view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
商品消耗
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList?datas.countList.saleNumber:0}}
|
||||
{{datas.countList.saleNumber?datas.countList.saleNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -88,7 +91,7 @@
|
||||
<view class="">
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
||||
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> - {{ item.amount|0 }}</text>
|
||||
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> → {{ item.amount|0 }}</text>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
剩余库存 {{item.balance}}
|
||||
@@ -139,7 +142,6 @@
|
||||
let showStatus = ref(false)
|
||||
onMounted(() => {
|
||||
let items = JSON.parse(props.item)
|
||||
// console.log(items, '调试1')
|
||||
getlist()
|
||||
})
|
||||
const refs = getCurrentInstance()
|
||||
@@ -161,6 +163,11 @@
|
||||
return data
|
||||
}
|
||||
let nowStatusIndex = ref(0)
|
||||
let columnName = ref('')
|
||||
let getNewdata = (d) => {
|
||||
columnName.value = d
|
||||
getlist()
|
||||
}
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i
|
||||
@@ -171,14 +178,15 @@
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
let getlist = (conTypeId = "", start, end) => {
|
||||
let getlist = (conTypeId = "", start, end, ) => {
|
||||
let ids = JSON.parse(props.item)
|
||||
// 列表
|
||||
tbConsInfoFlowstock({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 30,
|
||||
consId: JSON.parse(props.item).conTypeId,
|
||||
column: "addCountNumber",
|
||||
consId: ids.id,
|
||||
column: columnName.value,
|
||||
conTypeId,
|
||||
|
||||
|
||||
@@ -194,6 +202,7 @@
|
||||
conTypeId,
|
||||
startTime: start,
|
||||
endTime: end,
|
||||
consId: JSON.parse(props.item).id,
|
||||
}).then(res => {
|
||||
datas.countList = res
|
||||
})
|
||||
@@ -215,7 +224,6 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
.viewrecordsType {
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<!-- <view style="justify-content: space-between;">
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
@@ -33,7 +33,7 @@
|
||||
{{datas.status[nowStatusIndex]}}
|
||||
</view>
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
</view>
|
||||
</view> -->
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text>单价
|
||||
@@ -187,6 +187,13 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!datas.list[nowStatusIndex.value]){
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "供应商不能为空",
|
||||
})
|
||||
return
|
||||
}
|
||||
datas.form.list.conInfoId = datas.item.id
|
||||
datas.form.list = [datas.form.list]
|
||||
tbConsInfostockInOut({
|
||||
|
||||
@@ -1,83 +1,86 @@
|
||||
<template>
|
||||
<!-- 顶部菜单 -->
|
||||
<view class="tagClass">
|
||||
<view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}"
|
||||
v-for="(item,index) in pageData.status.list" :key="index">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 搜搜 -->
|
||||
<!-- <view class="search">
|
||||
<up-input
|
||||
placeholder="搜索优惠券名称"
|
||||
prefixIcon="search"
|
||||
shape="circle"
|
||||
border="none"
|
||||
fontSize="14px"
|
||||
prefixIconStyle="font-size: 28px;color: #999;"
|
||||
:customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}"
|
||||
></up-input>
|
||||
<view class="searchBtn">
|
||||
搜索
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 内容 -->
|
||||
<view class="couponContentList">
|
||||
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index">
|
||||
<view class="container">
|
||||
<!-- 顶部菜单 -->
|
||||
<view class="tagClass">
|
||||
<view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}"
|
||||
v-for="(item,index) in pageData.status.list" :key="index">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 搜搜 -->
|
||||
<!-- <view class="search">
|
||||
<up-input
|
||||
placeholder="搜索优惠券名称"
|
||||
prefixIcon="search"
|
||||
shape="circle"
|
||||
border="none"
|
||||
fontSize="14px"
|
||||
prefixIconStyle="font-size: 28px;color: #999;"
|
||||
:customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}"
|
||||
></up-input>
|
||||
<view class="searchBtn">
|
||||
搜索
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 内容 -->
|
||||
<view class="couponContentList">
|
||||
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index">
|
||||
|
||||
<view class="couponContentListTop">
|
||||
<view class="title"> {{ item.title }} </view>
|
||||
<view> ID:{{item.id}} </view>
|
||||
</view>
|
||||
<view class="couponContentListcontent">
|
||||
<view>
|
||||
<view> 使用门槛 </view>
|
||||
<view v-if="item.type == 1"> 满 {{ item.fullAmount }} 元减 {{ item.discountAmount }} 元 </view>
|
||||
<view v-if="item.type == 2"> 满 {{ item.fullAmount }} 元可用 </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> 领取方式 </view>
|
||||
<view> 用户不可自行领取 </view>
|
||||
</view>
|
||||
<view v-if="item.type == 1">
|
||||
<view> 有效期 </view>
|
||||
<view> 领券后{{ item.validDays }}天过期 </view>
|
||||
</view>
|
||||
<view class="JQclass">
|
||||
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="couponContentListcontent2">
|
||||
<view class="">
|
||||
<view class="num"> {{ item.number }} </view>
|
||||
<view class="lable"> 发放数量 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.number-item.leftNumber }} </view>
|
||||
<view class="lable"> 已领取 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.leftNumber }} </view>
|
||||
<view class="lable"> 剩余 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.useNumber }} </view>
|
||||
<view class="lable"> 已使用 </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="couponContentListbottom">
|
||||
<button @tap="editCoupon(item)">编辑</button>
|
||||
<button @tap="delCoupon(item)">删除</button>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="pageData.couponList.length">
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="couponContentListTop">
|
||||
<view class="title"> {{ item.title }} </view>
|
||||
<view> ID:{{item.id}} </view>
|
||||
|
||||
<view class="bottomPop">
|
||||
<button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
|
||||
</view>
|
||||
<view class="couponContentListcontent">
|
||||
<view>
|
||||
<view> 使用门槛 </view>
|
||||
<view> 满 {{ item.fullAmount }} 元减 {{ item.discountAmount }} 元 </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> 领取方式 </view>
|
||||
<view> 用户不可自行领取 </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> 有效期 </view>
|
||||
<view> 领券后{{ item.validDays }}天过期 </view>
|
||||
</view>
|
||||
<view class="JQclass">
|
||||
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="couponContentListcontent2">
|
||||
<view class="">
|
||||
<view class="num"> {{ item.number }} </view>
|
||||
<view class="lable"> 发放数量 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.number-item.leftNumber }} </view>
|
||||
<view class="lable"> 已领取 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.leftNumber }} </view>
|
||||
<view class="lable"> 剩余 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="num"> {{ item.useNumber }} </view>
|
||||
<view class="lable"> 已使用 </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="couponContentListbottom">
|
||||
<button @tap="editCoupon(item)">编辑</button>
|
||||
<button @tap="delCoupon(item)">删除</button>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="pageData.couponList.length">
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bottomPop">
|
||||
<button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -182,6 +185,9 @@
|
||||
body{
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.container{
|
||||
position: relative;
|
||||
}
|
||||
.tagClass {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
@@ -190,6 +196,9 @@
|
||||
padding-top: 44rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 79rpx;
|
||||
z-index: 999;
|
||||
.tag-item {
|
||||
display: inline-block;
|
||||
padding: 10rpx 24rpx;
|
||||
@@ -244,7 +253,7 @@
|
||||
/* height: 544rpx; */
|
||||
margin: 32rpx auto 0;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 0 28rpx 182rpx 28rpx;
|
||||
padding: 122rpx 28rpx 182rpx 28rpx;
|
||||
}
|
||||
.couponContent {
|
||||
/* background-color: #f9f9f9; */
|
||||
|
||||
@@ -55,7 +55,6 @@ import {rolesGet } from '@/http/yskApi/requestAll.js';
|
||||
params.isNotHasType2 = 1;
|
||||
rolesGet({
|
||||
}).then((res) => {
|
||||
console.log(res, '调试1')
|
||||
})
|
||||
return res.content
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ onShow(() => {
|
||||
|
||||
const saveImage = () => {
|
||||
// #ifdef APP-PLUS
|
||||
saveQrcodeImg()
|
||||
uni.downloadFile({
|
||||
url: vdata.QrcodeUrl,
|
||||
success: (res) => {
|
||||
@@ -92,16 +91,6 @@ function downloadQR() {
|
||||
}
|
||||
|
||||
//#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()
|
||||
|
||||
@@ -298,9 +298,11 @@
|
||||
const isSku = computed(() => {
|
||||
return props.goods.typeEnum == 'sku'
|
||||
})
|
||||
let isBindGuige = ref(isSku.value)
|
||||
let isBindGuige = ref(false)
|
||||
watch(() => props.goods.typeEnum, (newval) => {
|
||||
isBindGuige.value = isSku.value
|
||||
if(!newval){
|
||||
isBindGuige.value = false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -385,7 +387,6 @@
|
||||
$haocaiMap[item.id] = item
|
||||
}
|
||||
haoCaiList.value = res.content
|
||||
|
||||
})
|
||||
tbShopCurrencyGet({
|
||||
page: 0,
|
||||
@@ -400,6 +401,8 @@
|
||||
}
|
||||
onMounted(() => {
|
||||
init()
|
||||
const firstItem= props.goods.conInfos[0]
|
||||
isBindGuige.value=firstItem?(firstItem.productSkuId==0?false:true):false
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -197,7 +197,6 @@
|
||||
}
|
||||
|
||||
function confirm(e) {
|
||||
// console.log(e.value, '调试1')
|
||||
datas.rolesdata = e.value[0]
|
||||
show.value = false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<ul class="liststyle">
|
||||
<li v-for="item in datas.list " :key="item.id">
|
||||
<view class="liststyle">
|
||||
<view v-for="item in datas.list " :key="item.id">
|
||||
<view class="">
|
||||
<view class="">
|
||||
<span style="font-size: 28rpx;color: #333333; ">{{item.name}} </span>
|
||||
@@ -24,9 +24,9 @@
|
||||
text="编辑"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</li>
|
||||
<li style="background-color: rgba(0,0,0,0);"></li>
|
||||
</ul>
|
||||
</view>
|
||||
<view style="background-color: rgba(0,0,0,0);"></view>
|
||||
</view>
|
||||
<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>
|
||||
@@ -124,13 +124,9 @@
|
||||
|
||||
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.liststyle {
|
||||
>li {
|
||||
>view {
|
||||
// width: 694rpx;
|
||||
height: 192rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -139,7 +139,6 @@
|
||||
function changeTimeFunc(val) {
|
||||
vdata.timeSelected = val;
|
||||
getList()
|
||||
// console.log(vdata.timeSelected,'调试121')
|
||||
// refData();
|
||||
// if (vdata.memberIsShow) {
|
||||
// getMemberData();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<view class="income">
|
||||
<view>总收入</view>
|
||||
<view>¥{{totalRevenuedata}}</view>
|
||||
<view>后海&双屿</view>
|
||||
<view>{{shopName}}</view>
|
||||
</view>
|
||||
<!-- 统计 or 快捷扫码 -->
|
||||
<!-- <Stats ref="statsRef" /> -->
|
||||
@@ -46,12 +46,15 @@
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js'
|
||||
uni.hideTabBar()
|
||||
let shopName = ref()
|
||||
onLoad((options) => {
|
||||
shopName.value = uni.getStorageSync('shopName');
|
||||
});
|
||||
let totalRevenuedata = ref()
|
||||
let totalRevenue= (d)=>{
|
||||
totalRevenuedata.value=d
|
||||
}
|
||||
|
||||
// 导航列表
|
||||
const navList = [
|
||||
// {
|
||||
@@ -140,6 +143,11 @@
|
||||
// icon: '/static/indexImg/icon-staff.svg',
|
||||
// pageUrl: 'PAGES_USER'
|
||||
// },
|
||||
{
|
||||
title: '订阅通知',
|
||||
icon: '/static/indexImg/icon-notification.svg',
|
||||
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||
},
|
||||
{
|
||||
title: '设置中心',
|
||||
icon: '/static/indexImg/icon-cashier.svg',
|
||||
|
||||
@@ -280,7 +280,6 @@
|
||||
// }
|
||||
// 获取商户信息,有就回显
|
||||
let info = uni.getStorageSync('MerchantId')
|
||||
// console.log(info.merchantName,'调试121')
|
||||
if (info.merchantName) {
|
||||
vdata.formData.merchantName = info.merchantName
|
||||
vdata.formData.username = info.username
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="u-p-b-24 u-m-b-24 border-bottom">
|
||||
<view>就餐类型</view>
|
||||
<view class="u-m-t-24 u-flex ">
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<template v-if="user">
|
||||
<template v-if="user&&user.id">
|
||||
<view class="block">
|
||||
<view class="">
|
||||
<view class="u-flex border-bottom u-p-b-24 ">
|
||||
@@ -116,7 +116,7 @@
|
||||
<view class="u-p-b-24 ">
|
||||
<view class="font-bold">订单备注</view>
|
||||
<view class="u-m-t-32 u-flex ">
|
||||
<uni-easyinput type="textarea" v-model="note" placeholder="请输入备注"></uni-easyinput>
|
||||
<uni-easyinput type="textarea" v-model="note" placeholder="请输入备注"></uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
<button class="tag" hover-class="hover-class"
|
||||
@tap="toggleGoodsItemKey(item,index,'isGift')">{{item.isGift?'取消赠送':'赠送'}}</button>
|
||||
</view>
|
||||
<view class="u-flex u-m-r-20 " >
|
||||
<view class="u-flex u-m-r-20 ">
|
||||
<button class="tag" hover-class="hover-class"
|
||||
@tap="toggleGoodsItemKey(item,index,'isPack')">{{item.isPack?'取消打包':'打包'}}</button>
|
||||
</view>
|
||||
@@ -201,24 +201,24 @@
|
||||
</view>
|
||||
<view class="border-bottom">
|
||||
<template v-if="$seatFee&&$seatFee.totalAmount">
|
||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||
<view>
|
||||
<text >桌位费</text>
|
||||
<text>桌位费</text>
|
||||
</view>
|
||||
<view>¥{{$seatFee.totalAmount||'0.00'}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="$packFee>0">
|
||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||
<view>
|
||||
<text >打包费</text>
|
||||
<text>打包费</text>
|
||||
</view>
|
||||
<view>¥{{$packFee||'0.00'}}</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="u-flex u-row-right u-m-t-38">
|
||||
<!-- <template v-if="$shop.registerType=='munchies'">
|
||||
@@ -273,7 +273,9 @@
|
||||
computed,
|
||||
watch
|
||||
} from 'vue';
|
||||
import {getSafeBottomHeight} from '@/commons/utils/safe-bottom.js'
|
||||
import {
|
||||
getSafeBottomHeight
|
||||
} from '@/commons/utils/safe-bottom.js'
|
||||
import modelDiscount from './components/discount'
|
||||
import giveFood from './components/give-food'
|
||||
import oneRemark from './components/remark'
|
||||
@@ -291,7 +293,9 @@
|
||||
import {
|
||||
getNowCart
|
||||
} from '@/pagesCreateOrder/util.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js'
|
||||
const models = new Map();
|
||||
const modelData = reactive({
|
||||
data: {},
|
||||
@@ -311,7 +315,7 @@
|
||||
modelData.selIndex = index
|
||||
const model = models.get(key)
|
||||
model && model.open({
|
||||
remark: modelData.data.note||''
|
||||
remark: modelData.data.note || ''
|
||||
})
|
||||
}
|
||||
|
||||
@@ -325,7 +329,7 @@
|
||||
const userNumbers = reactive({
|
||||
list: new Array(100).fill(1).map((v, index) => {
|
||||
// return index === 0 ? '无' : index + '人'
|
||||
return (index+1)+ '人'
|
||||
return (index + 1) + '人'
|
||||
}),
|
||||
defaultCateIndex: 0,
|
||||
})
|
||||
@@ -336,15 +340,23 @@
|
||||
//更新就餐人数
|
||||
async function updateChoseCount() {
|
||||
console.log($shop.value);
|
||||
if (!$shop.value.isTableFee&& table.value.tableId) {
|
||||
const maxCapacity = table.value.tableId ? (table.value.maxCapacity || 0) : 100
|
||||
if (table.value.tableId && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
|
||||
uni.showToast({
|
||||
title: '当前台桌最大人数为: ' + maxCapacity
|
||||
})
|
||||
userNumbers.defaultCateIndex=maxCapacity-1
|
||||
return
|
||||
}
|
||||
if (!$shop.value.isTableFee && table.value.tableId) {
|
||||
//不免餐位费
|
||||
const res = await Api.$choseCount({
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId||'',
|
||||
num: userNumbers.defaultCateIndex+1,
|
||||
tableId: table.value.tableId || '',
|
||||
num: userNumbers.defaultCateIndex * 1 + 1,
|
||||
})
|
||||
Object.assign($seatFee, res)
|
||||
userNumbers.defaultCateIndex = res.totalNumber-1
|
||||
userNumbers.defaultCateIndex = res.totalNumber - 1
|
||||
}
|
||||
|
||||
}
|
||||
@@ -362,14 +374,15 @@
|
||||
skuId,
|
||||
id,
|
||||
number,
|
||||
isPack,isGift
|
||||
isPack,
|
||||
isGift
|
||||
} = item
|
||||
const par = {
|
||||
cartId:id,
|
||||
cartId: id,
|
||||
isPack,
|
||||
isGift,
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId||'',
|
||||
tableId: table.value.tableId || '',
|
||||
productId,
|
||||
num: number,
|
||||
skuId
|
||||
@@ -377,7 +390,7 @@
|
||||
par[key] = !item[key]
|
||||
const res = await Api.$updateCart(par)
|
||||
goods.list[index][key] = returnBoolean(res[key])
|
||||
if(key=='isPack'){
|
||||
if (key == 'isPack') {
|
||||
getCart()
|
||||
}
|
||||
}
|
||||
@@ -400,11 +413,11 @@
|
||||
],
|
||||
active: 'dine-in'
|
||||
})
|
||||
|
||||
const $packFee=computed(()=>{
|
||||
return goods.list.reduce((prve,cur)=>{
|
||||
return prve+cur.packFee
|
||||
},0).toFixed(2)
|
||||
|
||||
const $packFee = computed(() => {
|
||||
return goods.list.reduce((prve, cur) => {
|
||||
return prve + cur.packFee
|
||||
}, 0).toFixed(2)
|
||||
})
|
||||
|
||||
function chooseUser() {
|
||||
@@ -427,7 +440,7 @@
|
||||
console.log(option);
|
||||
const submitPar = {
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId||"",
|
||||
tableId: table.value.tableId || "",
|
||||
vipUserId: user.value.id ? user.value.id : '',
|
||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||
}
|
||||
@@ -481,16 +494,16 @@
|
||||
})
|
||||
const goodsPrice = computed(() => {
|
||||
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||
const tPrice=cur.salePrice * cur.number
|
||||
const tPrice = cur.salePrice * cur.number
|
||||
console.log(cur.isPack);
|
||||
const tpackFee=cur.isPack? cur.packFee*1:0
|
||||
return prve +(cur.isGift?0:tPrice) +tpackFee
|
||||
const tpackFee = cur.isPack ? cur.packFee * 1 : 0
|
||||
return prve + (cur.isGift ? 0 : tPrice) + tpackFee
|
||||
}, 0)
|
||||
return (goodsTotalPrice|| 0).toFixed(2)
|
||||
return (goodsTotalPrice || 0).toFixed(2)
|
||||
})
|
||||
const allPrice = computed(() => {
|
||||
console.log(goodsPrice.value);
|
||||
const n=goodsPrice.value*1 + $seatFee.totalAmount
|
||||
const n = goodsPrice.value * 1 + $seatFee.totalAmount
|
||||
return n.toFixed(2)
|
||||
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||
// return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
|
||||
@@ -510,7 +523,7 @@
|
||||
page: 0,
|
||||
size: 300,
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId||''
|
||||
tableId: table.value.tableId || ''
|
||||
}) {
|
||||
const {
|
||||
records,
|
||||
@@ -524,10 +537,10 @@
|
||||
}
|
||||
goods.list = getNowCart(records)
|
||||
if (seatFee && seatFee.totalNumber) {
|
||||
userNumbers.defaultCateIndex = seatFee.totalNumber-1 || 0
|
||||
userNumbers.defaultCateIndex = seatFee.totalNumber - 1 || 0
|
||||
Object.assign($seatFee, seatFee)
|
||||
}else{
|
||||
$seatFee.totalAmount=0
|
||||
} else {
|
||||
$seatFee.totalAmount = 0
|
||||
}
|
||||
console.log(userNumbers.defaultCateIndex);
|
||||
}
|
||||
@@ -550,20 +563,20 @@
|
||||
note: note.value,
|
||||
postPay: true,
|
||||
orderId: '',
|
||||
tableId: table.value.tableId||''
|
||||
tableId: table.value.tableId || ''
|
||||
}) {
|
||||
if (!$shop.value.isTableFee) {
|
||||
//不免餐位费
|
||||
await Api.$choseCount({
|
||||
masterId: option.masterId,
|
||||
tableId: table.value.tableId||"",
|
||||
num: userNumbers.defaultCateIndex+1,
|
||||
tableId: table.value.tableId || "",
|
||||
num: userNumbers.defaultCateIndex + 1,
|
||||
})
|
||||
}
|
||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
||||
const canJiesuan=await hasPermission('允许收款')
|
||||
if(!canJiesuan){
|
||||
return
|
||||
if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
|
||||
const canJiesuan = await hasPermission('允许收款')
|
||||
if (!canJiesuan) {
|
||||
return
|
||||
}
|
||||
}
|
||||
// updateChoseCount()
|
||||
@@ -571,21 +584,20 @@
|
||||
uni.$emit('update:createOrderIndex')
|
||||
console.log($shop.value);
|
||||
console.log(res);
|
||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
||||
if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
|
||||
//先付
|
||||
return go.to('PAGES_ORDER_PAY', {
|
||||
orderId: res.id,
|
||||
isNowPay:true
|
||||
},'redirect'
|
||||
)
|
||||
isNowPay: true
|
||||
}, 'redirect')
|
||||
} else {
|
||||
//后付
|
||||
console.log(option.isCreateOrderToDetail);
|
||||
if (option.isCreateOrderToDetail!='0') {
|
||||
if (option.isCreateOrderToDetail != '0') {
|
||||
console.log('PAGES_ORDER_DETAIL');
|
||||
go.to('PAGES_ORDER_DETAIL', {
|
||||
id: res.id
|
||||
},'redirect')
|
||||
}, 'redirect')
|
||||
} else {
|
||||
console.log('back');
|
||||
uni.navigateBack({
|
||||
@@ -616,7 +628,7 @@
|
||||
cartId: cart.id,
|
||||
productId: cart.productId,
|
||||
skuId: cart.skuId,
|
||||
tableId: option.tableId||"",
|
||||
tableId: option.tableId || "",
|
||||
note: e.remark,
|
||||
num: cart.number // 0会删除此商品
|
||||
})
|
||||
@@ -634,22 +646,27 @@
|
||||
|
||||
onLoad((opt) => {
|
||||
Object.assign(option, opt)
|
||||
console.log(option,);
|
||||
console.log(opt);
|
||||
if (opt) {
|
||||
table.value = {
|
||||
tableId: opt.tableId||'',
|
||||
...option,
|
||||
tableId: opt.tableId || '',
|
||||
name: opt.name
|
||||
}
|
||||
userNumbers.list = new Array(opt.maxCapacity?opt.maxCapacity*1:100).fill(1).map((v, index) => {
|
||||
return (index + 1) + '人'
|
||||
})
|
||||
// console.log(userNumbers.list);
|
||||
}
|
||||
init()
|
||||
|
||||
// updateChoseCount()
|
||||
})
|
||||
let bottomHeight=ref(100)
|
||||
onReady(()=>{
|
||||
getSafeBottomHeight('safe-bottom').then(res=>{
|
||||
let bottomHeight = ref(100)
|
||||
onReady(() => {
|
||||
getSafeBottomHeight('safe-bottom').then(res => {
|
||||
console.log(res);
|
||||
bottomHeight.value=res
|
||||
bottomHeight.value = res
|
||||
})
|
||||
})
|
||||
|
||||
@@ -668,12 +685,12 @@
|
||||
uni.setStorageSync("useType", useType);
|
||||
}
|
||||
const tableId = useType == 'takeout' ? undefined : table.value.tableId;
|
||||
if(!goods.list.length){
|
||||
if (!goods.list.length) {
|
||||
return
|
||||
}
|
||||
const res = await Api.$changeUseType({
|
||||
useType,
|
||||
tableId:tableId||'',
|
||||
tableId: tableId || '',
|
||||
cartIds: goods.list.map((v) => v.id),
|
||||
})
|
||||
getCart()
|
||||
@@ -712,6 +729,7 @@
|
||||
border-radius: 18rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
padding: 32rpx 0 32rpx 24rpx;
|
||||
@@ -722,6 +740,7 @@
|
||||
.goods {
|
||||
// padding-bottom: 30rpx;
|
||||
border-bottom: 1px dashed #E5E5E5;
|
||||
|
||||
.item {
|
||||
.img {
|
||||
width: 84rpx;
|
||||
|
||||
@@ -448,21 +448,26 @@
|
||||
})
|
||||
console.log(res);
|
||||
if (res && res.content[0]) {
|
||||
// data.table=res.content[0]
|
||||
data.table={...res.content[0],...data.table}
|
||||
}
|
||||
}
|
||||
}
|
||||
let $originGoods = []
|
||||
let $category = []
|
||||
async function init() {
|
||||
const masterRes = await getMasterId()
|
||||
data.masterId = masterRes.masterId
|
||||
if(option.type=='add'){
|
||||
data.masterId = option.masterId
|
||||
setTabBar($category, $originGoods, [])
|
||||
}else{
|
||||
const masterRes = await getMasterId()
|
||||
data.masterId = masterRes.masterId
|
||||
}
|
||||
const shopInfo = await tbShopInfo()
|
||||
$shop.value = shopInfo
|
||||
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
|
||||
uni.setStorageSync('useType', useType)
|
||||
console.log(shopInfo);
|
||||
getTableInfo()
|
||||
await getTableInfo()
|
||||
const categoryRes = await getCategory()
|
||||
const category = categoryRes.content.reduce((prve, cur) => {
|
||||
prve.push({
|
||||
@@ -482,16 +487,24 @@
|
||||
return isShow;
|
||||
});
|
||||
$originGoods = goods
|
||||
if (!data.table.tableId) {
|
||||
//无桌台
|
||||
|
||||
console.log(option);
|
||||
if(option.type=='add'){
|
||||
cars.length = 0
|
||||
setTabBar(category, goods, [])
|
||||
return
|
||||
}
|
||||
const {
|
||||
masterId
|
||||
} = await getMasterId()
|
||||
data.masterId = masterId
|
||||
if (!data.table.tableId) {
|
||||
//无桌台
|
||||
const cartRes = await getCart()
|
||||
cars.length = 0
|
||||
const cartArr = getNowCart(cartRes.records)
|
||||
for (let i in cartArr) {
|
||||
cars.push(cartArr[i])
|
||||
}
|
||||
setTabBar(category, goods, cars)
|
||||
return
|
||||
}
|
||||
|
||||
const cartRes = await getCart()
|
||||
cars.length = 0
|
||||
const cartArr = getNowCart(cartRes.records)
|
||||
@@ -1089,7 +1102,9 @@
|
||||
})
|
||||
}
|
||||
watch(() => data.table.tableId, (newval, oldval) => {
|
||||
onSelTable()
|
||||
if(option.type!='add'){
|
||||
onSelTable()
|
||||
}
|
||||
})
|
||||
async function onSelTable() {
|
||||
const {
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<template>
|
||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-20" v-if="packeFee>0||data.totalAmount>0">
|
||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-20" v-if="packeFee>0||data.priceAmount>0">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="font-bold">附加费</view>
|
||||
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
|
||||
<template v-if="extraCanTuicai(orderInfo,data)">
|
||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
||||
</template>
|
||||
<template v-if="orderInfo.status=='closed'&&data.status!='return'">
|
||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
||||
<template v-if=" extraCanTuiKuan(orderInfo,data)">
|
||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
||||
</template>
|
||||
</view>
|
||||
<view>
|
||||
<template v-if="data.status!='return'">
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>{{data.name||'餐位费'}}</view>
|
||||
<view>x{{data.number||0}}</view>
|
||||
<view class="price-min-width">¥{{data.totalAmount}}</view>
|
||||
<template v-if="data.status!='return'&&data.status!='refund'&&data.status!='refunding'">
|
||||
<view class="u-flex u-row-between u-m-t-24" v-if="data.priceAmount*1>0">
|
||||
<view>{{data.productName||'餐位费'}}</view>
|
||||
<view>x{{data.num||0}}</view>
|
||||
<view class="price-min-width">¥{{data.priceAmount}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="u-flex u-row-between u-m-t-24 color-999">
|
||||
<view class="u-flex">
|
||||
<view class="line-th ">{{data.name||'餐位费'}}</view>
|
||||
<view class="tag yitui u-m-l-10">已退</view>
|
||||
<view class="line-th ">{{data.productName||'餐位费'}}</view>
|
||||
<view class="tag yitui u-m-l-10">{{data.status=='refunding'?'退款中': '已退'}}</view>
|
||||
</view>
|
||||
<view class="line-th">x{{data.number||0}}</view>
|
||||
<view class="line-th">¥{{data.totalAmount}}</view>
|
||||
<view class="line-th">x{{data.num||0}}</view>
|
||||
<view class="line-th">¥{{data.priceAmount}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- <view class="u-flex u-row-right u-m-t-24">
|
||||
@@ -49,6 +49,16 @@
|
||||
import {
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
returnCanComputedGoodsArr,canComputedPackFee,
|
||||
returnPackFee
|
||||
} from '@/commons/utils/goodsUtil.js'
|
||||
function extraCanTuicai(orderInfo,data){
|
||||
return orderInfo.status=='unpaid'&&data.status!='return'&&data.priceAmount*1>0
|
||||
}
|
||||
function extraCanTuiKuan(orderInfo,data){
|
||||
return orderInfo.status=='closed'&&data.status!='return'&&data.priceAmount*1>0
|
||||
}
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -72,16 +82,16 @@
|
||||
return 0
|
||||
}
|
||||
return props.orderInfo.detailList.reduce((prve, cur) => {
|
||||
return prve + (cur.packAmount>0?cur.num:0)
|
||||
return prve + (cur.packAmount > 0 ? cur.num : 0)
|
||||
}, 0)
|
||||
})
|
||||
const packeFee = computed(() => {
|
||||
if (!props.orderInfo.detailList) {
|
||||
return 0
|
||||
}
|
||||
return props.orderInfo.detailList.reduce((prve, cur) => {
|
||||
return prve + cur.packAmount
|
||||
}, 0).toFixed(2)
|
||||
const arr = returnCanComputedGoodsArr(props.orderInfo.detailList)
|
||||
console.log(arr);
|
||||
return returnPackFee(arr)
|
||||
})
|
||||
|
||||
const statusMap = {
|
||||
@@ -113,7 +123,8 @@
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.price-min-width{
|
||||
|
||||
.price-min-width {
|
||||
min-width: 100rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
<view class="">
|
||||
<view class="u-flex">
|
||||
<view class="tui" v-if="item.status=='return'||item.status=='refund'">
|
||||
已退
|
||||
<view class="tui" v-if="isTui(item)">
|
||||
{{item.status=='refunding'?'退款中':'已退'}}
|
||||
</view>
|
||||
<view :class="{'line-th':item.status=='return'||item.status=='refund'}">{{item.name||item.productName}}
|
||||
<view :class="{'line-th':item.status=='return'||item.status=='refund'||item.status=='refunding'}">{{item.name||item.productName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-8">
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-text-right u-m-t-28">
|
||||
<template v-if="item.status=='return'||item.gift||item.status=='refund'">
|
||||
<template v-if="isTui(item)">
|
||||
<view>¥0.00</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
||||
</view>
|
||||
@@ -62,20 +62,18 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-24" v-if="item.status!='return'">
|
||||
<template v-if="canTuicai(orderInfo,item)">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-24">
|
||||
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
|
||||
<my-button :width="128" :height="48" plain shape="circle" @tap="tuicai(item,index)"><text
|
||||
class="no-wrap">退菜</text></my-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="item.status!='refund'&&!item.gift">
|
||||
<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'">
|
||||
<template v-if="canTuiKuan(orderInfo,item)">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-20">
|
||||
<my-button :width="128" :height="48" plain shape="circle"
|
||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
@@ -131,6 +129,7 @@
|
||||
<view></view>
|
||||
<view>
|
||||
<text>总计¥</text>
|
||||
<!-- <text class="font-bold u-font-32">{{numSum([allPrice,seatFeePrice,packFee]) }}</text> -->
|
||||
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -149,6 +148,7 @@
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js'
|
||||
import {isTui,canTuiKuan,canTuicai,numSum} from '@/commons/utils/goodsUtil.js'
|
||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||
|
||||
function returnTotalMoney(item) {
|
||||
@@ -193,10 +193,10 @@
|
||||
})
|
||||
|
||||
const seatFeePrice = computed(() => {
|
||||
if (!props.seatFee.totalAmount) {
|
||||
if (!props.seatFee.priceAmount) {
|
||||
return 0
|
||||
}
|
||||
const n = props.seatFee.totalAmount * (props.seatFee.status == 'return' ? 0 : 1)
|
||||
const n = props.seatFee.priceAmount * (props.seatFee.status == 'return' ? 0 : 1)
|
||||
return n.toFixed(2)
|
||||
})
|
||||
|
||||
|
||||
@@ -26,11 +26,21 @@
|
||||
</view> -->
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>下单时间</view>
|
||||
<view><up-text v-if="data.createdAt" mode="date" format="yyyy-mm-dd hh:MM:ss" :text="data.createdAt"></up-text></view>
|
||||
<view><up-text v-if="data.createdAt" mode="date" format="yyyy-mm-dd hh:MM:ss"
|
||||
:text="data.createdAt"></up-text></view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>订单编号</view>
|
||||
<view>{{data.orderNo}}</view>
|
||||
<view class="u-flex">
|
||||
<view>{{data.orderNo}}</view>
|
||||
<view v-if="data.orderNo" class="u-m-l-6">
|
||||
<up-copy :content="data.orderNo" >
|
||||
<up-icon name="/static/copy.svg" :size="16"></up-icon>
|
||||
</up-copy>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24 u-col-top">
|
||||
<view class="no-wrap">商家备注</view>
|
||||
|
||||
@@ -5,21 +5,24 @@
|
||||
<view>
|
||||
{{data.productName}}
|
||||
</view>
|
||||
<view class="u-flex u-m-t-32">
|
||||
<up-number-box :min="1" :max="data.num" :buttonSize="44" v-model="number" integer>
|
||||
<view class="u-flex u-m-t-32" :class="{'gray':data.productId=='-999'}">
|
||||
<up-number-box :min="1" :max="data.num" :buttonSize="44" v-model="number" integer :disabled="data.productId=='-999'">
|
||||
<template #minus>
|
||||
<view class="minus number-box-btn">
|
||||
</view>
|
||||
</template>
|
||||
<template #input>
|
||||
<view class="u-flex-1 u-row-center u-text-center input">
|
||||
<up-input @change="parseIntNumber($event,false)" @blur="parseIntNumber($event,true)"
|
||||
<up-input
|
||||
:disabled="data.productId=='-999'"
|
||||
@change="parseIntNumber($event,false)" @blur="parseIntNumber($event,true)"
|
||||
v-model="number" border="none" type="number"></up-input>
|
||||
</view>
|
||||
</template>
|
||||
<template #plus>
|
||||
<view class="plus number-box-btn">
|
||||
<up-icon name="plus" color="#999" size="16" bold></up-icon>
|
||||
<up-icon v-if="data.productId=='-999'" name="plus" color="#ccc" size="16" bold></up-icon>
|
||||
<up-icon v-else name="plus" color="#999" size="16" bold></up-icon>
|
||||
</view>
|
||||
</template>
|
||||
</up-number-box>
|
||||
@@ -66,7 +69,11 @@
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
default: () => {
|
||||
return {
|
||||
productId:'-999'
|
||||
}
|
||||
}
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
@@ -143,10 +150,17 @@
|
||||
|
||||
function open() {
|
||||
model.value.open()
|
||||
if(props.data.productId=='-999'){
|
||||
number.value=props.data.num
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
model.value.close()
|
||||
tags.value.map(v=>{
|
||||
v.checked=false
|
||||
})
|
||||
form.note=''
|
||||
}
|
||||
|
||||
function confirm() {
|
||||
@@ -191,7 +205,12 @@
|
||||
::v-deep .uni-input-input {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gray{
|
||||
.minus::after{
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
}
|
||||
.minus {
|
||||
&::after {
|
||||
content: '';
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
})
|
||||
|
||||
function onSeatFeeTuicai(seatFee) {
|
||||
seatFee={...seatFee,num:seatFee.number,productName:seatFee.name}
|
||||
seatFee={...seatFee,num:seatFee.num,productName:seatFee.productName}
|
||||
console.log(seatFee);
|
||||
tuicai.show = true
|
||||
tuicai.isSeatFee = seatFee
|
||||
@@ -94,26 +94,26 @@
|
||||
return
|
||||
}
|
||||
const {
|
||||
id,
|
||||
id,cartId,
|
||||
productId,
|
||||
productSkuId,
|
||||
name,
|
||||
cartId,
|
||||
number,
|
||||
totalAmount,
|
||||
salePrice
|
||||
productName,
|
||||
num,
|
||||
priceAmount,
|
||||
price
|
||||
} = seatFee
|
||||
go.to('PAGES_ORDER_TUIKUAN', {
|
||||
orderId:orderDetail.info.id,
|
||||
id:seatFee.id,
|
||||
id,
|
||||
cartId,
|
||||
productId,
|
||||
productSkuId,
|
||||
productName:name,
|
||||
num:number,
|
||||
productName,
|
||||
num,
|
||||
number: 0,
|
||||
productSkuName: '',
|
||||
priceAmount:totalAmount,
|
||||
price:salePrice
|
||||
priceAmount,
|
||||
price
|
||||
})
|
||||
}
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
go.to('PAGES_CREATE_ORDER', {
|
||||
tableId: options.tableId || orderDetail.info.tableId,
|
||||
name: options.name || orderDetail.info.tableName,
|
||||
masterId:orderDetail.info.masterId,
|
||||
type: 'add'
|
||||
})
|
||||
}
|
||||
@@ -282,12 +283,15 @@
|
||||
}
|
||||
|
||||
}
|
||||
console.log(res.seatInfo);
|
||||
orderDetail.seatFee = res.seatInfo|| {
|
||||
name: '客座费',
|
||||
number: res.seatCount,
|
||||
totalNumber: res.seatCount,
|
||||
totalAmount: res.seatAmount,
|
||||
status:''
|
||||
// name: '客座费',
|
||||
// number: res.seatCount,
|
||||
// num: res.seatCount,
|
||||
// totalNumber: res.seatCount,
|
||||
// priceAmount: res.seatAmount,
|
||||
// status:'',
|
||||
totalNumber:0,
|
||||
}
|
||||
orderDetail.goodsList = Object.entries(goodsMap).map(([key, value]) => ({
|
||||
info: value,
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[1]"></uni-dateformat>
|
||||
</view>
|
||||
</view> -->
|
||||
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker"></my-date-pickerview>
|
||||
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker" mode="all"></my-date-pickerview>
|
||||
<!-- 更多状态选择筛选 -->
|
||||
<up-popup :round="10" :show="statusData.moreShow" :closeable="true" @close="moreShowHide">
|
||||
<view class="u-text-center font-bold u-font-32 u-p-t-30">选择状态</view>
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<view class="no-wrap u-m-r-32">打包费</view>
|
||||
<view>¥{{data.packFee||0}}</view>
|
||||
</view>
|
||||
<view style="height: 32rpx;" v-if="data.packFee>0&&data.seatInfo&&data.seatInfo.priceAmount>0"></view>
|
||||
<view class="u-flex u-row-between u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
|
||||
<view class="no-wrap u-m-r-32">{{data.seatInfo.productName}}</view>
|
||||
<view>¥{{data.seatInfo.priceAmount}}</view>
|
||||
@@ -72,7 +73,7 @@
|
||||
</view>
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-flex u-row-right">
|
||||
<text>小计¥</text>
|
||||
<text>总计¥</text>
|
||||
<text class="font-bold u-font-32">{{data.orderAmount}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-right u-m-t-24">
|
||||
@@ -87,6 +88,7 @@
|
||||
import dayjs from 'dayjs';
|
||||
import orderEnum from '@/commons/orderEnum.js'
|
||||
import go from '@/commons/utils/go.js'
|
||||
import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
@@ -119,7 +121,7 @@
|
||||
|
||||
const priceSize = 9
|
||||
function goodsPriceAmount(item){
|
||||
return item.price*item.num
|
||||
return (item.price*item.num).toFixed(2)
|
||||
}
|
||||
// const packeFee=computed(()=>{
|
||||
// return props.data.detailList.reduce((prve,cur)=>{
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
<view class="bg-fff u-p-24 border-r-12 u-flex u-row-between">
|
||||
<view>全退</view>
|
||||
<view>
|
||||
<my-radio v-model="allTui"></my-radio>
|
||||
<my-radio v-model="allTui" :disabled="option.productId=='-999'"></my-radio>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-24 u-font-24 u-font-24">
|
||||
<text class="color-red">*</text>
|
||||
<text>客座费只能全退</text>
|
||||
</view>
|
||||
<view class="bg-fff border-r-12 list u-m-t-32">
|
||||
<view class="u-flex u-row-between border-top item u-p-t-32 u-p-b-32"
|
||||
v-for="(item,index) in orderDetail.goodsList" :key="index">
|
||||
@@ -14,15 +18,25 @@
|
||||
<view class="u-m-t-10 color-999 u-font-24">{{item.productSkuName||""}}</view>
|
||||
<view class="u-m-t-10 color-999 u-font-24">最多可退×{{item.num}}</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||
<view class="u-flex u-m-l-32 u-col-center">
|
||||
<up-icon @click="changeItem(item,-1)" :size="20" name="minus-circle"></up-icon>
|
||||
<view class="u-m-l-28 u-m-r-28">{{item.number}}</view>
|
||||
<up-icon @click="changeItem(item,1)" :color="color.ColorMain" :size="20"
|
||||
name="plus-circle-fill"></up-icon>
|
||||
<template v-if="option.productId=='-999'">
|
||||
<view class="u-flex">
|
||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||
<view class="u-flex u-m-l-32 u-col-center">
|
||||
<view class="u-m-l-28 u-m-r-28">x{{item.number}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="u-flex">
|
||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||
<view class="u-flex u-m-l-32 u-col-center">
|
||||
<up-icon @click="changeItem(item,-1)" :size="20" name="minus-circle"></up-icon>
|
||||
<view class="u-m-l-28 u-m-r-28">{{item.number}}</view>
|
||||
<up-icon @click="changeItem(item,1)" :color="color.ColorMain" :size="20"
|
||||
name="plus-circle-fill"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between">
|
||||
@@ -139,6 +153,9 @@
|
||||
}
|
||||
|
||||
function changeItem(item, step) {
|
||||
if(item.productId=='-999'){
|
||||
return
|
||||
}
|
||||
console.log(item);
|
||||
let newval = item.number * 1 + step * 1;
|
||||
if (newval <= 0) {
|
||||
@@ -179,9 +196,14 @@
|
||||
uni.navigateBack({delta:1})
|
||||
},500)
|
||||
}
|
||||
const option=reactive({})
|
||||
const option=reactive({
|
||||
productId:'-999'
|
||||
})
|
||||
onLoad((opt) => {
|
||||
Object.assign(option,opt)
|
||||
if(opt.productId=='-999'){
|
||||
allTui.value=true
|
||||
}
|
||||
if (Array.isArray(opt)) {
|
||||
orderDetail.goodsList = opt
|
||||
} else {
|
||||
|
||||
1
static/copy.svg
Normal file
1
static/copy.svg
Normal 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="1730281062594" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4292" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M394.666667 106.666667h448a74.666667 74.666667 0 0 1 74.666666 74.666666v448a74.666667 74.666667 0 0 1-74.666666 74.666667H394.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V181.333333a74.666667 74.666667 0 0 1 74.666667-74.666666z m0 64a10.666667 10.666667 0 0 0-10.666667 10.666666v448a10.666667 10.666667 0 0 0 10.666667 10.666667h448a10.666667 10.666667 0 0 0 10.666666-10.666667V181.333333a10.666667 10.666667 0 0 0-10.666666-10.666666H394.666667z m245.333333 597.333333a32 32 0 0 1 64 0v74.666667a74.666667 74.666667 0 0 1-74.666667 74.666666H181.333333a74.666667 74.666667 0 0 1-74.666666-74.666666V394.666667a74.666667 74.666667 0 0 1 74.666666-74.666667h74.666667a32 32 0 0 1 0 64h-74.666667a10.666667 10.666667 0 0 0-10.666666 10.666667v448a10.666667 10.666667 0 0 0 10.666666 10.666666h448a10.666667 10.666667 0 0 0 10.666667-10.666666v-74.666667z" fill="#8a8a8a" p-id="4293"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user