Quellcode durchsuchen

feat: 订单bug

2912631854@qq.com vor 1 Jahr
Ursprung
Commit
1f39d7933c

+ 2 - 2
http/baseApi.js

@@ -1,11 +1,11 @@
 // const BaseApi = 'http://192.168.2.190:8080' //汪瑶
 // const BaseApi = 'http://192.168.2.205:8080' //汪辉
-// const BaseApi = 'http://192.168.2.19:8080' //李勇
+const BaseApi = 'http://192.168.2.19:8080' //李勇
 // const BaseApi = 'http://192.168.3.13:8080' //徐涛
 // const BaseApi = 'http://192.168.2.39:8080' //肖添伟
 // const BaseApi = 'http://192.168.3.6:8080' //朱壮波
 
-const BaseApi = 'https://i.ringzle.com/island-cloud-server' //测试服务器
+// const BaseApi = 'https://i.ringzle.com/island-cloud-server' //测试服务器
 
 export {
 	BaseApi

+ 20 - 13
pages/home/index.vue

@@ -105,8 +105,8 @@
 			</view>
 		</block>
 		<Tabbar :tabbarIndex="0"></Tabbar>
-		<u-picker :show="shShow" :columns="nameList" @close="shShow=false" @cancel="shShow=false"
-			@confirm="confirm" :immediateChange="true" itemHeight="88"></u-picker>
+		<u-picker :show="shShow" :columns="nameList" @close="shShow=false" @cancel="shShow=false" @confirm="confirm"
+			:immediateChange="true" itemHeight="88"></u-picker>
 		<!-- 取消订单 -->
 		<u-modal :show="show" @confirm="confirmCheck" :show-cancel-button="true" @cancel="show=false">
 			<view class="slot-content">
@@ -179,17 +179,19 @@
 						this.shList.forEach(d => shs.push(d.merchantName));
 						this.nameList = [shs];
 						let id = uni.getStorageSync('homestayId');
-						if(!uni.getStorageSync('homestayId')) id = uni.getStorageSync('merchantId');
+						if (!uni.getStorageSync('homestayId')) id = uni.getStorageSync('merchantId');
 						let t = this.shList.find(d => d.merchantId == id);
 						this.name = t ? t.merchantName : ''
 					} else this.$showToast(res.data.msg);
 				})
 			},
 			confirm(e) {
+				console.log(e);
 				this.name = e.value[0];
 				this.shShow = false;
-				
+
 				let t = this.shList.find(d => d.merchantName == this.name);
+				console.log('000', t);
 				if (t) {
 					if (t.merchantType == 2) { //酒店民宿
 						uni.setStorageSync('homestayId', t.merchantId);
@@ -204,23 +206,28 @@
 						this.list = [];
 						uni.setStorageSync('homestayId', '');
 						uni.setStorageSync('merchantId', t.merchantId);
+						uni.navigateTo({
+							url: '/pagesHouse/home/index'
+						})
 					}
 				}
+
 			},
 			getDetails() {
-				this.$api.get('/merchant/hotel/home/getHotelHomeInfo/' + (uni.getStorageSync('homestayId')||0)).then(res => {
-					if (res.data.code === 0) {
-						this.item = res.data.data;
-					} else this.$showToast(res.data.msg);
-				})
+				this.$api.get('/merchant/hotel/home/getHotelHomeInfo/' + (uni.getStorageSync('homestayId') || 0)).then(
+					res => {
+						if (res.data.code === 0) {
+							this.item = res.data.data;
+						} else this.$showToast(res.data.msg);
+					})
 			},
 			getList() {
 				this.$api.get('/merchant/hotel/order/getMerchantOrderPageList', {
-					homestayId: (uni.getStorageSync('homestayId')||0),
+					homestayId: (uni.getStorageSync('homestayId') || 0),
 					limit: this.limit,
 					page: this.page,
 					orderStatus: '',
-					orderTime:new Date().Format('yyyy-MM-dd')
+					orderTime: new Date().Format('yyyy-MM-dd')
 				}).then(res => {
 					if (res.data.code === 0) {
 						this.list = [...this.list, ...res.data.data.list];
@@ -250,9 +257,9 @@
 					url: '/pages/home/condition'
 				})
 			},
-			toConfirm(){
+			toConfirm() {
 				uni.navigateTo({
-					url:'/pagesMy/orderList/orderList?Type=0'
+					url: '/pagesMy/orderList/orderList?Type=0'
 				})
 			},
 			cancle(item) {

+ 38 - 12
pagesHouse/Mine/Businesses/Businesses.vue

@@ -21,8 +21,10 @@
 				</view>
 				<view class="">
 					渔家乐
-					<!-- <u-icon name="arrow-right"></u-icon> -->
 				</view>
+				<!-- 	<view class="right">
+					<input type="text" v-model="list.phone" border="none" placeholder="请输入" style="height: 48rpx;" />
+				</view> -->
 			</view>
 			<view class="one-mobile">
 				<view class="mobile">
@@ -33,13 +35,13 @@
 				</view>
 			</view>
 
-			<view class="one" @click="nav">
+			<view class="one">
 				<view class="">
 					企业类型
 				</view>
-				<view class="">
-					<!-- <u-icon name="arrow-right"></u-icon> -->
-					渔家乐
+				<view class="right">
+					<input type="text" v-model="companyType" border="none" placeholder="请输入"
+						style="height: 48rpx; text-align: right;" />
 				</view>
 			</view>
 
@@ -47,8 +49,10 @@
 				<view class="mobile">
 					企业法人
 				</view>
+
 				<view class="right">
-					{{list.legalPerson}}
+					<input type="text" v-model="list.legalPerson" border="none" placeholder="请输入"
+						style="height: 48rpx;" />
 				</view>
 			</view>
 
@@ -56,8 +60,9 @@
 				<view class="mobile">
 					法人身份证号码
 				</view>
+
 				<view class="right">
-					{{list.idCard}}
+					<input type="text" v-model="list.idCard" border="none" placeholder="请输入" style="height: 48rpx;" />
 				</view>
 			</view>
 
@@ -65,8 +70,10 @@
 				<view class="mobile" style="width: 350rpx;">
 					统一社区信用代码
 				</view>
+
 				<view class="right">
-					{{list.creditCode}}
+					<input type="text" v-model="list.creditCode" border="none" placeholder="请输入"
+						style="height: 48rpx;" />
 				</view>
 			</view>
 
@@ -75,7 +82,8 @@
 					企业地址
 				</view>
 				<view class="right">
-					{{list.areaDetail}}
+					<input type="text" v-model="list.areaDetail" border="none" placeholder="请输入"
+						style="height: 48rpx;" />
 				</view>
 			</view>
 
@@ -89,8 +97,9 @@
 				<view class="mobile">
 					联系人姓名
 				</view>
+
 				<view class="right">
-					{{list.linkName}}
+					<input type="text" v-model="list.linkName" border="none" placeholder="请输入" style="height: 48rpx;" />
 				</view>
 			</view>
 
@@ -98,8 +107,9 @@
 				<view class="mobile">
 					联系人号码
 				</view>
+
 				<view class="right">
-					{{list.phone}}
+					<input type="text" v-model="list.phone" border="none" placeholder="请输入" style="height: 48rpx;" />
 				</view>
 			</view>
 		</view>
@@ -214,14 +224,18 @@
 					shopSign: '', //门头照
 					shopImgs: '', //店铺照片
 					id: ''
-				}
+				},
+				typeList: {},
+				companyType: ''
 			}
 		},
 		onLoad() {
 			this.getList()
+			this.getDict()
 		},
 
 		methods: {
+			// 获取数据 
 			getList() {
 				// this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
 				// 	console.log(res.data);
@@ -232,6 +246,18 @@
 					this.list = res.data.data
 				})
 			},
+			// 获取企业类型字典
+			getDict() {
+				this.$api.get('/sys/dict/type/all').then(res => {
+					console.log(res.data)
+					//this.$store.state.Dict = Object.assign(res.data);
+					// this.dictValue
+					this.typeList = res.data.data.find((p) => p.dictType == 'CompanyType').dataList;
+					console.log(this.typeList);
+					this.companyType = this.typeList.find((p) => p.dictValue == this.list.companyType).dictLabel
+					console.log(this.companyType);
+				})
+			},
 			// 立即保存
 			merchant() {
 				this.dto.name = this.list.name

+ 3 - 1
pagesHouse/Mine/ordersList/details/details.vue

@@ -31,7 +31,7 @@
 				</view>
 				<view class="ticketInfo-hander">
 					<view class="image">
-						<image :src="list.pic" mode="aspectFill"></image>
+						<image :src="list.picList[0]" mode="aspectFill"></image>
 					</view>
 					<view class="" style="width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;">
 						<view class="name" style="display: flex; justify-content: space-between;">
@@ -132,6 +132,7 @@
 		},
 		onLoad() {
 			this.list = uni.getStorageSync('list')
+			console.log(this.list);
 			// console.log(JSON.parse(option.list));
 			// this.list = JSON.parse(option.list)
 			// console.log('-----', this.list);
@@ -303,6 +304,7 @@
 				margin-right: 20rpx;
 
 				image {
+					border-radius: 12rpx;
 					width: 100%;
 					height: 100%;
 				}

+ 1 - 2
pagesHouse/Mine/ordersList/index.vue

@@ -20,11 +20,10 @@
 					<text v-else-if='item.state==-3' class="green">已退款</text>
 					<text v-else-if='item.state==4' class="red">待使用</text>
 					<text v-else-if='item.state==5' class="green">已预约</text>
-
 					<text v-else :class="statusClass[item.state]">{{status[item.state]}}</text>
 				</view>
 				<view class="mainContent" @click="navTo(item)">
-					<image class="image" :src="item.pic" mode="aspectFill"></image>
+					<image class="image" :src="item.picList[0]" mode="aspectFill"></image>
 					<view class="middle">
 						<view class="title" style="display: flex; justify-content: space-between;">
 							<span> {{item.thingName}}</span>

+ 1 - 1
pagesHouse/Verification/details.vue

@@ -31,7 +31,7 @@
 				</view>
 				<view class="ticketInfo-hander">
 					<view class="image">
-						<image :src="list.pic" mode="aspectFill"></image>
+						<image :src="list.picList[0]" mode="aspectFill"></image>
 					</view>
 					<view class="" style="width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;">
 						<view class="name" style="display: flex; justify-content: space-between;">

+ 65 - 17
pagesHouse/home/index.vue

@@ -1,8 +1,10 @@
 <template>
+
 	<view class="page" :style="{'min-height':(h-th)+'px'}">
 		<u-navbar bgColor="transparent">
-			<view class="u-nav-slot" slot="left">
-				<text>{{merchantName}}</text>
+			<view class="u-nav-slot" slot="left" style="display: flex;" @tap="shShow=true">
+				<text>{{name}}</text>
+				<u-icon name="arrow-down" size="28" :bold="true" color="#fff"></u-icon>
 			</view>
 		</u-navbar>
 		<view class="bg" :style="{'padding-top':(mt+10)+'px'}">
@@ -91,6 +93,8 @@
 				<text>¥{{item.price}}</text>
 			</view>
 		</view>
+		<u-picker :show="shShow" :columns="nameList" @close="shShow=false" @cancel="shShow=false" @confirm="confirm"
+			:immediateChange="true" itemHeight="88"></u-picker>
 		<Tabbares :tabbarid="0"></Tabbares>
 	</view>
 </template>
@@ -99,41 +103,85 @@
 	export default {
 		data() {
 			return {
-				merchantName:uni.getStorageSync('merchantName'),
+				merchantName: uni.getStorageSync('merchantName'),
 				emg: 'https://i.ringzle.com/file/20240224/91173dde1cb44b139129e12ad4971f1d.png',
 				icons: ['https://i.ringzle.com/file/20240224/70ab9f9d1a144c95927dedc6e84bcce7.png',
 					'https://i.ringzle.com/file/20240224/3f990c250f444ac9a5d9f334f322c98e.png',
 					'https://i.ringzle.com/file/20240224/7ca1bfa6e348438e83edc5af0589f847.png'
 				],
-				info:{},
-				list:[],
+				info: {},
+				list: [],
+				nameList: [],
+				shShow: false,
+				shList: [],
+				name: ''
 			}
 		},
-		onLoad(opt){
+		onLoad(opt) {
 			// if(opt.merchantName ){
 			// 	this.merchantName =opt.merchantName ;
 			// }
 			this.getData();
 			this.getList();
+			this.getType()
 		},
 		methods: {
+			getType() {
+				this.$api.post('/merchant/register/getMerchantStoreList').then(res => {
+					if (res.data.code === 0) {
+						this.shList = res.data.data;
+						let shs = [];
+						this.shList.forEach(d => shs.push(d.merchantName));
+						this.nameList = [shs];
+						let id = uni.getStorageSync('homestayId');
+						if (!uni.getStorageSync('homestayId')) id = uni.getStorageSync('merchantId');
+						let t = this.shList.find(d => d.merchantId == id);
+						this.name = t ? t.merchantName : ''
+					} else this.$showToast(res.data.msg);
+				})
+			},
+			confirm(e) {
+				console.log(e);
+				this.name = e.value[0];
+				this.shShow = false;
+
+				let t = this.shList.find(d => d.merchantName == this.name);
+				console.log('000', t);
+				if (t) {
+					if (t.merchantType != 2) { //酒店民宿
+						uni.setStorageSync('homestayId', t.merchantId);
+						uni.setStorageSync('merchantId', '');
+						this.list = [];
+					} else {
+						this.item = null;
+						this.list = [];
+						uni.setStorageSync('homestayId', '');
+						uni.setStorageSync('merchantId', t.merchantId);
+						uni.navigateTo({
+							url: '/pages/home/index'
+						})
+					}
+				}
+
+			},
 			getData() {
-				this.$api.get('/merchant/merchantFisherman/home/getMerchantFishermanAppHome/'+ uni.getStorageSync('merchantId')).then(res => {
+				this.$api.get('/merchant/merchantFisherman/home/getMerchantFishermanAppHome/' + uni.getStorageSync(
+					'merchantId')).then(res => {
 					if (res.data.code === 0) {
 						this.info = res.data.data;
-					} 
+					}
 				})
 			},
-			getList(){
-				this.$api.post('/merchant/merchantFisherman/home/getMerchantFishermanOrderList',{
-					dateTime:new Date().Format('yyyy-MM-dd'),
-					dateType:'1',
-					fishermanId:uni.getStorageSync('merchantId')
-					
+			getList() {
+				this.$api.post('/merchant/merchantFisherman/home/getMerchantFishermanOrderList', {
+					dateTime: new Date().Format('yyyy-MM-dd'),
+					dateType: '1',
+					fishermanId: uni.getStorageSync('merchantId')
+
 				}).then(res => {
 					if (res.data.code === 0) {
 						this.list = res.data.data;
-					} 
+					}
 				})
 			},
 			toHref(url) {
@@ -155,8 +203,8 @@
 		background: #F3F4F4;
 		padding-bottom: 40rpx;
 		box-sizing: border-box;
-		width:100%;
-		overflow-x:hidden;
+		width: 100%;
+		overflow-x: hidden;
 
 		.list {
 			width: calc(100% - 36rpx);