From 4d6c3aa7f75c2a0b0a25e051c9d53c7555cdd1e3 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Mon, 18 Nov 2024 10:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=9C=E8=B5=84=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E3=80=81=E8=81=94=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/utils.js | 3 + pages/home/index.vue | 147 ++++--- pages/stock/{list.vue => inOut.vue} | 0 pages/stock/mana.vue | 16 +- pages/stock/nzOut.vue | 376 ++++++++++++++++++ router/stock.js | 15 +- .../d-form/components/d-form/d-form.vue | 1 + 7 files changed, 480 insertions(+), 78 deletions(-) rename pages/stock/{list.vue => inOut.vue} (100%) create mode 100644 pages/stock/nzOut.vue diff --git a/common/utils.js b/common/utils.js index 8502592..402b49b 100644 --- a/common/utils.js +++ b/common/utils.js @@ -17,4 +17,7 @@ export var computeArea=function(val,reat){ latitude: latitude.min+latitude.len/2, } } +} +export const code=function(date=''){ + return `${new Date(date).format('yyyyMMdd', new Date().format('yyyyMMdd'))}${new Date().format('hhmmss')}` } \ No newline at end of file diff --git a/pages/home/index.vue b/pages/home/index.vue index 96c7022..8a130af 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -113,77 +113,49 @@ } } } - &.mana{ - width:calc(50% - 46rpx); - flex-shrink: 0; - margin-top:0; - .title{ - color:#333; - font-size:32rpx; - display:flex; - align-items: center; - padding-bottom:24rpx; - border-bottom:2rpx solid #D8D8D8; - [class*=plant-]{ - color:#10C176; + &.appMana{ + &>._title{ + &.line{ + display: flex; + justify-content: space-between; } .more{ + margin-left:auto; color:#999; font-size:24rpx; - margin-left:auto; + font-weight: normal; } } - .item{ - display:flex; - align-items: center; - margin-top:24rpx; - color:#707070; - font-size:24rpx; - &:nth-child(2){ --c:235, 67, 118; } - &:nth-child(3){ --c:255, 195, 83; } - &:nth-child(4){ --c:16, 193, 118; } - &:before{ - flex-shrink: 0; - content:" "; - width:20rpx; - height:20rpx; - border-radius: 50%; - background-image:radial-gradient(rgba(var(--c), 1) 2px,rgba(var(--c), 0.2) 2.5px); - margin-right:10rpx; - } - text{ - &:nth-child(2){ - margin-left:auto; - flex-shrink: 0; + .items{ + display: flex; + flex-wrap: wrap; + margin-top:20rpx; + min-height: 120rpx; + &>view{ + width:calc(100%/4); + display: flex; + flex-direction: column; + align-items: center; + &:nth-child(n+5){ + margin-top:20rpx; + } + image{ + width:76rpx; + height:76rpx; + // border-radius: 50%; + // box-shadow: 0 4rpx 6rpx rgba(0, 0, 0, 0.1); + } + text{ + margin-top:10rpx; + color:#011A3C; } } } - .u-empty{ - min-height:auto; - } - &:first-child{ - margin-right:calc(30rpx/2); - } - &:nth-child(2){ - margin-left:calc(30rpx/2); - } } &.base{ margin-top:0; background:linear-gradient(#fff,#F1FBF6); ._title{ - display:flex; - align-items: center; - font-size:30rpx; - font-weight: bold; - &:before{ - content:" "; - width:12rpx; - height:30rpx; - border-radius: 20rpx; - background:#10C176; - margin-right:14rpx; - } .plant-jiantou_zuoyouqiehuan{ margin-left:auto; color:#10C176; @@ -250,6 +222,20 @@ } } } + &>._title{ + display:flex; + align-items: center; + font-size:30rpx; + font-weight: bold; + &:before{ + content:" "; + width:12rpx; + height:30rpx; + border-radius: 20rpx; + background:#10C176; + margin-right:14rpx; + } + } } .u-popup{ @@ -292,37 +278,31 @@ + >> - 应用 + - - - - 地块管理 更多>> - - - {{v.plotName}} {{v.realityArea}}亩 - - + + + 应用管理 + 更多>> - - - 仓库管理 更多>> + + + + {{v.name}} - - {{v.warehouseName}} {{v.warehouseVolume}}㎡ - - + {{$store.state.baseInfo.name||'基地管理'}} 切换基地 @@ -367,6 +347,7 @@ import request,{host} from '@/common/request' baseIndex:"", stockList:[], adderss:{}, + appList:[],//应用列表 } }, computed:{ @@ -389,6 +370,7 @@ import request,{host} from '@/common/request' }, onLoad() { this.getHeadImg() + this.getApp() if(this.isAdmin){ this.getPlantBase() }else{ @@ -508,6 +490,23 @@ import request,{host} from '@/common/request' } } }, + async getApp(){ + var res=await request("/api/application/queryRoleApplication") + if(res.statu){ + this.appList=res.data.slice(0,4) + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"保存失败!", + showCancel:false, + }) + } + }, + toPage(url){ + uni.navigateTo({ + url:`/${url}`.replace(/\/\//g,'/') + }) + }, //重新定位 refreshPosition(){ uni.getLocation({ diff --git a/pages/stock/list.vue b/pages/stock/inOut.vue similarity index 100% rename from pages/stock/list.vue rename to pages/stock/inOut.vue diff --git a/pages/stock/mana.vue b/pages/stock/mana.vue index d84be28..17379b9 100644 --- a/pages/stock/mana.vue +++ b/pages/stock/mana.vue @@ -156,7 +156,7 @@ 库存量:{{v.equivalentInventory||0}}{{v.packgeUnit}} - + @@ -242,9 +242,21 @@ export default { } } }, + toNzOut(val){ + uni.navigateTo({ + url:`/pages/stock/nzOut`, + events:{update:()=>{ + this.clean() + this.search() + }}, + success(res){ + res.eventChannel.emit('detail', {...val}) + } + }) + }, toList(mode,val){ uni.navigateTo({ - url:`/pages/stock/list?mode=${mode}&type=${this.searchVal.substanceType}&warehouseId=${this.searchVal.warehouseId||''}`, + url:`/pages/stock/inOut?mode=${mode}&type=${this.searchVal.substanceType}&warehouseId=${this.searchVal.warehouseId||''}`, events:{update:()=>{ this.clean() this.search() diff --git a/pages/stock/nzOut.vue b/pages/stock/nzOut.vue new file mode 100644 index 0000000..fffdebb --- /dev/null +++ b/pages/stock/nzOut.vue @@ -0,0 +1,376 @@ + + + \ No newline at end of file diff --git a/router/stock.js b/router/stock.js index bf7f0d8..3434065 100644 --- a/router/stock.js +++ b/router/stock.js @@ -30,10 +30,21 @@ module.exports=[ } } }, + {//农资出库 + path:"pages/stock/nzOut", + style:{ + navigationBarTitleText:"出库", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + titleNView:true + } + } + }, {//出入库列表 - path:"pages/stock/list", + path:"pages/stock/inOut", style:{ - navigationBarTitleText:"", + navigationBarTitleText:"出库", navigationBarBackgroundColor:"#10C176", navigationBarTextStyle:"white", "app-plus":{ diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index ad8921d..10d8026 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -705,6 +705,7 @@ import {computeArea} from '@/common/utils' }else if(this.type=='text'&&typeof this.filter=='function'){ this.$emit("input",this.filter(e)) } + this.$emit("blur") }, tapMap(e){ console.log(e,'----e-----')