Commit e1c9bf0e authored by 英思-陈欢's avatar 英思-陈欢

增加提示

parent 0187cd5e
...@@ -106,6 +106,17 @@ ...@@ -106,6 +106,17 @@
Api.foo.queryYearsBill(this.form).then((res: any) => { Api.foo.queryYearsBill(this.form).then((res: any) => {
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -70,6 +70,17 @@ ...@@ -70,6 +70,17 @@
Api.foo.chronicDiseaseIdentificationHospital(this.form).then((res: any) => { Api.foo.chronicDiseaseIdentificationHospital(this.form).then((res: any) => {
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -116,6 +116,17 @@ ...@@ -116,6 +116,17 @@
// }) // })
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -149,6 +149,17 @@ ...@@ -149,6 +149,17 @@
Api.foo.paymentProgress(this.form).then((res: any) => { Api.foo.paymentProgress(this.form).then((res: any) => {
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -43,6 +43,17 @@ ...@@ -43,6 +43,17 @@
Api.foo.handingAgencyQuery(this.form).then((res: any) => { Api.foo.handingAgencyQuery(this.form).then((res: any) => {
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -107,6 +107,17 @@ ...@@ -107,6 +107,17 @@
}) })
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -46,7 +46,20 @@ ...@@ -46,7 +46,20 @@
methods: { methods: {
getDetail() { getDetail() {
Api.foo.outPatientCoordinationQuota(this.form).then((res: any) => { Api.foo.outPatientCoordinationQuota(this.form).then((res: any) => {
if (res) {
this.detail = res; this.detail = res;
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
}) })
}, },
} }
......
...@@ -66,6 +66,17 @@ ...@@ -66,6 +66,17 @@
Api.foo.overallPlanningPharmacyQuery(this.form).then((res: any) => { Api.foo.overallPlanningPharmacyQuery(this.form).then((res: any) => {
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -63,7 +63,20 @@ ...@@ -63,7 +63,20 @@
methods: { methods: {
getDetail() { getDetail() {
Api.foo.amountQuery(this.form).then((res: any) => { Api.foo.amountQuery(this.form).then((res: any) => {
if (res.data) {
this.detail = res.data; this.detail = res.data;
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
}) })
}, },
}, },
......
...@@ -112,7 +112,20 @@ ...@@ -112,7 +112,20 @@
methods: { methods: {
getDetail() { getDetail() {
Api.foo.payApplyQuery(this.form).then((res: any) => { Api.foo.payApplyQuery(this.form).then((res: any) => {
if (res) {
this.detail = res; this.detail = res;
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
}) })
}, },
}, },
......
...@@ -108,7 +108,20 @@ export default Vue.extend({ ...@@ -108,7 +108,20 @@ export default Vue.extend({
methods: { methods: {
getList(type = '') { getList(type = '') {
Api.foo.queryYearsBill(this.form).then((res: any) => { Api.foo.queryYearsBill(this.form).then((res: any) => {
if (res) {
this.list = [res] as any this.list = [res] as any
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
// console.log(this.list) // console.log(this.list)
// if (type == 'loadmore') { // if (type == 'loadmore') {
// this.list = [...this.list, ...res.list] as any; // this.list = [...this.list, ...res.list] as any;
...@@ -120,10 +133,10 @@ export default Vue.extend({ ...@@ -120,10 +133,10 @@ export default Vue.extend({
} }
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { // if (this.total > this.list.length) {
this.form.pageNum += 1 // this.form.pageNum += 1
this.getList('loadmore') // this.getList('loadmore')
} // }
} }
}) })
</script> </script>
......
...@@ -81,6 +81,17 @@ ...@@ -81,6 +81,17 @@
}) })
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -180,7 +180,20 @@ ...@@ -180,7 +180,20 @@
methods: { methods: {
getDetail() { getDetail() {
Api.foo.transferInformation(this.form).then((res) => { Api.foo.transferInformation(this.form).then((res) => {
if (res) {
this.detail = res; this.detail = res;
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
}) })
} }
}, },
......
...@@ -69,6 +69,17 @@ ...@@ -69,6 +69,17 @@
}) })
if (type == 'loadmore') { if (type == 'loadmore') {
this.list = [...this.list, ...res.list] as any; this.list = [...this.list, ...res.list] as any;
} else if (res.list.length == 0) {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
} else { } else {
this.list = res.list; this.list = res.list;
} }
......
...@@ -134,7 +134,20 @@ ...@@ -134,7 +134,20 @@
methods: { methods: {
getDetail() { getDetail() {
Api.foo.medicalAssistance(this.form).then((res: any) => { Api.foo.medicalAssistance(this.form).then((res: any) => {
if (res) {
this.detail = res; this.detail = res;
} else {
xma.showModal({
title: '暂无数据',
showCancel: false,
confirmText: '确定',
success: () => {
xma.navigateBack({
delta: 1
})
}
})
}
}) })
}, },
}, },
......
...@@ -116,7 +116,7 @@ const request = new Request({ ...@@ -116,7 +116,7 @@ const request = new Request({
}, },
response: { response: {
onFulfilled(result) { onFulfilled(result) {
return result.data; return result && result.data;
}, },
onRejected(error) { onRejected(error) {
return error; return error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment