优化
This commit is contained in:
parent
cad8ac898e
commit
253fa0a543
@ -10,6 +10,11 @@ export const companyMine = (data) => oahttp.get('/company/mine', data)
|
||||
*/
|
||||
export const companyIndex = (data) => oahttp.get('/company/index', data)
|
||||
|
||||
/**
|
||||
* 未签约公司列表
|
||||
*/
|
||||
export const companyUnsigned = (data) => oahttp.get('/company/unsigned', data)
|
||||
|
||||
/**
|
||||
* 公司详情
|
||||
*/
|
||||
@ -28,4 +33,15 @@ export const companyUser = (data) => oahttp.get('/company/users', data)
|
||||
/**
|
||||
* 人员详情
|
||||
*/
|
||||
export const companyUserDetail = (data) => oahttp.get('/company/user', data)
|
||||
export const companyUserDetail = (data) => oahttp.get('/company/user', data)
|
||||
|
||||
|
||||
/**
|
||||
* 人员详情
|
||||
*/
|
||||
export const accountMonthList = (data) => oahttp.get('/account_log/company_year_count', data)
|
||||
|
||||
/**
|
||||
* 人员详情
|
||||
*/
|
||||
export const accountDateList = (data) => oahttp.get('/account_log/company_lists', data)
|
@ -34,4 +34,9 @@ export const commonBrigade = (data) => oahttp.get('/common/brigade', data)
|
||||
/**
|
||||
* 获取商机分类
|
||||
*/
|
||||
export const categoryBusinessList = (data) => oahttp.get('/CategoryBusiness/list', data)
|
||||
export const categoryBusinessList = (data) => oahttp.get('/CategoryBusiness/list', data)
|
||||
|
||||
/**
|
||||
* 字典列表
|
||||
*/
|
||||
export const dictDataLists = (data) => oahttp.get('/common/dict_data_lists', data)
|
@ -189,6 +189,7 @@
|
||||
|
||||
}
|
||||
this.company = res.data.company;
|
||||
uni.$emit('companyInfo', this.company); //发送全局事件
|
||||
this.user = res.data.user;
|
||||
this.contract = res.data.contract;
|
||||
this.skeleton = false;
|
||||
|
249
components/companyFinance/companyFinance.vue
Normal file
249
components/companyFinance/companyFinance.vue
Normal file
@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view class="c_card">
|
||||
<view class="f_card">
|
||||
<view class="item">
|
||||
<view>公司账户余额(元)</view>
|
||||
<view class="price" v-if="company.deposit">{{cCount(company.deposit)}}</view>
|
||||
<view class="price" v-else>0.00</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view>公司收益金额(元)</view>
|
||||
<view class="price" v-if="company.company_money">{{cCount(company.company_money)}}</view>
|
||||
<view class="price" v-else>0.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f_nav">
|
||||
<view class="title">账单流水</view>
|
||||
<view class="right">
|
||||
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">日账单</view>
|
||||
<view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f_list">
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<view class="top">
|
||||
账单日期: {{current?item.month:item.create_time}}
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="text">
|
||||
<view class="t_item" v-if="current==0">
|
||||
<view>任务名称:</view>
|
||||
<view class="tips">{{item.remark}}</view>
|
||||
</view>
|
||||
<view class="t_item">
|
||||
<view>收益来源:</view>
|
||||
<view class="tips">{{current?item.remark:item.type_desc}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { accountMonthList, accountDateList } from "@/api/company.js"
|
||||
export default {
|
||||
name: "companyFinance",
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
list: [],
|
||||
company:{},
|
||||
loadConfig:{
|
||||
page: 1,
|
||||
limit: 15,
|
||||
lastpage: '',
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
uni.$on('companyInfo', (e)=>{
|
||||
this.company = e;
|
||||
this.initLoad();
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
initLoad(){
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.list = [];
|
||||
this.initList();
|
||||
},
|
||||
async initList(){
|
||||
if(this.loadConfig.status=="nomore")return;
|
||||
this.loadConfig.status="loading";
|
||||
let res;
|
||||
if(this.current==0) res = await accountDateList({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit,
|
||||
company_id: this.$store.state.app.userInfo.company_id
|
||||
})
|
||||
else res = await accountMonthList({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit,
|
||||
company_id: this.$store.state.app.userInfo.company_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]
|
||||
},
|
||||
// 格式化数据
|
||||
cCount(value=0){
|
||||
try{
|
||||
return value.toFixed(2);
|
||||
}catch(e){
|
||||
return "0.00";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.c_card {
|
||||
padding-top: 28rpx;
|
||||
|
||||
.f_card {
|
||||
margin: 0 auto;
|
||||
width: 694rpx;
|
||||
height: 158rpx;
|
||||
background: #3175F9;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
opacity: 1;
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
|
||||
&:nth-child(1) {
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 49rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.f_nav {
|
||||
margin: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
width: 6rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
display: inline-block;
|
||||
background-color: #3175F9;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
|
||||
.btn {
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #3175F9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.f_list {
|
||||
.item {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
width: 694rpx;
|
||||
// height: 238rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
opacity: 1;
|
||||
padding: 28rpx;
|
||||
|
||||
.top {
|
||||
margin-bottom: 28rpx;
|
||||
font-size: 25rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
|
||||
&:before {
|
||||
display: inline-block;
|
||||
content: '账单详情';
|
||||
width: 137rpx;
|
||||
height: 49rpx;
|
||||
line-height: 49rpx;
|
||||
text-align: center;
|
||||
background: #3274F9;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
color: #fff;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.text {
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 39rpx;
|
||||
.t_item{
|
||||
display: flex;
|
||||
&:nth-child(1){
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.tips{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
.price{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #F02828;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,224 +1,235 @@
|
||||
<template>
|
||||
<view class="card">
|
||||
<view class="title">开设店铺</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="有无门面" required prop="shop_front" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.shop_front" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="门面面积" required prop="area" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.area" placeholder="请输入门面面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="经营地点" required prop="place" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.place" placeholder="请输入经营地点"></u--input>
|
||||
</u-form-item>
|
||||
<picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType">
|
||||
<u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom>
|
||||
<u--input :value="storeTypeList[formData.type]" placeholder="请选择经营类型" disabled
|
||||
disabledColor="#fff"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</picker>
|
||||
<u-form-item labelWidth="auto" label="门面环境" required prop="environment" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.environment" placeholder="请输入门面环境"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="服务对象" required prop="service" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.service" placeholder="请输入服务对象"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无营业资质" required prop="qualification" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.qualification" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无进货渠道" required prop="stock" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.stock" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="店铺规模" required prop="scale" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.scale" placeholder="请输入店铺规模"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="商品来源" required prop="source" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.source" placeholder="请输入商品来源"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无线上展示" required prop="online_display" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.online_display" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="brand" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.brand" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="库存情况" required prop="repertory" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.repertory" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="appeal" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||
count></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
area: '',
|
||||
place: '',
|
||||
type: '',
|
||||
environment: '',
|
||||
service: '',
|
||||
qualification: '',
|
||||
stock: '',
|
||||
scale: '',
|
||||
online_display: '',
|
||||
brand: '',
|
||||
repertory: '',
|
||||
appeal: '',
|
||||
},
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initRules();
|
||||
if (this.$props.readonly && this.$props.datas) {
|
||||
this.formData = this.$props.datas;
|
||||
console.log(this.formData);
|
||||
let keys = Object.keys(this.formData);
|
||||
keys.forEach(item => {
|
||||
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
||||
})
|
||||
console.log(this.formData);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
datas(newValue, oldValue) {
|
||||
if (this.$props.readonly && newValue) {
|
||||
this.formData = this.$props.datas;
|
||||
let keys = Object.keys(this.formData);
|
||||
keys.forEach(item => {
|
||||
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化校验
|
||||
initRules() {
|
||||
let arr = Object.keys(this.formData);
|
||||
arr.forEach(key => {
|
||||
this.rules[key] = {
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs.breedingForm.clearValidate(rule.field);
|
||||
value.trim() !== '' ? callback() : callback('不能为空');
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
})
|
||||
},
|
||||
// 校验
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();
|
||||
},
|
||||
// 选择经营类型
|
||||
changeType(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.type = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
&::before {
|
||||
width: 8rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #3175f9;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plus {
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
<template>
|
||||
<view class="card">
|
||||
<view class="title">开设店铺</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="有无门面" required prop="shop_front" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.shop_front" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="门面面积" required prop="area" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.area" placeholder="请输入门面面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="经营地点" required prop="place" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.place" placeholder="请输入经营地点"></u--input>
|
||||
</u-form-item>
|
||||
<picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType">
|
||||
<u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom>
|
||||
<u--input :value="storeTypeList[formData.type]" placeholder="请选择经营类型" disabled
|
||||
disabledColor="#fff"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</picker>
|
||||
<u-form-item labelWidth="auto" label="门面环境" required prop="environment" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.environment" placeholder="请输入门面环境"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="服务对象" required prop="service" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.service" placeholder="请输入服务对象"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无营业资质" required prop="qualification" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.qualification" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无进货渠道" required prop="stock" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.stock" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="店铺规模" required prop="scale" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.scale" placeholder="请输入店铺规模"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="商品来源" required prop="source" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.source" placeholder="请输入商品来源"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无线上展示" required prop="online_display" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.online_display" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="brand" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.brand" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="库存情况" required prop="repertory" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.repertory" 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">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="appeal" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||
count></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
area: '',
|
||||
place: '',
|
||||
type: '',
|
||||
environment: '',
|
||||
service: '',
|
||||
qualification: '',
|
||||
stock: '',
|
||||
scale: '',
|
||||
online_display: '',
|
||||
brand: '',
|
||||
repertory: '',
|
||||
appeal: '',
|
||||
},
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initRules();
|
||||
if (this.$props.readonly && this.$props.datas) {
|
||||
this.formData = this.$props.datas;
|
||||
console.log(this.formData);
|
||||
let keys = Object.keys(this.formData);
|
||||
keys.forEach(item => {
|
||||
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
||||
})
|
||||
// console.log(this.formData);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
datas(newValue, oldValue) {
|
||||
if (this.$props.readonly && newValue) {
|
||||
this.formData = this.$props.datas;
|
||||
let keys = Object.keys(this.formData);
|
||||
keys.forEach(item => {
|
||||
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化校验
|
||||
initRules() {
|
||||
let arr = Object.keys(this.formData);
|
||||
arr.forEach(key => {
|
||||
this.rules[key] = {
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs.breedingForm.clearValidate(rule.field);
|
||||
value.trim() !== '' ? callback() : callback('不能为空');
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
})
|
||||
},
|
||||
// 校验
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();
|
||||
},
|
||||
// 选择经营类型
|
||||
changeType(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.type = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
&::before {
|
||||
width: 8rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #3175f9;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plus {
|
||||
margin: 22rpx 0;
|
||||
|
||||
// margin-bottom: 40rpx;
|
||||
|
||||
width: 100%;
|
||||
|
||||
height: 64rpx;
|
||||
|
||||
line-height: 64rpx;
|
||||
|
||||
background: $theme-oa-color;
|
||||
|
||||
border-radius: 14rpx;
|
||||
|
||||
font-size: 28rpx;
|
||||
|
||||
color: #fff;
|
||||
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
</style>
|
@ -355,6 +355,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "captain/captain",
|
||||
"style": {
|
||||
"navigationBarTitleText": "队长列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}]
|
||||
}],
|
||||
"globalStyle": {
|
||||
|
@ -226,6 +226,12 @@ export const oaHomeData = [
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
// url: '/subpkg/taskAdmin/taskAdmin',
|
||||
},
|
||||
{
|
||||
text: '档案管理',
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
url: '/subpkg/captain/captain',
|
||||
admin: true
|
||||
},
|
||||
{
|
||||
text: '档案管理',
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
|
@ -213,6 +213,7 @@
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 25rpx;
|
||||
|
||||
.circle {
|
||||
width: 11rpx;
|
||||
|
181
subpkg/captain/captain.vue
Normal file
181
subpkg/captain/captain.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="card" v-for="item in list" :key="item.id" @click="navTo('/subpkg/archives/archives?id='+item.id)">
|
||||
<view class="top">
|
||||
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'"
|
||||
width="112.28rpx" height="112.28rpx" shape="circle">
|
||||
</u--image>
|
||||
<view class="text">
|
||||
<view class="name">{{item.nickname}}</view>
|
||||
<view class="mobile">
|
||||
<uni-icons type="phone" color="#999999FF"></uni-icons>联系方式-<text>{{item.account}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="left">
|
||||
<view class="circle"></view>
|
||||
<view class="green">片区</view>
|
||||
<view class="b_l_text">{{item.area_name+item.street_name}}</view>
|
||||
</view>
|
||||
<view class="right">{{'管理户数: '+item.informationg_count+" 户"}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { companyUser } from "@/api/company.js"
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
lastpage: '',
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.initLoad()
|
||||
},
|
||||
onShow() {},
|
||||
onReachBottom() {
|
||||
this.loadList();
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
initLoad() {
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.list = [];
|
||||
this.loadList();
|
||||
},
|
||||
async loadList() {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading";
|
||||
let res = await companyUser({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit,
|
||||
company_id: this.$store.state.app.userInfo.company_id,
|
||||
is_captain: 1
|
||||
})
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.data.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
}
|
||||
this.list = [...this.list, ...res.data.data];
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 28rpx;
|
||||
padding: 28rpx;
|
||||
width: 694rpx;
|
||||
height: 221rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
opacity: 1;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
// align-items: center;
|
||||
|
||||
.avatar {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
|
||||
.u_avatar {
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.mobile {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.circle {
|
||||
width: 11rpx;
|
||||
height: 11rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #34A853;
|
||||
margin-right: 10rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.green {
|
||||
font-weight: 400;
|
||||
color: #34A853;
|
||||
line-height: 0rpx;
|
||||
margin-right: 18rpx;
|
||||
-webkit-background-clip: text;
|
||||
}
|
||||
.b_l_text{
|
||||
width: 360rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
color: #3274F9;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,47 +1,63 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="top_box">
|
||||
<view class="item" :class="current==0?'active':''" @click="current=0">我的公司</view>
|
||||
<view class="item" :class="current==1?'active':''" @click="current=1">签约公司</view>
|
||||
</view>
|
||||
<view class="company" v-show="current==0">
|
||||
<company></company>
|
||||
</view>
|
||||
<view class="company_list" v-show="current==1">
|
||||
<view class="info_card" v-for="item in companyList" :key="item.id">
|
||||
<view class="top" @click="naviTo('/subpkg/companySign/companySign?id='+item.id)">
|
||||
<view>
|
||||
<view class="info_name">{{item.company_name}}</view>
|
||||
<view class="info_type">{{item.company_type_name}}</view>
|
||||
</view>
|
||||
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
||||
</view>
|
||||
<u-line ></u-line>
|
||||
<view class="bottom">
|
||||
<image src="../../static/img/contract/company.png"></image>
|
||||
<view class="text">
|
||||
<view>主要联系人:{{item.master_name}}</view>
|
||||
<view @click="copyPhone(item.master_phone)">联系方式:{{item.master_phone}}</view>
|
||||
<view style="display: flex;">
|
||||
<view class="">区县乡镇:</view>
|
||||
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
|
||||
</view>
|
||||
<!-- <view>片区经理:</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed_box">
|
||||
<view class="top_box">
|
||||
<view class="item" :class="current==0?'active':''" @click="current=0">我的公司</view>
|
||||
<view class="item" :class="current==1?'active':''" @click="current=1">签约公司</view>
|
||||
<view class="item" :class="current==2?'active':''" @click="current=2">公司财务</view>
|
||||
<!-- <view class="item" :class="current==3?'active':''" @click="current=3">公司财务</view> -->
|
||||
</view>
|
||||
<view class="top_box top_box2" v-if="current==1">
|
||||
<view class="item" :class="currentChild==0?'active':''" @click="currentChild=0;initLoad()">已签约</view>
|
||||
<view class="item" :class="currentChild==1?'active':''" @click="currentChild=1;initLoad()">未签约</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="company_info" v-show="current==0">
|
||||
<company></company>
|
||||
</view>
|
||||
<view class="company_list" v-show="current==1">
|
||||
<view class="info_card" v-for="item in companyList" :key="item.id">
|
||||
<view class="top" @click="naviTo('/subpkg/companySign/companySign?id='+item.id)">
|
||||
<view>
|
||||
<view class="info_name" :class="item.is_contract?'have':'no'">{{item.company_name}}</view>
|
||||
<view class="info_type">{{item.company_type_name}}</view>
|
||||
</view>
|
||||
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
||||
</view>
|
||||
<u-line ></u-line>
|
||||
<view class="bottom">
|
||||
<image src="../../static/img/contract/company.png"></image>
|
||||
<view class="text">
|
||||
<view>主要联系人:{{item.master_name}}</view>
|
||||
<view @click="copyPhone(item.master_phone)">联系方式:{{item.master_phone}}</view>
|
||||
<view style="display: flex;">
|
||||
<view class="">区县乡镇:</view>
|
||||
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
|
||||
</view>
|
||||
<!-- <view>片区经理:</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
<view class="company_info" v-show="current==2">
|
||||
<companyFinance></companyFinance>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { companyIndex } from "@/api/company.js"
|
||||
import { companyIndex, companyUnsigned } from "@/api/company.js"
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
import companyFinance from "@/components/companyFinance/companyFinance.vue"
|
||||
export default {
|
||||
components:{companyFinance},
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
currentChild: 0,
|
||||
loadConfig:{
|
||||
page: 1,
|
||||
limit: 15,
|
||||
@ -62,11 +78,22 @@
|
||||
this.loadCompanyList();
|
||||
},
|
||||
methods: {
|
||||
initLoad(){
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.companyList = [];
|
||||
this.loadCompanyList();
|
||||
},
|
||||
// 加载公司列表
|
||||
async loadCompanyList(){
|
||||
if(this.loadConfig.status=="nomore")return;
|
||||
this.loadConfig.status="loading"
|
||||
let res = await companyIndex({
|
||||
this.loadConfig.status="loading";
|
||||
let res;
|
||||
if(this.currentChild==0) res = await companyIndex({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
else res = await companyUnsigned({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
@ -106,12 +133,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed_box{
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
/* #ifdef APP-PLUS */
|
||||
top:0;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
top:44px;
|
||||
/* #endif */
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
.top_box{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
|
||||
.item{
|
||||
width: 175rpx;
|
||||
width: 155rpx;
|
||||
height: 53rpx;
|
||||
background: #F5F5F5FF;
|
||||
color: #999999FF;
|
||||
@ -120,18 +159,26 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 28rpx;
|
||||
margin: 28rpx 0;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
.active{
|
||||
background: $theme-oa-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.company{
|
||||
|
||||
.top_box2{
|
||||
.item{
|
||||
margin-top: 0;
|
||||
width: 120rpx;
|
||||
}
|
||||
}
|
||||
.company_info{
|
||||
margin-top: 110rpx;
|
||||
}
|
||||
.company_list{
|
||||
padding-bottom: 32rpx;
|
||||
margin-top: 190rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -152,6 +199,28 @@
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.have{
|
||||
&::before{
|
||||
content: "已签约";
|
||||
border-radius: 14rpx;
|
||||
border: 5rpx solid #5ac725;
|
||||
color: #5ac725;
|
||||
padding: 3rpx 6rpx;
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.no{
|
||||
&::before{
|
||||
content: "未签约";
|
||||
border-radius: 14rpx;
|
||||
border: 5rpx solid #f56c6c;
|
||||
color: #f56c6c;
|
||||
padding: 3rpx 6rpx;
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.info_type{
|
||||
font-size: 25rpx;
|
||||
font-weight: 500;
|
||||
|
@ -42,7 +42,7 @@
|
||||
</view>
|
||||
<u-line color="#999999FF"></u-line>
|
||||
<view class="bottom" style="margin-top: 28rpx;">
|
||||
<button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button>
|
||||
<!-- <button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button> -->
|
||||
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button>
|
||||
</view>
|
||||
</view>
|
||||
@ -89,7 +89,7 @@ export default {
|
||||
let res = await companyUser({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit,
|
||||
company_id: this.$store.state.app.userInfo.admin.company_id
|
||||
company_id: this.$store.state.app.userInfo.company_id
|
||||
})
|
||||
this.loadConfig.status="loadmore"
|
||||
if(res.data.data.length<this.loadConfig.limit){
|
||||
|
@ -104,7 +104,7 @@
|
||||
<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.check_status==2" class="card">
|
||||
<view v-if="userInfo.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>
|
||||
@ -125,13 +125,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button v-if="!userInfo.is_contract&&!userInfo.contract" class="btn" @click="createContract">发起合同</button>
|
||||
<view v-if="userInfo.contract&&userInfo.contract.check_status==1" class="card">
|
||||
<view class="contract_box">
|
||||
<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">
|
||||
<view class="contract_box send">
|
||||
<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>
|
||||
@ -139,9 +143,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||
<button>发送合同</button>
|
||||
<view class="bottom">
|
||||
<button class="send_btn" @click="addContract">发送合同</button>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -150,6 +157,7 @@
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
import { companyUserDetail } from "@/api/company.js"
|
||||
import { loginSetInfo, userDraftingcontracts, userInitiateContract } from "@/api/oaUser.js"
|
||||
import { dictDataLists } from "@/api/oaPbulic.js"
|
||||
export default {
|
||||
onReady() {
|
||||
uni.setNavigationBarColor({
|
||||
@ -162,6 +170,9 @@
|
||||
id: '',
|
||||
skeleton: true,
|
||||
show: false,
|
||||
typeShow: false,
|
||||
timer: null, // 计时器
|
||||
timerCount: 0, //倒计时
|
||||
updateForm:{
|
||||
is_captain: 0,
|
||||
},
|
||||
@ -169,15 +180,16 @@
|
||||
qualification: {},
|
||||
contract: {},
|
||||
roles: {}
|
||||
}
|
||||
},
|
||||
contractTypeList: []
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) this.id = options.id;
|
||||
},
|
||||
onShow() {
|
||||
this.initContractTypeList();
|
||||
this.loadUserDetail();
|
||||
},
|
||||
onShow() { },
|
||||
methods: {
|
||||
naviTo(url) {
|
||||
url ?
|
||||
@ -199,14 +211,45 @@
|
||||
Toast('更新成功');
|
||||
this.show = false;
|
||||
},
|
||||
// 生成合同
|
||||
async createContract(){
|
||||
let res = await userInitiateContract({
|
||||
party_b:'',
|
||||
contract_type:'',
|
||||
type:''
|
||||
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:1 //1-公司,2-个人
|
||||
})
|
||||
Toast('合同已生成')
|
||||
},
|
||||
// 初始化合同类型
|
||||
async initContractTypeList(){
|
||||
let res = await dictDataLists({
|
||||
type_id: 7
|
||||
})
|
||||
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('合同已发起')
|
||||
this.loadUserDetail();
|
||||
},
|
||||
// 生成合同
|
||||
async addContract(data){
|
||||
if(!this.timer){
|
||||
this.timerCount = 60;
|
||||
let res = await userDraftingcontracts({
|
||||
id: this.userInfo.id
|
||||
});
|
||||
Toast('合同已生成');
|
||||
this.loadUserDetail();
|
||||
this.timer = setInterval(()=>{
|
||||
this.timerCount--;
|
||||
if(this.timerCount==0)clearInterval(this.timer);
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
loadUserDetail() {
|
||||
if (!this.id) return;
|
||||
@ -296,7 +339,7 @@
|
||||
width: 284rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #3274F9;
|
||||
color: $theme-oa-color;
|
||||
// white-space: nowrap; /* 不换行 */
|
||||
// overflow: hidden; /* 将超出文本隐藏 */
|
||||
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
||||
@ -339,7 +382,7 @@
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-left: 1rpx solid #ccc;
|
||||
color: #3274F9;
|
||||
color: $theme-oa-color;
|
||||
&:nth-child(1){
|
||||
border-left: none;
|
||||
color: #333;
|
||||
@ -377,6 +420,10 @@
|
||||
|
||||
.contract {
|
||||
margin-bottom: 28rpx;
|
||||
.title{
|
||||
width: 694rpx;
|
||||
}
|
||||
|
||||
|
||||
.card {
|
||||
padding-top: 0;
|
||||
@ -442,6 +489,18 @@
|
||||
}
|
||||
|
||||
}
|
||||
.send{
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
.send_btn{
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
color: #fff;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
@ -455,5 +514,10 @@
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tips_center{
|
||||
background-color: #666;
|
||||
color: #eee;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -176,7 +176,11 @@
|
||||
// 初始化商机分类
|
||||
async initCategoryBusinessList() {
|
||||
let res = await categoryBusinessList();
|
||||
this.demandList = res.data;
|
||||
// this.demandList = res.data;
|
||||
this.demandList = res.data.filter(item=>item.id==6);
|
||||
this.demandList[0].children = this.demandList[0].children.filter(item=>item.id==7||item.id==8);
|
||||
this.demandListChild = this.demandList[0].children;
|
||||
// console.log(this.demandList);
|
||||
},
|
||||
// 选择更多需求
|
||||
changeHandler(e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user