页面样式修改

This commit is contained in:
THK3121 2023-08-19 16:39:16 +08:00
parent 3684c3a7ce
commit 281b61a609
11 changed files with 3367 additions and 3059 deletions

120
App.vue
View File

@ -1,60 +1,80 @@
<script>
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
onLaunch: async function () {
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
onLaunch: async function() {
const audioContext = uni.createInnerAudioContext()
//
audioContext.src = './static/mp3/order.mp3'
let noticeArr = []
//
//#ifdef APP-PLUS
jpushModule.addNotificationListener(res => {
if (!noticeArr.includes(res.messageID)) {
console.log(res.messageID)
audioContext.play()
noticeArr.push(res.messageID)
uni.vibrateLong({
success: function() {
console.log('success');
}
});
}
console.log('App Launch')
try {
if (!this.$store.state.app.token) uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
} catch (e) {
uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
}
// jpushModule.initJPushService()
// const audioContext = uni.createInnerAudioContext()
// audioContext.src = './static/mp3/order.mp3'
// let ida = [0]
// jpushModule.addNotificationListener(function (result) {
// if (!ida.includes(result.messageID)) {
// audioContext.play()
// }
// ida.push(result.messageID)
// })
},
onShow: function () {
console.log('App Show')
//
const audioContext = uni.createInnerAudioContext()
})
// #endif
console.log('App Launch')
try {
if (!this.$store.state.app.token) uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
} catch (e) {
uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
}
//
audioContext.src = './static/mp3/order.mp3'
// jpushModule.initJPushService()
// const audioContext = uni.createInnerAudioContext()
// audioContext.src = './static/mp3/order.mp3'
// let ida = [0]
// jpushModule.addNotificationListener(function (result) {
// if (!ida.includes(result.messageID)) {
// audioContext.play()
// }
// ida.push(result.messageID)
// })
},
onShow: function() {
console.log('App Show')
//
// const audioContext = uni.createInnerAudioContext()
//
//#ifdef APP-PLUS
jpushModule.addNotificationListener(res => {
console.log("监听成功")
audioContext.play()
})
// #endif
},
onHide: function () {
console.log('App Hide')
}
}
// //
// audioContext.src = './static/mp3/order.mp3'
// //
// //#ifdef APP-PLUS
// jpushModule.addNotificationListener(res => {
// console.log("")
// audioContext.play()
// })
// // #endif
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import "static/css/base.css";
@import "static/css/style.scss";
/*每个页面公共css */
@import "static/css/base.css";
@import "static/css/style.scss";
view {
box-sizing: border-box;
}
view {
box-sizing: border-box;
}
</style>

View File

@ -1,15 +1,9 @@
<template>
<view>
<view class="item">
<u-skeleton
:loading="skeleton"
:animate="true"
title
rows="1"
rows-width="100%"
rowsHeight="56"
></u-skeleton>
<!-- <block v-if="!skeleton">
<view>
<view class="item">
<u-skeleton :loading="skeleton" :animate="true" title rows="1" rows-width="100%"
rowsHeight="56"></u-skeleton>
<!-- <block v-if="!skeleton">
<view class="title">公司基本信息</view>
<view class="card">
<view class="top">
@ -75,7 +69,7 @@
</view>
<view class="" @click="copyPhone(company.master_email, '社会代码')">
<text>担任职务 :</text>
<text>{{company.organization_code}}</text>
<text>{{company.master_position}}</text>
</view>
<view class="" @click="copyPhone(company.master_email, '电话')">
<text>联系电话 :</text>
@ -321,193 +315,193 @@
</template>
<script>
import {
contractView
} from "@/api/contract.js"
import {
companyView
} from "@/api/company.js"
import {
download_file
} from "@/api/junziqian.js"
import {
Toast
} from '@/libs/uniApi.js'
import {
contractView
} from "@/api/contract.js"
import {
companyView
} from "@/api/company.js"
import {
download_file
} from "@/api/junziqian.js"
import {
Toast
} from '@/libs/uniApi.js'
export default {
name: "company",
data () {
return {
skeleton: true,
company: {
qualification: {
bank_account: "",
bank_accountB: "",
business_license: "",
business_licenseB: "",
},
},
contract: {},
users: [],
current: 1
}
},
props: ['id', 'type'],
mounted () {
this.initContract(this.$props.id, this.$props.type || null);
},
computed: {
c_address () {
let str = '';
if (this.company.company_type == 16) {
this.company?.province_name ? str += this.company?.province_name : null;
this.company?.city_name ? str += this.company?.city_name : null;
this.company?.area_name ? str += this.company?.area_name : null;
this.company?.street_name ? str += this.company?.street_name : null;
} else {
this.company?.street_name ? str += this.company?.street_name : null;
this.company?.village_name ? str += this.company?.village_name : null;
this.company?.brigade_name ? str += this.company?.brigade_name : null;
export default {
name: "company",
data() {
return {
skeleton: true,
company: {
qualification: {
bank_account: "",
bank_accountB: "",
business_license: "",
business_licenseB: "",
},
},
contract: {},
users: [],
current: 1
}
},
props: ['id', 'type'],
mounted() {
this.initContract(this.$props.id, this.$props.type || null);
},
computed: {
c_address() {
let str = '';
if (this.company.company_type == 16) {
this.company?.province_name ? str += this.company?.province_name : null;
this.company?.city_name ? str += this.company?.city_name : null;
this.company?.area_name ? str += this.company?.area_name : null;
this.company?.street_name ? str += this.company?.street_name : null;
} else {
this.company?.street_name ? str += this.company?.street_name : null;
this.company?.village_name ? str += this.company?.village_name : null;
this.company?.brigade_name ? str += this.company?.brigade_name : null;
}
return str;
}
},
methods: {
navTo (contract_no) {
download_file({
applyNo: contract_no
}).then(res => {
if (res.code != 1) {
Toast(res.msg)
}
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
})
})
},
naviBack () {
uni.navigateBack()
},
async initContract (id, type = "contract") {
let res;
//
if (id && (type == "contract" || type == null)) {
res = await contractView({
id
});
} else {
if (id > 0) {
res = await companyView({
id
});
} else {
res = await companyView();
}
}
return str;
}
},
methods: {
navTo(contract_no) {
download_file({
applyNo: contract_no
}).then(res => {
if (res.code != 1) {
Toast(res.msg)
}
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
})
})
},
naviBack() {
uni.navigateBack()
},
async initContract(id, type = "contract") {
let res;
//
if (id && (type == "contract" || type == null)) {
res = await contractView({
id
});
} else {
if (id > 0) {
res = await companyView({
id
});
} else {
res = await companyView();
}
}
this.company = res.data.company;
uni.$emit('companyInfo', this.company); //
this.user = res.data.user;
this.contract = res.data.contract;
this.skeleton = false;
// console.log(res.data);
},
//
priview (url) {
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['保存图片'],
success: function (data) {
if (data.tapIndex === 0) {
uni.saveImageToPhotosAlbum({
filePath: url,
success: function () {
uni.showToast({
title: '保存成功',
icon: 'success'
})
},
fail: function () {
uni.showToast({
title: '保存失败',
icon: 'none'
})
}
})
}
}
}
})
},
copyPhone (str = "", type = "号码") {
if (str) uni.setClipboardData({
data: str + "",
success: (e) => {
Toast(type + '已复制')
},
fail: (e) => {
Toast('复制失败')
}
})
}
},
}
}
this.company = res.data.company;
uni.$emit('companyInfo', this.company); //
this.user = res.data.user;
this.contract = res.data.contract;
this.skeleton = false;
// console.log(res.data);
},
//
priview(url) {
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['保存图片'],
success: function(data) {
if (data.tapIndex === 0) {
uni.saveImageToPhotosAlbum({
filePath: url,
success: function() {
uni.showToast({
title: '保存成功',
icon: 'success'
})
},
fail: function() {
uni.showToast({
title: '保存失败',
icon: 'none'
})
}
})
}
}
}
})
},
copyPhone(str = "", type = "号码") {
if (str) uni.setClipboardData({
data: str + "",
success: (e) => {
Toast(type + '已复制')
},
fail: (e) => {
Toast('复制失败')
}
})
}
},
}
</script>
<style lang="scss" scoped>
.personnel_list {
padding: 28rpx 0;
.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 {
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_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;
.cards_content {
padding: 28rpx;
display: flex;
justify-content: space-between;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
width: 160rpx;
background-color: $theme-oa-color;
color: white;
border-radius: 40rpx;
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;
}
}
.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;
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
view {
margin-bottom: 10rpx;
@ -520,10 +514,10 @@ export default {
}
}
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@ -599,232 +593,233 @@ export default {
padding-top: 0;
&:nth-child(1) {
padding-top: 32rpx;
}
.title {
margin-bottom: 21rpx;
font-size: 35rpx;
font-weight: 500;
color: #333333;
display: flex;
justify-content: space-between;
}
.card {
width: 694rpx;
// height: 231rpx;
padding: 28rpx;
background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.top {
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
image {
flex-shrink: 0;
width: 142rpx;
height: 142rpx;
margin-right: 28rpx;
background: #cccccc;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.code {
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: $theme-oa-color;
}
}
.bottom {
display: flex;
align-items: center;
color: #666666ff;
margin-top: 32rpx;
.left {
display: flex;
align-items: center;
flex-shrink: 0;
.location {
margin-left: 5rpx;
margin-right: 5rpx;
}
}
}
.one {
margin-top: 32rpx;
&:nth-child(1) {
margin-top: 0;
}
.linkman {
// height: 44rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-bottom: 28rpx;
display: flex;
align-items: center;
}
.info {
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 45rpx;
}
}
.contract {
display: flex;
justify-content: space-between;
&:nth-child(1) {
padding-top: 32rpx;
}
.title {
margin-bottom: 21rpx;
font-size: 35rpx;
font-weight: 500;
color: #333333;
display: flex;
justify-content: space-between;
}
.card {
width: 694rpx;
// height: 231rpx;
padding: 28rpx;
background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.top {
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
image {
flex-shrink: 0;
width: 142rpx;
height: 142rpx;
margin-right: 28rpx;
background: #cccccc;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.code {
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: $theme-oa-color;
}
}
.bottom {
display: flex;
align-items: center;
color: #666666ff;
margin-top: 32rpx;
.left {
display: flex;
align-items: center;
flex-shrink: 0;
.location {
margin-left: 5rpx;
margin-right: 5rpx;
}
}
}
.one {
margin-top: 32rpx;
&:nth-child(1) {
margin-top: 0;
}
.linkman {
// height: 44rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-bottom: 28rpx;
display: flex;
align-items: center;
}
.info {
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 45rpx;
}
}
.contract {
display: flex;
justify-content: space-between;
}
.image_box {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
padding: 28rpx;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #f5f5f5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: $theme-oa-color;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: $theme-oa-color;
opacity: 1;
margin-right: 10rpx;
}
}
}
}
.image_box {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
padding: 28rpx;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #f5f5f5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.image {
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 28rpx;
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
image {
width: 650rpx;
height: 455rpx;
background-color: #7f7f7f;
}
}
}
}
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.back_btn {
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin: 30rpx auto;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: $theme-oa-color;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: $theme-oa-color;
opacity: 1;
margin-right: 10rpx;
}
}
}
}
.image_box {
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
padding: 28rpx;
.image {
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 28rpx;
image {
width: 650rpx;
height: 455rpx;
background-color: #7f7f7f;
}
}
}
}
.back_btn {
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin: 30rpx auto;
}
.stop_btn {
width: 694rpx;
height: 84rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: $theme-oa-color;
background-color: transparent;
margin: 30rpx auto;
}
.stop_btn {
width: 694rpx;
height: 84rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: $theme-oa-color;
background-color: transparent;
margin: 30rpx auto;
}
</style>

View File

@ -1,271 +1,291 @@
<template>
<view class="c_card">
<view class="f_card">
<view class="item" @click="navTo('/subpkg/topUp/topUp')">
<view>公司账户余额()</view>
<view class="price" v-if="company.deposit">{{cCount(+company.deposit)}}</view>
<view class="price" v-else>0.00</view>
</view>
<view class="item" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">
<view>公司收益金额()</view>
<view class="price" v-if="company.company_money">{{cCount(+company.company_money)}}</view>
<view class="price" v-else>0.00</view>
</view>
</view>
<view class="f_nav">
<view class="title">账单流水</view>
<view class="right">
<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" @click="navTo('/subpkg/companyFinance/companyFinance')">更多</view>
</view>
</view>
<view class="f_list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="top">
账单日期: {{current?item.month:item.create_time}}
</view>
<view class="bottom">
<view class="text">
<view class="t_item" v-if="current==0">
<view class="t_title">任务名称</view>
<view class="tips">{{item.remark}}</view>
</view>
<view class="t_item">
<view class="t_title">金额归属</view>
<view class="tips"><text v-if="item.userInfo">{{item.userInfo.nickname}}</text></view>
</view>
<view class="t_item">
<view class="t_title">收益来源</view>
<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-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 class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</view>
<view class="c_card">
<view class="f_card">
<view class="item" @click="navTo('/subpkg/topUp/topUp')">
<view>公司账户余额()</view>
<view class="price" v-if="company.deposit">{{cCount(+company.deposit)}}</view>
<view class="price" v-else>0.00</view>
</view>
<view class="item" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">
<view>公司收益金额()</view>
<view class="price" v-if="company.company_money">{{cCount(+company.company_money)}}</view>
<view class="price" v-else>0.00</view>
</view>
</view>
<view class="f_nav">
<view class="title">账单流水</view>
<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==1?'active':''" @click="current=1;initLoad()">月账单</view> -->
<view class="btn" @click="navTo('/subpkg/companyFinance/companyFinance')">更多</view>
</view>
</view>
<view class="f_list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="top">
账单日期: {{current?item.month:item.create_time}}
</view>
<view class="bottom">
<view class="text">
<view class="t_item" v-if="current==0">
<view class="t_title">任务名称</view>
<view class="tips">{{item.remark}}</view>
</view>
<view class="t_item">
<view class="t_title">金额归属</view>
<view class="tips"><text v-if="item.userInfo">{{item.userInfo.nickname}}</text></view>
</view>
<view class="t_item">
<view class="t_title">收益来源</view>
<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-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 class="price">
{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}
</view>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</view>
</template>
<script>
import { accountMonthList, accountDateList } from "@/api/company.js"
import { Toast } from "../../libs/uniApi";
export default {
name: "companyFinance",
data() {
return {
current: 0,
list: [],
company:{
company_money: "0",
deposit: "0"
},
loadConfig:{
page: 1,
limit: 15,
lastpage: '',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~',
status: 'loadmore'
},
};
},
mounted() {
uni.$on('companyInfo', (e)=>{
this.company = e;
console.log(this.company);
this.initLoad();
})
},
methods:{
navTo(url) {
url ?
uni.navigateTo({
url: url,
}) : Toast('暂未开放')
},
initLoad(){
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.initList();
},
async initList(){
if(this.loadConfig.status=="nomore")return;
this.loadConfig.status="loading";
let res;
if(this.current==0) res = await accountDateList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id
})
else res = await accountMonthList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id
})
this.loadConfig.status="loadmore"
if(res.data.length<this.loadConfig.limit){
this.loadConfig.status="nomore"
}else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data]
},
//
cCount(value=0){
try{
return value.toFixed(2);
}catch(e){
return "0.00";
}
}
}
}
import {
accountMonthList,
accountDateList
} from "@/api/company.js"
import {
Toast
} from "../../libs/uniApi";
export default {
name: "companyFinance",
data() {
return {
current: 0,
list: [],
company: {
company_money: "0",
deposit: "0"
},
loadConfig: {
page: 1,
limit: 15,
lastpage: '',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~',
status: 'loadmore'
},
};
},
mounted() {
uni.$on('companyInfo', (e) => {
this.company = e;
console.log(this.company);
this.initLoad();
})
},
methods: {
navTo(url) {
url ?
uni.navigateTo({
url: url,
}) : Toast('暂未开放')
},
initLoad() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.initList();
},
async initList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading";
let res;
if (this.current == 0) res = await accountDateList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id
})
else res = await accountMonthList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id
})
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data]
},
//
cCount(value = 0) {
try {
return value.toFixed(2);
} catch (e) {
return "0.00";
}
}
}
}
</script>
<style lang="scss">
.c_card {
padding-top: 28rpx;
.c_card {
padding-top: 28rpx;
.f_card {
margin: 0 auto;
width: 694rpx;
height: 158rpx;
background: #3175F9;
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
padding: 28rpx;
display: flex;
justify-content: space-around;
color: #fff;
text-align: center;
.f_card {
margin: 0 auto;
width: 694rpx;
height: 158rpx;
background: $theme-oa-color;
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
padding: 28rpx;
display: flex;
justify-content: space-around;
color: #fff;
text-align: center;
.item {
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 28rpx;
flex: 1;
.item {
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 28rpx;
flex: 1;
&:nth-child(1) {
border-right: 1px solid #fff;
}
&:nth-child(1) {
border-right: 1px solid #fff;
}
.price {
font-size: 49rpx;
font-weight: 500;
}
}
}
.price {
font-size: 49rpx;
font-weight: 500;
}
}
}
.f_nav {
margin: 28rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
.f_nav {
margin: 28rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
.title {
font-size: 32rpx;
font-weight: 500;
color: #333333;
display: flex;
align-items: center;
.title {
font-size: 32rpx;
font-weight: 500;
color: #333333;
display: flex;
align-items: center;
&:before {
content: "";
width: 6rpx;
height: 26rpx;
border-radius: 10rpx;
margin-right: 10rpx;
display: inline-block;
background-color: #3175F9;
}
}
&:before {
content: "";
width: 6rpx;
height: 26rpx;
border-radius: 10rpx;
margin-right: 10rpx;
display: inline-block;
background-color: #3175F9;
}
}
.right {
display: flex;
.right {
display: flex;
.btn {
margin-left: 28rpx;
}
.btn {
margin-left: 28rpx;
}
.active {
color: #3175F9;
}
}
}
.active {
color: #3175F9;
}
}
}
.f_list {
.item {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
// height: 238rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 28rpx;
.f_list {
.item {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
// height: 238rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 28rpx;
.top {
margin-bottom: 28rpx;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.top {
margin-bottom: 28rpx;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
&:before {
display: inline-block;
content: '账单详情';
width: 137rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
background: #3274F9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff;
margin-right: 28rpx;
}
}
&:before {
display: inline-block;
content: '账单详情';
width: 137rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
background: #3274F9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff;
margin-right: 28rpx;
}
}
.bottom {
display: flex;
justify-content: space-between;
.bottom {
display: flex;
justify-content: space-between;
.text {
font-size: 25rpx;
font-weight: 400;
color: #999999;
line-height: 39rpx;
.t_item{
display: flex;
.t_title{
margin-bottom: 16rpx;
flex-shrink: 0 !important;
}
.tips{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
}
}
.price{
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 500;
color: #F02828;
}
}
}
}
}
.text {
font-size: 25rpx;
font-weight: 400;
color: #999999;
line-height: 39rpx;
.t_item {
display: flex;
.t_title {
margin-bottom: 16rpx;
flex-shrink: 0 !important;
}
.tips {
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
}
}
.price {
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 500;
color: #F02828;
}
}
}
}
}
</style>

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,333 +1,332 @@
<template>
<view class="my">
<view class="head_box">
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<view style="height: 100rpx"></view>
<!-- #endif -->
<view class="personage">
<view class="my_msg flex_a_c_j_sb">
<view class="flex_a_c">
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'"
width="130.28rpx" height="130.28rpx" shape="circle">
</u--image>
<view v-if="!$store.state.app.token" @click="login" class="name_work">
<view class="name">
<text class="nickname">立即登录</text>
</view>
<view class="work">
登录后可查看更多
</view>
</view>
<view v-else class="name_work">
<view class="name">
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
{{ oaUserInfo.admin_id?'超级管理员':'普通用户'}}
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
</view>
<view class="work">
电话:{{oaUserInfo.account}}<br />
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br/>
公司类型:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br/>
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
</view>
</view>
</view>
<!-- <view v-if="$store.state.app.token" class="compile" @click="navTo()">
<view class="my">
<view class="head_box">
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<view style="height: 100rpx"></view>
<!-- #endif -->
<view class="personage">
<view class="my_msg flex_a_c_j_sb">
<view class="flex_a_c">
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'"
width="130.28rpx" height="130.28rpx" shape="circle">
</u--image>
<view v-if="!$store.state.app.token" @click="login" class="name_work">
<view class="name">
<text class="nickname">立即登录</text>
</view>
<view class="work">
登录后可查看更多
</view>
</view>
<view v-else class="name_work">
<view class="name">
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
{{ oaUserInfo.admin_id?'超级管理员':'普通用户'}}
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
</view>
<view class="work">
电话:{{oaUserInfo.account}}<br />
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br />
公司类型:<text
v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br />
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
</view>
</view>
</view>
<!-- <view v-if="$store.state.app.token" class="compile" @click="navTo()">
<view class="iconfont icon-bianji"></view>
<view class="">编辑</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 class="other_guide">
<block v-for="(item,i) in myOaData" :key="i">
<view class="other_item flex_a_c_j_sb" @click="navTo(item.url)">
<view class="flex_a_c left">
<!-- <view class="iconfont2" :class="item.icon"></view> -->
<image :src="item.icon"></image>
<view class="text">{{ item.name }}</view>
</view>
<uni-icons type="forward"></uni-icons>
</view>
</block>
</view>
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</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>
<!-- <tabbar></tabbar> -->
</view>
</view>
</view>
</view>
<view class="other_guide">
<block v-for="(item,i) in myOaData" :key="i">
<view class="other_item flex_a_c_j_sb" @click="navTo(item.url)">
<view class="flex_a_c left">
<!-- <view class="iconfont2" :class="item.icon"></view> -->
<image :src="item.icon"></image>
<view class="text">{{ item.name }}</view>
</view>
<uni-icons type="forward"></uni-icons>
</view>
</block>
</view>
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</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>
<!-- <tabbar></tabbar> -->
</view>
</template>
<script>
import { mapActions } from 'vuex'
import { 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'
export default {
components: {
// tabbar
},
data() {
return {
myOaData: myOaData,
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
modelShow: false
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
onShow() {
this.getOaUserInfo();
},
onHide() {
this.modelShow = false;
},
computed: {
eyeType() {
return this.$store.state.config.eyeType;
},
oaUserInfo() {
return this.$store.state.app.userInfo || { avatar: '', admin: { company: { company_name: '' } } };
}
},
methods: {
...mapActions(['getWxLogin']),
login() {
uni.navigateTo({
url: '/pages/oaLogin/oaLogin'
})
},
logout() {
let that = this;
// uni.showModal({
// content: '退',
// success: (e) => {
// if (e.confirm) {
uni.navigateTo({
url: '/pages/oaLogin/oaLogin?clear='+true,
success() {
that.$store.commit('CLEAR');
}
})
// }
// }
// })
},
async getOaUserInfo() {
const res = await userInfo();
this.$store.commit('setUserInfo', res.data);
},
navTo(url) {
url ?
uni.navigateTo({
url: url,
fail(e) {
uni.switchTab({
url: url
})
}
}) : Toast('暂未开放')
},
alterMyInfo() {
uni.navigateTo({
url: '/pages/views/personal_center'
})
}
},
onPullDownRefresh() {
this.getOaUserInfo()
uni.stopPullDownRefresh()
}
}
import {
mapActions
} from 'vuex'
import {
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'
export default {
components: {
// tabbar
},
data() {
return {
myOaData: myOaData,
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
modelShow: false
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
onShow() {
this.getOaUserInfo();
},
onHide() {
this.modelShow = false;
},
computed: {
eyeType() {
return this.$store.state.config.eyeType;
},
oaUserInfo() {
return this.$store.state.app.userInfo || {
avatar: '',
admin: {
company: {
company_name: ''
}
}
};
}
},
methods: {
...mapActions(['getWxLogin']),
login() {
uni.navigateTo({
url: '/pages/oaLogin/oaLogin'
})
},
logout() {
let that = this;
// uni.showModal({
// content: '退',
// success: (e) => {
// if (e.confirm) {
uni.navigateTo({
url: '/pages/oaLogin/oaLogin?clear=' + true,
success() {
that.$store.commit('CLEAR');
}
})
// }
// }
// })
},
async getOaUserInfo() {
const res = await userInfo();
this.$store.commit('setUserInfo', res.data);
},
navTo(url) {
url ?
uni.navigateTo({
url: url,
fail(e) {
uni.switchTab({
url: url
})
}
}) : Toast('暂未开放')
},
alterMyInfo() {
uni.navigateTo({
url: '/pages/views/personal_center'
})
}
},
onPullDownRefresh() {
this.getOaUserInfo()
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.my {
.head_box {
position: relative;
padding: 28rpx;
width: 100vw;
margin-bottom: 30rpx;
background-image: url('../../static/img/home/my_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
.my {
.head_box {
position: relative;
padding: 28rpx;
width: 100vw;
margin-bottom: 30rpx;
background-image: url('../../static/img/home/my_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
// .head_img {
// position: absolute;
// // z-index: -1;
// width: 100%;
// height: 100%;
// top: 0;
// left: 0;
// }
}
// .head_img {
// position: absolute;
// // z-index: -1;
// width: 100%;
// height: 100%;
// top: 0;
// left: 0;
// }
}
}
}
.my_head {
height: 90.39rpx;
position: relative;
// z-index: 1;
// top: 20rpx;
// background-color: $theme-oa-color;
// background-image: url('../../static/img/home/head-bg.png');
.my_head {
height: 90.39rpx;
position: relative;
// z-index: 1;
// top: 20rpx;
// background-color: $theme-oa-color;
// background-image: url('../../static/img/home/head-bg.png');
.department {
// padding-top: 38.6rpx;
font-size: 31.58rpx;
color: #fff;
.department {
// padding-top: 38.6rpx;
font-size: 31.58rpx;
color: #fff;
.section {
margin-right: 57.89rpx;
}
}
}
.section {
margin-right: 57.89rpx;
}
}
}
.personage {
// position: relative;
padding-bottom: 28rpx;
border-radius: 12px;
// background-color: #fff;
color: #fff;
width: 694rpx;
margin-left: 50%;
transform: translate(-50%);
.personage {
// position: relative;
padding-bottom: 28rpx;
border-radius: 12px;
// background-color: #fff;
color: #fff;
width: 694rpx;
margin-left: 50%;
transform: translate(-50%);
.name_work {
margin-left: 31.58rpx;
font-size: 28.07rpx;
.name_work {
margin-left: 31.58rpx;
font-size: 28.07rpx;
.name {
.nickname {
font-size: 32rpx;
font-weight: 500;
margin-right: 30rpx;
}
}
.name {
.nickname {
font-size: 32rpx;
font-weight: 500;
margin-right: 30rpx;
}
}
.work {
margin-top: 14.04rpx;
}
.work {
margin-top: 14.04rpx;
}
.omit {
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */
}
}
.omit {
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */
}
}
.my_msg {
.compile {
display: flex;
flex-direction: column;
align-items: center;
}
}
.my_msg {
.compile {
display: flex;
flex-direction: column;
align-items: center;
}
}
.assess {
height: 170.18rpx;
}
.assess {
height: 170.18rpx;
}
.ass_cent {
width: 100%;
padding: 31.58rpx 66.67rpx;
position: absolute;
left: 0;
bottom: 0;
height: 170.18rpx;
border-radius: 12px;
background-color: rgba(#fff, 0.18);
justify-content: space-around;
.ass_cent {
width: 100%;
padding: 31.58rpx 66.67rpx;
position: absolute;
left: 0;
bottom: 0;
height: 170.18rpx;
border-radius: 12px;
background-color: rgba(#fff, 0.18);
justify-content: space-around;
.cent_item {
font-size: 24.56rpx;
color: #fff;
text-align: center;
.cent_item {
font-size: 24.56rpx;
color: #fff;
text-align: center;
.num {
font-size: 38.6rpx;
margin-bottom: 21.05rpx;
}
.num {
font-size: 38.6rpx;
margin-bottom: 21.05rpx;
}
}
}
}
}
}
}
.other_guide {
width: 694.74rpx;
margin: 0 auto;
padding: 28.07rpx;
background-color: #fff;
border-radius: 12px;
.other_guide {
width: 694.74rpx;
margin: 0 auto;
padding: 28.07rpx;
background-color: #fff;
border-radius: 12px;
.other_item {
height: 87.72rpx;
border-bottom: 1px solid #F0F5F7;
.other_item {
height: 87.72rpx;
border-bottom: 1px solid #F0F5F7;
.text {
font-size: 28.07rpx;
margin-left: 20.56rpx;
}
.text {
font-size: 28.07rpx;
margin-left: 20.56rpx;
}
.left {
align-items: center;
}
.left {
align-items: center;
}
image {
width: 42rpx;
height: 42rpx;
}
image {
width: 42rpx;
height: 42rpx;
}
.iconfont2 {
font-size: 42.11rpx;
}
}
}
.iconfont2 {
font-size: 42.11rpx;
}
}
}
.log_out {
color: #fff;
border-radius: 100px;
text-align: center;
line-height: 84.21rpx;
margin: 0 auto;
margin-top: 84.21rpx;
width: 614.04rpx;
height: 84.21rpx;
background: #3274F9;
box-shadow: 0px 9px 26px 1px #E9EFF5;
}
.log_out {
color: #fff;
border-radius: 100px;
text-align: center;
line-height: 84.21rpx;
margin: 0 auto;
margin-top: 84.21rpx;
width: 614.04rpx;
height: 84.21rpx;
background: #3274F9;
box-shadow: 0px 9px 26px 1px #E9EFF5;
}
</style>

View File

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

View File

@ -1,6 +1,6 @@
<template>
<view class="">
<!-- <view class="tabs">
<view class="">
<!-- <view class="tabs">
<view class="left">
<view class="item" :class="changeType==0?'active':''" @click="changeType=0">合同列表</view>
<view class="item" :class="changeType==1?'active':''" @click="changeType=1">已签订合同</view>
@ -9,259 +9,467 @@
<text>新增</text>
</view>
</view> -->
<view class="contract_list">
<view class="item" v-for="(item,index) in list" :key="item.id">
<view class="top">
<image src="../../static/img/contract/pdf.png" style="height: 140rpx; width: 140rpx;"></image>
<view class="text">
<view class="name">
<view class="title">
<text v-if="item.company">{{item.company.company_name}}</text>
</view>
</view>
<view class="date">
<!-- <text class="time">2023-04-27 2024-04-28 </text> -->
<view class="number">
<view class="num_left">合同编号:</view>
<text>{{item.contract_no}}</text>
</view>
<view class="number">
<view class="num_left">合同类型:</view>
<view>{{item.company.contract_type_name}}</view>
</view>
<view class="time">
<view class="num_left">修改时间:</view>
<view>{{item.update_time}}</view>
</view>
</view>
</view>
</view>
<u-line color="#999999FF"></u-line>
<view class="bottom">
<view class="left" v-if="item.status">已签订</view>
<view class="left yellow" v-else-if="item.check_status>=2">签订中</view>
<view class="left red" v-else>未签订</view>
<button class="right" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同"
icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
<view class="contract_list">
<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">
<image src="../../static/img/contract/pdf.png" style="height: 140rpx; width: 140rpx;"></image>
<view class="text">
<view class="name">
<view class="title">
<text v-if="item.company">{{item.company.company_name}}</text>
</view>
</view>
<view class="date">
<view class="number">
<view class="num_left">合同编号:</view>
<text>{{item.contract_no}}</text>
</view>
<view class="number">
<view class="num_left">合同类型:</view>
<view>{{item.company.contract_type_name}}</view>
</view>
<view class="time">
<view class="num_left">修改时间:</view>
<view>{{item.update_time}}</view>
</view>
</view>
</view>
</view>
<u-line color="#999999FF"></u-line>
<view class="bottom">
<view class="left" v-if="item.status">已签订</view>
<view class="left yellow" v-else-if="item.check_status>=2">签订中</view>
<view class="left red" v-else>未签订</view>
<button class="right"
@click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
</view>
-->
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同"
icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import { contractList } from "@/api/contract.js"
export default {
data() {
return {
changeType: 0,
list: [],
loadConfig: {
page: 1,
limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad() {},
onShow() {
this.initLoadConfig();
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
methods: {
navTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
initLoadConfig() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.initContractList();
uni.stopPullDownRefresh();
},
async initContractList() {
try {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await contractList({
page: this.loadConfig.page,
limit: this.loadConfig.limit
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
} catch (e) {
this.initLoadConfig();
this.loadConfig.status = "nomore"
}
}
},
onPullDownRefresh() {
this.initLoadConfig();
}
}
import {
contractList
} from "@/api/contract.js"
export default {
data() {
return {
changeType: 0,
list: [],
loadConfig: {
page: 1,
limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad() {},
onShow() {
this.initLoadConfig();
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
methods: {
navTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
initLoadConfig() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.initContractList();
uni.stopPullDownRefresh();
},
async initContractList() {
try {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await contractList({
page: this.loadConfig.page,
limit: this.loadConfig.limit
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
} catch (e) {
this.initLoadConfig();
this.loadConfig.status = "nomore"
}
}
},
onPullDownRefresh() {
this.initLoadConfig();
}
}
</script>
<style lang="scss">
.tabs {
height: 112rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 28rpx;
.tabs {
height: 112rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 28rpx;
.left {
display: flex;
.left {
display: flex;
.item {
margin-right: 52.5rpx;
width: 175rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background-color: #F3F4F8FF;
border-radius: 35rpx 35rpx 35rpx 35rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.item {
margin-right: 52.5rpx;
width: 175rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background-color: #F3F4F8FF;
border-radius: 35rpx 35rpx 35rpx 35rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.active {
background-color: #3274F9FF;
color: #FFFFFFFF;
}
}
.active {
background-color: #3274F9FF;
color: #FFFFFFFF;
}
}
.right {
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 0rpx;
}
}
.right {
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 0rpx;
}
}
.contract_list {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 28rpx;
.personnel_list {
padding: 28rpx 0;
margin-bottom: 130rpx;
.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;
.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);
.top {
display: flex;
margin-bottom: 28rpx;
.cards_head {
padding: 28rpx;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
image {
width: 87.6rpx;
height: 87.6rpx;
margin-right: 28rpx;
flex-shrink: 0;
}
.cards_content {
padding: 28rpx;
display: flex;
justify-content: space-between;
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
.name {
.title {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 17.5rpx;
}
}
width: 160rpx;
background-color: $theme-oa-color;
color: white;
border-radius: 40rpx;
.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;
}
}
.cir {
width: 120rpx;
height: 120rpx;
background-color: #ffffff;
margin-left: 25rpx;
border-radius: 120rpx;
position: relative;
}
}
.time {
color: #CCCCCCFF;
margin-right: 10rpx;
}
}
}
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
}
view {
margin-bottom: 10rpx;
.bottom {
display: flex;
justify-content: space-between;
margin-top: 28rpx;
text:nth-child(2) {
margin-left: 20rpx;
}
}
}
}
.left {
font-size: 28rpx;
font-weight: 400;
color: #34A853;
}
.yellow {
color: #F9AA32;
}
.hr {
border-top: 1px dashed #0022C7;
margin-bottom: 30rpx;
}
.red {
color: #F02828FF;
}
.contract_box {
padding: 0 28rpx 20rpx;
display: flex;
justify-content: space-between;
.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;
}
}
}
.left {
display: flex;
}
.contract_img {
width: 102rpx;
height: 102rpx;
background: #F5F5F5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
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>

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff