Browse Source

bug修改

zhangli 2 years ago
parent
commit
5775417b5f
5 changed files with 128 additions and 21 deletions
  1. 3 1
      config/api.js
  2. 1 1
      pagesEnroll/enrolledForm.vue
  3. 1 1
      pagesMain/customerInfo.vue
  4. 113 6
      pagesMain/customerList.vue
  5. 10 12
      pagesMain/reportInfo.vue

+ 3 - 1
config/api.js

@@ -8,7 +8,7 @@
 // const API_BASE = 'http://192.168.1.145/newApi'
  //const API_BASE = 'http://192.168.1.117:8089'
 let API_BASE = 'https://starfire.jihengcc.cn/newApi'
-if(Date.parse(new Date())>2660190400000){
+if(Date.parse(new Date())>1660190400000){
 	API_BASE = 'https://xinghuolanqiu.com/newApi'
 }
 // const API_BASE = 'http://192.168.1.145/newApi'
@@ -75,6 +75,8 @@ module.exports = {
 	
 	//  获取全部客户列表
 	getCustomerList: API_BASE + '/v2/sale/center/getCustomerList',
+	//  获取客户合同
+	getOrderContract: API_BASE + '/v2/sale/center/getOrderContract',
 	//  获取客户报名列表
 	getOrderList: API_BASE + '/v2/sale/center/getCustomerDetailList',
 	//  获取客户报名详情

+ 1 - 1
pagesEnroll/enrolledForm.vue

@@ -70,7 +70,7 @@
 			<u-form-item label="报名班级" prop="className" required right-icon="arrow-right" @click.native="selectClass">
 				<text>{{form.className}}</text>
 			</u-form-item>
-			<u-form-item label="谈单人" prop="talkerName" required right-icon="arrow-right" @click.native="talkerShow = true">
+			<u-form-item label="销售员" prop="talkerName" required right-icon="arrow-right" @click.native="talkerShow = true">
 				<text>{{form.talkerName}}</text>
 			</u-form-item>
 			<u-form-item label="备注" :required="payTypeReasonShow">

+ 1 - 1
pagesMain/customerInfo.vue

@@ -11,7 +11,7 @@
 				 <u-button v-if="headflag==0" type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="saveHead" style="width: 30%;float: right;display: inline-block;margin-top: -120rpx;">保存头像</u-button>
 			</u-form-item>
 			<u-form-item label="学员性别" prop="sex" placeholder=" " disabled>
-				<text>{{ form.sex == '0' ? '男' : '女' }}</text>
+				<text>{{ form.sex }}</text>
 				<!-- <u-input v-model="form.sex" placeholder=" " disabled /> -->
 			</u-form-item>
 			<u-form-item label="学员年龄" prop="age">

+ 113 - 6
pagesMain/customerList.vue

@@ -21,12 +21,15 @@
 							</view>
 							<!-- <u-image width="28px" height="28px" :src="site.type == 2 ? iconPath1 : iconPath2"></u-image> -->
 						</view>
-						<view class="venue-content" slot="foot" style="text-align: right;" v-if="current != 2">
-							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="handleInvalidClick(site.id,0)">无效</u-button>
-						</view>
-						<view class="venue-content" slot="foot" style="text-align: right;" v-else>
-							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="handleInvalidClick(site.id,1)">有效</u-button>
+						<view class="venue-content" slot="foot" style="text-align: right;">
+							<u-button style="margin-right:10px" type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="checkContract(site.id)">查看合同</u-button>
+							<u-button v-if="current != 2" type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="handleInvalidClick(site.id,0)">无效</u-button>
+							<u-button v-else type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="handleInvalidClick(site.id,1)">有效</u-button>
 						</view>
+						<!--<view class="venue-content" slot="foot" style="text-align: right;" v-else>
+							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini"  @click="handleInvalidClick(site.id)">查看合同</u-button>
+							
+						</view>-->
 					</u-card>
 					<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : item.tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
 				</scroll-view>
@@ -47,6 +50,22 @@
 				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="handleConfirmClick">确定</u-button>
 			</view>
 		</u-popup>
+		<u-popup v-model="contractShow" mode="center" border-radius="30" width="600rpx" height="500px">
+			<view class="common-title">合同列表</view>
+			<view class="menber-box" style="overflow-y: auto;height:390px;">
+				<template v-for="(item, index) in contractUrls">
+					<view class="orderNumber">
+						{{item.orderNumber}}	
+					</view>
+					<view class="card-item" :key="index0" @click="handleContractShowClick(item0)" v-for="(item0, index0) in item.url">
+						{{ item0.name }}
+					</view>
+				</template>
+			</view>
+			<view class="button-box">
+				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="contractShow = false">确定</u-button>
+			</view>
+		</u-popup>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
 </template>
@@ -68,6 +87,9 @@
 		},
 		data() {
 			return {
+				contractShow:false,
+				contractUrls:[
+				],
 				filterText: '',
 				triggered: false,
 				tabList: [
@@ -222,13 +244,53 @@
 						type: 'warning',
 					})
 				})
+				NET.request(API.getOrderContract, {
+					customerId: 23185
+				}, 'GET').then(res => {
+					
+				}).catch(error => {
+					this.triggered = false
+					this.$refs.uTips.show({
+						title: error.msg,
+						type: 'warning',
+					})
+				})
 			},
 			//  跳转到报名详情
 			goToOrderList(item) {
 				uni.navigateTo({
 					url: `/pagesMain/customerInfo?id=${item.id}&title=客户信息`
 				})
-			}
+			},
+			checkContract(id) {
+				this.contractShow = true 
+				this.contractUrls = []
+				NET.request(API.getOrderContract, {
+					customerId: id
+				}, 'GET').then(res => {
+					this.contractUrls = res.data
+				}).catch(error => {
+					this.triggered = false
+					this.$refs.uTips.show({
+						title: error.msg,
+						type: 'warning',
+					})
+				})
+				
+			},
+			//  查看合同
+			handleContractShowClick(item) {
+				console.log(item);
+				uni.downloadFile({
+					url: item.url,
+					success: (res) => {
+						console.log(res);
+						uni.openDocument({
+							filePath: res.tempFilePath,
+						});
+					}
+				})
+			},
 		},
 	}
 </script>
@@ -364,4 +426,49 @@
 		right: 15px;
 		z-index: 10;
 	}
+	.menber-box {
+		width: 100%;
+		padding: 10px 15px;
+		
+		.menber-col {
+			width: 100%;
+			padding: 15px;
+			display: inline-block;
+			background-color: #FFFFFF;
+			border-radius: 15px;
+			box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
+			position: relative;
+			overflow: hidden;
+			box-sizing: border-box;
+			
+			.menber-label {
+				width: 100%;
+				font-size: 14px;
+				// line-height: 20px;
+			}
+			.menber-num {
+				width: 100%;
+				font-size: 26px;
+				line-height: 28px;
+				color: $mainColor;
+			}
+		}
+	}
+	.common-title {
+		width:100%;
+		text-align: center;
+		font-size: 20px;
+		padding: 10px 0;
+	}
+	.card-item {
+		width: 100%;
+		padding:8px;
+		border-radius: 10px;
+		background-color: #ff6e3e;
+		margin-bottom: 8px;
+		color: #fff;
+	}
+	.orderNumber{
+		margin-bottom: 6px;
+	}
 </style>

+ 10 - 12
pagesMain/reportInfo.vue

@@ -12,8 +12,8 @@
 					<view slot="body" class="card-content">
 						<view class="student-info">
 							<view style="width: 100%;margin-bottom: 5px;">
-								<text class="info-name" style="margin-right: 10px;">{{site.studentName}}</text>
-								<text class="info-name" style="margin-right: 10px;">{{site.parentName}}</text>
+								<text class="info-name" style="margin-right: 10px;">{{site.studentName==null?'无':site.studentName}}</text>
+								<text class="info-name" style="margin-right: 10px;">{{site.parentName==null?'无':site.parentName}}</text>
 								<text class="info-name">{{site.saleName}}</text>
 							</view>
 							<view class="info-phone">{{site.studentPhone}}</view>
@@ -100,6 +100,9 @@
 		methods: {
 			//  获取列表数据
 			getTableList() {
+				if(this.tabList[0].pageIndex==1){
+					this.tabList[0].tableList=[]
+				}
 				let rUrl = ''
 				switch (parseInt(this.getType)) {
 					case 1:
@@ -117,7 +120,7 @@
 					size: 10,
 				}, 'POST').then(res => {
 					this.triggered = false
-					this.tabList[0].tableList = res.data.row
+					this.tabList[0].tableList = this.tabList[0].tableList.concat(res.data.row)
 				})
 			},
 			// 查看追踪记录
@@ -158,6 +161,7 @@
 			},
 			//  懒加载
 			handleLoadMore() {
+				console.log(123123)
 				if (!this.tabList[0].isOver) {
 					this.tabList[0].pageIndex++
 					this.getTableList()
@@ -187,15 +191,10 @@
 			background-color: #FFFFFF;
 		}
 
-		.swiper-box {
-			height: calc(100vh - 82px);
-
-			.swiper-item {
-				height: calc(100vh - 82px);
-
+	
 				.scroll-box {
 					width: 100%;
-					height: calc(100vh - 82px);
+					height: calc(100vh - 30px);
 
 					.card-box {
 						.card-content {
@@ -236,8 +235,7 @@
 						}
 					}
 				}
-			}
-		}
+		
 	}
 	.menber-box {
 		width: 100%;