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
|
/* eslint-disable */
|
||||||
// We suggest you to commit this file into source control
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-vue-components
|
||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
import '@vue/runtime-core';
|
// biome-ignore lint: disable
|
||||||
|
export {}
|
||||||
|
|
||||||
export {};
|
/* prettier-ignore */
|
||||||
|
declare module 'vue' {
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
Auth: typeof import('./src/components/Auth.vue')['default'];
|
Auth: typeof import('./src/components/Auth.vue')['default']
|
||||||
Back: typeof import('./src/components/Back.vue')['default'];
|
Back: typeof import('./src/components/Back.vue')['default']
|
||||||
Cart: typeof import('./src/components/Cart.vue')['default'];
|
Cart: typeof import('./src/components/Cart.vue')['default']
|
||||||
MerList: typeof import('./src/components/MerList.vue')['default'];
|
MerList: typeof import('./src/components/MerList.vue')['default']
|
||||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'];
|
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
|
||||||
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop'];
|
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop']
|
||||||
NutButton: typeof import('@nutui/nutui-taro')['Button'];
|
NutButton: typeof import('@nutui/nutui-taro')['Button']
|
||||||
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'];
|
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar']
|
||||||
NutCell: typeof import('@nutui/nutui-taro')['Cell'];
|
NutCell: typeof import('@nutui/nutui-taro')['Cell']
|
||||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup'];
|
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']
|
||||||
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox'];
|
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox']
|
||||||
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup'];
|
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup']
|
||||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog'];
|
NutDialog: typeof import('@nutui/nutui-taro')['Dialog']
|
||||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis'];
|
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']
|
||||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty'];
|
NutEmpty: typeof import('@nutui/nutui-taro')['Empty']
|
||||||
NutForm: typeof import('@nutui/nutui-taro')['Form'];
|
NutForm: typeof import('@nutui/nutui-taro')['Form']
|
||||||
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem'];
|
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem']
|
||||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid'];
|
NutGrid: typeof import('@nutui/nutui-taro')['Grid']
|
||||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem'];
|
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']
|
||||||
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview'];
|
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']
|
||||||
NutInput: typeof import('@nutui/nutui-taro')['Input'];
|
NutInput: typeof import('@nutui/nutui-taro')['Input']
|
||||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'];
|
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
|
||||||
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay'];
|
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
|
||||||
NutPagination: typeof import('@nutui/nutui-taro')['Pagination'];
|
NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
|
||||||
NutPicker: typeof import('@nutui/nutui-taro')['Picker'];
|
NutPicker: typeof import('@nutui/nutui-taro')['Picker']
|
||||||
NutPopover: typeof import('@nutui/nutui-taro')['Popover'];
|
NutPopover: typeof import('@nutui/nutui-taro')['Popover']
|
||||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup'];
|
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
|
||||||
NutPrice: typeof import('@nutui/nutui-taro')['Price'];
|
NutPrice: typeof import('@nutui/nutui-taro')['Price']
|
||||||
NutRadio: typeof import('@nutui/nutui-taro')['Radio'];
|
NutRadio: typeof import('@nutui/nutui-taro')['Radio']
|
||||||
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup'];
|
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']
|
||||||
NutRate: typeof import('@nutui/nutui-taro')['Rate'];
|
NutRate: typeof import('@nutui/nutui-taro')['Rate']
|
||||||
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper'];
|
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
|
||||||
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'];
|
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
|
||||||
NutSwitch: typeof import('@nutui/nutui-taro')['Switch'];
|
NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
|
||||||
NutTable: typeof import('@nutui/nutui-taro')['Table'];
|
NutTable: typeof import('@nutui/nutui-taro')['Table']
|
||||||
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'];
|
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
|
||||||
NutTabs: typeof import('@nutui/nutui-taro')['Tabs'];
|
NutTabs: typeof import('@nutui/nutui-taro')['Tabs']
|
||||||
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'];
|
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']
|
||||||
NutUploader: typeof import('@nutui/nutui-taro')['Uploader'];
|
NutUploader: typeof import('@nutui/nutui-taro')['Uploader']
|
||||||
Pay: typeof import('./src/components/Pay.vue')['default'];
|
Pay: typeof import('./src/components/Pay.vue')['default']
|
||||||
Popup: typeof import('./src/components/Popup.vue')['default'];
|
Popup: typeof import('./src/components/Popup.vue')['default']
|
||||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default'];
|
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
||||||
StoreList: typeof import('./src/components/StoreList.vue')['default'];
|
StoreList: typeof import('./src/components/StoreList.vue')['default']
|
||||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default'];
|
Ucharts: typeof import('./src/components/Ucharts.vue')['default']
|
||||||
Upload: typeof import('./src/components/Upload.vue')['default'];
|
Upload: typeof import('./src/components/Upload.vue')['default']
|
||||||
UserModal: typeof import('./src/components/UserModal.vue')['default'];
|
UserModal: typeof import('./src/components/UserModal.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jdt-user",
|
"name": "jdt-user",
|
||||||
"version": "4.0.9",
|
"version": "4.0.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "",
|
"description": "",
|
||||||
"templateInfo": {
|
"templateInfo": {
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"css": "sass"
|
"css": "sass"
|
||||||
},
|
},
|
||||||
"taroConfig": {
|
"taroConfig": {
|
||||||
"version": "4.0.9"
|
"version": "4.0.10"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:weapp": "taro build --type weapp",
|
"build:weapp": "taro build --type weapp",
|
||||||
@@ -116,8 +116,8 @@
|
|||||||
"stylelint": "9.3.0",
|
"stylelint": "9.3.0",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^5.8.2",
|
||||||
"unplugin-vue-components": "^0.23.0",
|
"unplugin-vue-components": "^28.4.1",
|
||||||
"vue-loader": "^17.4.2",
|
"vue-loader": "^17.4.2",
|
||||||
"weapp-tailwindcss": "^3.7.0",
|
"weapp-tailwindcss": "^3.7.0",
|
||||||
"webpack": "^5.97.1",
|
"webpack": "^5.97.1",
|
||||||
|
|||||||
@@ -7,11 +7,83 @@
|
|||||||
src="http://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" />
|
src="http://p1.meituan.net/csc/696924dda634f05689dabdfbb18e88cc13551.png" />
|
||||||
<view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view>
|
<view class="mt-2 text-[#7A7A7A]">扫描二维码核销</view>
|
||||||
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
|
import {getActiveOrderList} from '@/api/admin';
|
||||||
|
import {ref} from 'vue';
|
||||||
|
|
||||||
// url参数转对象
|
// url参数转对象
|
||||||
// const urlParse = (url: string) => {
|
// 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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -62,7 +164,7 @@ page {
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 300px auto;
|
margin: 300px auto 50px auto;
|
||||||
border-radius: 33px;
|
border-radius: 33px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -75,4 +177,62 @@ page {
|
|||||||
height: 150px;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const subVerify = async () => {
|
|||||||
// icon: 'none',
|
// icon: 'none',
|
||||||
//});
|
//});
|
||||||
Taro.showModal({
|
Taro.showModal({
|
||||||
title: '核销提示',
|
title: '核销成功',
|
||||||
content: res.msg,
|
content: res.msg,
|
||||||
success: () => {
|
success: () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user