邓宏
2 years ago
22 changed files with 394 additions and 919 deletions
@ -1,39 +0,0 @@ |
|||
<style lang="less"> |
|||
.container{ |
|||
min-height:100%; |
|||
background:#f6f6f6; |
|||
padding:30rpx 0; |
|||
|
|||
} |
|||
</style> |
|||
<template> |
|||
<view class="container"> |
|||
<u-form class="card inline" labelWidth="auto" errorType="toast" :model="formData" :rules="rules"> |
|||
<d-form |
|||
v-for="(v,k) in fields" :key="k" |
|||
:field="k" |
|||
v-bind="v" |
|||
:required="!!rules[k]"/> |
|||
</u-form> |
|||
<button class="cu-btn round bg-green shadow submit" @click="submit">确定提交</button> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return{ |
|||
fields:{ |
|||
name:{label:"名称"}, |
|||
type:{label:"类型"}, |
|||
batch:{label:"种苗批次号",btnText:"生成"}, |
|||
source:{label:"来源",type:"radio",columns:[{label:"外采",value:'0'},{label:"培育",value:'1'}]}, |
|||
supplier:{label:"供应商名称"}, |
|||
date:{label:"种植日期",type:"calendar"}, |
|||
num:{label:"采购数量",type:"number",suffix:"株"} |
|||
}, |
|||
formData:{}, |
|||
rules:{} |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -1,177 +0,0 @@ |
|||
<style lang="less"> |
|||
.container{ |
|||
height:100%; |
|||
background:#f6f6f6; |
|||
padding-top:30rpx; |
|||
scroll-view{ |
|||
height:100%; |
|||
.card{ |
|||
margin-top:0; |
|||
&>.content{ |
|||
display:flex; |
|||
border-bottom:2rpx solid rgba(216, 216, 216, 0.2); |
|||
padding-bottom:12rpx; |
|||
margin-bottom:20rpx; |
|||
.u-transition{ |
|||
position:relative; |
|||
margin-right:22rpx; |
|||
&:before{ |
|||
content:attr(data-attr); |
|||
position:absolute; |
|||
z-index: 10; |
|||
padding:6rpx 10rpx; |
|||
top:0; |
|||
left:0; |
|||
border-radius: 30rpx; |
|||
background:rgba(0,0,0,0.4); |
|||
color:#fff; |
|||
font-size:20rpx; |
|||
} |
|||
} |
|||
.info{ |
|||
flex-grow: 1; |
|||
width:1rpx; |
|||
font-size:24rpx; |
|||
.title{ |
|||
display:flex; |
|||
align-items: center; |
|||
margin-bottom:6rpx; |
|||
.name{ |
|||
font-weight: bold; |
|||
margin-right:12rpx; |
|||
font-size:28rpx; |
|||
} |
|||
.tab{ |
|||
background:#10C176; |
|||
height:36rpx; |
|||
line-height: 36rpx; |
|||
color:#fff; |
|||
font-size:20rpx; |
|||
border-radius: 40rpx; |
|||
padding:0 8rpx; |
|||
min-width:62rpx; |
|||
text-align: center; |
|||
} |
|||
} |
|||
.num{ |
|||
color:#10C176; |
|||
font-size:32rpx; |
|||
font-weight: bold; |
|||
margin-top:6rpx; |
|||
} |
|||
.residue{ |
|||
color:#FCA606; |
|||
font-size:24rpx; |
|||
margin-top:6rpx; |
|||
} |
|||
.zhu:after{content:"株";} |
|||
.company{ |
|||
color:#999; |
|||
} |
|||
} |
|||
} |
|||
&>.foot{ |
|||
display:flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
color:#999; |
|||
font-size:24rpx; |
|||
button{ |
|||
height:max-content; |
|||
background:transparent; |
|||
color:#10C176; |
|||
padding:0; |
|||
font-size:24rpx; |
|||
&:before{ |
|||
font-size:30rpx; |
|||
margin-right:6rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.u-popup{ |
|||
input{ |
|||
width:100%; |
|||
background:rgba(0,0,0,0.1); |
|||
height:60rpx; |
|||
border-radius: 8rpx; |
|||
padding:0 20rpx; |
|||
&:focus{ |
|||
border:2rpx solid #10C176; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
<template> |
|||
<view class="container"> |
|||
<d-navbar style="--bg:#10C176;--c:#fff;" isBack text="种苗管理"> |
|||
<text v-if="intoPage=='addFarming'" class="plant-caigou" slot="right" @click=""/> |
|||
</d-navbar> |
|||
|
|||
<scroll-view scroll-y @scrolltolower=""> |
|||
<view class="card"> |
|||
<view class="content"> |
|||
<u-image width="170rpx" data-attr="药材" height="140rpx" radius="12rpx" src="https://ts1.cn.mm.bing.net/th/id/R-C.d501f93a5f934a60940b47a1c241101d?rik=KBXjWV%2fVGKQ86Q&riu=http%3a%2f%2fwww.maisanqi.com%2fuploadfile%2f2015%2f1112%2f20151112023237448.png&ehk=qOz5xilHBTtcCB4Yd%2bVpFBY%2fB1sw0kDUIpGg%2fzkF1sM%3d&risl=&pid=ImgRaw&r=0"> |
|||
<text slot="error" class="plant-xiaopangchetupianjiazaishibai"/> |
|||
</u-image> |
|||
<view class="info"> |
|||
<view class="title"> |
|||
<text class="name over">三七</text> |
|||
<text class="tab">外采</text> |
|||
</view> |
|||
<view class="batch">种苗批次号:A00001</view> |
|||
<template v-if="intoPage=='addFarming'"> |
|||
<view style="display:flex;align-items:center;"> |
|||
<view class="num zhu" style="margin-right:20rpx;">145</view> |
|||
<view class="residue zhu">剩余:123</view> |
|||
</view> |
|||
<view class="company">云南xxxx农业有限公司</view> |
|||
</template> |
|||
<template v-else> |
|||
<view class="num zhu">145</view> |
|||
<view class="residue zhu">剩余:123</view> |
|||
</template> |
|||
</view> |
|||
</view> |
|||
<view class="foot"> |
|||
<text class="date">采购日期:2023-09-09</text> |
|||
<template v-if="intoPage=='addFarming'"> |
|||
<button class="cu-btn plant-fuzhi" @click="select={...v}">选择</button> |
|||
</template> |
|||
<text class="company" v-else>云南xxxx农业有限公司</text> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<u-modal |
|||
:show="!!select" |
|||
closeOnClickOverlay |
|||
style="flex:0;" |
|||
title="提示" |
|||
@close="select=null" |
|||
@confirm="addSeedWeight"> |
|||
<input placeholder="请输入重量" v-model="weight" type="digit"/> |
|||
</u-modal> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return{ |
|||
intoPage:"", |
|||
select:null, |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.intoPage=options.into |
|||
}, |
|||
methods:{ |
|||
addSeedWeight(){ |
|||
|
|||
}, |
|||
} |
|||
} |
|||
</script> |
@ -1,24 +0,0 @@ |
|||
module.exports=[ |
|||
{ |
|||
path:"pages/seeding/info", |
|||
style:{ |
|||
navigationBarTitleText:"种苗信息", |
|||
navigationBarBackgroundColor:"#10C176", |
|||
navigationBarTextStyle:"white", |
|||
"app-plus":{ |
|||
titleNView:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
path:"pages/seeding/mana", |
|||
style:{ |
|||
navigationBarTitleText:"种苗管理", |
|||
// navigationBarBackgroundColor:"#10C176",
|
|||
// navigationBarTextStyle:"white",
|
|||
"app-plus":{ |
|||
titleNView:false |
|||
} |
|||
} |
|||
}, |
|||
] |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 47 KiB |
@ -1,109 +0,0 @@ |
|||
<style lang="less"> |
|||
.d-dateRange{ |
|||
flex-shrink: 0; |
|||
display:flex; |
|||
align-items: center; |
|||
margin:20rpx 30rpx; |
|||
&>text{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
background:#fff; |
|||
font-size:24rpx; |
|||
color:#333; |
|||
height:48rpx; |
|||
position: relative; |
|||
padding:0 30rpx 0 10rpx; |
|||
min-width:220rpx; |
|||
box-sizing: border-box; |
|||
border-radius: 8rpx; |
|||
&:first-child{margin-right:28rpx;} |
|||
&:nth-child(2){margin-left:28rpx;} |
|||
&.noDate{ |
|||
color:#999; |
|||
} |
|||
.plant-youbian,.plant-zengjia{ |
|||
font-size:24rpx; |
|||
height:48rpx; |
|||
width:40rpx; |
|||
text-align: center; |
|||
line-height: 48rpx; |
|||
position:absolute; |
|||
top:0; |
|||
right:0; |
|||
&:before{ |
|||
display: inline-block; |
|||
transform: rotate(90deg); |
|||
} |
|||
} |
|||
.plant-zengjia{ |
|||
z-index: 100; |
|||
&:before{ |
|||
transform: rotate(45deg); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
<template> |
|||
<view class="d-dateRange"> |
|||
<text :class="{noDate:!startTime}" @click="type='start';show=true"> |
|||
{{startTime||"请选择开始日期"}} |
|||
<text v-if="startTime" class="plant-zengjia" @click.stop="startTime=''"/> |
|||
<text v-else class="plant-youbian"/> |
|||
</text> |
|||
~ |
|||
<text :class="{noDate:!endTime}" @click="type='end';show=true"> |
|||
{{endTime||"请选择结束日期"}} |
|||
<text class="plant-youbian"/> |
|||
<text v-if="endTime" class="plant-zengjia" @click.stop="endTime=''"/> |
|||
<text v-else class="plant-youbian"/> |
|||
</text> |
|||
|
|||
<u-datetime-picker |
|||
:show="show" |
|||
mode="date" |
|||
style="flex:0;" |
|||
closeOnClickOverlay |
|||
@close="show=false" |
|||
@cancel="show=false" |
|||
:minDate="type=='end'&&startTime?new Date(startTime).getTime():new Date().set('y',-15).getTime()" |
|||
:maxDate="type=='start'&&endTime?new Date(endTime).getTime():new Date().set('y',15).getTime()" |
|||
:value=" type=='start'&&startTime|| type=='end'&&endTime || new Date().format('yyyy-MM-dd')" |
|||
@confirm="confirm"/> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default{ |
|||
data(){ |
|||
return{ |
|||
startTime:"", |
|||
endTime:"", |
|||
type:"start", |
|||
show:false, |
|||
} |
|||
}, |
|||
computed:{ |
|||
date(){ |
|||
return[this.startTime,this.endTime] |
|||
} |
|||
}, |
|||
watch:{ |
|||
date(n){ |
|||
if(n[0]&&n[1]||!n[0]&&!n[1]){ |
|||
this.$emit("date",n) |
|||
} |
|||
} |
|||
}, |
|||
methods:{ |
|||
confirm(e){ |
|||
if(this.type=='start'){ |
|||
this.startTime=new Date(e.value).format('yyyy-MM-dd') |
|||
}else{ |
|||
this.endTime=new Date(e.value).format('yyyy-MM-dd') |
|||
} |
|||
this.show=false |
|||
}, |
|||
} |
|||
} |
|||
</script> |
@ -1,81 +0,0 @@ |
|||
{ |
|||
"id": "d-dateRange", |
|||
"displayName": "d-dateRange", |
|||
"version": "1.0.0", |
|||
"description": "d-dateRange", |
|||
"keywords": [ |
|||
"d-dateRange" |
|||
], |
|||
"repository": "", |
|||
"engines": { |
|||
"HBuilderX": "^3.1.0" |
|||
}, |
|||
"dcloudext": { |
|||
"type": "component-vue", |
|||
"sale": { |
|||
"regular": { |
|||
"price": "0.00" |
|||
}, |
|||
"sourcecode": { |
|||
"price": "0.00" |
|||
} |
|||
}, |
|||
"contact": { |
|||
"qq": "" |
|||
}, |
|||
"declaration": { |
|||
"ads": "", |
|||
"data": "", |
|||
"permissions": "" |
|||
}, |
|||
"npmurl": "" |
|||
}, |
|||
"uni_modules": { |
|||
"dependencies": [], |
|||
"encrypt": [], |
|||
"platforms": { |
|||
"cloud": { |
|||
"tcb": "u", |
|||
"aliyun": "u" |
|||
}, |
|||
"client": { |
|||
"Vue": { |
|||
"vue2": "u", |
|||
"vue3": "u" |
|||
}, |
|||
"App": { |
|||
"app-vue": "u", |
|||
"app-nvue": "u" |
|||
}, |
|||
"H5-mobile": { |
|||
"Safari": "u", |
|||
"Android Browser": "u", |
|||
"微信浏览器(Android)": "u", |
|||
"QQ浏览器(Android)": "u" |
|||
}, |
|||
"H5-pc": { |
|||
"Chrome": "u", |
|||
"IE": "u", |
|||
"Edge": "u", |
|||
"Firefox": "u", |
|||
"Safari": "u" |
|||
}, |
|||
"小程序": { |
|||
"微信": "u", |
|||
"阿里": "u", |
|||
"百度": "u", |
|||
"字节跳动": "u", |
|||
"QQ": "u", |
|||
"钉钉": "u", |
|||
"快手": "u", |
|||
"飞书": "u", |
|||
"京东": "u" |
|||
}, |
|||
"快应用": { |
|||
"华为": "u", |
|||
"联盟": "u" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1 +0,0 @@ |
|||
# d-dateRange |
Loading…
Reference in new issue