Browse Source

完成农资入库页面

master
邓宏 2 years ago
parent
commit
710c68154d
  1. 87
      pages/stock/agrWarehouse.vue
  2. 2
      pages/stock/record.vue

87
pages/stock/agrWarehouse.vue

@ -3,21 +3,83 @@
min-height:100%;
background:#f6f6f6;
padding:30rpx 0;
&.agr{
padding:30rpx;
background:#fff;
}
&>.agrInfo{
margin-top:0;
.data{
display:flex;
align-items: center;
margin-bottom:16rpx;
text{
&:first-child{
flex-shrink: 0;
color:#fff;
background:#10C176;
border-radius: 6rpx;
min-width:80rpx;
height:40rpx;
line-height: 40rpx;
text-align: center;
font-size:20rpx;
margin-right:16rpx;
}
&:nth-child(3){
background:#10C176;
border-radius: 50%;
width:36rpx;
height:36rpx;
text-align: center;
line-height: 36rpx;
color:#fff;
margin-left:auto;
}
}
}
}
.u-form{
&.card{
margin:30rpx 30rpx 0;
}
&>.addAgr{
color:#10C176;
background:rgba(16, 193, 119, 0.1);
border-radius: 24rpx;
height:100rpx;
display:flex;
align-items: center;
justify-content: space-between;
padding:30rpx;
margin-bottom:28rpx;
}
}
}
</style>
<template>
<view class="container">
<view class="container" :class="{agr:!isAgr}">
<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]"/>
<view class="agrInfo card" v-if="isAgr">
<view class="data"> <text>化肥</text><text class="over">中量元素水溶肥</text><text class="plant-jiantou_zuoyouqiehuan"/> </view>
<view style="color:#707070;font-size:20rpx;">云南云天化股份有限公司</view>
</view>
<u-form class="inline" :class="{card:isAgr}" errorType="toast" :model="formData" ref="form" :rules="rules" labelWidth="auto">
<view class="addAgr">添加农资<text class="plant-batch-add"/></view>
<template v-for="(v,k) in fields">
<d-form
v-if="!v.agr ||v.agr&&isAgr"
:key="k"
v-bind="v"
:field="k"
:required="!!rules[k]"
:value="formData[k]"/>
</template>
</u-form>
</view>
</template>
@ -26,10 +88,12 @@
data(){
return{
fields:{
scpect:{label:"规格", type:"select", columns:[[]],value:[],agr:true},
num:{label:"入库数量", type:"number",suffix:"袋", tip:"共计:40kg",agr:true},
type:{label:"入库类型"},
date:{label:"入库时间"},
imgs:{label:"单据、凭证图片",type:"upImg",columns:[[]],value:''},
remarks:{label:"备注"},
imgs:{label:"单据、凭证图片",type:"upImg",value:''},
remarks:{label:"备注",type:"textarea"},
},
formData:{
type:"",
@ -41,7 +105,8 @@
type:{required:true},
date:{required:true},
imgs:{required:true},
}
},
isAgr: false,
}
},
onLoad(){},

2
pages/stock/record.vue

@ -84,7 +84,7 @@ export default {
data(){
return{
searchVal:{
baseId: "1611250480973049857",//this.$store.state.plantBaseInfoId,
baseId: this.$store.state.plantBaseInfoId,
pageNo:1,
pageSize:6,
},

Loading…
Cancel
Save