|
|
@@ -1,24 +1,40 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
-
|
|
|
<view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
|
|
|
- <view class="flex-space title" style="position: relative;">
|
|
|
+ <view class="flex-space title">
|
|
|
客户
|
|
|
- <button class="admin-button-com bule" @click.stop="copyCustom(detailInfo)"
|
|
|
- style="width:170upx;height:70upx;line-height:50upx;position: absolute;right:4upx;">复制地址</button>
|
|
|
</view>
|
|
|
<view class="address-des_bx content-box">
|
|
|
<view @click.stop="goCustom(detailInfo)">
|
|
|
<view style="overflow:hidden;text-overflow:ellipsis;white-space: nowrap;width:450upx;"> {{ detailInfo.customName }} {{ detailInfo.customMobile }}</view>
|
|
|
<view style="margin-bottom:20upx;color:#333333">店长 {{ detailInfo.customSuper.name||''}}</view>
|
|
|
- <view>
|
|
|
- {{ detailInfo.customAddress}}
|
|
|
- <block v-if="!$util.isEmpty(detailInfo.showAddress) && detailInfo.showAddress != detailInfo.customAddress">({{detailInfo.showAddress}})</block>
|
|
|
+ <view style="margin-bottom:15upx;color:black;">{{ detailInfo.customAddress}}</view>
|
|
|
+ <view v-if="!$util.isEmpty(detailInfo.showAddress) && detailInfo.showAddress != detailInfo.customAddress" style="color:#656363;">{{detailInfo.showAddress}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="right-btns">
|
|
|
+ <view class="icon-btns">
|
|
|
+ <i @click.stop="callUp(detailInfo.customMobile)" class="iconfont icondianhua1"></i>
|
|
|
+ <i @click.stop="navigateTo(detailInfo.lat,detailInfo.long,detailInfo.customName)" class="iconfont icondianhua"></i>
|
|
|
</view>
|
|
|
+ <button class="admin-button-com bule middle copy-address" @click.stop="copyCustom(detailInfo)">复制地址</button>
|
|
|
</view>
|
|
|
- <view>
|
|
|
- <i @click.stop="callUp(detailInfo.customMobile)" class="iconfont icondianhua1"></i>
|
|
|
- <i @click.stop="navigateTo(detailInfo.lat,detailInfo.long,detailInfo.customName)" class="iconfont icondianhua" style="font-size:53upx;margin-left:40upx;margin-right:25upx;color:#3385ff;"></i>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex-space title" v-if="Number(detailInfo.sendStatus)>-1">配送进度</view>
|
|
|
+ <view class="content-box" v-if="Number(detailInfo.sendStatus)>-1">
|
|
|
+ <view class="order-msg-blo" style="padding: 20upx;">
|
|
|
+ <view class="msg-list">
|
|
|
+ <view class="label"><text @click="showMySimPop">配</text>送平台:</view>
|
|
|
+ <view class="value">{{getExpressPlatformText(detailInfo.deliveryId)}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="msg-list express-progress-row">
|
|
|
+ <view class="label">配送进度:</view>
|
|
|
+ <view class="value" :style="detailInfo.sendStatus == '3' ? 'color:#ff2842;font-weight:bold;' : detailInfo.sendStatus == '2' ? 'color:#07c160;font-weight:bold;' : ''">{{getProgressText(detailInfo.sendStatus)}}</view>
|
|
|
+ <view class="express-actions">
|
|
|
+ <button class="admin-button-com mini-btn btn-danger" v-if="detailInfo.sendStatus == '0' || detailInfo.sendStatus == '1'" @click.stop="cancelMyExpress(detailInfo.id)">取消跑腿</button>
|
|
|
+ <button class="admin-button-com mini-btn" v-if="detailInfo.sendStatus == '3'" @click.stop="openExpressPage()">重叫跑腿</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -398,6 +414,8 @@
|
|
|
<button class="admin-button-com middle blue" @click="shareOrder()">分享</button>
|
|
|
<!-- #endif -->
|
|
|
|
|
|
+ <button class="admin-button-com middle blue" v-if="detailInfo.sendStatus == '-1' && detailInfo.payStatus == 1" @click.stop="openExpressPage()">呼叫跑腿</button>
|
|
|
+
|
|
|
<button class="admin-button-com middle blue" style="background-color: green;border-color: green;" v-if="detailInfo.status != 1 && detailInfo.status != 5" @click="printOrder(detailInfo)">打印(无价格)</button>
|
|
|
|
|
|
<template v-for="s in detailInfo.buttonList">
|
|
|
@@ -474,6 +492,30 @@
|
|
|
|
|
|
<mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
|
|
|
|
|
|
+ <!-- 模拟接口使用 -->
|
|
|
+ <view class="goods-modal-mask" v-if="simModal" @click="hideMnPop">
|
|
|
+ <view class="goods-modal" @click.stop>
|
|
|
+ <view class="modal-header">
|
|
|
+ <text class="modal-title">请选择</text>
|
|
|
+ <text class="modal-close" @click="hideMnPop">×</text>
|
|
|
+ </view>
|
|
|
+ <view class="modal-body">
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(10000)">订单创建成功,等待接单</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(20000)">商家取消订单</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(20001)">配送方取消订单</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(30000)">配送员接单</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(40000)">配送员到店</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(50000)">配送中</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(60000)">配送员撤单</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(70000)">配送完成</button>
|
|
|
+ <button class="admin-button-com middle" @click="setMnNum(90000)">配送异常</button>
|
|
|
+ </view>
|
|
|
+ <view class="modal-footer">
|
|
|
+ <button class="modal-btn cancel-btn" @click="hideMnPop">取消</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -494,7 +536,8 @@ import { delItem,updateRemarkItemFn } from "@/api/order-item";
|
|
|
import { getAllStaff } from "@/api/shop-admin"
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
|
|
|
-import { getCgExpressTrack } from "@/api/express"
|
|
|
+import { getCgExpressTrack,expressDetail } from "@/api/express"
|
|
|
+import { cancelCallExpressOrder,mockNotify } from '@/api/shop/shop-express'
|
|
|
export default {
|
|
|
name: "orderDetail",
|
|
|
components: {
|
|
|
@@ -536,7 +579,9 @@ export default {
|
|
|
payDate:'',
|
|
|
currentItem:[],
|
|
|
staffListData:[],
|
|
|
- trackList:[]
|
|
|
+ trackList:[],
|
|
|
+ simModal: false,
|
|
|
+ simNum:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -580,6 +625,60 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ showMySimPop() {
|
|
|
+ this.simModal = true
|
|
|
+ },
|
|
|
+ setMnNum(num){
|
|
|
+ this.hideMnPop()
|
|
|
+ this.simNum = num
|
|
|
+ this.confirmSimData()
|
|
|
+ },
|
|
|
+ hideMnPop() {
|
|
|
+ this.simModal = false
|
|
|
+ },
|
|
|
+ confirmSimData() {
|
|
|
+ let that = this
|
|
|
+ this.hideMnPop()
|
|
|
+ expressDetail({ orderId: this.option.id }).then(res => {
|
|
|
+ mockNotify({orderStatus:this.simNum,wxOrderId:res.data.wxOrderId}).then(ret=>{
|
|
|
+ that.init()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //取消跑腿
|
|
|
+ cancelMyExpress(orderId) {
|
|
|
+ this.$util.confirmModal({content: '确认取消?(若配送员接单1分钟后取消,扣2元违约金)'}, async () => {
|
|
|
+ const res = await cancelCallExpressOrder({orderId: orderId})
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.$msg('取消成功')
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //呼叫跑腿
|
|
|
+ openExpressPage() {
|
|
|
+ this.$util.pageTo({url: '/admin/order/callExpress?orderId='+this.detailInfo.id})
|
|
|
+ },
|
|
|
+ //获取配送平台
|
|
|
+ getExpressPlatformText(platform) {
|
|
|
+ const platformMap = {
|
|
|
+ 'DADA': '达达',
|
|
|
+ 'SFTC': '顺丰',
|
|
|
+ }
|
|
|
+ return platformMap[platform] || platform
|
|
|
+ },
|
|
|
+ //转换配送状态为中文显示
|
|
|
+ getProgressText(status) {
|
|
|
+ const statusMap = {
|
|
|
+ 0: '已叫跑腿,等跑腿接单',
|
|
|
+ 1: '跑腿已接单',
|
|
|
+ 2:'已送达',
|
|
|
+ 3:'已取消',
|
|
|
+ 4:'跑腿已到店',
|
|
|
+ 5:'跑腿配送中'
|
|
|
+ }
|
|
|
+ return statusMap[status] || status
|
|
|
+ },
|
|
|
cancelChange(){
|
|
|
this.$refs.staffRef.close()
|
|
|
},
|
|
|
@@ -1189,19 +1288,19 @@ export default {
|
|
|
|
|
|
let that = this
|
|
|
if (!this.$util.isEmpty(this.detailInfo.fhWlSn)){
|
|
|
- //获取运单轨迹
|
|
|
- getCgExpressTrack({id:this.option.id}).then(result=>{
|
|
|
- that.trackList = []
|
|
|
- if(!that.$util.isEmpty(result.data.path_item_list) && this.$util.isArray(result.data.path_item_list)){
|
|
|
- result.data.path_item_list.forEach(function(item){
|
|
|
- that.trackList.push(item.action_msg)
|
|
|
+ //获取运单轨迹
|
|
|
+ getCgExpressTrack({id:this.option.id}).then(result=>{
|
|
|
+ that.trackList = []
|
|
|
+ if(!that.$util.isEmpty(result.data.path_item_list) && this.$util.isArray(result.data.path_item_list)){
|
|
|
+ result.data.path_item_list.forEach(function(item){
|
|
|
+ that.trackList.push(item.action_msg)
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
-
|
|
|
} catch {
|
|
|
+
|
|
|
} finally {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
@@ -1216,6 +1315,54 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.info-content_box {
|
|
|
padding: 0 20upx 100upx;
|
|
|
+
|
|
|
+ .order-msg-blo {
|
|
|
+ .msg-list {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ font-size: 26upx;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label {
|
|
|
+ color: #999;
|
|
|
+ width: 140upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .value {
|
|
|
+ color: #333;
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.express-progress-row {
|
|
|
+ align-items: flex-start;
|
|
|
+
|
|
|
+ .express-actions {
|
|
|
+ margin-left: 20upx;
|
|
|
+
|
|
|
+ .mini-btn {
|
|
|
+ padding: 0 20upx;
|
|
|
+ height: 50upx;
|
|
|
+ line-height: 48upx;
|
|
|
+ font-size: 24upx;
|
|
|
+
|
|
|
+ &.btn-danger {
|
|
|
+ background: #fff;
|
|
|
+ color: #ff2842;
|
|
|
+ border-color: #ff2842;
|
|
|
+ }
|
|
|
+
|
|
|
+ & + .mini-btn {
|
|
|
+ margin-left: 15upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
& > .title {
|
|
|
color: #666666;
|
|
|
font-size: 28upx;
|
|
|
@@ -1223,6 +1370,7 @@ export default {
|
|
|
padding: 30upx 3upx;
|
|
|
}
|
|
|
& .address-des_bx {
|
|
|
+ position: relative;
|
|
|
display: flex;
|
|
|
padding: 20upx 10upx 30upx 20upx;
|
|
|
& > view:nth-child(1) {
|
|
|
@@ -1240,12 +1388,31 @@ export default {
|
|
|
margin-top: 20upx;
|
|
|
}
|
|
|
}
|
|
|
- & > view:nth-child(2) {
|
|
|
+ & .right-btns {
|
|
|
+ position: absolute;
|
|
|
+ top: 20upx;
|
|
|
+ right: 20upx;
|
|
|
display: flex;
|
|
|
- & .icondianhua1 {
|
|
|
- font-size: 50upx;
|
|
|
- color: #3385ff;
|
|
|
- margin-left: 0upx;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-end;
|
|
|
+
|
|
|
+ .icon-btns {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 25upx;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 170upx;
|
|
|
+
|
|
|
+ & .icondianhua1 {
|
|
|
+ font-size: 50upx;
|
|
|
+ color: #3385ff;
|
|
|
+ }
|
|
|
+ & .icondianhua{
|
|
|
+ font-size:53upx;
|
|
|
+ color:#3385ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .copy-address{
|
|
|
+ margin:0 auto;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1419,4 +1586,105 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
+/* 模拟信息弹框样式 */
|
|
|
+.goods-modal-mask {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-color: rgba(0, 0, 0, 0.5);
|
|
|
+ z-index: 9999;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.goods-modal {
|
|
|
+ width: 80%;
|
|
|
+ max-width: 600upx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 12upx;
|
|
|
+ overflow: hidden;
|
|
|
+ box-shadow: 0 10upx 30upx rgba(0, 0, 0, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
+.modal-header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 30upx 40upx;
|
|
|
+ background-color: #f8f9fa;
|
|
|
+ border-bottom: 1px solid #e9ecef;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-title {
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-close {
|
|
|
+ font-size: 40upx;
|
|
|
+ color: #999;
|
|
|
+ cursor: pointer;
|
|
|
+ line-height: 1;
|
|
|
+ padding: 10upx;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-body {
|
|
|
+ padding: 40upx;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-input {
|
|
|
+ width: 100%;
|
|
|
+ height: 80upx;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 0 20upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ &:focus {
|
|
|
+ border-color: #3385ff;
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.modal-footer {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ gap: 20upx;
|
|
|
+ padding: 30upx 40upx;
|
|
|
+ background-color: #f8f9fa;
|
|
|
+ border-top: 1px solid #e9ecef;
|
|
|
+}
|
|
|
+
|
|
|
+.modal-btn {
|
|
|
+ padding: 20upx 40upx;
|
|
|
+ border-radius: 8upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ border: none;
|
|
|
+ cursor: pointer;
|
|
|
+ min-width: 120upx;
|
|
|
+
|
|
|
+ &.cancel-btn {
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #666;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background-color: #e9ecef;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &.confirm-btn {
|
|
|
+ background-color: #3385ff;
|
|
|
+ color: #fff;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background-color: #2d74e7;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|