This commit is contained in:
xiaofajia 2024-12-16 18:05:06 +08:00
parent 6a8174bf64
commit 5813d64b0f
2 changed files with 42 additions and 9 deletions

View File

@ -1,8 +1,8 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
// baseUrl: 'https://www.nuoyunr.com/admin-api', // baseUrl: 'https://www.nuoyunr.com/admin-api',
// baseUrl: 'http://127.0.0.1:48080/admin-api', baseUrl: 'http://127.0.0.1:48080/admin-api',
baseUrl: 'http://i3472v.natappfree.cc/admin-api', // baseUrl: 'http://i3472v.natappfree.cc/admin-api',
imagesUrl: 'http://www.nuoyunr.com/lananRsc', imagesUrl: 'http://www.nuoyunr.com/lananRsc',
baseImageUrl: 'https://www.nuoyunr.com/minio', baseImageUrl: 'https://www.nuoyunr.com/minio',
wsUrl: 'ws://127.0.0.1:48080', wsUrl: 'ws://127.0.0.1:48080',

View File

@ -11,8 +11,9 @@
<view class="bai-title">当日订单</view> <view class="bai-title">当日订单</view>
<view style="width: 15px; height: 100%;"></view> <view style="width: 15px; height: 100%;"></view>
</view> </view>
<view class="example-body" style="width: 75%;margin-top: 1rem;display: flex;justify-content: space-between"> <view class="example-body" style="width: 100%;margin-top: 1rem;display: flex;justify-content: space-between;">
<uni-datetime-picker v-model="queryParams.queryTime" type="daterange" @maskClick="maskClick"/> <uni-datetime-picker v-model="queryParams.queryTime" type="daterange" @maskClick="maskClick"/>
<radio style="margin-left: 1rem;display: flex;align-items: center" :checked="queryParams.chooseStatus === item.value" @click="queryParams.chooseStatus = item.value" v-for="item in statues" :key="item.value">{{item.label}}</radio>
<view class="sou" @click="handleSearch">搜索</view> <view class="sou" @click="handleSearch">搜索</view>
<view class="sou" @click="handleReset">重置</view> <view class="sou" @click="handleReset">重置</view>
</view> </view>
@ -55,15 +56,32 @@ export default {
queryTime: null, queryTime: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
chooseStatus: "1"
}, },
loading: false, // loading: false, //
payTypes: [], payTypes: [],
pages: 0, pages: 0,
statues: [
{
label: "全部",
value: "1",
},
{
label: "进行中",
value: "2",
},
{
label: "已完成",
value: "3",
},
],
countMap: []
}; };
}, },
onReady() { onReady() {
this.setLandscape(); this.setLandscape();
this.getTableData(); this.getTableData();
this.getCountMap()
this.getDictData() this.getDictData()
}, },
onUnload() { onUnload() {
@ -73,7 +91,7 @@ export default {
if (!this.loading && this.queryParams.pageNum < this.pages) { if (!this.loading && this.queryParams.pageNum < this.pages) {
this.queryParams.pageNum += 1; this.queryParams.pageNum += 1;
this.getTableData(true); this.getTableData(true);
}else { } else {
uni.showToast({ uni.showToast({
title: '没有下一页数据', title: '没有下一页数据',
icon: 'none' icon: 'none'
@ -81,12 +99,21 @@ export default {
} }
}, },
methods: { methods: {
handleShow(id){ getCountMap(){
request({
url: '/partnerOwn/partner/getTypeCount',
method: 'get',
params: this.queryParams
}).then(res => {
console.log(res)
})
},
handleShow(id) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/orderdetails?inspectionInfoId=" + id url: "/pages/index/orderdetails?inspectionInfoId=" + id
}) })
}, },
maskClick(){ maskClick() {
this.handleReset() this.handleReset()
}, },
getDictData() { getDictData() {
@ -95,12 +122,12 @@ export default {
} }
}, },
getPayType(type) { getPayType(type) {
if (!this.payTypes || this.payTypes.length === 0){ if (!this.payTypes || this.payTypes.length === 0) {
this.getDictData() this.getDictData()
} }
if (type){ if (type) {
const index = this.payTypes.findIndex(item => item.value === type) const index = this.payTypes.findIndex(item => item.value === type)
if (index !== -1){ if (index !== -1) {
return this.payTypes[index].label return this.payTypes[index].label
} }
} }
@ -110,15 +137,19 @@ export default {
queryTime: null, queryTime: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
chooseStatus: "1"
}; };
this.tableData = []; // this.tableData = []; //
this.getTableData(); this.getTableData();
this.getCountMap()
}, },
handleSearch() { handleSearch() {
this.queryParams.pageNum = 1
if (this.queryParams.queryTime) { if (this.queryParams.queryTime) {
this.queryParams.startTime = this.queryParams.queryTime[0]; this.queryParams.startTime = this.queryParams.queryTime[0];
this.queryParams.endTime = this.queryParams.queryTime[1]; this.queryParams.endTime = this.queryParams.queryTime[1];
this.getTableData(); this.getTableData();
this.getCountMap()
} }
}, },
getTableData(isLoadMore = false) { getTableData(isLoadMore = false) {
@ -291,4 +322,6 @@ export default {
justify-content: center; /* 水平居中 */ justify-content: center; /* 水平居中 */
box-sizing: border-box; /* 确保 padding 和 border 不会增加元素的实际宽度 */ box-sizing: border-box; /* 确保 padding 和 border 不会增加元素的实际宽度 */
} }
.example-body{
}
</style> </style>