commit
This commit is contained in:
+9
-2
@@ -280,13 +280,20 @@ public class TheRapyRecuperationLineController {
|
||||
/**
|
||||
* 旅行社
|
||||
*
|
||||
* @param year 年度,手机端筛选传入时只返回该年度启用的旅行社
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("theRapyRecuperation.line")
|
||||
public Object getTravelAgencyOptions() {
|
||||
List<TheRapyRecuperationTravelAgency> travelAgencies = lineService.dao().query(TheRapyRecuperationTravelAgency.class, Cnd.NEW().desc("year").asc("serialNumber"));
|
||||
public Object getTravelAgencyOptions(Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (year != null) {
|
||||
cnd.and("year", "=", year);
|
||||
cnd.and("isDisabled", "=", false);
|
||||
}
|
||||
cnd.desc("year").asc("serialNumber");
|
||||
List<TheRapyRecuperationTravelAgency> travelAgencies = lineService.dao().query(TheRapyRecuperationTravelAgency.class, cnd);
|
||||
return travelAgencies;
|
||||
}
|
||||
|
||||
|
||||
@@ -666,7 +666,9 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async getTravelAgencyOptions() {
|
||||
const {data} = await $.get('/platform/theRapyRecuperation/line/getTravelAgencyOptions')
|
||||
const {data} = await $.get('/platform/theRapyRecuperation/line/getTravelAgencyOptions', {
|
||||
year: this.pageForm.year || new Date().getFullYear()
|
||||
})
|
||||
this.travelOptions = data.map(v => {
|
||||
return {
|
||||
...v,
|
||||
|
||||
Reference in New Issue
Block a user