wangfukang 19 hours ago
parent
commit
599dd44fb0
  1. 10
      App.vue
  2. 31
      components/worker/delivery.vue
  3. 3
      pages/login/login.vue
  4. 134
      pages/myCenter/setPrint.vue
  5. 25
      pages/shop/orderDetail.vue
  6. 143
      pages/shop/transferDeliveryOrderList.vue

10
App.vue

@ -218,8 +218,10 @@
this.globalData.GaoDeKey_amapkey = '52de86da47be2ea547c37dd382025a0c' this.globalData.GaoDeKey_amapkey = '52de86da47be2ea547c37dd382025a0c'
// #endif // #endif
if(uni.getStorageSync('peisongyuan')) return; if(uni.getStorageSync('peisongyuan')) return;
this.autoConnectPrinter() if (uni.getStorageSync('printingMethod') != 'cloud') {
if (!uni.getStorageSync('bluetoothDeviceId')) { this.autoConnectPrinter()
}
if (uni.getStorageSync('printingMethod') != 'cloud' && !uni.getStorageSync('bluetoothDeviceId')) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '您还没有连接打印机,将无法为您打印小票!', content: '您还没有连接打印机,将无法为您打印小票!',
@ -279,6 +281,10 @@
console.log('JPush print skipped, missing order_id:', JSON.stringify(printData)); console.log('JPush print skipped, missing order_id:', JSON.stringify(printData));
return; return;
} }
if (uni.getStorageSync('printingMethod') == 'cloud') {
console.log('JPush print skipped, cloud print mode:', printData.order_id);
return;
}
this.globalData.printData.push(printData) this.globalData.printData.push(printData)
if (!this.globalData.isPrinting) { if (!this.globalData.isPrinting) {
this.processPrintQueue() this.processPrintQueue()

31
components/worker/delivery.vue

@ -63,6 +63,9 @@
<uni-icons type="info" size="10"></uni-icons> <uni-icons type="info" size="10"></uni-icons>
跑腿 跑腿
</view> </view>
<view class="transfer-delivery-btn" v-if="canTransferOrder" @tap="goTransferDeliveryOrders">
中转单
</view>
<view class="delivery-ranking-btn" @tap="goDeliveryRanking"> <view class="delivery-ranking-btn" @tap="goDeliveryRanking">
配送排行 配送排行
</view> </view>
@ -572,6 +575,10 @@
return '已上线,但还没有勾选参与派单的路线' return '已上线,但还没有勾选参与派单的路线'
} }
return '已准备好接收符合范围和佣金的订单' return '已准备好接收符合范围和佣金的订单'
},
canTransferOrder() {
const worker = uni.getStorageSync('worker')
return !!(worker && worker.canTransferOrder == 1)
} }
}, },
filters: { filters: {
@ -764,6 +771,12 @@
url: '/pages/worker/ranking' url: '/pages/worker/ranking'
}) })
}, },
goTransferDeliveryOrders() {
if (!this.ensureWorkerRegistered()) return
uni.navigateTo({
url: '/pages/shop/transferDeliveryOrderList?role=worker'
})
},
goPartTimeRegister() { goPartTimeRegister() {
if (uni.getStorageSync('worker')) { if (uni.getStorageSync('worker')) {
uni.navigateTo({ uni.navigateTo({
@ -1533,6 +1546,24 @@
flex-shrink: 0; flex-shrink: 0;
} }
.transfer-delivery-btn {
height: 58rpx;
line-height: 58rpx;
padding: 0 22rpx;
border-radius: 999rpx;
background: linear-gradient(135deg, #fff2e9 0%, #ffd0a8 100%);
box-shadow: 0 10rpx 22rpx rgba(255, 128, 64, 0.14);
color: #9a4b13;
font-size: 22rpx;
font-weight: 900;
text-align: center;
flex-shrink: 0;
}
.transfer-delivery-btn:active {
transform: scale(0.96);
}
.delivery-ranking-btn:active { .delivery-ranking-btn:active {
transform: scale(0.96); transform: scale(0.96);
} }

3
pages/login/login.vue

@ -388,6 +388,9 @@
uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone) uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone)
uni.setStorageSync('schoolShop', res.result.shop) uni.setStorageSync('schoolShop', res.result.shop)
uni.setStorageSync('shopTakeaway', item.shopTakeaway) uni.setStorageSync('shopTakeaway', item.shopTakeaway)
uni.setStorageSync('printingMethod', item.printingMethod || (res.result.shop && res.result.shop.printingMethod) || 'bluetooth')
uni.setStorageSync('cloudPrinterSn', (res.result.shop && res.result.shop.printerSn) || '')
uni.setStorageSync('cloudPrinterName', (res.result.shop && res.result.shop.printerName) || '')
uni.setStorageSync('attrId', item.attrId) uni.setStorageSync('attrId', item.attrId)
uni.setStorageSync('area', JSON.stringify(item)) uni.setStorageSync('area', JSON.stringify(item))
uni.setStorageSync("isShop", true) uni.setStorageSync("isShop", true)

134
pages/myCenter/setPrint.vue

@ -1,23 +1,36 @@
<template> <template>
<view class=""> <view class="">
<view class="btn"> <view class="btn">
<view class="connected-printer" v-if="savedDeviceId"> <view class="print-mode-card">
<view class="print-mode-title">打印方式</view>
<view class="print-mode-options">
<view :class="['print-mode-option', printingMethod == 'bluetooth' ? 'active' : '']" @tap="changePrintMethod('bluetooth')">蓝牙打印</view>
<view :class="['print-mode-option', printingMethod == 'cloud' ? 'active' : '']" @tap="changePrintMethod('cloud')">云打印</view>
</view>
</view>
<view class="connected-printer" v-if="printingMethod == 'cloud'">
<text>{{cloudPrinterSn ? '已绑定云打印机' : '未绑定云打印机'}}</text>
<text class="connected-printer-name">{{cloudPrinterName || cloudPrinterSn || '请到后台绑定'}}</text>
</view>
<button type="primary" style="margin-top: 40rpx;font-size: 32rpx;" :loading="isCloudPrint" v-if="printingMethod == 'cloud' && cloudPrinterSn"
@tap="cloudPrintTest" text=''>云打印测试</button>
<view class="connected-printer" v-if="printingMethod == 'bluetooth' && savedDeviceId">
<text>{{okAddress ? '已连接设备' : (linkAddress == savedDeviceId ? '正在自动连接' : '已保存设备')}}</text> <text>{{okAddress ? '已连接设备' : (linkAddress == savedDeviceId ? '正在自动连接' : '已保存设备')}}</text>
<text class="connected-printer-name">{{connectedDeviceName || savedDeviceId}}</text> <text class="connected-printer-name">{{connectedDeviceName || savedDeviceId}}</text>
</view> </view>
<button type="primary" :loading="isSearching" v-if="isSearching == false" @tap="startSearch(true)" <button type="primary" :loading="isSearching" v-if="printingMethod == 'bluetooth' && isSearching == false" @tap="startSearch(true)"
text="">搜索蓝牙设备 text="">搜索蓝牙设备
</button> </button>
<button type="primary" :loading="isSearching" v-if="isSearching == true" @tap="stopSearch" text="">搜索蓝牙设备 <button type="primary" :loading="isSearching" v-if="printingMethod == 'bluetooth' && isSearching == true" @tap="stopSearch" text="">搜索蓝牙设备
</button> </button>
<button type="primary" style="margin-top: 40rpx;" v-if="savedDeviceId !=''" @tap="endSearch(true)" <button type="primary" style="margin-top: 40rpx;" v-if="printingMethod == 'bluetooth' && savedDeviceId !=''" @tap="endSearch(true)"
text="">删除已连接蓝牙设备 text="">删除已连接蓝牙设备
</button> </button>
<button type="primary" style="margin-top: 40rpx;font-size: 32rpx;" :loading="isPrint" v-if="okAddress" <button type="primary" style="margin-top: 40rpx;font-size: 32rpx;" :loading="isPrint" v-if="printingMethod == 'bluetooth' && okAddress"
@tap="pickUpOnce" text=''>打印测试</button> @tap="pickUpOnce" text=''>打印测试</button>
</view> </view>
<view class="content"> <view class="content" v-if="printingMethod == 'bluetooth'">
<text>新设备</text> <text>新设备</text>
<view v-for="(item) in list" :data-title="item.deviceId" :data-name="item.name" <view v-for="(item) in list" :data-title="item.deviceId" :data-name="item.name"
:data-advertisData="item.advertisServiceUUIDs" :key="item.deviceId" :data-advertisData="item.advertisServiceUUIDs" :key="item.deviceId"
@ -81,6 +94,10 @@
}] }]
}, },
isPrint: false, isPrint: false,
isCloudPrint: false,
printingMethod: uni.getStorageSync('printingMethod') || 'bluetooth',
cloudPrinterSn: '',
cloudPrinterName: '',
} }
}, },
// //
@ -93,6 +110,7 @@
onLoad() {}, onLoad() {},
onShow() { onShow() {
this.initSavedPrinter() this.initSavedPrinter()
this.getPrintConfig()
}, },
methods: { methods: {
endSearch(){ endSearch(){
@ -127,6 +145,72 @@
this.linkAddress = ''; this.linkAddress = '';
}); });
}, },
getPrintConfig() {
const shopId = uni.getStorageSync('shopId');
if (!shopId || !this.NB) return;
this.NB.sendRequest('/app/shop/printConfig', {
shopId
}, false, 'GET', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200 && res.result) {
this.printingMethod = res.result.printingMethod || 'bluetooth';
this.cloudPrinterSn = res.result.printerSn || '';
this.cloudPrinterName = res.result.printerName || '';
uni.setStorageSync('printingMethod', this.printingMethod);
uni.setStorageSync('cloudPrinterSn', this.cloudPrinterSn);
uni.setStorageSync('cloudPrinterName', this.cloudPrinterName);
}
}).catch(() => {});
},
changePrintMethod(method) {
if (method == this.printingMethod) return;
const shopId = uni.getStorageSync('shopId');
if (!shopId) {
uni.showToast({
title: '请先选择店铺',
icon: 'none'
});
return;
}
this.NB.sendRequest('/app/shop/printConfig', {
shopId,
printingMethod: method
}, false, 'POST', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200 && res.result) {
this.printingMethod = res.result.printingMethod || method;
this.cloudPrinterSn = res.result.printerSn || '';
this.cloudPrinterName = res.result.printerName || '';
uni.setStorageSync('printingMethod', this.printingMethod);
uni.setStorageSync('cloudPrinterSn', this.cloudPrinterSn);
uni.setStorageSync('cloudPrinterName', this.cloudPrinterName);
uni.showToast({
title: '保存成功',
icon: 'none'
});
} else {
uni.showToast({
title: res.message || '保存失败',
icon: 'none'
});
}
}).catch(() => {});
},
cloudPrintTest() {
const shopId = uni.getStorageSync('shopId');
if (!shopId) return;
if (this.isCloudPrint) return;
this.isCloudPrint = true;
this.NB.sendRequest('/app/shop/printTest', {
shopId
}, false, 'POST', 'application/x-www-form-urlencoded').then(res => {
this.isCloudPrint = false;
uni.showToast({
title: res.message || (res.code == 200 ? '测试打印已发送' : '测试打印失败'),
icon: 'none'
});
}).catch(() => {
this.isCloudPrint = false;
});
},
getData() { getData() {
var that = this; var that = this;
that.startSearch(false); that.startSearch(false);
@ -282,6 +366,44 @@
padding: 40rpx; padding: 40rpx;
} }
.print-mode-card {
margin-bottom: 30rpx;
padding: 24rpx 30rpx;
border-radius: 16rpx;
background: #fff;
}
.print-mode-title {
margin-bottom: 20rpx;
font-size: 30rpx;
font-weight: 700;
color: #333;
}
.print-mode-options {
display: flex;
}
.print-mode-option {
flex: 1;
height: 72rpx;
line-height: 72rpx;
text-align: center;
border-radius: 12rpx;
background: #f5f6f7;
color: #333;
font-size: 28rpx;
}
.print-mode-option.active {
background: #3769FF;
color: #fff;
}
.print-mode-option+.print-mode-option {
margin-left: 20rpx;
}
.connected-printer { .connected-printer {
display: flex; display: flex;
align-items: center; align-items: center;

25
pages/shop/orderDetail.vue

@ -422,7 +422,8 @@
userCoupon: [], userCoupon: [],
mallRefundRecord: [] mallRefundRecord: []
}, },
mealServingLoading: false mealServingLoading: false,
cloudPrintLoading: false
} }
}, },
filters:{ filters:{
@ -800,6 +801,10 @@
this.$refs.groupPopup.open() this.$refs.groupPopup.open()
}, },
printData(){ printData(){
if (uni.getStorageSync('printingMethod') == 'cloud') {
this.cloudPrintData();
return;
}
// 1 // 1
let data = { let data = {
order_id: this.shopId, order_id: this.shopId,
@ -816,6 +821,24 @@
this.processPrintQueue() this.processPrintQueue()
} }
}, },
cloudPrintData() {
if (this.cloudPrintLoading) return;
this.cloudPrintLoading = true;
uni.showLoading({
title: '云打印发送中...'
});
this.NB.sendRequest("/mall/order/cloudPrint/" + this.shopId, {}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
uni.hideLoading();
this.cloudPrintLoading = false;
uni.showToast({
title: res.message || (res.code == 200 ? '云打印任务已发送' : '云打印失败'),
icon: 'none'
});
}).catch(() => {
uni.hideLoading();
this.cloudPrintLoading = false;
});
},
/** /**
* 打印队列处理器取队头数据打印打印完成后删除队头继续处理下一条 * 打印队列处理器取队头数据打印打印完成后删除队头继续处理下一条
* 保证同一时间只有一条消息在打印按接收顺序依次执行 * 保证同一时间只有一条消息在打印按接收顺序依次执行

143
pages/shop/transferDeliveryOrderList.vue

@ -6,11 +6,13 @@
size="26"></uni-icons></view> size="26"></uni-icons></view>
<view class="title" <view class="title"
:style="{'top': titleTop + 'px','height': capsuleHeight + 'px','line-height': capsuleHeight + 'px'}"> :style="{'top': titleTop + 'px','height': capsuleHeight + 'px','line-height': capsuleHeight + 'px'}">
中转配送</view> {{isWorkerMode ? '中转单' : '中转配送'}}</view>
</view> </view>
<view class="tabs"> <view class="tabs">
<view class="tab" :class="{active: tab === 'wait'}" @tap="switchTab('wait')">待送达</view> <view class="tab" v-if="isWorkerMode" :class="{active: tab === 'wait'}" @tap="switchTab('wait')">待接单</view>
<view class="tab" :class="{active: tab === 'done'}" @tap="switchTab('done')">已送达</view> <view class="tab" v-if="isWorkerMode" :class="{active: tab === 'accepted'}" @tap="switchTab('accepted')">待送达中转点({{transferTodoCount}})</view>
<view class="tab" v-if="!isWorkerMode" :class="{active: tab === 'wait'}" @tap="switchTab('wait')">待送达</view>
<view class="tab" v-if="!isWorkerMode" :class="{active: tab === 'done'}" @tap="switchTab('done')">已送达</view>
</view> </view>
</view> </view>
<scroll-view class="list" :style="{'top': listTop + 'px'}" scroll-y @scrolltolower="loadMore"> <scroll-view class="list" :style="{'top': listTop + 'px'}" scroll-y @scrolltolower="loadMore">
@ -20,6 +22,13 @@
<view class="appointment-delivery-tag" v-if="item.appointmentDelivery == 1">预约配送</view> <view class="appointment-delivery-tag" v-if="item.appointmentDelivery == 1">预约配送</view>
<view class="code" v-if="item.numberCode">#{{item.numberCode}}</view> <view class="code" v-if="item.numberCode">#{{item.numberCode}}</view>
</view> </view>
<view class="row">
<view class="label">商家</view>
<view class="value phone-value" @tap.stop="makeCall(item.shopPhone)">
<text>{{item.shopName || '-'}}</text>
<text v-if="item.shopPhone" class="phone">{{item.shopPhone}}</text>
</view>
</view>
<view class="row"> <view class="row">
<view class="label">中转点</view> <view class="label">中转点</view>
<view class="value">{{item.transferAddressName || item.shopName}}</view> <view class="value">{{item.transferAddressName || item.shopName}}</view>
@ -40,13 +49,20 @@
<view class="label">取餐码</view> <view class="label">取餐码</view>
<view class="value pickup-code">{{item.transferPickupCode || '配送员接单后生成'}}</view> <view class="value pickup-code">{{item.transferPickupCode || '配送员接单后生成'}}</view>
</view> </view>
<view class="row"> <view class="row" v-if="!isWorkerMode">
<view class="label">配送员</view> <view class="label">配送员</view>
<view class="value phone-value" @tap.stop="makeCall(item.workerPhone)"> <view class="value phone-value" @tap.stop="makeCall(item.workerPhone)">
<text>{{item.workerName || '未分配'}}</text> <text>{{item.workerName || '未分配'}}</text>
<text v-if="item.workerPhone" class="phone">{{item.workerPhone}}</text> <text v-if="item.workerPhone" class="phone">{{item.workerPhone}}</text>
</view> </view>
</view> </view>
<view class="row" v-if="item.transferWorkerId">
<view class="label">中转员</view>
<view class="value phone-value" @tap.stop="makeCall(item.transferWorkerMobile)">
<text>{{item.transferWorkerName || '未分配'}}</text>
<text v-if="item.transferWorkerMobile" class="phone">{{item.transferWorkerMobile}}</text>
</view>
</view>
<view class="row"> <view class="row">
<view class="label">用户</view> <view class="label">用户</view>
<view class="value phone-value" @tap.stop="makeCall(item.receiverPhone)"> <view class="value phone-value" @tap.stop="makeCall(item.receiverPhone)">
@ -61,12 +77,18 @@
<view class="arrive-info" v-if="item.transferArriveTime"> <view class="arrive-info" v-if="item.transferArriveTime">
已送达中转点{{formatTime(item.transferArriveTime)}} 已送达中转点{{formatTime(item.transferArriveTime)}}
</view> </view>
<view class="actions" v-else-if="isWorkerMode && tab === 'wait'">
<view class="main-btn" :class="{'main-btn-disabled': item.transferAccepting}" @tap.stop="transferAccept(index,item)">
{{item.transferAccepting ? '接单中...' : '接单'}}
</view>
</view>
<view class="actions" v-else> <view class="actions" v-else>
<view class="photo-btn" @tap.stop="chooseImage(index)">拍照</view> <view class="photo-btn" @tap.stop="chooseImage(index)">拍照</view>
<view class="main-btn" @tap.stop="transferArrive(index,item)">送达中转点</view> <view class="main-btn" @tap.stop="transferArrive(index,item)">送达中转点</view>
</view> </view>
</view> </view>
<view class="empty" v-if="list.length === 0 && loadStatus === 'nomore'">暂无中转配送单</view> <uni-load-more :status="loadStatus" />
<view class="empty" v-if="list.length === 0 && loadStatus === 'nomore'">{{isWorkerMode ? (tab === 'accepted' ? '暂无待送达中转点订单' : '暂无待接中转单') : '暂无中转配送单'}}</view>
</scroll-view> </scroll-view>
<uni-popup ref="productPopup" background-color="transparent"> <uni-popup ref="productPopup" background-color="transparent">
<view class="product-popup-content"> <view class="product-popup-content">
@ -107,8 +129,13 @@
data() { data() {
return { return {
tab: 'wait', tab: 'wait',
isWorkerMode: false,
currentWorker: {},
transferTodoCount: 0,
acceptingTransferId: '',
list: [], list: [],
productData: [], productData: [],
isLoadingPage: false,
loadStatus: 'more', loadStatus: 'more',
totalPages: 1, totalPages: 1,
searchForm: { searchForm: {
@ -117,6 +144,9 @@
deliveryType: 1, deliveryType: 1,
transferDelivery: 1, transferDelivery: 1,
transferArriveEmpty: true, transferArriveEmpty: true,
transferWorkerView: false,
transferWorkerAccepted: false,
transferWorkerId: '',
shopId: '', shopId: '',
regionId: '' regionId: ''
}, },
@ -127,6 +157,9 @@
listTop: 210 listTop: 210
} }
}, },
onLoad(options) {
this.isWorkerMode = !!(options && options.role === 'worker')
},
onShow() { onShow() {
this.initNavMetrics() this.initNavMetrics()
this.resetList() this.resetList()
@ -165,18 +198,32 @@
this.totalPages = 1 this.totalPages = 1
this.list = [] this.list = []
this.loadStatus = 'more' this.loadStatus = 'more'
this.searchForm.transferArriveEmpty = this.tab === 'wait' this.isLoadingPage = false
this.searchForm.shopId = uni.getStorageSync('shopId')
const area = uni.getStorageSync('area') const area = uni.getStorageSync('area')
this.searchForm.regionId = area ? JSON.parse(area).regionId : '' this.searchForm.regionId = area ? JSON.parse(area).regionId : ''
this.searchForm.transferWorkerView = this.isWorkerMode
if (this.isWorkerMode) {
this.currentWorker = uni.getStorageSync('worker') || {}
this.searchForm.shopId = ''
this.searchForm.transferWorkerId = this.currentWorker.workerId || ''
this.searchForm.transferArriveEmpty = true
this.searchForm.transferWorkerAccepted = this.tab === 'accepted'
} else {
this.searchForm.shopId = uni.getStorageSync('shopId')
this.searchForm.transferWorkerId = ''
this.searchForm.transferArriveEmpty = this.tab === 'wait'
this.searchForm.transferWorkerAccepted = false
}
this.getList() this.getList()
}, },
loadMore() { loadMore() {
if (this.searchForm.pageNum >= this.totalPages) return if (this.isLoadingPage || this.searchForm.pageNum >= this.totalPages) return
this.searchForm.pageNum++ this.searchForm.pageNum++
this.getList() this.getList()
}, },
getList() { getList() {
if (this.isLoadingPage) return
this.isLoadingPage = true
this.NB.sendRequest("/mall/delivery/pageTransferDelivery", this.searchForm, false, 'post', this.NB.sendRequest("/mall/delivery/pageTransferDelivery", this.searchForm, false, 'post',
'application/json').then((res) => { 'application/json').then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -184,12 +231,39 @@
this.list = this.searchForm.pageNum == 1 ? records : this.list.concat(records) this.list = this.searchForm.pageNum == 1 ? records : this.list.concat(records)
this.totalPages = res.result.pages || 1 this.totalPages = res.result.pages || 1
this.loadStatus = this.searchForm.pageNum >= this.totalPages ? 'nomore' : 'more' this.loadStatus = this.searchForm.pageNum >= this.totalPages ? 'nomore' : 'more'
if (this.isWorkerMode) {
if (this.tab === 'accepted') {
this.transferTodoCount = Number(res.result.total) || 0
} else {
this.getTransferTodoCount()
}
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
} }
this.isLoadingPage = false
}).catch(() => {
this.isLoadingPage = false
})
},
getTransferTodoCount() {
if (!this.isWorkerMode || !this.searchForm.transferWorkerId) {
this.transferTodoCount = 0
return
}
const params = Object.assign({}, this.searchForm, {
pageNum: 1,
pageSize: 1,
transferWorkerAccepted: true
})
this.NB.sendRequest("/mall/delivery/pageTransferDelivery", params, false, 'post',
'application/json').then((res) => {
if (res.code == 200) {
this.transferTodoCount = Number((res.result || {}).total) || 0
}
}) })
}, },
chooseImage(index) { chooseImage(index) {
@ -237,6 +311,55 @@
} }
}) })
}, },
transferAccept(index, item) {
if (this.acceptingTransferId) return
const worker = this.currentWorker && this.currentWorker.workerId ? this.currentWorker : (uni.getStorageSync('worker') || {})
if (!worker.workerId) {
uni.showToast({
title: '您还没有注册兼职',
icon: 'none'
})
return
}
this.acceptingTransferId = item.id
this.$set(this.list[index], 'transferAccepting', true)
uni.showLoading({
title: '接单中...',
mask: true
})
this.NB.sendRequest("/mall/delivery/transferAccept", {
deliveryId: item.id,
workerId: worker.workerId,
workerName: worker.workerName || '',
workerMobile: worker.mobile || ''
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
this.list.splice(index, 1)
this.transferTodoCount += 1
uni.showToast({
title: '接单成功',
icon: 'none'
})
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.resetList()
}
}).catch(() => {
uni.showToast({
title: '接单失败,请重试',
icon: 'none'
})
}).then(() => {
this.acceptingTransferId = ''
if (this.list[index] && this.list[index].id === item.id) {
this.$set(this.list[index], 'transferAccepting', false)
}
uni.hideLoading()
})
},
productDetail(item) { productDetail(item) {
const goodsList = item.goodsList || item.mallOrderGoodsList || item.orderGoodsList || [] const goodsList = item.goodsList || item.mallOrderGoodsList || item.orderGoodsList || []
this.productData = goodsList this.productData = goodsList
@ -472,6 +595,10 @@
color: #00231c; color: #00231c;
} }
.main-btn-disabled {
opacity: .58;
}
.empty { .empty {
text-align: center; text-align: center;
color: #8a9692; color: #8a9692;

Loading…
Cancel
Save