addUserclassify

This commit is contained in:
shijing 2022-10-12 09:28:17 +08:00
parent 45d9e359b5
commit 814e891fd5
6 changed files with 65 additions and 22 deletions

View File

@ -76,6 +76,7 @@ const install = (Vue, vm) => {
let rpartyList = (data = {}) => vm.$u.get(`/rpm/rparty/`, data); //相关方列表
let remployee = (data = {}) => vm.$u.get(`/rpm/remployee/`, data); //相关方人员表
let remployeeCreate = (data = {}) => vm.$u.post(`/rpm/remployee/`, data); //相关方人员表
let rcertificate = (data = {}) => vm.$u.get(`/rpm/rcertificate/`, data); //相关方证书
let rpjFileList = (data = {}) => vm.$u.get(`/rpm/rpj_file/`, data); //相关方wenjian
let rpjList = (data = {}) => vm.$u.get(`/rpm/rpj/`, data); //rpj查询
@ -156,6 +157,7 @@ const install = (Vue, vm) => {
rpartyList,
remployee,
remployeeCreate,
rcertificate,
rpjItem,
rpjList,

View File

@ -2,8 +2,8 @@
"name" : "曲阳金隅EHS",
"appid" : "__UNI__B00D419",
"description" : "曲阳金隅EHS",
"versionName" : "1.00.13",
"versionCode" : 10013,
"versionName" : "1.01.00",
"versionCode" : 10100,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -48,23 +48,37 @@
phone: "",
id_number: ""
},
rparty:'',
upHeader:'',
fileList:[]
}
},
onLoad(){
this.getHeader()
onLoad(params) {
if(params.rparty){
this.rparty = params.rparty;
}
this.getHeader();
},
methods: {
getHeader(){
this.upHeader = {Authorization: "Bearer " + this.vuex_token}
},
saveVisitor(){
if(this.rparty!==''){
let obj = {...this.formData};
obj.rparty = this.rparty;
this.$u.api.remployeeCreate(obj).then(res=>{
uni.navigateBack({
delta: 1
})
})
}else{
this.$u.api.visitorCreate(this.formData).then(res=>{
uni.navigateBack({
delta: 1
})
})
}
},
goBack() {
uni.navigateBack({

View File

@ -214,7 +214,7 @@
that.$u.api.rpjUpdate(that.rpj, that.formData).then(res => {
if (res.err_msg) {
} else {
let params = `?rpj=${that.rpj}`;
let params = `?rpj=${that.rpj}&rparty=${that.formData.rparty}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjFiles' + params
})
@ -222,8 +222,9 @@
})
} else {
that.$u.api.rpjCreate(that.formData).then(res => {
debugger;
if (res.err_msg) {} else {
let params = `?rpj=${res.id}`;
let params = `?rpj=${res.id}&rparty=${that.formData.rparty}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjFiles' + params
})

View File

@ -76,7 +76,9 @@
//
downFiles: {},
uploadImgsList: [],
fileList :[]
fileList :[],
rpj:'',
rparty:''
}
},
@ -84,6 +86,7 @@
onLoad(params) {
if (params.rpj) {
this.rpj = params.rpj;
this.rparty = params.rparty;
}
this.showBtns = true;
},
@ -180,7 +183,7 @@
nextStep() {
let that = this;
let params = `?rpj=${that.rpj}`;
let params = `?rpj=${that.rpj}&rparty=${that.rparty}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjWorkers' + params
})

View File

@ -3,6 +3,11 @@
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="400rpx" leftText="工作人员选择"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="apply-info">
<view class="list-title">
<view class="selectCount">已选{{workerList.length}}工作人员</view>
<button v-if="workerList.length>0" type="primary" class="select" @click="checkPeople">继续选择</button>
<button v-else type="primary" class="select" @click="checkPeople">选择人员</button>
</view>
<view class="row" v-for="(row,index) in workerList" :key="index" @tap="select(row)">
<view class="center">
<view class="name-tel">
@ -17,7 +22,7 @@
</view>
</view>
</view>
<button type="primary" class="select" @click="checkPeople">选择人员</button>
<!-- <button type="primary" class="select" @click="checkPeople">选择人员</button> -->
</view>
<button type="primary" class="addNew" @click="add">新增人员</button>
<view class="dialogWrap" v-if="limitedPeople">
@ -53,7 +58,7 @@
</form>
</view>
</view>
<view class="apply-info" style="min-height: fit-content;display: flex;">
<view class="apply-info" style="min-height: fit-content;display: flex;position: fixed;bottom: 0;">
<button type="primary" plain="true" @click="goBack">上一步</button>
<button v-for=" item in initform.transitions" :key="item.id" @click="rpjSubmit(item.id)" type="primary" style="width: 25%;">{{item.name}}
@ -70,6 +75,7 @@
data() {
return {
rpj:'',
rparty:'',
limitedPeople: false,
formData: {
remployee: '',
@ -107,6 +113,7 @@
onLoad(params) {
this.rpj = params.rpj;
this.formData.rpj = params.rpj;
this.rparty = params.rparty;
},
onShow() {
this.workerList = [];
@ -192,8 +199,11 @@
},
add() {
let that = this;
//Id
let params = `?&rparty=${that.rparty}`;
uni.navigateTo({
url: '/pages/workSpace/newWork/addUser'
url: '/pages/workSpace/newWork/addUser'+params
})
},
edit(row) {},
@ -257,7 +267,18 @@
box-sizing: border-box;
margin-top: 12px;
}
.list-title{
display: flex;
padding-bottom: 20rpx;
justify-content: start;
border-bottom: 1upx solid #eeeeee;
}
.selectCount{
height: 70rpx;
line-height:70rpx;
margin-right: 20rpx;
font-size: 36rpx;
}
.row {
padding: 10upx;
margin-bottom: 20upx;
@ -279,17 +300,17 @@
box-shadow: 0 0 6px 2px rgba(0, 0, 0, .3);
z-index: 100;
position: fixed;
bottom: 20px;
right: 20px;
bottom: 60px;
right: 10px;
}
.select {
margin: auto;
margin: 0;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
width: 400rpx;
height: 80rpx;
line-height: 80rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 30rpx;
border-radius: 35rpx;
}
.save-btn {
@ -332,9 +353,11 @@
.uni-form-item {
height: 160rpx;
display: flex;
}
.uni-form-item>.title {
width: 180rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 32rpx;