Merge branch 'dev' into 'master'

uniapp【修复】:佣金明细,日期选择bug修复

See merge request jianweie/coreshoppro!104
This commit is contained in:
花城
2024-12-05 02:43:26 +00:00
2 changed files with 303 additions and 302 deletions

View File

@@ -37,7 +37,7 @@
<view class="filter"> <view class="filter">
<view class="date" @click="onToggleVisibleCalendars()"> <view class="date" @click="onToggleVisibleCalendars()">
<uv-icon :name="state.arrowUp?'arrow-up':'arrow-down'"></uv-icon> <uv-icon :name="state.arrowUp?'arrow-up':'arrow-down'"></uv-icon>
<view class="selected_date">{{state.selectedDate}}</view> <view class="selected_date">{{state.selectedDate[0]}} {{state.selectedDate[1]}}</view>
</view> </view>
<view class="filter_total">收入{{state.totalMoney}}</view> <view class="filter_total">收入{{state.totalMoney}}</view>
</view> </view>
@@ -61,8 +61,8 @@
</view> </view>
</view> </view>
<uv-calendars ref="calendarsRef" mode="range" confirmColor="#D33123" color="#D33123" @confirm="confirmCalendars" <uv-calendars ref="calendarsRef" mode="range" :date="state.selectedDate" confirmColor="#D33123" color="#D33123"
@close="closeCalendars" /> @confirm="confirmCalendars" @close="closeCalendars" />
</coreshop-page> </coreshop-page>
</template> </template>
@@ -81,9 +81,10 @@
const { statusBarHeight } = useSystemInfo(); const { statusBarHeight } = useSystemInfo();
const calendarsRef = ref(); const calendarsRef = ref();
const nowTimeStamp = new Date().getTime() const nowTimeStamp = new Date().getTime();
const state = reactive<{ const state = reactive<{
selectedDate : string; selectedDate : Array<string>;
arrowUp : boolean; arrowUp : boolean;
showMoney : boolean; showMoney : boolean;
info : any; info : any;
@@ -93,7 +94,7 @@
totalMoney : number; totalMoney : number;
userInfo : UserInfoType, userInfo : UserInfoType,
}>({ }>({
selectedDate: timeFormat(nowTimeStamp) + '至' + timeFormat(nowTimeStamp), selectedDate: [timeFormat(nowTimeStamp), timeFormat(nowTimeStamp)],
arrowUp: false, arrowUp: false,
showMoney: false, showMoney: false,
info: {}, info: {},
@@ -139,7 +140,7 @@
id: 9, id: 9,
page: state.page, page: state.page,
limit: 10, limit: 10,
propsDate: state.selectedDate propsDate: state.selectedDate[0] + '至' + state.selectedDate[1]
}) })
if (balance.status) { if (balance.status) {
state.totalMoney = balance.otherData.sunMoney; state.totalMoney = balance.otherData.sunMoney;
@@ -156,7 +157,7 @@
/** 选择时间 */ /** 选择时间 */
const confirmCalendars = (e : any) => { const confirmCalendars = (e : any) => {
state.selectedDate = e.range.data[0] + '至' + e.range.data[1]; state.selectedDate = [e.range.before, e.range.after];
state.page = 1; state.page = 1;
state.list = []; state.list = [];
getUserBalance(); getUserBalance();

View File

@@ -37,7 +37,7 @@
<view class="filter"> <view class="filter">
<view class="date" @click="onToggleVisibleCalendars()"> <view class="date" @click="onToggleVisibleCalendars()">
<uv-icon :name="state.arrowUp?'arrow-up':'arrow-down'"></uv-icon> <uv-icon :name="state.arrowUp?'arrow-up':'arrow-down'"></uv-icon>
<view class="selected_date">{{state.selectedDate}}</view> <view class="selected_date">{{state.selectedDate[0]}} {{state.selectedDate[1]}}</view>
</view> </view>
<view class="filter_total">收入{{state.totalMoney}}</view> <view class="filter_total">收入{{state.totalMoney}}</view>
</view> </view>
@@ -61,8 +61,8 @@
</view> </view>
</view> </view>
<uv-calendars ref="calendarsRef" mode="range" confirmColor="#D33123" color="#D33123" @confirm="confirmCalendars" <uv-calendars ref="calendarsRef" mode="range" :date="state.selectedDate" confirmColor="#D33123" color="#D33123"
@close="closeCalendars" /> @confirm="confirmCalendars" @close="closeCalendars" />
</coreshop-page> </coreshop-page>
</template> </template>
@@ -84,7 +84,7 @@
const nowTimeStamp = new Date().getTime() const nowTimeStamp = new Date().getTime()
const state = reactive<{ const state = reactive<{
selectedDate : string; selectedDate : Array<string>;
arrowUp : boolean; arrowUp : boolean;
showMoney : boolean; showMoney : boolean;
info : any; info : any;
@@ -94,7 +94,7 @@
totalMoney : number; totalMoney : number;
userInfo : UserInfoType, userInfo : UserInfoType,
}>({ }>({
selectedDate: timeFormat(nowTimeStamp) + '至' + timeFormat(nowTimeStamp), selectedDate: [timeFormat(nowTimeStamp), timeFormat(nowTimeStamp)],
arrowUp: false, arrowUp: false,
showMoney: false, showMoney: false,
info: {}, info: {},
@@ -140,7 +140,7 @@
id: 5, id: 5,
page: state.page, page: state.page,
limit: 10, limit: 10,
propsDate: state.selectedDate propsDate: state.selectedDate[0] + '至' + state.selectedDate[1]
}) })
if (balance.status) { if (balance.status) {
state.totalMoney = balance.otherData.sunMoney; state.totalMoney = balance.otherData.sunMoney;
@@ -157,7 +157,7 @@
/** 选择时间 */ /** 选择时间 */
const confirmCalendars = (e : any) => { const confirmCalendars = (e : any) => {
state.selectedDate = e.range.data[0] + '至' + e.range.data[1]; state.selectedDate = [e.range.before, e.range.after];
state.page = 1; state.page = 1;
state.list = []; state.list = [];
getUserBalance(); getUserBalance();