소스 검색

处理冲突

zhangli 2 년 전
부모
커밋
37588e373c
7개의 변경된 파일64개의 추가작업 그리고 21개의 파일을 삭제
  1. 3 2
      config/api.js
  2. 0 1
      manifest.json
  3. 2 1
      pages/report/index.vue
  4. 12 0
      pagesEnroll/enrolledForm.vue
  5. 2 1
      pagesMain/businessList.vue
  6. 6 4
      pagesMain/customerInfo.vue
  7. 39 12
      pagesMain/venueMore.vue

+ 3 - 2
config/api.js

@@ -4,9 +4,10 @@
 //const API_BASE = 'http://192.168.1.145/newApi'
 // const API_BASE = 'http://192.168.1.109/newApi'
 // const API_BASE = 'http://192.168.1.117:8089'
-const API_BASE = 'http://192.168.1.145/newApi'
-//const API_BASE = 'http://192.168.1.117:8089'
+
 // const API_BASE = 'http://192.168.1.145/newApi'
+// const API_BASE = 'http://192.168.1.117:8089'
+const API_BASE = 'http://192.168.1.145/newApi'
 
 module.exports = {
 	//  微信授权登录

+ 0 - 1
manifest.json

@@ -103,7 +103,6 @@
     "quickapp" : {},
     /* 快应用特有相关 */
     "mp-weixin" : {
-        /* 小程序特有相关 */
         "appid" : "wx58efaca110d45796",
         "setting" : {
             "urlCheck" : true,

+ 2 - 1
pages/report/index.vue

@@ -27,7 +27,8 @@
 		</view>
 		<view class="last-content">
 			<view><text style="font-size: 44rpx;font-weight: bold;">客户管理</text></view>
-			<view class="content-customer" @click.native="goUrl('/pagesMain/customerList')">
+			<!-- <view class="content-customer" @click.native="goUrl('/pagesMain/customerList')"> -->
+			<view class="content-customer">
 				<view style="width:10%;margin: 0 30rpx;">
 					<u-image width="100%" src="/static/images/allCustomer.png" mode="widthFix"></u-image>
 				</view>

+ 12 - 0
pagesEnroll/enrolledForm.vue

@@ -22,6 +22,9 @@
 			<u-form-item label="会员卡" prop="cardName" required right-icon="arrow-right" @click.native="selectCard">
 				<text>{{form.cardName}}</text>
 			</u-form-item>
+			<u-form-item label="优惠券" prop="content" required>
+				<text>{{form.content}}</text>
+			</u-form-item>
 		<!-- 	<u-form-item label="有效期" prop="time" required right-icon="arrow-right" @click.native="timeShow = true" v-if="payTypeCode == 1">
 				<text>{{form.time}}</text>
 			</u-form-item> -->
@@ -137,6 +140,9 @@
 					// 会员卡
 					cardId: '',
 					cardName: '',
+					// 优惠券
+					discountCouponId: '',
+					content: '',
 					// 学生照片
 					imageFileId: '',
 					// 接收人
@@ -311,6 +317,12 @@
 							url: res.data.imageFileUrl
 						}]
 					}
+					if(res.data.couponList.length) {
+						this.form.discountCouponId = res.data.couponList[0].id
+						this.form.content = res.data.couponList[0].content
+					} else {
+							this.form.content = '无可用优惠券'
+					}
 					this.form.orderNo = res.data.orderNo
 				}).catch(error => {
 					this.$refs.uTips.show({

+ 2 - 1
pagesMain/businessList.vue

@@ -39,7 +39,8 @@
 		<!-- 标签 -->
 		<u-action-sheet :list="signList" v-model="signShow" @click="handleSetSexClick"></u-action-sheet>
 		<!-- 销售 -->
-		<u-action-sheet :list="saleList" v-model="saleShow" @click="handleSetSaleClick"></u-action-sheet>
+<!-- 		<u-action-sheet :list="saleList" v-model="saleShow" @click="handleSetSaleClick"></u-action-sheet> -->
+		<u-picker mode="selector" v-model="saleShow"  :range="saleList" range-key="text" @confirm="handleSetSaleClick"></u-picker>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
 </template>

+ 6 - 4
pagesMain/customerInfo.vue

@@ -4,17 +4,17 @@
 			<u-form-item label="学员姓名" prop="studentName">
 				<u-input v-model="form.studentName" placeholder=" " disabled />
 			</u-form-item>
-			<u-form-item label="学生照片" prop="imageFileId" label-position="top">
+			<u-form-item v-if="navbarTitle == '客户信息'" label="学生照片" prop="imageFileId" label-position="top">
 				<u-upload max-count="1" :deletable="false" :file-list="form.fileList" index="1"></u-upload>
 			</u-form-item>
 			<u-form-item label="学员性别" prop="sex" placeholder=" " disabled>
-				<!-- <text>{{form.sex}}</text> -->
-				<u-input v-model="form.sex" placeholder=" " disabled />
+				<text>{{ form.sex == '0' ? '男' : '女' }}</text>
+				<!-- <u-input v-model="form.sex" placeholder=" " disabled /> -->
 			</u-form-item>
 			<u-form-item label="学员年龄" prop="age">
 				<u-input v-model="form.age" placeholder=" " disabled />
 			</u-form-item>
-			<u-form-item label="学生生日" prop="birthday">
+			<u-form-item v-if="navbarTitle == '客户信息'" label="学生生日" prop="birthday">
 				<u-input v-model="form.birthday" placeholder=" " disabled />
 			</u-form-item>
 			<u-form-item label="家长姓名" prop="parentsName">
@@ -79,10 +79,12 @@
 			uni.setNavigationBarTitle({
 				title: options.title
 			})
+			this.navbarTitle = options.title
 			this.getCustomerInfo()
 		},
 		data() {
 			return {
+				navbarTitle: '',
 				id: '',
 				form: {
 					// 学生姓名

+ 39 - 12
pagesMain/venueMore.vue

@@ -1,5 +1,8 @@
 <template>
 	<view class="content">
+		<view class="filter-box">
+			<u-search placeholder="请输入关键字" v-model="filterText" @search="setFilterText" @custom="setFilterText"></u-search>
+		</view>
 		<view class="venue-box">
 			<u-card :head-border-bottom="false" :foot-border-top="false" title-size="32" padding="0" margin="10px" v-for="(item, index) in venueList"
 			 :key="index" class="venue-card" @click="goToVenueDetail(item)">
@@ -34,6 +37,7 @@
 	export default {
 		data() {
 			return {
+				filterText: '',
 				venueList: []
 			}
 		},
@@ -43,25 +47,42 @@
 			])
 		},
 		onLoad() {
-			// 附件场馆
-			NET.request(API.getVenueList, uni.getStorageSync('locationData'), 'POST').then(res => {
-				this.venueList = res.data
-			}).catch(error => {
-				this.$refs.uTips.show({
-					title: error.message,
-					type: 'warning',
-				})
-				setTimeout(() => {
-					uni.navigateBack()
-				},1000)
-			})
+			this.getAllVenue()
 		},
 		methods: {
+			//  获取全部场馆
+			getAllVenue() {
+				// 附件场馆
+				NET.request(API.getVenueList, uni.getStorageSync('locationData'), 'POST').then(res => {
+					this.venueList = res.data
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+					setTimeout(() => {
+						uni.navigateBack()
+					},1000)
+				})
+			},
 			//  跳转场馆详情
 			goToVenueDetail(item) {
 				uni.navigateTo({
 					url: '/pagesMain/venueDetail?id=' + item.id
 				});
+			},
+			setFilterText() {
+				if(this.filterText) {
+					let arr = []
+					this.venueList.forEach(item => {
+						if(item.name.indexOf(this.filterText) >= 0) {
+							arr.push(item)
+						}
+					})
+					this.venueList = arr
+				} else {
+					this.getAllVenue()
+				}
 			}
 		}
 	}
@@ -74,6 +95,12 @@
 		width: 100%;
 		float: left;
 		
+		.filter-box {
+			height: 48px;
+			padding: 10px 15px;
+			background-color: #FFFFFF;
+		}
+		
 		.venue-box {
 			width: 100vw;
 			float: left;