Browse Source

完成页面

master
邓宏 2 years ago
parent
commit
2dd32ff56c
  1. 2
      pages/home/my.vue
  2. 7
      pages/home/personalInfo.vue
  3. 15
      pages/home/rePassword.vue
  4. 13
      pages/massif/index.vue
  5. 9
      pages/massif/mana/recovery.vue
  6. 5
      pages/purchase/agrProdList.vue
  7. 87
      pages/purchase/detail.vue
  8. 114
      pages/purchase/record.vue
  9. 22
      router/purchase.js
  10. 10
      uni.scss

2
pages/home/my.vue

@ -64,7 +64,7 @@
<view class="item" @click="$u.route({url:'pages/home/rePassword'})">
<text class="plant-icon2"/> <text>修改密码</text> <text class="plant-youbian"/>
</view>
<view class="item">
<view class="item" @click="$u.route({url:'/pages/purchase/record'})">
<text class="plant-liulanjilu-tianchong"/> <text>采购记录</text> <text class="plant-youbian"/>
</view>
<view class="item">

7
pages/home/personalInfo.vue

@ -9,10 +9,15 @@
border-bottom:2rpx solid rgba(216, 216, 216, 0.2);
text{
&:first-child{
flex-shrink: 0;
color:#999;
margin-right:auto;
}
&:nth-child(2){
margin-left:20rpx;
}
&:nth-child(3){
flex-shrink: 0;
color:#999;
margin-left:30rpx;
}
@ -30,7 +35,7 @@
<text class="plant-youbian"/>
</view>
<view class="item">
<text>所属企业</text> <text>{{$store.getters['userInfo'].companyName}}</text> <text class="plant-youbian"/>
<text>所属企业</text> <text class="over">{{$store.getters['userInfo'].companyName}}</text> <text class="plant-youbian"/>
</view>
<view class="item">
<text>系统账号</text> <text>{{$store.getters['userInfo'].username}}</text> <text class="plant-youbian"/>

15
pages/home/rePassword.vue

@ -26,8 +26,9 @@
</d-navbar>
<view class="card">
<input placeholder="请输入旧密码" type="password" v-model="formData.oldpassword"/>
<input placeholder="请输入新密码(6-20位字母和数字的组合)" type="password" v-model="formData.password"/>
<input placeholder="再次输入新密码" type="password" v-model="formData.confirmPassword"/>
<input placeholder="再次输入新密码" type="password" v-model="formData.confirmpassword"/>
</view>
</view>
</template>
@ -37,21 +38,25 @@ import request from '@/common/request'
data(){
return{
formData:{
confirmPassword: "",
confirmpassword: "",
password: "",
oldpassword:"",
username: this.$store.getters['userInfo'].username,
}
}
},
methods:{
check(){
if(!this.formData.password){
if(!this.formData.oldpassword){
uni.showToast({title:"请输入旧密码!",icon:"none"})
return false
}else if(!this.formData.password){
uni.showToast({title:"请输入密码!",icon:"none"})
return false
}else if(!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(this.formData.password)){
uni.showToast({title:"密码格式为6-20位字母和数字的组合!",icon:"none"})
return false
}else if(!this.formData.confirmPassword){
}else if(this.formData.confirmpassword!=this.formData.password){
uni.showToast({title:"输入密码不一致!",icon:"none"})
return false
}
@ -59,7 +64,7 @@ import request from '@/common/request'
},
async submit(){
if(this.check()){
var res=await request("/sys/user/changePassword",{
var res=await request("/sys/user/updatePassword",{
method:"put",
suffix:"/jeecgboot",
body: this.formData

13
pages/massif/index.vue

@ -19,13 +19,18 @@
}
&>.info{
flex-grow: 1;
width:1rpx;
.title{
display:flex;
align-items: center;
font-weight: bold;
text{
margin-left:auto;
color:#333;
&:first-child{
flex-grow: 1;
font-weight: bold;
}
&:nth-child(2){
color:#333;
}
}
}
.code,.area{
@ -86,7 +91,7 @@
<view class="card item" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/massif/detail',params:{id:v.id}})">
<image src="https://ts1.cn.mm.bing.net/th?id=OIP-C.wc_dCG_KbIKZwMdtD3gL2QHaEt&w=313&h=199&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"/>
<view class="info">
<view class="title">{{v.plotName}} <text class="plant-youbian"/></view>
<view class="title"><text class="over">{{v.plotName}}</text> <text class="plant-youbian"/></view>
<view class="code">编号{{v.plotNumber}}</view>
<view class="area">地块面积{{v.realityArea}}</view>
<view class="data">

9
pages/massif/mana/recovery.vue

@ -49,6 +49,7 @@
}
.detail{
flex-grow: 1;
width:1rpx;
.name{
display: flex;
justify-content: space-between;
@ -56,8 +57,10 @@
text{
&:first-child{
font-weight: bold;
flex-grow: 1;
}
&:nth-child(2){
flex-shrink: 0;
font-weight: bold;
font-size:32rpx;
&:after{
@ -97,7 +100,7 @@
</u-image>
<view class="detail">
<view class="name">
<text>{{v.plantName}}</text>
<text class="over">{{v.plantName}}</text>
<text data-unit="kg">{{v.harvestNum}}</text></view>
<view class="info">
<text>负责人{{v.principal}}</text>
@ -170,10 +173,6 @@ export default {
}
})
if(res.statu){
this.list=this.list.concat(res.data.records)
this.list=this.list.concat(res.data.records)
this.list=this.list.concat(res.data.records)
this.list=this.list.concat(res.data.records)
this.list=this.list.concat(res.data.records)
this.total=res.data.total
}else{

5
pages/purchase/agrProdList.vue

@ -33,8 +33,11 @@
}
}
.company{
display:flex;
align-items: center;
text{
&:first-child{
flex-shrink: 0;
color:#FBA83C;
margin-right:14rpx;
}
@ -61,7 +64,7 @@
<text>{{v.goodsName}}</text> {{v.detailedType}} <text class="plant-youbian"/>
</view>
<view class="company">
<text>{{v.detailedParentName}}</text> <text>{{v.supplier}}</text>
<text>{{v.detailedParentName}}</text> <text class="over">{{v.supplier}}</text>
</view>
</view>
<u-empty v-if="list.length==0" icon="http://cdn.uviewui.com/uview/empty/data.png"/>

87
pages/purchase/detail.vue

@ -0,0 +1,87 @@
<style lang="scss">
.container{
min-height:100%;
background:#f6f6f6;
padding:30rpx 0;
.card{
&>view{
&+view{
border-top:2rpx solid rgba(216, 216, 216, 0.3);
margin-top:20rpx;
padding-top:20rpx;
}
.head{
display: flex;
align-items: center;
text{
&:first-child{
height:40rpx;
line-height: 40rpx;
min-width:80rpx;
padding:0 6rpx;
background:#10C176;
border-radius: 0 20rpx 0 20rpx;
font-size:20rpx;
color:#fff;
text-align: center;
margin-right:20rpx;
}
&:nth-child(3){
color:#999;
font-size:24rpx;
}
}
}
.info{
display: flex;
align-items: center;
font-size:24rpx;
color:#999;
margin-top:14rpx;
text{
&:first-child{
flex-shrink: 0;
margin-right:15rpx;
}
&:nth-child(3){
flex-shrink: 0;
color:#333;
font-size:28rpx;
margin-left:auto;
&:after{
content:"("attr(data-total)")";
font-size:24rpx;
color:#999;
}
}
}
}
}
}
}
</style>
<template>
<view class="container">
<view style="margin:0 30rpx;">申请日期2022-12-29</view>
<view class="card">
<view v-for="k in 5" :key="k">
<view class="head">
<text>化肥</text> <text>中量元素水溶肥</text> <text>(100kg/)</text>
</view>
<view class="info">
<text>微量元素肥</text> <text class="over">云南云天化股份有限公司</text> <text data-total="200kg">2</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data(){
return{
}
}
}
</script>

114
pages/purchase/record.vue

@ -0,0 +1,114 @@
<style lang="scss">
.container{
height:100%;
background:#f6f6f6;
scroll-view{
flex-grow: 1;
height: 1rpx;
.card{
margin-top:0;
.head{
border-bottom:1px solid #D8D8D8;
display:flex;
align-items: center;
padding-bottom:20rpx;
margin-bottom:10rpx;
text{
flex-shrink: 0;
&:first-child{
color:#10C176;
}
&:nth-child(2){
margin:0 auto 0 15rpx;
flex-shrink: 1;
font-weight: bold;
}
}
}
.item{
display:flex;
height:50rpx;
align-items: center;
color:#777;
text{
&:first-child{
margin-right:auto;
}
}
}
.foot{
background:rgba(223, 225, 224, 0.3);
min-height:88rpx;
margin:0 -30rpx -30rpx;
color:#999;
display:flex;
align-items: center;
justify-content: space-between;
padding:20rpx 30rpx;
.examine{
flex-grow: 1;
width:1rpx;
display:flex;
justify-content: space-evenly;
flex-direction: column;
}
.type{
flex-shrink: 0;
margin-left:40rpx;
font-size:24rpx;
color:#fff;
background:var(--bg,#FFCB69);
border-radius: 6rpx;
height:48rpx;
line-height: 48rpx;
min-width: 94rpx;
padding:0 8rpx;
text-align: center;
}
}
}
}
}
</style>
<template>
<view class="container flex">
<d-search/>
<scroll-view scroll-y>
<view class="card" @click="$u.route({url:'pages/purchase/detail'})">
<view class="head">
<text class="plant-edifice"/>
<text>一号基地</text>
<text>张召忠</text>
</view>
<view class="item">
<text>申请日期</text>
<text>2022-12-29</text>
</view>
<view class="item">
<text>种类</text>
<text>20</text>
<text class="plant-youbian"/>
</view>
<view class="foot">
<view class="examine">
<text>审核人章晓华</text>
<text class="over">原因此处是原因此处是原因此处是处是原因此处是原因此处是</text>
</view>
<text class="type">审核中</text>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data(){
return{
}
}
}
</script>

22
router/purchase.js

@ -52,4 +52,26 @@ module.exports=[
}
}
},
{
path:"pages/purchase/record",
style:{
navigationBarTitleText:"采购记录",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
titleNView:true
}
}
},
{
path:"pages/purchase/detail",
style:{
navigationBarTitleText:"采购详情",
navigationBarBackgroundColor:"#10C176",
navigationBarTextStyle:"white",
"app-plus":{
titleNView:true
}
}
},
]

10
uni.scss

@ -77,7 +77,7 @@ $uni-font-size-paragraph:15px;
@import '@/common/main.css';
@import 'uview-ui/theme.scss';
@import url('https://at.alicdn.com/t/c/font_3852037_owoae3ai5lc.css');
@import url('https://at.alicdn.com/t/c/font_3852037_jjiimlkafse.css');
[class*=plant-]{
font-family: "plantMana" !important;
font-size: 16px;
@ -118,10 +118,10 @@ view{
white-space: nowrap;
}
.u-navbar{
height:calc(var(--status-bar-height) + 44px);
margin-bottom:15px;
}
// .u-navbar{
// height:calc(var(--status-bar-height) + 44px);
// margin-bottom:15px;
// }
.u-button{
&:after{

Loading…
Cancel
Save