123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view>
- <view class="view">
- <view v-if="type === 0" class="listItemStyle" @click="toJDPage">
- <u-text text="查看订单进度" color="rgb(0, 170, 255)" size="20"></u-text>
- </view>
- <u-list @scrolltolower="scrolltolower">
- <view v-if="dataList.length === 0" style="padding: 0 50px;">
- <image style="margin: 0 auto; width: 100%;" src="../../../static/img/page/empty_view.png"></image>
- </view>
- <u-list-item v-for="(item, index) in dataList" :key="index">
- <view v-if="item.amount !== 0 && item.amount" class="listItemStyle">
- <u-row>
- <u-col span="3">
- <u--image :showLoading="true" shape="circle" :src="baseURL+item.cuisinePictrue"
- width="70px" height="70px" style="margin: 10px;"></u--image>
- </u-col>
- <u-col span="7" style="margin-left: 5px;">
- <view>
- <u--text :text="item.cuisineName" size="20"></u--text>
- </view>
- <view style="margin-top: 10px;">
- <u--text :text="'¥'+item.price" size="20"></u--text>
- </view>
- </u-col>
- <u-col span="2">
- <view>
- <u--text :text="item.amount+'份'" size="25"></u--text>
- </view>
- </u-col>
- </u-row>
- </view>
- </u-list-item>
- </u-list>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- baseURL: this.$BASE_URL,
- priceSum: 0.0,
- dateShow: false,
- data: {
- organizationName: "",
- },
- from: {
- orderNumber: '',
- organizationCode: ''
- },
- dataList: [],
- dataListNow: [],
- type: uni.getStorageSync("tabType")
- }
- },
- onLoad() {
- this.submitOrder()
- },
- methods: {
- toJDPage() {
- this.$goto('../../../pageA/card/orderProcess')
- },
- async submitOrder() {
- var order = uni.getStorageSync('order')
- this.from.orderNumber = order.orderNumber
- this.from.organizationCode = order.jgid
- let urlType = 1
- if (uni.getStorageSync('orgInfo').organizationCode == 'G00000003') {
- urlType = 2;
- }
- // 发送请求
- const {
- data: res
- } = await this.$httpRequest({
- url: '/app/getOrderDetail',
- method: 'post',
- data: this.from,
- urlType: this.$getUrlType()
- });
- if (res.code === 200) {
- this.dataList = res.rows
- }
- },
- loadmore(data) {
- for (var i = 0; i < data.length; i++) {
- this.dataList.push(data[i])
- }
- },
- result(time, mode) {
- const timeFormat = uni.$u.timeFormat
- switch (mode) {
- case 'datetime':
- return timeFormat(time, 'yyyy-mm-dd hh:MM')
- case 'date':
- return timeFormat(time, 'yyyy-mm-dd')
- case 'year-month':
- return timeFormat(time, 'yyyy-mm')
- case 'time':
- return time
- default:
- return ''
- }
- }
- }
- }
- </script>
- <style>
- .view {
- background-color: #ebebeb;
- padding-top: 10px;
- }
- .listTermDate {
- padding: 10px 0;
- }
- .listItemStyle {
- margin: 5px 12px;
- padding: 10px;
- border-radius: 15px;
- background-color: #fafafa;
- }
- </style>
|