zhanghui 2 лет назад
Родитель
Сommit
233c560f2d

+ 11 - 0
common/js/api.js

@@ -4,6 +4,17 @@ import request from '../js/request.js';
 export default {
 
 
+	// get请求 通过会员编号获取老系统充值记录
+	category(data) {
+		return request({
+			url: '/business/wechat/sp/category/'+data.storeId,
+			method: 'GET',
+			data: data
+		})
+	},
+
+
+
 	// get请求 通过会员编号获取老系统充值记录
 	getOrderRechargeOldList(data) {
 		return request({

+ 2 - 2
common/js/env.js

@@ -4,8 +4,8 @@ export default { //存放变量的容器
 
 	appid: '__UNI__1EEA945',
 	// baseUrl: 'https://recruit.gzzzyd.com/api'
-	// baseUrl: 'http://127.0.0.1:8888',
-	baseUrl: 'https://jje.admin.xinyuekj.com.cn',
+	baseUrl: 'http://192.168.1.192:8080',
+	// baseUrl: 'https://jje.admin.xinyuekj.com.cn',
 
 	uploadUrl: '/v1/file/put-file'
 

+ 15 - 15
components/tabBar/tabBar.vue

@@ -11,21 +11,21 @@
 					</view>
 				</view>
 
-				<view class="item  flex-col justify-center" @click="goPages(1)">
-					<view class="imageView flex-row justify-center">
-						<image class="image" :src="tabIndex===1? '/static/tabBar/shop_cur.png':'/static/tabBar/shop.png'"></image>
-					</view>
-					<view class=" flex-row justify-center" :class="tabIndex ===1?'title':'title1'">
-						<text>点单</text>
-					</view>
-				</view>
-
-				<view class="item  flex-col justify-center" @click="goPages(2)">
-					<view class="qrcodeView flex-row justify-center">
-						<image class="qrcode" src="/static/tabBar/qrcode.png"></image>
-					</view>
-
-				</view>
+<!--				<view class="item  flex-col justify-center" @click="goPages(1)">-->
+<!--					<view class="imageView flex-row justify-center">-->
+<!--						<image class="image" :src="tabIndex===1? '/static/tabBar/shop_cur.png':'/static/tabBar/shop.png'"></image>-->
+<!--					</view>-->
+<!--					<view class=" flex-row justify-center" :class="tabIndex ===1?'title':'title1'">-->
+<!--						<text>点单</text>-->
+<!--					</view>-->
+<!--				</view>-->
+
+<!--				<view class="item  flex-col justify-center" @click="goPages(2)">-->
+<!--					<view class="qrcodeView flex-row justify-center">-->
+<!--						<image class="qrcode" src="/static/tabBar/qrcode.png"></image>-->
+<!--					</view>-->
+
+<!--				</view>-->
 
 
 				<view class="item  flex-col justify-center" @click="goPages(3)">

+ 13 - 11
orderPages/serviceObject/index.vue

@@ -27,7 +27,6 @@
 </template>
 
 <script>
-    // import {listServiceObject} from '/src/api/object/service-object.js';
     export default {
         data() {
             return {
@@ -41,11 +40,13 @@
             // 查询服务对象列表
             this.listServiceObject();
         },
+
         methods: {
             // 查询服务对接信息列表
             listServiceObject(){
-                this.$api.listServiceObject(null,{data:this.reqParm}).then((res)=>{
-                    this.getImgUrlByOssId(res);
+                this.$api.listServiceObject(this.reqParm).then((res)=>{
+                    console.log('++++++++++listServiceObject+++++++++++',res)
+                    this.getImgUrlByOssId(res.data.data);
                 }).catch(() =>{
                     uni.showToast({
                         title: "操作失败"
@@ -53,27 +54,28 @@
                 });
             },
             // 获取图片
-            async getImgUrlByOssId(data){
+             getImgUrlByOssId(data){
                 for (let i = 0; i < data.length; i++) {
                     const item = data[i];
-                    let url = await this.$getImgUrlByOssId(item.facePhoto);
-                    item.imgUrl = url;
+                    if (item.facePhoto){
+                        this.$api.getImgUrlByOssId({ossId:item.facePhoto}).then(res=>{
+                            console.log('+++++++++++++getImgUrlByOssId+++++++++++++++',res)
+                        })
+                    }
                 }
                 this.serviceObjectList = data
-                return data;
             },
+
             // 选择服务老师
             chooseServiceObject(item){
-                // 选择完成后返回上一页
                 uni.navigateBack({
                     delta: 1,
                     success: function(res) {
-                        // 在这里可以处理选择结果
-                        // 可以将选择的内容保存到本地或通过事件传递给上一个页面
-                        uni.$emit('selectedServiceObjectChild', item);
+                        uni.$emit('selectedServiceObject', item);
                     }
                 });
             }
+
         },
     };
 </script>

+ 141 - 135
orderPages/serviceTeacher/index.vue

@@ -1,147 +1,153 @@
 <template>
-    <view class="">
-        <view v-for="(item,index) in workPersonList" @click="chooseServiceTeacher(item)" class="h-item-row">
-            <view class="h-img">
-                <image src="../../static/logo.png" mode=""></image>
-            </view>
-            <view class="h-item-content">
-                <view class="h-title">
-                    <view class="name">
-                        <text>{{item.title}}</text>
-                    </view>
-                    <!-- <view class="btn">
+	<view class="">
+		<view v-for="(item,index) in workPersonList" @click="chooseServiceTeacher(item)" class="h-item-row">
+			<view class="h-img">
+				<image src="../../static/logo.png" mode=""></image>
+			</view>
+			<view class="h-item-content">
+				<view class="h-title">
+					<view class="name">
+						<text>{{item.title}}</text>
+					</view>
+					<!-- <view class="btn">
                         <text>包房</text>
                     </view> -->
-                </view>
-                <view class="h-desc">
-                    <text>优质服务,从我做起</text>
-                </view>
-                <view class="h-content">
-                    <u-icon name="thumb-up" color="#333" size="16"></u-icon>
-                    <view class="h-text">
-                        <text>好评率:</text>
-                    </view>
-                    <view class="h-text1">
-                        <text>{{item.goodRate}}%</text>
-                    </view>
-                </view>
-            </view>
-        </view>
-    </view>
+				</view>
+				<view class="h-desc">
+					<text>优质服务,从我做起</text>
+				</view>
+				<view class="h-content">
+					<u-icon name="thumb-up" color="#333" size="16"></u-icon>
+					<view class="h-text">
+						<text>好评率:</text>
+					</view>
+					<view class="h-text1">
+						<text>{{item.goodRate}}%</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-    // import {serviceWorkPersonList} from '/src/api/goods/goods.js';
-    export default {
-        data() {
-            return {
-                reqParm:{
-                    auth: true,
-                    schedulingDate: null,
-                    periodId: null,
-                    organization: null,  // 所属门店
-                },
-                workPersonList: []
-            }
-        },
-        onLoad(option){
+	export default {
+		data() {
+			return {
+				reqParm: {
+					auth: true,
+					schedulingDate: null,
+					periodId: null,
+					organization: null, // 所属门店
+				},
+				workPersonList: []
+			}
+		},
+		onLoad(option) {
 
-            this.reqParm.schedulingDate = option.schedulingDate;
-            this.reqParm.periodId= option.periodId;
-            this.reqParm.organization= option.organization;
+			this.reqParm.schedulingDate = option.schedulingDate;
+			this.reqParm.periodId = option.periodId;
+			this.reqParm.organization = option.organization;
 
-            // 查询服务工作人员列表
-            this.serviceWorkPersonList();
-        },
-        methods: {
-            // 查询服务工作人员列表
-            serviceWorkPersonList(){
-                this.$api.serviceWorkPersonList({data:this.reqParm}).then((res)=>{
-                    this.workPersonList = res.rows;
-                }).catch(() =>{
-                    uni.showToast({
-                        title: "操作失败"
-                    })
-                });
-            },
-            // 获取图片
-            async getImgUrlByOssId(data){
-                for (let i = 0; i < data.length; i++) {
-                    const item = data[i];
-                    let url = await this.$getImgUrlByOssId(item.facePhoto);
-                    item.imgUrl = url;
-                }
-                this.serviceObjectList = data
-                return data;
-            },
-            // 选择服务老师
-            chooseServiceTeacher(item){
-                // 选择完成后返回上一页
-                uni.navigateBack({
-                    delta: 1,
-                    success: function(res) {
-                        // 在这里可以处理选择结果
-                        // 可以将选择的内容保存到本地或通过事件传递给上一个页面
-                        uni.$emit('selectedDataFromChild', item);
-                    }
-                });
-            }
-        },
-    };
+			// 查询服务工作人员列表
+			this.serviceWorkPersonList();
+		},
+		methods: {
+			// 查询服务工作人员列表
+			serviceWorkPersonList() {
+				serviceWorkPersonList({
+					data: this.reqParm
+				}).then((res) => {
+					this.workPersonList = res.rows;
+				}).catch(() => {
+					uni.showToast({
+						title: "操作失败"
+					})
+				});
+			},
+			// 获取图片
+			async getImgUrlByOssId(data) {
+				for (let i = 0; i < data.length; i++) {
+					const item = data[i];
+					let url = await this.$getImgUrlByOssId(item.facePhoto);
+					item.imgUrl = url;
+				}
+				this.serviceObjectList = data
+				return data;
+			},
+			// 选择服务老师
+			chooseServiceTeacher(item) {
+				// 选择完成后返回上一页
+				uni.navigateBack({
+					delta: 1,
+				});
+				uni.$emit('selectedDataFromChild', item);
+			}
+		},
+	};
 </script>
 
 <style scoped lang="scss">
-    .h-item-row{
-        display: flex;
-        font-family: PingFangSC-Medium, PingFang SC;
-        margin: 12px;
-        background: #fff;
-        padding: 12px;
-        .h-img{
-            margin-right: 8px;
-            image{
-                height: 80px;
-                width: 80px;
-            }
-        }
-        .h-item-content{
-            .h-title{
-                font-size: 16px;
-                font-weight: 500;
-                line-height: 30px;
-                display: flex;
-                .name{
-                    padding-right: 6px;
-                    color: #111111;
-                }
-                .btn text{
-                    background: #fff5d0;
-                    color: #333333;
-                    font-size: 12px;
-                    border: 1px solid #FFE05C;
-                    padding-left: 10px;
-                    padding-right: 10px;
-                }
-            }
-            .h-desc{
-                font-size: 12px;
-                font-weight: 400;
-                color: #999999;
-                line-height: 25px;
-            }
-            .h-content{
-                display: flex;
-                align-items: center;
-                font-size: 12px;
-                font-weight: 400;
-                line-height: 25px;
-                .h-text{
-                    color: #999999;
-                }
-                .h-text1{
-                    color: #ED569F;
-                }
-            }
-        }
-    }
+	.h-item-row {
+		display: flex;
+		font-family: PingFangSC-Medium, PingFang SC;
+		margin: 12px;
+		background: #fff;
+		padding: 12px;
+
+		.h-img {
+			margin-right: 8px;
+
+			image {
+				height: 80px;
+				width: 80px;
+			}
+		}
+
+		.h-item-content {
+			.h-title {
+				font-size: 16px;
+				font-weight: 500;
+				line-height: 30px;
+				display: flex;
+
+				.name {
+					padding-right: 6px;
+					color: #111111;
+				}
+
+				.btn text {
+					background: #fff5d0;
+					color: #333333;
+					font-size: 12px;
+					border: 1px solid #FFE05C;
+					padding-left: 10px;
+					padding-right: 10px;
+				}
+			}
+
+			.h-desc {
+				font-size: 12px;
+				font-weight: 400;
+				color: #999999;
+				line-height: 25px;
+			}
+
+			.h-content {
+				display: flex;
+				align-items: center;
+				font-size: 12px;
+				font-weight: 400;
+				line-height: 25px;
+
+				.h-text {
+					color: #999999;
+				}
+
+				.h-text1 {
+					color: #ED569F;
+				}
+			}
+		}
+	}
 </style>

+ 64 - 7
orderPages/storeService/index.vue

@@ -2,10 +2,10 @@
     <view class="content">
         <view>
             <view class="box_4">
-                <view class="group_1">
+                <view class="group_1" @click="getServiceObject">
                     <view class="text-group_2">
                         <text lines="1" class="text_3">服务对象</text>
-                        <text lines="1" class="text_4">请选择服务对象</text>
+                        <text lines="1" class="text_4">{{serviceObject.nickName || '请选择服务对象'}}</text>
                     </view>
                     <u-icon name="arrow-right" color="#666" size="18"></u-icon>
                 </view>
@@ -13,7 +13,9 @@
                 <view class="group_1">
                     <view class="text-group_2">
                         <text lines="1" class="text_3">服务类型</text>
-                        <text lines="1" class="text_4">请选择服务类型</text>
+                        <picker @change="bindPickerChange" mode='selector' range-key="typeName" :value="index" :range="storeServiceList">
+                            <view class="text_4">{{storeServiceList[index].typeName}}</view>
+                        </picker>
                     </view>
                     <u-icon name="arrow-right" color="#666" size="18"></u-icon>
                 </view>
@@ -21,7 +23,7 @@
             </view>
             <view class="tabBarLineHeight"></view>
             <view class="tabBarView">
-                <view class="submitButton">提交</view>
+                <view class="submitButton" @click="commonGeneralOrder">提交</view>
             </view>
         </view>
     </view>
@@ -35,20 +37,75 @@
 		},
 		data() {
 			return {
-				title: 'Hello',
-				tabIndex: 3
+                serviceObject:{},
+                store:{},
+                storeServiceList:[],
+                index:0
+
+
 			}
 		},
 		onLoad() {
 
+
 		},
+
+        onShow(){
+            // 服务对象
+            uni.$off()
+            uni.$on('selectedServiceObject', this.selectedServiceObject);
+
+            this.store = uni.getStorageSync('storeInfo')
+            // this.storeAllServiceList()
+            this.category()
+        },
 		methods: {
 
+            getServiceObject(){
+                uni.navigateTo({
+                    url:'/orderPages/serviceObject/index'
+                })
+            },
+
+            // storeAllServiceList(){
+            //     this.$api.storeAllServiceList({storeId:this.store.storeId}).then(res=>{
+            //         this.storeServiceList= res.data.data
+            //     })
+            // },
+
+            selectedServiceObject(e){
+                this.serviceObject = e
+                console.log('++++++++++++selectedServiceObject++++++++++++++',e)
+            },
+
+            category(){
+                this.$api.category({storeId:this.store.storeId}).then(res=>{
+                    this.storeServiceList= res.data.data
+                    console.log('+++++++++++++++category+++++++++++++++++',res)
+                })
+
+            },
+            bindPickerChange(e){
+                this.index= e.detail.value
+                console.log(e)
+            },
+
+            commonGeneralOrder(){
+                this.$api.commonGeneralOrder({
+                    orderType: 1,
+                    serviceObjectId: this.serviceObject.id,
+                    serviceAttribute: 1,
+                    serviceStoreId: this.store.storeId
+                }).then(res=>{
+                    console.log('+++++++commonGeneralOrder+++++++++',res)
+                })
+            }
+
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-@import '/common/css/common.css';
+@import '../../common/css/common.css';
 @import './index.rpx.scss';
 </style>

+ 6 - 6
pages.json

@@ -274,12 +274,12 @@
 			{
 				"pagePath": "pages/index/index"
 			},
-			{
-				"pagePath": "pages/orderMeal/index"
-			},
-			{
-				"pagePath": "pages/qrCode/index"
-			},
+//			{
+//				"pagePath": "pages/orderMeal/index"
+//			},
+//			{
+//				"pagePath": "pages/qrCode/index"
+//			},
 			{
 				"pagePath": "pages/order/index"
 			},