Browse Source

联调

master
邓宏 2 years ago
parent
commit
f5ac32d04c
  1. 17
      pages/massif/agrSpecs.vue
  2. 51
      pages/purchase/specs.vue
  3. 51
      uni_modules/d-picker/components/d-picker/d-picker.vue

17
pages/massif/agrSpecs.vue

@ -168,23 +168,9 @@
</u-form>
</view>
<!-- <u-popup :show="show" @close="show=false">
<view class="btns">
<button class="cu-btn sm" @click="show=false">取消</button>
<button class="cu-btn sm bg-green">确定</button>
</view>
<picker-view :value="[3]" indicator-style="height:90rpx;">
<picker-view-column>
<view v-for="i in 10" :key="i" class="item" style="height:90rpx;">
<view class="name"><text>化肥</text><text>中量元素水溶肥</text><text>()</text></view>
<view class="company" data-name="微量元素肥" data-company="云南云天化股份有限公司"/>
</view>
</picker-view-column>
</picker-view>
</u-popup> -->
<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>()</text></view>
<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>
@ -205,7 +191,6 @@ export default {
},
agrList:[],
show:false,
}
},
onLoad(){

51
pages/purchase/specs.vue

@ -110,6 +110,50 @@
}
}
}
.purcahse-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>
@ -156,7 +200,12 @@
@cancel="show=false"
@confirm="searchStock($event.value[0].id);formData.goodsSpecification=$event.value[0].value;show=false"/>
<d-picker :list="goodsList" ref="dPicker" :value="pickerValue" @select="setGoodsVal"/>
<d-picker :list="goodsList" ref="dPicker" :value="pickerValue" @select="setGoodsVal">
<view slot-scope="{row}" class="purcahse-picker">
<view class="name"><text>{{row.detailedParentName}}</text> <text>{{row.goodsName}}</text></view>
<view class="company" :data-name="row.detailedType" :data-company="row.supplier"/>
</view>
</d-picker>
</view>
</template>
<script>

51
uni_modules/d-picker/components/d-picker/d-picker.vue

@ -9,51 +9,6 @@
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;
}
}
}
}
}
}
}
@ -66,11 +21,7 @@
</view>
<picker-view :value="[value]" indicator-style="height:90rpx;" @change="changeVal=$event.detail.value[0]">
<picker-view-column>
<slot v-for="(v,k) in list" :row="v"/>
<!-- <view v-for="(v,k) in list" :key="k" class="item" style="height:90rpx;">
<view class="name"><text>{{v.detailedParentName}}</text> <text>{{v.goodsName}}</text></view>
<view class="company" :data-name="v.detailedType" :data-company="v.supplier"/>
</view> -->
<slot v-for="(v) in list" :row="v"/>
</picker-view-column>
</picker-view>
</u-popup>

Loading…
Cancel
Save