|
|
@@ -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}} {{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}} {{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>
|