帮报名

This commit is contained in:
mx 2025-03-06 17:28:18 +08:00
parent 3b6a0f1cd4
commit 5b861fc422
4 changed files with 108 additions and 45 deletions

View File

@ -181,8 +181,11 @@ export default {
addAndSign(this.queryParams).then(response => {
this.$modal.msgSuccess("报名成功");
// uni.navigateTo({
// url: "helpBaoming?id=" + this.queryParams.taskId
// })
uni.navigateTo({
url: "helpBaoming?id=" + this.queryParams.taskId
url: "taskDetails?id="+this.queryParams.taskId
})
})
},

View File

@ -51,8 +51,6 @@
</uni-popup>
<scroll-view class="list"
:scroll-top="scrollTop"
scroll-y="true"
@ -67,7 +65,7 @@
<view class="item" v-for="(task, index) in taskList" :key="index">
<view class="line1">
<view class="line1" @click="goDetails(task)">
<view class="name-status">
@ -75,17 +73,15 @@
{{task.taskName}}
</view>
<view class="status-base" :class="toDate(task.taskDate) == '已结束' ? 'task-status-end' : 'task-status'"/>
</view>
<view class="price">
<view class="num">¥{{task.dayPrice}}</view>
<view class="unit">/</view>
</view>
</view>
<view class="line3">
<view class="line3" @click="goDetails(task)">
<view class="num-container" style="background-color: #f1f0f0;">
<view class="num-label">
用工日期
@ -176,10 +172,7 @@
};
},
created: function() {
// <<<<<<< HEAD
// this.realName = this.$store.state.user.nickName
// this.getList();
// =======
this.realName = this.$store.state.user.nickName
verifyToken().then(response => {
if (response.code == 401){
@ -191,9 +184,6 @@
this.getList();
}
})
// >>>>>>> 2bae866b15807e8e0ba3242cc13a85d25a1b5248
},
methods:{
reload(){

View File

@ -15,8 +15,9 @@
</view>
</view>
<view class="list-container">
<view class="bm-lab">未报名人员</view>
<view class="list">
<view v-for="(item, index) in showSign" :key="index" class="item" :class="'item-check' + item.status" @click="select(item)">
<view v-for="(item, index) in showSign" :key="index" class="item" :class="'item-check' + item.status" @click="select(item)" v-if="item.status != 0">
<view class="headImg">
{{item.employeeName}}
</view>
@ -106,6 +107,10 @@ export default {
// })
// this.$tab.reLaunch('/pages/index')
uni.reLaunch({
url: "taskDetails?id="+this.queryParams.id
})
})
},
addEmployeeAndBaoming(){
@ -174,6 +179,10 @@ html, body {
height: calc(100% - 270rpx);
overflow-y: auto;
margin-top: 30rpx;
.bm-lab{
margin-left: 20rpx;
margin-bottom: 30rpx;
}
.list{
display: grid;
grid-template-columns: repeat(4, 1fr); /* 创建3个等宽的列 */
@ -271,7 +280,7 @@ html, body {
margin-left: 8rpx;
border-radius: 10rpx;
width: 300rpx;
height: 90rpx;
height: 85rpx;
display: flex;
align-items: center;
justify-content: center;
@ -286,7 +295,7 @@ html, body {
margin-left: 8rpx;
border-radius: 10rpx;
width: 300rpx;
height: 90rpx;
height: 85rpx;
display: flex;
align-items: center;
justify-content: center;
@ -294,6 +303,7 @@ html, body {
}
}

View File

@ -3,7 +3,7 @@
<!-- pages/index/index.wxml -->
<view class="container-details">
<view class="head">
<view class="head">
<view class="bm-num">
<view class="num">
{{task.baomingNum}}
@ -42,27 +42,35 @@
<input class="search-input" id="search-input" v-model="searchVal" type="text" placeholder="请输入姓名查询" maxlength="30" @confirm="search"/>
</view>
</view>
<view class="list">
<view :style="{height: 'calc( ' + getHeight() + 'px - 640rpx)', 'overflow-y': 'auto'}">
<view class="list" >
<view v-for="(item, index) in showSign" :key="index" class="item" :class="'item-check' + item.status" @click="setInfo(item)">
<!-- <view class="status">-->
<!-- <uni-icons v-if="item.status == 1" class="icon" color="#11dc03" type="checkbox-filled" size="20" @click="search"></uni-icons>-->
<!-- <uni-icons v-if="item.status == 0" class="icon" color="red" type="clear" size="20" @click="search"></uni-icons>-->
<!-- </view>-->
<view class="headImg">
{{item.employeeName}}
</view>
<view class="phone">
{{item.phone}}
</view>
<view class="remark">
{{item.remark == null ? "备注说明文案" : item.remark}}
</view>
<!-- <view class="status">-->
<!-- <uni-icons v-if="item.status == 1" class="icon" color="#11dc03" type="checkbox-filled" size="20" @click="search"></uni-icons>-->
<!-- <uni-icons v-if="item.status == 0" class="icon" color="red" type="clear" size="20" @click="search"></uni-icons>-->
<!-- </view>-->
<view class="headImg">
{{item.employeeName}}
</view>
<view class="phone">
{{item.phone}}
</view>
<view class="remark">
{{item.remark == null ? "备注说明文案" : item.remark}}
</view>
</view>
</view>
</view>
<view>
<view class="td-bottom">
<view class="help-baoming" @click="helpBaoming">帮报名</view>
</view>
<view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content dialog" :class="{'popup-height': type === 'left' || type === 'right' }">
@ -96,8 +104,10 @@
<script>
import { getTaskDetails, setSign, cancelBaoming } from "@/api/task";
// import { getCodeImg } from '@/api/login'
export default {
data() {
return {
queryParams: {
@ -110,23 +120,39 @@
showSign: [],
};
},
onBackPress: function() {
console.log("12345")
wx.navigateTo({ url: 'index' });
return true; //
},
onLoad: function(options) {
this.queryParams.id = options.id;
this.getInfo();
},
onUnload: function() {
// console.log('');
var pages = getCurrentPages();
// console.log(pages.length);
var Page = pages[pages.length-1];//
// console.log(pages[pages.length-1].route);//
var prevPage = pages[pages.length-2];
// console.log(pages[pages.length-2].route);//
if(pages[pages.length-2].route == 'pages/index'){ //
prevPage.$vm.reload()
}
console.log('关闭页面');
let pages = getCurrentPages();
console.log( pages.length );// 2
// var pages = getCurrentPages();
// // console.log(pages.length);
// var Page = pages[pages.length-1];//
// // console.log(pages[pages.length-1].route);//
// var prevPage = pages[pages.length-2];
// // console.log(pages[pages.length-2].route);//
// if(pages[pages.length-2].route == 'pages/index'){ //
// prevPage.$vm.reload()
// }
// wx.reLaunch({ url: 'index' });
},
methods:{
helpBaoming(){
uni.navigateTo({
url: "helpBaoming?id="+this.queryParams.id
})
},
getInfo() {
var that = this;
getTaskDetails(this.queryParams).then(response => {
@ -184,7 +210,10 @@
this.$modal.msgSuccess(item.employeeName + "已移除");
});
},
getHeight(){
// const { windowHeight } = uni.getSystemInfoSync(); //
return uni.getSystemInfoSync().windowHeight; //
}
}
}
</script>
@ -283,7 +312,7 @@
}
.search-container{
margin-top: 10rpx;
margin-bo: 10rpx;
margin-bottom: 10rpx;
width: 100%;
display: flex;
align-items: center;
@ -318,6 +347,7 @@
/*padding: 0rpx 10rpx 10rpx 10rpx;*/
margin-top: 30rpx;
place-items: center;
.item-check1{
background-size: 100% 100%;
background-image: url("http://8.155.21.176:9000/yonggong/m-images/sign/sign.png");
@ -450,6 +480,36 @@
}
.td-bottom{
background-color: #ffffff;
width: 100%;
height: 180rpx;
position: absolute;
/*bottom: env(safe-area-inset-bottom);*/
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-items: center;
padding: 0rpx 50rpx 0rpx 50rpx;
.help-baoming{
width: 100%;
background-color: #107ff6;
color: #ffffff;
font-weight: 650;
font-size: 30rpx;
margin-left: 8rpx;
border-radius: 10rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: auto; /* 推动元素到右边 */
}
}
</style>