首次登录没有头像

This commit is contained in:
zmj 2023-12-12 11:08:18 +08:00
parent 96d2552de2
commit 6dc0e69392
6 changed files with 611 additions and 622 deletions

View File

@ -7,7 +7,7 @@
<view class="price" v-else>0.00</view>
</view>
<view class="item" @click="navTo('/subpkg/withdrawDeposit/company')">
<view>公司收益总金额()</view>
<view>公司预计收益总金额()</view>
<view class="price" v-if="company.company_money">{{cCount(+company.company_money)}}</view>
<view class="price" v-else>0.00</view>
</view>
@ -45,9 +45,10 @@
<view class="t_item">
<view class="t_title">收益来源</view>
<view class="tips">
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
<text v-else-if="item.change_type==203" style="color: #ff7c32;">{{item.type_desc}}</text>
<text v-else="item.change_type==203">{{item.type_desc}}</text>
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
<text v-else-if="item.change_type==203"
style="color: #ff7c32;">{{item.type_desc}}</text>
<text v-else="item.change_type==203">{{item.type_desc}}</text>
</view>
</view>
</view>
@ -69,7 +70,7 @@
import {
accountMonthList,
accountDateList,
companyView
companyView
} from "@/api/company.js"
import {
Toast
@ -96,28 +97,30 @@
};
},
mounted() {
this.loadCompany();
this.loadCompany();
this.initLoad();
},
methods: {
async loadCompany(){
let res = await companyView();
this.company = res.data.company;
},
async loadCompany() {
let res = await companyView();
this.company = res.data.company;
},
navTo(url) {
if(url){
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success:(res)=> {
uni.hideLoading();
res.eventChannel.emit('company_money', { company_money: this.company.company_money })
}
})
}else Toast('暂未开放')
if (url) {
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success: (res) => {
uni.hideLoading();
res.eventChannel.emit('company_money', {
company_money: this.company.company_money
})
}
})
} else Toast('暂未开放')
},
initLoad() {
this.loadConfig.page = 1;
@ -251,7 +254,7 @@
&:before {
display: inline-block;
content: '账户收益';
content: '预计收益';
width: 137rpx;
height: 49rpx;
line-height: 49rpx;

View File

@ -270,7 +270,14 @@
};
},
async onLoad() {
// console.log('asdashg')
if (uni.getStorageSync('USER_INFO')) {
let userData = JSON.parse(uni.getStorageSync('USER_INFO'))
this.initUserInfo(userData);
// console.log(545)
}
console.log(7787878)
await this.$onLaunched;
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
this.options.data = bj;
@ -286,6 +293,10 @@
}
});
// #endif
},
onReachBottom() {
if (this.flag) return
@ -314,6 +325,9 @@
// }
// this.getUserIndex()
// this.getIndexList()
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
this.getOrderList();
console.log("show")

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,8 @@
<u--input v-model="formData.id_card" placeholder="请输入身份证号" @input="c_idcard"
type="idcard"></u--input>
</u-form-item>
<u-form-item v-if="$store.state.app.userInfo.company.company_type==18" labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
<u-form-item v-if="$store.state.app.userInfo.company.company_type==18" labelWidth="auto"
label="是否为小队长" required prop="is_captain" borderBottom>
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
<u-radio activeColor="#0122C7" :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
@ -54,14 +55,15 @@
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item v-if="$store.state.app.userInfo.company.company_type==41" labelWidth="auto" label="是否为服务部长" required prop="is_service_manager" borderBottom>
<u-radio-group v-model="formData.is_service_manager" style="margin: 16rpx;">
<u-radio activeColor="#0122C7" :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 v-if="$store.state.app.userInfo.company.company_type==16" labelWidth="auto"
label="是否为服务部长" required prop="is_service_manager" borderBottom>
<u-radio-group v-model="formData.is_service_manager" style="margin: 16rpx;">
<u-radio activeColor="#0122C7" :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>
<districtSelectorTow style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
</view>
<view class="cards">
@ -295,11 +297,10 @@
</u-upload>
</u-form-item> -->
</u--form>
<button @click="modelShow=true" type="primary" class="btn"
style="margin: 28rpx;">创建</button>
<button @click="modelShow=true" type="primary" class="btn" style="margin: 28rpx;">创建</button>
</view>
<u-modal :show="modelShow" title="提示" content='请确认人员信息无误后再创建' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="$u.throttle(addAcountNum, 2000)"></u-modal>
<u-modal :show="modelShow" title="提示" content='请确认人员信息无误后再创建' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="$u.throttle(addAcountNum, 2000)"></u-modal>
</view>
</template>
@ -309,7 +310,7 @@
} from "@/api/file.js"
import {
loginAdd,
} from "@/api/oaUser.js"
} from "@/api/oaUser.js"
import districtSelector from "@/components/districtSelector/districtSelector.vue" //
import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" //
import {
@ -322,7 +323,7 @@
},
data() {
return {
modelShow: false,
modelShow: false,
formData: {
account: '', //
password: '123456', //
@ -330,7 +331,7 @@
// channel: 6, //[1- 2- 3-H5 4-PC 5-APP 6-APP]
id_card: '',
is_captain: '', //
is_service_manager: '', //
is_service_manager: '', //
sex: '',
avatar: '',
nickname: '',
@ -381,12 +382,12 @@
},
trigger: ['change', 'blur']
},
is_service_manager: {
validator: (rule, value, callback) => {
typeof value === 'number' ? callback() : callback('不能为空')
},
trigger: ['change', 'blur']
},
is_service_manager: {
validator: (rule, value, callback) => {
typeof value === 'number' ? callback() : callback('不能为空')
},
trigger: ['change', 'blur']
},
'qualification.id_card': {
type: 'string',
required: true,
@ -428,17 +429,17 @@
},
//
async afterReadAvatar(event) {
uni.showLoading({
title:'上传中'
})
uni.showLoading({
title: '上传中'
})
upLoadImage({
filePath: event.file.url,
name: 'file'
}).then(res => {
this.formData.avatar = res.data.uri;
}).finally(()=>{
uni.hideLoading();
})
}).finally(() => {
uni.hideLoading();
})
},
//
async afterRead(event) {
@ -446,27 +447,29 @@
},
//
upLoad(url, type) {
uni.showLoading({
title:'上传中请稍后'
})
uni.showLoading({
title: '上传中请稍后'
})
upLoadImage({
filePath: url,
name: 'file'
}).then(res => {
this.formData.qualification[type] = res.data.uri
}).finally(()=>{
uni.hideLoading();
})
}).finally(() => {
uni.hideLoading();
})
},
//
async addAcountNum() {
this.modelShow = false;
await this.$nextTick();
async addAcountNum() {
this.modelShow = false;
await this.$nextTick();
if (!this.formData.avatar) return Toast('头像未上传');
let flag = this.$refs.districtSelectorRef.validate();
if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast('身份证未上传');
if (!this.formData.qualification.bank_account || !this.formData.qualification.bank_account_b) return Toast(
'银行卡未上传');
if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast(
'身份证未上传');
if (!this.formData.qualification.bank_account || !this.formData.qualification.bank_account_b)
return Toast(
'银行卡未上传');
this.$refs.uForm.validate().then(async (e) => {
if (e && flag) {
uni.showLoading()

View File

@ -109,7 +109,9 @@
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
<!-- <button class="new_btn" @click.stop="navTo('/subpkg/newPersonnel/newPersonnel')">创建账号</button> -->
<mybtn v-if="$store.state.app.userInfo.company && ($store.state.app.userInfo.company.company_type==18||$store.state.app.userInfo.company.company_type==41)" text="创建账号" @click="navTo('/subpkg/newPersonnel/newPersonnel')"></mybtn>
<mybtn
v-if="$store.state.app.userInfo.company && ($store.state.app.userInfo.company.company_type==18||$store.state.app.userInfo.company.company_type==16)"
text="创建账号" @click="navTo('/subpkg/newPersonnel/newPersonnel')"></mybtn>
</view>
</template>
@ -146,18 +148,18 @@
// console.log(a.substring(0, 10))
},
navTo(url) {
if(url){
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
}
})
}else Toast('暂未开放')
if (url) {
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
}
})
} else Toast('暂未开放')
},
async initLoad() {
this.loadConfig.page = 1;
@ -202,8 +204,9 @@
<style lang="scss">
.personnel {
padding: 28rpx 0;
padding-bottom: 160rpx;
padding: 28rpx 0;
padding-bottom: 160rpx;
.new_btn {
position: fixed;
bottom: 30rpx;

View File

@ -401,8 +401,8 @@
},
],
formData: {
"entityName": "5",
phone: "15884967539",
"entityName": "",
phone: "",
employee: "",
arableLand: "",
"breeding_training": 1, //
@ -466,15 +466,12 @@
}
},
onLoad(option) {
this.taskId = option.task_id
if (option.type == 'supply') this.page = 0
townMasterTask3List({
id: option.task_id
}).then(res => {
this.pas_Info = res.data.template_info.extend.purchase_sales_info
this.pas_Info = res.data.template_info.extend.purchase_sales_info || this.pas_Info
if (option.index) {
this.readonly = true
this.flag = true
@ -601,6 +598,7 @@
},
async commit() {
console.log(this.pas_Info)
if (this.page) {
this.pas_Info.planting.push(this.formData)
await townMasterTask3Commit({