Compare commits
2 Commits
2bae866b15
...
3b6a0f1cd4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3b6a0f1cd4 | ||
![]() |
a8176911c2 |
@ -39,6 +39,8 @@ export function baoming(param) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function cancelBaoming(param) {
|
||||
return request({
|
||||
url: '/employee/task/cancelBaoming' ,
|
||||
|
@ -39,3 +39,16 @@ export function uploadAvatar(data) {
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
||||
// 搜索工人列表
|
||||
export function searchUser(keyWord, taskId) {
|
||||
return request({
|
||||
url: '/merchant/user/list',
|
||||
method: 'get',
|
||||
params: {
|
||||
"keyWord": keyWord,
|
||||
"taskId": taskId,
|
||||
"pageNum": 1,
|
||||
"pageSize": 200
|
||||
}
|
||||
})
|
||||
}
|
22
api/task.js
22
api/task.js
@ -36,3 +36,25 @@ export function fx(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function baomingBatch(param) {
|
||||
return request({
|
||||
url: '/merchant/task/baomingBatch' ,
|
||||
method: 'put',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelBaoming(param) {
|
||||
return request({
|
||||
url: '/merchant/task/cancelBaoming' ,
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
export function addAndSign(param) {
|
||||
return request({
|
||||
url: '/merchant/task/addEmployeeAndSign' ,
|
||||
method: 'put',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
// baseUrl: 'http://192.168.18.211:8080',
|
||||
// baseUrl: 'http://192.168.18.212:8080',
|
||||
// baseUrl: 'http://8.155.21.176/prod-api',
|
||||
baseUrl: 'https://www.tulkj.cn/prod-api',
|
||||
// 应用信息
|
||||
|
10
pages.json
10
pages.json
@ -13,6 +13,16 @@
|
||||
"path": "pages/taskDetails"
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/helpBaoming"
|
||||
},
|
||||
{
|
||||
"path": "pages/addEmployeeAndBaoming",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加员工并报名"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/wxlogin",
|
||||
|
312
pages/addEmployeeAndBaoming.vue
Normal file
312
pages/addEmployeeAndBaoming.vue
Normal file
@ -0,0 +1,312 @@
|
||||
<template>
|
||||
|
||||
<view >
|
||||
<view class="input-line">
|
||||
<view class="line-lab required">用工类型</view>
|
||||
<input class="line-input" :value="queryParams.employeeType == 0 ? '灵活用工' : queryParams.employeeType == 1 ? '固定长期用工' : ''" disabled @click="openTypeSelect()" placeholder="请选择"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab required">姓名</view>
|
||||
<input class="line-input" v-model="queryParams.realName" type="text" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab required">手机号码</view>
|
||||
<input class="line-input" v-model="queryParams.phone" type="number" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab required">身份证号码</view>
|
||||
<input class="line-input" v-model="queryParams.idCard" type="text" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">性别</view>
|
||||
<input class="line-input" :value="queryParams.sex == 0 ? '女' : queryParams.sex == 1 ? '男' : ''" type="text" disabled @click="openSexSelect()" placeholder="请选择"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">民族</view>
|
||||
<input class="line-input" v-model="queryParams.nation" type="text" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">年龄</view>
|
||||
<input class="line-input" v-model="queryParams.age" type="number" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">面试日期</view>
|
||||
<!-- <input class="line-input" v-model="queryParams.interviewDate" type="text" maxlength="30" placeholder="请输入" />-->
|
||||
|
||||
|
||||
<uni-datetime-picker type="date" v-model="queryParams.interviewDate" @maskClick="maskClick" @change="timeChange($event)">
|
||||
{{queryParams.interviewDate == null ? "请选择" : queryParams.interviewDate}}
|
||||
</uni-datetime-picker>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">入职日期</view>
|
||||
<!-- <input class="line-input" v-model="queryParams.entryDate" type="text" maxlength="30" placeholder="请输入"/>-->
|
||||
|
||||
<uni-datetime-picker type="date" v-model="queryParams.entryDate" @maskClick="maskClick" @change="timeChange($event)">
|
||||
{{queryParams.entryDate == null ? "请选择" : queryParams.entryDate}}
|
||||
</uni-datetime-picker>
|
||||
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">用工单位</view>
|
||||
<input class="line-input" v-model="queryParams.useUnit" type="text" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">供应商</view>
|
||||
<input class="line-input" v-model="queryParams.supplier" type="text" maxlength="30" placeholder="请输入" />
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">员工单价</view>
|
||||
<input class="line-input" v-model="queryParams.employeePrice" type="text" maxlength="30" placeholder="请输入"/>
|
||||
</view>
|
||||
<view class="input-line">
|
||||
<view class="line-lab">供应商单价</view>
|
||||
<input class="line-input" v-model="queryParams.supplierPrice" type="text" maxlength="30" placeholder="请输入" />
|
||||
</view>
|
||||
|
||||
|
||||
<uni-popup style="z-index: 10000" ref="sexPopup" type="bottom" border-radius="10px 10px 0 0">
|
||||
<view class="selectContext">
|
||||
<view class="select-item" @click="filterSex(1)">男</view>
|
||||
<view class="select-item" @click="filterSex(0)">女</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<uni-popup style="z-index: 10000" ref="typePopup" type="bottom" border-radius="10px 10px 0 0">
|
||||
<view class="selectContext">
|
||||
<view class="select-item" @click="filterType(0)">灵活用工</view>
|
||||
<view class="select-item" @click="filterType(1)">固定长期用工</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
<view class="add-bottom">
|
||||
<!-- <view class="all-select" @click="addEmployeeAndBaoming">添加员工并报名</view>-->
|
||||
<view class="submit-btn" @click="submit">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchUser } from "@/api/system/user";
|
||||
import { addAndSign } from "@/api/task";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
employeeType: null,
|
||||
realName: null,
|
||||
phone: null,
|
||||
idCard: null,
|
||||
sex: null,
|
||||
nation: null,
|
||||
age: null,
|
||||
interviewDate: null,
|
||||
entryDate: null,
|
||||
useUnit: null,
|
||||
supplier: null,
|
||||
employeePrice: null,
|
||||
supplierPrice: null,
|
||||
taskId: null,
|
||||
},
|
||||
task: {},
|
||||
title: "添加员工并报名",
|
||||
signInfo: {},
|
||||
searchVal: "",
|
||||
showSign: [],
|
||||
selectItems: {},//key为uid value = user对象
|
||||
};
|
||||
},
|
||||
|
||||
onLoad: function(options) {
|
||||
this.queryParams.taskId = options.id;
|
||||
},
|
||||
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()
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
submit(){
|
||||
if (this.queryParams.employeeType === '' || this.queryParams.employeeType == null){
|
||||
console.log(this.queryParams.employeeType)
|
||||
wx.showToast({
|
||||
title: '用工类型不能为空',
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.queryParams.realName === '' || this.queryParams.realName == null){
|
||||
// this.$modal.msgError("姓名不能为空");
|
||||
wx.showToast({
|
||||
title: '姓名不能为空',
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.queryParams.phone == null || this.queryParams.phone.length != 11){
|
||||
// this.$modal.msgError("手机号码不能为空");
|
||||
wx.showToast({
|
||||
title: '手机号码不能为空或格式不正确',
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.queryParams.idCard == null || this.queryParams.idCard.length != 18){
|
||||
// this.$modal.msgError("身份证号码不能为空或格式不正确");
|
||||
wx.showToast({
|
||||
title: '身份证号码不能为空或格式不正确',
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
addAndSign(this.queryParams).then(response => {
|
||||
this.$modal.msgSuccess("报名成功");
|
||||
uni.navigateTo({
|
||||
url: "helpBaoming?id=" + this.queryParams.taskId
|
||||
})
|
||||
})
|
||||
},
|
||||
timeChange(e) {
|
||||
this.single = e;
|
||||
console.log("-change事件:", e);
|
||||
this.queryParams.taskDate = e;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
filterSex(type){
|
||||
this.queryParams.sex = type;
|
||||
this.closeSexSelect();
|
||||
},
|
||||
filterType(type){
|
||||
this.queryParams.employeeType = type;
|
||||
this.closeTypeSelect();
|
||||
},
|
||||
|
||||
openSexSelect(){
|
||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||
this.$refs.sexPopup.open('bottom')
|
||||
},
|
||||
openTypeSelect(){
|
||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||
this.$refs.typePopup.open('bottom')
|
||||
},
|
||||
closeSexSelect(){
|
||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||
this.$refs.sexPopup.close()
|
||||
},
|
||||
closeTypeSelect(){
|
||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||
this.$refs.typePopup.close()
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' >
|
||||
|
||||
.selectContext{
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
/*height: 500rpx;*/
|
||||
margin-bottom: 0px;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
.select-item{
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 35rpx;
|
||||
border-bottom: 1rpx solid #dbdbdb;
|
||||
}
|
||||
.select-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.input-line{
|
||||
display: flex;
|
||||
height: 110rpx;
|
||||
border-bottom: #b6b6b6 1rpx solid;
|
||||
align-items: center;
|
||||
margin: 0 15rpx 0 15rpx;
|
||||
font-size: 30rpx;
|
||||
.line-lab{
|
||||
width: 210rpx;
|
||||
}
|
||||
.required::after {
|
||||
content: "*";
|
||||
color: red;
|
||||
}
|
||||
.line-input{
|
||||
margin-left: 5rpx;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
line-height: 60rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.uni-date-editor {
|
||||
justify-content: flex-end !important;
|
||||
font-weight: 500;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
|
||||
.add-bottom {
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
/*bottom: env(safe-area-inset-bottom);*/
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
padding: 0rpx 50rpx 0rpx 50rpx;
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
background-color: #107ff6;
|
||||
color: #ffffff;
|
||||
font-weight: 650;
|
||||
font-size: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
//.input-line {
|
||||
// :deep(.uni-date-editor) {
|
||||
// justify-content: flex-end;
|
||||
// font-weight: 100;
|
||||
// }
|
||||
//}
|
||||
//:deep(.el-empty__description .uni-date-editor) {
|
||||
// font-size: 13px;
|
||||
//}
|
||||
</style>
|
@ -66,7 +66,7 @@
|
||||
>
|
||||
|
||||
|
||||
<view class="item" @click="goDetails(task)" v-for="(task, index) in taskList" :key="index">
|
||||
<view class="item" v-for="(task, index) in taskList" :key="index">
|
||||
<view class="line1">
|
||||
|
||||
|
||||
@ -126,7 +126,8 @@
|
||||
<view class="icon"></view>
|
||||
发布时间: {{task.createTime}}
|
||||
</view>
|
||||
<view class="button"></view>
|
||||
<view class="button_bm" @click="helpBaomingFun(task)">帮报名</view>
|
||||
<view class="button" @click="goDetails(task)"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -175,6 +176,10 @@
|
||||
};
|
||||
},
|
||||
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){
|
||||
@ -188,6 +193,7 @@
|
||||
})
|
||||
|
||||
|
||||
// >>>>>>> 2bae866b15807e8e0ba3242cc13a85d25a1b5248
|
||||
},
|
||||
methods:{
|
||||
reload(){
|
||||
@ -277,6 +283,11 @@
|
||||
url: "taskDetails?id=" + task.id
|
||||
})
|
||||
},
|
||||
helpBaomingFun(task){
|
||||
uni.navigateTo({
|
||||
url: "helpBaoming?id=" + task.id
|
||||
})
|
||||
},
|
||||
my(){
|
||||
uni.navigateTo({
|
||||
url: "my"
|
||||
@ -407,8 +418,6 @@
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search-container{
|
||||
margin-top: 20rpx;
|
||||
border-top: 1rpx solid #dbdbdb;
|
||||
@ -439,7 +448,6 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.filter{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -508,7 +516,6 @@
|
||||
.vue-ref{
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.uni-date-x{
|
||||
background-color: transparent !important;
|
||||
color: #000000 !important;
|
||||
@ -537,7 +544,6 @@
|
||||
/* justify-content: center;*/
|
||||
/*}*/
|
||||
|
||||
|
||||
.list{
|
||||
padding: 0rpx 15rpx 0rpx 15rpx;
|
||||
/*background-color: #e3e3e3;*/
|
||||
@ -671,14 +677,31 @@
|
||||
font-size: 20rpx;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.button{
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/dm-btn.png");
|
||||
background-size: 100% 100%;
|
||||
margin-left: 8rpx;
|
||||
width: 160rpx;
|
||||
height: 65rpx;
|
||||
margin-left: auto; /* 推动元素到右边 */
|
||||
}
|
||||
|
||||
.button_bm{
|
||||
//background-color: #11a9ee;
|
||||
color: #11a9ee;
|
||||
font-weight: 650;
|
||||
font-size: 27rpx;
|
||||
border-radius: 30rpx;
|
||||
border: #11a9ee 1rpx solid;
|
||||
width: 149rpx;
|
||||
height: 66rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
//background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/js-btn.png");
|
||||
background-size: 100% 100%;
|
||||
margin-left: auto; /* 推动元素到右边 */
|
||||
}
|
||||
.button{
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/index/dm-btn.png");
|
||||
background-size: 100% 100%;
|
||||
margin-left: 8rpx;
|
||||
width: 160rpx;
|
||||
height: 65rpx;
|
||||
margin-left: 10rpx; /* 推动元素到右边 */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -764,6 +764,7 @@
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/fxlist/js-btn.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
303
pages/helpBaoming.vue
Normal file
303
pages/helpBaoming.vue
Normal file
@ -0,0 +1,303 @@
|
||||
<template>
|
||||
|
||||
<!-- pages/index/index.wxml -->
|
||||
<view :style="{height: 'calc( ' + getHeight() + 'px - 30rpx)' }" class="container-details" >
|
||||
|
||||
<view class="search-container">
|
||||
<view class="search">
|
||||
<!-- <uni-icons class="icon" type="search" size="30" @click="search"></uni-icons>-->
|
||||
|
||||
<img class="icon" src="http://8.155.21.176:9000/yonggong/images/sign/fdj.png"/>
|
||||
|
||||
<input class="search-input" id="search-input" v-model="searchVal" type="text" placeholder="请输入姓名或手机号查询" maxlength="30" @confirm="search"/>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-container">
|
||||
<view class="list">
|
||||
<view v-for="(item, index) in showSign" :key="index" class="item" :class="'item-check' + item.status" @click="select(item)">
|
||||
<view class="headImg">
|
||||
{{item.employeeName}}
|
||||
</view>
|
||||
<view class="phone">
|
||||
{{item.phone}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="fd-bottom">
|
||||
<view class="all-select" @click="addEmployeeAndBaoming">添加员工并报名</view>
|
||||
<view class="all-pay" @click="baoming">报名</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchUser } from "@/api/system/user";
|
||||
import { baomingBatch,getTask } from "@/api/task";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
id: null,
|
||||
},
|
||||
task: {},
|
||||
title: "任务名称",
|
||||
signInfo: {},
|
||||
searchVal: "",
|
||||
showSign: [],
|
||||
selectItems: {},//key为uid value = user对象
|
||||
};
|
||||
},
|
||||
|
||||
onLoad: function(options) {
|
||||
this.queryParams.id = options.id;
|
||||
this.search();
|
||||
},
|
||||
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()
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
select(item) {
|
||||
if (item.status == 2){
|
||||
item.status = 1;
|
||||
this.selectItems[item["employeeId"]] = item;
|
||||
}else if (item.status == 1){
|
||||
item.status = 2;
|
||||
delete this.selectItems[item["employeeId"]];
|
||||
}
|
||||
},
|
||||
search(){
|
||||
var that = this;
|
||||
searchUser(this.searchVal, this.queryParams.id).then(response => {
|
||||
that.showSign = Object.values(that.selectItems);
|
||||
that.showSign = that.showSign.reverse();
|
||||
for (let i = 0; i < response.rows.length; i++) {
|
||||
if(that.selectItems[response.rows[i].employeeId] == null){
|
||||
that.showSign.push(response.rows[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
baoming(){
|
||||
baomingBatch({"list": Object.values(this.selectItems), "taskId": this.queryParams.id}).then(response => {
|
||||
// console.log("123" + response)
|
||||
this.$modal.msgSuccess("报名成功");
|
||||
this.selectItems = {};
|
||||
this.search();
|
||||
// uni.navigateTo({
|
||||
// url: "index"
|
||||
// })
|
||||
|
||||
// this.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
},
|
||||
addEmployeeAndBaoming(){
|
||||
uni.navigateTo({
|
||||
url: "addEmployeeAndBaoming?id="+this.queryParams.id
|
||||
})
|
||||
},
|
||||
getHeight(){
|
||||
// const { windowHeight } = uni.getSystemInfoSync(); // 获取页面高度
|
||||
return uni.getSystemInfoSync().windowHeight; // 获取页面高度
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
page{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
html, body {
|
||||
background-color: #ffffff;
|
||||
//height: 100%;
|
||||
height: calc(100% - 1rpx);
|
||||
}
|
||||
.container-details{
|
||||
height: calc(100% - 1rpx);
|
||||
}
|
||||
|
||||
.search-container{
|
||||
margin-top: 10rpx;
|
||||
margin-bo: 10rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.search{
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
border-radius: 450px;
|
||||
border: 1px solid #6c6c6c;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/*justify-content: center;*/
|
||||
.icon{
|
||||
margin-left: 20rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.search-input{
|
||||
width: 82%;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.list-container{
|
||||
height: calc(100% - 270rpx);
|
||||
overflow-y: auto;
|
||||
margin-top: 30rpx;
|
||||
.list{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr); /* 创建3个等宽的列 */
|
||||
list-style-type: none;
|
||||
/*padding: 0rpx 10rpx 10rpx 10rpx;*/
|
||||
|
||||
place-items: center;
|
||||
|
||||
|
||||
|
||||
.item-check1{
|
||||
background-size: 100% 100%;
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/sign/sign.png");
|
||||
.phone{
|
||||
color: #5e5e5e;
|
||||
}
|
||||
}
|
||||
.item-check0{
|
||||
background-size: 100% 100%;
|
||||
//background-image: url("http://8.155.21.176:9000/yonggong/m-images/sign/noSign1.png");
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/sign/sign.png");
|
||||
color: #d6d6d6;
|
||||
.phone{
|
||||
color: #d6d6d6;
|
||||
}
|
||||
}
|
||||
.item-check2{
|
||||
background-size: 100% 100%;
|
||||
background-image: url("http://8.155.21.176:9000/yonggong/m-images/sign/noneSign.png");
|
||||
.phone{
|
||||
color: #5e5e5e;
|
||||
}
|
||||
}
|
||||
.item{
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin: 0rpx 0 13rpx 0 ;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 25rpx 10rpx 25rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.status{
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
}
|
||||
.headImg{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
font-weight: 650;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.phone{
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.remark{
|
||||
color: #adadad;
|
||||
background-color: #e3e3e3;
|
||||
width: 90%;
|
||||
display: grid;
|
||||
text-align: center;
|
||||
place-items: center;
|
||||
font-size: 20rpx;
|
||||
height: 30rpx;
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏超出div的内容 */
|
||||
text-overflow: ellipsis; /* 显示省略号来代表被截断的内容 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fd-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;
|
||||
.all-select{
|
||||
width: 50%;
|
||||
color: #107ff6;
|
||||
font-weight: 650;
|
||||
font-size: 30rpx;
|
||||
margin-left: 8rpx;
|
||||
border-radius: 10rpx;
|
||||
width: 300rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1rpx solid #107ff6;
|
||||
}
|
||||
.all-pay{
|
||||
width: 50%;
|
||||
background-color: #107ff6;
|
||||
color: #ffffff;
|
||||
font-weight: 650;
|
||||
font-size: 30rpx;
|
||||
margin-left: 8rpx;
|
||||
border-radius: 10rpx;
|
||||
width: 300rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto; /* 推动元素到右边 */
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
@ -37,9 +37,9 @@
|
||||
<view class="search">
|
||||
<!-- <uni-icons class="icon" type="search" size="30" @click="search"></uni-icons>-->
|
||||
|
||||
<img class="icon" src="/static/images/sign/fdj.png"/>
|
||||
<img class="icon" src="http://8.155.21.176:9000/yonggong/images/sign/fdj.png"/>
|
||||
|
||||
<input class="search-input" id="search-input" v-model="searchVal" type="text" placeholder="请输入姓名查询" maxlength="30" @confirm="search"/>
|
||||
<input class="search-input" id="search-input" v-model="searchVal" type="text" placeholder="请输入姓名查询" maxlength="30" @confirm="search"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
@ -66,6 +66,7 @@
|
||||
<!-- 普通弹窗 -->
|
||||
<uni-popup ref="popup" background-color="#fff">
|
||||
<view class="popup-content dialog" :class="{'popup-height': type === 'left' || type === 'right' }">
|
||||
<view class="delItem" @click="delItem(signInfo)">移除</view>
|
||||
<view class="name">
|
||||
{{signInfo.employeeName}}
|
||||
</view>
|
||||
@ -94,20 +95,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTaskDetails, setSign } from "@/api/task";
|
||||
import { getTaskDetails, setSign, cancelBaoming } from "@/api/task";
|
||||
// import { getCodeImg } from '@/api/login'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
id: null,
|
||||
},
|
||||
task: {},
|
||||
title: "任务名称",
|
||||
signInfo: {},
|
||||
searchVal: "",
|
||||
showSign: [],
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
id: null,
|
||||
},
|
||||
task: {},
|
||||
title: "任务名称",
|
||||
signInfo: {},
|
||||
searchVal: "",
|
||||
showSign: [],
|
||||
};
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.queryParams.id = options.id;
|
||||
@ -126,26 +127,25 @@
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getInfo() {
|
||||
var that = this;
|
||||
getTaskDetails(this.queryParams).then(response => {
|
||||
console.log(response)
|
||||
that.task = response.data;
|
||||
that.showSign = that.task.listSign;
|
||||
let title = "【"+ that.task.taskName +"】人员详情";
|
||||
uni.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
});
|
||||
},
|
||||
getInfo() {
|
||||
var that = this;
|
||||
getTaskDetails(this.queryParams).then(response => {
|
||||
that.task = response.data;
|
||||
that.showSign = that.task.listSign;
|
||||
let title = "【"+ that.task.taskName +"】人员详情";
|
||||
uni.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
});
|
||||
},
|
||||
setInfo(item){
|
||||
this.$refs.popup.open('center')
|
||||
this.signInfo = item;
|
||||
},
|
||||
sign(status){
|
||||
let oldStatus = this.signInfo.status;
|
||||
let change = this.signInfo.status != status;
|
||||
this.signInfo.status = status;
|
||||
let oldStatus = this.signInfo.status;
|
||||
let change = this.signInfo.status != status;
|
||||
this.signInfo.status = status;
|
||||
setSign(this.signInfo);
|
||||
if (change){
|
||||
if (status == 1){
|
||||
@ -169,9 +169,21 @@
|
||||
this.showSign.push(this.task.listSign[i]);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
delItem(item){
|
||||
var that = this;
|
||||
cancelBaoming({"id": item.id}).then(response => {
|
||||
this.$refs.popup.close()
|
||||
that.showSign = that.showSign.filter(i => i.id !== item.id);
|
||||
if (item.status == 1){
|
||||
this.task.signNum --;
|
||||
}else if (item.status == 0){
|
||||
this.task.noSignNum --;
|
||||
}
|
||||
this.task.baomingNum --;
|
||||
this.$modal.msgSuccess(item.employeeName + "已移除");
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@ -375,6 +387,13 @@
|
||||
height: 100%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
.delItem{
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 50rpx;
|
||||
color: #e8001a;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
Loading…
Reference in New Issue
Block a user