Merge branch 'test' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into test
This commit is contained in:
commit
5792762c86
|
|
@ -17,7 +17,10 @@ import infoBox from "@/commons/utils/infoBox.js"
|
|||
import go from '@/commons/utils/go.js';
|
||||
// 测试服
|
||||
let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||
// let baseUrl = 'http://192.168.1.15:8000'
|
||||
|
||||
//预发布
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
// 王伟本地测
|
||||
// let baseUrl = '/ww'
|
||||
// let baseUrl = 'http://192.168.1.15:8000'
|
||||
|
|
|
|||
|
|
@ -150,12 +150,12 @@
|
|||
"unipush" : {
|
||||
"enable" : true
|
||||
},
|
||||
"plugins" : {
|
||||
"WechatSI" : {
|
||||
"version" : "0.3.5",
|
||||
"provider" : "wx069ba97219f66d99"
|
||||
}
|
||||
},
|
||||
// "plugins" : {
|
||||
// "WechatSI" : {
|
||||
// "version" : "0.3.5",
|
||||
// "provider" : "wx069ba97219f66d99"
|
||||
// }
|
||||
// },
|
||||
"requiredBackgroundModes" : [ "audio", "location" ],
|
||||
"__usePrivacyCheck__" : true,
|
||||
"libVersion" : "latest"
|
||||
|
|
@ -213,6 +213,15 @@
|
|||
"/ysk" : ""
|
||||
}
|
||||
},
|
||||
"/yufabu" : {
|
||||
// 需要被代理的后台地址
|
||||
"target" : "https://pre-cashier.sxczgkj.cn",
|
||||
"changeOrigin" : true,
|
||||
"secure" : false,
|
||||
"pathRewrite" : {
|
||||
"/yufabu" : ""
|
||||
}
|
||||
},
|
||||
"/ww" : {
|
||||
// 需要被代理的后台地址
|
||||
"target" : "http://192.168.1.15:8000",
|
||||
|
|
|
|||
|
|
@ -207,14 +207,15 @@
|
|||
</view>
|
||||
<view class="">
|
||||
<uni-forms-item label="分类名称" required name="name">
|
||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="categoryChild.name" placeholder="输入分类名称" />
|
||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="categoryChild.name" placeholder="输入分类名称" />
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<template v-if="option.type==='edit'">
|
||||
<uni-forms-item label="排序" required name="sort">
|
||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="categoryChild.sort" type="number" placeholder="排序越小越靠前" />
|
||||
<uni-easyinput padding-none :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="categoryChild.sort" type="number"
|
||||
placeholder="排序越小越靠前" />
|
||||
</uni-forms-item>
|
||||
</template>
|
||||
<uni-forms-item label="">
|
||||
|
|
@ -241,9 +242,11 @@
|
|||
</view>
|
||||
</template>
|
||||
</my-model>
|
||||
|
||||
<up-modal title="提示" content="确认删除该分类吗?" :show="modal.del" showCancelButton closeOnClickOverlay
|
||||
@confirm="confirmModelConfirm" @cancel="setModalShow('del',false)" @close="setModalShow('del',false)"
|
||||
width="300px"></up-modal>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -269,7 +272,28 @@
|
|||
onBeforeMount,
|
||||
watch
|
||||
} from 'vue';
|
||||
const modal = reactive({
|
||||
key: '',
|
||||
del: false
|
||||
})
|
||||
|
||||
function confirmModelConfirm() {
|
||||
if (modal.key == 'del') {
|
||||
$productCategory.del([selItem.data.id]).then(res => {
|
||||
category.childrenList.splice(selItem.index, 1)
|
||||
infoBox.showToast('删除成功')
|
||||
uni.setStorageSync('cateItem', category)
|
||||
})
|
||||
modal.del=false
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
function setModalShow(key = 'show', show = true) {
|
||||
modal.key = key
|
||||
modal[key] = show
|
||||
console.log(modal);
|
||||
}
|
||||
|
||||
const refAddChilCate = ref(null)
|
||||
const refAddChilCateTitle = ref('添加子分类')
|
||||
|
|
@ -339,19 +363,21 @@
|
|||
return
|
||||
}
|
||||
if (index === 1) {
|
||||
return uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该分类吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
$productCategory.del([selItem.data.id]).then(res => {
|
||||
category.childrenList.splice(selItem.index, 1)
|
||||
infoBox.showToast('删除成功')
|
||||
uni.setStorageSync('cateItem', category)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
setModalShow('del', true)
|
||||
return
|
||||
// return uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '确认删除该分类吗?',
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// $productCategory.del([selItem.data.id]).then(res => {
|
||||
// category.childrenList.splice(selItem.index, 1)
|
||||
// infoBox.showToast('删除成功')
|
||||
// uni.setStorageSync('cateItem', category)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -676,13 +702,16 @@
|
|||
$icon-line-width: 20rpx;
|
||||
$icon-line-height: 4rpx;
|
||||
@import '@/commons/style/reset-uni-form.scss';
|
||||
::v-deep .uni-forms-item--border{
|
||||
padding-top: 24rpx ;
|
||||
padding-bottom: 24rpx ;
|
||||
|
||||
::v-deep .uni-forms-item--border {
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
|
||||
|
||||
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label {
|
||||
padding-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
|
|
@ -697,9 +726,11 @@
|
|||
.my-switch {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
::v-deep .uni-forms-item__content{
|
||||
|
||||
::v-deep .uni-forms-item__content {
|
||||
min-height: inherit;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item__error {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,9 @@
|
|||
@click="guigeClick(index)">
|
||||
<text>{{item.specSnap||item.name}}</text>
|
||||
<view class="tag-primary tag" v-if="item.isGrounding">上架中</view>
|
||||
<view class="tag-gray tag" v-else>已下架</view>
|
||||
<view class="tag-gray tag" v-if="item.isPauseSale">已售罄</view>
|
||||
<view class="tag-gray tag" v-if="!item.isGrounding">已下架</view>
|
||||
|
||||
<!-- <template v-if="item.isPauseSale">
|
||||
<view class="tag-gray tag" >已售罄</view>
|
||||
</template>
|
||||
|
|
@ -113,9 +115,6 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
<edit-stock :category="pageData.categoryList" v-model:show="popup.stock.show" @save="changeStockConfirm"
|
||||
:goods="pageData.selGoods"></edit-stock>
|
||||
<!-- 规格弹窗 -->
|
||||
<edit-guige @isGroundingChange="isGroundingChange" v-model:show="popup.guige.show"
|
||||
<edit-guige @isGroundingChange="isGroundingChange" v-model:show="popup.guige.show" @isPauseSaleChange="isPauseSaleChange"
|
||||
:goods="popup.guige.data"></edit-guige>
|
||||
<!-- 报损 -->
|
||||
<baosun-vue :category="pageData.categoryList" v-model:show="popup.baosun.show"
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@
|
|||
icon: '/static/indexImg/icon-work.svg',
|
||||
pageUrl: 'PAGES_WORK_INDEX',
|
||||
},
|
||||
{
|
||||
title: '极速开票',
|
||||
icon: '/static/indexImg/red-envelope.svg',
|
||||
pageUrl: 'PAGES_INVOICE'
|
||||
},
|
||||
// {
|
||||
// title: '极速开票',
|
||||
// icon: '/static/indexImg/red-envelope.svg',
|
||||
// pageUrl: 'PAGES_INVOICE'
|
||||
// },
|
||||
{
|
||||
title: '排队',
|
||||
icon: '/static/indexImg/icon-line-up.svg',
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
|
||||
{
|
||||
title: '退出登录',
|
||||
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
||||
icon: '/static/indexImg/icon-login-out.svg',
|
||||
pageUrl: 'PAGES_LOGIN',
|
||||
clickFunc:()=>{
|
||||
storageManage.cleanByLogout()
|
||||
|
|
|
|||
|
|
@ -259,10 +259,12 @@
|
|||
|
||||
function accountTypeChange(e) {
|
||||
// #ifdef H5
|
||||
if (e == 1) {
|
||||
// vdata.formData.merchantName = '18049104914'
|
||||
// vdata.formData.merchantName = ''
|
||||
// vdata.formData.username = ''
|
||||
if(e==1){
|
||||
vdata.formData.merchantName = '18049104914'
|
||||
vdata.formData.username = '13666666666'
|
||||
vdata.formData.pwd = '123456'
|
||||
}else{
|
||||
vdata.formData.pwd = 'qwer1234'
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,74 +1,83 @@
|
|||
<template>
|
||||
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
||||
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
||||
<view class="u-absolute goods bg-fff">
|
||||
<view
|
||||
class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
||||
<view>已添加{{goodsNumber}}件商品</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
<text class="u-m-l-10" @tap="clear">清空</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="tranistion" :style="{height:switchGoods?'50vh':0 }">
|
||||
<!-- 占位 -->
|
||||
<view class="u-p-t-32 color-666 border-bottom u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between"
|
||||
style="opacity: 0;">
|
||||
<view>
|
||||
|
||||
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
||||
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
||||
<view class="u-absolute goods bg-fff">
|
||||
<view
|
||||
class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
||||
<view>已添加{{goodsNumber}}件商品</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
<text class="u-m-l-10">清空</text>
|
||||
<text class="u-m-l-10" @tap="setModalShow('clear',true)">清空</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 占位 -->
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(item,index) in data"
|
||||
:key="index">
|
||||
<view class="">
|
||||
<view>{{item.name}}</view>
|
||||
<view class="u-m-t-10 u-font-24 color-666">{{item.specSnap||''}}</view>
|
||||
<scroll-view scroll-y="true" class="tranistion" :style="{height:switchGoods?'50vh':0 }">
|
||||
<!-- 占位 -->
|
||||
<view class="u-p-t-32 color-666 border-bottom u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between"
|
||||
style="opacity: 0;">
|
||||
<view>已添加{{goodsNumber}}件商品</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
<text class="u-m-l-10">清空</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view class="font-bold red u-m-r-32">¥{{formatPrice(item.salePrice*item.number) }}</view>
|
||||
<view class="u-flex" @tap="updateNumber(false,index,item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-reduce-black.svg" class="icon" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="u-m-l-30 u-m-r-30 color-333">
|
||||
{{item.number}}
|
||||
</view>
|
||||
<view class="u-flex" @tap="updateNumber(true,index,item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-add-black.svg" class="icon" mode="">
|
||||
</image>
|
||||
<!-- 占位 -->
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
||||
v-for="(item,index) in data" :key="index">
|
||||
<view class="">
|
||||
<view class="u-line-1">{{item.name}}</view>
|
||||
<view class="u-m-t-10 u-font-24 color-666 u-line-1">{{item.specSnap||''}}</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view class="font-bold red u-m-r-32">¥{{formatPrice(item.salePrice*item.number) }}</view>
|
||||
<view class="u-flex" @tap="updateNumber(false,index,item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-reduce-black.svg" class="icon" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="u-m-l-30 u-m-r-30 color-333">
|
||||
{{item.number}}
|
||||
</view>
|
||||
<view class="u-flex" @tap="updateNumber(true,index,item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-add-black.svg" class="icon" mode="">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<my-empty v-if="!data.length" text="暂未有添加商品"></my-empty>
|
||||
</scroll-view>
|
||||
<my-empty v-if="!data.length" text="暂未有添加商品"></my-empty>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
<view class="icon-car-box" @tap="toggleGoods">
|
||||
<image src="/pagesCreateOrder/static/images/icon-car.svg" class="icon-car" />
|
||||
<view class="dot">{{goodsNumber}}</view>
|
||||
</view>
|
||||
<view class="price font-bold u-flex">
|
||||
<view>¥</view>
|
||||
<view>{{allPrice}}</view>
|
||||
</view>
|
||||
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
|
||||
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
|
||||
</my-button>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="icon-car-box" @tap="toggleGoods">
|
||||
<image src="/pagesCreateOrder/static/images/icon-car.svg" class="icon-car" />
|
||||
<view class="dot">{{goodsNumber}}</view>
|
||||
</view>
|
||||
<view class="price font-bold u-flex">
|
||||
<view>¥</view>
|
||||
<view>{{allPrice}}</view>
|
||||
</view>
|
||||
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
|
||||
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
|
||||
</my-button>
|
||||
|
||||
<up-modal title="提示" content="是否清空全部已添加的商品?" :show="modal.clear" showCancelButton closeOnClickOverlay @confirm="confirmModelConfirm"
|
||||
@cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)" width="300px"></up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import go from '@/commons/utils/go.js';
|
||||
import infoBox from '@/commons/utils/infoBox.js';
|
||||
import {formatPrice} from '@/commons/utils/format.js';
|
||||
|
||||
import {
|
||||
formatPrice
|
||||
} from '@/commons/utils/format.js';
|
||||
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
const props = defineProps({
|
||||
|
|
@ -78,10 +87,11 @@
|
|||
return []
|
||||
}
|
||||
},
|
||||
isCreateOrderToDetail:{
|
||||
type:Boolean,default:false
|
||||
isCreateOrderToDetail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
user:{
|
||||
user: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
|
|
@ -89,20 +99,41 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
table:{
|
||||
table: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
tableId:''
|
||||
tableId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
masterId:{
|
||||
type: [String,Number],
|
||||
default:''
|
||||
masterId: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const modal = reactive({
|
||||
key: '',
|
||||
clear:false
|
||||
})
|
||||
|
||||
function confirmModelConfirm() {
|
||||
if (modal.key == 'clear') {
|
||||
clear()
|
||||
}
|
||||
}
|
||||
|
||||
function setModalShow(key = 'show', show = true) {
|
||||
if (key == 'clear'&&show&&props.data.length<=0) {
|
||||
return infoBox.showToast('购物车是空的!')
|
||||
}
|
||||
modal.key = key
|
||||
modal[key] = show
|
||||
console.log(modal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const edmits = defineEmits(['clear', 'updateNumber'])
|
||||
|
||||
// mask
|
||||
|
|
@ -122,20 +153,31 @@
|
|||
|
||||
function toConfimOrder() {
|
||||
console.log(props.user);
|
||||
if(props.data.length<=0){
|
||||
if (props.data.length <= 0) {
|
||||
return infoBox.showToast('还没有选择商品')
|
||||
}
|
||||
const {tableId,name,maxCapacity,status,type}=props.table
|
||||
go.to('PAGES_CONFIRM_ORDER',{
|
||||
masterId:props.masterId,type,
|
||||
tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail?1:0
|
||||
const {
|
||||
tableId,
|
||||
name,
|
||||
maxCapacity,
|
||||
status,
|
||||
type
|
||||
} = props.table
|
||||
go.to('PAGES_CONFIRM_ORDER', {
|
||||
masterId: props.masterId,
|
||||
type,
|
||||
tableId,
|
||||
name,
|
||||
maxCapacity,
|
||||
status,
|
||||
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||
})
|
||||
}
|
||||
|
||||
const allPrice = computed(() => {
|
||||
return props.data.reduce((prve,cur)=>{
|
||||
return prve+cur.salePrice*cur.number
|
||||
},0).toFixed(2)
|
||||
return props.data.reduce((prve, cur) => {
|
||||
return prve + cur.salePrice * cur.number
|
||||
}, 0).toFixed(2)
|
||||
})
|
||||
|
||||
const goodsNumber = computed(() => {
|
||||
|
|
@ -158,16 +200,9 @@
|
|||
}
|
||||
|
||||
function clear() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否清空全部已添加的商品?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
edmits('clear')
|
||||
hideGoods()
|
||||
}
|
||||
}
|
||||
})
|
||||
setModalShow('clear',false)
|
||||
edmits('clear')
|
||||
hideGoods()
|
||||
}
|
||||
|
||||
import myButton from '@/components/my-components/my-button.vue'
|
||||
|
|
@ -249,6 +284,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
<template>
|
||||
<view class="u-relative u-flex item">
|
||||
<image lazy-load class="img" :src="data.coverImg" mode="" :style="computedImgStyle()"></image>
|
||||
<image lazy-load class="img" :src="data.coverImg" mode="aspectFill" :style="computedImgStyle()"></image>
|
||||
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
|
||||
<view>
|
||||
<view>{{data.name}}</view>
|
||||
<view>
|
||||
<text class="u-line-2">{{data.name}}</text>
|
||||
</view>
|
||||
<view class="u-font-32 font-bold u-m-t-16">
|
||||
¥{{data.price}}
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
:scroll-top="data.scrollTop" :scroll-into-view="data.itemId">
|
||||
<view v-for="(item,index) in data.tabbar" :key="index" class="u-tab-item"
|
||||
:class="[data.current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
||||
<text class="u-line-1">{{item.name}}</text>
|
||||
<text class="u-line-3">{{item.name}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view :scroll-top="data.scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
||||
|
|
@ -158,7 +158,6 @@
|
|||
reactive,
|
||||
ref,
|
||||
nextTick,
|
||||
getCurrentInstance,
|
||||
watch
|
||||
} from 'vue';
|
||||
import myCar from './components/car'
|
||||
|
|
@ -179,7 +178,6 @@
|
|||
canXiadan.value=await hasPermission('允许下单')
|
||||
}
|
||||
xiadanClick()
|
||||
const instance = getCurrentInstance();
|
||||
//临时菜
|
||||
const lingshi = reactive({
|
||||
show: false
|
||||
|
|
@ -1171,6 +1169,8 @@
|
|||
color: #444;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
box-sizing: border-box;
|
||||
padding-left: 12rpx;
|
||||
}
|
||||
|
||||
.u-tab-item-active {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
|
||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
||||
</template>
|
||||
<template v-if="orderInfo.status=='closed'">
|
||||
<template v-if="orderInfo.status=='closed'&&data.status!='return'">
|
||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
||||
</template>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,13 @@
|
|||
<view class="line-th color-666 ">¥{{item.salePrice||item.price}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view>¥{{item.salePrice||item.price}}</view>
|
||||
<template v-if="item.priceAmount<=0">
|
||||
<view>¥0.00</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view>¥{{item.priceAmount}}</view>
|
||||
</template>
|
||||
</template>
|
||||
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
|
||||
</view>
|
||||
|
|
@ -54,12 +60,15 @@
|
|||
@tap="tuicai(item,index)"><text class="no-wrap">退菜</text></my-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="orderInfo.status=='closed'">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
||||
<my-button :width="128" :height="48" plain shape="circle"
|
||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||
</view>
|
||||
<template v-if="item.status!='refund'">
|
||||
<template v-if="orderInfo.status=='closed'||orderInfo.status=='refund'">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
||||
<my-button :width="128" :height="48" plain shape="circle"
|
||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="bg-gray u-p-20 u-m-t-20" v-if="orderInfo.remark">
|
||||
|
|
@ -128,8 +137,12 @@
|
|||
computed
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||
|
||||
function returnTotalMoney(item){
|
||||
return (item.price*item.num).toFixed(2)
|
||||
}
|
||||
function to2(n){
|
||||
if(!n){
|
||||
return 0
|
||||
|
|
@ -142,7 +155,11 @@
|
|||
}
|
||||
|
||||
function tuikuan(item, index) {
|
||||
emits('tuikuan', item, index)
|
||||
hasPermission('允许退款').then(res=>{
|
||||
if(res){
|
||||
emits('tuikuan', item, index)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function printOrder() {
|
||||
|
|
@ -175,7 +192,7 @@
|
|||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
|
||||
b) => {
|
||||
return a + (b.salePrice || b.price) * (b.number || b.num)
|
||||
return a + b.priceAmount*1
|
||||
}, 0)
|
||||
return prve + curTotal
|
||||
}, 0)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view class="u-flex u-flex-1 u-row-right">
|
||||
<view>×{{item.num}}</view>
|
||||
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.price}}</view>
|
||||
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.priceAmount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@
|
|||
function setUser(par) {
|
||||
console.log(option);
|
||||
const submitPar = {
|
||||
masterId: option.masterId,
|
||||
tableId: option.tableId,
|
||||
tableId: order.tableId,
|
||||
masterId: order.masterId,
|
||||
vipUserId: user.value.id ? user.value.id : '',
|
||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729662523365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4294" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M512 493.568c-32.256 0-58.88-26.112-58.88-58.88V58.88C453.12 26.112 479.744 0 512 0s58.88 26.112 58.88 58.88v375.808c0 32.256-26.624 58.88-58.88 58.88z" fill="#318AFE" p-id="4295"></path><path d="M512 1024c-273.92 0-496.64-222.72-496.64-496.64 0-202.752 121.344-382.976 309.248-459.776 30.208-12.288 64.512 2.048 76.8 32.256 12.288 30.208-2.048 64.512-32.256 76.8C225.792 235.008 133.12 372.736 133.12 527.36c0 208.896 169.984 378.88 378.88 378.88s378.88-169.984 378.88-378.88c0-154.624-92.672-292.352-236.032-351.232-30.208-12.288-44.544-46.592-32.256-76.8 12.288-30.208 46.592-44.544 76.8-32.256 187.904 76.8 309.248 257.024 309.248 459.776 0 274.432-222.72 497.152-496.64 497.152z" fill="#318AFE" p-id="4296"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue