From be29062d2570a8ceaaafafd2e93b9e7b07130972 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Tue, 7 Feb 2023 14:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E4=BB=93=E5=BA=93=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.js | 2 +- pages/massif/index.vue | 2 + pages/massif/mana/plantPlan.vue | 2 + pages/massif/mana/recovery.vue | 2 + pages/purchase/agrProdList.vue | 2 + pages/purchase/record.vue | 2 + pages/warehouse/info.vue | 27 +++++++- pages/warehouse/mana.vue | 116 +++++++++++++++++++------------- 8 files changed, 104 insertions(+), 51 deletions(-) diff --git a/common/request.js b/common/request.js index e33358c..6306168 100644 --- a/common/request.js +++ b/common/request.js @@ -4,7 +4,7 @@ export function host(host='default',suffix='/plant_manage'){ var url=process.env.NODE_ENV === 'development'?{ // default:`http://dpe74u.natappfree.cc` //陈 // default:`http://czixnn.natappfree.cc` //马 - default:`http://pe7wdu.natappfree.cc` //何 + default:`http://spp799.natappfree.cc` //何 // default:`http://192.168.0.116:8080` //孙 }:{ default:`` diff --git a/pages/massif/index.vue b/pages/massif/index.vue index fb8fdee..4ffd106 100644 --- a/pages/massif/index.vue +++ b/pages/massif/index.vue @@ -154,6 +154,8 @@ import request,{host} from '@/common/request' if(res.statu){ this.list=this.list.concat(res.data.records) this.total=res.data.total + this.searchVal.pageNo++ + if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) }else{ uni.showModal({ title:"提示", diff --git a/pages/massif/mana/plantPlan.vue b/pages/massif/mana/plantPlan.vue index 02ad19e..ef7f8a4 100644 --- a/pages/massif/mana/plantPlan.vue +++ b/pages/massif/mana/plantPlan.vue @@ -179,6 +179,8 @@ export default { if(res.statu){ this.list=this.list.concat(res.data.records) this.total=res.data.total + this.searchVal.pageNo++ + if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) }else{ uni.showModal({ title:"提示", diff --git a/pages/massif/mana/recovery.vue b/pages/massif/mana/recovery.vue index 0dde5d1..f3bfe5c 100644 --- a/pages/massif/mana/recovery.vue +++ b/pages/massif/mana/recovery.vue @@ -180,6 +180,8 @@ export default { if(res.statu){ this.list=this.list.concat(res.data.records) this.total=res.data.total + this.searchVal.pageNo++ + if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) }else{ uni.showModal({ title:"提示", diff --git a/pages/purchase/agrProdList.vue b/pages/purchase/agrProdList.vue index cb804a5..cae286b 100644 --- a/pages/purchase/agrProdList.vue +++ b/pages/purchase/agrProdList.vue @@ -104,6 +104,8 @@ export default { if(res.statu){ this.list=this.list.concat(res.data.records) this.total=res.data.total + this.searchVal.pageNo++ + if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) }else{ uni.showModal({ title:"提示", diff --git a/pages/purchase/record.vue b/pages/purchase/record.vue index 117d332..de16376 100644 --- a/pages/purchase/record.vue +++ b/pages/purchase/record.vue @@ -135,6 +135,8 @@ export default { if(res.statu){ this.list=this.list.concat(res.data.records) this.total=res.data.total + this.searchVal.pageNo++ + if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) }else{ uni.showModal({ title:"提示", diff --git a/pages/warehouse/info.vue b/pages/warehouse/info.vue index f54f3c8..43b4f65 100644 --- a/pages/warehouse/info.vue +++ b/pages/warehouse/info.vue @@ -43,6 +43,7 @@ import request from '@/common/request.js' contactPeople:"小明", contactNumber:"13752000000", warehousePic:[], + baseId: this.$store.state.plantBaseInfoId, }, rules:{ warehouseName:{required:true, message:"仓库名称必填!", trigger:["blur","change"]}, @@ -60,10 +61,15 @@ import request from '@/common/request.js' else call() }, trigger:["blur","change"]}, }, + eventChannel:null, } }, - onLoad(){ + onLoad(options){ + this.eventChannel=this.getOpenerEventChannel() this.init() + if(options.id){ + this.getDetail(options.id) + } }, methods:{ async init(){ @@ -89,7 +95,8 @@ import request from '@/common/request.js' } }) if(res.statu){ - + this.eventChannel.emit("update") + uni.navigateBack() }else{ uni.showModal({ title:"提示", @@ -99,7 +106,21 @@ import request from '@/common/request.js' } } }) - } + }, + async getDetail(warehouseId){ + var res=await request("/api/WarehouseManageApi/addOrUpdate",{ + params:{warehouseId} + }) + if(res.statu){ + this.formData=res.data.upper + }else{ + uni.showModal({ + title:"提示", + content:res.msg||"获取仓库详情失败!", + showCancel:false, + }) + } + }, }, } diff --git a/pages/warehouse/mana.vue b/pages/warehouse/mana.vue index bd7ad26..b9f2ab0 100644 --- a/pages/warehouse/mana.vue +++ b/pages/warehouse/mana.vue @@ -10,46 +10,55 @@ .item{ margin-top:0; - .title{ - display:flex; - align-items: center; - font-weight: bold; - text{ - margin-left:auto; - color:#333; - } - } - .adder{ - color:#999; - font-size:24rpx; - margin-top: 16rpx; + display:flex; + .u-transition{ + flex-shrink: 0; + margin-right:28rpx; } - .data{ - display:flex; - justify-content: space-between; - align-items: center; - margin-top:16rpx; - color:#999; - font-size:24rpx; - text:nth-child(2){ - color:#10C176; + .info{ + flex-grow: 1; + width:1rpx; + .title{ + display:flex; + align-items: center; font-weight: bold; - font-size: 32rpx; + text{ + margin-left:auto; + color:#333; + } } - } - .btns{ - display: flex; - justify-content: space-between; - align-items: center; - border-top:2rpx solid #D8D8D8; - margin:20rpx 0 -30rpx 0; - text{ - padding:16rpx 0 30rpx 0; + .adder{ color:#999; font-size:24rpx; - &:before{ + margin-top: 16rpx; + } + .data{ + display:flex; + justify-content: space-between; + align-items: center; + margin-top:16rpx; + color:#999; + font-size:24rpx; + text:nth-child(2){ color:#10C176; - margin-right:8rpx; + font-weight: bold; + font-size: 32rpx; + } + } + .btns{ + display: flex; + justify-content: space-between; + align-items: center; + border-top:2rpx solid #D8D8D8; + margin:20rpx 0 -30rpx 0; + text{ + padding:16rpx 0 30rpx 0; + color:#999; + font-size:24rpx; + &:before{ + color:#10C176; + margin-right:8rpx; + } } } } @@ -60,29 +69,35 @@