This commit is contained in:
weipengfei 2023-08-18 16:10:32 +08:00
commit afabc19f0f
17 changed files with 7077 additions and 3043 deletions

24
App.vue
View File

@ -1,9 +1,9 @@
<script> <script>
// var jpushModule = uni.requireNativePlugin("JG-JPush"); // var jpushModule = uni.requireNativePlugin("JG-JPush");
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
export default { export default {
onLaunch: function () { onLaunch: function() {
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({
@ -26,21 +26,21 @@ export default {
// ida.push(result.messageID) // ida.push(result.messageID)
// }) // })
}, },
onShow: function () { onShow: function() {
console.log('App Show') console.log('App Show')
}, },
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,8 +1,15 @@
<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
<block v-if="!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="title">公司基本信息</view>
<view class="card"> <view class="card">
<view class="top"> <view class="top">
@ -11,42 +18,96 @@
<view class="text"> <view class="text">
<view class="name">{{company.company_name}}</view> <view class="name">{{company.company_name}}</view>
<view class="right">{{company.company_type_name||company.company_type}}</view> <view class="right">{{company.company_type_name||company.company_type}}</view>
<view class="code">社会代码<text @click="copyPhone(company.master_email, '社会代码')">{{company.organization_code}}</text></view> <view class="code">社会代码<text
@click="copyPhone(company.master_email, '社会代码')">{{company.organization_code}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="left"> <view class="left">
<uni-icons type="location" color="#666666" size="14"></uni-icons> <uni-icons type="location" color="#666666" size="14"></uni-icons>
<view class="location">负责区域</view> <view class="location">区域</view>
</view> </view>
<view style="flex: 1;">{{c_address}}</view> <view style="flex: 1;">{{c_address}}</view>
</view> </view>
</view> </view>
</block> </block>
-->
<view class="personnel_list" v-if="!skeleton">
<view class="cards">
<view class="cards_head">
<text style="font-size: 32rpx">公司基本信息</text>
</view> </view>
<view class="item" v-show="skeleton||contract.status"> <view class="cards_content">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton> <view class="right">
<view class="">
<text>公司名称 :</text>
<text> {{ company.company_name }}</text>
</view>
<view
class=""
@click="copyPhone(company.master_email, '社会代码')"
>
<text>社会代码 :</text>
<text>{{ company.organization_code }}</text>
</view>
<view class="">
<text>公司类型 :</text>
<text>{{
company.company_type_name || company.company_type
}}</text>
</view>
<view class="">
<text>负责区域 :</text>
<text> {{ c_address }} </text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="item" v-show="skeleton || contract.status">
<u-skeleton
:loading="skeleton"
:animate="true"
title
rows="2"
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">
<view class="one"> <view class="one">
<view class="info"> <view class="info">
<view class="info_item">甲方{{contract.party_a_name}}</view> <view class="info_item">甲方{{ contract.party_a_name }}</view>
<view class="info_item">乙方{{contract.party_b_name}}</view> <view class="info_item">乙方{{ contract.party_b_name }}</view>
<view class="info_item">合同类型{{contract.contract_type_name}}</view> <view class="info_item"
<view class="info_item">合同编号{{contract.contract_no}}</view> >合同类型{{ contract.contract_type_name }}</view
>
<view class="info_item"
>合同编号{{ contract.contract_no }}</view
>
</view> </view>
</view> </view>
<u-line v-if="contract.contract_no" color="#999999FF" style="margin: 31rpx 0;"></u-line> <u-line
v-if="contract.contract_no"
color="#999999FF"
style="margin: 31rpx 0"
></u-line>
<view class="contract" v-if="contract.contract_no"> <view class="contract" v-if="contract.contract_no">
<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">合同</view> <view class="name">合同</view>
<view> <view>
<!-- <text class="nickname">张郭郭</text> --> <!-- <text class="nickname">张郭郭</text> -->
<text>{{contract.create_time}}</text> <text>{{ contract.create_time }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -60,7 +121,14 @@
</block> </block>
</view> </view>
<view class="item"> <view class="item">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton> <u-skeleton
:loading="skeleton"
:animate="true"
title
rows="2"
rows-width="100%"
rowsHeight="56"
></u-skeleton>
<block v-if="!skeleton"> <block v-if="!skeleton">
<view class="title"> <view class="title">
<text>联系人管理</text> <text>联系人管理</text>
@ -69,56 +137,111 @@
<view class="card"> <view class="card">
<view class="one"> <view class="one">
<view class="linkman"> <view class="linkman">
<view style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 8rpx;margin-right: 8rpx;"> <view
style="
height: 30rpx;
width: 6rpx;
background-color: #3175f9;
border-radius: 8rpx;
margin-right: 8rpx;
"
>
</view> </view>
主要联系人 主要联系人
</view> </view>
<view class="info"> <view class="info">
<view class="info_item">姓名{{company.master_name}}</view> <view class="info_item">姓名{{ company.master_name }}</view>
<view class="info_item">职位{{company.master_position}}</view> <view class="info_item">职位{{ company.master_position }}</view>
<view class="info_item" @click="copyPhone(company.master_phone)">联系电话{{company.master_phone}}</view> <view class="info_item" @click="copyPhone(company.master_phone)">
<view class="info_item" @click="copyPhone(company.master_email, '邮箱')">邮箱{{company.master_email}}</view> 联系电话{{ company.master_phone }}</view
>
<view
class="info_item"
@click="copyPhone(company.master_email, '邮箱')"
>
邮箱{{ company.master_email }}</view
>
</view> </view>
</view> </view>
<view class="one" v-for="(other, index) in company.other_contacts" v-if="other.name!=''" :key="index"> <view
class="one"
v-for="(other, index) in company.other_contacts"
v-if="other.name != ''"
:key="index"
>
<view class="linkman"> <view class="linkman">
<view <view
style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 8rpx;margin-right: 8rpx;"> style="
height: 30rpx;
width: 6rpx;
background-color: #3175f9;
border-radius: 8rpx;
margin-right: 8rpx;
"
>
</view> </view>
其他联系人 其他联系人
</view> </view>
<view class="info"> <view class="info">
<view class="info_item">姓名{{other.name}}</view> <view class="info_item">姓名{{ other.name }}</view>
<view class="info_item">职位{{other.position}}</view> <view class="info_item">职位{{ other.position }}</view>
<view class="info_item" @click="copyPhone(other.phone)">联系电话{{other.phone}}</view> <view class="info_item" @click="copyPhone(other.phone)"
<view class="info_item" @click="copyPhone(other.email, '邮箱')">邮箱{{other.email}}</view> >联系电话{{ other.phone }}</view
>
<view class="info_item" @click="copyPhone(other.email, '邮箱')"
>邮箱{{ other.email }}</view
>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<view class="item"> <view class="item">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton> <u-skeleton
:loading="skeleton"
:animate="true"
title
rows="2"
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="image_box" style="background-color: #fff;border-radius: 7px 7px 7px 7px;"> <view
<u--image class="image" @click="priview(company.qualification.business_license)" class="image_box"
:src="company.qualification.business_license" v-if="company.qualification.business_license" style="background-color: #fff; border-radius: 7px 7px 7px 7px"
:lazy-load="true"> >
<u--image
class="image"
@click="priview(company.qualification.business_license)"
:src="company.qualification.business_license"
v-if="company.qualification.business_license"
:lazy-load="true"
>
<template v-slot:loading> <template v-slot:loading>
<u-loading-icon color="#333"></u-loading-icon> <u-loading-icon color="#333"></u-loading-icon>
</template> </template>
</u--image> </u--image>
<u--image class="image" @click="priview(company.qualification.business_licenseB)" <u--image
:src="company.qualification.business_licenseB" v-if="company.qualification.business_licenseB" class="image"
:lazy-load="true"> @click="priview(company.qualification.business_licenseB)"
:src="company.qualification.business_licenseB"
v-if="company.qualification.business_licenseB"
:lazy-load="true"
>
<template v-slot:loading> <template v-slot:loading>
<u-loading-icon color="#333"></u-loading-icon> <u-loading-icon color="#333"></u-loading-icon>
</template> </template>
</u--image> </u--image>
<u--image class="image" v-for="item in company.qualification.other_qualifications" :key="item" @click="priview(item)" <u--image
:src="item" v-if="company.qualification.other_qualifications" :lazy-load="true"> class="image"
v-for="item in company.qualification.other_qualifications"
:key="item"
@click="priview(item)"
:src="item"
v-if="company.qualification.other_qualifications"
:lazy-load="true"
>
<template v-slot:loading> <template v-slot:loading>
<u-loading-icon color="#333"></u-loading-icon> <u-loading-icon color="#333"></u-loading-icon>
</template> </template>
@ -142,14 +265,22 @@
</template> </template>
<script> <script>
import { contractView } from "@/api/contract.js" import {
import { companyView } from "@/api/company.js" contractView
import { download_file } from "@/api/junziqian.js" } from "@/api/contract.js"
import { Toast } from '@/libs/uniApi.js' import {
companyView
} from "@/api/company.js"
import {
download_file
} from "@/api/junziqian.js"
import {
Toast
} from '@/libs/uniApi.js'
export default { export default {
name: "company", name: "company",
data() { data () {
return { return {
skeleton: true, skeleton: true,
company: { company: {
@ -166,29 +297,31 @@
} }
}, },
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;
this.company?.city_name?str+=this.company?.city_name:null; this.company?.city_name ? str += this.company?.city_name : null;
this.company?.area_name?str+=this.company?.area_name:null; this.company?.area_name ? str += this.company?.area_name : null;
this.company?.street_name?str+=this.company?.street_name:null; this.company?.street_name ? str += this.company?.street_name : null;
}else { } else {
this.company?.street_name?str+=this.company?.street_name:null; this.company?.street_name ? str += this.company?.street_name : null;
this.company?.village_name?str+=this.company?.village_name:null; this.company?.village_name ? str += this.company?.village_name : null;
this.company?.brigade_name?str+=this.company?.brigade_name:null; this.company?.brigade_name ? str += this.company?.brigade_name : null;
} }
return str; return str;
} }
}, },
methods: { methods: {
navTo(contract_no) { navTo (contract_no) {
download_file({ applyNo: contract_no }).then(res => { download_file({
applyNo: contract_no
}).then(res => {
if (res.code != 1) { if (res.code != 1) {
Toast(res.msg) Toast(res.msg)
} }
@ -197,17 +330,21 @@
}) })
}) })
}, },
naviBack() { naviBack () {
uni.navigateBack() uni.navigateBack()
}, },
async initContract(id, type = "contract") { async initContract (id, type = "contract") {
let res; let res;
// //
if (id && (type == "contract" || type == null)) { if (id && (type == "contract" || type == null)) {
res = await contractView({ id }); res = await contractView({
id
});
} else { } else {
if (id > 0) { if (id > 0) {
res = await companyView({ id }); res = await companyView({
id
});
} else { } else {
res = await companyView(); res = await companyView();
} }
@ -221,22 +358,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'
@ -248,7 +385,7 @@
} }
}) })
}, },
copyPhone(str = "", type = "号码") { copyPhone (str = "", type = "号码") {
if (str) uni.setClipboardData({ if (str) uni.setClipboardData({
data: str + "", data: str + "",
success: (e) => { success: (e) => {
@ -260,14 +397,86 @@
}) })
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item { .personnel_list {
padding: 28rpx 0;
margin-bottom: 130rpx;
.cards {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
background: #ffffff;
border-radius: 30rpx;
opacity: 1;
overflow: hidden;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.cards_head {
padding: 28rpx;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.cards_content {
padding: 28rpx;
display: flex;
justify-content: space-between;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
width: 160rpx;
background-color: $theme-oa-color;
color: white;
border-radius: 40rpx;
.cir {
width: 120rpx;
height: 120rpx;
background-color: #ffffff;
margin-left: 25rpx;
border-radius: 120rpx;
position: relative;
}
}
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
view {
text:nth-child(2) {
margin-left: 20rpx;
}
}
}
}
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
.item {
padding: 32rpx 28rpx; padding: 32rpx 28rpx;
padding-top: 0; padding-top: 0;
&:nth-child(1){
&:nth-child(1) {
padding-top: 32rpx; padding-top: 32rpx;
} }
@ -284,7 +493,7 @@
width: 694rpx; width: 694rpx;
// height: 231rpx; // height: 231rpx;
padding: 28rpx; padding: 28rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -303,7 +512,7 @@
width: 142rpx; width: 142rpx;
height: 142rpx; height: 142rpx;
margin-right: 28rpx; margin-right: 28rpx;
background: #CCCCCC; background: #cccccc;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
} }
@ -337,7 +546,7 @@
.bottom { .bottom {
display: flex; display: flex;
align-items: center; align-items: center;
color: #666666FF; color: #666666ff;
margin-top: 32rpx; margin-top: 32rpx;
.left { .left {
@ -350,14 +559,15 @@
margin-right: 5rpx; margin-right: 5rpx;
} }
} }
} }
.one { .one {
margin-top: 32rpx; margin-top: 32rpx;
&:nth-child(1){
&:nth-child(1) {
margin-top: 0; margin-top: 0;
} }
.linkman { .linkman {
// height: 44rpx; // height: 44rpx;
font-size: 32rpx; font-size: 32rpx;
@ -386,7 +596,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;
} }
@ -398,7 +608,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;
@ -432,7 +641,7 @@
height: 39rpx; height: 39rpx;
background-color: $theme-oa-color; background-color: $theme-oa-color;
opacity: 1; opacity: 1;
margin-right: 10rpx margin-right: 10rpx;
} }
} }
} }
@ -457,9 +666,9 @@
} }
} }
} }
} }
.back_btn { .back_btn {
width: 694rpx; width: 694rpx;
height: 84rpx; height: 84rpx;
background: $theme-oa-color; background: $theme-oa-color;
@ -469,9 +678,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;
@ -481,5 +690,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

@ -7,6 +7,7 @@ import uView from '@/uni_modules/uview-ui'
import taskCard from "@/components/taskCard/taskCard.vue" import taskCard from "@/components/taskCard/taskCard.vue"
import mybtn from "@/components/mybtn/mybtn.vue" import mybtn from "@/components/mybtn/mybtn.vue"
import company from "@/components/company/company.vue" import company from "@/components/company/company.vue"
Vue.use(uView) Vue.use(uView)
Vue.use(taskCard) Vue.use(taskCard)
Vue.use(mybtn) Vue.use(mybtn)
@ -26,7 +27,9 @@ app.$mount()
// #endif // #endif
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import {
createSSRApp
} from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
return { return {

3158
package-lock.json generated

File diff suppressed because it is too large Load Diff

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"devDependencies": {
"node-sass": "^9.0.0",
"sass-loader": "^13.3.2"
}
}

View File

@ -26,7 +26,7 @@
"style": { "style": {
"navigationBarTitleText": "商机信息", "navigationBarTitleText": "商机信息",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -35,7 +35,7 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
@ -44,7 +44,7 @@
"style": { "style": {
"navigationBarTitleText": "审批", "navigationBarTitleText": "审批",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
@ -53,7 +53,7 @@
"style": { "style": {
"navigationBarTitleText": "今日任务", "navigationBarTitleText": "今日任务",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
@ -69,7 +69,7 @@
"path": "pages/oaManager/oaManager", "path": "pages/oaManager/oaManager",
"style": { "style": {
"navigationBarTitleText": "片区经理", "navigationBarTitleText": "片区经理",
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -78,7 +78,7 @@
"style": { "style": {
"navigationBarTitleText": "公告详情", "navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -123,7 +123,7 @@
"style": { "style": {
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -178,7 +178,7 @@
"style": { "style": {
"navigationBarTitleText": "公司公示文档", "navigationBarTitleText": "公司公示文档",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -187,7 +187,7 @@
"style": { "style": {
"navigationBarTitleText": "请假申请", "navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -201,7 +201,7 @@
"style": { "style": {
"navigationBarTitleText": "人员管理", "navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -210,7 +210,7 @@
"style": { "style": {
"navigationBarTitleText": "财务管理", "navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -219,7 +219,7 @@
"style": { "style": {
"navigationBarTitleText": "账户充值", "navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
@ -238,7 +238,7 @@
"style": { "style": {
"navigationBarTitleText": "合同管理", "navigationBarTitleText": "合同管理",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -247,7 +247,7 @@
"style": { "style": {
"navigationBarTitleText": "合同详情", "navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -256,7 +256,7 @@
"style": { "style": {
"navigationBarTitleText": "合同内容", "navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -265,7 +265,7 @@
"style": { "style": {
"navigationBarTitleText": "公司信息", "navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -274,7 +274,7 @@
"style": { "style": {
"navigationBarTitleText": "签约公司详情", "navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -283,7 +283,7 @@
"style": { "style": {
"navigationBarTitleText": "人员详细信息", "navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -292,7 +292,7 @@
"style": { "style": {
"navigationBarTitleText": "流水详情", "navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -301,7 +301,7 @@
"style": { "style": {
"navigationBarTitleText": "提现余额", "navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
@ -319,7 +319,7 @@
"style": { "style": {
"navigationBarTitleText": "提现记录", "navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -328,7 +328,7 @@
"style": { "style": {
"navigationBarTitleText": "公告列表", "navigationBarTitleText": "公告列表",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -337,7 +337,7 @@
"style": { "style": {
"navigationBarTitleText": "充值记录", "navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -346,7 +346,7 @@
"style": { "style": {
"navigationBarTitleText": "公司管理", "navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -355,7 +355,7 @@
"style": { "style": {
"navigationBarTitleText": "新增人员", "navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -364,7 +364,7 @@
"style": { "style": {
"navigationBarTitleText": "档案管理", "navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -373,7 +373,7 @@
"style": { "style": {
"navigationBarTitleText": "信息登记", "navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -382,7 +382,7 @@
"style": { "style": {
"navigationBarTitleText": "信息更新", "navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -391,7 +391,7 @@
"style": { "style": {
"navigationBarTitleText": "固定资产", "navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -400,7 +400,7 @@
"style": { "style": {
"navigationBarTitleText": "任务管理", "navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -409,7 +409,7 @@
"style": { "style": {
"navigationBarTitleText": "档案详情", "navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -418,7 +418,7 @@
"style": { "style": {
"navigationBarTitleText": "队长列表", "navigationBarTitleText": "队长列表",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -427,7 +427,7 @@
"style": { "style": {
"navigationBarTitleText": "公司财务", "navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -436,7 +436,7 @@
"style": { "style": {
"navigationBarTitleText": "未签约公司列表", "navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -445,7 +445,7 @@
"style": { "style": {
"navigationBarTitleText": "提交审核", "navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -454,7 +454,7 @@
"style": { "style": {
"navigationBarTitleText": "任务:宣传配送", "navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -463,7 +463,7 @@
"style": { "style": {
"navigationBarTitleText": "任务:片区交易", "navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -472,7 +472,7 @@
"style": { "style": {
"navigationBarTitleText": "已更新商机", "navigationBarTitleText": "已更新商机",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -486,7 +486,7 @@
}, },
"tabBar": { "tabBar": {
"color": "#282828", "color": "#282828",
"selectedColor": "#3175f9", "selectedColor": "#0122C7",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [{

View File

@ -1,72 +1,76 @@
<template> <template>
<view> <view>
<u-sticky bgColor="#0122C7" style="width: 100vw"> <!-- <globalPopup ref="globalPopup"></globalPopup> -->
<u-tabs <u-sticky bgColor="#0122C7" style="width: 100vw;">
:list="tabLists" <u-tabs :list="tabLists" @change="sectionChange" lineColor='#fff' :scrollable="false" lineWidth='40'
@change="sectionChange" inactiveStyle='color:#fff' activeStyle="color:#fff"></u-tabs>
lineColor="#fff"
:scrollable="false"
lineWidth="40"
inactiveStyle="color:#fff"
activeStyle="color:#fff"
></u-tabs>
</u-sticky> </u-sticky>
<view class="content"> <view class="content">
<u-search <u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='white'
placeholder="搜索你的订单" v-model="keywords"></u-search>
@search="getOrderList"
:show-action="false"
bg-color="white"
v-model="keywords"
></u-search>
<view v-if="!orderlist.length"> <view v-if="!orderlist.length">
<u-empty mode="data" icon="../../static/img/empty/data.png"> </u-empty> <u-empty mode="data" icon="../../static/img/empty/data.png">
</u-empty>
</view> </view>
<view v-else> <view v-else>
<logistiCard <logistiCard ref="logistiCards" v-for='(item,index) in orderlist' @getlist="getOrderList"
ref="logistiCards" @showTost='showToast' @showToast2="showToast2" :goodsInfo="item" :key="index">
v-for="(item, index) in orderlist"
@getlist="getOrderList"
@showTost="showToast"
@showToast2="showToast2"
:goodsInfo="item"
:key="index"
>
</logistiCard> </logistiCard>
</view> </view>
<!-- --> <!-- -->
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getList getList
} from "@/api/logistics.js" } from "@/api/logistics.js"
import { // import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
import {
informationAdd informationAdd
} from "@/api/logistics.js" } from "@/api/logistics.js"
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue" import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
export default { //#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
components: { components: {
logistiCard logistiCard,
// globalPopup
}, },
data () { data() {
return { return {
notArr: [],
keywords: "", keywords: "",
list: ['待取货', '已取货', '已送达'], tabLists: [{
name: '待配送',
}, {
name: '待送达'
}, {
name: '已送达'
}],
curNow: 0, curNow: 0,
orderlist: [] orderlist: []
} }
}, },
methods: { methods: {
sectionChange (index) { go() {
this.curNow = index; uni.navigateTo({
url: "/pages/logistics/te"
})
},
sectionChange(index) {
this.curNow = index.index;
this.getOrderList() this.getOrderList()
}, },
showToast () { showToast() {
// 6 // 6
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'success', type: 'success',
@ -75,16 +79,16 @@ export default {
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png' iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
}) })
}, },
showToast2 () { showToast2() {
// 6 // 6
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'error', type: 'error',
message: "取件码不能为空", message: "取件码不能为空",
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png' iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
},) }, )
}, },
getOrderList () { getOrderList() {
console.log("列表更新") console.log("列表更新")
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
getList({ getList({
@ -98,17 +102,31 @@ export default {
} }
}, },
onLoad () { }, onLoad() {
onShow () { let that = this
//#ifdef APP-PLUS
jpushModule.addNotificationListener(function(result) {
if (!that.notArr.includes(result.messageID)) {
that.$refs.globalPopup.showPopu();
that.getOrderList()
}
that.notArr.push(result.messageID)
})
// #endif
},
onShow() {
this.getOrderList() this.getOrderList()
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.content { .content {
background-color: #f5f5f5; margin-top: 2vh;
padding: 1vh 2vw; background-color: #F5F5F5;
} padding: 0vh 2vw;
}
</style> </style>

View File

@ -1,3 +1,5 @@
<!-- -->
<template> <template>
<view> <view>
<button @click="test2">按钮</button> <button @click="test2">按钮</button>

View File

@ -2,23 +2,19 @@
<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>
<!-- #endif --> <!-- #endif -->
<view class="my_info flex_a_c"> <view class="my_info ">
<view class=""> <view class="head_img">
<u--image <u--image :showLoading="true" style="translate:0 -10rpx ;"
:showLoading="true" :src="myOaInfo.avatar || '../../static/img/public/avatar.png'" width="150.28rpx"
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'" height="150.28rpx" shape="circle"></u--image>
width="130.28rpx"
height="130.28rpx" <text class="nickname">工作证: {{ myOaInfo.nickname }}</text>
shape="circle" <text>身份: {{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text>
></u--image>
</view> </view>
<view v-if="!$store.state.app.token" @click="login" class="mesg_box"> <view v-if="!$store.state.app.token" @click="login" class="mesg_box">
<view class="name"> <view class="name">
@ -26,24 +22,22 @@
</view> </view>
<view class="duty"> 登录后可查看更多 </view> <view class="duty"> 登录后可查看更多 </view>
</view> </view>
<view v-else class="mesg_box"> <!-- <view v-else class="mesg_box">
<view class="name"> <view class="name">
<text class="nickname">姓名:{{ myOaInfo.nickname }}</text> <text class="nickname">姓名:{{ myOaInfo.nickname }}</text>
<text>{{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text> <text>{{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text>
</view> </view>
<view class="duty"> <view class="duty">
<!-- ({{ myOaInfo.did_name }}){{myOaInfo.label_name}} -->
电话:{{ myOaInfo.account }}<br /> 电话:{{ myOaInfo.account }}<br />
公司:<text v-if="myOaInfo.company">{{ 公司:<text v-if="myOaInfo.company">{{
myOaInfo.company.company_name myOaInfo.company.company_name
}}</text }}</text><br />
><br />
公司类型:<text v-if="myOaInfo.company">{{ 公司类型:<text v-if="myOaInfo.company">{{
myOaInfo.company.company_type_name myOaInfo.company.company_type_name
}}</text }}</text><br />
><br />
</view>
</view> </view>
</view> -->
</view> </view>
<!-- 占位 --> <!-- 占位 -->
@ -58,50 +52,49 @@
</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
class="backlog_item flex_a_c_j_sb" <view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
v-for="(item, index) in ApproveList.slice(0, 2)" :key="index" @click="clickNotice(item.id)">
:key="index"
@click="clickNotice(item.id)" <view class="text"> <text class="text_time">{{item.create_time.substring(0, 10)}}</text>
> {{ item.title }}
<view class="text">{{ item.title }}</view> </view>
<i class="iconfont icon-you"
><uni-icons type="forward"></uni-icons <i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
></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 </view>
></i> </view>
</view>
<view class="my_task">
<view class="task_title flex_a_c_j_sb">
<view class="title">工作管理</view>
<view class="flex_a_c">更多
<view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons>
</view>
</view> </view>
</view> </view>
</view> </view>
<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>
@ -110,8 +103,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>
@ -122,19 +114,13 @@
<taskCard></taskCard> <taskCard></taskCard>
</block> --> </block> -->
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<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>
@ -173,33 +159,33 @@
</template> </template>
<script> <script>
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue" import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"
import { import {
getList getList
} from "@/api/logistics.js" } from "@/api/logistics.js"
import { import {
Toast Toast
} from '@/libs/uniApi.js' } from '@/libs/uniApi.js'
import { import {
oaHomeData oaHomeData
} from '@/static/server/server.js' } from '@/static/server/server.js'
import { import {
noticeList noticeList
} from "@/api/notice.js" } from "@/api/notice.js"
// import tabbar from '../components/tabbar' // import tabbar from '../components/tabbar'
import { import {
getIndexListAPI, getIndexListAPI,
getTaskListAPI, getTaskListAPI,
getMyTaskListAPI, getMyTaskListAPI,
getApproveListAPI, getApproveListAPI,
getUserIndexAPI getUserIndexAPI
} from '@/api/oaApi.js' } from '@/api/oaApi.js'
export default { export default {
components: { components: {
// tabbar // tabbar
logistiBriefCard logistiBriefCard
}, },
data () { data() {
return { return {
orderList: [], orderList: [],
oaHomeData: [], oaHomeData: [],
@ -237,14 +223,14 @@ export default {
ApproveList: [] ApproveList: []
} }
}, },
onReady () { onReady() {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#ffffff', frontColor: '#ffffff',
backgroundColor: '#3175f9' backgroundColor: '#3175f9'
}) })
}, },
onLoad () { }, onLoad() {},
onShow () { onShow() {
// this.getUserIndex() // this.getUserIndex()
// this.getIndexList() // this.getIndexList()
this.getApproveList() this.getApproveList()
@ -267,7 +253,7 @@ export default {
// } // }
// }) // })
// }, // },
async getOrderList () { async getOrderList() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id || "" let id = JSON.parse(uni.getStorageSync('USER_INFO')).id || ""
let res = await getList({ let res = await getList({
courier_id: id courier_id: id
@ -276,16 +262,16 @@ export default {
this.orderList = res.data.data this.orderList = res.data.data
}, },
goOrderList () { goOrderList() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/logistics/index" url: "/pages/logistics/index"
}) })
}, },
initUserInfo () { initUserInfo() {
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar = this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar =
''; '';
}, },
initOaHomeDada () { initOaHomeDada() {
if (this.$store.state.app.userInfo.admin_id == 0) { // if (this.$store.state.app.userInfo.admin_id == 0) { //
let arr = oaHomeData.filter(item => !item.admin); // let arr = oaHomeData.filter(item => !item.admin); //
this.oaHomeData = arr; this.oaHomeData = arr;
@ -306,7 +292,7 @@ export default {
this.oaHomeData.splice(this.oaHomeData.length - 1, 1) this.oaHomeData.splice(this.oaHomeData.length - 1, 1)
} }
}, },
async getApproveList () { async getApproveList() {
const res = await noticeList({ const res = await noticeList({
keyword: '', keyword: '',
page_no: 1, page_no: 1,
@ -314,7 +300,7 @@ export default {
}) })
this.ApproveList = res.data.lists this.ApproveList = res.data.lists
}, },
async getIndexList () { async getIndexList() {
const { const {
project, project,
task task
@ -330,30 +316,30 @@ export default {
this.assessData[7].num = task.count_lv + '%' this.assessData[7].num = task.count_lv + '%'
this.myTaskList = task.list this.myTaskList = task.list
}, },
async getMyTask () { async getMyTask() {
let data = { let data = {
page: this.page, page: this.page,
limit: 10 limit: 10
} }
const res = getMyTaskListAPI(data) const res = getMyTaskListAPI(data)
}, },
naviTaskDetails (id) { naviTaskDetails(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/views/task_details?id=${id}` url: `/pages/views/task_details?id=${id}`
}) })
}, },
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;
var arr = [3, 6]; var arr = [3, 6];
@ -366,13 +352,13 @@ export default {
this.navTo(url); this.navTo(url);
}, },
// //
clickNotice (e) { clickNotice(e) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/oaNews/oaNews?id=${e}` url: `/pages/oaNews/oaNews?id=${e}`
}) })
}, },
// , // ,
showToask () { showToask() {
if (!this.$store.state.app.token) { if (!this.$store.state.app.token) {
this.assessData = this.assessData.map(item => { this.assessData = this.assessData.map(item => {
item.num = '*'; item.num = '*';
@ -386,35 +372,35 @@ export default {
}) })
} }
}, },
login () { login() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/oaLogin/oaLogin' url: '/pages/oaLogin/oaLogin'
}) })
}, },
async getUserIndex () { async getUserIndex() {
const res = await getUserIndexAPI() const res = await getUserIndexAPI()
this.myOaInfo = res this.myOaInfo = res
} }
}, },
onPullDownRefresh () { onPullDownRefresh() {
// 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;
@ -422,9 +408,22 @@ export default {
width: 100%; width: 100%;
// background-color: $theme-oa-color; // background-color: $theme-oa-color;
margin-bottom: 133.33rpx; margin-bottom: 133.33rpx;
background-image: url("../../static/img/home/home_bg.png"); background-color: $theme-oa-color;
background-repeat: no-repeat; border-radius: 0 0 30rpx 30rpx;
background-size: 100% 100%;
.head_img {
background-color: #FF7C32;
width: 100%;
border-radius: 70rpx 50rpx 50rpx 70rpx;
height: 130.28rpx;
display: flex;
justify-content: space-between;
padding-right: 50rpx;
line-height: 130rpx;
color: white;
font-size: 30rpx;
// font-we
}
.my_info { .my_info {
.mesg_box { .mesg_box {
@ -496,17 +495,26 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */ /* 使用省略号代表被截断的文本 */
width: 580rpx; width: 580rpx;
/* 设置元素宽度,根据需要进行调整 */
&::before { /* 设置元素宽度,根据需要进行调整 */
content: "公告"; .text_time {
display: inline-block; display: inline-block;
color: #ff8c1a; background-color: #ff8c1a;
padding: 2px 8px; color: white;
border-radius: 4px; padding: 5rpx 10rpx;
border: 1px solid #ff8c1a; margin-right: 10rpx;
margin-right: 14.04rpx; border-radius: 15rpx;
} }
// &::before {
// content: "";
// display: inline-block;
// color: #ff8c1a;
// padding: 2px 8px;
// border-radius: 4px;
// border: 1px solid #ff8c1a;
// margin-right: 14.04rpx;
// }
} }
} }
@ -535,13 +543,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;
@ -565,9 +573,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;
@ -680,9 +688,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;
@ -720,5 +728,5 @@ export default {
align-items: center; align-items: center;
} }
} }
} }
</style> </style>

1
static/css/global.scss Normal file
View File

@ -0,0 +1 @@
$base-color: #0122c7;

View File

@ -1,6 +1,6 @@
<template> <template>
<view class=""> <view class="">
<view class="personnel_list"> <!-- <view class="personnel_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="top"> <view class="top">
<image class="avatar" src="../../static/img/public/record.png"></image> <image class="avatar" src="../../static/img/public/record.png"></image>
@ -16,7 +16,8 @@
<view class="bottom"> <view class="bottom">
<view>更新时间: {{item.update_time}}</view> <view>更新时间: {{item.update_time}}</view>
<view class="right" v-if="showView"> <view class="right" v-if="showView">
<view class="update" @click="navTo(`/subpkg/updateArchives/updateArchives?id=${item.id}&task_id=${task_id}`)"> <view class="update"
@click="navTo(`/subpkg/updateArchives/updateArchives?id=${item.id}&task_id=${task_id}`)">
更新 更新
</view> </view>
<view class="look" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)"> <view class="look" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">
@ -30,6 +31,96 @@
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view> </view>
-->
<view class="personnel_list">
<view class="card" v-for="(item, index) in list" :key="item.id">
<view class="card_head">
<text style="font-size: 32rpx">最后更新: {{item.update_time.substring(0, 10)}}</text>
<text v-if="showView"
@click="navTo(`/subpkg/updateArchives/updateArchives?id=${item.id}&task_id=${task_id}`)">更新档案</text>
<text v-if="showView"
@click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">查看档案</text>
</view>
<view class="card_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.village_name||'')+(item.brigade_name||'')}}</text>
</view>
</view>
<view class="left">
<view class="cir">
<u--image class="u_avatar" :showLoading="true" :src=" '../../static/img/public/man.png'"
width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
</view>
</view>
</view>
</view>
<!-- <block v-for="(item, index) in list" :key="item.id">
<view class="personnel_item" @click="navTo('/subpkg/archives/archives?id='+item.id)">
<view class="type" :class="item.is_contract?'type_blue':''">
<image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image>
<image v-else src="../../static/icons/err_w.png"></image>
</view>
<view class="top" style="margin-bottom: 28rpx;">
<view class="left">
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'"
width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
</view>
<view class="right">
<view class="info_top">
<view class="info_name">{{item.nickname}}</view>
<text class="phone">电话:</text>
<text class="tel">{{item.phone||item.account}}</text>
</view>
<view class="info_bottom">
<text class="item phone">
分管片区:
</text>
<view class="item">
<view class="location">
<text>{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}</text>
</view>
</view>
</view>
<view class="info_bottom">
<text class="item phone">
所属公司:
</text>
<view class="item" v-if="item.company">
<view class="location">
{{item.company.company_name}}
</view>
</view>
</view>
</view>
</view>
<u-line color="#999999FF"></u-line>
<view class="bottom" style="margin-top: 28rpx;float: right;">
<view class="look">{{'管理户数: '+item.informationg_count+" 户"}}</view>
</view>
</view>
</block> -->
<u-empty v-if="loadConfig.status == 'nomore' && list.length == 0"
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>
<mybtn text="信息登记" v-if="showView" @click="navTo('/subpkg/newArchives/newArchives')"></mybtn> <mybtn text="信息登记" v-if="showView" @click="navTo('/subpkg/newArchives/newArchives')"></mybtn>
</view> </view>
</template> </template>
@ -66,11 +157,11 @@
if (options.id) this.user_id = options.id; if (options.id) this.user_id = options.id;
else if (this.$store.state.app.userInfo.admin_id == 0) { //,id else if (this.$store.state.app.userInfo.admin_id == 0) { //,id
this.user_id = this.$store.state.app.userInfo.id; this.user_id = this.$store.state.app.userInfo.id;
}else { // } else { //
this.is_admin = true; this.is_admin = true;
} }
// //
if(options.task_id) { if (options.task_id) {
this.task_id = options.task_id; this.task_id = options.task_id;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '任务:信息更新' title: '任务:信息更新'
@ -110,7 +201,7 @@
this.loadConfig.page = 1; this.loadConfig.page = 1;
this.loadConfig.status = "loadmore"; this.loadConfig.status = "loadmore";
this.list = []; this.list = [];
this.is_admin?null:await this.loadInformationList(); this.is_admin ? null : await this.loadInformationList();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
async loadInformationList() { async loadInformationList() {
@ -118,7 +209,7 @@
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.is_admin) res = await taskInformationgist({ if (this.is_admin) res = await taskInformationgist({
id: this.task_id id: this.task_id
}); });
else res = await informationList({ else res = await informationList({
@ -162,72 +253,211 @@
padding: 28rpx 0; padding: 28rpx 0;
margin-bottom: 130rpx; margin-bottom: 130rpx;
.item { .card {
margin: 0 auto; margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
// height: 201rpx; background: #ffffff;
background: #FFFFFF; border-radius: 30rpx;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
margin-bottom: 21rpx; overflow: hidden;
box-sizing: border-box; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.card_head {
padding: 28rpx; padding: 28rpx;
font-size: 24.53rpx; background-color: $theme-oa-color;
color: #999999FF; color: white;
height: 100rpx;
.top {
display: flex;
align-items: center;
width: 100%;
.avatar {
width: 120rpx;
height: 120rpx;
margin-right: 18rpx;
margin-bottom: 12rpx;
}
.body {
flex: 1;
font-size: 28rpx;
color: #333;
font-weight: bold;
.name {
font-size: 28rpx;
color: #333;
font-weight: 500;
display: inline-block;
margin-left: 18rpx;
}
}
}
.bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; }
margin-top: 20rpx;
font-size: 25rpx; .card_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 { .right {
font-size: 28rpx;
display: flex; display: flex;
flex-direction: column;
justify-content: space-between;
.look { view {
color: $theme-oa-color; text:nth-child(2) {
margin-left: 20rpx;
}
} }
.update {
color: #34A853;
margin-right: 38rpx;
} }
} }
// .top {
// display: flex;
// justify-content: left;
// // align-items: center;
// .avatar {
// width: 88rpx;
// height: 88rpx;
// border-radius: 50%;
// margin-right: 18rpx;
// }
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
// .text {
// display: flex;
// justify-content: space-around;
// flex-direction: column;
// .name {
// font-size: 32rpx;
// font-weight: 500;
// color: #333333;
// }
// .mobile {
// color: #999999;
// }
// }
// }
// .bottom {
// display: flex;
// justify-content: space-between;
// font-size: 25rpx;
// font-weight: 400;
// .left {
// display: flex;
// justify-content: left;
// align-items: center;
// margin-top: 20rpx;
// .circle {
// width: 11rpx;
// height: 11rpx;
// opacity: 1;
// border: 2rpx solid #34A853;
// margin-right: 10rpx;
// border-radius: 50%;
// }
// .green {
// font-weight: 400;
// color: #34A853;
// line-height: 0rpx;
// margin-right: 18rpx;
// -webkit-background-clip: text;
// }
// .b_l_text {
// width: 360rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
// }
// .right {
// color: #3274F9;
// margin-top: 20rpx;
// }
// }
} }
// .item {
// margin: 0 auto;
// width: 694rpx;
// // height: 201rpx;
// background: #FFFFFF;
// border-radius: 14rpx 14rpx 14rpx 14rpx;
// opacity: 1;
// margin-bottom: 21rpx;
// box-sizing: border-box;
// padding: 28rpx;
// font-size: 24.53rpx;
// color: #999999FF;
// .top {
// display: flex;
// align-items: center;
// width: 100%;
// .avatar {
// width: 120rpx;
// height: 120rpx;
// margin-right: 18rpx;
// margin-bottom: 12rpx;
// }
// .body {
// flex: 1;
// font-size: 28rpx;
// color: #333;
// font-weight: bold;
// .name {
// font-size: 28rpx;
// color: #333;
// font-weight: 500;
// display: inline-block;
// margin-left: 18rpx;
// }
// }
// }
// .bottom {
// display: flex;
// justify-content: space-between;
// align-items: center;
// margin-top: 20rpx;
// font-size: 25rpx;
// .right {
// font-size: 28rpx;
// display: flex;
// .look {
// color: $theme-oa-color;
// }
// .update {
// color: #34A853;
// margin-right: 38rpx;
// }
// }
// }
// }
} }
</style> </style>

View File

@ -20,8 +20,8 @@
<u-form-item label="性别" required prop="sex" borderBottom> <u-form-item label="性别" required prop="sex" borderBottom>
<u-radio-group v-model="formData.sex" :disabled="readonly" style="margin: 16rpx;"> <u-radio-group v-model="formData.sex" :disabled="readonly" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'男'},{value:2,label:'女'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'男'},{value:2,label:'女'}]" :key="index"
:name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
@ -29,10 +29,12 @@
<u--input v-model="formData.age" :readonly="readonly" placeholder="请输入年龄"></u--input> <u--input v-model="formData.age" :readonly="readonly" placeholder="请输入年龄"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom> <u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
<u--input v-model="formData.id_card" :readonly="readonly" placeholder="请输入身份证号" type="idcard"></u--input> <u--input v-model="formData.id_card" :readonly="readonly" placeholder="请输入身份证号"
type="idcard"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="联系方式" required prop="phone" borderBottom> <u-form-item labelWidth="auto" label="联系方式" required prop="phone" borderBottom>
<u--input v-model="formData.phone" :readonly="readonly" placeholder="请输入手机号" type="number"></u--input> <u--input v-model="formData.phone" :readonly="readonly" placeholder="请输入手机号"
type="number"></u--input>
</u-form-item> </u-form-item>
</view> </view>
</view> </view>
@ -45,7 +47,8 @@
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="小队" required prop="address" borderBottom> <u-form-item labelWidth="auto" label="小队" required prop="address" borderBottom>
<!-- <u--input v-model="formData.brigade_name&&formData.brigade_name[0].brigade_name" :readonly="readonly" placeholder="请选择小队"></u--input> --> <!-- <u--input v-model="formData.brigade_name&&formData.brigade_name[0].brigade_name" :readonly="readonly" placeholder="请选择小队"></u--input> -->
<u--input v-model="formData.brigade_name" :readonly="readonly" placeholder="请选择小队"></u--input> <u--input v-model="formData.brigade_name" :readonly="readonly"
placeholder="请选择小队"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="详细地址" required prop="address" borderBottom> <u-form-item labelWidth="auto" label="详细地址" required prop="address" borderBottom>
<u--input v-model="formData.address" :readonly="readonly" placeholder="请输入详细地址"></u--input> <u--input v-model="formData.address" :readonly="readonly" placeholder="请输入详细地址"></u--input>
@ -53,23 +56,25 @@
<u-form-item labelWidth="auto" label="汽车是否能到家" required prop="highway" borderBottom> <u-form-item labelWidth="auto" label="汽车是否能到家" required prop="highway" borderBottom>
<u-radio-group v-model="formData.highway" :disabled="readonly" style="margin: 16rpx;"> <u-radio-group v-model="formData.highway" :disabled="readonly" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<block value="智能手机"> <block value="智能手机">
<u-form-item labelWidth="auto" label="是否使用智能手机" required prop="smart_phone" borderBottom> <u-form-item labelWidth="auto" label="是否使用智能手机" required prop="smart_phone" borderBottom>
<u-radio-group v-model="formData.smart_phone" :disabled="readonly" style="margin: 16rpx;"> <u-radio-group v-model="formData.smart_phone" :disabled="readonly"
style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<block v-if="formData.smart_phone>0"> <block v-if="formData.smart_phone>0">
<u-form-item labelWidth="auto" label="微信号" required borderBottom> <u-form-item labelWidth="auto" label="微信号" required borderBottom>
<u--input v-model="formData.wechat" :readonly="readonly" placeholder="请输入微信号"></u--input> <u--input v-model="formData.wechat" :readonly="readonly"
placeholder="请输入微信号"></u--input>
</u-form-item> </u-form-item>
</block> </block>
</block> </block>
@ -87,21 +92,32 @@
<breeding v-if="item.id==32" ref="demandRef32" :datas="item.datas" :readonly="true"></breeding> <breeding v-if="item.id==32" ref="demandRef32" :datas="item.datas" :readonly="true"></breeding>
<plant v-if="item.id==7" ref="demandRef7" :datas="item.datas" :readonly="true"></plant> <plant v-if="item.id==7" ref="demandRef7" :datas="item.datas" :readonly="true"></plant>
<store v-if="item.id==8" ref="demandRef8" :datas="item.datas" :readonly="true"></store> <store v-if="item.id==8" ref="demandRef8" :datas="item.datas" :readonly="true"></store>
<deepProcessing v-if="item.id==9" ref="demandRef9" :datas="item.datas" :readonly="true"></deepProcessing> <deepProcessing v-if="item.id==9" ref="demandRef9" :datas="item.datas" :readonly="true">
<thickProcessing v-if="item.id==10" ref="demandRef10" :datas="item.datas" :readonly="true"></thickProcessing> </deepProcessing>
<thickProcessing v-if="item.id==10" ref="demandRef10" :datas="item.datas" :readonly="true">
</thickProcessing>
</block> </block>
<block> <block>
<houseRepair v-if="item.id==12" ref="demandRef12" :datas="item.datas" :readonly="true"></houseRepair> <houseRepair v-if="item.id==12" ref="demandRef12" :datas="item.datas" :readonly="true">
<houseDecoration v-if="item.id==13" ref="demandRef13" :datas="item.datas" :readonly="true"></houseDecoration> </houseRepair>
<houseRenovate v-if="item.id==14" ref="demandRef14" :datas="item.datas" :readonly="true"></houseRenovate> <houseDecoration v-if="item.id==13" ref="demandRef13" :datas="item.datas" :readonly="true">
<houseTransaction v-if="item.id==15" ref="demandRef15" :datas="item.datas" :readonly="true"></houseTransaction> </houseDecoration>
<houseRenovate v-if="item.id==14" ref="demandRef14" :datas="item.datas" :readonly="true">
</houseRenovate>
<houseTransaction v-if="item.id==15" ref="demandRef15" :datas="item.datas" :readonly="true">
</houseTransaction>
</block> </block>
<block> <block>
<banquetMarry v-if="item.id==17" ref="demandRef17" :datas="item.datas" :readonly="true"></banquetMarry> <banquetMarry v-if="item.id==17" ref="demandRef17" :datas="item.datas" :readonly="true">
<banquetBirthday v-if="item.id==18" ref="demandRef18" :datas="item.datas" :readonly="true"></banquetBirthday> </banquetMarry>
<banquetFullMoon v-if="item.id==19" ref="demandRef19" :datas="item.datas" :readonly="true"></banquetFullMoon> <banquetBirthday v-if="item.id==18" ref="demandRef18" :datas="item.datas" :readonly="true">
<banquetOther v-if="item.id==20" ref="demandRef20" :datas="item.datas" :readonly="true"></banquetOther> </banquetBirthday>
<banquetFuneral v-if="item.id==21" ref="demandRef21" :datas="item.datas" :readonly="true"></banquetFuneral> <banquetFullMoon v-if="item.id==19" ref="demandRef19" :datas="item.datas" :readonly="true">
</banquetFullMoon>
<banquetOther v-if="item.id==20" ref="demandRef20" :datas="item.datas" :readonly="true">
</banquetOther>
<banquetFuneral v-if="item.id==21" ref="demandRef21" :datas="item.datas" :readonly="true">
</banquetFuneral>
</block> </block>
</block> </block>
<u-empty v-if="formData.datas.length==0" icon="/static/img/empty/data.png" text="没有数据"></u-empty> <u-empty v-if="formData.datas.length==0" icon="/static/img/empty/data.png" text="没有数据"></u-empty>
@ -111,10 +127,19 @@
</template> </template>
<script> <script>
import { Toast } from "../../libs/uniApi" import {
import { informationAdd, informationDetails } from "@/api/information.js" Toast
import { comonentList } from '@/static/server/archives.js' } from "../../libs/uniApi"
import { getTimeAgo } from "@/utils/time.js" import {
informationAdd,
informationDetails
} from "@/api/information.js"
import {
comonentList
} from '@/static/server/archives.js'
import {
getTimeAgo
} from "@/utils/time.js"
import districtSelector from "@/components/districtSelector/districtSelector.vue" // import districtSelector from "@/components/districtSelector/districtSelector.vue" //
import residents from "@/components/newArchives/residents.vue" // import residents from "@/components/newArchives/residents.vue" //
import breeding from "@/components/newArchives/breeding.vue" // import breeding from "@/components/newArchives/breeding.vue" //
@ -181,7 +206,9 @@
} }
}, },
onLoad(options) { onLoad(options) {
this.initInformationDetails({ id: options.id }); this.initInformationDetails({
id: options.id
});
this.initMap(); this.initMap();
}, },
onShow() {}, onShow() {},
@ -189,11 +216,11 @@
nowAddress() { nowAddress() {
let address = this.$store.state.app.userInfo; let address = this.$store.state.app.userInfo;
let str = ''; let str = '';
address.province_name?str+=address.province_name:null; address.province_name ? str += address.province_name : null;
address.city_name?str+=address.city_name:null; address.city_name ? str += address.city_name : null;
address.area_name?str+=address.area_name:null; address.area_name ? str += address.area_name : null;
address.street_name?str+=address.street_name:null; address.street_name ? str += address.street_name : null;
address.village_name?str+=address.village_name:null; address.village_name ? str += address.village_name : null;
return str; return str;
} }
}, },
@ -205,7 +232,7 @@
}, },
async initInformationDetails(id) { async initInformationDetails(id) {
let res = await informationDetails(id); let res = await informationDetails(id);
this.$u.sleep(100).then(()=>{ this.$u.sleep(100).then(() => {
this.skeleton = false; this.skeleton = false;
Object.keys(res.data).forEach(key => { Object.keys(res.data).forEach(key => {
this.formData[key] = res.data[key]; this.formData[key] = res.data[key];
@ -218,7 +245,7 @@
changeCurrent(e) { changeCurrent(e) {
this.current = e.index; this.current = e.index;
}, },
updateTo(time){ updateTo(time) {
return getTimeAgo(time) return getTimeAgo(time)
} }
}, },
@ -256,7 +283,8 @@
padding: 32rpx 28rpx 0 28rpx; padding: 32rpx 28rpx 0 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.right{
.right {
color: $theme-oa-color; color: $theme-oa-color;
} }
} }

View File

@ -24,7 +24,48 @@
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> --> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> -->
<view class="personnel_list"> <view class="personnel_list">
<block v-for="(item, index) in list" :key="item.id"> <view class="card" v-for="(item, index) in list" :key="item.id"
@click="navTo('/subpkg/archives/archives?id='+item.id)">
<view class="card_head">
<text style="font-size: 34rpx;">最后更新: 2023-8-1</text>
<text>{{'管理户数: '+item.informationg_count+" 户"}}<u-icon
style="display: inline-block;margin-left: 10rpx;" color="white"
name="arrow-right"></u-icon></text>
</view>
<view class="card_content">
<view class="left">
<view class="cir">
<u--image class="u_avatar" :showLoading="true"
:src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx"
height="112.28rpx" shape="circle"></u--image>
</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?"已签约":"未签约"}}
</view>
</view>
<view class="right">
<view class="">
<text>公司名称 :</text>
<text> {{item.company.company_name}}</text>
</view>
<view class="">
<text>人员姓名 :</text>
<text>{{item.nickname}}</text>
</view>
<view class="">
<text>联系电话 :</text>
<text>{{item.phone||item.account}}</text>
</view>
<view class="">
<text>负责区域 :</text>
<text>{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}</text>
</view>
</view>
</view>
</view>
<!-- <block v-for="(item, index) in list" :key="item.id">
<view class="personnel_item" @click="navTo('/subpkg/archives/archives?id='+item.id)"> <view class="personnel_item" @click="navTo('/subpkg/archives/archives?id='+item.id)">
<view class="type" :class="item.is_contract?'type_blue':''"> <view class="type" :class="item.is_contract?'type_blue':''">
<image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image> <image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image>
@ -68,7 +109,7 @@
<view class="look">{{'管理户数: '+item.informationg_count+" 户"}}</view> <view class="look">{{'管理户数: '+item.informationg_count+" 户"}}</view>
</view> </view>
</view> </view>
</block> </block> -->
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" icon="/static/img/empty/data.png"></u-empty> <u-empty v-if="loadConfig.status=='nomore'&& list.length==0" icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
@ -78,8 +119,12 @@
</template> </template>
<script> <script>
import { companyUser } from "@/api/company.js" import {
import { Toast } from '@/libs/uniApi.js' companyUser
} from "@/api/company.js"
import {
Toast
} from '@/libs/uniApi.js'
export default { export default {
data() { data() {
return { return {
@ -140,7 +185,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.page { .page {
padding-top: 28rpx; padding-top: 28rpx;
} }
@ -148,281 +193,339 @@
.card { .card {
margin: 0 auto; margin: 0 auto;
margin-bottom: 28rpx; margin-bottom: 28rpx;
padding: 28rpx;
width: 694rpx; width: 694rpx;
height: 221rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 30rpx;
opacity: 1; opacity: 1;
overflow: hidden;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.top { .card_head {
display: flex; padding: 28rpx;
justify-content: left; background-color: $theme-oa-color;
// align-items: center; color: white;
height: 100rpx;
.avatar {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
margin-right: 18rpx;
}
.u_avatar {
margin-right: 18rpx;
}
.text {
display: flex;
justify-content: space-around;
flex-direction: column;
.name {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.mobile {
color: #999999;
}
}
}
.bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 25rpx;
font-weight: 400; }
.card_content {
padding: 28rpx;
display: flex;
.left { .left {
display: flex; text-align: center;
justify-content: left; // padding: 15rpx 25rpx;
align-items: center; padding-top: 20rpx;
margin-top: 20rpx;
.circle { margin-right: 50rpx;
width: 11rpx; width: 160rpx;
height: 11rpx; background-color: $theme-oa-color;
opacity: 1; color: white;
border: 2rpx solid #34A853; border-radius: 40rpx;
margin-right: 10rpx;
border-radius: 50%;
}
.green { .cir {
font-weight: 400; width: 120rpx;
color: #34A853; height: 120rpx;
line-height: 0rpx; background-color: #FFFFFF;
margin-right: 18rpx; margin-left: 25rpx;
-webkit-background-clip: text; border-radius: 120rpx;
}
.b_l_text {
width: 360rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.right {
color: #3274F9;
margin-top: 20rpx;
}
}
}
.personnel_list {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 130rpx;
.personnel_item {
width: 694rpx;
// height: 407rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-bottom: 32rpx;
overflow: hidden;
position: relative; position: relative;
padding: 28rpx;
.type {
width: 50rpx;
height: 50rpx;
background-color: #F02828;
border-radius: 50%;
font-size: 25rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 28rpx;
right: 28rpx;
image {
width: 18rpx;
height: 18rpx;
margin-right: 1rpx;
}
} }
.type_blue {
background-color: #34A853;
} }
.top {
// background-color: #3274F9;
display: flex;
.right { .right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-between;
margin-left: 28rpx;
font-size: 25rpx;
font-weight: 400;
overflow: hidden;
color: #999999;
.info_top { view {
display: flex; text:nth-child(2) {
align-items: flex-end; margin-left: 20rpx;
font-size: 25rpx;
font-weight: 400;
color: $theme-oa-color;
margin-bottom: 10rpx;
.info_name {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 18rpx;
}
.phone {
margin-left: 30rpx;
color: #999999;
}
.tel {
color: #000;
}
}
.info_bottom {
display: flex;
margin-bottom: 8rpx;
.item {
display: flex;
align-items: flex-start;
}
.phone {
margin-right: 28rpx;
}
.location {
width: 320rpx;
// white-space: nowrap;
// /* */
// overflow: hidden;
// /* */
// text-overflow: ellipsis;
// /* 使 */
color: #000;
}
}
.company {
display: flex;
text {
margin-right: 30rpx;
flex-shrink: 0;
}
.itm {
width: 320rpx;
// white-space: nowrap;
// /* */
// overflow: hidden;
// /* */
// text-overflow: ellipsis;
// /* 使 */
color: #000;
} }
} }
} }
} }
.center { // .top {
padding: 28rpx 0; // display: flex;
// justify-content: left;
// // align-items: center;
.top { // .avatar {
font-size: 28rpx; // width: 88rpx;
font-weight: 400; // height: 88rpx;
color: #666666FF; // border-radius: 50%;
margin-bottom: 20rpx; // margin-right: 18rpx;
// }
.green { .u_avatar {
color: #34A853FF; position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
.yellow { // .text {
color: #F9AA32FF; // display: flex;
} // justify-content: space-around;
} // flex-direction: column;
.bottom { // .name {
display: flex; // font-size: 32rpx;
justify-content: space-around; // font-weight: 500;
font-size: 25rpx; // color: #333333;
font-weight: 400; // }
color: #999999;
image { // .mobile {
width: 18rpx; // color: #999999;
height: 18rpx; // }
margin-right: 9rpx; // }
} // }
}
}
.bottom { // .bottom {
display: flex; // display: flex;
justify-content: center; // justify-content: space-between;
// font-size: 25rpx;
// font-weight: 400;
.look { // .left {
height: 43rpx; // display: flex;
background: #FFFFFF; // justify-content: left;
border-radius: 26rpx 26rpx 26rpx 26rpx; // align-items: center;
opacity: 1; // margin-top: 20rpx;
// border: 2rpx solid $theme-oa-color;
font-size: 28rpx;
font-weight: 400;
margin-left: 28rpx;
color: $theme-oa-color;
display: flex;
justify-content: center;
align-items: center;
}
.sign { // .circle {
color: #34A853; // width: 11rpx;
// height: 11rpx;
// opacity: 1;
// border: 2rpx solid #34A853; // border: 2rpx solid #34A853;
// margin-right: 10rpx;
// border-radius: 50%;
// }
// .green {
// font-weight: 400;
// color: #34A853;
// line-height: 0rpx;
// margin-right: 18rpx;
// -webkit-background-clip: text;
// }
// .b_l_text {
// width: 360rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
// }
// .right {
// color: #3274F9;
// margin-top: 20rpx;
// }
// }
} }
.red {
color: #F02828; // .personnel_list {
// border: 2rpx solid #F02828; // display: flex;
} // flex-direction: column;
} // align-items: center;
} // padding-bottom: 130rpx;
}
// .personnel_item {
// width: 694rpx;
// // height: 407rpx;
// background: #FFFFFF;
// border-radius: 14rpx 14rpx 14rpx 14rpx;
// margin-bottom: 32rpx;
// overflow: hidden;
// position: relative;
// padding: 28rpx;
// .type {
// width: 50rpx;
// height: 50rpx;
// background-color: #F02828;
// border-radius: 50%;
// font-size: 25rpx;
// font-weight: 400;
// color: #FFFFFF;
// line-height: 35rpx;
// display: flex;
// justify-content: center;
// align-items: center;
// position: absolute;
// top: 28rpx;
// right: 28rpx;
// image {
// width: 18rpx;
// height: 18rpx;
// margin-right: 1rpx;
// }
// }
// .type_blue {
// background-color: #34A853;
// }
// .top {
// // background-color: #3274F9;
// display: flex;
// .right {
// display: flex;
// flex-direction: column;
// justify-content: space-around;
// margin-left: 28rpx;
// font-size: 25rpx;
// font-weight: 400;
// overflow: hidden;
// color: #999999;
// .info_top {
// display: flex;
// align-items: flex-end;
// font-size: 25rpx;
// font-weight: 400;
// color: $theme-oa-color;
// margin-bottom: 10rpx;
// .info_name {
// font-size: 32rpx;
// font-weight: 400;
// color: #333333;
// margin-right: 18rpx;
// }
// .phone {
// margin-left: 30rpx;
// color: #999999;
// }
// .tel {
// color: #000;
// }
// }
// .info_bottom {
// display: flex;
// margin-bottom: 8rpx;
// .item {
// display: flex;
// align-items: flex-start;
// }
// .phone {
// margin-right: 28rpx;
// }
// .location {
// width: 320rpx;
// // white-space: nowrap;
// // /* */
// // overflow: hidden;
// // /* */
// // text-overflow: ellipsis;
// // /* 使 */
// color: #000;
// }
// }
// .company {
// display: flex;
// text {
// margin-right: 30rpx;
// flex-shrink: 0;
// }
// .itm {
// width: 320rpx;
// // white-space: nowrap;
// // /* */
// // overflow: hidden;
// // /* */
// // text-overflow: ellipsis;
// // /* 使 */
// color: #000;
// }
// }
// }
// }
// .center {
// padding: 28rpx 0;
// .top {
// font-size: 28rpx;
// font-weight: 400;
// color: #666666FF;
// margin-bottom: 20rpx;
// .green {
// color: #34A853FF;
// }
// .yellow {
// color: #F9AA32FF;
// }
// }
// .bottom {
// display: flex;
// justify-content: space-around;
// font-size: 25rpx;
// font-weight: 400;
// color: #999999;
// image {
// width: 18rpx;
// height: 18rpx;
// margin-right: 9rpx;
// }
// }
// }
// .bottom {
// display: flex;
// justify-content: center;
// .look {
// height: 43rpx;
// background: #FFFFFF;
// border-radius: 26rpx 26rpx 26rpx 26rpx;
// opacity: 1;
// // border: 2rpx solid $theme-oa-color;
// font-size: 28rpx;
// font-weight: 400;
// margin-left: 28rpx;
// color: $theme-oa-color;
// display: flex;
// justify-content: center;
// align-items: center;
// }
// .sign {
// color: #34A853;
// // border: 2rpx solid #34A853;
// }
// .red {
// color: #F02828;
// // border: 2rpx solid #F02828;
// }
// }
// }
// }
</style> </style>

View File

@ -1,8 +1,8 @@
<template> <template>
<view class=""> <view class="">
<u-sticky bgColor="#fff"> <u-sticky bgColor="#0022C7">
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='#3274F9' :scrollable="false" lineWidth='40' <u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='40'
inactiveStyle='color:#666' activeStyle="color:#3274F9"></u-tabs> inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
</u-sticky> </u-sticky>
<view v-if="loadType"> <view v-if="loadType">
<view class="company_info" v-show="current==0"> <view class="company_info" v-show="current==0">
@ -53,17 +53,24 @@
</template> </template>
<script> <script>
import { companyIndex } from "@/api/company.js" import {
import { Toast } from '@/libs/uniApi.js' companyIndex
} from "@/api/company.js"
import {
Toast
} from '@/libs/uniApi.js'
import companyFinance from "@/components/companyFinance/companyFinance.vue" import companyFinance from "@/components/companyFinance/companyFinance.vue"
import task from "@/components/task/index.vue" import task from "@/components/task/index.vue"
export default { export default {
components: { companyFinance, task }, components: {
companyFinance,
task
},
data() { data() {
return { return {
current: 0, current: 0,
currentChild: 0, currentChild: 0,
loadType: true,// loadType: true, //
tabLists: [{ tabLists: [{
name: '我的公司', name: '我的公司',
}, { }, {
@ -87,15 +94,15 @@
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
if(this.$store.state.app.userInfo.company_id){ if (this.$store.state.app.userInfo.company_id) {
this.loadCompanyList(); this.loadCompanyList();
}else { } else {
this.loadType = false; this.loadType = false;
} }
}, },
onReachBottom() { onReachBottom() {
if(this.current==1) this.loadCompanyList(); if (this.current == 1) this.loadCompanyList();
else if(this.current==3) this.$refs.taskRef.loadList(); else if (this.current == 3) this.$refs.taskRef.loadList();
}, },
methods: { methods: {
async initLoad() { async initLoad() {
@ -140,22 +147,23 @@
} }
}) })
}, },
changeCurrent(e){ changeCurrent(e) {
this.current = e.index; this.current = e.index;
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
if(this.current==1) this.initLoad(); if (this.current == 1) this.initLoad();
else if(this.current==3) this.$refs.taskRef.initLoadConfig(); else if (this.current == 3) this.$refs.taskRef.initLoadConfig();
this.$u.sleep(500).then(()=>{uni.stopPullDownRefresh()}) this.$u.sleep(500).then(() => {
uni.stopPullDownRefresh()
})
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {}
}
.fixed_box { .fixed_box {
width: 100%; width: 100%;
position: fixed; position: fixed;
@ -289,9 +297,11 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.text_item{
.text_item {
display: flex; display: flex;
.left_text{
.left_text {
flex-shrink: 0; flex-shrink: 0;
} }
} }

View File

@ -1,6 +1,8 @@
<template> <template>
<view class="personnel"> <view class="personnel">
<view class="personnel_list"> <view class="personnel_list">
<!--
<block v-for="(item, index) in userList" :key="item.id"> <block v-for="(item, index) in userList" :key="item.id">
<view class="personnel_item"> <view class="personnel_item">
<view class="type" :class="item.is_contract?'type_blue':''"> <view class="type" :class="item.is_contract?'type_blue':''">
@ -9,8 +11,9 @@
</view> </view>
<view class="top" style="margin-bottom: 28rpx;"> <view class="top" style="margin-bottom: 28rpx;">
<view class="left"> <view class="left">
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'" <u--image class="u_avatar" :showLoading="true"
width="112.28rpx" height="112.28rpx" shape="circle"></u--image> :src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx"
height="112.28rpx" shape="circle"></u--image>
</view> </view>
<view class="right"> <view class="right">
<view class="info_top"> <view class="info_top">
@ -23,7 +26,9 @@
分管片区: 分管片区:
</text> </text>
<view class="item"> <view class="item">
<view class="location">{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}</view> <view class="location">
{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}
</view>
</view> </view>
</view> </view>
<view class="info_bottom"> <view class="info_bottom">
@ -38,21 +43,67 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="center">
<view class="top" v-for="(role, roleIndex) in item.roles" :key="roleIndex">
{{role}}
</view>
</view> -->
<u-line color="#999999FF"></u-line> <u-line color="#999999FF"></u-line>
<view class="bottom" style="margin-top: 28rpx;float: right;"> <view class="bottom" style="margin-top: 28rpx;float: right;">
<button class="look sign" v-if="item.is_contract==1" @click="changeSign(item)">已签约</button> <button class="look sign" v-if="item.is_contract==1" @click="changeSign(item)">已签约</button>
<button class="look red" v-else @click="changeSign(item)">未签约</button> <button class="look red" v-else @click="changeSign(item)">未签约</button>
<button class="look" @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</button> <button class="look" @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</button>
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</button> <button class="look"
@click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</button>
</view> </view>
</view> </view>
</block> </block>
<u-empty v-if="loadConfig.status=='nomore'&& userList.length==0" icon="/static/img/empty/data.png"></u-empty> -->
<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 @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</text>
<text @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</text>
</view>
<view class="card_content">
<view class="left">
<view class="cir">
<u--image class="u_avatar" :showLoading="true"
:src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx"
height="112.28rpx" shape="circle"></u--image>
</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?'已签约':'未签约'}}
</view>
</view>
<view class="right">
<view class="">
<text>公司名称 :</text>
<text> {{item.company.company_name}}</text>
</view>
<view class="">
<text>人员姓名 :</text>
<text>{{item.nickname}}</text>
</view>
<view class="">
<text>联系电话 :</text>
<text>{{item.phone}}</text>
</view>
<view class="">
<text>负责区域 :</text>
<text> {{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}
</text>
</view>
</view>
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& userList.length==0"
icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view> </view>
@ -62,8 +113,12 @@
</template> </template>
<script> <script>
import { Toast } from '@/libs/uniApi.js' import {
import { companyUser } from "@/api/company.js" Toast
} from '@/libs/uniApi.js'
import {
companyUser
} from "@/api/company.js"
export default { export default {
data() { data() {
return { return {
@ -114,12 +169,12 @@
this.userList = [...this.userList, ...res.data?.data] this.userList = [...this.userList, ...res.data?.data]
}, },
// //
changeSign(data){ changeSign(data) {
if(data.is_contract)Toast('已完成签约'); if (data.is_contract) Toast('已完成签约');
else uni.showModal({ else uni.showModal({
content:'该人员还未签约,是否立即签约?', content: '该人员还未签约,是否立即签约?',
success: (e) => { success: (e) => {
if(e.confirm)this.navTo('/subpkg/personnelDetails/personnelDetails?id='+data.id); if (e.confirm) this.navTo('/subpkg/personnelDetails/personnelDetails?id=' + data.id);
} }
}) })
} }
@ -150,199 +205,285 @@
} }
.personnel_list { .personnel_list {
display: flex; padding: 28rpx 0;
flex-direction: column; margin-bottom: 130rpx;
align-items: center;
padding-top: 32rpx;
padding-bottom: 130rpx;
.personnel_item { .card {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
// height: 407rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 30rpx;
margin-bottom: 32rpx; opacity: 1;
overflow: hidden; overflow: hidden;
position: relative; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.card_head {
padding: 28rpx; padding: 28rpx;
background-color: $theme-oa-color;
.type { color: white;
width: 50rpx; height: 100rpx;
height: 50rpx;
background-color: #F02828;
border-radius: 50%;
font-size: 25rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 35rpx;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center;
position: absolute;
top: 28rpx;
right: 28rpx;
image {
width: 18rpx;
height: 18rpx;
margin-right: 1rpx;
}
} }
.type_blue { .card_content {
background-color: #34A853; padding: 28rpx;
}
.top {
// background-color: #3274F9;
display: flex; display: flex;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
margin-right: 50rpx;
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 { .right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-between;
margin-left: 28rpx;
font-size: 25rpx;
font-weight: 400;
overflow: hidden;
color: #999999;
.info_top { view {
display: flex; text:nth-child(2) {
align-items: flex-end; margin-left: 20rpx;
font-size: 25rpx;
font-weight: 400;
color: $theme-oa-color;
margin-bottom: 10rpx;
.info_name {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 18rpx;
} }
.phone {
margin-left: 30rpx;
color: #999999;
} }
.tel {
color: #000;
} }
} }
.info_bottom {
display: flex;
margin-bottom: 8rpx;
.item { .u_avatar {
display: flex; position: absolute;
align-items: flex-start; top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
.phone {
margin-right: 28rpx;
} }
.location {
width: 350rpx;
}
// .personnel_list {
// display: flex;
// flex-direction: column;
// align-items: center;
// padding-top: 32rpx;
// padding-bottom: 130rpx;
// .personnel_item {
// width: 694rpx;
// // height: 407rpx;
// background: #FFFFFF;
// border-radius: 14rpx 14rpx 14rpx 14rpx;
// margin-bottom: 32rpx;
// overflow: hidden;
// position: relative;
// padding: 28rpx;
// .type {
// width: 50rpx;
// height: 50rpx;
// background-color: #F02828;
// border-radius: 50%;
// font-size: 25rpx;
// font-weight: 400;
// color: #FFFFFF;
// line-height: 35rpx;
// display: flex;
// justify-content: center;
// align-items: center;
// position: absolute;
// top: 28rpx;
// right: 28rpx;
// image {
// width: 18rpx;
// height: 18rpx;
// margin-right: 1rpx;
// }
// }
// .type_blue {
// background-color: #34A853;
// }
// .top {
// // background-color: #3274F9;
// display: flex;
// .right {
// display: flex;
// flex-direction: column;
// justify-content: space-around;
// margin-left: 28rpx;
// font-size: 25rpx;
// font-weight: 400;
// overflow: hidden;
// color: #999999;
// .info_top {
// display: flex;
// align-items: flex-end;
// font-size: 25rpx;
// font-weight: 400;
// color: $theme-oa-color;
// margin-bottom: 10rpx;
// .info_name {
// font-size: 32rpx;
// font-weight: 400;
// color: #333333;
// margin-right: 18rpx;
// }
// .phone {
// margin-left: 30rpx;
// color: #999999;
// }
// .tel {
// color: #000;
// }
// }
// .info_bottom {
// display: flex;
// margin-bottom: 8rpx;
// .item {
// display: flex;
// align-items: flex-start;
// }
// .phone {
// margin-right: 28rpx;
// }
// .location {
// width: 350rpx;
// // white-space: nowrap;
// // /* */
// // overflow: hidden;
// // /* */
// // text-overflow: ellipsis;
// // /* 使 */
// color: #000;
// }
// }
// .company {
// display: flex;
// text {
// margin-right: 30rpx;
// }
// .itm {
// width: 350rpx;
// white-space: nowrap; // white-space: nowrap;
// /* */ // /* */
// overflow: hidden; // overflow: hidden;
// /* */ // /* */
// text-overflow: ellipsis; // text-overflow: ellipsis;
// /* 使 */ // /* 使 */
color: #000; // color: #000;
} // }
} // }
// }
// }
.company { // .center {
display: flex; // padding: 28rpx 0;
text { // .top {
margin-right: 30rpx; // font-size: 28rpx;
} // font-weight: 400;
// color: #666666FF;
// margin-bottom: 20rpx;
.itm { // .green {
width: 350rpx; // color: #34A853FF;
white-space: nowrap; // }
/* 不换行 */
overflow: hidden;
/* 将超出文本隐藏 */
text-overflow: ellipsis;
/* 使用省略号表示被隐藏的文本 */
color: #000;
}
}
}
}
.center { // .yellow {
padding: 28rpx 0; // color: #F9AA32FF;
// }
// }
.top { // .bottom {
font-size: 28rpx; // display: flex;
font-weight: 400; // justify-content: space-around;
color: #666666FF; // font-size: 25rpx;
margin-bottom: 20rpx; // font-weight: 400;
// color: #999999;
.green { // image {
color: #34A853FF; // width: 18rpx;
} // height: 18rpx;
// margin-right: 9rpx;
// }
// }
// }
.yellow { // .bottom {
color: #F9AA32FF; // display: flex;
} // justify-content: center;
}
.bottom { // .look {
display: flex; // width: 128rpx;
justify-content: space-around; // height: 43rpx;
font-size: 25rpx; // background: #FFFFFF;
font-weight: 400; // border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #999999; // opacity: 1;
// // border: 2rpx solid $theme-oa-color;
// font-size: 28rpx;
// font-weight: 400;
// margin-left: 28rpx;
// color: $theme-oa-color;
// display: flex;
// justify-content: center;
// align-items: center;
// }
image { // .sign {
width: 18rpx; // color: #34A853;
height: 18rpx; // // border: 2rpx solid #34A853;
margin-right: 9rpx; // }
}
}
}
.bottom { // .red {
display: flex; // color: #F02828;
justify-content: center; // // border: 2rpx solid #F02828;
// }
// }
// }
// }
.look {
width: 128rpx;
height: 43rpx;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
// border: 2rpx solid $theme-oa-color;
font-size: 28rpx;
font-weight: 400;
margin-left: 28rpx;
color: $theme-oa-color;
display: flex;
justify-content: center;
align-items: center;
}
.sign {
color: #34A853;
// border: 2rpx solid #34A853;
}
.red {
color: #F02828;
// border: 2rpx solid #F02828;
}
}
}
}
} }
</style> </style>

119
test.vue Normal file
View File

@ -0,0 +1,119 @@
<template>
<view class="personnel_list">
<view class="cards">
<view class="cards_head">
<text style="font-size: 32rpx">最后更新:2020-25-2</text>
<text>更新档案</text>
<text>查看档案</text>
</view>
<view class="cards_content">
<view class="right">
<view class="">
<text>人员姓名 :</text>
<text> { item.name }</text>
</view>
<view class="">
<text>联系电话 :</text>
<text>{ item.phone }</text>
</view>
<view class="">
<text>所属片区 :</text>
<text> 所属片区 </text>
</view>
</view>
<view class="left">
<view class="cir">
<u--image
class="u_avatar"
:showLoading="true"
:src="'../../static/img/public/man.png'"
width="112.28rpx"
height="112.28rpx"
shape="circle"
></u--image>
</view>
</view>
</view>
</view>
</view>
</template>
<style lang="scss">
.personnel_list {
padding: 28rpx 0;
margin-bottom: 130rpx;
.cards {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
background: #ffffff;
border-radius: 30rpx;
opacity: 1;
overflow: hidden;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.cards_head {
padding: 28rpx;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.cards_content {
padding: 28rpx;
display: flex;
justify-content: space-between;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
width: 160rpx;
background-color: $theme-oa-color;
color: white;
border-radius: 40rpx;
.cir {
width: 120rpx;
height: 120rpx;
background-color: #ffffff;
margin-left: 25rpx;
border-radius: 120rpx;
position: relative;
}
}
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
view {
text:nth-child(2) {
margin-left: 20rpx;
}
}
}
}
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
</style>

View File

@ -15,7 +15,7 @@
/* 颜色变量 */ /* 颜色变量 */
@import '@/uni_modules/uview-ui/theme.scss'; @import '@/uni_modules/uview-ui/theme.scss';
$theme-oa-color: #3175f9; $theme-oa-color: #0122c7;
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
$uni-color-success: #4cd964; $uni-color-success: #4cd964;
@ -23,32 +23,32 @@ $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d; $uni-color-error: #dd524d;
/* 文字基本颜色 */ /* 文字基本颜色 */
$uni-text-color:#333;//基本色 $uni-text-color: #333; //基本色
$uni-text-color-inverse:#fff;//反色 $uni-text-color-inverse: #fff; //反色
$uni-text-color-grey:#999;//辅助灰色如加载更多的提示信息 $uni-text-color-grey: #999; //辅助灰色如加载更多的提示信息
$uni-text-color-placeholder: #808080; $uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0; $uni-text-color-disable: #c0c0c0;
/* 背景颜色 */ /* 背景颜色 */
$uni-bg-color:#ffffff; $uni-bg-color: #ffffff;
$uni-bg-color-grey:#f8f8f8; $uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色 $uni-bg-color-hover: #f1f1f1; //点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 $uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */ /* 边框颜色 */
$uni-border-color:#c8c7cc; $uni-border-color: #c8c7cc;
/* 尺寸变量 */ /* 尺寸变量 */
/* 文字尺寸 */ /* 文字尺寸 */
$uni-font-size-sm:12px; $uni-font-size-sm: 12px;
$uni-font-size-base:14px; $uni-font-size-base: 14px;
$uni-font-size-lg:16; $uni-font-size-lg: 16;
/* 图片尺寸 */ /* 图片尺寸 */
$uni-img-size-sm:20px; $uni-img-size-sm: 20px;
$uni-img-size-base:26px; $uni-img-size-base: 26px;
$uni-img-size-lg:40px; $uni-img-size-lg: 40px;
/* Border Radius */ /* Border Radius */
$uni-border-radius-sm: 2px; $uni-border-radius-sm: 2px;
@ -70,9 +70,9 @@ $uni-spacing-col-lg: 12px;
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */ /* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色 $uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title:20px; $uni-font-size-title: 20px;
$uni-color-subtitle: #555555; // 二级标题颜色 $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px; $uni-font-size-subtitle: 26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph:15px; $uni-font-size-paragraph: 15px;