From 87bad1af0c203865d318befd9bf3af199896931e Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 09 九月 2024 13:58:05 +0800
Subject: [PATCH] 一些改动
---
src/pages/checkin/index.vue | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/pages/checkin/index.vue b/src/pages/checkin/index.vue
index f50ca1c..4f4f342 100644
--- a/src/pages/checkin/index.vue
+++ b/src/pages/checkin/index.vue
@@ -2,7 +2,7 @@
<view class="full-page">
<up-sticky>
<view class="coreshop-ff content c-p-10">
- <up-search placeholder="璇风偣鍑婚�夋嫨鏃ユ湡" @clickIcon='clickIcon' v-model="wordDate" search-icon="calendar"
+ <up-search placeholder="璇风偣鍑婚�夋嫨鎵撳崱鏃ユ湡" @click='clickIcon' disabled v-model="wordDate" search-icon="calendar"
@custom='PostMyDakaListPage'></up-search>
</view>
<up-subsection :list="list" activeColor="#f9ae3d" @change="sectionChange"></up-subsection>
@@ -13,7 +13,7 @@
<view @click='jumpWorkDetail(item)'
class="bgblue c-p-l-18 c-p-r-18 c-p-t-10 c-p-b-10 chuany-flex chuany-justify-between chuany-font30">
<text class=''>
- 鏃ユ湡锛歿{$util.formatDate(item.workDate)}}
+ 鎵撳崱鏃ユ湡锛歿{$util.formatDate(item.workDate)}}
</text>
</view>
<view class="c-p-26">
@@ -35,7 +35,7 @@
</view>
<view class="chuany-flex chuany-justify-between chuany-flex-wrap c-p-t-14">
<text class="chuany-width50">
- 宸ヤ綔鏃堕暱锛歿{item.workTime}}
+ 鏃堕暱锛歿{item.workTime}}
</text>
<view class="chuany-width50">
<text>
@@ -57,14 +57,15 @@
</view>
<view class="chuany-width50 c-p-t-14">
<text>
- 褰撴棩宸ヨ祫锛歿{item.todaySalary}}鍏�
+ 宸ヨ祫锛歿{item.todaySalary}}鍏�
</text>
</view>
<view class="chuany-width50 c-p-t-14">
<view class="chuany-width10">
- <up-button class="button-layout__item" text="宸ヨ祫鐢虫姤" size="mini"
- v-if="item.isShenPiName!=='宸茬粨绠�'" @click.stop='saveDakaDetail(item)'
- type="warning"></up-button>
+ <!-- v-if="item.isShenPiName!=='宸茬粨绠�'" -->
+ <up-button class="button-layout__item" text="宸ヨ祫鐢虫姤" size="mini" :loading='item.isLoading'
+ loadingText="鐢虫姤涓�" v-if="item.isShenPiName!=='宸茬粨绠�'"
+ @click.stop='saveDakaDetail(item)' type="warning"></up-button>
</view>
</view>
</view>
@@ -137,7 +138,8 @@
<up-empty text='鏆傛棤' icon="/static/order.png">
</up-empty>
</view>
- <fui-date-picker :show="datePickerShow" type="3" @change="changePicker" @cancel="cancel"></fui-date-picker>
+ <fui-date-picker :show="datePickerShow" :value="$util.formatDate(new Date())" type="3" @change="changePicker"
+ @cancel="cancel"></fui-date-picker>
</view>
</template>
@@ -152,7 +154,8 @@
list: ['鍏ㄩ儴', '鏈粨绠�', '宸茬粨绠�'],
datePickerShow: false,
viewList: [],
- loadStatus: 'loadmore'
+ loadStatus: 'loadmore',
+ isLoading: false
}
},
onLoad() {
@@ -193,13 +196,19 @@
if (item.workCount) {
obj.workCount = item.workCount
}
+ item.isLoading = true
this.$api.saveDakaDetail(obj).then(res => {
if (res.code == 1) {
this.$util.showToast({
title: '鐢虫姤鎴愬姛锛�',
icon: 'success'
})
+ } else {
+ this.$util.showToast({
+ title: res.error ? res.error : '澶辫触锛�'
+ })
}
+ item.isLoading = false
})
},
PostMyDakaListPage() {
@@ -232,6 +241,9 @@
this.viewList.concat(...res.data.items)
}
console.log(this.viewList, this.viewList.length, 'this.viewList');
+ this.viewList.forEach(item=>{
+ item.isLoading = false
+ })
// totalPages.value = res.data.totalCount
// 鏍规嵁count鏁伴噺鍒ゆ柇鏄惁杩樻湁鏁版嵁
if (res.data.totalCount > this.viewList.length) {
@@ -246,6 +258,10 @@
},
changePicker(val) {
this.wordDate = val.result
+ this.datePickerShow = false
+ },
+ cancel() {
+ this.datePickerShow = false
},
clickIcon() {
this.datePickerShow = true
--
Gitblit v1.9.1