<template>
	<view>


		<list ref="listRef" :produceFilter="produceFilter"></list>

	</view>
</template>

<script>
	import list from './list.vue'

	export default {
		components: {
			list
		},
		mixins: [],
		data() {
			return {
				produceFilter: {}

			}
		},
		computed: {

		},
		created() {
			uni.$off('successInit')
			uni.$on('successInit', (data) => {
				this.$nextTick(() => {
					this.$refs.listRef.successInit()
				})
			})
		},
		onUnload() {
			if (this.produceFilter && this.produceFilter.fromProduceReport == "1") {
				uni.$emit("refreshProduceReportWork")
			}
		
			uni.$off('successInit')
		
		},
		onLoad(options = {}) {
			this.produceFilter = {
				produceSourceTaskId: options.produceSourceTaskId || "",
				workOrderCode: options.workOrderCode ? decodeURIComponent(options.workOrderCode) : "",
				fromProduceReport: options.fromProduceReport || ""
			}
			this.$nextTick(() => {
				this.$refs.listRef.getList()
			})
			uni.setNavigationBarColor({
			   frontColor: '#000000',
			 });
		},


		methods: {

		}
	}
</script>

<style lang="scss" scoped>

</style>
