feat(custom): 订单核销新增最近核销
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
105
components.d.ts
vendored
105
components.d.ts
vendored
@@ -1,57 +1,58 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core';
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
|
||||
export {};
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
Auth: typeof import('./src/components/Auth.vue')['default'];
|
||||
Back: typeof import('./src/components/Back.vue')['default'];
|
||||
Cart: typeof import('./src/components/Cart.vue')['default'];
|
||||
MerList: typeof import('./src/components/MerList.vue')['default'];
|
||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'];
|
||||
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop'];
|
||||
NutButton: typeof import('@nutui/nutui-taro')['Button'];
|
||||
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'];
|
||||
NutCell: typeof import('@nutui/nutui-taro')['Cell'];
|
||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup'];
|
||||
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox'];
|
||||
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup'];
|
||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog'];
|
||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis'];
|
||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty'];
|
||||
NutForm: typeof import('@nutui/nutui-taro')['Form'];
|
||||
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem'];
|
||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid'];
|
||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem'];
|
||||
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview'];
|
||||
NutInput: typeof import('@nutui/nutui-taro')['Input'];
|
||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'];
|
||||
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay'];
|
||||
NutPagination: typeof import('@nutui/nutui-taro')['Pagination'];
|
||||
NutPicker: typeof import('@nutui/nutui-taro')['Picker'];
|
||||
NutPopover: typeof import('@nutui/nutui-taro')['Popover'];
|
||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup'];
|
||||
NutPrice: typeof import('@nutui/nutui-taro')['Price'];
|
||||
NutRadio: typeof import('@nutui/nutui-taro')['Radio'];
|
||||
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup'];
|
||||
NutRate: typeof import('@nutui/nutui-taro')['Rate'];
|
||||
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper'];
|
||||
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'];
|
||||
NutSwitch: typeof import('@nutui/nutui-taro')['Switch'];
|
||||
NutTable: typeof import('@nutui/nutui-taro')['Table'];
|
||||
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'];
|
||||
NutTabs: typeof import('@nutui/nutui-taro')['Tabs'];
|
||||
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'];
|
||||
NutUploader: typeof import('@nutui/nutui-taro')['Uploader'];
|
||||
Pay: typeof import('./src/components/Pay.vue')['default'];
|
||||
Popup: typeof import('./src/components/Popup.vue')['default'];
|
||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default'];
|
||||
StoreList: typeof import('./src/components/StoreList.vue')['default'];
|
||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default'];
|
||||
Upload: typeof import('./src/components/Upload.vue')['default'];
|
||||
UserModal: typeof import('./src/components/UserModal.vue')['default'];
|
||||
Auth: typeof import('./src/components/Auth.vue')['default']
|
||||
Back: typeof import('./src/components/Back.vue')['default']
|
||||
Cart: typeof import('./src/components/Cart.vue')['default']
|
||||
MerList: typeof import('./src/components/MerList.vue')['default']
|
||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
|
||||
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop']
|
||||
NutButton: typeof import('@nutui/nutui-taro')['Button']
|
||||
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar']
|
||||
NutCell: typeof import('@nutui/nutui-taro')['Cell']
|
||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']
|
||||
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox']
|
||||
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup']
|
||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog']
|
||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']
|
||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty']
|
||||
NutForm: typeof import('@nutui/nutui-taro')['Form']
|
||||
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem']
|
||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid']
|
||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']
|
||||
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']
|
||||
NutInput: typeof import('@nutui/nutui-taro')['Input']
|
||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
|
||||
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
|
||||
NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
|
||||
NutPicker: typeof import('@nutui/nutui-taro')['Picker']
|
||||
NutPopover: typeof import('@nutui/nutui-taro')['Popover']
|
||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
|
||||
NutPrice: typeof import('@nutui/nutui-taro')['Price']
|
||||
NutRadio: typeof import('@nutui/nutui-taro')['Radio']
|
||||
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']
|
||||
NutRate: typeof import('@nutui/nutui-taro')['Rate']
|
||||
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
|
||||
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
|
||||
NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
|
||||
NutTable: typeof import('@nutui/nutui-taro')['Table']
|
||||
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
|
||||
NutTabs: typeof import('@nutui/nutui-taro')['Tabs']
|
||||
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']
|
||||
NutUploader: typeof import('@nutui/nutui-taro')['Uploader']
|
||||
Pay: typeof import('./src/components/Pay.vue')['default']
|
||||
Popup: typeof import('./src/components/Popup.vue')['default']
|
||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
||||
StoreList: typeof import('./src/components/StoreList.vue')['default']
|
||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default']
|
||||
Upload: typeof import('./src/components/Upload.vue')['default']
|
||||
UserModal: typeof import('./src/components/UserModal.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jdt-user",
|
||||
"version": "4.0.9",
|
||||
"version": "4.0.10",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"templateInfo": {
|
||||
@@ -9,7 +9,7 @@
|
||||
"css": "sass"
|
||||
},
|
||||
"taroConfig": {
|
||||
"version": "4.0.9"
|
||||
"version": "4.0.10"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
@@ -116,8 +116,8 @@
|
||||
"stylelint": "9.3.0",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^4.9.5",
|
||||
"unplugin-vue-components": "^0.23.0",
|
||||
"typescript": "^5.8.2",
|
||||
"unplugin-vue-components": "^28.4.1",
|
||||
"vue-loader": "^17.4.2",
|
||||
"weapp-tailwindcss": "^3.7.0",
|
||||
"webpack": "^5.97.1",
|
||||
|
||||
@@ -7,11 +7,83 @@
|
||||
src="http://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" />
|
||||
<view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view>
|
||||
</view>
|
||||
<view class="bg-white p-2">
|
||||
<view class="mt-2 text-center text-[#7A7A7A]">最近核销记录</view>
|
||||
<view v-if="list.length > 0">
|
||||
<view
|
||||
class="order-card"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="toDetailPage(item)">
|
||||
<view class="top">
|
||||
<view class="text-[#9C9C9C] text-[25px]"
|
||||
>订单号:{{ item.oid }}</view
|
||||
>
|
||||
<view
|
||||
:style="{
|
||||
color:
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="center" v-for="(itm, idx) in item.OrderGoods" :key="idx">
|
||||
<view class="top">
|
||||
<image class="mr-10" :src="itm.Goods.cover" />
|
||||
<view class="flex-1">
|
||||
<view class="title">{{ itm.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view
|
||||
>{{ itm.pay_price }}元
|
||||
<text v-if="itm.pay_integral > 0"
|
||||
>+{{ itm.pay_integral }}积分</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>x{{ itm.number }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
|
||||
v-if="item.status !== 0">
|
||||
<text class="text-[#9C9C9C]">共{{ item.count }}件商品</text>
|
||||
<text class="text-[26px] flex-1 text-right"
|
||||
>{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ item.discount_price }} (元)
|
||||
<text v-if="item.exchange > 0"
|
||||
>积分抵扣: {{ item.exchange }}</text
|
||||
>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无数据"></nut-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveOrderList} from '@/api/admin';
|
||||
import {ref} from 'vue';
|
||||
|
||||
// url参数转对象
|
||||
// const urlParse = (url: string) => {
|
||||
@@ -47,6 +119,36 @@ const scanCode = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Taro.useLoad(() => {
|
||||
getListOne();
|
||||
});
|
||||
|
||||
const list = ref<any[]>([]);
|
||||
|
||||
const getListOne = async () => {
|
||||
try {
|
||||
const {data} = Taro.getStorageSync('userInfo');
|
||||
const res = await getActiveOrderList({
|
||||
PageNum: 1,
|
||||
PageSize: 1,
|
||||
bid: data.bid,
|
||||
status: 0,
|
||||
});
|
||||
list.value = [res.data.data[0]];
|
||||
|
||||
console.log(list.value);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
const toDetailPage = (item: any) => {
|
||||
Taro.setStorageSync('ver_order_info', item);
|
||||
Taro.navigateTo({
|
||||
url: '/pages/admin/order_manage/detail/index',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -62,7 +164,7 @@ page {
|
||||
height: 300px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
margin: 300px auto;
|
||||
margin: 300px auto 50px auto;
|
||||
border-radius: 33px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -75,4 +177,62 @@ page {
|
||||
height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.order-card {
|
||||
box-sizing: border-box;
|
||||
margin: 15px auto;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
// margin-bottom: 10px;
|
||||
.top {
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
image {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 15px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
font-size: 28px;
|
||||
text-align: right;
|
||||
color: #9c9c9c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -102,7 +102,7 @@ const subVerify = async () => {
|
||||
// icon: 'none',
|
||||
//});
|
||||
Taro.showModal({
|
||||
title: '核销提示',
|
||||
title: '核销成功',
|
||||
content: res.msg,
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user