zhangdan 4 years ago
parent
commit
3aacd80e05

+ 1 - 1
App.vue

@@ -1,6 +1,6 @@
 <script>
 	// const uat_domain = 'https://cust.test.sxzxyj.net' // 预发布
-	const uat_domain = 'http://192.168.16.224:8308' // 本地
+	const uat_domain = 'http://192.168.16.213:8308' // 本地
 	const pro_domain = 'https://gather.zyucgj.cn' // 生产
 	const uat_URL = uat_domain+'/gc-cust/' // 预发布
 	const pro_URL = pro_domain+'/gc-cust/'  // 生产

+ 9 - 0
api/order.js

@@ -9,3 +9,12 @@ export const getOrderList = params => {
   })
 }
 
+// 取消订单 reserve/cancel
+export const cancelOrder = params => {
+  return axios.request({
+    url: `reserve/cancel`,
+    method: 'post',
+	data: params
+  })
+}
+

+ 12 - 3
components/select/v-select.vue

@@ -1,6 +1,7 @@
 <template>
 	<picker @change="toChange" :value="index" :range="datalist" range-key="dispName">
-		<view style="display: flex;align-items: center;justify-content: space-between;">
+		<view v-if="showBtn" style="color: #666;">取消订单</view>
+		<view v-if="showSelete" style="display: flex;align-items: center;justify-content: space-between;">
 			<input class="form-input" :disabled="disabled" v-model="selected" placeholder-class="form-input-placeholder placeholder" :placeholder="placeholderText" />
 			<u-icon name="arrow-right" color="#c0c4cc"></u-icon>
 		</view>
@@ -17,7 +18,7 @@ export default {
       datalist: [],
       placeholderText: '请选择',
       lookUp: [],
-	  index: 0
+	  index: 0,
     }
   },
   props: {
@@ -38,7 +39,15 @@ export default {
       type: String,
       default: ''
     },
-    size: [String]
+    size: [String],
+	showSelete:{
+		type: [Boolean, String],
+		default: true
+	},
+	showBtn:{
+		type: [Boolean, String],
+		default: false
+	}
   },
   computed: {
     getVal () {

+ 7 - 1
pages.json

@@ -28,6 +28,12 @@
 				"navigationBarTitleText": "预约结果"
 			}
 		},
+		{
+			"path": "pages/index/zhiyin",
+			"style": {
+				"navigationBarTitleText": "回收指引"
+			}
+		},
 		{
 			"path": "pages/login/login",
 			"style": {
@@ -45,7 +51,7 @@
 		{
 			"path": "pages/order/index",
 			"style": {
-				"navigationBarTitleText": "我的订单",
+				"navigationBarTitleText": "待服务",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTextStyle": "black"
 			}

+ 1 - 2
pages/index/index.vue

@@ -161,9 +161,8 @@
 			},
 			// 回收指引
 			toZY(){
-				console.log('--------指引')
 				uni.navigateTo({
-				    // url: url
+				    url: '/pages/index/zhiyin'
 				})
 			},
 			// 检查更新

+ 41 - 50
pages/index/userInfo.vue

@@ -31,13 +31,13 @@
 			<view class="form-data qyImg">
 				<view> 上传图片 <text style="color: #a6a6a6;">(仅可上传1张,10MB以内)</text></view> 
 				<view class="info-main">
-					<view class="camera-btn">
+					<view class="camera-btn" v-if="photograph.length<1">
 						<view @click="goPhotograph" class="photograph-camera">
 							<u-icon name="camera" color="#bfbfbf" size="60" ></u-icon>
 						</view>
 					</view>
-					<view v-show="photograph"  class="photograph-con">
-						<u-icon v-show="!isView" name="close-circle-fill" color="#fa3534" size="50" class="close-circle-icon" @click="cancelPhotograph(index)"></u-icon>
+					<view v-show="photograph.length" v-for="(item,index) in photograph" :key="index" class="photograph-con">
+						<u-icon  name="close-circle-fill" color="#fa3534" size="50" class="close-circle-icon" @click="cancelPhotograph(index)"></u-icon>
 						<u-image width="100%" height="100%" :src="item" @click="previewPictures(item)"></u-image>
 					</view>
 				</view>
@@ -46,28 +46,22 @@
 		<view class="btns">
 			<u-button @click="submit" :loading="loading" :custom-style="submitBtn">提交</u-button>
 		</view>
-		<!-- <uni-popup ref="openModal" type="center">
-			<uni-popup-dialog content="确认提交吗?" @confirm="onOk" :title="title"></uni-popup-dialog>
-		</uni-popup> -->
 	</view>
 </template>
 
 <script>
-	// import uniPopup from '@/components/uni-popup/uni-popup.vue'
-	// import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
-	import {userInfoSave} from '@/api/data.js'
+	import {userInfoSave,userDetail} from '@/api/data.js'
 	import {saveImgToAliOss} from '@/libs/tools.js'
 	import vSelect  from  '@/components/select/v-select.vue'
 	export default {
-		components: {vSelect
-			// uniPopup,uniPopupDialog
-		},
+		components: {vSelect},
 		data() {
 			return {
 				title:'',
 				loading:false, // 提交按钮加载圈
 				photograph:[],
 				imageHeader:'', //  图片路径
+				userDetailInfo:{}, // 用户信息
 				form: {
 					addressType:'', // 用户类型
 					contactMobile: '', //联系人手机
@@ -91,29 +85,39 @@
 		},
 		onLoad(option) {
 			console.log(option,option.id,'ppppppppp')
+			this.getDetailData()
 			// 查看
-			if(option && option.id){
-				this.isView = true
-				this.itemId=option.id
-				this.getDetailData()
-			}else {
-				console.log('--------新增')
-				this.photograph = []
-				// this.form.remarks = ''
-				this.$refs.uForm.resetFields()
-			}
+			// if(option && option.id){
+			// 	this.isView = true
+			// 	this.itemId=option.id
+			// 	// this.getDetailData()
+			// }else {
+			// 	console.log('--------新增')
+			// 	this.photograph = []
+			// 	// this.form.remarks = ''
+			// 	this.$refs.uForm.resetFields()
+			// }
 		},
 		onUnload() {
 		},
 		methods: {
-			// 保留几位小数
-			// numberToFixed: function (key, num, max) {
-			//   let val = this.form[key]
-			//   let ret = numberToFixed(val, num, max)
-			//   this.$nextTick(() => {
-			//   	this.form[key] = ret
-			//   })
-			// },
+			// 获取详情数据
+			getDetailData(){
+				userDetail().then(res=>{
+					if(res.status==200){
+						this.form.info=res.data.contactName
+						this.userDetailInfo=res.data
+						this.form.contactMobile=res.data.contactMobile
+						this.form.contactName=res.data.contactName
+						this.form.contactAddress=res.data.contactAddress
+						this.form.houseAddress=res.data.houseAddress
+						this.imageHeader=res.data.imageHeader
+						this.form.lat=res.data.latitude
+						this.form.lng=res.data.longitude
+						console.log(res)
+					}
+				})
+			},
 			// 选择用户类型
 			chooseType(v){
 				this.form.addressType = v
@@ -152,23 +156,6 @@
 				    url: '/pages/index/userInfo'
 				})
 			},
-			// 获取详情数据
-			// getDetailData(){
-			// 	gatherDetail({id:this.itemId}).then(res=>{
-			// 		if(res.status==200){
-			// 			console.log(res)
-			// 			const a = res.data.gatherRubbishList.find(item=>item.rubbishType=='GATHER_BUILDING')
-			// 			const b = res.data.gatherRubbishList.find(item=>item.rubbishType=='GATHER_OTHER')
-			// 			const c = res.data.gatherRubbishList.find(item=>item.rubbishType=='GATHER_KITCHEN')
-			// 			this.form.gatherNum_jianzhu= a ? a.gatherNum.toString() : '0'
-			// 			this.form.gatherNum_chuyu= c ? c.gatherNum.toString() : '0'
-			// 			this.form.gatherNum_other= b ? b.gatherNum.toString() : '0'
-			// 			this.form.remarks=res.data.remarks
-			// 			this.photograph=res.data.imageUrlList || []
-			// 			console.log(this.form,'this.form')
-			// 		}
-			// 	})
-			// },
 			// 拍照或从相册选图片
 			goPhotograph() {
 				uni.chooseImage({
@@ -191,10 +178,11 @@
 							mask: true
 						})
 						saveImgToAliOss(res.tempFilePaths[0],(ret)=>{
-							this.photograph.push(ret.data)
-							// this.photograph = ret.data
+							this.photograph.push(res.tempFilePaths[0])
+							this.imageHeader = res.tempFilePaths[0]
 							uni.hideLoading()
 						})
+						console.log(this.photograph,res.tempFilePaths[0],this.photograph.toString(),'-------------this.photograph')
 				    }
 				});
 			},
@@ -245,7 +233,10 @@
 							})
 							return false
 						}
-						let params=this.form
+						const params=this.form
+						if(this.photograph){
+							params.imageHeader=this.imageHeader
+						}
 						console.log(params,'--------用户信息')
 						userInfoSave(params).then(res=>{
 							if(res.status==200){

+ 106 - 120
pages/index/yuyue.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="content">
 		<view class="content-form">
-			<view class="content-detail">
+			<!-- <view class="content-detail">
 				<view class="detail-text">
 					<u-image src="/static/pop_icon_warning.png" width="32" height="32"></u-image>
 					<text>请按照回收要求合理预约服务</text>
 				</view>
 				<view class="detail-xqtext">查看详情</view>
-			</view>
+			</view> -->
 			<view class="form-data">
 				<u-form :model="form" ref="uForm" :label-width="140" :error-type="['toast']">
 						<u-form-item prop="time" label="预约时间:" required>
@@ -62,7 +62,7 @@
 <script>
 	// import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	// import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
-	import {gatherSave,gatherDetail,searchRider} from '@/api/index.js'
+	import {searchRider} from '@/api/index.js'
 	import {saveImgToAliOss} from '@/libs/tools.js'
 	import { getLookUpDatas,userDetail,yuyueInfoSave } from '@/api/data'
 	export default {
@@ -78,16 +78,16 @@
 				photograph: [], //  图片路径
 				RubbishType:[], // 回收分类
 				rubbishweightList:[], // 重量分类
-				weightType:'',
-				weightTagType:'info', // 重量按钮类型
 				latitude:'', // 当前位置经度
 				longitude:'' ,// 当前位置维度
 				day:'', // 今天、明天,后天
 				timeType:'', // 上午、下午
+				reserveDateBegin:'', // 预约开始时间
+				reserveDateEnd:'', // 预约结束时间
 				time: '', // 其它垃圾
 				rubbishTypeListData:[],
 				userDetailInfo:{}, // 用户信息
-				nowDate:null,
+				nowDate:'',
 				form: {
 					info: '', // 厨余垃圾
 				},
@@ -146,39 +146,20 @@
 						]
 					},
 				],
-				// rules: {
-				// 	time: [
-				// 		{
-				// 			required: true,
-				// 			message: '请选择时间',
-				// 			trigger: ['blur', 'change']
-				// 		}
-				// 	],
-				// 	info:[{required:true,message:'请选择用户信息',trigger:['change']}]
-				// }
 			};
 		},
 		onLoad(option) {
 			console.log(option,option.id,'ppppppppp')
-			this.rubbishType()
-			this.getDetailData()
-			this.rubbishWeightType()
-			const date=new Date
-			const year=date.getFullYear()
-			const month = date.getMonth() + 1
-			const day = date.getDate()
-			this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+day:day);
-			console.log(date.getFullYear(),nowDate,date.getMonth(),'-----------日期')
+			this.pageInfo()
 			// 查看
-			if(option && option.id){
-				this.isView = true
-				this.itemId=option.id
-			}else {
-				console.log('--------新增')
-				this.photograph = []
-				this.form.remarks = ''
-				this.$refs.uForm.resetFields()
-			}
+			// if(option && option.id){
+			// 	this.isView = true
+			// 	this.itemId=option.id
+			// }else {
+			// 	console.log('--------新增')
+			// 	this.photograph = []
+			// 	this.$refs.uForm.resetFields()
+			// }
 			wx.getLocation({
 			 type: 'wgs84',
 			 success:(res=> {
@@ -198,6 +179,18 @@
 		watch:{
 		},
 		methods: {
+			// 初始化页面
+			pageInfo(){
+				this.time=''
+				this.userDetailInfo={}
+				this.photograph=[]
+				this.rubbishTypeList=[]
+				// this.latitude=''  // 当前位置经度
+				// this.longitude='' // 当前位置维度
+				this.rubbishType()
+				this.getDetailData()
+				this.rubbishWeightType()
+			},
 			// 获取垃圾分类
 			rubbishType () {
 			  let _this = this
@@ -210,7 +203,6 @@
 					})
 					this.$nextTick(()=>{
 						_this.rubbishTypeListData= result.data || []
-						console.log(_this.rubbishTypeListData,'_this.rubbishTypeListData','---------------------')
 					})
 			    }
 			  })
@@ -232,7 +224,6 @@
 					if(res.status==200){
 						this.hasRider=res.data
 					}
-					console.log(res,'-----------')
 				})
 			},
 			// 选择时间
@@ -241,14 +232,42 @@
 				this.show=true
 			},
 			confirm(e) {
+				const date=new Date
+				const year=date.getFullYear()
+				const month = date.getMonth() + 1
+				const day = date.getDate()
 				if(e){
 					this.time=e[0].label + e[1].label
 					this.day=e[0].label
-					// if(e[0].label=='今天'){
-					// 	this.day
-					// }
 					this.timeType=e[1].label.substr(0, e[1].label.indexOf("(")) // 上午、下午
-					console.log(e,'----------时间',this.day,this.timeType,e[1].label)
+					if(e[0].label=='今天'){
+						if(this.timeType=='上午'){
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+day:day)+' 08:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+day:day)+' 12:59:59';
+						}else{
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+day:day)+' 13:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+day:day)+' 18:00:00';
+						}
+						
+					}
+					if(e[0].label=='明天'){
+						if(this.timeType=='上午'){
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+1):day+1)+' 08:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+1):day+1)+' 12:59:59';
+						}else{
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+1):day+1)+' 13:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+1):day+1)+' 18:00:00';
+						}
+					}
+					if(e[0].label=='后天'){
+						if(this.timeType=='上午'){
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+2):day+2)+' 08:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+2):day+2)+' 12:59:59';
+						}else{
+							this.reserveDateBegin=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+2):day+2)+' 13:00:00';
+							this.reserveDateEnd=this.nowDate = year + "-" +( month<10? '0'+month:month ) + "-" + (day<10? '0'+(day+2):day+2)+' 18:00:00';
+						}
+					}
 				}
 			},
 			// 选择用户信息
@@ -260,18 +279,12 @@
 			// 选择垃圾分类
 			itemRubbishChange(item){
 				item.check=!item.check
-				// this.rubbishTypeList.push(item.code)
 				console.log(item,item.code,'--------------',this.check)
 			},
 			itemRubbishWeightChange(item){
 				this.checkWeightType=item.code
-				this.reserveWeight=item.code
 				console.log(item,item.code,'--------------',this.check)
 			},
-			// 选择重量
-			chooseWeight(value){
-				console.log('-------选中重量')
-			},
 			// 获取详情数据
 			getDetailData(){
 				userDetail().then(res=>{
@@ -326,27 +339,54 @@
 			// 提交
 			submit(){
 				this.$refs.uForm.validate(valid => {
-					const params= Object.assign(this.userDetailInfo, this.form)
-					if(this.time){
-						params.dayStr=this.day
-						params.reserveTimeType=this.timeType
-						if(params.reserveTimeType=='上午'){
-							params.beginStr='08:00:00', // 预约开始时间
-							params.endStr="12:59:59"
-						}else{
-							params.beginStr='13:00:00', // 预约开始时间
-							params.endStr="18:00:00"
-						}
-					}
-					if(this.rubbishTypeList){
-						params.rubbishTypeList=this.rubbishTypeList
-					}
-					if(this.reserveWeight){
-						params.reserveWeight=this.reserveWeight
-					}
-					console.log(params,'--------------参数')
 					if (valid) {
-						console.log('验证通过');
+						if(this.time ==''){
+							uni.showToast({
+								title: '请选择预约时间',
+								icon: 'none'
+							})
+							return false
+						}
+						if(this.form.info ==''){
+							uni.showToast({
+								title: '请选择用户信息',
+								icon: 'none'
+							})
+							return false
+						}
+						if(this.checkWeightType ==''){
+							uni.showToast({
+								title: '请选择预估重量',
+								icon: 'none'
+							})
+							return false
+						}
+						if(this.rubbishTypeList ==[]){
+							uni.showToast({
+								title: '请选择回收分类',
+								icon: 'none'
+							})
+							return false
+						}
+						const params= Object.assign(this.userDetailInfo, this.form)
+						if(this.time){
+							params.reserveDateBegin=this.reserveDateBegin
+							params.reserveDateEnd=this.reserveDateEnd
+						}
+						if(this.reserveWeight){
+							params.reserveWeight=this.checkWeightType
+						} 
+						if(this.photograph){
+							params.imageList=this.photograph
+						}
+						if(this.rubbishTypeListData){
+							this.rubbishTypeListData.map(item=>{
+								if(item.check==true){
+									this.rubbishTypeList.push(item.code)
+								}
+							})
+							params.rubbishTypeList=this.rubbishTypeList
+						}
 						yuyueInfoSave(params).then(res=>{
 							if(res.status==200){
 								uni.showToast({
@@ -365,60 +405,6 @@
 					}
 				});
 			},
-			// 确认提交
-			// onOk() {
-			// 	this.$refs.openModal.close()
-			// 	let params = {
-			// 		rubbishEntityList: [],
-			// 		imageUrlList: this.photograph,
-			// 		remarks: this.form.remarks
-			// 	}
-			// 	if(this.itemId){
-			// 		params.id=this.itemId
-			// 	}
-			// 	if(this.form.gatherNum_other) {
-			// 		params.rubbishEntityList.push({
-			// 			"rubbishType":"GATHER_OTHER",
-			// 			"rubbishWeight": this.form.gatherNum_other*240,
-			// 			"gatherNum": this.form.gatherNum_other,
-			// 			"unit":"BUCKET"
-			// 		})
-			// 	}
-			// 	if(this.form.gatherNum_chuyu) {
-			// 		params.rubbishEntityList.push({
-			// 			"rubbishType":"GATHER_KITCHEN",
-			// 			"rubbishWeight": this.form.gatherNum_chuyu*240,
-			// 			"gatherNum": this.form.gatherNum_chuyu,
-			// 			"unit":"BUCKET"
-			// 		})
-			// 	}
-			// 	if(this.form.gatherNum_jianzhu) {
-			// 		params.rubbishEntityList.push({
-			// 			"rubbishType":"GATHER_BUILDING",
-			// 			"rubbishWeight": this.form.gatherNum_jianzhu*1000,
-			// 			"gatherNum": this.form.gatherNum_jianzhu,
-			// 			"unit":"TON"
-			// 		})
-			// 	}
-			// 	this.loading=true
-			// 	gatherSave(params).then(res=>{
-			// 		if(res.status == 200) {
-			// 			uni.showToast({
-			// 				title: res.message,
-			// 				icon: 'none'
-			// 			})
-			// 			setTimeout(()=>{
-			// 				uni.navigateBack()
-			// 			},300)
-			// 		} else {
-			// 			uni.showToast({
-			// 				title: res.message,
-			// 				icon: 'none'
-			// 			})
-			// 		}
-			// 		this.loading= false
-			// 	})
-			// },
 			
 		},
 		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕

+ 2 - 2
pages/index/yuyueResult.vue

@@ -17,8 +17,8 @@
 		},
 		methods:{
 			seeDetail(){
-				uni.navigateTo({
-				    url: '/pages/index/yuyue'
+				uni.switchTab({
+				    url: '/pages/order/index'
 				})
 			}
 		}

+ 52 - 0
pages/index/zhiyin.vue

@@ -0,0 +1,52 @@
+<template>
+	<view class="content">
+		<view class="content-item">
+			<view class="item-title">一、点击首页【一键预约】,进入预约 下单流程。</view>
+			<view class="item-img"><u-image src="/static/stepOne.png" width="460rpx" height="400rpx"></u-image></view>
+		</view>
+		<view class="content-item">
+			<view class="item-title">二、录入预约时间、用户信息、预约分 类、预估重量等信息,输入完毕点击【 立刻下单】,即可提交订单。</view>
+			<view class="item-img"><u-image src="/static/stepTwo.png" width="460rpx" height="400rpx"></u-image></view>
+		</view>
+		<view class="content-item">
+			<view class="item-title">三、订单提交完成,等待骑手上门。 可在【待服务】列表查看待服务订单 详情。</view>
+			<view class="item-img"><u-image src="/static/stepThree.png" width="460rpx" height="400rpx"></u-image></view>
+		</view>
+		<view class="content-item">
+			<view class="item-title">四、骑手上门服务,录入回收品类和 重量信息,自动生成应付金额,线下 支付给用户。</view>
+			<view class="item-img"><u-image src="/static/stepFour.png" width="460rpx" height="400rpx"></u-image></view>
+		</view>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style lang="less">
+	.content{
+		width: 100%;
+		height: 100vh;
+		padding: 60upx;
+		display: flex;
+		flex-direction: column;
+		.content-item{
+			text-align: center;
+			margin-bottom: 120upx;
+			.item-title{
+				font-size: 18px;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #191919;
+				.item-img{
+					margin: 60upx auto 120upx;
+					// display: flex;
+					// justify-content: center;
+					.img{
+						// width: 100%;
+						// height: 100%;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 41 - 40
pages/order/index.vue

@@ -5,8 +5,8 @@
 				<view class="userInfo">
 					<u-image src="/static/order_avatar_rider.png" width="72" height="72" shape="circle"></u-image>
 					<view class="userInfo-nameOrPhone">
-						<view class="name">{{item.contactName}}</view>
-						<view class="phone"><u-icon name="phone"></u-icon><text>{{item.contactMobile}}</text></view>
+						<view class="name">{{item.name}}</view>
+						<view class="phone"><u-icon name="phone"></u-icon><text>{{item.phone}}</text></view>
 					</view>
 				</view>
 				<view>
@@ -26,52 +26,39 @@
 				<u-line color="#e5e5e5"/>
 				<view class="item-userInfo item-userInfo-detail"><text class="address">订单编号</text><text class="detail-title">{{item.orderReserveNo}}</text></view>
 				<u-line color="#e5e5e5"/>
-				<view class="item-userInfo item-userInfo-detail"><text class="address">预约时间</text><text class="detail-title">{{item.reserveTimeType}}</text></view>
+				<view class="item-userInfo item-userInfo-detail"><text class="address">预约时间</text><text class="detail-title">{{item.reserveDateBegin.substring(0,10)}} {{item.reserveTimeTypeDictValue}}</text></view>
 				<u-line color="#e5e5e5"/>
 				<view class="item-userInfo item-userInfo-detail"><text class="address">下单时间</text><text class="detail-title">{{item.createDate}}</text></view>
 				<u-line color="#e5e5e5"/>
-				<view class="item-userInfo item-userInfo-detail"><text class="address">预约品类</text><text class="detail-title">{{item.type}}</text></view>
+				<view class="item-userInfo item-userInfo-detail"><text class="address">预估重量</text><text class="detail-title">{{item.reserveWeight}}</text></view>
+				<u-line color="#e5e5e5"/>
+				<view class="item-userInfo item-userInfo-detail"><text class="address">预约品类</text><text class="detail-title">{{item.reserveRubbishType}}</text></view>
 				<view class="item-userInfo-detail-image">
-					<u-image :src="img" v-for=" img in item.imgList" width="120" height="120" class="detail-image"></u-image>
+					<u-image :src="img" v-for=" img in item.imageList" width="120" height="120" class="detail-image"></u-image>
 				</view>
 				<u-line color="#e5e5e5"/>
-				<view class="userInfo cancelBtn"><u-button :custom-style="cancelBtn" :hair-line="false"  @click="cancelOrder">取消订单</u-button></view>
-				<!-- <v-select ref="AddressType" placeholder="请选择取消原因" @itemChange="chooseType"  v-if="!showCancelBtn" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select> -->
+				<!-- <view class="userInfo cancelBtn" :showBtn="true"><u-button :custom-style="cancelBtn" :hair-line="false"  @click="cancelOrder">取消订单</u-button></view> -->
+				<view class="btn">
+					<v-select :showSelete="false" :showBtn="true" class="cancelBtn" @itemChange="chooseReason()" code="CANCEL_REASON" ></v-select>
+				</view>
 			</view>
 		</view>
 		<view class="nodata" v-if="!hasLogin && orderList.length==[] ">
 			<u-empty :text="noDataText" mode="data"></u-empty>
 		</view>
-		<!-- <u-popup ref="openModal" type="center">
-			<v-select ref="AddressType" placeholder="请选择取消原因" @itemChange="chooseType"  v-if="!showCancelBtn" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select>
-				</u-popup> -->
-		<!-- <uni-popup ref="openModal" type="center">
-			<v-select ref="AddressType" placeholder="请选择取消原因" @itemChange="chooseType" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select>
-			<uni-popup-dialog @confirm="onOk" :title="title"></uni-popup-dialog>
-		</uni-popup> -->
 	</view>
 </template>
 
 <script>
 	import vSelect  from  '@/components/select/v-select.vue'
-	import uniPopup from '@/components/uni-popup/uni-popup.vue'
-	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
-	import {getOrderList} from '@/api/order.js'
+	import {getOrderList,cancelOrder} from '@/api/order.js'
 	export default{
-		components: {
-			uniPopup,uniPopupDialog,vSelect
-		},
+		components: {vSelect},
 		data(){
 			return{
-				title:'提示',
 				noDataText:'',
-				showCancelBtn:true,
-				cancelBtn:{
-					width: '106px',
-					height: '38px',
-					background: '#E5E5E5',
-					borderRadius:' 6px'
-				},
+				showSelect:false,
+				nowId:'', // 当前订单id
 				orderList:[]
 			}
 		},
@@ -91,8 +78,8 @@
 		methods:{
 			// 数据展开收起
 			itemChange(item) {
+				this.nowId=item.id
 				console.log('点击收起隐藏')
-				// item.isUp = !item.isUp
 				this.$nextTick(function(){
 					item.isUp = !item.isUp
 				})
@@ -113,17 +100,22 @@
 					}
 				})
 			},
-			// 选择用户类型
-			chooseType(v){
-				this.form.AddressType = v
-			},
 			// 取消订单
-			cancelOrder(){
-				this.$refs.openModal.open()
+			chooseReason(e){
+				console.log(e,'-------取消订单')
+				cancelOrder({id:this.nowId,canReson:e}).then(res=>{
+					if(res.status==200){
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+						this.$nextTick(function(){
+							this.getOrderListData()
+						})
+					}
+				})
+				
 			},
-			onOk() {
-				this.$refs.openModal.close()
-				}
 		}
 		}
 </script>
@@ -195,10 +187,19 @@
 					margin-right: 20upx;
 				}
 			}
-			.cancelBtn{
+			.btn{
 				display: flex;
 				justify-content: flex-end;
-				padding-top: 30upx;
+			}
+			.cancelBtn{
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				width: 80px;
+				border-radius: 6px;
+				padding: 10upx 0;
+				margin-top: 30upx;
+				background-color: #e5e5e5;
 			}
 		}
 	}

BIN
static/stepFour.png


BIN
static/stepOne.png


BIN
static/stepThree.png


BIN
static/stepTwo.png