|
@@ -1,19 +1,26 @@
|
|
<template>
|
|
<template>
|
|
- <view class="mt20px">
|
|
|
|
- <view class="contain">
|
|
|
|
- <view class="box" :class="{ 'boxed-border': showBorder }">
|
|
|
|
- <view class="container">
|
|
|
|
|
|
+ <view>
|
|
|
|
+ <view class="btnS">
|
|
|
|
+ <view style="width: 90%;">
|
|
|
|
+ <u-search :clearabled="true" shape="round" :showAction="false" v-model="seaName"></u-search>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="contain" style="margin: 10px 0;" v-for="(item, index) in tableData" :key="index">
|
|
|
|
+ <view class="box" :class="{ 'boxed-border': item.isAsc }" >
|
|
|
|
+ <view class="container" @click="carList">
|
|
<view class="text-container">
|
|
<view class="text-container">
|
|
- <view class="flex-item">{{dingName}}</view>
|
|
|
|
- <u-tag plain :text="tags ? '营业中' : '离线'" :type="tags ? 'success' : 'error'" size="mini"></u-tag>
|
|
|
|
- </view>
|
|
|
|
- <view class="icon-container">
|
|
|
|
- <u-icon name="plus-circle" size="24" @click="call"></u-icon>
|
|
|
|
- <u-icon style="margin-left: 10px;" name="info-circle" size="24" @click="btnIC"></u-icon>
|
|
|
|
|
|
+ <view class="flex-item">{{item.name}}</view>
|
|
|
|
+ <u-tag plain :text="item.openState ? '营业中' : '离线'" :type="item.openState ? 'success' : 'error'" size="mini"></u-tag>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view :class="{ 'btnbor': showBorder }" v-if="showBorder">
|
|
|
|
- <u-tag text="镂空" bgColor='#FF6D20' borderColor='#FF6D20' icon="map"></u-tag>
|
|
|
|
|
|
+ <view class="icon-container">
|
|
|
|
+ <u-icon name="phone" size="28" @click.stop="call"></u-icon>
|
|
|
|
+ <u-icon style="margin-left: 10px;" name="info-circle" size="28" @click.stop="btnIC(item)"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <view :class="{ 'btnbor': item.isAsc }" v-if="item.isAsc">
|
|
|
|
+ <!-- <u-tag text="当前" bgColor='#FF6D20' borderColor='#FF6D20' icon="checkmark-circle"></u-tag> -->
|
|
|
|
+ <image src="../../static/danqian.png" class="img-ding"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -24,18 +31,44 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- tags: 1,
|
|
|
|
- showBorder: false,
|
|
|
|
- dingName: '23333',
|
|
|
|
|
|
+ seaName:'',
|
|
orderinfo: {},
|
|
orderinfo: {},
|
|
- tableData: []
|
|
|
|
|
|
+ tableData: [
|
|
|
|
+ {
|
|
|
|
+ dingName: '23333',
|
|
|
|
+ tags: 1,
|
|
|
|
+ showBorder: true,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ dingName: '门店',
|
|
|
|
+ tags: 1,
|
|
|
|
+ showBorder: false,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ dingName: '店家',
|
|
|
|
+ tags: 1,
|
|
|
|
+ showBorder: false,
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ page: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+ total: 0,
|
|
|
|
+ totalPage: 0
|
|
|
|
+ },
|
|
|
|
+ status: 'loading'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.fatchDate()
|
|
this.fatchDate()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- call() {
|
|
|
|
|
|
+ searchClick() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ async call() {
|
|
|
|
+ const response = await this.$request('get', '/sale/customer/queryCustomer', this.tableData.customerId);
|
|
|
|
+
|
|
if (this.orderinfo.shopCall) {
|
|
if (this.orderinfo.shopCall) {
|
|
uni.makePhoneCall({
|
|
uni.makePhoneCall({
|
|
phoneNumber: this.orderinfo.shopCall
|
|
phoneNumber: this.orderinfo.shopCall
|
|
@@ -47,18 +80,46 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- btnIC() {
|
|
|
|
|
|
+ btnIC(e) {
|
|
|
|
+ console.log('e=================', e)
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/pages/diningCar/diningCar`
|
|
|
|
|
|
+ url: `/pages/diningCar/diningCar?id=${e.id}`
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- fatchDate() {
|
|
|
|
- //const result = await this.$request('get', '/diningCar/{id}')
|
|
|
|
- const result = this.$request('get', '/diningCar/queryDiningCar')
|
|
|
|
- if (result) {
|
|
|
|
- console.log('result', result.data)
|
|
|
|
- this.tableData = result.data
|
|
|
|
|
|
+ carList() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/classify/classify`
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async fatchDate() {
|
|
|
|
+ var queryParams = {
|
|
|
|
+ "pageSize": this.page.pageSize,
|
|
|
|
+ "pageNum": this.page.pageNum
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ const response = await this.$request('get', '/sale/diningCar/queryDiningCar', queryParams);
|
|
|
|
+ console.log('response', response)
|
|
|
|
+
|
|
|
|
+ const data = response.rows; // 假设 res.rows 是一个数组
|
|
|
|
+ console.log('response.rows', response.rows);
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
+ const li = data;
|
|
|
|
+ if (this.page.pageNum === 1) {
|
|
|
|
+ this.tableData = li;
|
|
|
|
+ } else {
|
|
|
|
+ this.tableData = this.tableData.concat(li);
|
|
|
|
+ }
|
|
|
|
+ this.page.total = data.count;
|
|
|
|
+ this.page.totalPage = Math.ceil(data.count / this.page.pageSize);
|
|
|
|
+ this.status = this.page.totalPage === 0 || this.page.totalPage === this.page.pageNum ?
|
|
|
|
+ 'noMore' : 'more';
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast(data.msg);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error('请求异常', err);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -76,7 +137,27 @@
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
+ .btnbor {
|
|
|
|
+ margin: -32rpx -20rpx 0;
|
|
|
|
+ // margin-right: -11px;
|
|
|
|
+ // margin-top: -15px;
|
|
|
|
+ float: right;
|
|
|
|
+ position: relative; // 设置为相对定位
|
|
|
|
|
|
|
|
+ &::after {
|
|
|
|
+ content: '';
|
|
|
|
+ display: block;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ border: 1px solid #FF6D20;
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ z-index: -1; // 使边框在图片下面
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.boxed-border {
|
|
.boxed-border {
|
|
@@ -86,11 +167,11 @@
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
/* 添加圆角 */
|
|
/* 添加圆角 */
|
|
|
|
|
|
- .btnbor {
|
|
|
|
- margin-right: -11px;
|
|
|
|
- margin-top: -3px;
|
|
|
|
- float: right;
|
|
|
|
- }
|
|
|
|
|
|
+ // .btnbor {
|
|
|
|
+ // margin-right: -11px;
|
|
|
|
+ // margin-top: -15px;
|
|
|
|
+ // float: right;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
.box:hover {
|
|
.box:hover {
|
|
@@ -118,7 +199,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.flex-item {
|
|
.flex-item {
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
+ margin-bottom: 10px;
|
|
}
|
|
}
|
|
|
|
|
|
.tag-item {
|
|
.tag-item {
|
|
@@ -133,7 +214,25 @@
|
|
/* 水平排列子元素 */
|
|
/* 水平排列子元素 */
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
/* 子元素右对齐 */
|
|
/* 子元素右对齐 */
|
|
- margin-top: -30px;
|
|
|
|
- gap: 10px; /* 设置图标之间的距离 */
|
|
|
|
|
|
+ margin-top: -55px;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ gap: 10px;
|
|
|
|
+ /* 设置图标之间的距离 */
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .img-ding {
|
|
|
|
+ width: 83px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ top: 0;
|
|
|
|
+ margin: 0; // 清除 margin 属性,以避免与边框重叠
|
|
|
|
+ }
|
|
|
|
+ .btnS {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-top: 5px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|