|
|
@@ -236,19 +236,18 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
/* 获取供需列表 */
|
|
|
- getSupplyAndDemand(fstatus) {
|
|
|
+ getSupplyAndDemand(fstatus, condition = '') {
|
|
|
const ftype = (this.data.ftype != '全部') ? this.data.ftype : "";
|
|
|
- let condition = "",
|
|
|
- where = {
|
|
|
- "condition": condition, //模糊搜索
|
|
|
- "ftype": ftype, //数据类型
|
|
|
- "fissupply": 0, // 0需 1供
|
|
|
- "fstatus": ""
|
|
|
- };
|
|
|
+ let where = {
|
|
|
+ "condition": this.data.searchText, //模糊搜索
|
|
|
+ "ftype": ftype, //数据类型
|
|
|
+ "fissupply": 0, // 0需 1供
|
|
|
+ "fstatus": ""
|
|
|
+ };
|
|
|
/* 暂时不分供需 */
|
|
|
if (fstatus) {
|
|
|
where = {
|
|
|
- "condition": condition, //模糊搜索
|
|
|
+ "condition": this.data.searchText, //模糊搜索
|
|
|
"ftype": ftype, //数据类型
|
|
|
"fissupply": 0, // 0需 1供
|
|
|
"fstatus": "对接中"
|
|
|
@@ -354,14 +353,16 @@ Page({
|
|
|
if (value == this.data.searchText) return this.setData({
|
|
|
searchFocus: false,
|
|
|
});
|
|
|
- let searchText = "";
|
|
|
- if (value != "") searchText = value;
|
|
|
this.setData({
|
|
|
searchFocus: false,
|
|
|
- searchText
|
|
|
+ searchText:value
|
|
|
})
|
|
|
this.InitializeDataPaging();
|
|
|
- this.myNeed();
|
|
|
+ if (this.data.active == 0) {
|
|
|
+ this.getSupplyAndDemand();
|
|
|
+ } else {
|
|
|
+ this.myNeed();
|
|
|
+ }
|
|
|
},
|
|
|
/* 初始化分页数据 */
|
|
|
InitializeDataPaging() {
|