更新,修复bug

This commit is contained in:
wpf 2023-08-06 16:27:59 +08:00
parent 96cf8fbe79
commit f1ed72008c
15 changed files with 868 additions and 780 deletions

View File

@ -40,7 +40,9 @@
props: {
datas: {
type: Object,
default: {}
default: function(){
return {}
}
}
},
data() {

11
package-lock.json generated
View File

@ -1,11 +1,6 @@
{
"name": "OfficeApp",
"lockfileVersion": 3,
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}
}
"packages": {}
}

View File

@ -152,7 +152,7 @@
"path": "personnel/personnel",
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
@ -216,7 +216,7 @@
"path": "companyInfo/companyInfo",
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
@ -315,7 +315,7 @@
"path": "archives/archives",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}

View File

@ -23,12 +23,13 @@
<view v-else class="mesg_box">
<view class="name">
<text class="nickname">姓名:{{ myOaInfo.nickname }}</text>
<text>{{ myOaInfo.admin_id?'超级管理员':'普通用户'}}</text>
</view>
<view class="duty">
<!-- ({{ myOaInfo.did_name }}){{myOaInfo.label_name}} -->
电话:{{myOaInfo.account}}<br />
公司:<text v-if="myOaInfo.company">{{ myOaInfo.company.company_name }}</text>
公司:<text v-if="myOaInfo.company">{{ myOaInfo.company.company_name }}</text><br/>
公司类型:<text v-if="myOaInfo.company">{{ myOaInfo.company.company_type_name }}</text><br/>
</view>
</view>
</view>

View File

@ -23,11 +23,13 @@
<view v-else class="name_work">
<view class="name">
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
{{ oaUserInfo.admin_id?'超级管理员':'普通用户'}}
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
</view>
<view class="work">
电话:{{oaUserInfo.account}}<br />
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text>
公司:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_name }}</text><br/>
公司类型:<text v-if="oaUserInfo.company">{{ oaUserInfo.company.company_type_name }}</text><br/>
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
</view>
</view>

View File

@ -204,12 +204,12 @@ export const oaHomeData = [
url: '/subpkg/personnel/personnel',
admin: true
},
{
text: '固定资产',
icon: prefix + 'oa/wcsq@2x.png',
// {
// text: '固定资产',
// icon: prefix + 'oa/wcsq@2x.png',
// url: '/subpkg/fixedAssets/fixedAssets',
admin: true
},
// admin: true
// },
{
text: '合同管理',
icon: prefix + 'oa/cgsq@2x.png',

View File

@ -25,7 +25,8 @@
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有档案" icon="/static/img/empty/list.png"></u-empty>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有档案" icon="/static/img/empty/list.png">
</u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
@ -34,8 +35,12 @@
</template>
<script>
import { informationList } from "@/api/information.js"
import { Toast } from "../../libs/uniApi";
import {
informationList
} from "@/api/information.js"
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
@ -56,10 +61,10 @@
else if (this.$store.state.app.userInfo.admin_id == 0) { //,id
this.user_id = this.$store.state.app.userInfo.id;
}
this.loadInformationList();
},
onShow() {
this.initLoadconfig();
this.loadInformationList();
},
computed: {
//
@ -83,13 +88,14 @@
uni.hideLoading()
}
})
}
else Toast('暂未开放');
} else Toast('暂未开放');
},
initLoadconfig() {
async initLoad() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.loadInformationList();
uni.stopPullDownRefresh();
},
async loadInformationList() {
let that = this;
@ -110,7 +116,7 @@
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
this.initLoad();
}
}
</script>
@ -163,24 +169,29 @@
.body {
flex: 1;
.t_top {
display: flex;
justify-content: space-between;
margin-bottom: 18rpx;
.name {
font-size: 32rpx;
color: #333;
}
.mobile {
font-size: 28rpx;
color: #333;
}
}
.t_bottom {
width: 500rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.address {
font-size: 28rpx;
color: #333;
@ -199,9 +210,11 @@
.right {
font-size: 28rpx;
display: flex;
.look {
color: $theme-oa-color;
}
.update {
color: #34A853;
margin-right: 38rpx;

View File

@ -14,7 +14,7 @@
<view class="card">
<view class="item">
<view class="title">基本信息</view>
<u-form-item labelWidth="auto" label="户主姓名" required prop="name" borderBottom>
<u-form-item labelWidth="auto" label="姓名" required prop="name" borderBottom>
<u--input v-model="formData.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
</u-form-item>
<u-form-item label="性别" required prop="sex" borderBottom>

View File

@ -91,11 +91,12 @@
this.loadCompanyList();
},
methods: {
initLoad() {
async initLoad() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.companyList = [];
this.loadCompanyList();
await this.loadCompanyList();
uni.stopPullDownRefresh()
},
//
async loadCompanyList() {
@ -138,7 +139,7 @@
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
this.initLoad()
}
}
</script>

View File

@ -3,12 +3,12 @@
<company :id="id" type="company"></company>
<view class="need_contract" v-if="!company.contract||!company.contract.status">
<picker v-if="!company.contract" :range="contractTypeList" range-key="name" @change="changeType">
<button class="btn">发起合同</button>
<!-- <mybtn text="发起合同" position="false"></mybtn> -->
<button class="btn">生成合同</button>
<!-- <mybtn text="生成合同" position="false"></mybtn> -->
</picker>
<view v-if="company.contract&&company.contract.check_status==1">
<button class="btn tips_center">合同已发起,请等待审核</button>
<!-- <mybtn text="发起合同" position="false" disabled></mybtn> -->
<button class="btn tips_center">合同已生成,请等待审核</button>
<!-- <mybtn text="生成合同" position="false" disabled></mybtn> -->
</view>
<view v-if="company.contract&&company.contract.check_status==2" class="card">
<view class="contract_box send">
@ -101,22 +101,22 @@
})
this.contractTypeList = res.data;
},
//
//
async createContract(data) {
let res = await initiateContract({
party_b: data.party_b,
contract_type: data.contract_type,
type: data.type
})
Toast(res.msg || '合同已发起')
Toast(res.msg || '合同已生成')
this.initCompany();
},
//
//
async addContract(data) {
let res = await Draftingcontracts({
id: this.id
});
Toast('合同已生成');
Toast('合同已发送');
this.initCompany();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;

View File

@ -83,6 +83,17 @@ export default {
url: url
}) : Toast('暂未开放')
},
copyPhone(str = "", type = "号码") {
if (str) uni.setClipboardData({
data: str + "",
success: (e) => {
Toast(type + '已复制')
},
fail: (e) => {
Toast('复制失败')
}
})
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()

View File

@ -4,7 +4,7 @@
<u--form labelPosition="left" :model="formData" :rules="rules" ref="archives">
<view class="item">
<view class="title">基本信息</view>
<u-form-item labelWidth="auto" label="户主姓名" required prop="name" borderBottom>
<u-form-item labelWidth="auto" label="姓名" required prop="name" borderBottom>
<u--input v-model="formData.name" placeholder="请输入姓名"></u--input>
</u-form-item>
<u-form-item label="性别" required prop="sex" borderBottom>
@ -28,6 +28,9 @@
<view class="item">
<view class="title">地区信息</view>
<!-- <districtSelector ref="districtSelectorRef"></districtSelector> -->
<u-form-item labelWidth="auto" label="地址" borderBottom>
<u--textarea :value="nowAddress" autoHeight readonly></u--textarea>
</u-form-item>
<u-form-item labelWidth="auto" label="详细地址" required prop="address" borderBottom>
<u--input v-model="formData.address" placeholder="请输入详细地址"></u--input>
</u-form-item>
@ -56,8 +59,8 @@
</block>
</view>
<residents ref="residentsRef"></residents>
<breeding ref="breedingRef"></breeding>
<plant ref="plantRef"></plant>
<!-- <breeding ref="breedingRef"></breeding>
<plant ref="plantRef"></plant> -->
<!-- 更多内容 -->
<!-- <block v-for="(item, index) in showDemandList" :key="'demand'+index">
@ -223,6 +226,12 @@
this.initCategoryBusinessList();
},
onShow() {},
computed:{
nowAddress(){
let address = this.$store.state.app.userInfo;
return address.province_name+address.city_name+address.area_name+address.street_name+address.village_name+address.brigade_name;
}
},
methods: {
//
async addArchives() {
@ -231,11 +240,11 @@
// let refsDatas = this.loadRefsDatas();
// let flag1 = await this.$refs.districtSelectorRef.validate();
let flag2 = await this.$refs.residentsRef.validate();
let flag3 = await this.$refs.breedingRef.validate();
let flag4 = await this.$refs.plantRef.validate();
// let flag3 = await this.$refs.breedingRef.validate();
// let flag4 = await this.$refs.plantRef.validate();
// return console.log(flag1);
this.$refs.archives.validate().then(async (e) => {
if (e == true && flag4 == true && flag2 == true && flag3 == true) {
if (e == true && flag2 == true) {
uni.showLoading({
title: '登记中',
mask: true

View File

@ -74,8 +74,7 @@
userList: []
}
},
onLoad() {},
onShow() {
onLoad() {
this.loadUserList()
},
methods: {
@ -85,6 +84,13 @@
url: url,
}) : Toast('暂未开放')
},
async initLoad() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.userList = [];
await this.loadUserList();
uni.stopPullDownRefresh();
},
async loadUserList() {
let that = this;
if (this.loadConfig.status == "nomore") return;
@ -104,7 +110,7 @@
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
this.initLoad();
}
}
</script>

View File

@ -1,7 +1,8 @@
<template>
<view class="page">
<view class="basic">
<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">
@ -10,7 +11,8 @@
<view class="text">
<view class="basic_name">
<view class="name">{{userInfo.name}}</view>
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'">
<image class="icon"
:src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'">
</image>
<!-- <view class="role" v-if="userInfo.roles">{{userInfo.roles[0]}}</view> -->
</view>
@ -26,16 +28,16 @@
是否为小队长:
<u-radio-group v-model="userInfo.is_captain" style="margin-left: 16rpx;" disabled>
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:name="item.value">
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
<view class="update" @click="updateShow(userInfo.is_captain)"><uni-icons type="compose"
color="#F9AA32"></uni-icons></view>
<view class="update" @click="updateShow(userInfo.is_captain)">
<uni-icons type="compose" color="#F9AA32"></uni-icons>
</view>
</view>
<view class="bottom">
负责区域:
{{userInfo.city_name+userInfo.area_name+userInfo.street_name}}{{userInfo.city_name+userInfo.area_name+userInfo.street_name}}
负责区域:{{userInfo.street_name+(userInfo.village_name||'')+(userInfo.brigade_name||'')}}
</view>
<u-popup :show="show" :round="10" mode="center">
<view class="popup">
@ -44,8 +46,8 @@
是否为小队长:
<u-radio-group v-model="updateForm.is_captain" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:name="item.value">
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</view>
@ -59,12 +61,13 @@
</block>
</view>
<view class="certification">
<u-skeleton :loading="skeleton" :animate="true" title rows="3" rows-width="100%" rowsHeight="56"></u-skeleton>
<u-skeleton :loading="skeleton" :animate="true" title rows="3" rows-width="100%" rowsHeight="56">
</u-skeleton>
<block v-if="!skeleton">
<view class="title">资质信息</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="身份证" titleFontSize="32rpx"
type="line"></uni-section>
<uni-section style="background-color: transparent;" title="身份证" titleFontSize="32rpx" type="line">
</uni-section>
<view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.id_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 0)">
@ -75,8 +78,8 @@
</view>
</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx"
type="line"></uni-section>
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line">
</uni-section>
<view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.car_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)">
@ -87,8 +90,8 @@
</view>
</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx"
type="line"></uni-section>
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx" type="line">
</uni-section>
<view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.bank_account"
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 0)">
@ -101,10 +104,11 @@
</block>
</view>
<view class="contract">
<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">
<view class="title">电子合同</view>
<view v-if="userInfo.contract&&userInfo.contract.status" class="card">
<view v-if="userInfo.contract&&userInfo.is_contract&&userInfo.contract.status" class="card">
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx"
type="line"></uni-section>
<view class="c_text">性别{{userInfo.sex==1?'男':'女'}}</view>
@ -112,25 +116,33 @@
<view class="c_text">联系电话{{userInfo.phone}}</view>
<view class="c_text">合同类型{{userInfo.contract&&userInfo.contract.contract_type_name}}</view>
<view class="c_text">合同编号{{userInfo.contract&&userInfo.contract.contract_no}}</view>
<u-line v-if="userInfo.contract&&userInfo.contract.file" color="#999999FF" style="margin: 31rpx 0;"></u-line>
<u-line v-if="userInfo.contract&&userInfo.contract.file" color="#999999FF" style="margin: 31rpx 0;">
</u-line>
<view v-if="userInfo.contract&&userInfo.contract.file" class="contract_box">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">合同</view>
<view class="name">{{userInfo.contract.contract_type_name||'合同'}}</view>
<view>
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text>
</view>
</view>
</view>
<view class="right" @click="naviToContract(userInfo.contract.contract_no)">
<!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
</view>
<picker v-if="!userInfo.is_contract&&!userInfo.contract" :range="contractTypeList" range-key="name" @change="changeType">
<button class="btn">发起合同</button>
</view>
<picker v-if="!userInfo.is_contract&&!userInfo.contract" :range="contractTypeList" range-key="name"
@change="changeType">
<button class="btn">生成合同</button>
</picker>
<view v-if="userInfo.contract&&userInfo.contract.check_status==1">
<button class="btn tips_center">合同已发起,请等待审核</button></view>
<view v-if="userInfo.contract&&userInfo.contract.check_status==2" class="card">
<button class="btn tips_center">合同已生成,请等待审核</button>
</view>
<view v-if="!userInfo.is_contract&&userInfo.contract&&userInfo.contract.check_status==2" class="card">
<view class="contract_box send">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
@ -148,7 +160,7 @@
<button class="send_btn tips_center" v-else>{{cTimerCount+'秒后可继续发送合同'}}</button>
</view>
</view>
<view v-if="userInfo.contract&&userInfo.contract.check_status==3" class="card">
<view v-if="!userInfo.is_contract&&userInfo.contract&&userInfo.contract.check_status==3" class="card">
<view class="contract_box send">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
@ -173,10 +185,24 @@
</template>
<script>
import { Toast } from '@/libs/uniApi.js'
import { companyUserDetail } from "@/api/company.js"
import { loginSetInfo, userDraftingcontracts, userInitiateContract, userPostsms } from "@/api/oaUser.js"
import { dictDataLists } from "@/api/oaPbulic.js"
import {
Toast
} from '@/libs/uniApi.js'
import {
companyUserDetail
} from "@/api/company.js"
import {
loginSetInfo,
userDraftingcontracts,
userInitiateContract,
userPostsms
} from "@/api/oaUser.js"
import {
dictDataLists
} from "@/api/oaPbulic.js"
import {
download_file
} from "@/api/junziqian.js"
export default {
onReady() {
uni.setNavigationBarColor({
@ -215,6 +241,18 @@
}
},
methods: {
naviToContract(contract_no) {
download_file({
applyNo: contract_no
}).then(res => {
if (res.code != 1) {
Toast(res.msg)
}
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
})
})
},
naviTo(url) {
url ?
uni.navigateTo({
@ -250,22 +288,22 @@
})
this.contractTypeList = res.data;
},
//
//
async createContract(data) {
let res = await userInitiateContract({
party_b: data.party_b,
contract_type: data.contract_type,
type: data.type
})
Toast('合同已发起')
Toast('合同已生成')
this.loadUserDetail();
},
//
//
async addContract(data) {
let res = await userDraftingcontracts({
id: this.userInfo.id
});
Toast('合同已生成');
Toast('合同已发送');
this.loadUserDetail();
if (this.userInfo.contract.check_status == 3) {
this.timerCount = 60;
@ -402,6 +440,7 @@
color: #F9AA32;
}
}
.popup {
width: 500rpx;
height: 300rpx;
@ -410,18 +449,22 @@
display: flex;
flex-direction: column;
justify-content: space-between;
.p_title {
margin-top: 20rpx;
text-align: center;
font-weight: bold;
font-size: 33rpx;
}
.p_body {
margin: 28rpx;
}
.p_button {
display: flex;
border-top: 1rpx solid #ccc;
view {
flex: 1;
height: 80rpx;
@ -429,6 +472,7 @@
text-align: center;
border-left: 1rpx solid #ccc;
color: $theme-oa-color;
&:nth-child(1) {
border-left: none;
color: #333;
@ -466,6 +510,7 @@
.contract {
margin-bottom: 28rpx;
.title {
width: 694rpx;
}
@ -535,9 +580,11 @@
}
}
.send {
padding-top: 28rpx;
}
.send_btn {
width: 100%;
height: 84rpx;
@ -547,6 +594,7 @@
line-height: 80rpx;
text-align: center;
}
.tips_center {
background-color: #666;
color: #eee;

View File

@ -4,7 +4,7 @@
<u--form labelPosition="left" :model="formData" ref="archives">
<!-- <view class="item" style="margin-top: 30rpx;">
<view class="title">基本信息</view>
<u-form-item labelWidth="auto" label="户主姓名" required prop="name" borderBottom>
<u-form-item labelWidth="auto" label="姓名" required prop="name" borderBottom>
<u--input readonly v-model="formData.name" placeholder="请输入姓名"></u--input>
</u-form-item>
<u-form-item label="性别" required prop="sex" borderBottom>