This commit is contained in:
weipengfei 2023-08-19 16:12:22 +08:00
parent d19f7d0bb6
commit 01de8e7b80
5 changed files with 563 additions and 589 deletions

View File

@ -1,14 +1,7 @@
<template> <template>
<view> <view>
<view class="item"> <view class="item">
<u-skeleton <u-skeleton :loading="skeleton" :animate="true" title rows="1" rows-width="100%" rowsHeight="56"></u-skeleton>
:loading="skeleton"
:animate="true"
title
rows="1"
rows-width="100%"
rowsHeight="56"
></u-skeleton>
<!-- <block v-if="!skeleton"> <!-- <block v-if="!skeleton">
<view class="title">公司基本信息</view> <view class="title">公司基本信息</view>
<view class="card"> <view class="card">
@ -36,7 +29,6 @@
--> -->
<view class="personnel_list" v-if="!skeleton"> <view class="personnel_list" v-if="!skeleton">
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<text style="font-size: 32rpx">公司基本信息</text> <text style="font-size: 32rpx">公司基本信息</text>
</view> </view>
@ -56,14 +48,10 @@
</view> </view>
<view class=""> <view class="">
<text>负责区域 :</text> <text>负责区域 :</text>
<text> {{c_address}} </text> <text>{{c_address}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="cards_head"> <view class="cards_head">
<text style="font-size: 32rpx">公司联系人</text> <text style="font-size: 32rpx">公司联系人</text>
</view> </view>
@ -75,7 +63,7 @@
</view> </view>
<view class="" @click="copyPhone(company.master_email, '社会代码')"> <view class="" @click="copyPhone(company.master_email, '社会代码')">
<text>担任职务 :</text> <text>担任职务 :</text>
<text>{{company.organization_code}}</text> <text>{{company.master_position}}</text>
</view> </view>
<view class="" @click="copyPhone(company.master_email, '电话')"> <view class="" @click="copyPhone(company.master_email, '电话')">
<text>联系电话 :</text> <text>联系电话 :</text>
@ -86,21 +74,14 @@
<text> {{company.master_email}}</text> <text> {{company.master_email}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 合同 --> <!-- 合同 -->
<view class="item" v-show="skeleton||contract.status"> <view class="item" v-show="skeleton||contract.status">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" <u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton>
rowsHeight="56"></u-skeleton>
<!-- <!--
<block v-if="!skeleton"> <block v-if="!skeleton">
@ -169,7 +150,7 @@
</view> </view>
<view style="border-top:1px dashed #0022C7;margin:20rpx 0"> <view style="border-top:1px dashed #0022C7;margin-bottom:20rpx">
</view> </view>
<view class="contract" v-if="contract.contract_no"> <view class="contract" v-if="contract.contract_no">
@ -241,8 +222,7 @@
</view> </view>
--> -->
<view class="item"> <view class="item">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" <u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton>
rowsHeight="56"></u-skeleton>
<!-- <!--
<block v-if="!skeleton"> <block v-if="!skeleton">
@ -281,35 +261,30 @@
<view class="cards_content"> <view class="cards_content">
<view class="image_box" style="background-color: #fff;border-radius: 7px 7px 7px 7px;"> <view class="image_box" style="background-color: #fff;border-radius: 7px 7px 7px 7px;">
<u--image class="image" @click="priview(company.qualification.business_license)" <u--image class="image" @click="priview(company.qualification.business_license)"
:src="company.qualification.business_license" :src="company.qualification.business_license" v-if="company.qualification.business_license"
v-if="company.qualification.business_license" :lazy-load="true"> :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>
<view style="border-top:1px dashed #0022C7;margin:20rpx 0">
</view>
<u--image class="image" @click="priview(company.qualification.business_licenseB)" <u--image class="image" @click="priview(company.qualification.business_licenseB)"
:src="company.qualification.business_licenseB" :src="company.qualification.business_licenseB" v-if="company.qualification.business_licenseB"
v-if="company.qualification.business_licenseB" :lazy-load="true"> :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" <u--image class="image" v-for="item in company.qualification.other_qualifications" :key="item"
:key="item" @click="priview(item)" :src="item" @click="priview(item)" :src="item" v-if="company.qualification.other_qualifications" :lazy-load="true">
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>
</u--image> </u--image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -321,22 +296,24 @@
</template> </template>
<script> <script>
import { import {
contractView contractView
} from "@/api/contract.js" } from "@/api/contract.js"
import { import {
companyView companyView
} from "@/api/company.js" } from "@/api/company.js"
import { import {
download_file download_file
} from "@/api/junziqian.js" } from "@/api/junziqian.js"
import { import {
Toast Toast
} from '@/libs/uniApi.js' } from '@/libs/uniApi.js'
export default { import {commonBrigade} from "@/api/oaPbulic.js"
export default {
name: "company", name: "company",
data () { data() {
return { return {
skeleton: true, skeleton: true,
company: { company: {
@ -349,15 +326,17 @@ export default {
}, },
contract: {}, contract: {},
users: [], users: [],
current: 1 current: 1,
brigadeList: [],
brigade: ''
} }
}, },
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;
@ -367,14 +346,14 @@ export default {
} 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;
this.brigade ? str += this.brigade : null;
} }
return str; return str;
} }
}, },
methods: { methods: {
navTo (contract_no) { navTo(contract_no) {
download_file({ download_file({
applyNo: contract_no applyNo: contract_no
}).then(res => { }).then(res => {
@ -386,11 +365,13 @@ export default {
}) })
}) })
}, },
naviBack () { naviBack() {
uni.navigateBack() uni.navigateBack()
}, },
async initContract (id, type = "contract") { async initContract(id, type = "contract") {
let res; let res;
res = await commonBrigade();
this.brigadeList = res.data;
// //
if (id && (type == "contract" || type == null)) { if (id && (type == "contract" || type == null)) {
res = await contractView({ res = await contractView({
@ -404,9 +385,18 @@ export default {
} else { } else {
res = await companyView(); res = await companyView();
} }
} }
this.company = res.data.company; this.company = res.data.company;
if(this.company?.qualification?.other_qualifications&& typeof this.company.qualification.other_qualifications == 'string'){
this.company.qualification.other_qualifications = JSON.parse(this.company.qualification.other_qualifications);
}
let arr = this.company.responsible_area.split(',');
let brigade = this.brigadeList.filter(item=>{
return arr.find(t=>t==item.id);
});
brigade.forEach((item)=>{
this.brigade+=item.brigade_name??''
})
uni.$emit('companyInfo', this.company); // uni.$emit('companyInfo', this.company); //
this.user = res.data.user; this.user = res.data.user;
this.contract = res.data.contract; this.contract = res.data.contract;
@ -414,22 +404,22 @@ export default {
// 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'
@ -441,7 +431,7 @@ export default {
} }
}) })
}, },
copyPhone (str = "", type = "号码") { copyPhone(str = "", type = "号码") {
if (str) uni.setClipboardData({ if (str) uni.setClipboardData({
data: str + "", data: str + "",
success: (e) => { success: (e) => {
@ -453,7 +443,7 @@ export default {
}) })
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -726,6 +716,7 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 28rpx; padding: 28rpx;
.left { .left {
display: flex; display: flex;
@ -784,16 +775,17 @@ export default {
} }
.image_box { .image_box {
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 28rpx;
.image { .image {
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 28rpx; margin-bottom: 28rpx;
align-self: center;
image { image {
width: 650rpx; width: 650rpx;
@ -802,9 +794,9 @@ export default {
} }
} }
} }
} }
.back_btn { .back_btn {
width: 694rpx; width: 694rpx;
height: 84rpx; height: 84rpx;
background: $theme-oa-color; background: $theme-oa-color;
@ -814,9 +806,9 @@ export default {
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;
@ -826,5 +818,5 @@ export default {
color: $theme-oa-color; color: $theme-oa-color;
background-color: transparent; background-color: transparent;
margin: 30rpx auto; margin: 30rpx auto;
} }
</style> </style>

View File

@ -68,12 +68,6 @@
} }
}, },
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
onLoad() { onLoad() {
this.myEventList = [] this.myEventList = []
// this.getApproveMyList(this.params) // this.getApproveMyList(this.params)

View File

@ -15,7 +15,7 @@
<u-tabs <u-tabs
:list="tabList" :list="tabList"
@click="changeTabs" @click="changeTabs"
lineColor="#3274F9" lineColor="#0122c7"
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"
></u-tabs> ></u-tabs>
</view> </view>

View File

@ -84,12 +84,6 @@
areaManagerList: [] areaManagerList: []
} }
}, },
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
onLoad() {}, onLoad() {},
onShow() { onShow() {
this.loadAreaManager(); this.loadAreaManager();

View File

@ -234,12 +234,6 @@
download_file download_file
} from "@/api/junziqian.js" } from "@/api/junziqian.js"
export default { export default {
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
data() { data() {
return { return {
id: '', id: '',