|
@ -4,6 +4,32 @@ |
|
|
background:#f6f6f6; |
|
|
background:#f6f6f6; |
|
|
padding:30rpx 0; |
|
|
padding:30rpx 0; |
|
|
|
|
|
|
|
|
|
|
|
&>.type{ |
|
|
|
|
|
margin:0 30rpx 30rpx; |
|
|
|
|
|
.title{ |
|
|
|
|
|
color:#333; |
|
|
|
|
|
margin-bottom:22rpx; |
|
|
|
|
|
&:before{ |
|
|
|
|
|
content:"*"; |
|
|
|
|
|
color:#EE4949; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.content{ |
|
|
|
|
|
display:flex; |
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
margin:0 -30rpx -20rpx 0; |
|
|
|
|
|
text{ |
|
|
|
|
|
background:#EEEEEE; |
|
|
|
|
|
color:#999; |
|
|
|
|
|
height:54rpx; |
|
|
|
|
|
line-height: 54rpx; |
|
|
|
|
|
border-radius: 50rpx; |
|
|
|
|
|
margin:0 30rpx 20rpx 0; |
|
|
|
|
|
width:calc(100%/4 - 30rpx); |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
.card{ |
|
|
.card{ |
|
|
margin-top:0; |
|
|
margin-top:0; |
|
|
.plant-dikuaimianji{ |
|
|
.plant-dikuaimianji{ |
|
@ -68,30 +94,22 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.item{ |
|
|
|
|
|
display:flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
height:80rpx; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
border-bottom:2rpx solid rgba(216, 216, 216, 0.4); |
|
|
|
|
|
text{ |
|
|
|
|
|
color:#777; |
|
|
|
|
|
&.plant-youbian{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
flex-direction: row-reverse; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
<template> |
|
|
<template> |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
<d-navbar style="--bg:#10C176;--c:#fff;" isBack text="添加农事"> |
|
|
<d-navbar style="--bg:#10C176;--c:#fff;" isBack text="添加农事"> |
|
|
<button slot="right" class="cu-btn round">提交</button> |
|
|
<button slot="right" class="cu-btn round" @click="submit">提交</button> |
|
|
</d-navbar> |
|
|
</d-navbar> |
|
|
|
|
|
|
|
|
|
|
|
<view class="type"> |
|
|
|
|
|
<view class="title">农事类型</view> |
|
|
|
|
|
<view class="content"> |
|
|
|
|
|
<text v-for="k in 8" :key="k">自定义+</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="card"> |
|
|
<view class="card"> |
|
|
<view class="plant-dikuaimianji">{{massif.plotName}}</view> |
|
|
<view class="plant-dikuaimianji">{{massif.plotName}}</view> |
|
|
<view class="plant-batch-add" @click="toCollectList"/> |
|
|
<view class="plant-batch-add" @click="toCollectList"/> |
|
@ -106,8 +124,6 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="card"> |
|
|
<view class="card"> |
|
|
<view class="item"> <text>操作人</text><text>张召忠</text> </view> |
|
|
|
|
|
<view class="item"> <text>操作日期</text><text class="plant-youbian">2022-12-23</text> </view> |
|
|
|
|
|
<u-form class="inline" :model="formData" :rules="rules" ref="form" labelWidth="auto"> |
|
|
<u-form class="inline" :model="formData" :rules="rules" ref="form" labelWidth="auto"> |
|
|
<d-form |
|
|
<d-form |
|
|
v-for="(v,k) in fields" |
|
|
v-for="(v,k) in fields" |
|
@ -132,7 +148,23 @@ export default { |
|
|
intro:{label:"产品介绍",type:"textarea"}, |
|
|
intro:{label:"产品介绍",type:"textarea"}, |
|
|
}, |
|
|
}, |
|
|
formData:{ |
|
|
formData:{ |
|
|
name:"", |
|
|
companyId: "", |
|
|
|
|
|
farmingId: "", |
|
|
|
|
|
farmingMaterial: "", |
|
|
|
|
|
farmingPlanId: "", |
|
|
|
|
|
farmingRemarks: "", |
|
|
|
|
|
farmingTime: "", |
|
|
|
|
|
farmingType: "", |
|
|
|
|
|
inputName: "", |
|
|
|
|
|
inputQuantity: 0, |
|
|
|
|
|
inputTotal: 0, |
|
|
|
|
|
inputType: "", |
|
|
|
|
|
inventoryId: "", |
|
|
|
|
|
plotId: this.$store.state.plantBaseInfoId, |
|
|
|
|
|
principal: "", |
|
|
|
|
|
principalId: "", |
|
|
|
|
|
specificationDes: "", |
|
|
|
|
|
specificationId: "" |
|
|
}, |
|
|
}, |
|
|
rules:{ |
|
|
rules:{ |
|
|
intro:{required:true}, |
|
|
intro:{required:true}, |
|
@ -164,6 +196,19 @@ export default { |
|
|
event:{ add:()=>{} } |
|
|
event:{ add:()=>{} } |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
submit(){ |
|
|
|
|
|
this.$refs.form.validoter().then(async valid=>{ |
|
|
|
|
|
if(valid){ |
|
|
|
|
|
var res=await request("/api/plantFarming/addOrUpdate",{ |
|
|
|
|
|
method:"post", |
|
|
|
|
|
body:{ |
|
|
|
|
|
...this.formData, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |