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.
222 lines
4.5 KiB
222 lines
4.5 KiB
<style lang="scss">
|
|
.container{
|
|
background:#f6f6f6;
|
|
min-height: 100%;
|
|
padding:30rpx 0;
|
|
|
|
.card{
|
|
margin-top:0;
|
|
&.info{
|
|
.name{
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 14rpx;
|
|
text{
|
|
&:first-child{
|
|
flex-shrink: 0;
|
|
color:#fff;
|
|
background:#10C176;
|
|
font-size:20rpx;
|
|
height:40rpx;
|
|
width:80rpx;
|
|
border-radius: 4rpx;
|
|
text-align: center;
|
|
line-height: 40rpx;
|
|
margin-right:16rpx;
|
|
}
|
|
&:nth-child(2){
|
|
flex-grow: 1;
|
|
}
|
|
&:nth-child(3){
|
|
flex-shrink: 0;
|
|
color:#fff;
|
|
background:#10C176;
|
|
border-radius: 50%;
|
|
width:34rpx;
|
|
height:34rpx;
|
|
text-align: center;
|
|
line-height: 34rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.u-popup{
|
|
.u-popup__content{
|
|
&>.btns{
|
|
display:flex;
|
|
justify-content: space-between;
|
|
padding:10rpx;
|
|
}
|
|
|
|
picker-view{
|
|
height:500rpx;
|
|
picker-view-column{
|
|
view.item{
|
|
padding:0 30rpx;
|
|
display:flex;
|
|
flex-direction: column;
|
|
justify-content: space-evenly;
|
|
.name{
|
|
display:flex;
|
|
align-items: center;
|
|
text{
|
|
font-size:16rpx;
|
|
&:first-child{
|
|
color:#fff;
|
|
background:#10C176;
|
|
border-radius:0 20rpx 0 20rpx;
|
|
width:80rpx;
|
|
height:34rpx;
|
|
text-align: center;
|
|
line-height: 34rpx;
|
|
margin-right:16rpx;
|
|
}
|
|
&:nth-child(2){
|
|
font-weight: bold;
|
|
font-size:20rpx;
|
|
}
|
|
&:nth-child(3){
|
|
color:#999;
|
|
margin-left:6rpx;
|
|
}
|
|
}
|
|
}
|
|
.company{
|
|
font-size:16rpx;
|
|
&:before{
|
|
content:attr(data-name);
|
|
color:#FBA83C;
|
|
margin-right:20rpx;
|
|
}
|
|
&:after{
|
|
content:attr(data-company);
|
|
color:#999999;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.agr-picker{
|
|
padding:0 30rpx;
|
|
display:flex;
|
|
flex-direction: column;
|
|
justify-content: space-evenly;
|
|
.name{
|
|
display:flex;
|
|
align-items: center;
|
|
text{
|
|
font-size:16rpx;
|
|
&:first-child{
|
|
color:#fff;
|
|
background:#10C176;
|
|
border-radius:0 20rpx 0 20rpx;
|
|
width:80rpx;
|
|
height:34rpx;
|
|
text-align: center;
|
|
line-height: 34rpx;
|
|
margin-right:16rpx;
|
|
}
|
|
&:nth-child(2){
|
|
font-weight: bold;
|
|
font-size:20rpx;
|
|
}
|
|
&:nth-child(3){
|
|
color:#999;
|
|
margin-left:6rpx;
|
|
}
|
|
}
|
|
}
|
|
.company{
|
|
font-size:16rpx;
|
|
&:before{
|
|
content:attr(data-name);
|
|
color:#FBA83C;
|
|
margin-right:20rpx;
|
|
}
|
|
&:after{
|
|
content:attr(data-company);
|
|
color:#999999;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
<template>
|
|
<view class="container">
|
|
<d-navbar style="--bg:#10C176;--c:#fff;" isBack text="农资规格">
|
|
<button slot="right" class="cu-btn round">确定</button>
|
|
</d-navbar>
|
|
|
|
<view class="card info">
|
|
<view class="name">
|
|
<text>化肥</text> <text>中量元素水溶肥</text> <text @click="$refs.dPicker.show=true" class="plant-jiantou_zuoyouqiehuan"/>
|
|
</view>
|
|
<view style="color:#707070;font-size:20rpx;">云南云天化股份有限公司</view>
|
|
</view>
|
|
<view class="card">
|
|
<u-form class="inline" labelWidth="auto" :model="formData" :rules="rules">
|
|
<d-form
|
|
v-for="(v,k) in fields"
|
|
:key="k"
|
|
v-bind="v"
|
|
:field="k"
|
|
:required="!!rules[k]"/>
|
|
</u-form>
|
|
</view>
|
|
|
|
<d-picker :list="agrList" ref="dPicker">
|
|
<view slot-scope="{row}" class="agr-picker">
|
|
<view class="name"><text>{{row.agriculturalGoods}}</text><text>{{row.substanceName}}</text><text>({{row.specDescribe}})</text></view>
|
|
<view class="company" :data-name="row.detailType" :data-company="row.supplierName"/>
|
|
</view>
|
|
</d-picker>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import request from '@/common/request.js'
|
|
export default {
|
|
data(){
|
|
return{
|
|
fields:{
|
|
specs:{label:"规格",tip:"库存:2袋(200kg)",type:"select"},
|
|
num:{label:"投入数量",suffix:"kg"},
|
|
},
|
|
formData:{},
|
|
rules:{
|
|
|
|
},
|
|
|
|
agrList:[],
|
|
}
|
|
},
|
|
onLoad(){
|
|
this.searchAgr()
|
|
},
|
|
methods:{
|
|
async searchAgr(){
|
|
var res=await request("/api/OutInManageApi/queryCollectingList",{
|
|
method:"post",
|
|
body:{
|
|
baseId: "1611250480973049857"||this.$store.state.plantBaseInfoId,
|
|
search:"",
|
|
pageNo:1,
|
|
pageSize:100,
|
|
}
|
|
})
|
|
if(res.statu){
|
|
this.agrList=res.data.list
|
|
}else{
|
|
uni.showModal({
|
|
title:"提示",
|
|
content:res.msg||"获取已领用农资列表失败!",
|
|
showCancel:false,
|
|
})
|
|
}
|
|
},
|
|
}
|
|
}
|
|
</script>
|