feat:共富 下单
This commit is contained in:
1 parent
1ed1858f87
commit
0a4e579522
10 files changed
+28
-69
No files matched your search
+1
-1
@@ -82,7 +82,7 @@ const tabbar: TabbarItem[] = [
|
||||
text: "订单",
|
||||
iconPath: "/static/tabbar/order.png",
|
||||
selectedIconPath: "/static/tabbar/order-select.png",
|
||||
launchParam: ["canteen", "selfMerchant", "onlineShop", "coopMerchant"],
|
||||
launchParam: ["canteen", "selfMerchant", "coopMerchant", "onlineShop", "prosperityShop"],
|
||||
auth: ["user"],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
</template>
|
||||
</crud-layout>
|
||||
|
||||
<tm-drawer z-index="100" v-model:show="showQrCodeDialog" title="兑换券核销二维码" :show-close="true" position="bottom"
|
||||
size="60%">
|
||||
<tm-drawer z-index="100" v-model:show="showQrCodeDialog" title="兑换券核销二维码" :show-close="true" position="bottom" size="60%">
|
||||
<view class="flex-col-center">
|
||||
<view class="h-80rpx" />
|
||||
<canvas canvas-id="qrcodeId" class="size-200px" />
|
||||
@@ -91,8 +90,8 @@ const CouponVerification = async () => {
|
||||
text: CryptoJS.enc.Base64.stringify(words),
|
||||
size: 200,
|
||||
margin: 0,
|
||||
success: (res) => { },
|
||||
complete: () => { },
|
||||
success: (res) => {},
|
||||
complete: () => {},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -69,7 +69,7 @@ const doCancelRefund = async () => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="flex-row-center m-t-30rpx" v-if="state.detail.orderStatus == 5 && state.detail.orderType == 2">
|
||||
<view class="flex-row-center m-t-30rpx" v-if="state.detail.orderStatus === '5' && ['2', '7'].includes(state.detail.orderType)">
|
||||
<view class="flex-row-center bg-white w-550rpx rounded-16rpx">
|
||||
<image
|
||||
class="w-500rpx"
|
||||
@@ -96,10 +96,6 @@ const doCancelRefund = async () => {
|
||||
<view>商户</view>
|
||||
<view>{{ state.detail.merchantName }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>自提点</view>
|
||||
<view>{{ state.detail.merchantName }}</view>
|
||||
</view>
|
||||
<view class="m-t-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="info_cell">
|
||||
<view>订单号</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tm-drawer z-index="2000" v-model:show="modelValue" showFooter showClose title="加入购物车" size="70%" bgColor="#ECF4F9" @close="doClose">
|
||||
<tm-drawer z-index="800" v-model:show="modelValue" showFooter showClose title="加入购物车" size="70%" bgColor="#ECF4F9" @close="doClose">
|
||||
<view class="flex-col card py-20rpx px-30rpx mb-20rpx">
|
||||
<view class="prefix_title mb-15rpx">商品信息</view>
|
||||
<view class="flex items-center">
|
||||
@@ -137,8 +137,9 @@ const handleSkuAddToCart = async () => {
|
||||
// }
|
||||
|
||||
// 检查库存
|
||||
if (props.goodsInfo.stock === 0 || Number(state.goodsCount) > Number(state.selectedSku.stock))
|
||||
if (props.goodsInfo.totalStock === 0 || Number(state.goodsCount) > Number(state.selectedSku.stock)) {
|
||||
return uni.showToast({ title: "库存不足", icon: "none" })
|
||||
}
|
||||
|
||||
emit("onSkuAddToCart", {
|
||||
spuId: props.goodsInfo.id,
|
||||
|
||||
@@ -97,9 +97,9 @@ const query = (page: number, pagesize: number) => {
|
||||
}
|
||||
|
||||
onLoad((options: any) => {
|
||||
const { merchantId } = options
|
||||
if (!merchantId) return uni.showToast({ title: "参数错误", icon: "none" })
|
||||
state.params.merchantId = merchantId
|
||||
const { mchId } = options
|
||||
if (!mchId) return uni.showToast({ title: "参数错误", icon: "none" })
|
||||
state.params.merchantId = mchId
|
||||
})
|
||||
|
||||
// 点击搜索
|
||||
@@ -110,7 +110,7 @@ const search = () => {
|
||||
const doGoodsDetail = (id: string) => {
|
||||
if (!id) return uni.showToast({ title: "商品id不存在", icon: "none" })
|
||||
uni.navigateTo({
|
||||
url: `/pages/prosperity-shop/goods-detail?id=${id}&merchantId=${state.params.merchantId}`,
|
||||
url: `/pages/prosperity-shop/goods-detail?id=${id}&mchId=${state.params.merchantId}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -180,7 +180,7 @@ const doGoodsDetail = (id: string) => {
|
||||
// 去搜索商品
|
||||
const goSearch = () => {
|
||||
if (!state.mchDetail.id) return uni.showToast({ title: "超市id不存在", icon: "none" })
|
||||
uni.navigateTo({ url: `/pages/prosperity-shop/goods-search?merchantId=${state.mchDetail.id}` })
|
||||
uni.navigateTo({ url: `/pages/prosperity-shop/goods-search?mchId=${state.mchId}` })
|
||||
}
|
||||
|
||||
// 选规格
|
||||
|
||||
@@ -45,7 +45,7 @@ const doTab = (e: any) => {
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(
|
||||
pageRef,
|
||||
getLaunchParam() == "canteen"
|
||||
getLaunchParam() == "canteen" // 食堂
|
||||
? orderApi.caneenPage
|
||||
: getLaunchParam() == "selfMerchant"
|
||||
? orderApi.supPage
|
||||
@@ -53,6 +53,8 @@ const pageHook = hooks.usePage(
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "onlineShop"
|
||||
? orderApi.supPage
|
||||
: getLaunchParam() == "prosperityShop"
|
||||
? orderApi.farmerSpuPage
|
||||
: async () => [],
|
||||
null,
|
||||
"data.records",
|
||||
@@ -103,7 +105,7 @@ const doRefund = (v: any) => {
|
||||
<image class="size-130rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 ml-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="main-text-30">{{ v.merchantName }}</view>
|
||||
<view class="sub-text-30">{{ v.merchantName }}</view>
|
||||
<!-- <view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" /> -->
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="s">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="s">已支付</tm-tag>
|
||||
@@ -130,7 +132,6 @@ const doRefund = (v: any) => {
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <scroll-view v-if="['5', '20'].includes(v.orderStatus) && ['1', '2'].includes(v.orderType)" scroll-y> -->
|
||||
<view v-if="['5', '20'].includes(v.orderStatus) && ['1', '2'].includes(v.orderType)">
|
||||
<view class="border-b-2rpx border-dashed border-#eeeeee mt-2"></view>
|
||||
<tm-collapse>
|
||||
@@ -154,11 +155,12 @@ const doRefund = (v: any) => {
|
||||
</tm-collapse-item>
|
||||
</tm-collapse>
|
||||
</view>
|
||||
<!-- </scroll-view> -->
|
||||
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="w-full flex-row items-center justify-end my-1">
|
||||
<!-- <view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款</view> -->
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn" @tap.stop="doToDetail(v)">核销码</view>
|
||||
<view v-if="v.orderStatus === '5' && ['2', '7'].includes(v.orderType)" class="m-l-20rpx botder_btn" @tap.stop="doToDetail(v)">
|
||||
核销码
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import request from "@/sheep/utils/request"
|
||||
|
||||
export default {
|
||||
// 食堂订单
|
||||
caneenPage: (params: any) =>
|
||||
request({
|
||||
url: `/hard/hard-order/app/caneen-page-join`,
|
||||
@@ -13,6 +14,13 @@ export default {
|
||||
method: "GET",
|
||||
params,
|
||||
}),
|
||||
// 共富商城订单
|
||||
farmerSpuPage: (params: any) =>
|
||||
request({
|
||||
url: `/hard/hard-order/app/farmer-page-join`,
|
||||
method: "GET",
|
||||
params,
|
||||
}),
|
||||
detail: (params: any) =>
|
||||
request({
|
||||
url: `/hard/hard-order/app/detail`,
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, onMounted, watch, PropType } from "vue";
|
||||
import { arrayNumberValid, getUid, arrayNumberValidByStyleMP, arrayNumberValidByStyleBorderColor, arrayNumberValidByStyleBorderStyle, covetUniNumber, linearValid, getUnit } from "../../libs/tool";
|
||||
import { useTmConfig } from "../../libs/config";
|
||||
import { getDefaultColor, getDefaultColorObj, getOutlineColorObj, getTextColorObj, getThinColorObj } from "../../libs/colors";
|
||||
/**
|
||||
* @displayName 开关
|
||||
* @exportName tm-switch
|
||||
* @category 表单组件
|
||||
* @description 开关,用于直观的展示选项表单的选择。
|
||||
* @constant 平台兼容
|
||||
* | H5 | uniAPP | 小程序 | version |
|
||||
| --- | --- | --- | --- |
|
||||
| ☑️| ☑️ | ☑️ | ☑️ | ☑️ | 1.0.0 |
|
||||
*/
|
||||
defineOptions({ name: 'TmSwitch' });
|
||||
const { config } = useTmConfig()
|
||||
|
||||
const props = defineProps({})
|
||||
</script>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
options: {
|
||||
styleIsolation: "apply-shared",
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
|
||||
</template>
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
options: {
|
||||
styleIsolation: "apply-shared",
|
||||
virtualHost: true,
|
||||
addGlobalClass:true,
|
||||
multipleSlots:true
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user