index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="home">
  3. <cu-custom class="home-custom" bgColor=".bg-sancolor" bgImage="../../static/icons/bg.png" :isBack="true">
  4. <block slot="content">安徽省农产品检测监测平台</block>
  5. </cu-custom>
  6. <view class="cu-list menu content-box">
  7. <form>
  8. <view class="cu-form-group">
  9. <view class="title">抽样人员1</view>
  10. <input placeholder="请输入抽样人员1" name="input" v-model="options.samplingPeopleFirst"></input>
  11. </view>
  12. <view class="cu-form-group">
  13. <view class="title">抽样人员2</view>
  14. <input placeholder="请输入抽样人员2" name="input" v-model="options.samplingPeopleSecond"></input>
  15. </view>
  16. <view class="padding flex flex-direction">
  17. <button class="cu-btn bg-green lg" @tap="submitSampleSheet()">提交</button>
  18. </view>
  19. </form>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import {_sampleSheetAdd} from './sample-sheet-add-model.js'
  25. export default{
  26. data(){
  27. return{
  28. options:[]
  29. }
  30. },
  31. onLoad(options){
  32. this.options = options
  33. },
  34. methods:{
  35. //提交抽样单
  36. submitSampleSheet(){
  37. _sampleSheetAdd.createAhSampleSheet(this.options, res=>{
  38. console.log(res.data)
  39. if(res.data.code==200){
  40. uni.navigateBack()
  41. }
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. </style>