This commit is contained in:
weipengfei 2023-08-22 16:08:03 +08:00
commit 114348255a
15 changed files with 2233 additions and 1758 deletions

57
App.vue
View File

@ -4,28 +4,6 @@
// #endif // #endif
export default { export default {
onLaunch: async function() { 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') console.log('App Launch')
try { try {
if (!this.$store.state.app.token) uni.redirectTo({ if (!this.$store.state.app.token) uni.redirectTo({
@ -49,20 +27,29 @@
// }) // })
}, },
onShow: function() { 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') 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() { onHide: function() {
console.log('App Hide') console.log('App Hide')

View 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>

View File

@ -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": { "style": {
"navigationBarTitleText": "三轮车游走", "navigationBarTitleText": "三轮车游走",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }

View File

@ -2,7 +2,10 @@
<view class="oa_home" style="oaColor"> <view class="oa_home" style="oaColor">
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> --> <!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"> <view
class="home_header"
:class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"
>
<!-- #ifdef APP-PLUS||H5 --> <!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height)"></view> <view style="height: var(--status-bar-height)"></view>
<view style="height: 30rpx"></view> <view style="height: 30rpx"></view>
@ -10,12 +13,20 @@
<view class="my_info"> <view class="my_info">
<view class="head_img"> <view class="head_img">
<view class="img_box"> <view class="img_box">
<u--image :showLoading="true" width="131.43rpx" height="131.43rpx" class="img_box_img" <u--image
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image> :showLoading="true"
width="131.43rpx"
height="131.43rpx"
class="img_box_img"
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
shape="circle"
></u--image>
</view> </view>
<text class="head_text">工作证: {{ myOaInfo.nickname }}</text> <text class="head_text">工作证: {{ myOaInfo.nickname }}</text>
<text class="head_text" style="flex-shrink: 0;">身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text> <text class="head_text" style="flex-shrink: 0"
>身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text
>
</view> </view>
<view v-if="!$store.state.app.token" @click="login" class="mesg_box"> <view v-if="!$store.state.app.token" @click="login" class="mesg_box">
<view class="name"> <view class="name">
@ -53,18 +64,26 @@
</block> </block>
</view> --> </view> -->
<view class="backlog" :class="!ApproveList.length > 0 ? 'backlog_no_data' : ''"> <view
class="backlog"
:class="!ApproveList.length > 0 ? 'backlog_no_data' : ''"
>
<view class="head_title flex_a_c_j_sb"> <view class="head_title flex_a_c_j_sb">
<view class="title">公告列表</view> <view class="title">公告列表</view>
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多 <view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')"
>更多
<view class="iconfont icon-you"> <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons> <uni-icons type="forward"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
<block v-if="ApproveList.length > 0"> <block v-if="ApproveList.length > 0">
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)" <view
:key="index" @click="clickNotice(item.id)"> class="backlog_item flex_a_c_j_sb"
v-for="(item, index) in ApproveList.slice(0, 2)"
:key="index"
@click="clickNotice(item.id)"
>
<view class="text"> <view class="text">
<text class="text_time">{{ <text class="text_time">{{
item.create_time.substring(0, 10).replace(/-/g, ".") item.create_time.substring(0, 10).replace(/-/g, ".")
@ -72,19 +91,24 @@
{{ item.title }} {{ item.title }}
</view> </view>
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i> <i class="iconfont icon-you"
><uni-icons type="forward"></uni-icons
></i>
</view> </view>
</block> </block>
<view v-else class="backlog_no flex_a_c_j_sb"> <view v-else class="backlog_no flex_a_c_j_sb">
<view class="text">暂无更多消息</view> <view class="text">暂无更多消息</view>
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i> <i class="iconfont icon-you"
><uni-icons type="forward"></uni-icons
></i>
</view> </view>
</view> </view>
</view> </view>
<view class="my_task"> <view class="my_task">
<view class="task_title flex_a_c_j_sb"> <view class="task_title flex_a_c_j_sb">
<view class="title">工作管理</view> <view class="title">工作管理</view>
<view class="flex_a_c">更多 <view class="flex_a_c"
>更多
<view class="iconfont icon-you"> <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons> <uni-icons type="forward"></uni-icons>
</view> </view>
@ -95,8 +119,13 @@
<view class="fast_track"> <view class="fast_track">
<block v-for="(item, index) in oaHomeData" :key="index"> <block v-for="(item, index) in oaHomeData" :key="index">
<view class="track_item" @click="navTwo(item.url, index)"> <view class="track_item" @click="navTwo(item.url, index)">
<u--image :showLoading="true" :src="item.icon" mode="widthFix" width="77.19rpx" <u--image
height="77.19rpx"></u--image> :showLoading="true"
:src="item.icon"
mode="widthFix"
width="77.19rpx"
height="77.19rpx"
></u--image>
<view class="title">{{ item.text }}</view> <view class="title">{{ item.text }}</view>
</view> </view>
</block> </block>
@ -105,7 +134,8 @@
<view class="my_task"> <view class="my_task">
<view class="task_title flex_a_c_j_sb"> <view class="task_title flex_a_c_j_sb">
<view class="title">配送信息</view> <view class="title">配送信息</view>
<view class="flex_a_c" @click="goOrderList">更多 <view class="flex_a_c" @click="goOrderList"
>更多
<view class="iconfont icon-you"> <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons> <uni-icons type="forward"></uni-icons>
</view> </view>
@ -117,13 +147,19 @@
</block> --> </block> -->
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<globalPopup ref="globalPopup"></globalPopup> <globalPopup ref="globalPopup"></globalPopup>
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item"> <logistiBriefCard
v-for="(item, index) in orderList"
:key="index"
:goodsInfo="item"
>
</logistiBriefCard> </logistiBriefCard>
</view> </view>
<view v-else class="no_task"> <view v-else class="no_task">
<view class="title">暂无配送信息</view> <view class="title">暂无配送信息</view>
<view class="tips" v-if="!$store.state.app.token">登录后查看配送信息详情</view> <view class="tips" v-if="!$store.state.app.token"
>登录后查看配送信息详情</view
>
</view> </view>
<!-- <view class="head_title flex_a_c_j_sb"> <!-- <view class="head_title flex_a_c_j_sb">
<view class="">我的任务</view> <view class="">我的任务</view>
@ -249,8 +285,8 @@
that.$refs.globalPopup.showPopu(); that.$refs.globalPopup.showPopu();
that.getOrderList(); that.getOrderList();
console.log("idnex的"); console.log("idnex的");
}
that.notArr.push(result.messageID); that.notArr.push(result.messageID);
}
}); });
// #endif // #endif
@ -282,6 +318,7 @@
// }) // })
// }, // },
async getOrderList () { async getOrderList () {
console.log("列表")
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || ""; let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
let res = await getList({ let res = await getList({
user_id: id, user_id: id,
@ -417,6 +454,7 @@
}, },
}, },
onPullDownRefresh () { onPullDownRefresh () {
this.getOrderList();
// this.getIndexList() // this.getIndexList()
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
@ -461,7 +499,6 @@
box-sizing: border-box; box-sizing: border-box;
.img_box { .img_box {
position: absolute; position: absolute;
left: -10rpx; left: -10rpx;
@ -562,7 +599,7 @@
/* 设置元素宽度,根据需要进行调整 */ /* 设置元素宽度,根据需要进行调整 */
.text_time { .text_time {
display: inline-block; display: inline-block;
background-color: #ff8c1a; background-color: #ff7c32;
color: white; color: white;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
margin-right: 10rpx; margin-right: 10rpx;

View File

@ -2,7 +2,12 @@
vertical-align: middle; vertical-align: middle;
/* 垂直居中对齐 */ /* 垂直居中对齐 */
} }
.lg_status1 {
color: #40bc5e;
}
.lg_status2 {
color: #ff7c32;
}
.font-bg-red, .font-bg-red,
.font_bg-red { .font_bg-red {
display: inline-block; display: inline-block;

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

View File

@ -1,2 +1,4 @@
export const companyContractType = [23,24,25,29] export const companyContractType = [23,24,25,29]
export const personnerContractType = [19,20,21,22] export const personnerContractType = [19,20,21,22]
export const companyContractType = [23, 24, 25, 29]
export const personnerContractType = [19, 20, 21, 22]

View File

@ -17,8 +17,7 @@ export const wenluData = [
'gxsy/laojiao@2x.png', 'gxsy/laojiao@2x.png',
'gxsy/zbgy@2x.png' 'gxsy/zbgy@2x.png'
] ]
export const marketData = [ export const marketData = [{
{
title: '江阳区', title: '江阳区',
text: '醉美泸州 • 中国酒城', text: '醉美泸州 • 中国酒城',
src: 'gxsy/jiangyang@2x.png', src: 'gxsy/jiangyang@2x.png',
@ -67,8 +66,7 @@ export const marketData = [
code: '510522' code: '510522'
} }
] ]
export const shichangData = [ export const shichangData = [{
{
url: 'img4@2x.png', url: 'img4@2x.png',
title: 'rexiao@2x.png', title: 'rexiao@2x.png',
text: '农业生产产品' text: '农业生产产品'
@ -79,8 +77,7 @@ export const shichangData = [
text: '村名生活用品' text: '村名生活用品'
} }
] ]
export const openList = [ export const openList = [{
{
title: '党建在线', title: '党建在线',
text: '党建资讯文章', text: '党建资讯文章',
src: 'djzx@2x.png', src: 'djzx@2x.png',
@ -129,8 +126,7 @@ export const openList = [
} }
} }
] ]
export const quickLink = [ export const quickLink = [{
{
icon: 'scfw', icon: 'scfw',
src: 'scfw.png', src: 'scfw.png',
name: '商超服务', name: '商超服务',

View File

@ -80,6 +80,9 @@
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<mybtn text="新建签约" @click="navTo('/subpkg/companyUnsign/companyUnsign')"> <mybtn text="新建签约" @click="navTo('/subpkg/companyUnsign/companyUnsign')">

View File

@ -4,14 +4,24 @@
<view class="top"> <view class="top">
<view @click="navTo()"> <view @click="navTo()">
<view v-if="user_id == 0" class="accont"> <view v-if="user_id == 0" class="accont">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" <u--image
width="44px" height="44px" shape="circle"></u--image> :showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view> <view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> --> <!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
</view> </view>
<view v-else class="accont"> <view v-else class="accont">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" <u--image
width="44px" height="44px" shape="circle"></u--image> :showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view> <view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> --> <!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
@ -23,39 +33,59 @@
</view> </view>
<view class="center"> <view class="center">
<view class="title"> <view class="title">
<text style="margin-right: 20rpx;">账户总金额()</text><uni-icons @click="updateEye()" <text style="margin-right: 20rpx">账户总金额()</text
:type="eyeType?'eye-filled':'eye-slash-filled'" color="#fff"></uni-icons> ><uni-icons
@click="updateEye()"
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'"
color="#fff"
></uni-icons>
</view> </view>
<view class="price" v-show="eyeType">{{userInfo.user_money?userInfo.user_money:'0.00'}}</view> <view class="price" v-show="eyeType"
>{{ userInfo.user_money ? userInfo.user_money : "0.00" }}</view
>
<view class="price" v-show="!eyeType">****</view> <view class="price" v-show="!eyeType">****</view>
<view class="bubble"> <view class="bubble">
<!-- <image src="../../static/img/contract/bubble.png"></image> --> <!-- <image src="../../static/img/contract/bubble.png"></image> -->
<view class="text" v-show="eyeType">可提现金额{{userInfo.user_money||0.00}}</view> <view class="text" v-show="eyeType"
>可提现金额{{ userInfo.user_money || 0.0 }}</view
>
<view class="text" v-show="!eyeType">可提现金额****</view> <view class="text" v-show="!eyeType">可提现金额****</view>
</view> </view>
</view> </view>
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')"> <view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
<view class="item"> <view class="item">
<view>账户余额()</view> <view>账户余额()</view>
<view class="num" v-show="eyeType">{{userInfo.user_money||0.00}}</view> <view class="num" v-show="eyeType">{{
userInfo.user_money || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view> <view class="num" v-show="!eyeType">****</view>
</view> </view>
<u-line direction="col" length="40%" color="#999999FF"></u-line> <u-line direction="col" length="40%" color="#999999FF"></u-line>
<view class="item"> <view class="item">
<view>收益金额()</view> <view>收益金额()</view>
<view class="num" v-show="eyeType">{{userInfo.deposit||0.00}}</view> <view class="num" v-show="eyeType">{{
userInfo.deposit || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view> <view class="num" v-show="!eyeType">****</view>
</view> </view>
</view> </view>
</view> </view>
<view class="bill"> <view class="bill">
<view style="width: 100%;height: 90rpx;background-color: #fff;"></view> <view style="width: 100%; height: 90rpx; background-color: #fff"></view>
<uni-section titleFontSize="32rpx" type="line" title="账单流水"></uni-section> <uni-section
titleFontSize="32rpx"
type="line"
title="账单流水"
></uni-section>
<!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> --> <!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> -->
<view class="type_box"> <view class="type_box">
<view class="type"> <view class="type">
<view :class="current==0?'active':''" @click="changeBillType(0)">日账单</view> <view :class="current == 0 ? 'active' : ''" @click="changeBillType(0)"
<view :class="current==1?'active':''" @click="changeBillType(1)">月账单</view> >日账单</view
>
<view :class="current == 1 ? 'active' : ''" @click="changeBillType(1)"
>月账单</view
>
</view> </view>
</view> </view>
<!-- 日账单 --> <!-- 日账单 -->
@ -88,28 +118,39 @@
</view> </view>
<view class="t_item"> <view class="t_item">
<view class="t_title">金额归属</view> <view class="t_title">金额归属</view>
<view class="tips">{{$store.state.app.userInfo.nickname}}</view> <view class="tips">{{
$store.state.app.userInfo.nickname
}}</view>
</view> </view>
<view class="t_item"> <view class="t_item">
<view class="t_title">收益来源</view> <view class="t_title">收益来源</view>
<view class="tips"> <view class="tips">
<text v-if="item.change_type == 202" style="color: #46be61">{{
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text> item.type_desc
<text v-else-if="item.change_type==203" }}</text>
style="color: #ff7c32;">{{item.type_desc}}</text> <text
<text v-else="item.change_type==203">{{item.type_desc}}</text> v-else-if="item.change_type == 203"
style="color: #ff7c32"
>{{ item.type_desc }}</text
>
<text v-else="item.change_type == 203">{{
item.type_desc
}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="price"> <view class="price">
{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}} {{
current
? item.expenditure == 0
? "+" + item.income
: "-" + item.income
: item.change_amount_desc
}}
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="card" v-for="(item, index) in billList" :key="index"> <!-- <view class="card" v-for="(item, index) in billList" :key="index">
<view class="top"> <view class="top">
<view class="blue">账单详情</view> <view class="blue">账单详情</view>
@ -130,8 +171,12 @@
</view> </view>
--> -->
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :status="loadConfig.status"
:loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText"
:nomore-text="loadConfig.nomoreText"
/>
</view> </view>
<!-- 月账单 --> <!-- 月账单 -->
<view class="bill_list" v-show="current == 1"> <view class="bill_list" v-show="current == 1">
@ -146,8 +191,12 @@
<view class="num">{{ item.income }}</view> <view class="num">{{ item.income }}</view>
</view> </view>
<view class="right"> <view class="right">
<view>支出金额:{{item.expenditure>0?item.expenditure:'0.00'}}</view> <view
<view>入账金额:{{item.income>0?item.income:'0.00'}}</view> >支出金额:{{
item.expenditure > 0 ? item.expenditure : "0.00"
}}</view
>
<view>入账金额:{{ item.income > 0 ? item.income : "0.00" }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -300,11 +349,16 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: auto; width: auto;
width: auto;
line-height: 44px; line-height: 44px;
.name { .name {
margin-left: 20rpx; margin-left: 20rpx;
} }
.name {
margin-left: 20rpx;
}
} }
.left { .left {
@ -313,12 +367,11 @@
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #ffffff;
// .name {
.name { // margin: 0 17.5rpx;
margin: 0 17.5rpx; // }
}
image { image {
width: 40rpx; width: 40rpx;
@ -329,7 +382,7 @@
.right { .right {
font-size: 24.53rpx; font-size: 24.53rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
} }
} }
@ -355,11 +408,12 @@
.bubble { .bubble {
padding: 20rpx 28rpx 10rpx 28rpx; padding: 20rpx 28rpx 10rpx 28rpx;
background-image: url('../../static/img/contract/bubble.png'); background-image: url("../../static/img/contract/bubble.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.text {} .text {
}
} }
} }
@ -370,7 +424,7 @@
transform: translateX(-50%); transform: translateX(-50%);
width: 694rpx; width: 694rpx;
height: 140rpx; height: 140rpx;
background: #FFFFFF; background: #ffffff;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1); box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex; display: flex;
@ -387,7 +441,7 @@
.num { .num {
font-size: 39rpx; font-size: 39rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #f02828;
line-height: 39rpx; line-height: 39rpx;
} }
} }
@ -419,7 +473,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid #3274F9; border: 1px solid #3274f9;
&:nth-child(1) { &:nth-child(1) {
border-radius: 30rpx 0 0 30rpx; border-radius: 30rpx 0 0 30rpx;
@ -452,17 +506,17 @@
align-items: center; align-items: center;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #333333FF; color: #333333ff;
line-height: 39rpx; line-height: 39rpx;
.blue { .blue {
width: 137rpx; width: 137rpx;
height: 49rpx; height: 49rpx;
background: #3274F9; background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx; border-radius: 26rpx 26rpx 26rpx 26rpx;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
line-height: 39rpx; line-height: 39rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -488,7 +542,7 @@
.num { .num {
font-size: 39rpx; font-size: 39rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #f02828;
line-height: 39rpx; line-height: 39rpx;
} }
} }
@ -508,7 +562,7 @@
margin-bottom: 28rpx; margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
// height: 238rpx; // height: 238rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
padding: 28rpx; padding: 28rpx;
@ -522,12 +576,12 @@
&:before { &:before {
display: inline-block; display: inline-block;
content: '账单详情'; content: "账单详情";
width: 137rpx; width: 137rpx;
height: 49rpx; height: 49rpx;
line-height: 49rpx; line-height: 49rpx;
text-align: center; text-align: center;
background: #3274F9; background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx; border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff; color: #fff;
margin-right: 28rpx; margin-right: 28rpx;
@ -565,7 +619,7 @@
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #f02828;
} }
} }
} }
@ -581,7 +635,7 @@
width: 693.93rpx; width: 693.93rpx;
height: 84.21rpx; height: 84.21rpx;
background: $theme-oa-color; background: $theme-oa-color;
box-shadow: 0px 9px 26px 1px #E9EFF5; box-shadow: 0px 9px 26px 1px #e9eff5;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 50%; left: 50%;

View 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
View 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>

View File

@ -1,94 +1,47 @@
<template> <template>
<view> <view>
<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>
<view class="content"> <view class="content">
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
<view class="map"> <view class="map">
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline" <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"> :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 class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
</cover-image> </cover-image>
</map> </map>
<view class="map_address">
<view>
<text class="cir" style="background-color: #40BC5E;"></text> 起点:&nbsp;&nbsp;{{nowAddress}}
</view> </view>
<view class="map_address">
<view class="li">
<view>
<text class="cir" style="background-color: #40BC5E;"></text>
中转站:&nbsp;&nbsp;恐惧发现不舒服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> <view>
<text class="cir" style="background-color: #FF7C32;"></text> <text class="cir" style="background-color: #FF7C32;"></text>
终点:&nbsp;&nbsp;{{goodsDetil.logistics.shop_address}} &emsp;:&nbsp;&nbsp;恐惧发现不舒服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>
</view> </view>
<view class="order_info">
<view class="top">
<view>
订单号信息:
</view>
<view>订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}}</view>
<view>
商户名称:&nbsp;&nbsp; {{goodsDetil.logistics.shop_name}}
</view>
<view @click.stop="callFn(goodsDetil.logistics.shop_phone)">
联系电话:&nbsp;&nbsp; <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.shop_phone}}
</view>
<view>
店铺地址:&nbsp;&nbsp;{{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>用户名称:&nbsp;&nbsp;{{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
<view>
通知时间:&nbsp;&nbsp;{{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> </view>
<mybtn v-if="status==1" position="position" @click="getFn" text="抵达地点(中转站) 1/2"></mybtn>
<mybtn v-else position="position" text="抵达地点(终点) 2/2"></mybtn>
</view> </view>
@ -96,6 +49,7 @@
</template> </template>
<script> <script>
import mybtn from "@/components/mybtn/mybtn.vue"
import { import {
getDetil getDetil
} from "@/api/logistics.js" } from "@/api/logistics.js"
@ -103,9 +57,12 @@
takeGoods takeGoods
} from "@/api/logistics.js" } from "@/api/logistics.js"
export default { export default {
components: {
mybtn
},
data() { data() {
return { return {
is_captain: 0, status: 1,
mapClass: 'custom-map', mapClass: 'custom-map',
showLoading: true, showLoading: true,
showPop: false, showPop: false,
@ -116,8 +73,8 @@
// //
{ {
id: 1, id: 1,
latitude: undefined, latitude: 28.8733,
longitude: undefined, longitude: 105.445717,
iconPath: '../../static/img/logistics/SJ.png', // iconPath: '../../static/img/logistics/SJ.png', //
}, },
// //
@ -133,16 +90,6 @@
} }
}, },
methods: { methods: {
fuzzyName(name) {
let length = name.length;
let fuzzyChars = "*".repeat(length - 1);
return name[0] + fuzzyChars;
},
callFn(num) {
uni.makePhoneCall({
phoneNumber: num
});
},
// //
// //
locationFn() { locationFn() {
@ -153,9 +100,6 @@
geocode: true, geocode: true,
isHighAccuracy: true, isHighAccuracy: true,
success: function async (res) { 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].latitude = res.latitude
that.markers[1].longitude = res.longitude that.markers[1].longitude = res.longitude
that.getDriverLine() that.getDriverLine()
@ -221,12 +165,42 @@
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png' 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() { getDriverLine() {
const that = this; const that = this;
const key = "997c9a3d88154fa78f4d28bebc1dd84f"; const key = "997c9a3d88154fa78f4d28bebc1dd84f";
const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`; const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`; const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
uni.request({ uni.request({
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`, // 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.runningRoute = data.paths[0].steps[0].instruction;
} }
that.polyline = [{ that.polyline = [{
points: points, points: points,
color: "#0091ff", color: "#0091ff",
dottedLine: true, dottedLine: true,
width: 30, width: 30,
}, ]; }, ];
}, },
fail: function(res) { 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) { 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() this.locationFn()
// console.log()
setTimeout(() => { setTimeout(() => {
this.showLoading = false this.showLoading = true
}, 500) }, 1000)
})
}, },
onPullDownRefresh() {
// this.getOrderList();
// this.getIndexList()
uni.stopPullDownRefresh();
},
} }
</script> </script>
@ -316,13 +260,13 @@
.content { .content {
padding: 2vh 3vw; padding: 2vh 3vw;
background-color: #F6F7FC; background-color: #F5F5F5;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
} }
.map { .map {
height: 40vh; height: 60vh;
border-radius: 2vw; border-radius: 2vw;
overflow: hidden; overflow: hidden;
@ -332,10 +276,14 @@
background-color: white; background-color: white;
padding: 20rpx 10rpx; padding: 20rpx 10rpx;
.li {
margin: 20rpx 0;
}
.cir { .cir {
display: inline-block; display: inline-block;
width: 2vw; width: 2vw;
height: 4vw; height: 2vw;
border-radius: 2vw; border-radius: 2vw;
margin: 0 20rpx; margin: 0 20rpx;
} }
@ -350,55 +298,6 @@
z-index: 9999999; 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 { .btn {
position: fixed; position: fixed;