页面修改
This commit is contained in:
parent
a850a281a4
commit
3bc4b861dd
57
App.vue
57
App.vue
@ -4,28 +4,6 @@
|
||||
// #endif
|
||||
export default {
|
||||
onLaunch: async function() {
|
||||
const audioContext = uni.createInnerAudioContext()
|
||||
// 设置音频文件地址
|
||||
audioContext.src = './static/mp3/order.mp3'
|
||||
let noticeArr = []
|
||||
// 播放音频
|
||||
//#ifdef APP-PLUS
|
||||
jpushModule.addNotificationListener(res => {
|
||||
if (!noticeArr.includes(res.messageID)) {
|
||||
console.log(res.messageID)
|
||||
audioContext.play()
|
||||
noticeArr.push(res.messageID)
|
||||
console.log("app的")
|
||||
uni.vibrateLong({
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
// #endif
|
||||
console.log('App Launch')
|
||||
try {
|
||||
if (!this.$store.state.app.token) uni.redirectTo({
|
||||
@ -49,20 +27,29 @@
|
||||
// })
|
||||
},
|
||||
onShow: function() {
|
||||
const audioContext = uni.createInnerAudioContext()
|
||||
// 设置音频文件地址
|
||||
audioContext.src = './static/mp3/order.mp3'
|
||||
let noticeArr = []
|
||||
// 播放音频
|
||||
//#ifdef APP-PLUS
|
||||
jpushModule.addNotificationListener(res => {
|
||||
if (!noticeArr.includes(res.messageID)) {
|
||||
console.log(res.messageID)
|
||||
audioContext.play()
|
||||
noticeArr.push(res.messageID)
|
||||
console.log("app的")
|
||||
uni.vibrateLong({
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
// #endif
|
||||
console.log('App Show')
|
||||
// 创建内部音频对象
|
||||
// const audioContext = uni.createInnerAudioContext()
|
||||
|
||||
// // 设置音频文件地址
|
||||
// audioContext.src = './static/mp3/order.mp3'
|
||||
|
||||
// // 播放音频
|
||||
// //#ifdef APP-PLUS
|
||||
// jpushModule.addNotificationListener(res => {
|
||||
// console.log("监听成功")
|
||||
// audioContext.play()
|
||||
// })
|
||||
// // #endif
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
|
125
components/property/vehicleCard.vue
Normal file
125
components/property/vehicleCard.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
|
||||
<view class="personnel_list">
|
||||
<view class="cards">
|
||||
<view class="cards_head">
|
||||
<text>最后更新</text>
|
||||
<text>更新档案</text>
|
||||
<text>查看档案</text>
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
<view class="">
|
||||
<text>人员姓名 :</text>
|
||||
<text> { item.name }</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>联系电话 :</text>
|
||||
<text>{ item.phone }</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>所属片区 :</text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="left">
|
||||
<view class="cir">
|
||||
<u--image class="u_avatar" :showLoading="true" :src="'../../static/img/public/man.png'"
|
||||
width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "vehicle",
|
||||
data() {
|
||||
return {
|
||||
data: {
|
||||
cardHead: ["车牌号", "车牌号", "车牌号"]
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.personnel_list {
|
||||
padding: 28rpx 0;
|
||||
margin-bottom: 130rpx;
|
||||
|
||||
.cards {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 30rpx;
|
||||
opacity: 1;
|
||||
overflow: hidden;
|
||||
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
||||
|
||||
.cards_head {
|
||||
padding: 28rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cards_content {
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
text-align: center;
|
||||
// padding: 15rpx 25rpx;
|
||||
padding-top: 20rpx;
|
||||
|
||||
width: 160rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
border-radius: 40rpx;
|
||||
|
||||
.cir {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background-color: #ffffff;
|
||||
margin-left: 25rpx;
|
||||
border-radius: 120rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
view {
|
||||
text:nth-child(2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u_avatar {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
22
pages.json
22
pages.json
@ -477,10 +477,28 @@
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "vehicle/vehicle",
|
||||
"path": "property/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "资产管理",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "property/chosseCompany",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择公司",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "property/vehicle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "三轮车游走",
|
||||
"enablePullDownRefresh": false,
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarBackgroundColor": "#0122C7",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
@ -96,7 +96,7 @@
|
||||
<block v-for="(item, index) in oaHomeData" :key="index">
|
||||
<view class="track_item" @click="navTwo(item.url, index)">
|
||||
<u--image :showLoading="true" :src="iconList[index]" mode="widthFix" width="77.19rpx"
|
||||
height="77.19rpx"></u--image>
|
||||
height="65rpx"></u--image>
|
||||
<view class="title">{{ item.text }}</view>
|
||||
</view>
|
||||
</block>
|
||||
@ -258,8 +258,8 @@
|
||||
that.$refs.globalPopup.showPopu();
|
||||
that.getOrderList();
|
||||
console.log("idnex的");
|
||||
}
|
||||
that.notArr.push(result.messageID);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
@ -291,6 +291,7 @@
|
||||
// })
|
||||
// },
|
||||
async getOrderList() {
|
||||
console.log("列表")
|
||||
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||
let res = await getList({
|
||||
user_id: id,
|
||||
@ -426,6 +427,7 @@
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getOrderList();
|
||||
// this.getIndexList()
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
@ -565,7 +567,7 @@
|
||||
/* 设置元素宽度,根据需要进行调整 */
|
||||
.text_time {
|
||||
display: inline-block;
|
||||
background-color: #ff8c1a;
|
||||
background-color: #ff7c32;
|
||||
color: white;
|
||||
padding: 5rpx 10rpx;
|
||||
margin-right: 10rpx;
|
||||
|
@ -2,7 +2,12 @@
|
||||
vertical-align: middle;
|
||||
/* 垂直居中对齐 */
|
||||
}
|
||||
|
||||
.lg_status1 {
|
||||
color: #40bc5e;
|
||||
}
|
||||
.lg_status2 {
|
||||
color: #ff7c32;
|
||||
}
|
||||
.font-bg-red,
|
||||
.font_bg-red {
|
||||
display: inline-block;
|
||||
|
BIN
static/img/home/ZCGL.png
Normal file
BIN
static/img/home/ZCGL.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 1.4 KiB |
@ -1,2 +1,2 @@
|
||||
export const companyContractType = [23,24,25]
|
||||
export const companyContractType = [23, 24, 25, 29]
|
||||
export const personnerContractType = [19, 20, 21, 22]
|
@ -17,8 +17,7 @@ export const wenluData = [
|
||||
'gxsy/laojiao@2x.png',
|
||||
'gxsy/zbgy@2x.png'
|
||||
]
|
||||
export const marketData = [
|
||||
{
|
||||
export const marketData = [{
|
||||
title: '江阳区',
|
||||
text: '醉美泸州 • 中国酒城',
|
||||
src: 'gxsy/jiangyang@2x.png',
|
||||
@ -67,8 +66,7 @@ export const marketData = [
|
||||
code: '510522'
|
||||
}
|
||||
]
|
||||
export const shichangData = [
|
||||
{
|
||||
export const shichangData = [{
|
||||
url: 'img4@2x.png',
|
||||
title: 'rexiao@2x.png',
|
||||
text: '农业生产产品'
|
||||
@ -79,8 +77,7 @@ export const shichangData = [
|
||||
text: '村名生活用品'
|
||||
}
|
||||
]
|
||||
export const openList = [
|
||||
{
|
||||
export const openList = [{
|
||||
title: '党建在线',
|
||||
text: '党建资讯文章',
|
||||
src: 'djzx@2x.png',
|
||||
@ -129,8 +126,7 @@ export const openList = [
|
||||
}
|
||||
}
|
||||
]
|
||||
export const quickLink = [
|
||||
{
|
||||
export const quickLink = [{
|
||||
icon: 'scfw',
|
||||
src: 'scfw.png',
|
||||
name: '商超服务',
|
||||
@ -191,10 +187,10 @@ export const quickLink = [
|
||||
]
|
||||
|
||||
// oaHOme快速入口数据
|
||||
export const oaHomeData = [
|
||||
{
|
||||
export const oaHomeData = [{
|
||||
text: '公司信息',
|
||||
icon: prefix + 'oa/qjsq@2x.png',
|
||||
// icon: "@/static/img/home/GSXX",
|
||||
url: '/subpkg/companyInfo/companyInfo',
|
||||
admin: true
|
||||
},
|
||||
@ -212,7 +208,8 @@ export const oaHomeData = [
|
||||
// },
|
||||
{
|
||||
text: '合同管理',
|
||||
icon: prefix + 'oa/cgsq@2x.png',
|
||||
// icon: prefix + 'oa/cgsq@2x.png',
|
||||
icon: "../../static/img/home/GSXX.png",
|
||||
url: '/subpkg/contract/contract'
|
||||
},
|
||||
// {
|
||||
@ -249,6 +246,11 @@ export const oaHomeData = [
|
||||
icon: prefix + 'oa/gengduo@2x.png',
|
||||
url: '/subpkg/finance/finance'
|
||||
},
|
||||
{
|
||||
text: '资产管理',
|
||||
icon: prefix + 'oa/gengduo@2x.png',
|
||||
url: '/subpkg/property/index'
|
||||
},
|
||||
// {
|
||||
// text: '出差申请',
|
||||
// icon: prefix + 'oa/ccsq@2x.png'
|
||||
|
@ -80,6 +80,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
<mybtn text="新建签约" @click="navTo('/subpkg/companyUnsign/companyUnsign')">
|
||||
|
@ -299,8 +299,12 @@
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 24vw;
|
||||
width: auto;
|
||||
line-height: 44px;
|
||||
|
||||
.name {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -313,9 +317,9 @@
|
||||
color: #FFFFFF;
|
||||
|
||||
|
||||
.name {
|
||||
margin: 0 17.5rpx;
|
||||
}
|
||||
// .name {
|
||||
// margin: 0 17.5rpx;
|
||||
// }
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
|
126
subpkg/property/chosseCompany.vue
Normal file
126
subpkg/property/chosseCompany.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<view class="cards">
|
||||
<view class="cards_head">
|
||||
<view class="cards_head_top">
|
||||
<text><u--image src="../../static/img/company/company.png" width="33.29rpx" height="33.29rpx"
|
||||
style="margin-right:20rpx"></u--image></text>
|
||||
<text>{item.company_name}</text>
|
||||
</view>
|
||||
<text @click="navTo('/subpkg/companySign/companySign?id=')">详情 <uni-icons type="forward"
|
||||
style="margin-left: 10rpx;" color="white"></uni-icons></text>
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
<view class="is_contract">
|
||||
<view>
|
||||
<text>法人姓名 :</text>
|
||||
<text>{item.master_name}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="color: green;" v-if="true">已签约</text>
|
||||
<text style="color: red;" v-else>未签约</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
<text>担任职务 :</text>
|
||||
<text>{item.master_position}</text>
|
||||
</view>
|
||||
<view class="" @click="copyPhone()">
|
||||
<text>联系电话 :</text>
|
||||
<text>{item.master_phone}</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>负责区域 :</text>
|
||||
<text> {item.city_name+item.area_name}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cards {
|
||||
|
||||
margin: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 30rpx;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
.cards_head {
|
||||
padding: 28rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.cards_head_top {
|
||||
display: flex;
|
||||
width: 70vw;
|
||||
}
|
||||
}
|
||||
|
||||
.cards_content {
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
text-align: center;
|
||||
// padding: 15rpx 25rpx;
|
||||
padding-top: 20rpx;
|
||||
|
||||
width: 160rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
border-radius: 40rpx;
|
||||
|
||||
.cir {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background-color: #ffffff;
|
||||
margin-left: 25rpx;
|
||||
border-radius: 120rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.is_contract {
|
||||
width: 85vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u_avatar {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
</style>
|
223
subpkg/property/index.vue
Normal file
223
subpkg/property/index.vue
Normal file
@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky bgColor="#0122C7" style="width: 100vw">
|
||||
<u-tabs :list="tabLists" @change="sectionChange" lineColor="#fff" :scrollable="false" lineWidth="40"
|
||||
inactiveStyle="color:#fff" activeStyle="color:#fff"></u-tabs>
|
||||
</u-sticky>
|
||||
<view class="serch">
|
||||
<u-search placeholder="搜索你的订单" :show-action="true" bg-color="white" v-model="keywords"></u-search>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="curNow==0" class="personnel_list">
|
||||
<view class="cards">
|
||||
<view class="cards_head">
|
||||
<text>XSDSDSD</text>
|
||||
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
<view class="li">
|
||||
<text>车牌号: </text>
|
||||
<text> { item.name }</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>行驶总里程: </text>
|
||||
<text>{ item.phone }</text>
|
||||
<view style="float: right;">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox active-color="#0122C7" v-model="checked" shape="square"
|
||||
label=""></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>本公司签约时间: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view v-else>
|
||||
<view class="personnel_list" @click="toDetail('/subpkg/property/vehicle')">
|
||||
<view class="cards">
|
||||
<view class="cards_head">
|
||||
<text>车牌号</text>
|
||||
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
<view class="li">
|
||||
<text>行驶总里程: </text>
|
||||
<text> { item.name }</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>本公司签约时间: </text>
|
||||
<text>{ item.phone }</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>承租公司: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>负责人: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>联系方式: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>所属区域: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>承租时间: </text>
|
||||
<text> 所属片区 </text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<mybtn position="position" v-if='!curNow' text="签约" @click="signFn">
|
||||
<u-icon name="edit-pen-fill" color="white" size="20"></u-icon>
|
||||
</mybtn>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mybtn from "@/components/mybtn/mybtn.vue"
|
||||
export default {
|
||||
components: {
|
||||
mybtn
|
||||
},
|
||||
name: "vehicle",
|
||||
data() {
|
||||
return {
|
||||
tabLists: [{
|
||||
name: '未出租',
|
||||
}, {
|
||||
name: '已出租'
|
||||
}, ],
|
||||
curNow: 0,
|
||||
checked: 0,
|
||||
keywords: "",
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
signFn() {
|
||||
console.log("签约咯")
|
||||
this.toDetail("/subpkg/property/chosseCompany")
|
||||
},
|
||||
|
||||
toDetail(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curNow = index.index;
|
||||
console.log(this.curNow)
|
||||
// this.getOrderList()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.serch {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
}
|
||||
|
||||
.personnel_list {
|
||||
padding: 28rpx 0;
|
||||
margin-bottom: 130rpx;
|
||||
|
||||
.cards {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 30rpx;
|
||||
opacity: 1;
|
||||
overflow: hidden;
|
||||
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
||||
|
||||
.cards_head {
|
||||
padding: 28rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cards_content {
|
||||
padding: 10rpx 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
text-align: center;
|
||||
// padding: 15rpx 25rpx;
|
||||
padding-top: 20rpx;
|
||||
|
||||
width: 160rpx;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
border-radius: 40rpx;
|
||||
|
||||
.cir {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background-color: #ffffff;
|
||||
margin-left: 25rpx;
|
||||
border-radius: 120rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.li {
|
||||
margin: 10rpx 0;
|
||||
width: 85vw;
|
||||
|
||||
.check_box {
|
||||
// background-color: #ff0000;
|
||||
// color: red;
|
||||
}
|
||||
|
||||
// background-color: red;
|
||||
text:nth-child(1) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,94 +1,47 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if='showLoading'>
|
||||
<!-- <view v-if='showLoading'>
|
||||
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||
</view>
|
||||
<view v-else>
|
||||
</view> -->
|
||||
<view>
|
||||
<view class="content">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<view class="map">
|
||||
|
||||
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
|
||||
:markers='markers' :scale="scale" style="width:100%;height: 70%;"
|
||||
:markers='markers' :scale="scale" style="width:100%;height: 100%;"
|
||||
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
|
||||
<cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||
</cover-image>
|
||||
</map>
|
||||
<view class="map_address">
|
||||
<view>
|
||||
<text class="cir" style="background-color: #40BC5E;"></text> 起点: {{nowAddress}}
|
||||
</view>
|
||||
<view class="map_address">
|
||||
<view class="li">
|
||||
<view>
|
||||
<text class="cir" style="background-color: #40BC5E;"></text>
|
||||
中转站: 恐惧发现不舒服1还得上课讲话方式打开就
|
||||
</view>
|
||||
<view :class="{lg_status1:true,lg_status2:false}">
|
||||
<text class="cir" style="background-color: transparent;"></text>
|
||||
<text>车辆状态</text>:<text v-if="true">已完成</text>
|
||||
<text v-else style="color: #FF7C32;">进行中</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view>
|
||||
<text class="cir" style="background-color: #FF7C32;"></text>
|
||||
终点: {{goodsDetil.logistics.shop_address}}
|
||||
终 点: 恐惧发现不舒服1还得上课讲话方式打开就
|
||||
</view>
|
||||
<view :class="{lg_status1:true,lg_status2:false}">
|
||||
<text class="cir" style="background-color: transparent;"></text>
|
||||
<text class="status">车辆状态</text>:<text v-if="true">已完成</text>
|
||||
<text v-else style=" color: #FF7C32;">进行中</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order_info">
|
||||
<view class="top">
|
||||
<view>
|
||||
订单号信息:
|
||||
</view>
|
||||
<view>订单编号: {{goodsDetil.logistics.order_sn}}</view>
|
||||
<view>
|
||||
商户名称: {{goodsDetil.logistics.shop_name}}
|
||||
</view>
|
||||
<view @click.stop="callFn(goodsDetil.logistics.shop_phone)">
|
||||
联系电话: <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
||||
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.shop_phone}}
|
||||
</view>
|
||||
<view>
|
||||
店铺地址: {{goodsDetil.logistics.shop_address}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mark">
|
||||
请详细核对订单信息
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="order_info" style="background-color: #47BE62;">
|
||||
<view class="top">
|
||||
<view>
|
||||
物流信息:
|
||||
</view>
|
||||
<view>用户名称: {{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
|
||||
<view>
|
||||
通知时间: {{goodsDetil.logistics.create_time}}
|
||||
</view>
|
||||
<view class="pro_list">
|
||||
<text>
|
||||
商品信息
|
||||
</text>
|
||||
<view class="goods">
|
||||
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
|
||||
<text style="flex: 8;">{{item.goods_name}}</text>
|
||||
<text style="flex: 2;">X{{item.product_num}}{{item.goods_unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="mark" style="display: flex; justify-content: space-between;">
|
||||
<text>请详细核对订单信息</text>
|
||||
<text style="color: #0122C7;">共计{{goodsDetil.product_count}}件商品</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 200rpx;height: 1px;">
|
||||
<!-- 565 -->
|
||||
</view>
|
||||
<view class="btn" v-if="!is_captain">
|
||||
<u-button @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
|
||||
<u-icon name="scan" color="white" size="30" style="margin-right: 10rpx;"></u-icon>
|
||||
扫码取货</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<mybtn v-if="status==1" position="position" @click="getFn" text="抵达地点(中转站) 1/2"></mybtn>
|
||||
<mybtn v-else position="position" text="抵达地点(终点) 2/2"></mybtn>
|
||||
</view>
|
||||
|
||||
|
||||
@ -96,6 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mybtn from "@/components/mybtn/mybtn.vue"
|
||||
import {
|
||||
getDetil
|
||||
} from "@/api/logistics.js"
|
||||
@ -103,9 +57,12 @@
|
||||
takeGoods
|
||||
} from "@/api/logistics.js"
|
||||
export default {
|
||||
components: {
|
||||
mybtn
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
is_captain: 0,
|
||||
status: 1,
|
||||
mapClass: 'custom-map',
|
||||
showLoading: true,
|
||||
showPop: false,
|
||||
@ -116,8 +73,8 @@
|
||||
// 商家
|
||||
{
|
||||
id: 1,
|
||||
latitude: undefined,
|
||||
longitude: undefined,
|
||||
latitude: 28.8733,
|
||||
longitude: 105.445717,
|
||||
iconPath: '../../static/img/logistics/SJ.png', //显示的图标
|
||||
},
|
||||
// 骑手
|
||||
@ -133,16 +90,6 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fuzzyName(name) {
|
||||
let length = name.length;
|
||||
let fuzzyChars = "*".repeat(length - 1);
|
||||
return name[0] + fuzzyChars;
|
||||
},
|
||||
callFn(num) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: num
|
||||
});
|
||||
},
|
||||
// 获取位置
|
||||
// 位置
|
||||
locationFn() {
|
||||
@ -153,9 +100,6 @@
|
||||
geocode: true,
|
||||
isHighAccuracy: true,
|
||||
success: function async (res) {
|
||||
that.nowAddress = res.address.city + res.address.district + res.address.street + res
|
||||
.address.streetNum + res.address.poiName
|
||||
|
||||
that.markers[1].latitude = res.latitude
|
||||
that.markers[1].longitude = res.longitude
|
||||
that.getDriverLine()
|
||||
@ -221,12 +165,42 @@
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||
})
|
||||
},
|
||||
// 计算距离
|
||||
getDistance(point1, point2) {
|
||||
const rad = Math.PI / 180.0;
|
||||
|
||||
|
||||
const lat1 = point1.latitude;
|
||||
const lng1 = point1.longitude;
|
||||
const lat2 = point2.latitude;
|
||||
const lng2 = point2.longitude;
|
||||
const dlat = lat2 - lat1;
|
||||
const dlng = lng2 - lng1;
|
||||
const a =
|
||||
Math.sin(dlat / 2 * rad) * Math.sin(dlat / 2 * rad) +
|
||||
Math.cos(lat1 * rad) * Math.cos(lat2 * rad) *
|
||||
Math.sin(dlng / 2 * rad) * Math.sin(dlng / 2 * rad);
|
||||
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
const distance = 6378137 * c;
|
||||
return distance;
|
||||
},
|
||||
getFn() {
|
||||
this.locationFn()
|
||||
console.log(545)
|
||||
console.log()
|
||||
// console.log(this.getDistance(this.markers[0], this.markers[1]))
|
||||
if ((this.getDistance(this.markers[0], this.markers[1]) >> 0) > 300) {
|
||||
// return
|
||||
uni.showToast({
|
||||
title: `距离目标位置过远`,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
getDriverLine() {
|
||||
const that = this;
|
||||
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
|
||||
|
||||
const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
|
||||
|
||||
const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
|
||||
uni.request({
|
||||
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
|
||||
@ -246,16 +220,13 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
that.runningRoute = data.paths[0].steps[0].instruction;
|
||||
|
||||
}
|
||||
that.polyline = [{
|
||||
points: points,
|
||||
color: "#0091ff",
|
||||
dottedLine: true,
|
||||
width: 30,
|
||||
|
||||
}, ];
|
||||
},
|
||||
fail: function(res) {
|
||||
@ -264,48 +235,21 @@
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
qrqodeFn() {
|
||||
let that = this
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: function(res) {
|
||||
that.takeGood(res.result)
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取货{}
|
||||
takeGood(sn) {
|
||||
takeGoods({
|
||||
logistics_id: this.goodsDetil.logistics.id,
|
||||
order_id: this.goodsDetil.logistics.order_id,
|
||||
order_sn: sn
|
||||
}).then(res => {
|
||||
this.showToast()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
// console.log()
|
||||
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
|
||||
getDetil({
|
||||
logistics_id: 6
|
||||
}).then(res => {
|
||||
this.goodsDetil = res.data
|
||||
this.markers[0].latitude = res.data.logistics.shop_lat
|
||||
this.markers[0].longitude = res.data.logistics.shop_long
|
||||
this.locationFn()
|
||||
// console.log()
|
||||
setTimeout(() => {
|
||||
this.showLoading = false
|
||||
}, 500)
|
||||
})
|
||||
this.showLoading = true
|
||||
}, 1000)
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// this.getOrderList();
|
||||
// this.getIndexList()
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -316,13 +260,13 @@
|
||||
|
||||
.content {
|
||||
padding: 2vh 3vw;
|
||||
background-color: #F6F7FC;
|
||||
background-color: #F5F5F5;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.map {
|
||||
height: 40vh;
|
||||
height: 60vh;
|
||||
border-radius: 2vw;
|
||||
overflow: hidden;
|
||||
|
||||
@ -332,10 +276,14 @@
|
||||
background-color: white;
|
||||
padding: 20rpx 10rpx;
|
||||
|
||||
.li {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.cir {
|
||||
display: inline-block;
|
||||
width: 2vw;
|
||||
height: 4vw;
|
||||
height: 2vw;
|
||||
border-radius: 2vw;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
@ -350,55 +298,6 @@
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
|
||||
.order_info {
|
||||
border: none;
|
||||
background-color: #FF7C32;
|
||||
border-radius: 2vw;
|
||||
overflow: hidden;
|
||||
margin-top: 50rpx;
|
||||
margin-bottom: 30rpx;
|
||||
color: white;
|
||||
|
||||
.top {
|
||||
padding: 1vw 3vw;
|
||||
|
||||
view {
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.mark {
|
||||
background-color: white;
|
||||
color: #A8A8A8;
|
||||
padding: 10rpx 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.pro_list {
|
||||
display: flex;
|
||||
|
||||
text {
|
||||
|
||||
flex: 2
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 8;
|
||||
margin: 0;
|
||||
|
||||
.goods_tit {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
||||
position: fixed;
|
Loading…
x
Reference in New Issue
Block a user