You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
945 B

<style lang="less">
.container{
min-height:100%;
background:#f6f6f6;
padding:30rpx 0;
}
</style>
<template>
<view class="container">
<u-form class="card inline" labelWidth="auto" errorType="toast" :model="formData" :rules="rules">
<d-form
v-for="(v,k) in fields" :key="k"
:field="k"
v-bind="v"
:required="!!rules[k]"/>
</u-form>
<button class="cu-btn round bg-green shadow submit" @click="submit">确定提交</button>
</view>
</template>
<script>
export default {
data(){
return{
fields:{
name:{label:"名称"},
type:{label:"类型"},
batch:{label:"种苗批次号",btnText:"生成"},
source:{label:"来源",type:"radio",columns:[{label:"外采",value:'0'},{label:"培育",value:'1'}]},
supplier:{label:"供应商名称"},
date:{label:"种植日期",type:"calendar"},
num:{label:"采购数量",type:"number",suffix:"株"}
},
formData:{},
rules:{}
}
}
}
</script>