|
|
@@ -2,34 +2,38 @@ const _Http = getApp().globalData.http;
|
|
|
|
|
|
Page({
|
|
|
data: {
|
|
|
- tabs: [{ title: '全部' }],
|
|
|
- id: 2026053014220602,
|
|
|
+ condition: "",
|
|
|
+ id: 2026053014220602,
|
|
|
content: {
|
|
|
nocache: true,
|
|
|
pageNumber: 1,
|
|
|
pageSize: 20,
|
|
|
where: {
|
|
|
condition: "",
|
|
|
- status: ['全部'],
|
|
|
- iswarranty: "",
|
|
|
- begindate_createdate: "",
|
|
|
- enddate_createdate: ""
|
|
|
+ ishaswarrantycard: "",
|
|
|
+ begindate: "",
|
|
|
+ enddate: ""
|
|
|
}
|
|
|
},
|
|
|
filtratelist: [],
|
|
|
list: []
|
|
|
},
|
|
|
|
|
|
+ onChange({ detail }) {
|
|
|
+ this.setData({ condition: detail });
|
|
|
+ },
|
|
|
+
|
|
|
onSearch({ detail }) {
|
|
|
+ this.setData({ condition: detail });
|
|
|
this.data.content.where.condition = detail;
|
|
|
this.getList(true);
|
|
|
},
|
|
|
|
|
|
- onChangeTab({ detail }) {
|
|
|
- this.setData({
|
|
|
- 'content.where.status': [detail.title]
|
|
|
- });
|
|
|
- this.getList(true);
|
|
|
+ clickFiltration() {
|
|
|
+ let filtrate = this.selectComponent("#filtrate");
|
|
|
+ if (filtrate) {
|
|
|
+ filtrate.setData({ show: true });
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getList(init = false) {
|
|
|
@@ -58,12 +62,12 @@ Page({
|
|
|
label: "是否生成质保卡",
|
|
|
index: null,
|
|
|
showName: "value",
|
|
|
- valueKey: "iswarranty",
|
|
|
- selectKey: "value",
|
|
|
+ valueKey: "ishaswarrantycard",
|
|
|
+ selectKey: "id",
|
|
|
value: "",
|
|
|
list: [
|
|
|
- { value: "是" },
|
|
|
- { value: "否" }
|
|
|
+ { value: "是", id: 1 },
|
|
|
+ { value: "否", id: 0 }
|
|
|
]
|
|
|
}];
|
|
|
this.setData({ filtratelist });
|
|
|
@@ -72,11 +76,8 @@ Page({
|
|
|
|
|
|
handleFilter({ detail }) {
|
|
|
detail.condition = this.data.content.where.condition;
|
|
|
- detail.status = this.data.content.where.status;
|
|
|
- detail.begindate_createdate = detail.startdate || '';
|
|
|
- detail.enddate_createdate = detail.enddate || '';
|
|
|
+ detail.begindate = detail.startdate || '';
|
|
|
delete detail.startdate;
|
|
|
- delete detail.enddate;
|
|
|
this.data.content.where = detail;
|
|
|
this.getList(true);
|
|
|
}
|