王志国
3 weeks ago
5 changed files with 772 additions and 846 deletions
@ -1,48 +1,41 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-putaway-record :title="title" ref="productPutawayRecord" putawayType='assemble'></product-putaway-record> |
<product-putaway-record :title="title" ref="productPutawayRecordRef" putawayType="assemble"></product-putaway-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup> |
||||
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
|
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'; |
||||
|
|
||||
export default { |
const title = ref(''); |
||||
components: { |
const productPutawayRecordRef = ref(null); |
||||
productPutawayRecord |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
title:'' |
|
||||
}; |
|
||||
}, |
|
||||
onLoad(option){ |
|
||||
this.title = option.title |
|
||||
}, |
|
||||
|
|
||||
onShow() { |
onLoad((option) => { |
||||
if(this.$refs.productPutawayRecord!=undefined){ |
title.value = option.title; |
||||
// this.$refs.productPutawayRecord.refresh(); |
}); |
||||
} |
|
||||
}, |
|
||||
|
|
||||
onPullDownRefresh() { |
onShow(() => { |
||||
// this.$refs.productPutawayRecord.refresh(); |
if (productPutawayRecordRef.value) { |
||||
}, |
// productPutawayRecordRef.value.refresh(); |
||||
onNavigationBarButtonTap(e) { |
|
||||
if (e.index === 0) { |
|
||||
this.$refs.productPutawayRecord.toHome(); |
|
||||
} else if (e.index == 1) { |
|
||||
this.$refs.productPutawayRecord.openFilter(); |
|
||||
} |
} |
||||
}, |
}); |
||||
|
|
||||
methods: { |
|
||||
|
|
||||
|
onPullDownRefresh(() => { |
||||
|
if (productPutawayRecordRef.value) { |
||||
|
// productPutawayRecordRef.value.refresh(); |
||||
} |
} |
||||
} |
}); |
||||
</script> |
|
||||
|
|
||||
<style scoped lang="scss"> |
onNavigationBarButtonTap((e) => { |
||||
|
if (e.index === 0) { |
||||
|
productPutawayRecordRef.value.toHome(); |
||||
|
} else if (e.index === 1) { |
||||
|
productPutawayRecordRef.value.openFilter(); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
</style> |
<style scoped lang="scss"> |
||||
|
</style> |
||||
|
@ -1,48 +1,41 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-putaway-record :title="title" ref="productPutawayRecord" putawayType='predict'></product-putaway-record> |
<product-putaway-record :title="title" ref="productPutawayRecordRef" putawayType="predict"></product-putaway-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
|
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'; |
||||
|
|
||||
export default { |
const title = ref(''); |
||||
components: { |
const productPutawayRecordRef = ref(null); |
||||
productPutawayRecord |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
title:'' |
|
||||
}; |
|
||||
}, |
|
||||
onLoad(option){ |
|
||||
this.title = option.title |
|
||||
}, |
|
||||
|
|
||||
onShow() { |
onLoad((option) => { |
||||
if(this.$refs.productPutawayRecord!=undefined){ |
title.value = option.title; |
||||
this.$refs.productPutawayRecord.refresh(); |
}); |
||||
} |
|
||||
}, |
|
||||
|
|
||||
onPullDownRefresh() { |
onShow(() => { |
||||
this.$refs.productPutawayRecord.refresh(); |
if (productPutawayRecordRef.value) { |
||||
}, |
productPutawayRecordRef.value.refresh(); |
||||
onNavigationBarButtonTap(e) { |
|
||||
if (e.index === 0) { |
|
||||
this.$refs.productPutawayRecord.toHome(); |
|
||||
} else if (e.index == 1) { |
|
||||
this.$refs.productPutawayRecord.openFilter(); |
|
||||
} |
} |
||||
}, |
}); |
||||
|
|
||||
methods: { |
|
||||
|
|
||||
|
onPullDownRefresh(() => { |
||||
|
if (productPutawayRecordRef.value) { |
||||
|
productPutawayRecordRef.value.refresh(); |
||||
} |
} |
||||
} |
}); |
||||
</script> |
|
||||
|
|
||||
<style scoped lang="scss"> |
onNavigationBarButtonTap((e) => { |
||||
|
if (e.index === 0) { |
||||
|
productPutawayRecordRef.value.toHome(); |
||||
|
} else if (e.index === 1) { |
||||
|
productPutawayRecordRef.value.openFilter(); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
</style> |
<style scoped lang="scss"> |
||||
|
</style> |
||||
|
@ -1,48 +1,47 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-receipt-record :title="title" ref="productPutawayRecord" type='predict'></product-receipt-record> |
<product-receipt-record :title="title" ref="productReceiptRecordRef" type="predict"></product-receipt-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup> |
||||
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
|
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue'; |
||||
|
|
||||
export default { |
// 定义响应式数据 |
||||
components: { |
const title = ref(''); |
||||
productReceiptRecord |
const productReceiptRecordRef = ref(null); |
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
title:'' |
|
||||
}; |
|
||||
}, |
|
||||
onLoad(option){ |
|
||||
this.title = option.title |
|
||||
}, |
|
||||
|
|
||||
onShow() { |
// 页面加载时处理 |
||||
if(this.$refs.productReceiptRecord!=undefined){ |
onLoad((option) => { |
||||
this.$refs.productReceiptRecord.refresh(); |
title.value = option.title; |
||||
} |
}); |
||||
}, |
|
||||
|
|
||||
onPullDownRefresh() { |
// 页面显示时处理 |
||||
this.$refs.productReceiptRecord.refresh(); |
onShow(() => { |
||||
}, |
if (productReceiptRecordRef.value) { |
||||
onNavigationBarButtonTap(e) { |
productReceiptRecordRef.value.refresh(); |
||||
if (e.index === 0) { |
|
||||
this.$refs.productReceiptRecord.toHome(); |
|
||||
} else if (e.index == 1) { |
|
||||
this.$refs.productReceiptRecord.openFilter(); |
|
||||
} |
} |
||||
}, |
}); |
||||
|
|
||||
methods: { |
|
||||
|
|
||||
|
// 下拉刷新时处理 |
||||
|
onPullDownRefresh(() => { |
||||
|
if (productReceiptRecordRef.value) { |
||||
|
productReceiptRecordRef.value.refresh(); |
||||
} |
} |
||||
|
}); |
||||
|
|
||||
|
// 导航栏按钮点击事件 |
||||
|
onNavigationBarButtonTap((e) => { |
||||
|
if (e.index === 0) { |
||||
|
productReceiptRecordRef.value.toHome(); |
||||
|
} else if (e.index === 1) { |
||||
|
productReceiptRecordRef.value.openFilter(); |
||||
} |
} |
||||
|
}); |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
|
/* 样式部分保持不变 */ |
||||
</style> |
</style> |
Loading…
Reference in new issue