Bläddra i källkod

更新骑手送达拍照短信功能

zhuxiuping 2 år sedan
förälder
incheckning
6ef26ee254
26 ändrade filer med 834 tillägg och 28 borttagningar
  1. 10 3
      common/config.js
  2. 162 0
      common/httpRequest.js
  3. 193 3
      pages/index/index.vue
  4. 191 3
      pages/index/orderdetail/orderdetail.vue
  5. 189 3
      pages/riderMy/order.vue
  6. 1 0
      pages/riderMy/riderMy.vue
  7. BIN
      static/addimg.png
  8. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  9. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  10. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderdetail/orderdetail.js.map
  11. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/riderMy/order.js.map
  12. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/riderMy/riderMy.js.map
  13. 1 2
      unpackage/dist/dev/mp-weixin/app.json
  14. 2 2
      unpackage/dist/dev/mp-weixin/common/vendor.js
  15. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  16. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  17. 24 0
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  18. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.js
  19. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.wxml
  20. 24 0
      unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.wxss
  21. 1 1
      unpackage/dist/dev/mp-weixin/pages/riderMy/order.js
  22. 1 0
      unpackage/dist/dev/mp-weixin/pages/riderMy/order.json
  23. 1 1
      unpackage/dist/dev/mp-weixin/pages/riderMy/order.wxml
  24. 24 0
      unpackage/dist/dev/mp-weixin/pages/riderMy/order.wxss
  25. 1 1
      unpackage/dist/dev/mp-weixin/pages/riderMy/riderMy.js
  26. BIN
      unpackage/dist/dev/mp-weixin/static/addimg.png

+ 10 - 3
common/config.js

@@ -1,8 +1,13 @@
-const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
-const ROO2 = "https://mxys.chuanghai-tech.com";
-const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH1 = "https://www.daweilinli.com/sqx_fast";
+const ROO2 = "https://www.daweilinli.com/sqx_fast";
+// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH = "https://www.daweilinli.com/sqx_fast";
 const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"; //联系客服
 const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"; //聊天
+const APIHOST122="https://www.daweilinli.com/sqx_fast"
+
+const ROOTPATH123 = "https://mxys.chuanghai-tech.com/sqx_fast";
 
 // const ROOTPATH1 = "http://192.168.0.119:8171/sqx_fast";
 // const ROOTPATH = "http://192.168.0.119:8171/sqx_fast";
@@ -15,4 +20,6 @@ module.exports = {
 	APIHOST2: ROO2,
 	WSHOST: ROOTPATH2,
 	WSHOST1: ROOTPATH3,
+	APIHOST122:APIHOST122,
+	ROOTPATH123:ROOTPATH123,
 };

+ 162 - 0
common/httpRequest.js

@@ -229,6 +229,168 @@ module.exports = {
 			})
 		}
 	},
+	// 测试大魏
+	postJson2: function(url, data, header) {
+		header = header || "application/json";
+		url = this.config("APIHOST122") + url;
+		// let token = uni.getStorageSync("token");
+		let token = uni.getStorageSync("token");
+		if (token) {
+			return new Promise((succ, error) => {
+				uni.request({
+					url: url,
+					data: data,
+					method: "POST",
+					header: {
+						"content-type": header,
+						"token": token
+					},
+					success: function(result) {
+						// console.error(result);
+						if (result.data.code == 401 && token) {
+							uni.removeStorageSync("token")
+							uni.removeStorageSync("userId")
+							uni.removeStorageSync("phone")
+							uni.removeStorageSync("openid")
+							uni.removeStorageSync("userName")
+							uni.removeStorageSync("relation")
+							uni.removeStorageSync("relation_id")
+							uni.removeStorageSync("isInvitation")
+							uni.removeStorageSync("zhiFuBao")
+							uni.removeStorageSync("zhiFuBaoName")
+	
+							uni.showModal({
+								title: '提示',
+								content: '用户信息失效,请重新登录!',
+								showCancel: false, // 是否显示取消按钮,默认为 true // 是否显示取消按钮,默认为 true
+								success: function(res) {
+									if (res.confirm) {
+										uni.redirectTo({
+											url: '/pages/login/login'
+										})
+									}
+								}
+							});
+						}
+						succ.call(self, result.data)
+					},
+					fail: function(e) {
+						error.call(self, e)
+					}
+				})
+			})
+		} else {
+			return new Promise((succ, error) => {
+				uni.request({
+					url: url,
+					data: data,
+					method: "POST",
+					header: {
+						"content-type": header,
+					},
+					success: function(result) {
+						succ.call(self, result.data)
+					},
+					fail: function(e) {
+						error.call(self, e)
+					}
+				})
+			})
+		}
+	},
+	// 测试大魏
+	getT2: function(url, data, header) {
+		header = header || "application/x-www-form-urlencoded";
+		url = this.config("APIHOST122") + url;
+		let token = uni.getStorageSync("token");
+		if (token) {
+			return new Promise((succ, error) => {
+				uni.request({
+					url: url,
+					data: data,
+					method: "GET",
+					header: {
+						"content-type": header,
+						"token": token
+					},
+					success: function(result) {
+						if (result.data.code == 401 && token) {
+							uni.removeStorageSync("token")
+							uni.removeStorageSync("userId")
+							uni.removeStorageSync("phone")
+							uni.removeStorageSync("openid")
+							uni.removeStorageSync("userName")
+							uni.removeStorageSync("relation")
+							uni.removeStorageSync("relation_id")
+							uni.removeStorageSync("isInvitation")
+							uni.removeStorageSync("zhiFuBao")
+							uni.removeStorageSync("zhiFuBaoName")
+	
+							uni.showModal({
+								title: '提示',
+								content: '用户信息失效,请重新登录!',
+								showCancel: false, // 是否显示取消按钮,默认为 true // 是否显示取消按钮,默认为 true
+								success: function(res) {
+									if (res.confirm) {
+										uni.redirectTo({
+											url: '/pages/login/login'
+										})
+									}
+								}
+							});
+						}
+						succ.call(self, result.data)
+					},
+					fail: function(e) {
+						error.call(self, e)
+					}
+				})
+			})
+		} else {
+			return new Promise((succ, error) => {
+				uni.request({
+					url: url,
+					data: data,
+					method: "GET",
+					header: {
+						"content-type": header
+					},
+					success: function(result) {
+						if (result.data.code == 401) {
+							uni.removeStorageSync("token")
+							uni.removeStorageSync("userId")
+							uni.removeStorageSync("phone")
+							uni.removeStorageSync("openid")
+							uni.removeStorageSync("userName")
+							uni.removeStorageSync("relation")
+							uni.removeStorageSync("relation_id")
+							uni.removeStorageSync("isInvitation")
+							uni.removeStorageSync("zhiFuBao")
+							uni.removeStorageSync("zhiFuBaoName")
+	
+							uni.showModal({
+								title: '提示',
+								content: '用户信息失效,请重新登录!',
+								showCancel: false, // 是否显示取消按钮,默认为 true // 是否显示取消按钮,默认为 true
+								success: function(res) {
+									if (res.confirm) {
+										uni.redirectTo({
+											url: '/pages/login/login'
+										})
+									}
+								}
+							});
+						}
+						succ.call(self, result.data)
+					},
+					fail: function(e) {
+						error.call(self, e)
+					}
+				})
+			})
+		}
+	
+	},
 	getT: function(url, data, header) {
 		header = header || "application/x-www-form-urlencoded";
 		url = this.config("APIHOST1") + url;

+ 193 - 3
pages/index/index.vue

@@ -35,6 +35,7 @@
 						<view class="box_one" v-if="item.indentType==5">同城外卖</view>
 						<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
 						</view>
+						<view style="padding:0 10rpx;color:#FF7F00">{{item.shopName}}</view>
 						<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
 							{{item.itemType}}&nbsp;{{item.itemWeight}}
 						</view>
@@ -136,6 +137,7 @@
 						<view class="box_one" v-if="item.indentType==5">同城外卖</view>
 						<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
 						</view>
+						<view style="padding:0 10rpx;color:#FF7F00">{{item.shopName}}</view>
 						<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
 							{{item.itemType}}&nbsp;{{item.itemWeight}}
 						</view>
@@ -695,6 +697,63 @@
 				<view class="sure" @click="querenSh">确定</view>
 			</view>
 		</u-popup>
+		<!-- 确认收货拍照弹出框 -->
+		<u-popup v-model="alertPhone" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+			close-icon-size="45" width="680rpx" height="900rpx" @close="onclose">
+			<view class="receipt_code">
+				<view class="phone_title">图片凭证</view>
+				<view class="phone_title2">请在确认外卖送达后、通过拍照,进行现场还原</view>
+				<view>
+					<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
+						<view v-if="goodsPicture.length">
+							<view class="margin-top flex margin-right-sm flex-wrap">
+								<view class="flex"
+									style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
+									v-for="(image,index) in goodsPicture" :key="index">
+									<image :src="image" style="width: 100%;height: 100%;"></image>
+									<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
+										@click="removeImg(index,'lb')">
+										<u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
+									</view>
+				
+								</view>
+							</view>
+						</view>
+						<view class="margin-top" @click="addImages(1)" v-if="goodsPicture.length<=1">
+							<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
+								class="flex justify-center align-center">
+								<view>
+									<view class="text-center">
+										<image src="../../static/addimg.png" style="width: 65rpx;height: 55rpx;">
+										</image>
+									</view>
+									<view class="text-center text-black">添加图片</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="receipt_code" v-if="alertduan">
+					<view class="code_title">是否确认送达</view>
+					<view class="code_title2">已选订单:1单</view>
+					<view class="code_title2">通知形式:短信</view>
+					<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+					<view class="sure" @click="querenSh">确认送达</view>
+				</view>
+				<!-- <view class="sure" @click="querenduanxin">确认拍照</view> -->
+			</view>
+		</u-popup>
+		<!-- 确认收货选择短信框 -->
+		<!-- <u-popup v-model="alertduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+			close-icon-size="45" width="680rpx" height="600rpx">
+			<view class="receipt_code">
+				<view class="code_title">是否确认送达</view>
+				<view class="code_title2">已选订单:1单</view>
+				<view class="code_title2">通知形式:短信</view>
+				<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+				<view class="sure" @click="querenSh">确认送达</view>
+			</view>
+		</u-popup> -->
 	</view>
 </template>
 
@@ -704,6 +763,7 @@
 		requestAndroidPermission,
 		gotoAppPermissionSetting
 	} from '@/components/permission.js'
+	import configdata from '@/common/config.js';
 	export default {
 		components: {
 			empty
@@ -725,6 +785,8 @@
 		data() {
 			return {
 				Authorization: false,
+				alertPhone:false,//确认收货拍照弹出框
+				alertduan:false,//确认收货选择短信框
 				privacyContractName: '',
 				checkxdd: '否',
 				xddNumber: 0,
@@ -806,12 +868,17 @@
 				arr: [],
 				showModal111: true,
 				orderNum: 0,
+				goodsPicture: [],
+				count: 3,
+				duanxin:[],//发送的短信
+				qiPhone:'',//骑手电话
 			}
 		},
 		onHide() {
 			clearInterval(this.time)
 		},
 		onLoad() {
+			this.qiPhone=uni.getStorageSync('phone')
 			uni.showLoading({
 				title: '加载中...'
 
@@ -1108,6 +1175,7 @@
 						that.seen = res.data.onLineFlag == 1 ? false : true
 						// that.xddcheck = res.data.isSendMsg == 2 ? false : true;
 						that.checkCertification = res.data.checkCertification
+						uni.setStorageSync('phone',res.data.phone)
 						uni.setStorageSync("checkCertification", res.data.checkCertification);
 						if (that.seen) {
 							that.tit = '休息中'
@@ -1825,11 +1893,105 @@
 					this.shows = true
 
 				} else {
-					this.querenSh()
+					//需拍照的弹出框
+					this.alertPhone=true
+					// this.querenSh()
 				}
 
 			},
+			// 图片上传
+			addImages(e) {
+				if (e == 1) {
+					var num = this.goodsPicture.length
+					this.count = 2 - num
+				}
+			
+				let that = this
+				uni.chooseImage({
+					count: this.count,
+					sourceType: [ 'camera'],
+					success: res => {
+						for (let i = 0; i < res.tempFilePaths.length; i++) {
+							that.$queue.showLoading("上传中...");
+							uni.uploadFile({ // 上传接口
+								// url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
+								url: that.config("APIHOST1") + '/alioss/upload',
+								// url: 'https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload',
+								filePath: res.tempFilePaths[i],
+								name: 'file',
+								success: (uploadFileRes) => {
+									if (e == 1) {
+										if (that.goodsPicture.length < 2) {
+											that.goodsPicture.push(JSON.parse(uploadFileRes.data)
+												.data)
+										}
+									}
+									uni.hideLoading();
+									this.querenduanxin()
+								}
+							});
+						}
+					}
+				})
+			},
+			// 图片删除
+			removeImg(index, texts) {
+				if (texts == 'lb') {
+					this.goodsPicture.splice(index, 1)
+				}
+			},
+			config: function(name) {
+				var info = null;
+				if (name) {
+					var name2 = name.split("."); //字符分割
+					if (name2.length > 1) {
+						info = configdata[name2[0]][name2[1]] || null;
+					} else {
+						info = configdata[name] || null;
+					}
+					if (info == null) {
+						let web_config = cache.get("web_config");
+						if (web_config) {
+							if (name2.length > 1) {
+								info = web_config[name2[0]][name2[1]] || null;
+							} else {
+								info = web_config[name] || null;
+							}
+						}
+					}
+				}
+				return info;
+			},
+			// 监听拍照框关闭
+			onclose(){
+				this.alertPhone=false
+				this.alertduan = false
+				this.goodsPicture=[]
+			},
+			// 获取确认送达短信模板
+			querenduanxin() {
+				// this.$Request.postT('/app/tb-indent-sms/template', {
+				this.$Request.getT2('/app/tb-indent-sms/template', {
+					// indentNumber: this.indentNumber,
+					// itemCode: this.shouhuoma
+				}).then(res => {
+					console.log(res)
+					this.duanxin=res.data.list
+					if (res.code == 0) {
+						this.page = 1;
+						// this.alertPhone = false
+						this.alertduan = true
+			
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+					}
+				});
+			},
 			querenSh() {
+				var tupian=this.goodsPicture.toString()
 				// #ifdef MP-WEIXIN
 				if (uni.getStorageSync('sendMsg')) {
 					uni.requestSubscribeMessage({
@@ -1851,7 +2013,10 @@
 				// var date = new Date();
 				// var year = date.getFullYear();
 				// let Rcode = year + that.shouhuoma
-				that.$Request.postT('/app/tbindent/riderDelivery', {
+				// that.$Request.postT('/app/tbindent/riderDelivery', {
+				this.$Request.postJson2('/app/tbindent/riderDelivery', {
+					imgs:tupian,
+					smsTemplateId:this.duanxin[0].id,
 					indentNumber: that.indentNumber,
 					// itemCode: Rcode
 					itemCode: that.shouhuoma
@@ -1859,7 +2024,9 @@
 					console.log(res)
 					that.shouhuoma = '';
 					if (res.code == 0) {
-						that.shows = false
+						this.alertPhone = false
+						// this.alertduan = false
+						this.shows = false
 						uni.showToast({
 							title: '订单完成',
 							icon: "none"
@@ -2767,4 +2934,27 @@
 		margin-top: 30rpx;
 		letter-spacing: 2rpx;
 	}
+	/* 确认送达拍照框 */
+	.phone_title{
+		margin-top: 10px;
+		width: 100%;
+		height: 40px;
+		/* background-color: #FF7F00; */
+		text-align: center;
+		line-height: 40px;
+		/* color:#FFFFFF; */
+	}
+	.phone_title2{
+		margin-top: 10px;
+		text-align: center;
+		color:#9d9d9d;
+	}
+	.code_title2 {
+	    width: 100%;
+	    line-height: 50rpx;
+	    text-align: center;
+	    letter-spacing: 2rpx;
+	    margin-top: 21rpx;
+	    margin-bottom: 25rpx;
+	}
 </style>

+ 191 - 3
pages/index/orderdetail/orderdetail.vue

@@ -204,10 +204,68 @@
 			</view>
 		</u-popup>
 		<!-- <u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton> -->
+		<!-- 确认收货拍照弹出框 -->
+		<u-popup v-model="alertPhone" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+			close-icon-size="45" width="680rpx" height="900rpx" @close="onclose">
+			<view class="receipt_code">
+				<view class="phone_title">图片凭证</view>
+				<view class="phone_title2">请在确认外卖送达后、通过拍照,进行现场还原</view>
+				<view>
+					<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
+						<view v-if="goodsPicture.length">
+							<view class="margin-top flex margin-right-sm flex-wrap">
+								<view class="flex"
+									style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
+									v-for="(image,index) in goodsPicture" :key="index">
+									<image :src="image" style="width: 100%;height: 100%;"></image>
+									<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
+										@click="removeImg(index,'lb')">
+										<u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
+									</view>
+				
+								</view>
+							</view>
+						</view>
+						<view class="margin-top" @click="addImages(1)" v-if="goodsPicture.length<=1">
+							<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
+								class="flex justify-center align-center">
+								<view>
+									<view class="text-center">
+										<image src="../../../static/addimg.png" style="width: 65rpx;height: 55rpx;">
+										</image>
+									</view>
+									<view class="text-center text-black">添加图片</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="receipt_code" v-if="alertduan">
+					<view class="code_title">是否确认送达</view>
+					<view class="code_title2">已选订单:1单</view>
+					<view class="code_title2">通知形式:短信</view>
+					<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+					<view class="sure" @click="querenSh">确认送达</view>
+				</view>
+				<!-- <view class="sure" @click="querenduanxin">确认拍照</view> -->
+			</view>
+		</u-popup>
+		<!-- 确认收货选择短信框 -->
+		<!-- <u-popup v-model="alertduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+			close-icon-size="45" width="680rpx" height="600rpx">
+			<view class="receipt_code">
+				<view class="code_title">是否确认送达</view>
+				<view class="code_title2">已选订单:1单</view>
+				<view class="code_title2">通知形式:短信</view>
+				<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+				<view class="sure" @click="querenSh">确认送达</view>
+			</view>
+		</u-popup> -->
 	</view>
 </template>
 
 <script>
+	import configdata from '@/common/config.js';
 	export default {
 		data() {
 			return {
@@ -227,10 +285,17 @@
 				RiderUnreadCount: 0,
 				indentId: '',
 				showOrder: false,
-				phone: ''
+				phone: '',
+				alertPhone:false,//确认收货拍照弹出框
+				alertduan:false,//确认收货选择短信框
+				goodsPicture: [],
+				count: 3,
+				duanxin:[],//发送的短信
+				qiPhone:'',//骑手电话
 			}
 		},
 		onLoad(options) {
+			this.qiPhone=uni.getStorageSync('phone')
 			var that = this
 			console.error(options)
 			// uni.showLoading({
@@ -492,19 +557,119 @@
 					this.show = true
 
 				} else {
-					this.querenSh()
+					//需拍照的弹出框
+					this.alertPhone=true
+					// this.querenSh()
 				}
 
 			},
+			// 图片上传
+			addImages(e) {
+				if (e == 1) {
+					var num = this.goodsPicture.length
+					this.count = 2 - num
+				}
+			
+				let that = this
+				uni.chooseImage({
+					count: this.count,
+					sourceType: [ 'camera'],
+					success: res => {
+						for (let i = 0; i < res.tempFilePaths.length; i++) {
+							that.$queue.showLoading("上传中...");
+							uni.uploadFile({ // 上传接口
+								// url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
+								url: that.config("APIHOST1") + '/alioss/upload',
+								// url: 'https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload',
+								filePath: res.tempFilePaths[i],
+								name: 'file',
+								success: (uploadFileRes) => {
+									if (e == 1) {
+										if (that.goodsPicture.length < 2) {
+											that.goodsPicture.push(JSON.parse(uploadFileRes.data)
+												.data)
+										}
+									}
+									uni.hideLoading();
+									this.querenduanxin()
+								}
+							});
+						}
+					}
+				})
+			},
+			// 图片删除
+			removeImg(index, texts) {
+				if (texts == 'lb') {
+					this.goodsPicture.splice(index, 1)
+				}
+			},
+			config: function(name) {
+				var info = null;
+				if (name) {
+					var name2 = name.split("."); //字符分割
+					if (name2.length > 1) {
+						info = configdata[name2[0]][name2[1]] || null;
+					} else {
+						info = configdata[name] || null;
+					}
+					if (info == null) {
+						let web_config = cache.get("web_config");
+						if (web_config) {
+							if (name2.length > 1) {
+								info = web_config[name2[0]][name2[1]] || null;
+							} else {
+								info = web_config[name] || null;
+							}
+						}
+					}
+				}
+				return info;
+			},
+			// 监听拍照框关闭
+			onclose(){
+				console.log('关闭')
+				this.alertPhone=false
+				this.alertduan = false
+				this.goodsPicture=[]
+			},
+			// 获取确认送达短信模板
+			querenduanxin() {
+				// this.$Request.postT('/app/tb-indent-sms/template', {
+				this.$Request.getT2('/app/tb-indent-sms/template', {
+					// indentNumber: this.indentNumber,
+					// itemCode: this.shouhuoma
+				}).then(res => {
+					console.log(res)
+					this.duanxin=res.data.list
+					if (res.code == 0) {
+						this.page = 1;
+						// this.alertPhone = false
+						this.alertduan = true
+			
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+					}
+				});
+			},
 			querenSh() {
+				var tupian=this.goodsPicture.toString()
 				let that = this
 
-				that.$Request.postT('/app/tbindent/riderDelivery', {
+				that.$Request.postJson2('/app/tbindent/riderDelivery', {
+					imgs:tupian,
+					smsTemplateId:this.duanxin[0].id,
 					indentNumber: that.indentNumber,
 					itemCode: that.shouhuoma
 				}).then(res => {
 					console.log(res)
 					if (res.code == 0) {
+						this.alertPhone = false
+						// this.alertduan = false
+						this.shows = false
 
 						uni.showToast({
 							title: '订单完成',
@@ -972,4 +1137,27 @@
 		top: -66px;
 		left: 35px;
 	}
+	/* 确认送达拍照框 */
+	.phone_title{
+		margin-top: 10px;
+		width: 100%;
+		height: 40px;
+		/* background-color: #FF7F00; */
+		text-align: center;
+		line-height: 40px;
+		/* color:#FFFFFF; */
+	}
+	.phone_title2{
+		margin-top: 10px;
+		text-align: center;
+		color:#9d9d9d;
+	}
+	.code_title2 {
+	    width: 100%;
+	    line-height: 50rpx;
+	    text-align: center;
+	    letter-spacing: 2rpx;
+	    margin-top: 21rpx;
+	    margin-bottom: 25rpx;
+	}
 </style>

+ 189 - 3
pages/riderMy/order.vue

@@ -773,6 +773,63 @@
 					<view class="sure" @click="querenSh">确定</view>
 				</view>
 			</u-popup>
+			<!-- 确认收货拍照弹出框 -->
+			<u-popup v-model="alertPhone" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+				close-icon-size="45" width="680rpx" height="900rpx" @close="onclose">
+				<view class="receipt_code">
+					<view class="phone_title">图片凭证</view>
+					<view class="phone_title2">请在确认外卖送达后、通过拍照,进行现场还原</view>
+					<view>
+						<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
+							<view v-if="goodsPicture.length">
+								<view class="margin-top flex margin-right-sm flex-wrap">
+									<view class="flex"
+										style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
+										v-for="(image,index) in goodsPicture" :key="index">
+										<image :src="image" style="width: 100%;height: 100%;"></image>
+										<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
+											@click="removeImg(index,'lb')">
+											<u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
+										</view>
+					
+									</view>
+								</view>
+							</view>
+							<view class="margin-top" @click="addImages(1)" v-if="goodsPicture.length<=1">
+								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
+									class="flex justify-center align-center">
+									<view>
+										<view class="text-center">
+											<image src="../../static/addimg.png" style="width: 65rpx;height: 55rpx;">
+											</image>
+										</view>
+										<view class="text-center text-black">添加图片</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="receipt_code" v-if="alertduan">
+						<view class="code_title">是否确认送达</view>
+						<view class="code_title2">已选订单:1单</view>
+						<view class="code_title2">通知形式:短信</view>
+						<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+						<view class="sure" @click="querenSh">确认送达</view>
+					</view>
+					<!-- <view class="sure" @click="querenduanxin">确认拍照</view> -->
+				</view>
+			</u-popup>
+			<!-- 确认收货选择短信框 -->
+			<!-- <u-popup v-model="alertduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
+				close-icon-size="45" width="680rpx" height="600rpx">
+				<view class="receipt_code">
+					<view class="code_title">是否确认送达</view>
+					<view class="code_title2">已选订单:1单</view>
+					<view class="code_title2">通知形式:短信</view>
+					<view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
+					<view class="sure" @click="querenSh">确认送达</view>
+				</view>
+			</u-popup> -->
 		</view>
 
 	</view>
@@ -780,6 +837,7 @@
 
 <script>
 	import empty from '@/components/empty'
+	import configdata from '@/common/config.js';
 	export default {
 		components: {
 			empty
@@ -787,6 +845,8 @@
 		data() {
 			return {
 				shows: false,
+				alertPhone:false,//确认收货拍照弹出框
+				alertduan:false,//确认收货选择短信框
 				closeable: true,
 				shouhuoma: '',
 				list: [{
@@ -809,9 +869,14 @@
 				latitude: '', //纬度
 				indentState: '', //订单状态
 				indentNumber: '', //订单号
+				goodsPicture: [],
+				count: 3,
+				duanxin:[],//发送的短信
+				qiPhone:'',//骑手电话
 			}
 		},
 		onLoad() {
+			this.qiPhone=uni.getStorageSync('phone')
 
 			var that = this
 			uni.getLocation({
@@ -962,13 +1027,109 @@
 				this.indentNumber = e.indentNumber
 				if (e.itemCodeFlag == 0) {
 					this.shows = true
-
 				} else {
-					this.querenSh()
+					//需拍照的弹出框
+					this.alertPhone=true
+					// this.querenSh()
+				}
+			},
+			// 图片上传
+			addImages(e) {
+				if (e == 1) {
+					var num = this.goodsPicture.length
+					this.count = 2 - num
+				}
+			
+				let that = this
+				uni.chooseImage({
+					count: this.count,
+					sourceType: ['camera'],
+					success: res => {
+						for (let i = 0; i < res.tempFilePaths.length; i++) {
+							that.$queue.showLoading("上传中...");
+							uni.uploadFile({ // 上传接口
+								url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
+								// url: 'https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload',
+								filePath: res.tempFilePaths[i],
+								name: 'file',
+								success: (uploadFileRes) => {
+									if (e == 1) {
+										if (that.goodsPicture.length < 2) {
+											that.goodsPicture.push(JSON.parse(uploadFileRes.data)
+												.data)
+										}
+									}
+									uni.hideLoading();
+									this.querenduanxin()
+								}
+							});
+						}
+					}
+				})
+			},
+			// 图片删除
+			removeImg(index, texts) {
+				if (texts == 'lb') {
+					this.goodsPicture.splice(index, 1)
 				}
 			},
+			config: function(name) {
+				var info = null;
+				if (name) {
+					var name2 = name.split("."); //字符分割
+					if (name2.length > 1) {
+						info = configdata[name2[0]][name2[1]] || null;
+					} else {
+						info = configdata[name] || null;
+					}
+					if (info == null) {
+						let web_config = cache.get("web_config");
+						if (web_config) {
+							if (name2.length > 1) {
+								info = web_config[name2[0]][name2[1]] || null;
+							} else {
+								info = web_config[name] || null;
+							}
+						}
+					}
+				}
+				return info;
+			},
+			// 监听拍照框关闭
+			onclose(){
+				this.alertPhone=false
+				this.alertduan = false
+				this.goodsPicture=[]
+			},
+			// 获取确认送达短信模板
+			querenduanxin() {
+				// this.$Request.postT('/app/tb-indent-sms/template', {
+				this.$Request.getT2('/app/tb-indent-sms/template', {
+					// indentNumber: this.indentNumber,
+					// itemCode: this.shouhuoma
+				}).then(res => {
+					console.log(res)
+					this.duanxin=res.data.list
+					if (res.code == 0) {
+						this.page = 1;
+						// this.alertPhone = false
+						this.alertduan = true
+			
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+					}
+				});
+			},
 			querenSh() {
-				this.$Request.postT('/app/tbindent/riderDelivery', {
+				var tupian=this.goodsPicture.toString()
+				console.log(this.goodsPicture.toString())
+				// this.$Request.postT('/app/tbindent/riderDelivery', {
+				this.$Request.postJson2('/app/tbindent/riderDelivery', {
+					imgs:tupian,
+					smsTemplateId:this.duanxin[0].id,
 					indentNumber: this.indentNumber,
 					itemCode: this.shouhuoma
 				}).then(res => {
@@ -980,6 +1141,8 @@
 							title: '订单完成',
 							icon: "none"
 						});
+						this.alertPhone = false
+						// this.alertduan = false
 						this.shows = false
 
 					} else {
@@ -1235,4 +1398,27 @@
 		margin-top: 30rpx;
 		letter-spacing: 2rpx;
 	}
+	/* 确认送达拍照框 */
+	.phone_title{
+		margin-top: 10px;
+		width: 100%;
+		height: 40px;
+		/* background-color: #FF7F00; */
+		text-align: center;
+		line-height: 40px;
+		/* color:#FFFFFF; */
+	}
+	.phone_title2{
+		margin-top: 10px;
+		text-align: center;
+		color:#9d9d9d;
+	}
+	.code_title2 {
+	    width: 100%;
+	    line-height: 50rpx;
+	    text-align: center;
+	    letter-spacing: 2rpx;
+	    margin-top: 21rpx;
+	    margin-bottom: 25rpx;
+	}
 </style>

+ 1 - 0
pages/riderMy/riderMy.vue

@@ -442,6 +442,7 @@
 							this.avatar = res.data.avatar ? res.data.avatar : '../../static/logo.png'
 							this.nickName = res.data.nickName
 							uni.setStorageSync('userName',res.data.userName)
+							uni.setStorageSync('phone',res.data.phone)
 							this.checkCertification = res.data.checkCertification
 							console.log(this.checkCertification, '实名认证')
 							this.userId = res.data.userId

BIN
static/addimg.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/orderdetail/orderdetail.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/riderMy/order.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/riderMy/riderMy.js.map


+ 1 - 2
unpackage/dist/dev/mp-weixin/app.json

@@ -59,6 +59,5 @@
     "getLocation",
     "chooseLocation"
   ],
-  "usingComponents": {},
-  "sitemapLocation": "sitemap.json"
+  "usingComponents": {}
 }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2 - 2
unpackage/dist/dev/mp-weixin/common/vendor.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 24 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -710,3 +710,27 @@ button::after {
 	letter-spacing: 2rpx;
 }
 
+/* 确认送达拍照框 */
+.phone_title{
+	margin-top: 10px;
+	width: 100%;
+	height: 40px;
+	/* background-color: #FF7F00; */
+	text-align: center;
+	line-height: 40px;
+	/* color:#FFFFFF; */
+}
+.phone_title2{
+	margin-top: 10px;
+	text-align: center;
+	color:#9d9d9d;
+}
+.code_title2 {
+    width: 100%;
+    line-height: 50rpx;
+    text-align: center;
+    letter-spacing: 2rpx;
+    margin-top: 21rpx;
+    margin-bottom: 25rpx;
+}
+

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.wxml


+ 24 - 0
unpackage/dist/dev/mp-weixin/pages/index/orderdetail/orderdetail.wxss

@@ -354,3 +354,27 @@ page {
 	left: 35px;
 }
 
+/* 确认送达拍照框 */
+.phone_title{
+	margin-top: 10px;
+	width: 100%;
+	height: 40px;
+	/* background-color: #FF7F00; */
+	text-align: center;
+	line-height: 40px;
+	/* color:#FFFFFF; */
+}
+.phone_title2{
+	margin-top: 10px;
+	text-align: center;
+	color:#9d9d9d;
+}
+.code_title2 {
+    width: 100%;
+    line-height: 50rpx;
+    text-align: center;
+    letter-spacing: 2rpx;
+    margin-top: 21rpx;
+    margin-bottom: 25rpx;
+}
+

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/riderMy/order.js


+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/riderMy/order.json

@@ -6,6 +6,7 @@
     "u-line": "/uview-ui/components/u-line/u-line",
     "u-popup": "/uview-ui/components/u-popup/u-popup",
     "u-input": "/uview-ui/components/u-input/u-input",
+    "u-icon": "/uview-ui/components/u-icon/u-icon",
     "empty": "/components/empty"
   }
 }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/riderMy/order.wxml


+ 24 - 0
unpackage/dist/dev/mp-weixin/pages/riderMy/order.wxss

@@ -199,3 +199,27 @@ page {
 	letter-spacing: 2rpx;
 }
 
+/* 确认送达拍照框 */
+.phone_title{
+	margin-top: 10px;
+	width: 100%;
+	height: 40px;
+	/* background-color: #FF7F00; */
+	text-align: center;
+	line-height: 40px;
+	/* color:#FFFFFF; */
+}
+.phone_title2{
+	margin-top: 10px;
+	text-align: center;
+	color:#9d9d9d;
+}
+.code_title2 {
+    width: 100%;
+    line-height: 50rpx;
+    text-align: center;
+    letter-spacing: 2rpx;
+    margin-top: 21rpx;
+    margin-bottom: 25rpx;
+}
+

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/riderMy/riderMy.js


BIN
unpackage/dist/dev/mp-weixin/static/addimg.png