From cfed8ea183bd518529000c17d977ecca1b889443 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 5 Nov 2024 10:33:26 +0800 Subject: [PATCH 01/77] =?UTF-8?q?=E8=80=97=E6=9D=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageConsumables/editConsumables.vue | 10 ++++--- pageConsumables/index.vue | 39 +++++++++++++++++++++++++--- pageConsumables/time.png | Bin 0 -> 501 bytes pageConsumables/viewrecords.vue | 6 ++++- pageStaff/addstaff.vue | 8 +++--- pages/shopSetUp/index.vue | 2 +- 6 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 pageConsumables/time.png diff --git a/pageConsumables/editConsumables.vue b/pageConsumables/editConsumables.vue index 759bda4..e548a7b 100644 --- a/pageConsumables/editConsumables.vue +++ b/pageConsumables/editConsumables.vue @@ -25,7 +25,7 @@ 耗材价格 - + @@ -33,7 +33,7 @@ 预警值 - + + + { + console.log(res,'编辑员工后的提示') datas.formData = res if (datas.rolesList) { let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId) @@ -266,9 +267,10 @@ font-weight: 500; font-size: 32rpx; color: #FFFFFF; - margin-top: 50rpx; - margin-left: 50%; - transform: translateX(-50%); + margin: 0 auto; + // margin-top: 50rpx; + // margin-left: 50%; + // transform: translateX(-50%); } .bottomBotton2 { diff --git a/pages/shopSetUp/index.vue b/pages/shopSetUp/index.vue index d4c8558..91a8e60 100644 --- a/pages/shopSetUp/index.vue +++ b/pages/shopSetUp/index.vue @@ -46,7 +46,7 @@ - + From d4c309cdc7accad8616f44aecef32acfbb97fc7c Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 5 Nov 2024 15:10:16 +0800 Subject: [PATCH 02/77] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-date-pickerview.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/my-components/my-date-pickerview.vue b/components/my-components/my-date-pickerview.vue index 7507b74..0e1d466 100644 --- a/components/my-components/my-date-pickerview.vue +++ b/components/my-components/my-date-pickerview.vue @@ -487,7 +487,9 @@ const endTotal = returnDateString(e.detail.value, true).getTime() value1.value = e.detail.value nextTick(() => { - value1.value = endTotal < startTotal ? value.value : e.detail.value + if (props.isArea) { + value1.value = endTotal < startTotal ? value.value : e.detail.value + } debounce(changeDays(true, value1.value), 100) }) } @@ -521,7 +523,7 @@ } function nullFunction() { - + } function pickend(e) { From 3f4d8ac53b4d61b51ca1db7b8bfc7a255d73cbee Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 5 Nov 2024 16:47:34 +0800 Subject: [PATCH 03/77] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=BC=98=E6=83=A0=E5=88=B8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 7 +++++++ pagesOrder/quan/quan.vue | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pagesOrder/quan/quan.vue diff --git a/pages.json b/pages.json index c6f3152..0691aa5 100644 --- a/pages.json +++ b/pages.json @@ -875,6 +875,13 @@ "style": { "navigationBarTitleText": "退款" } + }, + { + "path" : "quan/quan", + "style" : + { + "navigationBarTitleText" : "券包" + } } ] diff --git a/pagesOrder/quan/quan.vue b/pagesOrder/quan/quan.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pagesOrder/quan/quan.vue @@ -0,0 +1,22 @@ + + + + + From d885fb521dee6ecc37ed6c085a092adf5199bfc2 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Wed, 6 Nov 2024 11:01:46 +0800 Subject: [PATCH 04/77] =?UTF-8?q?=E5=8F=96=E5=8F=B7=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageConsumables/outbound.vue | 21 ++++++++++++++++- pageConsumables/warehouseEntry.vue | 38 +++++++++++++++++++----------- pageLineUp/index.vue | 3 ++- 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/pageConsumables/outbound.vue b/pageConsumables/outbound.vue index f1782b6..d6c9426 100644 --- a/pageConsumables/outbound.vue +++ b/pageConsumables/outbound.vue @@ -33,6 +33,18 @@ + + + 单位 + + + + {{datas.form.list.unit}} + + + + + 应付金额 @@ -117,6 +129,7 @@ list: [], // 供应商渲染数组 status: [], + unitList:[], form: { shopId: uni.getStorageSync("shopId"), type: "out", @@ -135,6 +148,10 @@ }) onMounted(() => { datas.item = JSON.parse(props.item) + datas.form = Object.assign(datas.form, datas.item) + // 单位列表 + datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo] + datas.form.list.unit=datas.form.defaultUnit }) onShow(() => { getList() @@ -165,7 +182,9 @@ onShow(() => { nowStatusIndex.value = i.detail.value showStatus.value = false } - + function changeNowStatusIndexs(i) { + datas.form.list.unit = datas.unitList[i.detail.value] + } function sumbit() { if (!datas.form.list.stockNumber) { diff --git a/pageConsumables/warehouseEntry.vue b/pageConsumables/warehouseEntry.vue index cdca5c5..da08283 100644 --- a/pageConsumables/warehouseEntry.vue +++ b/pageConsumables/warehouseEntry.vue @@ -25,15 +25,6 @@ - *单价 @@ -42,6 +33,18 @@ + + + 单位 + + + + {{datas.form.list.unit}} + + + + + 应付金额 @@ -71,14 +74,13 @@ 供应商 - {{datas.status[nowStatusIndex]}} + {{datas.status[nowStatusIndex]}} + 新增 - @@ -120,6 +122,8 @@ list: [], // 供应商渲染数组 status: [], + // 单位列表 + unitList: [], form: { shopId: uni.getStorageSync("shopId"), type: "in", @@ -138,7 +142,10 @@ }) onMounted(() => { datas.item = JSON.parse(props.item) - datas.form = assign(datas.form, ...datas.item) + datas.form = Object.assign(datas.form, datas.item) + // 单位列表 + datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo] + datas.form.list.unit=datas.form.defaultUnit }) onShow(() => { getList() @@ -159,7 +166,6 @@ res.content.forEach(ele => { datas.status.push(ele.purveyorName) }) - console.log(datas.status, '调试121') }) } @@ -173,6 +179,10 @@ showStatus.value = false } + function changeNowStatusIndexs(i) { + datas.form.list.unit = datas.unitList[i.detail.value] + } + function sumbit() { if (!datas.form.list.stockNumber) { refs.ctx.$refs.uToastRef.show({ diff --git a/pageLineUp/index.vue b/pageLineUp/index.vue index f76e29e..b784d08 100644 --- a/pageLineUp/index.vue +++ b/pageLineUp/index.vue @@ -267,6 +267,7 @@ .pageLineUpTop { .df; justify-content: space-around; + flex-wrap: wrap; margin: 36rpx 0; >view { @@ -275,7 +276,7 @@ background: #FFFFFF; border-radius: 8rpx 8rpx 8rpx 8rpx; border: 2rpx solid #E5E5E5; - + margin-top: 20rpx; >view { text-align: center; } From da9d08a91e672aaf2420146769a133dcdf1e9385 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 6 Nov 2024 17:34:03 +0800 Subject: [PATCH 05/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=A1=B5=E9=9D=A2=EF=BC=8C=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9C=AA=E6=90=BA=E5=B8=A6orderId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesOrder/pay-order/pay-order.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue index 50c53d9..ed2d9c2 100644 --- a/pagesOrder/pay-order/pay-order.vue +++ b/pagesOrder/pay-order/pay-order.vue @@ -186,6 +186,7 @@ tableId: order.tableId, masterId: order.masterId, vipUserId: user.value.id ? user.value.id : '', + orderId:order.id, type: user.value.id ? 0 : 1 //0 设置 1 取消 } Object.assign(submitPar, par) @@ -201,6 +202,7 @@ }).then(res=>{ user.value = data order.memberId=data.id + init() }) }) } From f2f5bac39e2f0a2dc2074503bc691d3cea9ab8c8 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 6 Nov 2024 17:37:56 +0800 Subject: [PATCH 06/77] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E5=B1=95=E7=A4=BA=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/utils/goodsUtil.js | 3 + http/yskApi/Instead.js | 58 ++++ pages.json | 1 + pagesOrder/detail/components/list.vue | 131 ++++++-- pagesOrder/detail/detail.vue | 7 +- pagesOrder/index/compoents/order-item.vue | 29 +- pagesOrder/pay-order/pay-order.vue | 65 +++- pagesOrder/quan/quan.vue | 361 +++++++++++++++++++++- 8 files changed, 593 insertions(+), 62 deletions(-) diff --git a/commons/utils/goodsUtil.js b/commons/utils/goodsUtil.js index b0e821d..c919e53 100644 --- a/commons/utils/goodsUtil.js +++ b/commons/utils/goodsUtil.js @@ -19,6 +19,9 @@ export function canTuiKuan(orderInfo,item){ export function isTui(item){ return item.status=='return'||item.status=='refund'||item.status=='refunding' } +export function isGift(item){ + return !isTui(item)&&item.gift +} export function numSum(arr){ const sum=arr.reduce((a,b)=>{ return a+b*100 diff --git a/http/yskApi/Instead.js b/http/yskApi/Instead.js index 3221307..d964201 100644 --- a/http/yskApi/Instead.js +++ b/http/yskApi/Instead.js @@ -331,4 +331,62 @@ export function $returnOrder(data) { ...data } }); +} + +//获取订单可用优惠券 +export function $activateByOrderId(data) { + return request({ + url: '/api/tbShopCoupon/activateByOrderId', + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} + +//会员积分列表 +export function $returnMemberPointsList(data) { + return request({ + url: '/api/points/member-points/page', + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} + +// 会员积分账户信息 +export function $returnMemberPoints(memberId) { + return request({ + url: '/api/points/member-points/'+memberId, + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} +//002-获取订单可用积分及抵扣金额(支付页面使用) +export function $calcUsablePoints(data) { + return request({ + url: '/api/points/member-points/calc-usable-points', + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); +} +// 003-根据积分计算可抵扣金额 +export function $calcDeDuctionPoints(data) { + return request({ + url: '/api/points/member-points/calc-deduction-amount', + method: "get", + params:{ + shopId: uni.getStorageSync("shopId"), + ...data + } + }); } \ No newline at end of file diff --git a/pages.json b/pages.json index 0691aa5..38a9c78 100644 --- a/pages.json +++ b/pages.json @@ -878,6 +878,7 @@ }, { "path" : "quan/quan", + "pageId": "PAGES_ORDER_QUAN", "style" : { "navigationBarTitleText" : "券包" diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue index fc3770b..53ffcca 100644 --- a/pagesOrder/detail/components/list.vue +++ b/pagesOrder/detail/components/list.vue @@ -26,7 +26,9 @@ {{item.status=='refunding'?'退款中':'已退'}} - {{item.name||item.productName}} + + {{item.name||item.productName}} @@ -54,8 +56,20 @@ ¥{{returnTotalMoney(item)}} + X{{item.number||item.num}} @@ -70,10 +84,10 @@ @@ -99,9 +113,15 @@ - - 小计¥ - {{allPrice}} + + + 已优惠¥{{youhuiAllPrice}} + + + 小计¥ + {{allPrice}} + + @@ -148,9 +168,44 @@ import { hasPermission } from '@/commons/utils/hasPermission.js' - import {isTui,canTuiKuan,canTuicai,numSum} from '@/commons/utils/goodsUtil.js' + import { + isTui,isGift, + canTuiKuan, + canTuicai, + numSum + } from '@/commons/utils/goodsUtil.js' + const props = defineProps({ + orderInfo: { + type: Object, + default: () => {} + }, + data: { + type: Array, + default: () => [] + }, + seatFee: { + type: Object, + default: () => {} + }, + user: { + type: Object, + default: () => { + return { + id: '', + isVip: false + } + } + } + }) const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder']) + function returnVipMoney(item) { + if (!item.memberPrice || !props.user.isVip) { + return 0 + } + return (item.memberPrice * item.num).toFixed(2) + } + function returnTotalMoney(item) { return (item.price * item.num).toFixed(2) } @@ -177,20 +232,7 @@ function printOrder() { emits('printOrder') } - const props = defineProps({ - orderInfo: { - type: Object, - default: () => {} - }, - data: { - type: Array, - default: () => [] - }, - seatFee: { - type: Object, - default: () => {} - } - }) + const seatFeePrice = computed(() => { if (!props.seatFee.priceAmount) { @@ -199,21 +241,44 @@ const n = props.seatFee.priceAmount * (props.seatFee.status == 'return' ? 0 : 1) return n.toFixed(2) }) - - const allPrice = computed(() => { + const goodsOriginAllPrice = computed(() => { const goodsPrice = props.data.reduce((prve, cur) => { - const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return").reduce((a, + const curTotal = cur.info.reduce((a, b) => { - // return a + b.priceAmount*1||(b.num*b.price+b.packAmount*1) - // return a + (b.num*b.price+b.packAmount*1) return a + (b.num * b.price) }, 0) return prve + curTotal }, 0) return goodsPrice.toFixed(2) - }) - + + const freePrice = computed(() => { + const goodsPrice = props.data.reduce((prve, cur) => { + const curTotal = cur.info.filter(v => v.gift == true || isTui(v)).reduce((a, + b) => { + return a + (b.num * b.price) + }, 0) + return prve + curTotal + }, 0) + return goodsPrice.toFixed(2) + }) + const vipDiscountPrice = computed(() => { + if (!props.user.isVip) { + return 0 + } + const goodsPrice = props.data.reduce((prve, cur) => { + const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return"&&v.memberPrice&&(v.memberPrice!=v.price)).reduce((a, + b) => { + return a + (b.num * (b.price-b.memberPrice)) + }, 0) + return prve + curTotal + }, 0) + return goodsPrice.toFixed(2) + }) + const youhuiAllPrice=computed(()=>{ + console.log(freePrice.value); + return (freePrice.value*1+vipDiscountPrice.value*1).toFixed(2) + }) const packFee = computed(() => { const goodsPrice = props.data.reduce((prve, cur) => { const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return").reduce((a, @@ -225,7 +290,9 @@ return goodsPrice.toFixed(2) }) - + const allPrice = computed(() => { + return (goodsOriginAllPrice.value-freePrice.value-vipDiscountPrice.value).toFixed(2) + }) const goodsNumber = computed(() => { let result = 0 diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue index 18059ef..2a39559 100644 --- a/pagesOrder/detail/detail.vue +++ b/pagesOrder/detail/detail.vue @@ -6,6 +6,7 @@ {{orderDetail.info.tableName}} -->