订单接口调取
This commit is contained in:
parent
44715933d0
commit
bdba2223a5
|
|
@ -1,12 +1,12 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @data 获取
|
* @data 获取订单列表
|
||||||
*/
|
*/
|
||||||
export function getWeekCookbookAPI(data) {
|
export function getOrderInfoListAPI(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/week/recipe/detail',
|
url: '/smart-canteen/order_info/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,14 @@
|
||||||
<u-icon name="../../static/images/pull.png" />
|
<u-icon name="../../static/images/pull.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding: 0 16px;">
|
<div style="padding: 0 16px">
|
||||||
<Tabs :tabList="tabList" @changeTab="changeTab" />
|
<Tabs :tabList="tabList" @changeTab="changeTab" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="height: 56px;"></div>
|
<div style="height: 56px"></div>
|
||||||
<div style="padding: 0 16px;">
|
<div style="padding: 0 16px">
|
||||||
<div class="order-list" v-for="(item, index) in tableList" :key="index">
|
<div class="order-list" v-for="(item, index) in tableList" :key="index">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="order-source">订单来源:{{ item.sourceType }}</div>
|
<div class="order-source">订单来源:{{ item.sourceType }}</div>
|
||||||
|
|
@ -69,14 +69,8 @@
|
||||||
<u-empty icon="../../static/images/not_order.png" text="暂无相关订单" textColor="#000" />
|
<u-empty icon="../../static/images/not_order.png" text="暂无相关订单" textColor="#000" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- 筛选部分-->
|
<!-- 筛选部分-->
|
||||||
<u-popup
|
<u-popup :show="localShow" @close="closePopup" mode="bottom" round="20">
|
||||||
:show="localShow"
|
|
||||||
@close="closePopup"
|
|
||||||
mode="bottom"
|
|
||||||
round="20"
|
|
||||||
>
|
|
||||||
<view class="filter-popup">
|
<view class="filter-popup">
|
||||||
<!-- 订单日期 -->
|
<!-- 订单日期 -->
|
||||||
<view class="section">
|
<view class="section">
|
||||||
|
|
@ -109,19 +103,9 @@
|
||||||
<!-- 订单类型 -->
|
<!-- 订单类型 -->
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<view class="section-title">订单类型</view>
|
<view class="section-title">订单类型</view>
|
||||||
<u-grid
|
<u-grid :border="false" col="3">
|
||||||
:border="false"
|
<u-grid-item v-for="(item, index) in orderTypes" :key="index" @click="selectOrderType(index)">
|
||||||
col="3"
|
<view class="order-type-item" :class="{ active: selectedOrderTypes.includes(index) }">
|
||||||
>
|
|
||||||
<u-grid-item
|
|
||||||
v-for="(item, index) in orderTypes"
|
|
||||||
:key="index"
|
|
||||||
@click="selectOrderType(index)"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="order-type-item"
|
|
||||||
:class="{ active: selectedOrderTypes.includes(index) }"
|
|
||||||
>
|
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
|
|
@ -134,11 +118,11 @@
|
||||||
text="清空"
|
text="清空"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
border: '2rpx solid #DDDDDD',
|
border: '2rpx solid #DDDDDD',
|
||||||
color: '#666666',
|
color: '#666666',
|
||||||
background: '#ffffff',
|
background: '#ffffff',
|
||||||
marginRight: '24px'
|
marginRight: '24px'
|
||||||
}"
|
}"
|
||||||
@click="clearAll"
|
@click="clearAll"
|
||||||
></u-button>
|
></u-button>
|
||||||
<u-button
|
<u-button
|
||||||
|
|
@ -146,8 +130,8 @@
|
||||||
text="确定"
|
text="确定"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
background: '#ff6633'
|
background: '#ff6633'
|
||||||
}"
|
}"
|
||||||
@click="confirm"
|
@click="confirm"
|
||||||
></u-button>
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -175,6 +159,7 @@
|
||||||
import { getOrderList } from '@/api/dining-hall'
|
import { getOrderList } from '@/api/dining-hall'
|
||||||
import Tabs from '@/pages/components/Tabs.vue'
|
import Tabs from '@/pages/components/Tabs.vue'
|
||||||
import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util'
|
import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util'
|
||||||
|
import { getOrderInfoListAPI } from '../../api/order/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Tabs },
|
components: { Tabs },
|
||||||
|
|
@ -241,7 +226,7 @@ export default {
|
||||||
],
|
],
|
||||||
localShow: this.show,
|
localShow: this.show,
|
||||||
monthNum: 12,
|
monthNum: 12,
|
||||||
minData:getDate(new Date()),
|
minData: getDate(new Date()),
|
||||||
dateOptions: [
|
dateOptions: [
|
||||||
{ label: '近1个月', value: 1 },
|
{ label: '近1个月', value: 1 },
|
||||||
{ label: '近3个月', value: 3 },
|
{ label: '近3个月', value: 3 },
|
||||||
|
|
@ -252,23 +237,13 @@ export default {
|
||||||
endDate: '',
|
endDate: '',
|
||||||
showStartCalendar: false,
|
showStartCalendar: false,
|
||||||
showEndCalendar: false,
|
showEndCalendar: false,
|
||||||
orderTypes: [
|
orderTypes: ['当餐点餐', '预订餐', '报餐', '自助餐', '商城', '设备', '收款码', '美团-到店', '美团-外卖'],
|
||||||
'当餐点餐',
|
|
||||||
'预订餐',
|
|
||||||
'报餐',
|
|
||||||
'自助餐',
|
|
||||||
'商城',
|
|
||||||
'设备',
|
|
||||||
'收款码',
|
|
||||||
'美团-到店',
|
|
||||||
'美团-外卖'
|
|
||||||
],
|
|
||||||
selectedOrderTypes: []
|
selectedOrderTypes: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
show(newVal) {
|
show(newVal) {
|
||||||
this.localShow = newVal; // 监听 prop 变化并更新本地数据属性
|
this.localShow = newVal // 监听 prop 变化并更新本地数据属性
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -335,11 +310,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
openPopup() {
|
openPopup() {
|
||||||
this.localShow = true;
|
this.localShow = true
|
||||||
},
|
},
|
||||||
|
|
||||||
closePopup() {
|
closePopup() {
|
||||||
this.localShow = false;
|
this.localShow = false
|
||||||
},
|
},
|
||||||
selectDateOption(index) {
|
selectDateOption(index) {
|
||||||
this.currentDateOption = index
|
this.currentDateOption = index
|
||||||
|
|
@ -404,7 +379,16 @@ export default {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/work/details?params=${JSON.stringify(item)}`
|
url: `/pages/work/details?params=${JSON.stringify(item)}`
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取订单
|
||||||
|
async getOrderInfoListData() {
|
||||||
|
const res = await getOrderInfoListAPI()
|
||||||
|
console.log(res, '获取订单信息')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getOrderInfoListData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue