邓宏
2 years ago
8 changed files with 216 additions and 36 deletions
@ -0,0 +1,52 @@ |
|||
<style lang="scss"> |
|||
.container{ |
|||
min-height:100%; |
|||
background:#f6f6f6; |
|||
padding:30rpx 0; |
|||
} |
|||
</style> |
|||
<template> |
|||
<view class="container"> |
|||
<d-navbar text="农资入库" isBack style="--bg:#10C176;--c:#fff;"> |
|||
<button slot="right" class="cu-btn round" @click="submit">提交</button> |
|||
</d-navbar> |
|||
|
|||
<u-form class="card inline" errorType="toast" :model="formData" ref="form" :rules="rules" labelWidth="auto"> |
|||
<d-form |
|||
v-for="(v,k) in fields" :key="k" |
|||
v-bind="v" |
|||
:field="k" |
|||
:required="rules[k]" |
|||
:value="formData[k]"/> |
|||
</u-form> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default{ |
|||
data(){ |
|||
return{ |
|||
fields:{ |
|||
type:{label:"入库类型"}, |
|||
date:{label:"入库时间"}, |
|||
imgs:{label:"单据、凭证图片",type:"upImg",columns:[[]],value:''}, |
|||
remarks:{label:"备注"}, |
|||
}, |
|||
formData:{ |
|||
type:"", |
|||
date:"", |
|||
imgs:[], |
|||
remarks:"", |
|||
}, |
|||
rules:{ |
|||
type:{required:true}, |
|||
date:{required:true}, |
|||
imgs:{required:true}, |
|||
} |
|||
} |
|||
}, |
|||
onLoad(){}, |
|||
methods:{ |
|||
submit(){}, |
|||
}, |
|||
} |
|||
</script> |
Loading…
Reference in new issue