This commit is contained in:
weipengfei 2023-08-19 16:47:05 +08:00
commit c5cd4d79d2
11 changed files with 3540 additions and 2991 deletions

66
App.vue
View File

@ -1,10 +1,30 @@
<script> <script>
//#ifdef APP-PLUS //#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush"); const jpushModule = uni.requireNativePlugin("JG-JPush");
// #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)
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({
@ -27,34 +47,34 @@ export default {
// ida.push(result.messageID) // ida.push(result.messageID)
// }) // })
}, },
onShow: function () { onShow: function() {
console.log('App Show') console.log('App Show')
// //
const audioContext = uni.createInnerAudioContext() // const audioContext = uni.createInnerAudioContext()
// // //
audioContext.src = './static/mp3/order.mp3' // audioContext.src = './static/mp3/order.mp3'
// // //
//#ifdef APP-PLUS // //#ifdef APP-PLUS
jpushModule.addNotificationListener(res => { // jpushModule.addNotificationListener(res => {
console.log("监听成功") // console.log("")
audioContext.play() // audioContext.play()
}) // })
// #endif // // #endif
}, },
onHide: function () { onHide: function() {
console.log('App Hide') console.log('App Hide')
} }
} }
</script> </script>
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
@import "static/css/base.css"; @import "static/css/base.css";
@import "static/css/style.scss"; @import "static/css/style.scss";
view { view {
box-sizing: border-box; box-sizing: border-box;
} }
</style> </style>

View File

@ -1,7 +1,8 @@
<template> <template>
<view> <view>
<view class="item"> <view class="item">
<u-skeleton :loading="skeleton" :animate="true" title rows="1" rows-width="100%" rowsHeight="56"></u-skeleton> <u-skeleton :loading="skeleton" :animate="true" title rows="1" rows-width="100%"
rowsHeight="56"></u-skeleton>
<!-- <block v-if="!skeleton"> <!-- <block v-if="!skeleton">
<view class="title">公司基本信息</view> <view class="title">公司基本信息</view>
<view class="card"> <view class="card">
@ -29,6 +30,7 @@
--> -->
<view class="personnel_list" v-if="!skeleton"> <view class="personnel_list" v-if="!skeleton">
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<text style="font-size: 32rpx">公司基本信息</text> <text style="font-size: 32rpx">公司基本信息</text>
</view> </view>
@ -48,10 +50,14 @@
</view> </view>
<view class=""> <view class="">
<text>负责区域 :</text> <text>负责区域 :</text>
<text>{{c_address}}</text> <text> {{c_address}} </text>
</view> </view>
</view> </view>
</view> </view>
<view class="cards_head"> <view class="cards_head">
<text style="font-size: 32rpx">公司联系人</text> <text style="font-size: 32rpx">公司联系人</text>
</view> </view>
@ -74,7 +80,13 @@
<text> {{company.master_email}}</text> <text> {{company.master_email}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -296,24 +308,24 @@
</template> </template>
<script> <script>
import { import {
contractView contractView
} from "@/api/contract.js" } from "@/api/contract.js"
import { import {
companyView companyView
} from "@/api/company.js" } from "@/api/company.js"
import { import {
download_file download_file
} from "@/api/junziqian.js" } from "@/api/junziqian.js"
import { import {
Toast Toast
} from '@/libs/uniApi.js' } from '@/libs/uniApi.js'
import {commonBrigade} from "@/api/oaPbulic.js" import { commonBrigade } from "@/api/oaPbulic.js"
export default { export default {
name: "company", name: "company",
data() { data () {
return { return {
skeleton: true, skeleton: true,
company: { company: {
@ -332,11 +344,11 @@
} }
}, },
props: ['id', 'type'], props: ['id', 'type'],
mounted() { mounted () {
this.initContract(this.$props.id, this.$props.type || null); this.initContract(this.$props.id, this.$props.type || null);
}, },
computed: { computed: {
c_address() { c_address () {
let str = ''; let str = '';
if (this.company.company_type == 16) { if (this.company.company_type == 16) {
this.company?.province_name ? str += this.company?.province_name : null; this.company?.province_name ? str += this.company?.province_name : null;
@ -353,7 +365,7 @@
} }
}, },
methods: { methods: {
navTo(contract_no) { navTo (contract_no) {
download_file({ download_file({
applyNo: contract_no applyNo: contract_no
}).then(res => { }).then(res => {
@ -365,10 +377,10 @@
}) })
}) })
}, },
naviBack() { naviBack () {
uni.navigateBack() uni.navigateBack()
}, },
async initContract(id, type = "contract") { async initContract (id, type = "contract") {
let res; let res;
res = await commonBrigade(); res = await commonBrigade();
this.brigadeList = res.data; this.brigadeList = res.data;
@ -387,15 +399,15 @@
} }
} }
this.company = res.data.company; this.company = res.data.company;
if(this.company?.qualification?.other_qualifications&& typeof this.company.qualification.other_qualifications == 'string'){ if (this.company?.qualification?.other_qualifications && typeof this.company.qualification.other_qualifications == 'string') {
this.company.qualification.other_qualifications = JSON.parse(this.company.qualification.other_qualifications); this.company.qualification.other_qualifications = JSON.parse(this.company.qualification.other_qualifications);
} }
let arr = this.company.responsible_area.split(','); let arr = this.company.responsible_area.split(',');
let brigade = this.brigadeList.filter(item=>{ let brigade = this.brigadeList.filter(item => {
return arr.find(t=>t==item.id); return arr.find(t => t == item.id);
}); });
brigade.forEach((item)=>{ brigade.forEach((item) => {
this.brigade+=item.brigade_name??'' this.brigade += item.brigade_name ?? ''
}) })
uni.$emit('companyInfo', this.company); // uni.$emit('companyInfo', this.company); //
this.user = res.data.user; this.user = res.data.user;
@ -404,22 +416,22 @@
// console.log(res.data); // console.log(res.data);
}, },
// //
priview(url) { priview (url) {
uni.previewImage({ uni.previewImage({
urls: [url], urls: [url],
longPressActions: { longPressActions: {
itemList: ['保存图片'], itemList: ['保存图片'],
success: function(data) { success: function (data) {
if (data.tapIndex === 0) { if (data.tapIndex === 0) {
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: url, filePath: url,
success: function() { success: function () {
uni.showToast({ uni.showToast({
title: '保存成功', title: '保存成功',
icon: 'success' icon: 'success'
}) })
}, },
fail: function() { fail: function () {
uni.showToast({ uni.showToast({
title: '保存失败', title: '保存失败',
icon: 'none' icon: 'none'
@ -431,7 +443,7 @@
} }
}) })
}, },
copyPhone(str = "", type = "号码") { copyPhone (str = "", type = "号码") {
if (str) uni.setClipboardData({ if (str) uni.setClipboardData({
data: str + "", data: str + "",
success: (e) => { success: (e) => {
@ -443,11 +455,11 @@
}) })
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.personnel_list { .personnel_list {
padding: 28rpx 0; padding: 28rpx 0;
.cards { .cards {
@ -504,7 +516,6 @@
text:nth-child(2) { text:nth-child(2) {
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
} }
@ -530,7 +541,7 @@
.contract_img { .contract_img {
width: 102rpx; width: 102rpx;
height: 102rpx; height: 102rpx;
background: #F5F5F5; background: #f5f5f5;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx; margin-right: 21rpx;
} }
@ -542,7 +553,6 @@
.name { .name {
font-size: 32rpx; font-size: 32rpx;
;
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
line-height: 35rpx; line-height: 35rpx;
@ -576,17 +586,13 @@
height: 39rpx; height: 39rpx;
background-color: $theme-oa-color; background-color: $theme-oa-color;
opacity: 1; opacity: 1;
margin-right: 10rpx margin-right: 10rpx;
} }
} }
} }
}
.item {
}
.item {
padding-top: 0; padding-top: 0;
&:nth-child(1) { &:nth-child(1) {
@ -702,14 +708,8 @@
.contract { .contract {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.image_box { .image_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -794,9 +794,9 @@
} }
} }
} }
} }
.back_btn { .back_btn {
width: 694rpx; width: 694rpx;
height: 84rpx; height: 84rpx;
background: $theme-oa-color; background: $theme-oa-color;
@ -806,9 +806,9 @@
align-items: center; align-items: center;
color: #fff; color: #fff;
margin: 30rpx auto; margin: 30rpx auto;
} }
.stop_btn { .stop_btn {
width: 694rpx; width: 694rpx;
height: 84rpx; height: 84rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx; border-radius: 42rpx 42rpx 42rpx 42rpx;
@ -818,5 +818,5 @@
color: $theme-oa-color; color: $theme-oa-color;
background-color: transparent; background-color: transparent;
margin: 30rpx auto; margin: 30rpx auto;
} }
</style> </style>

View File

@ -15,7 +15,14 @@
<view class="f_nav"> <view class="f_nav">
<view class="title">账单流水</view> <view class="title">账单流水</view>
<view class="right"> <view class="right">
<!-- <u-tabs :list="[{
name: '日账单',
}, {
name: '月账单'
}]" @click="changeCurrent" lineColor='#0122C7' :scrollable="false" lineWidth='40' inactiveStyle='color:black'
activeStyle="color:#0122C7"></u-tabs> -->
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">今日账单</view> <view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">今日账单</view>
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">月账单</view>
<!-- <view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view> --> <!-- <view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view> -->
<view class="btn" @click="navTo('/subpkg/companyFinance/companyFinance')">更多</view> <view class="btn" @click="navTo('/subpkg/companyFinance/companyFinance')">更多</view>
</view> </view>
@ -40,33 +47,42 @@
<view class="tips"> <view class="tips">
<!-- {{current?item.remark:item.type_desc}} --> <!-- {{current?item.remark:item.type_desc}} -->
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text> <text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
<text v-else-if="item.change_type==203" style="color: #ff7c32;">{{item.type_desc}}</text> <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> <text v-else="item.change_type==203">{{item.type_desc}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view> <view class="price">
{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}
</view> </view>
</view> </view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> </view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { accountMonthList, accountDateList } from "@/api/company.js" import {
import { Toast } from "../../libs/uniApi"; accountMonthList,
accountDateList
} from "@/api/company.js"
import {
Toast
} from "../../libs/uniApi";
export default { export default {
name: "companyFinance", name: "companyFinance",
data() { data() {
return { return {
current: 0, current: 0,
list: [], list: [],
company:{ company: {
company_money: "0", company_money: "0",
deposit: "0" deposit: "0"
}, },
loadConfig:{ loadConfig: {
page: 1, page: 1,
limit: 15, limit: 15,
lastpage: '', lastpage: '',
@ -78,30 +94,30 @@
}; };
}, },
mounted() { mounted() {
uni.$on('companyInfo', (e)=>{ uni.$on('companyInfo', (e) => {
this.company = e; this.company = e;
console.log(this.company); console.log(this.company);
this.initLoad(); this.initLoad();
}) })
}, },
methods:{ methods: {
navTo(url) { navTo(url) {
url ? url ?
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
}) : Toast('暂未开放') }) : Toast('暂未开放')
}, },
initLoad(){ initLoad() {
this.loadConfig.page = 1; this.loadConfig.page = 1;
this.loadConfig.status = "loadmore"; this.loadConfig.status = "loadmore";
this.list = []; this.list = [];
this.initList(); this.initList();
}, },
async initList(){ async initList() {
if(this.loadConfig.status=="nomore")return; if (this.loadConfig.status == "nomore") return;
this.loadConfig.status="loading"; this.loadConfig.status = "loading";
let res; let res;
if(this.current==0) res = await accountDateList({ if (this.current == 0) res = await accountDateList({
page: this.loadConfig.page, page: this.loadConfig.page,
limit: this.loadConfig.limit, limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id company_id: this.$store.state.app.userInfo.company_id
@ -111,19 +127,19 @@
limit: this.loadConfig.limit, limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id company_id: this.$store.state.app.userInfo.company_id
}) })
this.loadConfig.status="loadmore" this.loadConfig.status = "loadmore"
if(res.data.length<this.loadConfig.limit){ if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status="nomore" this.loadConfig.status = "nomore"
}else { } else {
this.loadConfig.page++; this.loadConfig.page++;
} }
this.list = [...this.list, ...res.data] this.list = [...this.list, ...res.data]
}, },
// //
cCount(value=0){ cCount(value = 0) {
try{ try {
return value.toFixed(2); return value.toFixed(2);
}catch(e){ } catch (e) {
return "0.00"; return "0.00";
} }
} }
@ -139,7 +155,7 @@
margin: 0 auto; margin: 0 auto;
width: 694rpx; width: 694rpx;
height: 158rpx; height: 158rpx;
background: #3175F9; background: $theme-oa-color;
border-radius: 18rpx 18rpx 18rpx 18rpx; border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1; opacity: 1;
padding: 28rpx; padding: 28rpx;
@ -244,20 +260,24 @@
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 39rpx; line-height: 39rpx;
.t_item{
.t_item {
display: flex; display: flex;
.t_title{
.t_title {
margin-bottom: 16rpx; margin-bottom: 16rpx;
flex-shrink: 0 !important; flex-shrink: 0 !important;
} }
.tips{
.tips {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
} }
} }
.price{
.price {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;

View File

@ -238,7 +238,7 @@
"style": { "style": {
"navigationBarTitleText": "合同管理", "navigationBarTitleText": "合同管理",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7", "navigationBarBackgroundColor": "#0022C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }

View File

@ -2,10 +2,7 @@
<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 <view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
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: 100rpx"></view> <view style="height: 100rpx"></view>
@ -13,13 +10,8 @@
<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 <u--image :showLoading="true" width="131.43rpx" height="131.43rpx"
:showLoading="true" :src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image>
width="131.43rpx"
height="131.43rpx"
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
shape="circle"
></u--image>
</view> </view>
<text class="nickname">工作证: {{ myOaInfo.nickname }}</text> <text class="nickname">工作证: {{ myOaInfo.nickname }}</text>
@ -61,26 +53,18 @@
</block> </block>
</view> --> </view> -->
<view <view class="backlog" :class="!ApproveList.length > 0 ? 'backlog_no_data' : ''">
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 <view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
class="backlog_item flex_a_c_j_sb" :key="index" @click="clickNotice(item.id)">
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) item.create_time.substring(0, 10)
@ -88,24 +72,19 @@
{{ item.title }} {{ item.title }}
</view> </view>
<i class="iconfont icon-you" <i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
><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" <i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
><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>
@ -116,12 +95,7 @@
<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 <u--image :showLoading="true" :src="item.icon" width="77.19rpx" height="77.19rpx"></u--image>
:showLoading="true"
:src="item.icon"
width="77.19rpx"
height="77.19rpx"
></u--image>
<view class="title">{{ item.text }}</view> <view class="title">{{ item.text }}</view>
</view> </view>
</block> </block>
@ -130,8 +104,7 @@
<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>
@ -143,19 +116,13 @@
</block> --> </block> -->
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<globalPopup ref="globalPopup"></globalPopup> <globalPopup ref="globalPopup"></globalPopup>
<logistiBriefCard <logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
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 class="tips" v-if="!$store.state.app.token">登录后查看配送信息详情</view>
>登录后查看配送信息详情</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>
@ -194,24 +161,32 @@
</template> </template>
<script> <script>
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"; import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue";
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"; import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue";
import { getList } from "@/api/logistics.js"; import {
import { Toast } from "@/libs/uniApi.js"; getList
import { oaHomeData } from "@/static/server/server.js"; } from "@/api/logistics.js";
import { noticeList } from "@/api/notice.js"; import {
// import tabbar from '../components/tabbar' Toast
import { } from "@/libs/uniApi.js";
import {
oaHomeData
} from "@/static/server/server.js";
import {
noticeList
} from "@/api/notice.js";
// import tabbar from '../components/tabbar'
import {
getIndexListAPI, getIndexListAPI,
getTaskListAPI, getTaskListAPI,
getMyTaskListAPI, getMyTaskListAPI,
getApproveListAPI, getApproveListAPI,
getUserIndexAPI, getUserIndexAPI,
} from "@/api/oaApi.js"; } from "@/api/oaApi.js";
//#ifdef APP-PLUS //#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif // #endif
export default { export default {
components: { components: {
// tabbar // tabbar
logistiBriefCard, logistiBriefCard,
@ -223,8 +198,7 @@ export default {
orderList: [], orderList: [],
oaHomeData: [], oaHomeData: [],
src: "https://cdn.uviewui.com/uview/album/1.jpg", src: "https://cdn.uviewui.com/uview/album/1.jpg",
assessData: [ assessData: [{
{
num: "0", num: "0",
name: "任务", name: "任务",
}, },
@ -264,21 +238,21 @@ export default {
}); });
}, },
onLoad() { onLoad() {
//#ifdef APP-PLUS // //#ifdef APP-PLUS
const audioContext = uni.createInnerAudioContext(); // const audioContext = uni.createInnerAudioContext();
audioContext.volume = 1; // audioContext.volume = 1;
audioContext.src = "../../static/mp3/order.mp3"; // audioContext.src = "../../static/mp3/order.mp3";
let that = this; // let that = this;
jpushModule.addNotificationListener(function (result) { // jpushModule.addNotificationListener(function (result) {
if (!that.notArr.includes(result.messageID)) { // if (!that.notArr.includes(result.messageID)) {
that.$refs.globalPopup.showPopu(); // that.$refs.globalPopup.showPopu();
that.getOrderList(); // that.getOrderList();
console.log("idnex的"); // console.log("idnex");
audioContext.play(); // audioContext.play();
} // }
that.notArr.push(result.messageID); // that.notArr.push(result.messageID);
}); // });
// #endif // // #endif
}, },
onShow() { onShow() {
// this.getUserIndex() // this.getUserIndex()
@ -320,9 +294,9 @@ export default {
}); });
}, },
initUserInfo() { initUserInfo() {
this.$store.state.app.userInfo this.$store.state.app.userInfo ?
? (this.myOaInfo = this.$store.state.app.userInfo) (this.myOaInfo = this.$store.state.app.userInfo) :
: (this.myOaInfo.avatar = ""); (this.myOaInfo.avatar = "");
}, },
initOaHomeDada() { initOaHomeDada() {
if (this.$store.state.app.userInfo.admin_id == 0) { if (this.$store.state.app.userInfo.admin_id == 0) {
@ -357,7 +331,10 @@ export default {
this.ApproveList = res.data.lists; this.ApproveList = res.data.lists;
}, },
async getIndexList() { async getIndexList() {
const { project, task } = await getIndexListAPI(); const {
project,
task
} = await getIndexListAPI();
console.log(task, "222"); console.log(task, "222");
this.assessData[0].num = project.count; this.assessData[0].num = project.count;
this.assessData[1].num = project.count_ok; this.assessData[1].num = project.count_ok;
@ -383,15 +360,16 @@ export default {
}, },
navTo(url) { navTo(url) {
url url
? uni.navigateTo({ ?
uni.navigateTo({
url: url, url: url,
fail() { fail() {
uni.switchTab({ uni.switchTab({
url: url, url: url,
}); });
}, },
}) }) :
: Toast("暂未开放"); Toast("暂未开放");
}, },
navTwo(url, key) { navTwo(url, key) {
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null; let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
@ -440,21 +418,21 @@ export default {
// this.getIndexList() // this.getIndexList()
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.oa_home { .oa_home {
padding-bottom: 120rpx; padding-bottom: 120rpx;
} }
.header_bg { .header_bg {
position: absolute; position: absolute;
width: 100%; width: 100%;
// z-index: -1; // z-index: -1;
} }
.home_header { .home_header {
position: relative; position: relative;
padding: 28rpx; padding: 28rpx;
// height: 607.02rpx; // height: 607.02rpx;
@ -475,15 +453,18 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-right: 50rpx; padding-right: 50rpx;
color: white; color: white;
font-size: 34rpx; font-size: 34rpx;
padding-left: 150rpx;
box-sizing: border-box;
.img_box { .img_box {
width: 131.43rpx; width: 131.43rpx;
height: 131.43rpx; height: 131.43rpx;
position: absolute; position: absolute;
border: 1px dashed #707070;
left: -10rpx;
top: -15rpx;
} }
// font-we // font-we
@ -607,13 +588,13 @@ export default {
.backlog_no_data { .backlog_no_data {
bottom: -70rpx; bottom: -70rpx;
} }
} }
.home_header_no_data { .home_header_no_data {
margin-bottom: 93.33rpx; margin-bottom: 93.33rpx;
} }
.fast_track { .fast_track {
width: 694rpx; width: 694rpx;
// height: 331rpx; // height: 331rpx;
display: flex; display: flex;
@ -637,9 +618,9 @@ export default {
margin-top: 14.04rpx; margin-top: 14.04rpx;
} }
} }
} }
.my_task { .my_task {
width: 694.74rpx; width: 694.74rpx;
margin: 0 auto; margin: 0 auto;
// margin-top: 31.58rpx; // margin-top: 31.58rpx;
@ -752,9 +733,9 @@ export default {
font-size: 24.56rpx; font-size: 24.56rpx;
} }
} }
} }
.no_login { .no_login {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -792,5 +773,5 @@ export default {
align-items: center; align-items: center;
} }
} }
} }
</style> </style>

View File

@ -28,8 +28,9 @@
</view> </view>
<view class="work"> <view class="work">
电话:{{oaUserInfo.account}}<br /> 电话:{{oaUserInfo.account}}<br />
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br/> 公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br />
公司类型:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br/> 公司类型:<text
v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br />
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) --> <!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
</view> </view>
</view> </view>
@ -39,32 +40,12 @@
<view class="">编辑</view> <view class="">编辑</view>
</view> --> </view> -->
</view> </view>
<view class="assess">
<view class="ass_cent flex_a_c_j_sb">
<view class="cent_item" @click="navTo('/subpkg/finance/finance')">
<!-- <view class="num">{{ oaUserInfo.achievements_money }}</view> -->
<view class="num" v-if="!$store.state.app.token">*</view>
<view class="num" v-else-if="eyeType">{{oaUserInfo.user_money||'0.00'}}</view>
<view class="num" v-if="!eyeType">****</view>
<view class="name">账户余额()</view>
</view>
<!-- <view class="cent_item" @click="navTo('/subpkg/finance/finance')">
<view class="num">0.00</view>
<view class="name">冻结金额</view>
</view> -->
<view class="cent_item" @click="navTo('/subpkg/finance/finance')">
<!-- <view class="num">{{ oaUserInfo.company_money }}</view> -->
<view class="num" v-if="!$store.state.app.token">*</view>
<view class="num" v-else-if="eyeType">{{oaUserInfo.income||'0.00'}}</view>
<view class="num" v-if="!eyeType">****</view>
<view class="name">收益金额()</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
<view class="other_guide"> <view class="other_guide">
<block v-for="(item,i) in myOaData" :key="i"> <block v-for="(item,i) in myOaData" :key="i">
<view class="other_item flex_a_c_j_sb" @click="navTo(item.url)"> <view class="other_item flex_a_c_j_sb" @click="navTo(item.url)">
<view class="flex_a_c left"> <view class="flex_a_c left">
<!-- <view class="iconfont2" :class="item.icon"></view> --> <!-- <view class="iconfont2" :class="item.icon"></view> -->
@ -78,17 +59,28 @@
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view> <view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view>
<view class="log_out" v-else @click="login">登录账号</view> <view class="log_out" v-else @click="login">登录账号</view>
<u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton @close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal> <u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal>
<!-- <tabbar></tabbar> --> <!-- <tabbar></tabbar> -->
</view> </view>
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import {
import { getUserIndexAPI } from '@/api/oaApi.js' mapActions
import { userInfo } from '@/api/oaUser.js' } from 'vuex'
import { Toast } from '@/libs/uniApi.js' import {
import { myOaData } from '@/static/server/server.js' getUserIndexAPI
} from '@/api/oaApi.js'
import {
userInfo
} from '@/api/oaUser.js'
import {
Toast
} from '@/libs/uniApi.js'
import {
myOaData
} from '@/static/server/server.js'
// import tabbar from '../components/tabbar' // import tabbar from '../components/tabbar'
export default { export default {
components: { components: {
@ -118,7 +110,14 @@
return this.$store.state.config.eyeType; return this.$store.state.config.eyeType;
}, },
oaUserInfo() { oaUserInfo() {
return this.$store.state.app.userInfo || { avatar: '', admin: { company: { company_name: '' } } }; return this.$store.state.app.userInfo || {
avatar: '',
admin: {
company: {
company_name: ''
}
}
};
} }
}, },
methods: { methods: {
@ -135,7 +134,7 @@
// success: (e) => { // success: (e) => {
// if (e.confirm) { // if (e.confirm) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/oaLogin/oaLogin?clear='+true, url: '/pages/oaLogin/oaLogin?clear=' + true,
success() { success() {
that.$store.commit('CLEAR'); that.$store.commit('CLEAR');
} }

View File

@ -41,8 +41,8 @@
</view> </view>
<view style="margin-top: 40rpx;"> <view style="margin-top: 40rpx;">
<u-icon style="display: inline-block;margin-left: 10rpx;" color="white" <u-icon style="display: inline-block;" color="white" name="edit-pen-fill"></u-icon>
name="edit-pen-fill"></u-icon> {{item.is_contract?"已签约":"未签约"}} {{item.is_contract?"已签约":"未签约"}}
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -216,9 +216,8 @@
.left { .left {
text-align: center; text-align: center;
// padding: 15rpx 25rpx; padding: 15rpx 25rpx;
padding-top: 20rpx; padding-top: 20rpx;
margin-right: 50rpx; margin-right: 50rpx;
width: 160rpx; width: 160rpx;
background-color: $theme-oa-color; background-color: $theme-oa-color;
@ -229,7 +228,8 @@
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
margin-left: 25rpx; // margin-left: 25rpx;
padding: 0 25rpx;
border-radius: 120rpx; border-radius: 120rpx;
position: relative; position: relative;

View File

@ -11,6 +11,69 @@
</view> --> </view> -->
<view class="contract_list"> <view class="contract_list">
<view class="item" v-for="(item,index) in list" :key="item.id"> <view class="item" v-for="(item,index) in list" :key="item.id">
<view class="personnel_list">
<view class="cards">
<view class="cards_head">
<text style="font-size: 32rpx">电子合同</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> {{item.company.contract_type_name}} </text>
</view>
<view class="">
<text>合同编号 :</text>
<text> {{item.contract_no}} </text>
</view>
</view>
</view>
<view class="hr">
</view>
<view class="contract_box">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">{{item.company.contract_type_name}}</view>
<view>
<text>{{item.update_time}}</text>
</view>
</view>
</view>
<view class="right" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">
<uni-icons type="paperclip" color="#0022C7"></uni-icons>
<view>查看</view>
</view>
</view>
</view>
</view>
<!--
<view class="top"> <view class="top">
<image src="../../static/img/contract/pdf.png" style="height: 140rpx; width: 140rpx;"></image> <image src="../../static/img/contract/pdf.png" style="height: 140rpx; width: 140rpx;"></image>
<view class="text"> <view class="text">
@ -20,7 +83,7 @@
</view> </view>
</view> </view>
<view class="date"> <view class="date">
<!-- <text class="time">2023-04-27 2024-04-28 </text> -->
<view class="number"> <view class="number">
<view class="num_left">合同编号:</view> <view class="num_left">合同编号:</view>
<text>{{item.contract_no}}</text> <text>{{item.contract_no}}</text>
@ -41,8 +104,14 @@
<view class="left" v-if="item.status">已签订</view> <view class="left" v-if="item.status">已签订</view>
<view class="left yellow" v-else-if="item.check_status>=2">签订中</view> <view class="left yellow" v-else-if="item.check_status>=2">签订中</view>
<view class="left red" v-else>未签订</view> <view class="left red" v-else>未签订</view>
<button class="right" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button> <button class="right"
@click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
</view> </view>
-->
</view> </view>
</view> </view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同" <u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同"
@ -53,7 +122,9 @@
</template> </template>
<script> <script>
import { contractList } from "@/api/contract.js" import {
contractList
} from "@/api/contract.js"
export default { export default {
data() { data() {
return { return {
@ -159,33 +230,88 @@
} }
} }
.contract_list { .personnel_list {
display: flex; padding: 28rpx 0;
flex-direction: column; margin-bottom: 130rpx;
justify-content: space-between;
align-items: center;
padding: 28rpx;
.item { .cards {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
min-height: 263rpx; background: #ffffff;
border-radius: 30rpx;
opacity: 1;
overflow: hidden;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.cards_head {
padding: 28rpx; padding: 28rpx;
margin-bottom: 28rpx; background-color: $theme-oa-color;
background: #FFFFFF; color: white;
border-radius: 14rpx 14rpx 14rpx 14rpx; 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; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.top { view {
display: flex; margin-bottom: 10rpx;
margin-bottom: 28rpx;
image { text:nth-child(2) {
width: 87.6rpx; margin-left: 20rpx;
height: 87.6rpx; }
margin-right: 28rpx; }
flex-shrink: 0; }
}
.hr {
border-top: 1px dashed #0022C7;
margin-bottom: 30rpx;
}
.contract_box {
padding: 0 28rpx 20rpx;
display: flex;
justify-content: space-between;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #F5F5F5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
} }
.text { .text {
@ -194,74 +320,156 @@
justify-content: space-between; justify-content: space-between;
.name { .name {
.title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; ;
color: #333333; font-weight: 500;
margin-right: 17.5rpx; color: rgba(0, 0, 0, 0.8);
} line-height: 35rpx;
} }
.date { .nickname {
font-size: 25rpx; margin-right: 35rpx;
font-weight: 400;
color: #F9AA32;
line-height: 36rpx;
.number, .time{
display: flex;
justify-content: left;
flex-wrap: wrap;
.num_left{
margin-right: 18rpx;
}
} }
.time { text {
color: #CCCCCCFF; height: 39rpx;
margin-right: 10rpx;
}
}
}
}
.bottom {
display: flex;
justify-content: space-between;
margin-top: 28rpx;
.left {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #34A853; color: #666666;
line-height: 35rpx;
} }
.yellow {
color: #F9AA32;
} }
.red {
color: #F02828FF;
} }
.right { .right {
width: 158rpx;
// height: 53rpx;
// border-radius: 26rpx 26rpx 26rpx 26rpx;
// border: 2rpx solid #3274F9;
// display: flex;
// justify-content: center;
// align-items: center;
text-align: right;
background: #FFFFFF;
opacity: 1;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 500;
color: #3274F9; color: #3274F9;
} line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: #3274F9;
opacity: 1;
margin-right: 10rpx
} }
} }
} }
}
}
// .contract_list {
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// align-items: center;
// padding: 28rpx;
// .item {
// width: 694rpx;
// min-height: 263rpx;
// padding: 28rpx;
// margin-bottom: 28rpx;
// background: #FFFFFF;
// border-radius: 14rpx 14rpx 14rpx 14rpx;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// .top {
// display: flex;
// margin-bottom: 28rpx;
// image {
// width: 87.6rpx;
// height: 87.6rpx;
// margin-right: 28rpx;
// flex-shrink: 0;
// }
// .text {
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// .name {
// .title {
// font-size: 32rpx;
// font-weight: 400;
// color: #333333;
// margin-right: 17.5rpx;
// }
// }
// .date {
// font-size: 25rpx;
// font-weight: 400;
// color: #F9AA32;
// line-height: 36rpx;
// .number,
// .time {
// display: flex;
// justify-content: left;
// flex-wrap: wrap;
// .num_left {
// margin-right: 18rpx;
// }
// }
// .time {
// color: #CCCCCCFF;
// margin-right: 10rpx;
// }
// }
// }
// }
// .bottom {
// display: flex;
// justify-content: space-between;
// margin-top: 28rpx;
// .left {
// font-size: 28rpx;
// font-weight: 400;
// color: #34A853;
// }
// .yellow {
// color: #F9AA32;
// }
// .red {
// color: #F02828FF;
// }
// .right {
// width: 158rpx;
// // height: 53rpx;
// // border-radius: 26rpx 26rpx 26rpx 26rpx;
// // border: 2rpx solid #3274F9;
// // display: flex;
// // justify-content: center;
// // align-items: center;
// text-align: right;
// background: #FFFFFF;
// opacity: 1;
// font-size: 28rpx;
// font-weight: 400;
// color: #3274F9;
// }
// }
// }
// }
</style> </style>

View File

@ -2,14 +2,19 @@
<view class=""> <view class="">
<view class="finance_head"> <view class="finance_head">
<view class="top"> <view class="top">
<view class="left" @click="navTo()"> <view @click="navTo()">
<view v-if="user_id==0"> <view v-if="user_id==0" class="accont">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image> <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>
</view> </view>
<view v-else> <view v-else class="accont">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image> <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>
</view> </view>
</view> </view>
<!-- <view class="right" @click="navTo('/subpkg/topUp/topUp')"> <!-- <view class="right" @click="navTo('/subpkg/topUp/topUp')">
@ -18,7 +23,8 @@
</view> </view>
<view class="center"> <view class="center">
<view class="title"> <view class="title">
<text style="margin-right: 20rpx;">账户总金额()</text><uni-icons @click="updateEye()" :type="eyeType?'eye-filled':'eye-slash-filled'" color="#fff"></uni-icons> <text style="margin-right: 20rpx;">账户总金额()</text><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||0.00}}</view> <view class="price" v-show="eyeType">{{userInfo.user_money||0.00}}</view>
<view class="price" v-show="!eyeType">****</view> <view class="price" v-show="!eyeType">****</view>
@ -70,7 +76,7 @@
</view> </view>
</view> </view>
</view> --> </view> -->
<view class="item" v-for="(item, index) in billList" :key="item.id"> <!-- <view class="item" v-for="(item, index) in billList" :key="item.id">
<view class="top"> <view class="top">
账单日期: {{current?item.month:item.create_time}} 账单日期: {{current?item.month:item.create_time}}
</view> </view>
@ -87,18 +93,44 @@
<view class="t_item"> <view class="t_item">
<view class="t_title">收益来源</view> <view class="t_title">收益来源</view>
<view class="tips"> <view class="tips">
<!-- {{current?item.remark:item.type_desc}} -->
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text> <text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
<text v-else-if="item.change_type==203" style="color: #ff7c32;">{{item.type_desc}}</text> <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> <text v-else="item.change_type==203">{{item.type_desc}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view> <view class="price">
{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}
</view> </view>
</view> </view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
-->
<view class="card" v-for="(item, index) in billList" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{current?item.month:item.create_time}}</view>
</view>
<view class="bottom">
<view class="left">
<view>收益金额()</view>
<view class="num">
{{current?(item.expenditure==0?item.income:'-'+item.income):item.change_amount_desc}}
</view>
</view>
<view class="right">
<view>支出金额:{{item.expenditure>0?item.expenditure:'0.00'}}</view>
<view>入账金额:{{item.income>0?item.income:'0.00'}}</view>
</view>
</view>
</view>
<u-loadmore :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">
@ -127,21 +159,28 @@
</template> </template>
<script> <script>
import { accountLogLists, accountLogListsMonth } from "@/api/pay.js" import {
import { userInfo } from "@/api/oaUser.js" accountLogLists,
accountLogListsMonth
} from "@/api/pay.js"
import {
userInfo
} from "@/api/oaUser.js"
import { Toast } from '@/libs/uniApi.js' import {
export default { Toast
} from '@/libs/uniApi.js'
export default {
data() { data() {
return { return {
user_id:0, user_id: 0,
userInfo:{}, userInfo: {},
otherUserInfo:{}, otherUserInfo: {},
billTypeList:['日账单','月账单'], billTypeList: ['日账单', '月账单'],
current: 0, current: 0,
billList: [], billList: [],
billListMonth: [], billListMonth: [],
loadConfig:{ loadConfig: {
page: 1, page: 1,
limit: 25, limit: 25,
loadingText: '努力加载中', loadingText: '努力加载中',
@ -152,23 +191,23 @@ export default {
} }
}, },
onLoad(e) { onLoad(e) {
if(e.id>0){ if (e.id > 0) {
this.user_id=e.id this.user_id = e.id
} }
this.loadBill() this.loadBill()
}, },
onShow() { onShow() {
// console.log(this.userInfo); // console.log(this.userInfo);
if(this.user_id==0){ if (this.user_id == 0) {
this.userInfo = this.$store.state.app.userInfo; this.userInfo = this.$store.state.app.userInfo;
}else{ } else {
this.OtherUserInfo() this.OtherUserInfo()
} }
}, },
computed:{ computed: {
eyeType(){ eyeType() {
return this.$store.state.config.eyeType; return this.$store.state.config.eyeType;
} }
}, },
@ -183,41 +222,41 @@ export default {
url: url url: url
}) : Toast('暂未开放') }) : Toast('暂未开放')
}, },
async OtherUserInfo(){ async OtherUserInfo() {
let res = await userInfo({ let res = await userInfo({
id:this.user_id id: this.user_id
}); });
this.userInfo=res.data this.userInfo = res.data
}, },
updateEye(){ updateEye() {
this.$store.commit('SET_EYE_TYPE') this.$store.commit('SET_EYE_TYPE')
}, },
// //
changeBillType(type){ changeBillType(type) {
this.current = type; this.current = type;
if(type==1)this.loadBillMonth(); if (type == 1) this.loadBillMonth();
}, },
async loadBill(){ async loadBill() {
if(this.loadConfig.status=="nomore")return; if (this.loadConfig.status == "nomore") return;
this.loadConfig.status="loading" this.loadConfig.status = "loading"
let res = await accountLogLists({ let res = await accountLogLists({
type: 'um', // type: 'um', //
page_no: this.loadConfig.page, page_no: this.loadConfig.page,
page_size: this.loadConfig.limit, page_size: this.loadConfig.limit,
user_id:this.user_id user_id: this.user_id
}); });
this.loadConfig.status="loadmore" this.loadConfig.status = "loadmore"
if(res.data.lists.length<this.loadConfig.limit){ if (res.data.lists.length < this.loadConfig.limit) {
this.loadConfig.status="nomore" this.loadConfig.status = "nomore"
}else { } else {
this.loadConfig.page++; this.loadConfig.page++;
} }
this.billList = [...this.billList, ...res.data.lists]; this.billList = [...this.billList, ...res.data.lists];
}, },
async loadBillMonth(){ async loadBillMonth() {
let res = await accountLogListsMonth(); let res = await accountLogListsMonth();
let list = []; let list = [];
for(let key in res.data){ for (let key in res.data) {
list.push(res.data[key]) list.push(res.data[key])
} }
this.billListMonth = list; this.billListMonth = list;
@ -230,10 +269,11 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
// background-color: #fff; // background-color: #fff;
} }
.finance_head{
.finance_head {
background-color: $theme-oa-color; background-color: $theme-oa-color;
height: 400rpx; height: 400rpx;
position: relative; position: relative;
@ -243,60 +283,80 @@ page{
background-size: 100% 35%; background-size: 100% 35%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center bottom; background-position: center bottom;
.top{
.top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
color: #fff; color: #fff;
padding: 10rpx 28rpx; padding: 10rpx 28rpx;
.left{
.accont {
// background-color: red;
display: flex;
width: 32vw;
justify-content: space-between;
vertical-align: bottom;
line-height: 44px;
}
.left {
display: flex; display: flex;
align-items: center; align-items: center;
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;
height: 40rpx; height: 40rpx;
} }
} }
.right{
.right {
font-size: 24.53rpx; font-size: 24.53rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
} }
.center{
.center {
color: #fff; color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.title{
.title {
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
line-height: 39rpx; line-height: 39rpx;
} }
.price{
.price {
font-size: 60rpx; font-size: 60rpx;
font-weight: bold; font-weight: bold;
line-height: 39rpx; line-height: 39rpx;
margin-top: 28rpx; margin-top: 28rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
} }
.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 {}
} }
} }
}
.bottom{ .bottom {
position: absolute; position: absolute;
bottom: -78rpx; bottom: -78rpx;
left: 50%; left: 50%;
@ -304,18 +364,20 @@ page{
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;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
.item{
.item {
text-align: center; text-align: center;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 39rpx; line-height: 39rpx;
.num{
.num {
font-size: 39rpx; font-size: 39rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #F02828;
@ -323,62 +385,73 @@ page{
} }
} }
} }
} }
.bill{
.bill {
// padding: 28rpx; // padding: 28rpx;
// padding-top: 90rpx; // padding-top: 90rpx;
padding-bottom: 32rpx; padding-bottom: 32rpx;
background-color: #f5f5f5; background-color: #f5f5f5;
.type_box{
.type_box {
background-color: #fff; background-color: #fff;
padding: 32rpx 0; padding: 32rpx 0;
.type{
.type {
height: 53rpx; height: 53rpx;
width: 333rpx; width: 333rpx;
display: flex; display: flex;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
margin: 0 auto; margin: 0 auto;
view{
view {
flex: 1; flex: 1;
color: $theme-oa-color; color: $theme-oa-color;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid $theme-oa-color; border: 1px solid #3274F9;
&:nth-child(1){
&:nth-child(1) {
border-radius: 30rpx 0 0 30rpx; border-radius: 30rpx 0 0 30rpx;
} }
&:nth-child(2){
&:nth-child(2) {
border-radius: 0 30rpx 30rpx 0; border-radius: 0 30rpx 30rpx 0;
} }
} }
.active{
background-color: $theme-oa-color; .active {
background-color: #3274F9;
color: #fff; color: #fff;
} }
} }
} }
.bill_list{
.bill_list {
// background-color: #f5f5f5; // background-color: #f5f5f5;
padding-bottom: 100rpx; padding-bottom: 100rpx;
padding-top: 28rpx; padding-top: 28rpx;
.card{
.card {
padding: 28rpx; padding: 28rpx;
background-color: #fff; background-color: #fff;
margin-bottom: 21rpx; margin-bottom: 21rpx;
.top{
.top {
display: flex; display: flex;
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: $theme-oa-color; 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;
@ -390,26 +463,30 @@ page{
margin-right: 28rpx; margin-right: 28rpx;
} }
} }
.bottom{
.bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 160rpx; height: 160rpx;
.left{
.left {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 39rpx; line-height: 39rpx;
.num{
.num {
font-size: 39rpx; font-size: 39rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #F02828;
line-height: 39rpx; line-height: 39rpx;
} }
} }
.right{
.right {
flex: 1; flex: 1;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
@ -418,6 +495,7 @@ page{
} }
} }
} }
.item { .item {
margin: 0 auto; margin: 0 auto;
margin-bottom: 28rpx; margin-bottom: 28rpx;
@ -458,20 +536,24 @@ page{
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 39rpx; line-height: 39rpx;
.t_item{
.t_item {
display: flex; display: flex;
.t_title{
.t_title {
margin-bottom: 16rpx; margin-bottom: 16rpx;
flex-shrink: 0 !important; flex-shrink: 0 !important;
} }
.tips{
.tips {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
} }
} }
.price{
.price {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
@ -482,7 +564,7 @@ page{
} }
} }
.btn{ .btn {
color: #fff; color: #fff;
border-radius: 100px; border-radius: 100px;
text-align: center; text-align: center;
@ -498,5 +580,5 @@ page{
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
</style> </style>

View File

@ -58,7 +58,7 @@
<view class="personnel_list"> <view class="personnel_list">
<view class="card" v-for="(item, index) in userList" :key="item.id"> <view class="card" v-for="(item, index) in userList" :key="item.id">
<view class="card_head"> <view class="card_head">
<text style="font-size: 32rpx">创建时间: 2020-25-2</text> <text style="font-size: 32rpx">创建时间: {{item.create_time||"2020-10-10"}}</text>
<text @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</text> <text @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</text>
<text @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</text> <text @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</text>
</view> </view>
@ -71,8 +71,8 @@
</view> </view>
<view style="margin-top: 40rpx;" @click="changeSign(item)"> <view style="margin-top: 40rpx;" @click="changeSign(item)">
<u-icon style="display: inline-block;margin-left: 10rpx;" color="white" <u-icon style="display: inline-block;" color="white" name="edit-pen-fill"></u-icon>
name="edit-pen-fill"></u-icon> {{item.is_contract?'已签约':'未签约'}} {{item.is_contract?'已签约':'未签约'}}
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -234,7 +234,7 @@
.left { .left {
text-align: center; text-align: center;
// padding: 15rpx 25rpx; padding: 15rpx 25rpx;
padding-top: 20rpx; padding-top: 20rpx;
margin-right: 50rpx; margin-right: 50rpx;
@ -247,7 +247,8 @@
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
margin-left: 25rpx; // margin-left: 25rpx;
padding: 0 25rpx;
border-radius: 120rpx; border-radius: 120rpx;
position: relative; position: relative;

View File

@ -1,7 +1,14 @@
<template> <template>
<view class="page"> <view class="page">
<view class="basic"> <view class="basic">
<u-skeleton :loading="skeleton" :animate="true" title rows="1" rows-width="100%" rowsHeight="56"> <u-skeleton
:loading="skeleton"
:animate="true"
title
rows="1"
rows-width="100%"
rowsHeight="56"
>
</u-skeleton> </u-skeleton>
<block v-if="!skeleton"> <block v-if="!skeleton">
<view class="title">人员基本信息</view> <view class="title">人员基本信息</view>
@ -10,51 +17,87 @@
<image class="avatar" :src="userInfo.avatar"></image> <image class="avatar" :src="userInfo.avatar"></image>
<view class="text"> <view class="text">
<view class="basic_name"> <view class="basic_name">
<view class="name">{{userInfo.name}}</view> <view class="name">{{ userInfo.name }}</view>
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'"> <image
class="icon"
:src="
userInfo.sex == 1
? '../../static/icons/man.png'
: '../../static/icons/woman.png'
"
>
</image> </image>
<!-- <view class="role" v-if="userInfo.roles">{{userInfo.roles[0]}}</view> --> <!-- <view class="role" v-if="userInfo.roles">{{userInfo.roles[0]}}</view> -->
</view> </view>
<view class="id_card"> <view class="id_card">
<view>身份证号{{userInfo.id_card}}</view> <view>身份证号{{ userInfo.id_card }}</view>
<!-- <view class="update" @click="updateShow(userInfo.id_card, 'id_card')"> <!-- <view class="update" @click="updateShow(userInfo.id_card, 'id_card')">
<uni-icons type="compose" color="#F9AA32"></uni-icons> <uni-icons type="compose" color="#F9AA32"></uni-icons>
</view> --> </view> -->
</view> </view>
<view class="phone"> <view class="phone"> 联系电话{{ userInfo.phone }} </view>
联系电话{{userInfo.phone}}
</view> </view>
</view> </view>
</view> <view
<view class="bottom" style="margin-bottom: 10rpx;display: flex;align-items: center;"> class="bottom"
style="margin-bottom: 10rpx; display: flex; align-items: center"
>
是否为小队长 是否为小队长
<u-radio-group v-model="userInfo.is_captain" style="margin-left: 16rpx;" disabled> <u-radio-group
<u-radio :customStyle="{marginRight: '16px'}" v-model="userInfo.is_captain"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" style="margin-left: 16rpx"
:name="item.value"> disabled
>
<u-radio
:customStyle="{ marginRight: '16px' }"
v-for="(item, index) in [
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]"
:key="index"
:label="item.label"
:name="item.value"
>
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
<view class="update" @click="updateShow(userInfo.is_captain, 'is_captain')"> <view
class="update"
@click="updateShow(userInfo.is_captain, 'is_captain')"
>
<uni-icons type="compose" color="#F9AA32"></uni-icons> <uni-icons type="compose" color="#F9AA32"></uni-icons>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
负责区域<text>{{(userInfo.street_name||'')+(userInfo.village_name||'')+(userInfo.brigade_name||'')}}</text> 负责区域<text>{{
(userInfo.street_name || "") +
(userInfo.village_name || "") +
(userInfo.brigade_name || "")
}}</text>
</view> </view>
<u-popup :show="show.is_captain" :round="10" mode="center"> <u-popup :show="show.is_captain" :round="10" mode="center">
<view class="popup"> <view class="popup">
<view class="p_title">修改信息</view> <view class="p_title">修改信息</view>
<view class="p_body"> <view class="p_body">
是否为小队长 是否为小队长
<u-radio-group v-model="updateForm.is_captain" style="margin: 16rpx;"> <u-radio-group
<u-radio :customStyle="{marginRight: '16px'}" v-model="updateForm.is_captain"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" style="margin: 16rpx"
:name="item.value"> >
<u-radio
:customStyle="{ marginRight: '16px' }"
v-for="(item, index) in [
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]"
:key="index"
:label="item.label"
:name="item.value"
>
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
<view class="p_button"> <view class="p_button">
<view @click="show.is_captain=false">取消</view> <view @click="show.is_captain = false">取消</view>
<view @click="updateInfo('is_captain')">确认</view> <view @click="updateInfo('is_captain')">确认</view>
</view> </view>
</view> </view>
@ -62,13 +105,20 @@
<u-popup :show="show.id_card" :round="10" mode="center"> <u-popup :show="show.id_card" :round="10" mode="center">
<view class="popup"> <view class="popup">
<view class="p_title">修改信息</view> <view class="p_title">修改信息</view>
<u--form style="padding: 0 28rpx;"> <u--form style="padding: 0 28rpx">
<u-form-item label="身份证号:" labelWidth="auto" labelPosition="top"> <u-form-item
<u--input style="border:1px solid #3175f9;" v-model="updateForm.id_card"></u--input> label="身份证号:"
labelWidth="auto"
labelPosition="top"
>
<u--input
style="border: 1px solid #3175f9"
v-model="updateForm.id_card"
></u--input>
</u-form-item> </u-form-item>
</u--form> </u--form>
<view class="p_button"> <view class="p_button">
<view @click="show.id_card=false">取消</view> <view @click="show.id_card = false">取消</view>
<view @click="updateInfo('id_card')">确认</view> <view @click="updateInfo('id_card')">确认</view>
</view> </view>
</view> </view>
@ -77,164 +127,355 @@
</block> </block>
</view> </view>
<view class="certification"> <view class="certification">
<u-skeleton :loading="skeleton" :animate="true" title rows="3" rows-width="100%" rowsHeight="56"> <u-skeleton
:loading="skeleton"
:animate="true"
title
rows="3"
rows-width="100%"
rowsHeight="56"
>
</u-skeleton> </u-skeleton>
<block v-if="!skeleton"> <block v-if="!skeleton">
<view class="title">资质信息</view> <view class="title">资质信息</view>
<view class="c_item"> <view class="c_item">
<uni-section style="background-color: transparent;" title="身份证" titleFontSize="32rpx" type="line"> <uni-section
style="background-color: transparent"
title="身份证"
titleFontSize="32rpx"
type="line"
>
</uni-section> </uni-section>
<view class="card_box"> <view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.id_card" <image
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 0)"> :src="userInfo.qualification && userInfo.qualification.id_card"
@click="
previewImg(
[
userInfo.qualification && userInfo.qualification.id_card,
userInfo.qualification && userInfo.qualification.id_card_b,
],
0
)
"
>
</image> </image>
<image :src="userInfo.qualification&&userInfo.qualification.id_card_b" <image
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 1)"> :src="userInfo.qualification && userInfo.qualification.id_card_b"
@click="
previewImg(
[
userInfo.qualification && userInfo.qualification.id_card,
userInfo.qualification && userInfo.qualification.id_card_b,
],
1
)
"
>
</image> </image>
</view> </view>
</view> </view>
<view class="c_item"> <view class="c_item">
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx" type="line"> <uni-section
style="background-color: transparent"
title="银行卡照片"
titleFontSize="32rpx"
type="line"
>
</uni-section> </uni-section>
<view class="card_box"> <view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.bank_account" <image
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 0)"> :src="
userInfo.qualification && userInfo.qualification.bank_account
"
@click="
previewImg(
[
userInfo.qualification &&
userInfo.qualification.bank_account,
userInfo.qualification &&
userInfo.qualification.bank_account_b,
],
0
)
"
>
</image> </image>
<image :src="userInfo.qualification&&userInfo.qualification.bank_account_b" <image
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 1)"> :src="
userInfo.qualification && userInfo.qualification.bank_account_b
"
@click="
previewImg(
[
userInfo.qualification &&
userInfo.qualification.bank_account,
userInfo.qualification &&
userInfo.qualification.bank_account_b,
],
1
)
"
>
</image> </image>
</view> </view>
</view> </view>
<view class="c_item" <view
v-if="userInfo.qualification&&userInfo.qualification.car_card||(userInfo.qualification&&userInfo.qualification.car_card)"> class="c_item"
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line"> v-if="
(userInfo.qualification && userInfo.qualification.car_card) ||
(userInfo.qualification && userInfo.qualification.car_card)
"
>
<uni-section
style="background-color: transparent"
title="驾驶证"
titleFontSize="32rpx"
type="line"
>
</uni-section> </uni-section>
<view class="card_box"> <view class="card_box">
<image v-if="userInfo.qualification&&userInfo.qualification.car_card" <image
:src="userInfo.qualification&&userInfo.qualification.car_card" v-if="userInfo.qualification && userInfo.qualification.car_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)"> :src="userInfo.qualification && userInfo.qualification.car_card"
@click="
previewImg(
[
userInfo.qualification && userInfo.qualification.car_card,
userInfo.qualification && userInfo.qualification.car_card_b,
],
0
)
"
>
</image> </image>
<image v-if="userInfo.qualification&&userInfo.qualification.car_card" <image
:src="userInfo.qualification&&userInfo.qualification.car_card_b" v-if="userInfo.qualification && userInfo.qualification.car_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)"> :src="userInfo.qualification && userInfo.qualification.car_card_b"
@click="
previewImg(
[
userInfo.qualification && userInfo.qualification.car_card,
userInfo.qualification && userInfo.qualification.car_card_b,
],
1
)
"
>
</image> </image>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<view class="contract"> <view class="contract">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"> <u-skeleton
:loading="skeleton"
:animate="true"
title
rows="2"
rows-width="100%"
rowsHeight="56"
>
</u-skeleton> </u-skeleton>
<block v-if="!skeleton"> <block v-if="!skeleton">
<view class="title">电子合同</view> <view class="title">电子合同</view>
<view v-if="userInfo.contract&&userInfo.is_contract&&userInfo.contract.status" class="card"> <view
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx" v-if="
type="line"></uni-section> userInfo.contract &&
<view class="c_text">性别{{userInfo.sex==1?'男':'女'}}</view> userInfo.is_contract &&
<view class="c_text">身份证号码{{userInfo.id_card}}</view> userInfo.contract.status
<view class="c_text">联系电话{{userInfo.phone}}</view> "
<view class="c_text">合同类型{{userInfo.contract&&userInfo.contract.contract_type_name}}</view> class="card"
<view class="c_text">合同编号{{userInfo.contract&&userInfo.contract.contract_no}}</view> >
<u-line v-if="userInfo.contract&&userInfo.contract.file" color="#999999FF" style="margin: 31rpx 0;"> <uni-section
style="background-color: transparent"
:title="userInfo.name"
titleFontSize="32rpx"
type="line"
></uni-section>
<view class="c_text"
>性别{{ userInfo.sex == 1 ? "男" : "女" }}</view
>
<view class="c_text">身份证号码{{ userInfo.id_card }}</view>
<view class="c_text">联系电话{{ userInfo.phone }}</view>
<view class="c_text"
>合同类型{{
userInfo.contract && userInfo.contract.contract_type_name
}}</view
>
<view class="c_text"
>合同编号{{
userInfo.contract && userInfo.contract.contract_no
}}</view
>
<u-line
v-if="userInfo.contract && userInfo.contract.file"
color="#999999FF"
style="margin: 31rpx 0"
>
</u-line> </u-line>
<view v-if="userInfo.contract&&userInfo.contract.file" class="contract_box"> <view
v-if="userInfo.contract && userInfo.contract.file"
class="contract_box"
>
<view class="left"> <view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image> <image
class="contract_img"
src="../../static/img/contract/pdf.png"
></image>
<view class="text"> <view class="text">
<view class="name">{{userInfo.contract.contract_type_name||'合同'}}</view> <view class="name">{{
userInfo.contract.contract_type_name || "合同"
}}</view>
<view> <view>
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text> <text>{{
userInfo.contract && userInfo.contract.create_time
}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="right" @click="naviToContract(userInfo.contract.contract_no)"> <view
class="right"
@click="naviToContract(userInfo.contract.contract_no)"
>
<!-- <image class="icon"></image> --> <!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons> <uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view> <view>查看</view>
</view> </view>
</view> </view>
</view> </view>
<picker v-if="!userInfo.is_contract&&!userInfo.contract||(userInfo.contract&&userInfo.contract.check_status==0)" <picker
:range="contractTypeList" range-key="name" @change="changeType"> v-if="
(!userInfo.is_contract && !userInfo.contract) ||
(userInfo.contract && userInfo.contract.check_status == 0)
"
:range="contractTypeList"
range-key="name"
@change="changeType"
>
<button class="btn">生成合同</button> <button class="btn">生成合同</button>
</picker> </picker>
<view v-if="userInfo.contract&&userInfo.contract.check_status==1"> <view v-if="userInfo.contract && userInfo.contract.check_status == 1">
<button class="btn tips_center">合同已生成,请等待审核</button> <button class="btn tips_center">合同已生成,请等待审核</button>
</view> </view>
<view v-if="!userInfo.is_contract&&userInfo.contract&&userInfo.contract.check_status==2" class="card"> <view
v-if="
!userInfo.is_contract &&
userInfo.contract &&
userInfo.contract.check_status == 2
"
class="card"
>
<view class="contract_box send"> <view class="contract_box send">
<view class="left"> <view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image> <image
class="contract_img"
src="../../static/img/contract/pdf.png"
></image>
<view class="text"> <view class="text">
<view class="name">{{userInfo.contract.contract_type_name||'合同'}}</view> <view class="name">{{
userInfo.contract.contract_type_name || "合同"
}}</view>
<view> <view>
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text> <text>{{
userInfo.contract && userInfo.contract.create_time
}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="right" @click="naviToContract(userInfo.contract.contract_no)"> <view
class="right"
@click="naviToContract(userInfo.contract.contract_no)"
>
<!-- <image class="icon"></image> --> <!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons> <uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view> <view>查看</view>
</view> </view>
</view> </view>
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line> <u-line color="#999999FF" style="margin: 31rpx 0"></u-line>
<view class="bottom"> <view class="bottom">
<button class="send_btn" @click="addContract" v-if="timerCount==0">发送合同</button> <button
<button class="send_btn tips_center" v-else>{{cTimerCount+'秒后可继续发送合同'}}</button> class="send_btn"
@click="addContract"
v-if="timerCount == 0"
>
发送合同
</button>
<button class="send_btn tips_center" v-else>
{{ cTimerCount + "秒后可继续发送合同" }}
</button>
</view> </view>
</view> </view>
<view v-if="!userInfo.is_contract&&userInfo.contract&&userInfo.contract.check_status==3" class="card"> <view
v-if="
!userInfo.is_contract &&
userInfo.contract &&
userInfo.contract.check_status == 3
"
class="card"
>
<view class="contract_box send"> <view class="contract_box send">
<view class="left"> <view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image> <image
class="contract_img"
src="../../static/img/contract/pdf.png"
></image>
<view class="text"> <view class="text">
<view class="name">{{userInfo.contract.contract_type_name}}</view> <view class="name">{{
userInfo.contract.contract_type_name
}}</view>
<view> <view>
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text> <text>{{
userInfo.contract && userInfo.contract.create_time
}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="right" @click="naviToContract(userInfo.contract.contract_no)"> <view
class="right"
@click="naviToContract(userInfo.contract.contract_no)"
>
<!-- <image class="icon"></image> --> <!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons> <uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view> <view>查看</view>
</view> </view>
</view> </view>
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line> <u-line color="#999999FF" style="margin: 31rpx 0"></u-line>
<view class="bottom"> <view class="bottom">
<button class="send_btn" @click="getPostsms" v-if="timerCount==0">再次发送短信</button> <button class="send_btn" @click="getPostsms" v-if="timerCount == 0">
<button class="send_btn tips_center" v-else>{{cTimerCount+'秒后可继续再次发送短信'}}</button> 再次发送短信
</button>
<button class="send_btn tips_center" v-else>
{{ cTimerCount + "秒后可继续再次发送短信" }}
</button>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
Toast Toast
} from '@/libs/uniApi.js' } from '@/libs/uniApi.js'
import { import {
companyUserDetail companyUserDetail
} from "@/api/company.js" } from "@/api/company.js"
import { import {
loginSetInfo, loginSetInfo,
userDraftingcontracts, userDraftingcontracts,
userInitiateContract, userInitiateContract,
userPostsms userPostsms
} from "@/api/oaUser.js" } from "@/api/oaUser.js"
import { import {
dictDataLists dictDataLists
} from "@/api/oaPbulic.js" } from "@/api/oaPbulic.js"
import { import {
download_file download_file
} from "@/api/junziqian.js" } from "@/api/junziqian.js"
export default { export default {
data() { data () {
return { return {
id: '', id: '',
skeleton: true, skeleton: true,
@ -257,7 +498,7 @@
contractTypeList: [] contractTypeList: []
} }
}, },
onLoad(options) { onLoad (options) {
if (options.id) this.id = options.id; if (options.id) this.id = options.id;
this.initContractTypeList(); this.initContractTypeList();
this.loadUserDetail(); this.loadUserDetail();
@ -266,17 +507,17 @@
this.startTimer((time - Date.now()) / 1000); this.startTimer((time - Date.now()) / 1000);
} }
}, },
onUnload() { onUnload () {
if (this.timerCount > 0) uni.setStorageSync('time' + this.id, this.timerCount * 1000 + Date.now()); if (this.timerCount > 0) uni.setStorageSync('time' + this.id, this.timerCount * 1000 + Date.now());
}, },
computed: { computed: {
cTimerCount() { cTimerCount () {
return this.timerCount; return this.timerCount;
} }
}, },
methods: { methods: {
// //
naviToContract(contract_no) { naviToContract (contract_no) {
if (this.userInfo.is_contract) { if (this.userInfo.is_contract) {
download_file({ download_file({
applyNo: contract_no applyNo: contract_no
@ -292,18 +533,18 @@
url: `/subpkg/pdfView/pdfView?url=${this.userInfo?.contract?.file}` url: `/subpkg/pdfView/pdfView?url=${this.userInfo?.contract?.file}`
}) })
}, },
navTo(url) { navTo (url) {
url ? url ?
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
}) : Toast('暂未开放') }) : Toast('暂未开放')
}, },
updateShow(value, type) { updateShow (value, type) {
this.updateForm[type] = value; this.updateForm[type] = value;
this.show[type] = true; this.show[type] = true;
}, },
// //
async updateInfo(type) { async updateInfo (type) {
try { try {
let form = { let form = {
user_id: this.userInfo.id, user_id: this.userInfo.id,
@ -317,7 +558,7 @@
Toast(e.msg || '更新失败') Toast(e.msg || '更新失败')
} }
}, },
changeType(e) { changeType (e) {
// console.log(this.contractTypeList[e.detail.value]); // console.log(this.contractTypeList[e.detail.value]);
this.createContract({ this.createContract({
party_b: this.userInfo.id, party_b: this.userInfo.id,
@ -326,14 +567,14 @@
}) })
}, },
// //
async initContractTypeList() { async initContractTypeList () {
let res = await dictDataLists({ let res = await dictDataLists({
type_id: 7 type_id: 7
}) })
this.contractTypeList = res.data; this.contractTypeList = res.data;
}, },
// //
createContract(data) { createContract (data) {
uni.showModal({ uni.showModal({
content: '请检查信息无误后再生成合同', content: '请检查信息无误后再生成合同',
confirmText: '确认无误', confirmText: '确认无误',
@ -359,7 +600,7 @@
}) })
}, },
// //
async addContract(data) { async addContract (data) {
uni.showModal({ uni.showModal({
content: '请检查合同无误后再发送', content: '请检查合同无误后再发送',
confirmText: '确认无误', confirmText: '确认无误',
@ -389,7 +630,7 @@
}) })
}, },
// //
async getPostsms() { async getPostsms () {
try { try {
uni.showLoading({ uni.showLoading({
title: '发送中', title: '发送中',
@ -410,7 +651,7 @@
} }
}, },
// //
startTimer(time = 60) { startTimer (time = 60) {
this.timerCount = time.toFixed(0); this.timerCount = time.toFixed(0);
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.timerCount--; this.timerCount--;
@ -420,7 +661,7 @@
} }
}, 1000); }, 1000);
}, },
loadUserDetail() { loadUserDetail () {
if (!this.id) return; if (!this.id) return;
companyUserDetail({ companyUserDetail({
id: this.id id: this.id
@ -429,41 +670,41 @@
this.skeleton = false; this.skeleton = false;
}) })
}, },
previewImg(urls, index = 0) { previewImg (urls, index = 0) {
uni.previewImage({ uni.previewImage({
urls: urls, urls: urls,
current: index current: index
}) })
} }
}, },
onPullDownRefresh() { onPullDownRefresh () {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.page { .page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.title { .title {
font-size: 35rpx; font-size: 35rpx;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-bottom: 21rpx; margin-bottom: 21rpx;
} }
.card { .card {
width: 694rpx; width: 694rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
padding: 28rpx; padding: 28rpx;
} }
.basic { .basic {
margin: 28rpx 0; margin: 28rpx 0;
.card { .card {
@ -477,7 +718,7 @@
.avatar { .avatar {
width: 154rpx; width: 154rpx;
height: 154rpx; height: 154rpx;
background: #CCCCCC; background: #cccccc;
border-radius: 7rpx 7rpx 7rpx 7rpx; border-radius: 7rpx 7rpx 7rpx 7rpx;
margin-right: 28rpx; margin-right: 28rpx;
} }
@ -502,7 +743,7 @@
.name { .name {
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #000000CC; color: #000000cc;
} }
.role { .role {
@ -527,7 +768,7 @@
.update { .update {
display: flex; display: flex;
align-items: center; align-items: center;
color: #F9AA32; color: #f9aa32;
} }
} }
@ -571,9 +812,9 @@
} }
} }
} }
} }
.certification { .certification {
margin-bottom: 28rpx; margin-bottom: 28rpx;
.title { .title {
@ -590,22 +831,21 @@
image { image {
width: 336rpx; width: 336rpx;
height: 238rpx; height: 238rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
border: 2rpx solid #CCCCCC; border: 2rpx solid #cccccc;
}
} }
} }
} }
}
.contract { .contract {
margin-bottom: 28rpx; margin-bottom: 28rpx;
.title { .title {
width: 694rpx; width: 694rpx;
} }
.card { .card {
padding-top: 0; padding-top: 0;
@ -619,7 +859,7 @@
.contract_img { .contract_img {
width: 102rpx; width: 102rpx;
height: 102rpx; height: 102rpx;
background: #F5F5F5; background: #f5f5f5;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx; margin-right: 21rpx;
} }
@ -631,7 +871,6 @@
.name { .name {
font-size: 32rpx; font-size: 32rpx;
;
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
line-height: 35rpx; line-height: 35rpx;
@ -654,7 +893,7 @@
.right { .right {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #3274F9; color: #3274f9;
line-height: 35rpx; line-height: 35rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -663,12 +902,11 @@
.icon { .icon {
width: 35rpx; width: 35rpx;
height: 39rpx; height: 39rpx;
background-color: #3274F9; background-color: #3274f9;
opacity: 1; opacity: 1;
margin-right: 10rpx margin-right: 10rpx;
} }
} }
} }
.send { .send {
@ -707,5 +945,5 @@
background-color: #666; background-color: #666;
color: #eee; color: #eee;
} }
} }
</style> </style>