暂时提交

This commit is contained in:
2026-07-24 10:46:00 +08:00
parent 070f3bab4f
commit 9bf70e785e
15 changed files with 1133 additions and 630 deletions

View File

@@ -109,30 +109,63 @@
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${weekday} ${hours}:${minutes}`;
},
// 👇 你的请求逻辑完全不动
// 加载退租申请列表
fetchApplys() {
if (this.loadStatus !== 'more') return;
this.loadStatus = 'loading';
let url = '/discharge/queryPage'
this.$u.post(url, {
pageNo: this.pageNo,
pageSize: this.pageSize
}, {
WT: this.$getToken()
}).then(res => {
const rows = res.data.result || [];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(rows);
if (rows.length < this.pageSize) {
this.loadStatus = 'nomore';
} else {
this.pageNo++;
this.loadStatus = 'more';
// TODO: 接口联调时取消注释,删除 mock 数据
// let url = '/discharge/queryPage'
// this.$u.post(url, {
// pageNo: this.pageNo,
// pageSize: this.pageSize
// }, {
// WT: this.$getToken()
// }).then(res => {
// const rows = res.data.result || [];
// if (this.pageNo === 1) this.flowList = [];
// this.flowList = this.flowList.concat(rows);
// if (rows.length < this.pageSize) {
// this.loadStatus = 'nomore';
// } else {
// this.pageNo++;
// this.loadStatus = 'more';
// }
// }).catch(err => {
// console.log("获取退租申请信息失败:", err)
// this.loadStatus = 'more';
// })
// Mock 静态数据
const mockData = [
{
id: '1',
contractName: '东山大道435号房屋租赁合同',
status: '申请中',
applyDate: '2026-06-15',
dischargeItem: '东山大道435-2-1-104号',
remark: '等待审批中'
},
{
id: '2',
contractName: '夷陵大道418号房屋租赁合同',
status: '已批准',
applyDate: '2026-06-10',
dischargeItem: '夷陵大道418号',
remark: '已通过审批,请办理退租手续'
},
{
id: '3',
contractName: '解放路88号房屋租赁合同',
status: '退租完成',
applyDate: '2026-05-20',
dischargeItem: '解放路88-1-502',
remark: '退租已完成,押金已退还'
}
}).catch(err => {
console.log("获取退租申请信息失败:", err)
this.loadStatus = 'more';
})
];
if (this.pageNo === 1) this.flowList = [];
this.flowList = this.flowList.concat(mockData);
this.loadStatus = 'nomore';
},
// 👇 你的跳转 1 行没改
toApply() {
@@ -180,8 +213,8 @@
},
async onShow() {
try {
await this.$checkToken(this.$getToken())
this.checkOaAuth()
// await this.$checkToken(this.$getToken())
// this.checkOaAuth()
this.fetchApplys()
} catch (e) {
return
@@ -235,17 +268,17 @@
border-radius: 4rpx;
&.done {
background: #FCE5E0;
color: #ED7748;
background: #0088FE;
color: #fff;
}
&.pending {
background: #F2F3F7;
color: #86868C;
background: #FF8D1A;
color: #fff;
}
&.reject {
background: #FFE4E1;
color: #DC143C;
background: #DC143C;
color: #fff;
}
}
@@ -290,7 +323,7 @@
.add-btn {
width: 100%;
height: 80rpx;
background: linear-gradient(90deg, #FF6F63 0%, #FB392A 100%);
background: #0088FE;
border-radius: 10rpx;
color: #ffffff;
font-size: 32rpx;