更新,修复bug
This commit is contained in:
parent
96cf8fbe79
commit
f1ed72008c
@ -40,7 +40,9 @@
|
||||
props: {
|
||||
datas: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: function(){
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@ -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": {}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
// 是否显示查看和更新按钮
|
||||
@ -72,7 +77,7 @@
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
if(url){
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
@ -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>
|
||||
@ -161,27 +167,32 @@
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.body{
|
||||
.body {
|
||||
flex: 1;
|
||||
.t_top{
|
||||
|
||||
.t_top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 18rpx;
|
||||
.name{
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
.mobile{
|
||||
|
||||
.mobile {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.t_bottom{
|
||||
|
||||
.t_bottom {
|
||||
width: 500rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
.address{
|
||||
|
||||
.address {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
@ -196,13 +207,15 @@
|
||||
margin-top: 20rpx;
|
||||
font-size: 25rpx;
|
||||
|
||||
.right{
|
||||
.right {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
.look{
|
||||
|
||||
.look {
|
||||
color: $theme-oa-color;
|
||||
}
|
||||
.update{
|
||||
|
||||
.update {
|
||||
color: #34A853;
|
||||
margin-right: 38rpx;
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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({
|
||||
@ -192,7 +218,7 @@
|
||||
typeShow: false,
|
||||
timer: null, // 计时器
|
||||
timerCount: 0, //倒计时
|
||||
updateForm:{
|
||||
updateForm: {
|
||||
is_captain: 0,
|
||||
},
|
||||
userInfo: {
|
||||
@ -208,13 +234,25 @@
|
||||
this.initContractTypeList();
|
||||
this.loadUserDetail();
|
||||
},
|
||||
onShow() { },
|
||||
computed:{
|
||||
cTimerCount(){
|
||||
onShow() {},
|
||||
computed: {
|
||||
cTimerCount() {
|
||||
return this.timerCount;
|
||||
}
|
||||
},
|
||||
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({
|
||||
@ -226,7 +264,7 @@
|
||||
this.show = true;
|
||||
},
|
||||
// 更新信息
|
||||
async updateInfo(){
|
||||
async updateInfo() {
|
||||
let res = await loginSetInfo({
|
||||
user_id: this.userInfo.id,
|
||||
is_captain: this.updateForm.is_captain
|
||||
@ -235,43 +273,43 @@
|
||||
Toast('更新成功');
|
||||
this.show = false;
|
||||
},
|
||||
changeType(e){
|
||||
changeType(e) {
|
||||
// console.log(this.contractTypeList[e.detail.value]);
|
||||
this.createContract({
|
||||
party_b:this.userInfo.id,
|
||||
contract_type:this.contractTypeList[e.detail.value].id,
|
||||
type:2 //1-公司,2-个人
|
||||
party_b: this.userInfo.id,
|
||||
contract_type: this.contractTypeList[e.detail.value].id,
|
||||
type: 2 //1-公司,2-个人
|
||||
})
|
||||
},
|
||||
// 初始化合同类型
|
||||
async initContractTypeList(){
|
||||
async initContractTypeList() {
|
||||
let res = await dictDataLists({
|
||||
type_id: 7
|
||||
})
|
||||
this.contractTypeList = res.data;
|
||||
},
|
||||
// 发起合同
|
||||
async createContract(data){
|
||||
// 生成合同
|
||||
async createContract(data) {
|
||||
let res = await userInitiateContract({
|
||||
party_b:data.party_b,
|
||||
contract_type:data.contract_type,
|
||||
type:data.type
|
||||
party_b: data.party_b,
|
||||
contract_type: data.contract_type,
|
||||
type: data.type
|
||||
})
|
||||
Toast('合同已发起')
|
||||
Toast('合同已生成')
|
||||
this.loadUserDetail();
|
||||
},
|
||||
// 生成合同
|
||||
async addContract(data){
|
||||
// 发送合同
|
||||
async addContract(data) {
|
||||
let res = await userDraftingcontracts({
|
||||
id: this.userInfo.id
|
||||
});
|
||||
Toast('合同已生成');
|
||||
Toast('合同已发送');
|
||||
this.loadUserDetail();
|
||||
if(this.userInfo.contract.check_status==3){
|
||||
if (this.userInfo.contract.check_status == 3) {
|
||||
this.timerCount = 60;
|
||||
this.timer = setInterval(()=>{
|
||||
this.timer = setInterval(() => {
|
||||
this.timerCount--;
|
||||
if(this.timerCount==0){
|
||||
if (this.timerCount == 0) {
|
||||
clearInterval(this.timer);
|
||||
this.loadUserDetail();
|
||||
}
|
||||
@ -280,12 +318,12 @@
|
||||
this.naviTo('/subpkg/submit/submit');
|
||||
},
|
||||
// 发送短信
|
||||
async getPostsms(){
|
||||
if(this.timerCount==0){
|
||||
async getPostsms() {
|
||||
if (this.timerCount == 0) {
|
||||
this.timerCount = 60;
|
||||
this.timer = setInterval(()=>{
|
||||
this.timer = setInterval(() => {
|
||||
this.timerCount--;
|
||||
if(this.timerCount==0){
|
||||
if (this.timerCount == 0) {
|
||||
clearInterval(this.timer);
|
||||
this.loadUserDetail();
|
||||
}
|
||||
@ -402,7 +440,8 @@
|
||||
color: #F9AA32;
|
||||
}
|
||||
}
|
||||
.popup{
|
||||
|
||||
.popup {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
// padding: 28rpx;
|
||||
@ -410,26 +449,31 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.p_title{
|
||||
|
||||
.p_title {
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
.p_body{
|
||||
|
||||
.p_body {
|
||||
margin: 28rpx;
|
||||
}
|
||||
.p_button{
|
||||
|
||||
.p_button {
|
||||
display: flex;
|
||||
border-top: 1rpx solid #ccc;
|
||||
view{
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-left: 1rpx solid #ccc;
|
||||
color: $theme-oa-color;
|
||||
&:nth-child(1){
|
||||
|
||||
&:nth-child(1) {
|
||||
border-left: none;
|
||||
color: #333;
|
||||
}
|
||||
@ -466,7 +510,8 @@
|
||||
|
||||
.contract {
|
||||
margin-bottom: 28rpx;
|
||||
.title{
|
||||
|
||||
.title {
|
||||
width: 694rpx;
|
||||
}
|
||||
|
||||
@ -535,10 +580,12 @@
|
||||
}
|
||||
|
||||
}
|
||||
.send{
|
||||
|
||||
.send {
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
.send_btn{
|
||||
|
||||
.send_btn {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
@ -547,7 +594,8 @@
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.tips_center{
|
||||
|
||||
.tips_center {
|
||||
background-color: #666;
|
||||
color: #eee;
|
||||
}
|
||||
@ -565,7 +613,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tips_center{
|
||||
.tips_center {
|
||||
background-color: #666;
|
||||
color: #eee;
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user