From 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 24 三月 2025 09:23:08 +0800
Subject: [PATCH] -
---
src/pages/worker/salary.vue | 109 ++++++++++++++++++++++++++++++++++--------------------
1 files changed, 68 insertions(+), 41 deletions(-)
diff --git a/src/pages/worker/salary.vue b/src/pages/worker/salary.vue
index dbebe8c..a0c404d 100644
--- a/src/pages/worker/salary.vue
+++ b/src/pages/worker/salary.vue
@@ -1,44 +1,55 @@
<template>
- <scroll-view class="full-page" scroll-y using-sticky>
- <up-sticky bgColor="#fff">
- <view class="coreshop-ff content c-p-10">
- <up-search placeholder="璇风偣鍑婚�夋嫨鏃ユ湡" @clear='clear' @click='clickTime' disabled @custom='search'
- v-model="workTime" search-icon="calendar" @search='search'></up-search>
- </view>
- <!-- <up-subsection :list="list" :current="current4" activeColor="#f9ae3d"
- @change="sectionChange"></up-subsection> -->
- <!-- <up-subsection :list="list" current='1' activeColor="#f9ae3d" @change="sectionChange"></up-subsection> -->
- </up-sticky>
- <view class="full-page-content c-p-b-100">
- <view class="c-p-l-20 c-p-r-20" v-if="listO.orderList&&listO.orderList.length>0">
- <view class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.id"
- @click="pageToDetail(item)">
- <view class="coreshop-ff chuany-bradius20">
- <view class="c-p-24 chuany-font32">
- <view class="chuany-flex chuany-justify-between">
- <text class="chuany-width28">
- {{item.workerUserName}}
- </text>
- <view class="chuany-width68">
- 宸ヨ祫锛歿{item.todaySalary}} 鍏�
+ <view class="full-page" scroll-y using-sticky>
+ <view class="">
+ <up-sticky bgColor="#fff">
+ <view class="coreshop-ff content c-p-10">
+ <up-search placeholder="璇风偣鍑婚�夋嫨鏃ユ湡" @clear='clear' @click='clickTime' disabled @custom='init'
+ v-model="workTime" search-icon="calendar" @search='init'
+ :show-action="false"></up-search>
+ </view>
+ <view class="coreshop-ff content c-p-10">
+ <up-search placeholder="璇疯緭鍏ュ伐浜哄悕瀛�" v-model="workerUserName" @custom='init'
+ @clear='init' @search='init'></up-search>
+ <!-- <up-search placeholder="璇风偣鍑婚�夋嫨鎵撳崱鏃ユ湡" @click='clickIcon' @clear='PostMyComDakaListPage' disabled
+ v-model="wordDate" search-icon="calendar" @search='PostMyComDakaListPage'
+ @custom='PostMyComDakaListPage'></up-search> -->
+ </view>
+ <!-- <up-subsection :list="list" :current="current4" activeColor="#f9ae3d"
+ @change="sectionChange"></up-subsection> -->
+ <!-- <up-subsection :list="list" current='1' activeColor="#f9ae3d" @change="sectionChange"></up-subsection> -->
+ </up-sticky>
+ <view class="full-page-content c-p-b-100">
+ <view class="c-p-l-20 c-p-r-20" v-if="listO.orderList&&listO.orderList.length>0">
+ <view class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.id"
+ @click="pageToDetail(item)">
+ <view class="coreshop-ff chuany-bradius20">
+ <view class="c-p-24 chuany-font32">
+ <view class="chuany-flex chuany-justify-between">
+ <text class="chuany-width28">
+ {{item.workerUserName}}
+ </text>
+ <view class="chuany-width68">
+ 宸ヨ祫锛歿{item.todaySalary}} 鍏�
+ </view>
</view>
</view>
</view>
</view>
+ <up-loadmore :status="loadStatus" />
</view>
- <up-loadmore :status="loadStatus" />
+ <view v-else>
+ <up-empty text='鏆傛棤' icon="/static/order.png">
+ </up-empty>
+ </view>
</view>
- <view v-else>
- <up-empty text='鏆傛棤' icon="/static/order.png">
- </up-empty>
+ <fui-date-picker range :show="datePickerShow" :value="getFirstDayOfMonth()" type="3"
+ @change="changePicker" @cancel="cancel"></fui-date-picker>
+ <view class="tabbtns">
+ 鍚堣锛歿{heji}} 鍏�
</view>
</view>
- <fui-date-picker range :show="datePickerShow" :value="$util.formatDate(new Date())" type="3"
- @change="changePicker" @cancel="cancel"></fui-date-picker>
- </scroll-view>
- <view class="tabbtns">
- 鍚堣锛歿{heji}} 鍏�
</view>
+
</template>
<script setup>
@@ -66,6 +77,7 @@
let workTime = ref('')
let datePickerShow = ref(false)
let loadStatus = ref('loadmore')
+ let workerUserName = ref('')
let totalPages = ref(0)
let listO = reactive({
orderList: []
@@ -76,6 +88,7 @@
PostMyListPage();
}
})
+
onPullDownRefresh(() => {
state.pageIndex = 1
state.pageSize = 20
@@ -84,8 +97,16 @@
uni.stopPullDownRefresh();
})
onLoad(() => {
+ workTime.value = getFirstDayOfMonth() + '鑷�' + $util.formatDate(new Date())
+ state.wordDateStart = getFirstDayOfMonth() //宸ヤ綔寮�濮嬫椂闂�
+ state.wordDateEnd = $util.formatDate(new Date())
PostMyListPage()
})
+ const getFirstDayOfMonth = () => {
+ var currentDate = new Date();
+ currentDate.setDate(1); // 灏嗘棩鏈熻涓�1
+ return $util.formatDate(currentDate);
+ }
const current4 = ref(0);
// const list = ref(['鍏ㄩ儴', '瀹℃牳涓�', '宸插綍鐢�', '鏈綍鐢�']);
const changePicker = (val) => {
@@ -97,18 +118,19 @@
PostMyListPage()
}
- const search = (index) => {
- console.log(index, '------鈥�');
- if (index == 0) {
- PostMyListPage()
- } else {
- PostMyListPage(index - 1)
- }
+ // const search = (index) => {
+ // console.log(index, '------鈥�');
+ // if (index == 0) {
+ // PostMyListPage()
+ // } else {
+ // PostMyListPage(index - 1)
+ // }
- }
+ // }
const clear = () => {
state.wordDateStart = ""
state.wordDateEnd = ""
+ PostMyListPage()
}
const clickTime = () => {
datePickerShow.value = !datePickerShow.value
@@ -117,11 +139,16 @@
const cancel = () => {
datePickerShow.value = !datePickerShow.value
}
- const PostMyListPage = (orderStatus) => {
+ const init = ()=>{
+ state.pageIndex = 1
+ state.pageSize = 20
+ PostMyListPage()
+ }
+ const PostMyListPage = () => {
let data = {
pageIndex: state.pageIndex,
pageSize: state.pageSize,
- orderStatus
+ workerUserName: workerUserName.value
}
if (state.wordDateStart) {
data.wordDateStart = state.wordDateStart
--
Gitblit v1.9.1