|
|
@@ -19,6 +19,25 @@
|
|
|
<button class="admin-button-com bule middle copy-address" @click.stop="copyCustom(detailInfo)">复制地址</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="flex-space title">配送进度</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">配送平台:</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>
|
|
|
+
|
|
|
<view class="flex-space title">
|
|
|
单据信息
|
|
|
<view class="flex" style="color: #3385ff;font-weight: 400">
|
|
|
@@ -492,6 +511,7 @@ 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 { cancelExpressOrder } from '@/api/shop/shop-express'
|
|
|
export default {
|
|
|
name: "orderDetail",
|
|
|
components: {
|
|
|
@@ -577,6 +597,40 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //取消跑腿
|
|
|
+ cancelMyExpress(orderId) {
|
|
|
+ this.$util.confirmModal({content: '确认取消?(若配送员接单1分钟后取消,扣2元违约金)'}, async () => {
|
|
|
+ const res = await cancelExpressOrder({orderId: orderId})
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.$msg('取消成功')
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //呼叫跑腿
|
|
|
+ openExpressPage() {
|
|
|
+ this.$msg('请到列表页操作')
|
|
|
+ },
|
|
|
+ //获取配送平台
|
|
|
+ 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()
|
|
|
},
|
|
|
@@ -1186,19 +1240,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;
|
|
|
}
|
|
|
@@ -1213,6 +1267,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;
|