This commit is contained in:
THK3121 2023-08-23 11:35:09 +08:00
parent 5399625d7d
commit 1bb374e0fb
7 changed files with 265 additions and 141 deletions

View File

@ -68,7 +68,6 @@
}, },
showToast() { showToast() {
// 6
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'success', type: 'success',
title: '成功主题(带图标)', title: '成功主题(带图标)',
@ -78,7 +77,6 @@
}, },
showToast2() { showToast2() {
// 6 // 6
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'error', type: 'error',
message: "取件码不能为空", message: "取件码不能为空",

View File

@ -3,8 +3,6 @@
<view v-if='showLoading'> <view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page> <u-loading-page :loading="showLoading"></u-loading-page>
</view> </view>
<view v-else> <view v-else>
<view class="order"> <view class="order">
<p class="tit" v-if="goodsDetil.logistics.status==1">订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}} <p class="tit" v-if="goodsDetil.logistics.status==1">订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}}
@ -87,7 +85,6 @@
</view> </view>
</view> </view>
<!-- 已送达 --> <!-- 已送达 -->
<view class="left" v-if="goodsDetil.logistics.status==2"> <view class="left" v-if="goodsDetil.logistics.status==2">
<view class="list"> <view class="list">

View File

@ -4,8 +4,24 @@
v-model="keywords"></u-search> v-model="keywords"></u-search>
<view class="cards"> <view class="cards" v-for="item,index in orderlist" :key="index">
<view class="li">订单编号: {{item.order_sn}}</view>
<view class="li">取货时间: {{item.qh_time}}</view>
<view class="li">手机号: {{item.receiver_phone}}</view>
<view class="btn_li">收货人姓名: {{fuzzyName(item.receiver_name)}} <u-button type="primary" class="btn"
@click="doneFn(item.id)"><u-icon name="car-fill" color="white" size="25"
style="margin-right: 10rpx;;"></u-icon>
货物送达</u-button></view>
</view>
<view>
<u-modal :show="showPop" @close="showPop=false" title="请输入收件码" @confirm="confirm"
:closeOnClickOverlay="true">
<view class="slot-content">
<u--input placeholder="请输入收件码" type="number" border="surround" v-model="take_code"></u--input>
</view>
</u-modal>
<u-toast ref="uToast"></u-toast>
</view> </view>
</view> </view>
</template> </template>
@ -14,35 +30,102 @@
import { import {
getList getList
} from "@/api/logistics.js" } from "@/api/logistics.js"
import {
doneDelivery
} from "@/api/logistics.js"
export default { export default {
data() { data() {
return {
return {} showPop: false,
keywords: "",
orderlist: [],
is_captain: "",
take_code: "",
order_id: "",
} }
} },
methods: { methods: {
// getOrderList() { fuzzyName(name) {
// console.log("") let length = name.length;
// let id = JSON.parse(uni.getStorageSync('USER_INFO')).id let fuzzyChars = "*".repeat(length - 1);
// getList({ return name[0] + fuzzyChars;
// status: 1, },
// user_id: id, showToast() {
// keywords: this.keywords, this.$refs.uToast.show({
// user_type: this.is_captain type: 'success',
// }).then(res => { title: '成功主题(带图标)',
// this.orderlist = [] message: "操作成功",
// this.orderlist = res.data.data iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
// }) })
// } },
doneFn(id) {
this.order_id = id
this.showPop = true
},
confirm() {
if (!this.take_code) return
doneDelivery({
take_code: this.take_code,
logistics_id: this.order_id,
}).then(res => {
this.showToast()
})
this.showPop = false
this.getOrderList()
},
getOrderList() {
console.log("列表更新")
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
getList({
status: 1,
user_id: id,
keywords: this.keywords,
user_type: this.is_captain
}).then(res => {
this.orderlist = []
this.orderlist = res.data.data
})
}
},
onLoad() {
this.is_captain = JSON.parse(uni.getStorageSync('USER_INFO')).is_captain
this.getOrderList()
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
padding: 30rpx; padding: 30rpx;
.cards {
padding: 2vw;
border-radius: 15rpx;
background-color: white;
margin: 30rpx 0;
.li {
// margin: 10rpx 0;
height: 43rpx;
}
.btn_li {
display: flex;
justify-content: space-between;
align-items: center;
height: 43rpx;
.btn {
background-color: #FF7C32;
border: 0;
border-radius: 2vw;
width: auto;
height: 60rpx;
}
}
}
} }
</style> </style>

View File

@ -247,7 +247,7 @@ export const oaHomeData = [{
{ {
text: '驿站', text: '驿站',
icon: '../../static/img/home/GRCW.png', icon: '../../static/img/home/GRCW.png',
url: '/subpkg/finance/finance', url: '/pages/logistics/post',
// captain: true // captain: true
}, },
// { // {

View File

@ -22,10 +22,18 @@
</view> </view>
</view> </view>
<view class=""> <view class="is_contract">
<view>
<text>担任职务 :</text> <text>担任职务 :</text>
<text>{item.master_position}</text> <text>{item.master_position}</text>
</view> </view>
<view>
<u-checkbox-group>
<u-checkbox active-color="#0122C7" v-model="checked" shape="square" label=""></u-checkbox>
</u-checkbox-group>
</view>
</view>
<view class="" @click="copyPhone()"> <view class="" @click="copyPhone()">
<text>联系电话 :</text> <text>联系电话 :</text>
<text>{item.master_phone}</text> <text>{item.master_phone}</text>

View File

@ -5,15 +5,15 @@
inactiveStyle="color:#fff" activeStyle="color:#fff"></u-tabs> inactiveStyle="color:#fff" activeStyle="color:#fff"></u-tabs>
</u-sticky> </u-sticky>
<view class="serch"> <view class="serch">
<u-search placeholder="搜索你的订单" :show-action="true" bg-color="white" v-model="keywords"></u-search> <u-search placeholder="输入车牌号进行搜索" :show-action="true" bg-color="white" v-model="keywords"></u-search>
</view> </view>
<view v-if="curNow==0" class="personnel_list"> <view v-if="curNow==0" class="personnel_list">
<view class="cards"> <view v-if="dataList.length">
<view class="cards" v-for="item,index in dataList" :key="index">
<view class="cards_head"> <view class="cards_head">
<text>XSDSDSD</text> <text>XSDSDSD</text>
</view> </view>
<view class="cards_content"> <view class="cards_content">
<view class="right"> <view class="right">
@ -25,8 +25,8 @@
<text>行驶总里程: </text> <text>行驶总里程: </text>
<text>{ item.phone }</text> <text>{ item.phone }</text>
<view style="float: right;"> <view style="float: right;">
<u-checkbox-group> <u-checkbox-group v-model="checked">
<u-checkbox active-color="#0122C7" v-model="checked" shape="square" <u-checkbox active-color="#0122C7" :label="item" :name="item" shape="square"
label=""></u-checkbox> label=""></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
@ -43,6 +43,18 @@
</view> </view>
</view> </view>
<view v-else>
<!-- dsdssaddddddddddddddddddddddddddddddddddddddd -->
<view class="empty">
<!-- <u-empty></u-empty> -->
<view>
当前没有可以签约的的车辆,快去签约新车吧!
</view>
<u-button type="primary" class="btn"> 签约新车</u-button>
</view>
</view>
</view>
<view v-else> <view v-else>
@ -103,6 +115,10 @@
<script> <script>
import mybtn from "@/components/mybtn/mybtn.vue" import mybtn from "@/components/mybtn/mybtn.vue"
import {
Toast
} from "../../libs/uniApi";
// Toast("")
export default { export default {
components: { components: {
mybtn mybtn
@ -110,6 +126,7 @@
name: "vehicle", name: "vehicle",
data() { data() {
return { return {
dataList: [],
tabLists: [{ tabLists: [{
name: '未出租', name: '未出租',
}, { }, {
@ -124,8 +141,11 @@
}, },
methods: { methods: {
signFn() { signFn() {
console.log("签约咯") console.log(this.checked)
if (!this.checked.length) Toast("请至少选择一辆车")
else {
this.toDetail("/subpkg/property/chosseCompany") this.toDetail("/subpkg/property/chosseCompany")
}
}, },
toDetail(url) { toDetail(url) {
@ -151,6 +171,20 @@
padding: 28rpx 0; padding: 28rpx 0;
margin-bottom: 130rpx; margin-bottom: 130rpx;
.empty {
padding-top: 100rpx;
text-align: center;
.btn {
width: 30vw;
margin-top: 10rpx;
}
// height: 80vh;
// background-color: red;
}
.cards { .cards {
margin: 0 auto; margin: 0 auto;
margin-bottom: 28rpx; margin-bottom: 28rpx;

View File

@ -59,7 +59,9 @@
taskTricycleDetail, taskTricycleDetail,
taskAddTricycleCoordinate taskAddTricycleCoordinate
} from "@/api/task.js" } from "@/api/task.js"
import { Toast } from "../../libs/uniApi"; import {
Toast
} from "../../libs/uniApi";
export default { export default {
components: { components: {
mybtn mybtn
@ -109,7 +111,9 @@ import { Toast } from "../../libs/uniApi";
methods: { methods: {
// //
async initPosition() { async initPosition() {
let res = await taskTricycleDetail({id: this.task_id}); let res = await taskTricycleDetail({
id: this.task_id
});
this.address = res.data.extend; this.address = res.data.extend;
if (res.data.extend?.update?.terminus?.lnglat[0]) { //, if (res.data.extend?.update?.terminus?.lnglat[0]) { //,
this.markers[0].latitude = +res.data.extend.transfer.lnglat[1]; this.markers[0].latitude = +res.data.extend.transfer.lnglat[1];