|
@@ -9,7 +9,7 @@
|
|
/>
|
|
/>
|
|
<view class="item" v-for="(item, i) in waybillDelivery" :key="i" @click="itemClick(item)">
|
|
<view class="item" v-for="(item, i) in waybillDelivery" :key="i" @click="itemClick(item)">
|
|
<view class="order-no">
|
|
<view class="order-no">
|
|
- <text> 派送单号: {{ item.order_no }} </text>
|
|
|
|
|
|
+ <text> 取件单号: {{ item.order_no }} </text>
|
|
<image
|
|
<image
|
|
@click="copyOrderNo(item.order_no)"
|
|
@click="copyOrderNo(item.order_no)"
|
|
class="icon"
|
|
class="icon"
|
|
@@ -60,7 +60,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view v-if="waybillDelivery.length === 0" class="is-empty">暂无派送单</view>
|
|
|
|
|
|
+ <view v-if="waybillDelivery.length === 0" class="is-empty">暂无取件单</view>
|
|
|
|
|
|
<uni-popup ref="messageRef" type="message">
|
|
<uni-popup ref="messageRef" type="message">
|
|
<uni-popup-message
|
|
<uni-popup-message
|
|
@@ -81,11 +81,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { reactive, ref } from 'vue'
|
|
|
|
|
|
+import { ref } from 'vue'
|
|
import { onLoad, onNavigationBarButtonTap } from '@dcloudio/uni-app'
|
|
import { onLoad, onNavigationBarButtonTap } from '@dcloudio/uni-app'
|
|
import { checkPermission } from '@/utils'
|
|
import { checkPermission } from '@/utils'
|
|
-
|
|
|
|
-let pickupWaybillDeliveryOrderURL = ''
|
|
|
|
|
|
+import { waybillPickUpOrders } from '@/services/waybillPickUpOrder'
|
|
let sendOutURL = ''
|
|
let sendOutURL = ''
|
|
let deliveredURL = ''
|
|
let deliveredURL = ''
|
|
let refuseURL = ''
|
|
let refuseURL = ''
|
|
@@ -94,7 +93,6 @@ let cancelFedExPickUpURL = ''
|
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const loadingBtn = ref(false)
|
|
const loadingBtn = ref(false)
|
|
-const token = ref()
|
|
|
|
const searchValue = ref()
|
|
const searchValue = ref()
|
|
const waybillDelivery = ref([] as any)
|
|
const waybillDelivery = ref([] as any)
|
|
const messageType = ref()
|
|
const messageType = ref()
|
|
@@ -205,150 +203,140 @@ const onButtonClick = async (row: { id: any }, value: string) => {
|
|
|
|
|
|
const sendOut = (data: { id: any }) => {
|
|
const sendOut = (data: { id: any }) => {
|
|
loadingBtn.value = true
|
|
loadingBtn.value = true
|
|
- uni.request({
|
|
|
|
- url: sendOutURL,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- data: data,
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'success'
|
|
|
|
- messageText.value = '发出成功'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = '发出失败,请稍后重试'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: sendOutURL,
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // header: {
|
|
|
|
+ // batoken: token.value,
|
|
|
|
+ // },
|
|
|
|
+ // data: data,
|
|
|
|
+ // success: ({ data }: any) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'success'
|
|
|
|
+ // messageText.value = '发出成功'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'error'
|
|
|
|
+ // messageText.value = '发出失败,请稍后重试'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
const updateDelivered = (data: { id: any }) => {
|
|
const updateDelivered = (data: { id: any }) => {
|
|
loadingBtn.value = true
|
|
loadingBtn.value = true
|
|
- uni.request({
|
|
|
|
- url: deliveredURL,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- data: data,
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'success'
|
|
|
|
- messageText.value = '确认送达成功'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = '确认送达失败,请稍后重试'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: deliveredURL,
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // header: {
|
|
|
|
+ // batoken: token.value,
|
|
|
|
+ // },
|
|
|
|
+ // data: data,
|
|
|
|
+ // success: ({ data }: any) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'success'
|
|
|
|
+ // messageText.value = '确认送达成功'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'error'
|
|
|
|
+ // messageText.value = '确认送达失败,请稍后重试'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
const updateRefuse = (data: { id: any }) => {
|
|
const updateRefuse = (data: { id: any }) => {
|
|
loadingBtn.value = true
|
|
loadingBtn.value = true
|
|
- uni.request({
|
|
|
|
- url: refuseURL,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- data: data,
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'success'
|
|
|
|
- messageText.value = '已拒绝签收'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = '修改失败,请稍后重试'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: refuseURL,
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // header: {
|
|
|
|
+ // batoken: token.value,
|
|
|
|
+ // },
|
|
|
|
+ // data: data,
|
|
|
|
+ // success: ({ data }: any) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'success'
|
|
|
|
+ // messageText.value = '已拒绝签收'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'error'
|
|
|
|
+ // messageText.value = '修改失败,请稍后重试'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
const createTrackPod = (data: { id: any }) => {
|
|
const createTrackPod = (data: { id: any }) => {
|
|
loadingBtn.value = true
|
|
loadingBtn.value = true
|
|
- uni.request({
|
|
|
|
- url: createTrackPodURL,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- data: data,
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'success'
|
|
|
|
- messageText.value = '同步成功'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = '同步失败,请稍后重试'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: createTrackPodURL,
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // header: {
|
|
|
|
+ // batoken: token.value,
|
|
|
|
+ // },
|
|
|
|
+ // data: data,
|
|
|
|
+ // success: ({ data }: any) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'success'
|
|
|
|
+ // messageText.value = '同步成功'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'error'
|
|
|
|
+ // messageText.value = '同步失败,请稍后重试'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
const cancelFedExPickUp = (data: { id: any }) => {
|
|
const cancelFedExPickUp = (data: { id: any }) => {
|
|
loadingBtn.value = true
|
|
loadingBtn.value = true
|
|
- uni.request({
|
|
|
|
- url: cancelFedExPickUpURL,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- data: data,
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'success'
|
|
|
|
- messageText.value = '操作成功'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loadingBtn.value = false
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = '操作失败,请稍后重试'
|
|
|
|
- messageRef.value.open()
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.request({
|
|
|
|
+ // url: cancelFedExPickUpURL,
|
|
|
|
+ // method: 'POST',
|
|
|
|
+ // header: {
|
|
|
|
+ // batoken: token.value,
|
|
|
|
+ // },
|
|
|
|
+ // data: data,
|
|
|
|
+ // success: ({ data }: any) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'success'
|
|
|
|
+ // messageText.value = '操作成功'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // fail: (err) => {
|
|
|
|
+ // loadingBtn.value = false
|
|
|
|
+ // messageType.value = 'error'
|
|
|
|
+ // messageText.value = '操作失败,请稍后重试'
|
|
|
|
+ // messageRef.value.open()
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
-const getList = () => {
|
|
|
|
|
|
+const getList = async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
- uni.request({
|
|
|
|
- url: pickupWaybillDeliveryOrderURL + '/index',
|
|
|
|
- method: 'GET',
|
|
|
|
- header: {
|
|
|
|
- batoken: token.value,
|
|
|
|
- },
|
|
|
|
- success: ({ data }: any) => {
|
|
|
|
- loading.value = false
|
|
|
|
- console.log(data)
|
|
|
|
- if (data.code == 1) {
|
|
|
|
- waybillDelivery.value = data.data.list
|
|
|
|
- } else {
|
|
|
|
- messageType.value = 'error'
|
|
|
|
- messageText.value = data.msg
|
|
|
|
- messageRef.value.open()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
- loading.value = false
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
+ const res = await waybillPickUpOrders()
|
|
|
|
+
|
|
|
|
+ loading.value = false
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
+ waybillDelivery.value = res.data.list
|
|
|
|
+ } else {
|
|
|
|
+ messageType.value = 'error'
|
|
|
|
+ messageText.value = res.msg
|
|
|
|
+ messageRef.value.open()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
- token.value = uni.getStorageSync('token')
|
|
|
|
getList()
|
|
getList()
|
|
})
|
|
})
|
|
onNavigationBarButtonTap((event) => {
|
|
onNavigationBarButtonTap((event) => {
|
|
@@ -380,7 +368,7 @@ onNavigationBarButtonTap((event) => {
|
|
|
|
|
|
.order-no {
|
|
.order-no {
|
|
padding: 14rpx;
|
|
padding: 14rpx;
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ //font-size: 16rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.icon {
|
|
.icon {
|
|
@@ -391,7 +379,7 @@ onNavigationBarButtonTap((event) => {
|
|
|
|
|
|
.address-info {
|
|
.address-info {
|
|
padding: 14rpx;
|
|
padding: 14rpx;
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ //font-size: 16rpx;
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
.info {
|
|
.info {
|
|
@@ -424,7 +412,7 @@ onNavigationBarButtonTap((event) => {
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
|
button {
|
|
button {
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ //font-size: 16rpx;
|
|
margin: 10rpx;
|
|
margin: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -442,7 +430,7 @@ onNavigationBarButtonTap((event) => {
|
|
height: 35px;
|
|
height: 35px;
|
|
width: 50%;
|
|
width: 50%;
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
- font-size: 16rpx;
|
|
|
|
|
|
+ //font-size: 16rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.uni-icons {
|
|
.uni-icons {
|