更新,修复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',
// url: '/subpkg/fixedAssets/fixedAssets',
admin: true
},
// {
// text: '固定资产',
// icon: prefix + 'oa/wcsq@2x.png',
// url: '/subpkg/fixedAssets/fixedAssets',
// admin: true
// },
{
text: '合同管理',
icon: prefix + 'oa/cgsq@2x.png',

View File

@ -1,217 +1,230 @@
<template>
<view class="">
<view class="personnel_list">
<view class="item" v-for="(item, index) in list" :key="item.id">
<view class="top">
<image class="avatar" src="../../static/img/public/record.png"></image>
<view class="body">
<view class="t_top">
<view>姓名:<text class="name">{{item.name}}</text></view>
<view>电话:<text class="mobile">{{item.phone}}</text></view>
</view>
<view class="t_bottom">片区:<text class="address">{{item.address}}</text></view>
</view>
</view>
<u-line color="#cccccc"></u-line>
<view class="bottom">
<view>更新时间: {{item.create_time}}</view>
<view class="right" v-if="showView">
<view class="update" @click="navTo('/subpkg/updateArchives/updateArchives?id='+item.id)">
更新
</view>
<view class="look" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">
查看
</view>
</view>
</view>
</view>
<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>
<mybtn text="信息登记" v-if="showView" @click="navTo('/subpkg/newArchives/newArchives')"></mybtn>
</view>
<view class="">
<view class="personnel_list">
<view class="item" v-for="(item, index) in list" :key="item.id">
<view class="top">
<image class="avatar" src="../../static/img/public/record.png"></image>
<view class="body">
<view class="t_top">
<view>姓名:<text class="name">{{item.name}}</text></view>
<view>电话:<text class="mobile">{{item.phone}}</text></view>
</view>
<view class="t_bottom">片区:<text class="address">{{item.address}}</text></view>
</view>
</view>
<u-line color="#cccccc"></u-line>
<view class="bottom">
<view>更新时间: {{item.create_time}}</view>
<view class="right" v-if="showView">
<view class="update" @click="navTo('/subpkg/updateArchives/updateArchives?id='+item.id)">
更新
</view>
<view class="look" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">
查看
</view>
</view>
</view>
</view>
<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>
<mybtn text="信息登记" v-if="showView" @click="navTo('/subpkg/newArchives/newArchives')"></mybtn>
</view>
</template>
<script>
import { informationList } from "@/api/information.js"
import { Toast } from "../../libs/uniApi";
export default {
data() {
return {
user_id: -1,
list: [],
loadConfig: {
page: 1,
limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad(options) {
if (options.id) this.user_id = options.id;
else if (this.$store.state.app.userInfo.admin_id == 0) { //,id
this.user_id = this.$store.state.app.userInfo.id;
}
},
onShow() {
this.initLoadconfig();
this.loadInformationList();
},
computed: {
//
showView() {
return !this.$store.state.app.userInfo.admin_id && this.$store.state.app.userInfo.is_captain;
}
},
onReachBottom() {
this.loadInformationList();
},
methods: {
navTo(url) {
if(url){
uni.showLoading({
title: '加载中',
mask: true
})
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
}
})
}
else Toast('暂未开放');
},
initLoadconfig() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
},
async loadInformationList() {
let that = this;
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await informationList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
user_id: that.user_id
})
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
import {
informationList
} from "@/api/information.js"
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
user_id: -1,
list: [],
loadConfig: {
page: 1,
limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad(options) {
if (options.id) this.user_id = options.id;
else if (this.$store.state.app.userInfo.admin_id == 0) { //,id
this.user_id = this.$store.state.app.userInfo.id;
}
this.loadInformationList();
},
onShow() {
},
computed: {
//
showView() {
return !this.$store.state.app.userInfo.admin_id && this.$store.state.app.userInfo.is_captain;
}
},
onReachBottom() {
this.loadInformationList();
},
methods: {
navTo(url) {
if (url) {
uni.showLoading({
title: '加载中',
mask: true
})
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
}
})
} else Toast('暂未开放');
},
async initLoad() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.loadInformationList();
uni.stopPullDownRefresh();
},
async loadInformationList() {
let that = this;
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await informationList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
user_id: that.user_id
})
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data];
}
},
onPullDownRefresh() {
this.initLoad();
}
}
</script>
<style lang="scss">
.new_btn {
position: fixed;
bottom: 28rpx;
left: 50%;
transform: translate(-50%);
margin-top: 32rpx;
// margin-bottom: 40rpx;
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.new_btn {
position: fixed;
bottom: 28rpx;
left: 50%;
transform: translate(-50%);
margin-top: 32rpx;
// margin-bottom: 40rpx;
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.personnel_list {
padding: 28rpx 0;
margin-bottom: 130rpx;
.personnel_list {
padding: 28rpx 0;
margin-bottom: 130rpx;
.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;
.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%;
.top {
display: flex;
align-items: center;
width: 100%;
.avatar {
width: 120rpx;
height: 120rpx;
margin-right: 18rpx;
margin-bottom: 12rpx;
}
.avatar {
width: 120rpx;
height: 120rpx;
margin-right: 18rpx;
margin-bottom: 12rpx;
}
.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;
}
}
}
}
.body {
flex: 1;
.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;
}
}
.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;
}
}
}
}
.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

@ -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,10 +74,9 @@
userList: []
}
},
onLoad() {},
onShow() {
this.loadUserList()
},
onLoad() {
this.loadUserList()
},
methods: {
navTo(url) {
url ?
@ -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>

File diff suppressed because it is too large Load Diff

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>