|
@ -144,8 +144,12 @@ export default { |
|
|
props:{ |
|
|
props:{ |
|
|
plotId:{ |
|
|
plotId:{ |
|
|
type:String, |
|
|
type:String, |
|
|
defaylt:"" |
|
|
default:"" |
|
|
}, |
|
|
}, |
|
|
|
|
|
plantId:{ |
|
|
|
|
|
type:String, |
|
|
|
|
|
default:"", |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
data(){ |
|
|
data(){ |
|
|
return{ |
|
|
return{ |
|
@ -164,28 +168,25 @@ export default { |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
this.search() |
|
|
this.search() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
reSearch(plantId){ |
|
|
reSearch(){ |
|
|
this.$nextTick(()=>{ |
|
|
this.clean() |
|
|
this.list=[] |
|
|
this.search() |
|
|
this.total=0 |
|
|
|
|
|
this.searchVal.pageNo=1 |
|
|
|
|
|
this.search(plantId) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
clean(){ |
|
|
clean(){ |
|
|
this.list=[] |
|
|
this.list=[] |
|
|
this.total=0 |
|
|
this.total=0 |
|
|
this.searchVal.pageNo=1 |
|
|
this.searchVal.pageNo=1 |
|
|
}, |
|
|
}, |
|
|
async search(plantId=''){ |
|
|
async search(){ |
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
var res=await request("/api/plantHarvest/list",{ |
|
|
var res=await request("/api/plantHarvest/list",{ |
|
|
params:{ |
|
|
params:{ |
|
|
...this.searchVal, |
|
|
...this.searchVal, |
|
|
plotId:this.plotId, |
|
|
plotId:this.plotId, |
|
|
plantScheduleId: plantId, |
|
|
plantScheduleId: this.plantId, |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
@ -205,6 +206,7 @@ export default { |
|
|
toAddTransaction(e){ |
|
|
toAddTransaction(e){ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages/massif/add_transaction", |
|
|
url:"/pages/massif/add_transaction", |
|
|
|
|
|
events:{update:()=>{this.$emit("trigger",e.id)}}, |
|
|
success(res){ |
|
|
success(res){ |
|
|
res.eventChannel.emit('detail',e) |
|
|
res.eventChannel.emit('detail',e) |
|
|
} |
|
|
} |
|
|