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

View File

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

View File

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

View File

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

View File

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