|
|
@@ -84,6 +84,17 @@
|
|
|
</view>
|
|
|
|
|
|
<u-line color="#f2f2f2" />
|
|
|
+ <view class="padding-bottom padding-lr margin-top-sm text-gray" style="margin-left: 120px;display: flex;">
|
|
|
+
|
|
|
+ <view class="flex"
|
|
|
+ v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1">
|
|
|
+ <view class="btn_" @click.stop="duanxinOrder(item)" style="width: 90px;">送达并发短信</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex"
|
|
|
+ v-if="item.status == 3&&item.orderType==2 &&item.deliveryImgs==null">
|
|
|
+ <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="flex align-center justify-between padding-tb">
|
|
|
<view class="flex align-center padding-lr-sm">
|
|
|
<view class="text-gray text-sm">实收:</view>
|
|
|
@@ -111,6 +122,10 @@
|
|
|
<view class="flex" v-if="item.status == 7">
|
|
|
<view class="btn_" @click.stop="jiedans(item)">拒绝接单</view>
|
|
|
</view>
|
|
|
+ <view class="flex"
|
|
|
+ v-if="item.status == 4&&item.orderType==2 &&item.deliveryImgs==null">
|
|
|
+ <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
|
|
|
+ </view>
|
|
|
<view class="flex" v-if="item.status == 6||item.status == 3||item.status == 4">
|
|
|
<view class="btn_" @click.stop="xiaoPiao(item)">补打小票</view>
|
|
|
</view>
|
|
|
@@ -129,7 +144,80 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+ <!-- 确认收货拍照弹出框 -->
|
|
|
+ <u-popup v-model="alertPhone" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
|
|
|
+ close-icon-size="45" width="680rpx" height="540rpx" @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="https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/duanxin/addimg.png" style="width: 65rpx;height: 55rpx;">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="text-center text-black">添加图片</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="sure" @click="querenduanxin">确认拍照</view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 确认收货短信弹出框 -->
|
|
|
+ <u-popup v-model="alertduanxin" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
|
|
|
+ close-icon-size="45" width="680rpx" height="700rpx" @close="onclose2">
|
|
|
+ <view class="receipt_code">
|
|
|
+ <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="code_title3">注:发送短信需要收费,每条{{duanPrice}}元</view>
|
|
|
+ <view class="sure" @click="querenSh">确认送达</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 发送短信出错弹框 -->
|
|
|
+ <u-popup v-model="ifNotduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
|
|
|
+ close-icon-size="45" width="680rpx" height="700rpx">
|
|
|
+ <view class="receipt_code">
|
|
|
+ <view class="receipt_code">
|
|
|
+ <view class="code_title">是否确认送达</view>
|
|
|
+ <view class="text-center">
|
|
|
+ <image src="https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/duanxin/%E7%94%BB%E6%9D%BF%202.png" style="width: 33px;height: 33px;">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="code_title2">发送失败</view>
|
|
|
+ <view class="code_title2">原因:{{failYuanyin}},短信发送失败,请点击拨号联系学生</view>
|
|
|
+ <view class="sure2" @click="phoneToxue(xuePhone)">
|
|
|
+ <image src="https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/duanxin/%E7%94%BB%E6%9D%BF%201.png" style="width: 33rpx;height: 33rpx;">
|
|
|
+ </image>
|
|
|
+ {{xuePhone}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
<!-- 筛选弹框 -->
|
|
|
<view class="box" v-if="show">
|
|
|
<view class="popbox" @click.stop="shop = false">
|
|
|
@@ -166,6 +254,7 @@
|
|
|
|
|
|
<script>
|
|
|
import empty from '@/components/empty.vue'
|
|
|
+ import configdata from '@/common/config.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
empty
|
|
|
@@ -223,7 +312,19 @@
|
|
|
}
|
|
|
],
|
|
|
arr:[],
|
|
|
+ closeable: true,
|
|
|
show1: true,
|
|
|
+ alertPhone:false,
|
|
|
+ alertduanxin:false,
|
|
|
+ goodsPicture: [],//拍照图片
|
|
|
+ count: 3,
|
|
|
+ orderId:'',
|
|
|
+ duanxin:[],//发送的短信
|
|
|
+ duanPrice:'',//短信费用
|
|
|
+ qiPhone:'',//骑手电话
|
|
|
+ ifNotduan:false,//发送短信出错
|
|
|
+ failYuanyin:'',//短信发送失败原因
|
|
|
+ xuePhone:'',//当前用户
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
@@ -257,6 +358,7 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.qiPhone=uni.getStorageSync('mobile')
|
|
|
this.shopId = uni.getStorageSync('shopId');
|
|
|
this.getOrderList();
|
|
|
this.clearOrderMsg();
|
|
|
@@ -398,6 +500,201 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //发短信送达
|
|
|
+ duanxinOrder(e){
|
|
|
+ this.orderId=e.orderId
|
|
|
+ this.xuePhone=e.phone
|
|
|
+ this.querenduanxinList()
|
|
|
+ this.getDuanPrice()
|
|
|
+ },
|
|
|
+ //拍照
|
|
|
+ paiOrder(e){
|
|
|
+ this.orderId=e.orderId
|
|
|
+ this.alertPhone=true
|
|
|
+ },
|
|
|
+ // 图片上传
|
|
|
+ addImages(e) {
|
|
|
+ if (e == 1) {
|
|
|
+ var num = this.goodsPicture.length
|
|
|
+ this.count = 2 - num
|
|
|
+ }
|
|
|
+
|
|
|
+ let that = this
|
|
|
+ uni.chooseImage({
|
|
|
+ count: this.count,
|
|
|
+ sourceType: [ 'camera','album'],
|
|
|
+ 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.goodsPicture=[]
|
|
|
+ },
|
|
|
+ //确认上传图片
|
|
|
+ querenduanxin(){
|
|
|
+ var tupian=this.goodsPicture.toString()
|
|
|
+ var orderId=this.orderId
|
|
|
+ this.$Request.postJson(`/admin/order/add-receive-img/${orderId}?img=`+tupian, {
|
|
|
+
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res,'img')
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.alertPhone = false
|
|
|
+ uni.showToast({
|
|
|
+ title: '图片上传完成',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取确认送达短信模板
|
|
|
+ querenduanxinList() {
|
|
|
+ this.$Request.getT('/app/tb-indent-sms/template', {
|
|
|
+ }).then(res => {
|
|
|
+ this.duanxin=res.data.list
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.page = 1;
|
|
|
+ this.alertduanxin=true
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取短信价格
|
|
|
+ getDuanPrice(){
|
|
|
+ this.$Request.getT('/admin/tb-indent-sms/price-of-sms', {
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.duanPrice= res.data
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //发短信并送达
|
|
|
+ querenSh() {
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ if (uni.getStorageSync('sendindexMsg')) {
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
+ tmplIds: this.arr,
|
|
|
+ success(re) {
|
|
|
+ // console.log(re,'**********')
|
|
|
+ var datas = JSON.stringify(re);
|
|
|
+ if (datas.indexOf("accept") != -1) {
|
|
|
+ console.log(re)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: (res) => {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+ let that = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认发送短信并完成送达吗?',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ let data = {
|
|
|
+ orderId: that.orderId,
|
|
|
+ sendSmsFlag:1,
|
|
|
+ smsTemplateId:that.duanxin[0].id
|
|
|
+ }
|
|
|
+ that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ that.alertduanxin=false
|
|
|
+ that.xuePhone=''
|
|
|
+ that.getOrderList()
|
|
|
+ uni.showToast({
|
|
|
+ title: '配送成功',
|
|
|
+ icon: "success"
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ that.failYuanyin=res.msg
|
|
|
+ that.alertduanxin=false
|
|
|
+ that.xuePhone=''
|
|
|
+ that.ifNotduan=true
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //联系学生
|
|
|
+ phoneToxue(e){
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: e ,
|
|
|
+ }) // 传参带入号码即可
|
|
|
+ },
|
|
|
// 完成送达
|
|
|
succOrder(e){
|
|
|
// #ifdef MP-WEIXIN
|
|
|
@@ -426,6 +723,7 @@
|
|
|
console.log('用户点击确定');
|
|
|
let data = {
|
|
|
orderId: e.orderId,
|
|
|
+ sendSmsFlag:0
|
|
|
// orderNumber: e.orderNumber,
|
|
|
// shopId: that.shopId,
|
|
|
// addressId: e.addressId,
|
|
|
@@ -537,7 +835,6 @@
|
|
|
uni.requestSubscribeMessage({
|
|
|
tmplIds: this.arr,
|
|
|
success(re) {
|
|
|
- // console.log(re,'**********')
|
|
|
var datas = JSON.stringify(re);
|
|
|
if (datas.indexOf("accept") != -1) {
|
|
|
console.log(re)
|
|
|
@@ -920,6 +1217,20 @@
|
|
|
border-radius: 8rpx; */
|
|
|
}
|
|
|
|
|
|
+ /* 拍照 */
|
|
|
+ .btn_pai{
|
|
|
+ width: 150rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(255, 201, 189, 1);
|
|
|
+ font-size: 28rpx;
|
|
|
+ border: 2rpx solid rgba(255, 201, 189, 1);
|
|
|
+ color: #333333;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-left: 15rpx;
|
|
|
+ }
|
|
|
.btn_ {
|
|
|
width: 150rpx;
|
|
|
height: 60rpx;
|
|
|
@@ -1268,4 +1579,98 @@
|
|
|
.u-border-top:after {
|
|
|
border: none !important;
|
|
|
}
|
|
|
+
|
|
|
+ /* 收货码弹框 */
|
|
|
+ .receipt_code {
|
|
|
+ width: 90%;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .code_title {
|
|
|
+ width: 100%;
|
|
|
+ line-height: 100rpx;
|
|
|
+ font-size: 31rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ letter-spacing: 2rpx;
|
|
|
+ margin-top: 21rpx;
|
|
|
+ margin-bottom: 25rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .u-input--border {
|
|
|
+ border: 1px solid #F2F2F2 !important;
|
|
|
+ background: #F2F2F2 !important;
|
|
|
+ color: #999999 !important;
|
|
|
+ font-weight: 500 !important;
|
|
|
+ letter-spacing: 2rpx !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .u-input__input {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ flex: 1;
|
|
|
+ color: #999999 !important;
|
|
|
+ min-height: 85rpx !important;
|
|
|
+ margin-top: 7rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sure {
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ background: rgba(245, 211, 71, 1);
|
|
|
+ color: white;
|
|
|
+ border-radius: 46rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 80rpx;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ letter-spacing: 2rpx;
|
|
|
+ }
|
|
|
+ .sure2{
|
|
|
+ text-align: center;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ line-height: 80rpx;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ opacity: 1;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ background: rgba(245, 211, 71, 1);
|
|
|
+ }
|
|
|
+ /* 确认送达拍照框 */
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+ .code_title3{
|
|
|
+ margin-left: -20px;
|
|
|
+ margin-top: 21rpx;
|
|
|
+ margin-bottom: 25rpx;
|
|
|
+ width: 638rpx;
|
|
|
+ height: 66rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ background: rgba(255, 245, 245, 1);
|
|
|
+ font-size: 24rpx;
|
|
|
+ line-height: 66rpx;
|
|
|
+ color: rgba(212, 48, 48, 1);
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
</style>
|