|
@@ -15,27 +15,57 @@
|
|
</uni-tr>
|
|
</uni-tr>
|
|
<!-- 表格数据行 -->
|
|
<!-- 表格数据行 -->
|
|
<uni-tr v-for="(item, index) in tableData" :key="index">
|
|
<uni-tr v-for="(item, index) in tableData" :key="index">
|
|
- <uni-td align="center" style="height: 30px;">{{ item.createDate.split(" ")[0] }}</uni-td>
|
|
|
|
- <uni-td align="center" >
|
|
|
|
|
|
+ <uni-td align="center" style="height: 30px;">{{ item.createDate.split(" ")[0] }}</uni-td>
|
|
|
|
+ <uni-td align="center">
|
|
<view class="toClockDate" v-if="item.toClockDate">{{ item.toClockDate.split(" ")[1] }}</view>
|
|
<view class="toClockDate" v-if="item.toClockDate">{{ item.toClockDate.split(" ")[1] }}</view>
|
|
<view class="toClockDate" v-else-if="!item.toClockDate">
|
|
<view class="toClockDate" v-else-if="!item.toClockDate">
|
|
- <button @click='supp' class="uni-button" size="mini" type="primary" align="center" style="height: 30px;">补卡</button>
|
|
|
|
|
|
+ <button v-if='item.status ==null' @click='supp(item)' class="uni-button" size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡</button>
|
|
|
|
+ <button @click='examine(item)' v-if='item.status=="审核中"'
|
|
|
|
+ class='listitemStatus audit Regular' size="mini" type="primary" align="center"
|
|
|
|
+ style="height: 30px;">审核中</button>
|
|
|
|
+ <button v-if='item.status=="补卡失败"' class='listitemStatus notPass Regular' size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡失败</button>
|
|
|
|
+ <button v-if='item.status=="补卡成功"' class='listitemStatus pass Regular' size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡成功</button>
|
|
</view>
|
|
</view>
|
|
- <view v-if='item.status=="审核中"' class='listitemStatus audit Regular'>审核中</view>
|
|
|
|
- <view v-if='item.status=="补卡失败"' class='listitemStatus notPass Regular'>补卡失败</view>
|
|
|
|
- <view v-if='item.status=="补卡成功"' class='listitemStatus pass Regular'>补卡成功</view>
|
|
|
|
</uni-td>
|
|
</uni-td>
|
|
- <uni-td align="center" >
|
|
|
|
|
|
+ <uni-td align="center">
|
|
<view class="offClockDate" v-if="item.offClockDate">{{ item.offClockDate.split(" ")[1] }}</view>
|
|
<view class="offClockDate" v-if="item.offClockDate">{{ item.offClockDate.split(" ")[1] }}</view>
|
|
- <view class="offClockDate" v-else-if = "!item.offClockDate">
|
|
|
|
- <button @click='supp' class="uni-button" size="mini" type="primary" align="center" style="height: 30px;">补卡</button>
|
|
|
|
|
|
+ <view class="offClockDate" v-else-if="!item.offClockDate">
|
|
|
|
+ <button v-if='item.status ==null' @click='supp' class="uni-button" size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡</button>
|
|
|
|
+ <button @click='examine(item)' v-if='item.status=="审核中"'
|
|
|
|
+ class='listitemStatus audit Regular' size="mini" type="primary" align="center"
|
|
|
|
+ style="height: 30px;">审核中</button>
|
|
|
|
+ <button v-if='item.status=="补卡失败"' class='listitemStatus notPass Regular' size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡失败</button>
|
|
|
|
+ <button v-if='item.status=="补卡成功"' class='listitemStatus pass Regular' size="mini"
|
|
|
|
+ type="primary" align="center" style="height: 30px;">补卡成功</button>
|
|
</view>
|
|
</view>
|
|
- <view v-if='item.status=="审核中"' class='listitemStatus audit Regular'>审核中</view>
|
|
|
|
- <view v-if='item.status=="补卡失败"' class='listitemStatus notPass Regular'>补卡失败</view>
|
|
|
|
- <view v-if='item.status=="补卡成功"' class='listitemStatus pass Regular'>补卡成功</view>
|
|
|
|
</uni-td>
|
|
</uni-td>
|
|
</uni-tr>
|
|
</uni-tr>
|
|
</uni-table>
|
|
</uni-table>
|
|
|
|
+ <view v-if='show1' class="shade">
|
|
|
|
+ <view class="wrap">
|
|
|
|
+ <view class="alert-top">
|
|
|
|
+ <view class="title">
|
|
|
|
+ {{title}}
|
|
|
|
+ </view>
|
|
|
|
+ <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="u-textarea-style">
|
|
|
|
+ {{reasonForApplication}}
|
|
|
|
+ </view>
|
|
|
|
+ <view @click='rejectSubmit()' class="cancel">驳回</view>
|
|
|
|
+ <view @click='passSubmit()' class="confirm">通过</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <u-toast ref="uToast" />
|
|
|
|
+ <view style='padding:10px;' class='flex bottom-btn'>
|
|
|
|
+ <u-button v-if='isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
|
|
|
|
+ <u-button v-if='isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -44,23 +74,30 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ isSHowBtn: true,
|
|
|
|
+ show1: false,
|
|
show: false,
|
|
show: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
|
+ reasonForApplication: '',
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
params: {
|
|
params: {
|
|
year: true,
|
|
year: true,
|
|
month: true
|
|
month: true
|
|
},
|
|
},
|
|
- isLoadMore:false
|
|
|
|
|
|
+ isLoadMore: false,
|
|
|
|
+ title: "补卡申请",
|
|
|
|
+ auditMind: "",
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
- this.getList()
|
|
|
|
- setTimeout(function () {
|
|
|
|
- uni.stopPullDownRefresh(); //关闭下拉刷新
|
|
|
|
- }, 1000);
|
|
|
|
- },
|
|
|
|
|
|
+ this.getList()
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ uni.stopPullDownRefresh(); //关闭下拉刷新
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
onShow() {
|
|
onShow() {
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
@@ -68,7 +105,6 @@
|
|
let _day = new Date();
|
|
let _day = new Date();
|
|
_day.setTime(_day.getTime());
|
|
_day.setTime(_day.getTime());
|
|
this.createDate = _day.getFullYear() + "-" + (_day.getMonth() + 1);
|
|
this.createDate = _day.getFullYear() + "-" + (_day.getMonth() + 1);
|
|
-
|
|
|
|
},
|
|
},
|
|
onReachBottom() { //上拉触底函数
|
|
onReachBottom() { //上拉触底函数
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
@@ -77,46 +113,106 @@
|
|
this.getData()
|
|
this.getData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ examine(item) {
|
|
|
|
+ this.show1 = true
|
|
|
|
+ this.id = item.id
|
|
|
|
+ this.reasonForApplication = item.reasonForApplication
|
|
|
|
+ },
|
|
dateChange(e) {
|
|
dateChange(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
this.createDate = e.year + "-" + e.month
|
|
this.createDate = e.year + "-" + e.month
|
|
},
|
|
},
|
|
- getData(){
|
|
|
|
- this.isLoadMore=true
|
|
|
|
- this.$api.doRequest('get','/clockInfo/selectClockInfo',{
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
- currentPage: this.currentPage,
|
|
|
|
- pcFlag:0,
|
|
|
|
- // phone:uni.getStorageSync('pcUserInfo').userMobilePhone,
|
|
|
|
- compId : uni.getStorageSync('pcUserInfo').compId,
|
|
|
|
- commonId : uni.getStorageSync('pcUserInfo').userId,
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.data.code==200){
|
|
|
|
- this.isLoadMore=false
|
|
|
|
- this.tableData=this.tableData.concat(res.data.data.records)
|
|
|
|
|
|
+ getData() {
|
|
|
|
+ this.isLoadMore = true
|
|
|
|
+ this.$api.doRequest('get', '/clockInfo/selectClockInfo', {
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
+ pcFlag: 0,
|
|
|
|
+ // phone:uni.getStorageSync('pcUserInfo').userMobilePhone,
|
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
|
+ commonId: uni.getStorageSync('pcUserInfo').userId,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.isLoadMore = false
|
|
|
|
+ this.tableData = this.tableData.concat(res.data.data.records)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getList() {
|
|
|
|
+ this.isLoadMore = true
|
|
|
|
+ this.$api.doRequest('get', '/clockInfo/selectClockInfo', {
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
+ pcFlag: 0,
|
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
|
+ commonId: uni.getStorageSync('pcUserInfo').userId,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.isLoadMore = false
|
|
|
|
+ this.tableData = res.data.data.records
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ close() {
|
|
|
|
+ this.show1 = false
|
|
|
|
+ },
|
|
|
|
+ // 驳回
|
|
|
|
+ rejectSubmit() {
|
|
|
|
+ var that = this
|
|
|
|
+ this.show1 = false
|
|
|
|
+ uni.showModal({
|
|
|
|
+ content: "是否确定驳回?",
|
|
|
|
+ showCancel: true,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ that.$api.doRequest('post', '/clockInfo/api/examineClock', {
|
|
|
|
+ examineFlag: "2",
|
|
|
|
+ id: that.id
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$api.msg('提交成功')
|
|
|
|
+ that.getList()
|
|
|
|
+ } else {
|
|
|
|
+ that.$api.msg('提交失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getList(){
|
|
|
|
- this.isLoadMore=true
|
|
|
|
- this.$api.doRequest('get','/clockInfo/selectClockInfo',{
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
- currentPage: this.currentPage,
|
|
|
|
- pcFlag:0,
|
|
|
|
- // phone:uni.getStorageSync('pcUserInfo').userMobilePhone,
|
|
|
|
- compId : uni.getStorageSync('pcUserInfo').compId,
|
|
|
|
- commonId : uni.getStorageSync('pcUserInfo').userId,
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.data.code==200){
|
|
|
|
- this.isLoadMore=false
|
|
|
|
- this.tableData=res.data.data.records
|
|
|
|
-
|
|
|
|
|
|
+ //通过
|
|
|
|
+ passSubmit() {
|
|
|
|
+ var that = this
|
|
|
|
+ this.show1 = false
|
|
|
|
+ uni.showModal({
|
|
|
|
+ content: "是否确定通过?",
|
|
|
|
+ showCancel: true,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ that.$api.doRequest('post', '/clockInfo/api/examineClock', {
|
|
|
|
+ examineFlag: "1",
|
|
|
|
+ id: that.id
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$api.msg('提交成功')
|
|
|
|
+ that.getList()
|
|
|
|
+ } else {
|
|
|
|
+ that.$api.msg('提交失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- supp(){
|
|
|
|
|
|
+ supp(item) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pages/clock/supp_clock'
|
|
|
|
|
|
+ url: '/pages/clock/supp_clock' + `?id=${item.id}`,
|
|
|
|
+ // url: item.url + `?companyId=${that.companyId}`
|
|
})
|
|
})
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -127,6 +223,7 @@
|
|
uni-page-body {
|
|
uni-page-body {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
+
|
|
.uni-container {
|
|
.uni-container {
|
|
margin: 10rpx;
|
|
margin: 10rpx;
|
|
padding: 10rpx 10rpx 300rpx 10rpx;
|
|
padding: 10rpx 10rpx 300rpx 10rpx;
|
|
@@ -138,20 +235,28 @@
|
|
display: flex;
|
|
display: flex;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+
|
|
.center {
|
|
.center {
|
|
margin-right: 50rpx;
|
|
margin-right: 50rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .listitemStatus.audit{
|
|
|
|
- color:#FE6430;
|
|
|
|
|
|
+
|
|
|
|
+ .listitemStatus.audit {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin-top: 6rpx;
|
|
}
|
|
}
|
|
- .listitemStatus.notPass{
|
|
|
|
- color:#FB1E1E;
|
|
|
|
|
|
+
|
|
|
|
+ .listitemStatus.notPass {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin-top: 6rpx;
|
|
}
|
|
}
|
|
- .listitemStatus.pass{
|
|
|
|
- color:#22C572;
|
|
|
|
|
|
+
|
|
|
|
+ .listitemStatus.pass {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin-top: 6rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
.row {
|
|
.row {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -164,7 +269,123 @@
|
|
color: #333333;
|
|
color: #333333;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .uni-button{
|
|
|
|
|
|
+
|
|
|
|
+ .uni-button {
|
|
margin-top: 6rpx;
|
|
margin-top: 6rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .shade {
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ height: 100%;
|
|
|
|
+ width: 100%;
|
|
|
|
+ background: rgba(0, 0, 0, 0.4);
|
|
|
|
+ z-index: 3;
|
|
|
|
+
|
|
|
|
+ .wrap {
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 0;
|
|
|
|
+ top: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ margin: auto;
|
|
|
|
+ background: #fff;
|
|
|
|
+ width: calc(100% - 198rpx);
|
|
|
|
+ height: 250px;
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
+
|
|
|
|
+ .alert-top {
|
|
|
|
+ padding: 33rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ position: relative;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #333333;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .close {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 33rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .u-textarea-style {
|
|
|
|
+ margin: 20rpx;
|
|
|
|
+ background: #F9F9FA;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ border: 1px solid #EEEEEE;
|
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
|
+ position: relative;
|
|
|
|
+ height: 113px;
|
|
|
|
+
|
|
|
|
+ .right-bottom {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 20rpx;
|
|
|
|
+ bottom: 20rpx;
|
|
|
|
+ color: #AFB3BF;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cancel {
|
|
|
|
+ position: absolute;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 50%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ border-top: 1px solid #eee;
|
|
|
|
+ font-size: 34rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .confirm {
|
|
|
|
+ position: absolute;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 50%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ border-top: 1px solid #eee;
|
|
|
|
+ font-size: 34rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cancel {
|
|
|
|
+ left: 0;
|
|
|
|
+ border-right: 1px solid #eee;
|
|
|
|
+ color: #ff0000;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .confirm {
|
|
|
|
+ right: 0;
|
|
|
|
+ color: #22C572;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .bottom-btn {
|
|
|
|
+ width: 100%;
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ z-index: 2;
|
|
|
|
+ left: 0;
|
|
|
|
+ background-color: #f8f8f8;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+
|
|
|
|
+ .btn1,
|
|
|
|
+ .btn2 {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin-bottom: 26rpx;
|
|
|
|
+ border-radius: 90rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .btn1 {
|
|
|
|
+ background: white;
|
|
|
|
+ color: #00C265;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|