<template>
	<view class="home">
		<cu-custom class="home-custom" bgColor=".bg-sancolor" bgImage="../../static/icons/bg.png" :isBack="true">
			<block slot="content">安徽省农产品检测监测平台</block>
		</cu-custom>
	
		<view class="cu-list menu content-box">
			<form>
				<view class="cu-form-group">
					<view class="title">抽样人员1</view>
					<input placeholder="请输入抽样人员1" name="input" v-model="options.samplingPeopleFirst"></input>
				</view>
				<view class="cu-form-group">
					<view class="title">抽样人员2</view>
					<input placeholder="请输入抽样人员2" name="input" v-model="options.samplingPeopleSecond"></input>
				</view>
				<view class="padding flex flex-direction">
				  <button class="cu-btn bg-green  lg" @tap="submitSampleSheet()">提交</button>
				</view>
			</form>
		</view>
		
	</view>
	
</template>


<script>
	import {_sampleSheetAdd} from './sample-sheet-add-model.js'
	export default{
		data(){
			return{
				options:[]
			}
		},
		onLoad(options){
			this.options = options
		},
		methods:{
			//提交抽样单
			submitSampleSheet(){
				_sampleSheetAdd.createAhSampleSheet(this.options, res=>{
					console.log(res.data)
					if(res.data.code==200){
						uni.navigateBack()
					}
				})
			}
		}
	}
	
</script>

<style>
</style>
