diff --git a/commons/utils/goodsUtil.js b/commons/utils/goodsUtil.js
new file mode 100644
index 0000000..b0e821d
--- /dev/null
+++ b/commons/utils/goodsUtil.js
@@ -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)
+}
\ No newline at end of file
diff --git a/components/my-components/edit-discount.vue b/components/my-components/edit-discount.vue
index 4497bf5..dfabe73 100644
--- a/components/my-components/edit-discount.vue
+++ b/components/my-components/edit-discount.vue
@@ -11,7 +11,7 @@
实收金额
-
@@ -20,7 +20,7 @@
优惠折扣
-
diff --git a/http/yskApi/http.js b/http/yskApi/http.js
index abded03..b3305c5 100644
--- a/http/yskApi/http.js
+++ b/http/yskApi/http.js
@@ -17,13 +17,13 @@ import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js';
import { reject } from 'lodash';
// 测试服
-let baseUrl = 'https://admintestpapi.sxczgkj.cn'
+// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
//预发布
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
//正式
-// let baseUrl = 'https://cashieradmin.sxczgkj.cn'
+let baseUrl = 'https://cashieradmin.sxczgkj.cn'
// 王伟本地测
// let baseUrl = '/ww'
diff --git a/pageNotification/index.vue b/pageNotification/index.vue
index f4214fe..8c77970 100644
--- a/pageNotification/index.vue
+++ b/pageNotification/index.vue
@@ -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()
diff --git a/pageProduct/add-Product/components/edit-haocai.vue b/pageProduct/add-Product/components/edit-haocai.vue
index 2e6b42f..5232f6f 100644
--- a/pageProduct/add-Product/components/edit-haocai.vue
+++ b/pageProduct/add-Product/components/edit-haocai.vue
@@ -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
})
diff --git a/pages/index/index.vue b/pages/index/index.vue
index ec9573c..8809b39 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -143,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',
diff --git a/pagesCreateOrder/choose-table/choose-table.vue b/pagesCreateOrder/choose-table/choose-table.vue
index 2aeaba7..fbee499 100644
--- a/pagesCreateOrder/choose-table/choose-table.vue
+++ b/pagesCreateOrder/choose-table/choose-table.vue
@@ -166,7 +166,7 @@
async function getTable() {
// let state=status.list[status.active].key
// state=state?(state=='all'?'':state):''
- const areaId=area.list[area.defaultCateIndex].id
+ const areaId=area.list[area.defaultCateIndex].id||''
let {
content,total
} = await $table.get({...query,areaId,name:searchValue.value,state:'idle'})
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 9da9aa8..584bd39 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -40,7 +40,7 @@
-
+
退菜
-
-
-
+
+
退款
-
@@ -131,6 +129,7 @@
总计¥
+
{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}
@@ -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)
})
diff --git a/pagesOrder/detail/components/order.vue b/pagesOrder/detail/components/order.vue
index be6967a..026830f 100644
--- a/pagesOrder/detail/components/order.vue
+++ b/pagesOrder/detail/components/order.vue
@@ -26,11 +26,21 @@
-->
下单时间
-
+
订单编号
- {{data.orderNo}}
+
+ {{data.orderNo}}
+
+
+
+
+
+
+
+
商家备注
diff --git a/pagesOrder/detail/components/tuicai.vue b/pagesOrder/detail/components/tuicai.vue
index 930ccc6..80ded7f 100644
--- a/pagesOrder/detail/components/tuicai.vue
+++ b/pagesOrder/detail/components/tuicai.vue
@@ -5,21 +5,24 @@
{{data.productName}}
-
-
+
+
-
-
+
+
@@ -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: '';
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 1ffd61f..a3405f3 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -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,
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index 0c4b4e2..83334d3 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -59,6 +59,7 @@
打包费
¥{{data.packFee||0}}
+
{{data.seatInfo.productName}}
¥{{data.seatInfo.priceAmount}}
@@ -72,7 +73,7 @@
- 小计¥
+ 总计¥
{{data.orderAmount}}
@@ -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)=>{
diff --git a/pagesOrder/tuikuan/tuikuan.vue b/pagesOrder/tuikuan/tuikuan.vue
index dc2feee..04df108 100644
--- a/pagesOrder/tuikuan/tuikuan.vue
+++ b/pagesOrder/tuikuan/tuikuan.vue
@@ -3,9 +3,13 @@
全退
-
+
+
+ *
+ 客座费只能全退
+
@@ -14,15 +18,25 @@
{{item.productSkuName||""}}
最多可退×{{item.num}}
-
- ¥{{item.priceAmount}}
-
-
- {{item.number}}
-
+
+
+ ¥{{item.priceAmount}}
+
+ x{{item.number}}
+
-
+
+
+
+ ¥{{item.priceAmount}}
+
+
+ {{item.number}}
+
+
+
+
@@ -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 {
diff --git a/static/copy.svg b/static/copy.svg
new file mode 100644
index 0000000..ddb1ae2
--- /dev/null
+++ b/static/copy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file