邓宏
2 years ago
7 changed files with 274 additions and 18 deletions
@ -0,0 +1,89 @@ |
|||||
|
<style lang="scss"> |
||||
|
.container{ |
||||
|
min-height:100%; |
||||
|
background:#f6f6f6; |
||||
|
|
||||
|
.info{ |
||||
|
.name{ |
||||
|
display:flex; |
||||
|
align-items: center; |
||||
|
text{ |
||||
|
&:first-child{ |
||||
|
color:#fff; |
||||
|
background:#10C176; |
||||
|
border-radius: 0 20rpx 0 20rpx; |
||||
|
padding:0 6rpx; |
||||
|
font-size:20rpx; |
||||
|
height:40rpx; |
||||
|
line-height: 40rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.tip{ |
||||
|
display:flex; |
||||
|
align-items: center; |
||||
|
margin-top:6rpx; |
||||
|
text{ |
||||
|
&:first-child{ |
||||
|
color:#FBA83C; |
||||
|
font-size:24rpx; |
||||
|
margin-right:auto; |
||||
|
} |
||||
|
&:nth-child(2){ |
||||
|
color:#999; |
||||
|
font-size:20rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
|
<template> |
||||
|
<view class="container"> |
||||
|
<view class="card info"> |
||||
|
<view class="name"> |
||||
|
<text>蔬菜</text> <text>精品小黄瓜</text> |
||||
|
</view> |
||||
|
<view class="tip"> |
||||
|
<text>提示:当前可交易数量150kg</text> <text>采收日期:2022-12-26</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="card"> |
||||
|
<u-form class="inline" errorType="toast" :model="formData" ref="form" :rules="rules" labelWidth="auto"> |
||||
|
<d-form label="交易重量" type="digit" suffix="kg"/> |
||||
|
<d-form label="规格" type="digit" suffix="kg"/> |
||||
|
<view style="display:flex;align-items: center;"> |
||||
|
<d-form label="交易数量" type="digit" suffix="袋"/> |
||||
|
<text style="margin:45rpx 20rpx 0 20rpx;">/</text> |
||||
|
<d-form style="width:max-content;margin-top:40rpx;" type="select" placeholder=" " :columns="[]" :value="[]"/> |
||||
|
</view> |
||||
|
<d-form label="买方名称"/> |
||||
|
<d-form label="买方类型" type="select" :columns="[]" :value="[]"/> |
||||
|
<d-form label="收货地址" type="textarea"/> |
||||
|
</u-form> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
data(){ |
||||
|
return{ |
||||
|
fields:{ |
||||
|
weidth:{label:"交易重量",type:"digit",suffix:"kg"}, |
||||
|
spcs:{label:"规格",type:"digit",suffix:"kg"}, |
||||
|
num:{label:"交易数量",type:"digit",suffix:"袋", selectField:"sdf", columns:[]}, |
||||
|
name:{label:"买方名称"}, |
||||
|
type:{label:"买方类型",type:'select',columns:[],value:[]}, |
||||
|
adder:{label:"收货地址",type:"textarea"} |
||||
|
}, |
||||
|
formData:{ |
||||
|
|
||||
|
}, |
||||
|
rules:{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,144 @@ |
|||||
|
<style lang="scss"> |
||||
|
.transaction{ |
||||
|
height:100%; |
||||
|
display:flex; |
||||
|
flex-direction: column; |
||||
|
&>.dateRange{ |
||||
|
flex-shrink: 0; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin:30rpx; |
||||
|
text{ |
||||
|
&.plant-youbian{ |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
flex-direction: row-reverse; |
||||
|
justify-content: space-between; |
||||
|
background:#fff; |
||||
|
height:48rpx; |
||||
|
font-size:24rpx; |
||||
|
color:#333; |
||||
|
border-radius: 8rpx; |
||||
|
padding:0 10rpx; |
||||
|
min-width:226rpx; |
||||
|
box-sizing: border-box; |
||||
|
&:before{ |
||||
|
transform: rotate(90deg); |
||||
|
} |
||||
|
&.noDate{ |
||||
|
color:#999; |
||||
|
} |
||||
|
} |
||||
|
&:nth-child(2){ |
||||
|
color:#999; |
||||
|
padding:0 28rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
scroll-view{ |
||||
|
flex-grow: 1; |
||||
|
height:1rpx; |
||||
|
|
||||
|
.card{ |
||||
|
margin-top:0; |
||||
|
display: flex; |
||||
|
.u-transition{ |
||||
|
margin-right:20rpx; |
||||
|
} |
||||
|
.title{ |
||||
|
font-weight: bold; |
||||
|
margin-bottom:6rpx; |
||||
|
} |
||||
|
.spec,.total{ |
||||
|
font-size:24rpx; |
||||
|
color:#999; |
||||
|
margin-top:10rpx; |
||||
|
display:flex; |
||||
|
align-items: center; |
||||
|
text:first-child{ |
||||
|
min-width:180rpx; |
||||
|
} |
||||
|
} |
||||
|
.total{ |
||||
|
text:first-child{ |
||||
|
color:#10C176; |
||||
|
font-weight: bold; |
||||
|
&:after{ |
||||
|
content:"("attr(data-unit)")"; |
||||
|
font-weight: normal; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
|
<template> |
||||
|
<view class="transaction"> |
||||
|
<view class="dateRange"> |
||||
|
<text class="plant-youbian" :class="{noDate:!searchVal.startTime}" @click="dateType='startTime';show=true">{{searchVal.startTime||"请选择开始日期"}}</text> |
||||
|
<text>~</text> |
||||
|
<text class="plant-youbian" :class="{noDate:!searchVal.endTime}" @click="dateType='endTime';show=true">{{searchVal.endTime||"请选择结束日期"}}</text> |
||||
|
</view> |
||||
|
|
||||
|
<scroll-view> |
||||
|
<view class="card" @click="$u.route({url:'/pages/massif/add_transaction'})"> |
||||
|
<u-image radius="20rpx" width="130rpx" height="118rpx" mode="aspectFill" :src="`${host}/${1}`"> |
||||
|
<text slot="error" style="font-size:45rpx;" class="plant-xiaopangchetupianjiazaishibai"/> |
||||
|
</u-image> |
||||
|
<view class="info"> |
||||
|
<view class="title">精品小黄瓜</view> |
||||
|
<view class="spec"> |
||||
|
<text>规格:20kg/箱</text> |
||||
|
<text>云南云天化股份有限公司</text> |
||||
|
</view> |
||||
|
<view class="total"> |
||||
|
<text data-unit="400kg">20箱</text> |
||||
|
<text>交易日期:2022-12-12</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-view> |
||||
|
|
||||
|
<u-datetime-picker |
||||
|
:show="show" |
||||
|
mode="date" |
||||
|
closeOnClickOverlay |
||||
|
@close="show=false" |
||||
|
@cancel="show=false" |
||||
|
:minDate="dateType=='endTime'&&searchVal.startTime?new Date(searchVal.startTime).getTime():new Date().set('y',-15).getTime()" |
||||
|
:maxDate="dateType=='startTime'&&searchVal.endTime?new Date(searchVal.endTime).getTime():new Date().set('y',15).getTime()" |
||||
|
:value="searchVal[dateType] || new Date().format('yyyy-MM-dd')" |
||||
|
@confirm="searchVal[dateType]=new Date($event.value).format('yyyy-MM-dd');clean();search();show=false"/> |
||||
|
</view> |
||||
|
</template> |
||||
|
<script> |
||||
|
import request,{host} from '@/common/request' |
||||
|
export default { |
||||
|
data(){ |
||||
|
return{ |
||||
|
show:false, |
||||
|
host:host('imgUrl'), |
||||
|
searchVal:{ |
||||
|
startTime:"", |
||||
|
endTime:"", |
||||
|
}, |
||||
|
dateType:"startTime", |
||||
|
} |
||||
|
}, |
||||
|
created(){}, |
||||
|
methods:{ |
||||
|
clean(){ |
||||
|
this.list=[] |
||||
|
this.total=0 |
||||
|
this.searchVal.pageNo=1 |
||||
|
}, |
||||
|
async search(){ |
||||
|
if(this.total==0||this.list.length<this.total){ |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue