我的资产调整首页调整提交企业认证接口调整
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="content" v-if="!loging">
|
||||
<!-- 基础信息 -->
|
||||
<view class="info-card">
|
||||
<view class="cover">
|
||||
<view class="cover-add vertical">
|
||||
<image src="@/static/icons/add-icon.png" mode="widthFix"></image>
|
||||
<view>员工寸照</view>
|
||||
<view class="cover-add vertical" @click="updCover">
|
||||
<block v-if="cover != ''">
|
||||
<image :src="cover" mode="aspectFill"></image>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image class="cover-default" src="@/static/icons/add-icon.png" mode="widthFix"></image>
|
||||
<view>员工寸照</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- <image src="@/static/dev/good_cover_00.jpg" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
<view class="info-text">
|
||||
<view class="info-inputs">
|
||||
@@ -32,54 +36,99 @@
|
||||
<!-- 权限设置 -->
|
||||
<view class="title">权限设置</view>
|
||||
<view class="jurisdiction">
|
||||
<view class="item">
|
||||
<label>
|
||||
<view class="item-title">运营者权限</view>
|
||||
<view class="item-info">管理、推广、设置等模块权限,可使用体验版小程序</view>
|
||||
<checkbox class="item-checkbox" color="#c82626" />
|
||||
</label>
|
||||
</view>
|
||||
<view class="item">
|
||||
<label>
|
||||
<view class="item-title">开发者权限</view>
|
||||
<view class="item-info">开发模块权限,可使用体验版小程序、开发者工具(IDE)</view>
|
||||
<checkbox class="item-checkbox" color="#c82626" />
|
||||
</label>
|
||||
</view>
|
||||
<view class="item">
|
||||
<label>
|
||||
<view class="item-title">数据分析者(基础分析)</view>
|
||||
<view class="item-info">统计模块权限,可使用体验版小程序</view>
|
||||
<checkbox class="item-checkbox" color="#c82626" />
|
||||
</label>
|
||||
</view>
|
||||
<checkbox-group @change="permissionChange">
|
||||
<view class="item" v-for="(item, index) in permissions" :key="index">
|
||||
<label>
|
||||
<view class="item-title">{{item.title}}</view>
|
||||
<view class="item-info">{{item.description}}</view>
|
||||
<checkbox class="item-checkbox" color="#c82626" :value="item.permission_id" />
|
||||
</label>
|
||||
</view>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="add-btns">
|
||||
<button size="default">确认添加</button>
|
||||
<button size="default" @click="onAddEmployees">确认添加</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { employeesConfig, addEmployees } from '@/apis/interfaces/employees'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
section : [
|
||||
{name: '技术部', id: 0},
|
||||
{name: '市场部', id: 1},
|
||||
{name: '南岗店', id: 2}
|
||||
],
|
||||
sectionIndex: 0,
|
||||
name : '',
|
||||
phone : '',
|
||||
job : ''
|
||||
loging : true,
|
||||
section : [],
|
||||
permissions : [],
|
||||
permissionIds: [],
|
||||
sectionIndex : 0,
|
||||
cover : '',
|
||||
name : '',
|
||||
phone : '',
|
||||
job : ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
employeesConfig().then(res => {
|
||||
this.section = res.store
|
||||
this.permissions = res.permissions
|
||||
this.loging = false
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 选择部门
|
||||
pickerChange(e){
|
||||
this.sectionIndex = e.detail.value
|
||||
},
|
||||
// 权限选择
|
||||
permissionChange(e){
|
||||
this.permissionIds = e.detail.value
|
||||
},
|
||||
// 上传照片
|
||||
updCover(){
|
||||
uni.chooseImage({
|
||||
crop: {width: 229, height: 320},
|
||||
success: path=> {
|
||||
uploads([{
|
||||
uri : path.tempFilePaths[0]
|
||||
}]).then(res => {
|
||||
this.cover = res.url[0]
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加员工
|
||||
onAddEmployees(){
|
||||
addEmployees({
|
||||
name : this.name,
|
||||
mobileNo : this.phone,
|
||||
job : this.job,
|
||||
cover : this.cover,
|
||||
position : 1,
|
||||
order : 0,
|
||||
store_id : this.section[this.sectionIndex].store_id,
|
||||
permission : this.permissionIds
|
||||
}).then(res => {
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : res,
|
||||
success : () => {
|
||||
this.$Router.back()
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,6 +196,10 @@
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
image{
|
||||
width: 229rpx;
|
||||
height: 320rpx;
|
||||
}
|
||||
image.cover-default{
|
||||
width: 128rpx;
|
||||
}
|
||||
color: $text-gray-m;
|
||||
|
||||
Reference in New Issue
Block a user