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 @@ - + 退菜 -