更新订单管理模块,增加订单详情跳转用户订单
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bg-gray u-p-20 u-m-t-20">
|
<view class="bg-gray u-p-20 u-m-t-20">
|
||||||
<view>备注</view>
|
<view>备注</view>
|
||||||
<view class="u-m-t-10">无</view>
|
<view class="u-m-t-10">{{orderInfo.remark}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
})
|
})
|
||||||
const recoders = reactive({
|
const recoders = reactive({
|
||||||
list:[
|
list:[
|
||||||
{title:'2024-09-15 11:20:30',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
|
{title:'2024-09-15',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
|
||||||
{title:'2024-09-15 ',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
|
{title:'2024-09-15',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'},
|
||||||
{title:'2024-09-15 ',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'}
|
{title:'2024-09-15',content:'[东风(id:124413)]使用代客下单提交。(未打印预结单)'}
|
||||||
],
|
],
|
||||||
active:0
|
active:0
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,20 +5,20 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="u-flex u-row-between u-m-t-20 border-bottom u-p-b-20">
|
<view class="u-flex u-row-between u-m-t-20 border-bottom u-p-b-20">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<up-avatar :size="30"></up-avatar>
|
<up-avatar :size="30" :src="user.headImg"></up-avatar>
|
||||||
<view class="color-666 u-m-l-30">未绑定手机号</view>
|
<view class="color-666 u-m-l-30">{{user.telephone||'未绑定手机号'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<my-button :height="60" plain shape="circle">他的订单</my-button>
|
<my-button @click="toOrder" :height="60" plain shape="circle">他的订单</my-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-20 u-row-between">
|
<view class="u-flex u-m-t-20 u-row-between">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="font-bold">0.00</view>
|
<view class="font-bold">{{user.amount}}</view>
|
||||||
<view class="color-666 u-m-t-10">余额</view>
|
<view class="color-666 u-m-t-10">余额</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="font-bold">0.00</view>
|
<view class="font-bold">{{user.totalScore}}</view>
|
||||||
<view class="color-666 u-m-t-10">积分</view>
|
<view class="color-666 u-m-t-10">积分</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
@@ -34,13 +34,30 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
orderInfo: {
|
orderInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {
|
||||||
|
status:''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {
|
||||||
|
return {
|
||||||
|
id:'',
|
||||||
|
headImg:'',
|
||||||
|
telephone:'',
|
||||||
|
amount:'0.00',
|
||||||
|
totalScore:'0.00'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function toOrder(){
|
||||||
|
go.to('PAGES_ORDER_INDEX',{
|
||||||
|
userId:props.user.id||'',
|
||||||
|
type:'user'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function chooseUser() {
|
function chooseUser() {
|
||||||
go.to('PAGES_CHOOSE_USER')
|
go.to('PAGES_CHOOSE_USER')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="min-page bg-gray u-font-28 u-p-30">
|
<view class="min-page bg-gray u-font-28 u-p-30">
|
||||||
<user-vue :orderInfo="orderDetail.info"></user-vue>
|
<user-vue :orderInfo="orderDetail.info" :user="user"></user-vue>
|
||||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-20">
|
<view class="default-box-padding bg-fff border-r-12 u-m-t-20">
|
||||||
<text class="color-666">桌位号:</text>
|
<text class="color-666">桌位号:</text>
|
||||||
<text class="font-bold">{{orderDetail.info.tableName}}</text>
|
<text class="font-bold">{{orderDetail.info.tableName}}</text>
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
<goods-list @printOrder="onPrintOrder" @tuikuan="onTuikuan" :orderInfo="orderDetail.info"
|
<goods-list @printOrder="onPrintOrder" @tuikuan="onTuikuan" :orderInfo="orderDetail.info"
|
||||||
:data="orderDetail.goodsList" :seatFee="orderDetail.seatFee.totalAmount" @tuicai="onTuiCai"></goods-list>
|
:data="orderDetail.goodsList" :seatFee="orderDetail.seatFee.totalAmount" @tuicai="onTuiCai"></goods-list>
|
||||||
<template v-if="orderDetail.seatFee.totalNumber&&orderDetail.seatFee.totalAmount">
|
<template v-if="orderDetail.seatFee.totalNumber&&orderDetail.seatFee.totalAmount">
|
||||||
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info" :data="orderDetail.seatFee"></extra-vue>
|
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info"
|
||||||
|
:data="orderDetail.seatFee"></extra-vue>
|
||||||
</template>
|
</template>
|
||||||
<order-vue :data="orderDetail.info" :table="options" :seatFee="orderDetail.seatFee"></order-vue>
|
<order-vue :data="orderDetail.info" :table="options" :seatFee="orderDetail.seatFee"></order-vue>
|
||||||
<step-vue></step-vue>
|
<step-vue></step-vue>
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import * as Api from '@/http/yskApi/Instead.js'
|
import * as Api from '@/http/yskApi/Instead.js'
|
||||||
import * as orderApi from '@/http/yskApi/order.js'
|
import * as orderApi from '@/http/yskApi/order.js'
|
||||||
|
import {queryAllShopUser} from '@/http/yskApi/shop-user.js'
|
||||||
import {
|
import {
|
||||||
objToArrary
|
objToArrary
|
||||||
} from '@/commons/utils/returrn-data.js'
|
} from '@/commons/utils/returrn-data.js'
|
||||||
@@ -59,20 +61,43 @@
|
|||||||
import OrderDetail from './page.js'
|
import OrderDetail from './page.js'
|
||||||
const tuicai = reactive({
|
const tuicai = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
isSeatFee:false,
|
isSeatFee: false,
|
||||||
selGoods: {}
|
selGoods: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
function onSeatFeeTuicai(seatFee){
|
function onSeatFeeTuicai(seatFee) {
|
||||||
tuicai.show = true
|
tuicai.show = true
|
||||||
tuicai.isSeatFee = seatFee
|
tuicai.isSeatFee = seatFee
|
||||||
tuicai.selGoods = seatFee
|
tuicai.selGoods = seatFee
|
||||||
}
|
}
|
||||||
function onSeatFeeTuiKuan(seatFee){
|
|
||||||
|
function onSeatFeeTuiKuan(seatFee) {
|
||||||
|
console.log(seatFee);
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
productId,
|
||||||
|
productSkuId,
|
||||||
|
productName,
|
||||||
|
productSkuName,
|
||||||
|
cartId,
|
||||||
|
num,
|
||||||
|
priceAmount,
|
||||||
|
price
|
||||||
|
} = seatFee
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
|
id,
|
||||||
|
cartId,
|
||||||
|
productId,
|
||||||
|
productSkuId,
|
||||||
|
productName,
|
||||||
|
num,
|
||||||
|
number: 0,
|
||||||
|
productSkuName: productSkuName || '',
|
||||||
|
priceAmount,
|
||||||
|
price
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTuiCai(goods, index) {
|
function onTuiCai(goods, index) {
|
||||||
console.log(goods);
|
console.log(goods);
|
||||||
tuicai.show = true
|
tuicai.show = true
|
||||||
@@ -87,8 +112,8 @@
|
|||||||
tuicai.selGoods.status = 'return'
|
tuicai.selGoods.status = 'return'
|
||||||
tuicai.show = false
|
tuicai.show = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function printDishes() {
|
async function printDishes() {
|
||||||
try {
|
try {
|
||||||
const res = await Api.$printDishes({
|
const res = await Api.$printDishes({
|
||||||
@@ -115,7 +140,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onTuikuan(goods, index) {
|
function onTuikuan(goods, index) {
|
||||||
const {id,productId,productSkuId,productName,productSkuName,cartId,num,priceAmount,price}=goods
|
const {
|
||||||
|
id,
|
||||||
|
productId,
|
||||||
|
productSkuId,
|
||||||
|
productName,
|
||||||
|
productSkuName,
|
||||||
|
cartId,
|
||||||
|
num,
|
||||||
|
priceAmount,
|
||||||
|
price
|
||||||
|
} = goods
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
id,
|
id,
|
||||||
cartId,
|
cartId,
|
||||||
@@ -123,14 +158,15 @@
|
|||||||
productSkuId,
|
productSkuId,
|
||||||
productName,
|
productName,
|
||||||
num,
|
num,
|
||||||
number:0,
|
number: 0,
|
||||||
productSkuName:productSkuName||'',
|
productSkuName: productSkuName || '',
|
||||||
priceAmount,price
|
priceAmount,
|
||||||
|
price
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const uiPage = new OrderDetail()
|
const uiPage = new OrderDetail()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uiPage.setVal('user', {
|
uiPage.setVal('user', {
|
||||||
@@ -148,7 +184,7 @@
|
|||||||
|
|
||||||
function toPay() {
|
function toPay() {
|
||||||
go.to('PAGES_ORDER_PAY', {
|
go.to('PAGES_ORDER_PAY', {
|
||||||
tableId: options.tableId,
|
tableId: options.tableId|| orderDetail.info.tableId,
|
||||||
tableName: options.name,
|
tableName: options.name,
|
||||||
masterId: options.masterId,
|
masterId: options.masterId,
|
||||||
orderId: orderDetail.info.id,
|
orderId: orderDetail.info.id,
|
||||||
@@ -166,6 +202,15 @@
|
|||||||
const options = reactive({})
|
const options = reactive({})
|
||||||
async function init() {
|
async function init() {
|
||||||
const res = await orderApi.tbOrderInfoDetail(options.id)
|
const res = await orderApi.tbOrderInfoDetail(options.id)
|
||||||
|
if(res.userId){
|
||||||
|
queryAllShopUser({id:res.userId}).then(res=>{
|
||||||
|
if(res.content[0]){
|
||||||
|
user.value=res.content[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (res.detailList.length) {
|
if (res.detailList.length) {
|
||||||
uni.setStorageSync('useType', res.detailList[0].useType)
|
uni.setStorageSync('useType', res.detailList[0].useType)
|
||||||
}
|
}
|
||||||
@@ -222,12 +267,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 监听选择用户事件
|
// 监听选择用户事件
|
||||||
let user = ref(null)
|
let user = ref({
|
||||||
|
headImg:'',
|
||||||
|
telephone:'',
|
||||||
|
amount:'0.00',
|
||||||
|
totalScore:'0.00'
|
||||||
|
})
|
||||||
//更新选择用户
|
//更新选择用户
|
||||||
function setUser(par) {
|
function setUser(par) {
|
||||||
const submitPar = {
|
const submitPar = {
|
||||||
masterId: options.masterId,
|
masterId: options.masterId,
|
||||||
tableId: options.tableId,
|
tableId: options.tableId|| orderDetail.info.tableId,
|
||||||
vipUserId: user.value.id ? user.value.id : '',
|
vipUserId: user.value.id ? user.value.id : '',
|
||||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<view class="u-rela time-item tranistion-2" @click="changeTimeDataSel(-1)"
|
<view class="u-rela time-item tranistion-2" @click="changeTimeDataSel(-1)"
|
||||||
:class="{active:timeData.sel==-1}">自定义</view>
|
:class="{active:timeData.sel==-1}">自定义</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-2 bg-fff u-col-center u-flex u-p-l-28 u-p-r-28 u-p-t-30 u-row-between">
|
<view class="u-m-t-2 bg-fff u-col-center u-flex u-p-l-28 u-p-r-28 u-p-t-30 u-row-between">
|
||||||
<view class="status-item " @click="changeStatusSel(index)" :class="{active:statusData.sel==index}"
|
<view class="status-item " @click="changeStatusSel(index)" :class="{active:statusData.sel==index}"
|
||||||
v-for="(item,index) in statusData.list" :key="index">
|
v-for="(item,index) in statusData.list" :key="index">
|
||||||
@@ -18,6 +19,29 @@
|
|||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<template v-if="type&&userShow">
|
||||||
|
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="userShow">
|
||||||
|
<view class="time-area u-font-24 color-main u-flex">
|
||||||
|
<up-avatar :size="22" :src="user.headImg"></up-avatar>
|
||||||
|
<view class="u-m-l-10 u-m-r-10">
|
||||||
|
<text v-if="user.id">{{user.telephone||user.nickName}}</text>
|
||||||
|
<text v-else>服务员下单</text>
|
||||||
|
</view>
|
||||||
|
<up-icon name="close-circle-fill" :color="color.ColorMain" @click="userShowClose"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-else>
|
||||||
|
<view class="time-area u-font-24 color-main u-flex">
|
||||||
|
<up-avatar :size="22" ></up-avatar>
|
||||||
|
<view class="u-m-l-10 u-m-r-10">
|
||||||
|
服务员下单
|
||||||
|
</view>
|
||||||
|
<up-icon name="close-circle-fill" :color="color.ColorMain" @click="userShowClose"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="time.length">
|
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="time.length">
|
||||||
<view class="time-area u-font-24 color-main u-flex">
|
<view class="time-area u-font-24 color-main u-flex">
|
||||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[0]"></uni-dateformat>
|
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[0]"></uni-dateformat>
|
||||||
@@ -31,7 +55,9 @@
|
|||||||
<view class="u-text-center font-bold u-font-32 u-p-t-30">选择状态</view>
|
<view class="u-text-center font-bold u-font-32 u-p-t-30">选择状态</view>
|
||||||
<view style="height: 20rpx;"></view>
|
<view style="height: 20rpx;"></view>
|
||||||
<view class="u-p-30 all-list u-flex u-flex-wrap gap-20">
|
<view class="u-p-30 all-list u-flex u-flex-wrap gap-20">
|
||||||
<view class="all-list-item" :class="{active:statusItemIndex==statusData.allListSel}" @click="changeAllListSel(statusItemIndex)" v-for="(statusItem,statusItemIndex) in statusData.allList" :key="statusItemIndex">
|
<view class="all-list-item" :class="{active:statusItemIndex==statusData.allListSel}"
|
||||||
|
@click="changeAllListSel(statusItemIndex)"
|
||||||
|
v-for="(statusItem,statusItemIndex) in statusData.allList" :key="statusItemIndex">
|
||||||
{{statusItem.label}}
|
{{statusItem.label}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -47,11 +73,20 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import orderEnum from '@/commons/orderEnum.js'
|
import orderEnum from '@/commons/orderEnum.js'
|
||||||
import * as $time from '@/commons/utils/dayjs-time.js';
|
import * as $time from '@/commons/utils/dayjs-time.js';
|
||||||
|
import color from '@/commons/color.js';
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref,
|
ref,
|
||||||
watch
|
watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
|
const emits = defineEmits(['update:time', 'update:status','clearUser'])
|
||||||
|
|
||||||
|
function userShowClose() {
|
||||||
|
userShow.value = false
|
||||||
|
emits('clearUser')
|
||||||
|
}
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
time: {
|
time: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -60,10 +95,31 @@
|
|||||||
status: {
|
status: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
user: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
userId: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
default:''//user 查看具体用户订单
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
let userShow = ref(props.type? true : false)
|
||||||
|
console.log(props.type);
|
||||||
|
watch(() => props.type, (newval) => {
|
||||||
|
console.log(newval);
|
||||||
|
if (newval) {
|
||||||
|
userShow.value = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
let datePicker = ref(null)
|
let datePicker = ref(null)
|
||||||
const emits = defineEmits(['update:time', 'update:status'])
|
|
||||||
// 示例使用
|
// 示例使用
|
||||||
const today = $time.getTodayTimestamps();
|
const today = $time.getTodayTimestamps();
|
||||||
const yesterday = $time.getYesterdayTimestamps();
|
const yesterday = $time.getYesterdayTimestamps();
|
||||||
@@ -90,7 +146,7 @@
|
|||||||
|
|
||||||
const statusData = reactive({
|
const statusData = reactive({
|
||||||
allList: orderEnum.status,
|
allList: orderEnum.status,
|
||||||
moreShow:false,
|
moreShow: false,
|
||||||
allListSel: -1,
|
allListSel: -1,
|
||||||
list: [{
|
list: [{
|
||||||
label: '全部',
|
label: '全部',
|
||||||
@@ -115,12 +171,15 @@
|
|||||||
],
|
],
|
||||||
sel: 0
|
sel: 0
|
||||||
})
|
})
|
||||||
function moreShowHide(){
|
|
||||||
statusData.moreShow=false
|
function moreShowHide() {
|
||||||
|
statusData.moreShow = false
|
||||||
}
|
}
|
||||||
function moreShowOpen(){
|
|
||||||
statusData.moreShow=true
|
function moreShowOpen() {
|
||||||
|
statusData.moreShow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeStatusSel(i) {
|
function changeStatusSel(i) {
|
||||||
statusData.sel = i
|
statusData.sel = i
|
||||||
}
|
}
|
||||||
@@ -129,8 +188,9 @@
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
emits('update:time', [e.start, e.end])
|
emits('update:time', [e.start, e.end])
|
||||||
}
|
}
|
||||||
function changeAllListSel(i){
|
|
||||||
statusData.allListSel=i
|
function changeAllListSel(i) {
|
||||||
|
statusData.allListSel = i
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -144,7 +204,8 @@
|
|||||||
color: $my-main-color;
|
color: $my-main-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.all-list-item{
|
|
||||||
|
.all-list-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -153,11 +214,13 @@
|
|||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
transition: all .2s ease-in-out;
|
transition: all .2s ease-in-out;
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: $my-main-color;
|
color: $my-main-color;
|
||||||
border-color: $my-main-color;
|
border-color: $my-main-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-item {
|
.time-item {
|
||||||
color: #666;
|
color: #666;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="search bg-fff u-p-t-32 u-p-l-28 u-p-r-28 u-p-b-32">
|
<view class="search bg-fff u-p-t-32 u-p-l-28 u-p-r-28 u-p-b-32">
|
||||||
<up-search v-bind="search" v-model="search.val"></up-search>
|
<up-search v-bind="search" v-model="search.val"></up-search>
|
||||||
</view>
|
</view>
|
||||||
<filter-vue v-model:time="order.data.query.createdAt"></filter-vue>
|
<filter-vue @clearUser="clearQueryUser" v-model:time="order.data.query.createdAt" :user="user" :type="option.type"></filter-vue>
|
||||||
</view>
|
</view>
|
||||||
<order-list @printOrder="onPrintOrder" :hasAjax="order.data.hasAjax" :list="order.data.list"></order-list>
|
<order-list @printOrder="onPrintOrder" :hasAjax="order.data.hasAjax" :list="order.data.list"></order-list>
|
||||||
<my-pagination @change="pageChange" :totalElements="order.data.total"></my-pagination>
|
<my-pagination @change="pageChange" :totalElements="order.data.total"></my-pagination>
|
||||||
@@ -15,13 +15,16 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {onLoad,onShow,onPullDownRefresh} from '@dcloudio/uni-app'
|
import {onLoad,onShow,onPullDownRefresh} from '@dcloudio/uni-app'
|
||||||
import * as Api from '@/http/yskApi/order.js'
|
import * as Api from '@/http/yskApi/order.js'
|
||||||
|
import {queryAllShopUser} from '@/http/yskApi/shop-user.js'
|
||||||
|
|
||||||
|
|
||||||
import LIST from '@/commons/class/list.js'
|
import LIST from '@/commons/class/list.js'
|
||||||
import {$printOrder} from '@/http/yskApi/Instead.js'
|
import {$printOrder} from '@/http/yskApi/Instead.js'
|
||||||
import filterVue from './compoents/filter.vue';
|
import filterVue from './compoents/filter.vue';
|
||||||
import orderList from './compoents/order-list.vue';
|
import orderList from './compoents/order-list.vue';
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
import {
|
import {
|
||||||
reactive, watch
|
reactive, ref, watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
const search = reactive({
|
const search = reactive({
|
||||||
@@ -47,9 +50,13 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
payType: "",
|
payType: "",
|
||||||
productName: "",
|
productName: "",
|
||||||
status: ""
|
status: "",
|
||||||
|
userId:''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
function clearQueryUser(){
|
||||||
|
order.setQuery('userId','')
|
||||||
|
}
|
||||||
function pageChange(e){
|
function pageChange(e){
|
||||||
order.setVal('page',e)
|
order.setVal('page',e)
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@@ -62,6 +69,9 @@
|
|||||||
watch(()=>order.data.query.createdAt,(newval)=>{
|
watch(()=>order.data.query.createdAt,(newval)=>{
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
watch(()=>order.data.query.userId,(newval)=>{
|
||||||
|
init()
|
||||||
|
})
|
||||||
async function init() {
|
async function init() {
|
||||||
const {content,totalElements}=await Api.tbOrderInfoData({...order.data.query,page:order.data.page})
|
const {content,totalElements}=await Api.tbOrderInfoData({...order.data.query,page:order.data.page})
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@@ -75,6 +85,21 @@
|
|||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let user=ref({
|
||||||
|
userId:''
|
||||||
|
})
|
||||||
|
const option=reactive({type:''})
|
||||||
|
onLoad((opt)=>{
|
||||||
|
Object.assign(option,opt)
|
||||||
|
if(opt&&JSON.stringify(opt)!='{}'){
|
||||||
|
order.setQuery('userId',opt.userId?opt.userId:'')
|
||||||
|
if(opt.userId){
|
||||||
|
queryAllShopUser({id:opt.userId}).then(res=>{
|
||||||
|
user.value=res.content[0]||opt
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
onShow(init)
|
onShow(init)
|
||||||
async function printOrder(item){
|
async function printOrder(item){
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
import * as Api from '@/http/yskApi/Instead.js'
|
import * as Api from '@/http/yskApi/Instead.js'
|
||||||
import * as orderApi from '@/http/yskApi/order.js'
|
import * as orderApi from '@/http/yskApi/order.js'
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
import infoBox from '@/commons/utils/infoBox.js'
|
||||||
import editDiscount from '@/pagesCreateOrder/components/edit-discount.vue'
|
import editDiscount from '@/components/my-components/edit-discount.vue'
|
||||||
|
|
||||||
let payStatus = ref(null) //loading success
|
let payStatus = ref(null) //loading success
|
||||||
|
|
||||||
@@ -247,18 +247,18 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
watch(() => pays.payTypes.selIndex, (newval) => {
|
watch(() => pays.payTypes.selIndex, (newval) => {
|
||||||
const item = pays.payTypes.list[newval]
|
// const item = pays.payTypes.list[newval]
|
||||||
if (item.payType == "vipPay") {
|
// if (item.payType == "vipPay") {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (item.payType == "deposit") {
|
// if (item.payType == "deposit") {
|
||||||
//储值卡支付
|
// //储值卡支付
|
||||||
return saomaPay('deposit')
|
// return saomaPay('deposit')
|
||||||
}
|
// }
|
||||||
if (item.payType == "scanCode") {
|
// if (item.payType == "scanCode") {
|
||||||
//扫码支付
|
// //扫码支付
|
||||||
return saomaPay('scanCode')
|
// return saomaPay('scanCode')
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
let payCodeUrl = ref('')
|
let payCodeUrl = ref('')
|
||||||
async function init() {
|
async function init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user