From 057cb6dc53dce4aa90befc5b5305dc0b940703c4 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 1 Feb 2023 15:59:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E6=95=B0=E9=87=8F=E7=B4=AF?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/mana/index.vue | 6 -- pages/purchase/agrProdList.vue | 2 +- pages/purchase/apply.vue | 10 ++- pages/purchase/detail.vue | 2 +- pages/purchase/specs.vue | 16 +---- .../d-form/components/d-form/d-form.vue | 66 +++++++++---------- .../d-picker/components/d-picker/d-picker.vue | 2 +- 7 files changed, 46 insertions(+), 58 deletions(-) diff --git a/pages/massif/mana/index.vue b/pages/massif/mana/index.vue index f784390..1001f77 100644 --- a/pages/massif/mana/index.vue +++ b/pages/massif/mana/index.vue @@ -78,12 +78,6 @@ export default { polygon.setFillColor("#10C176") polygon.setFillOpacity(0.3) maps.addOverlay(polygon) - - var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); - marker.setIcon("/static/tab_home.png"); - marker.bringToTop() - marker.setDraggable(true) - maps.addOverlay(marker); /* #endif */ }, methods:{ diff --git a/pages/purchase/agrProdList.vue b/pages/purchase/agrProdList.vue index 44acecd..c2bd28f 100644 --- a/pages/purchase/agrProdList.vue +++ b/pages/purchase/agrProdList.vue @@ -61,7 +61,7 @@ - {{v.goodsName}} {{v.detailedType}} + {{v.detailedType}} {{v.goodsName}} {{v.detailedParentName}} {{v.supplier}} diff --git a/pages/purchase/apply.vue b/pages/purchase/apply.vue index f90f219..6db6780 100644 --- a/pages/purchase/apply.vue +++ b/pages/purchase/apply.vue @@ -188,7 +188,15 @@ export default { uni.navigateTo({ url:`/pages/purchase/agrProdList`, events:{submit: e=>{ - this.formData.plantPurchaseSubList.push(e) + if(!this.formData.plantPurchaseSubList.some(v=>{ + if(v.goodsName==e.goodsName && v.goodsSpecification==e.goodsSpecification){ + v.num=parseFloat(e.num)+parseFloat(v.num) + return true + } + return false + })){ + this.formData.plantPurchaseSubList.push(e) + } }} }) }, diff --git a/pages/purchase/detail.vue b/pages/purchase/detail.vue index 043cb02..17e2d82 100644 --- a/pages/purchase/detail.vue +++ b/pages/purchase/detail.vue @@ -67,7 +67,7 @@ - {{v.goodsName}} {{v.detailedType}} ({{v.goodsSpecification}}) + {{v.detailedType}} {{v.goodsName}} ({{v.goodsSpecification}}) {{v.detailedParentName}} {{v.supplier}} {{v.packing}} diff --git a/pages/purchase/specs.vue b/pages/purchase/specs.vue index a576c11..59d9b0a 100644 --- a/pages/purchase/specs.vue +++ b/pages/purchase/specs.vue @@ -116,8 +116,8 @@ - {{formData.goodsName}} {{formData.detailedType}} + {{formData.goodsName}} @@ -265,20 +265,6 @@ export default{ if(this.check()){ uni.navigateBack() this.eventChannel.emit("submit", this.formData) - // var res=await request("/purchaseMain/purchaseMain/addPlantPurchaseSub",{ - // method:"post", - // body: this.formData - // }) - // if(res.statu){ - // uni.navigateBack() - // this.eventChannel.emit("submit", this.formData) - // }else{ - // uni.showModal({ - // title:"提示", - // content:res.msg||"保存失败!", - // showCancel:false, - // }) - // } } }, async searchGoods(){ 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 bf870ee..cad5254 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -187,7 +187,7 @@ - 选择经纬度 + 选择经纬度 {{pickerContent}} @@ -332,7 +332,9 @@ import {dataType} from 'black-knight/lib/config/tools' show:false, dateType:"start", imgList:[], + showMap:false, + maps:null, } }, watch:{ @@ -379,38 +381,6 @@ import {dataType} from 'black-knight/lib/config/tools' }) } }, - mounted(){ - /* #ifdef APP-PLUS */ - this.$nextTick(()=>{ - if(this.type=='amp'){ - var a=uni.createMapContext("amap",this) - - var maps=a.$getAppMap() - maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) - maps.onclick=(e)=>{ - console.log(e,'-------maps--click---------') - } - var polygon=new plus.maps.Polygon([ - new plus.maps.Point(116.39524,39.925301), - new plus.maps.Point(116.400444,39.925285), - new plus.maps.Point(116.400558,39.923282), - new plus.maps.Point(116.395502,39.923082), - ]) - polygon.setLineWidth(2) - polygon.setStrokeColor("#10C176") - polygon.setFillColor("#10C176") - polygon.setFillOpacity(0.3) - maps.addOverlay(polygon) - - var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); - marker.setIcon("/static/tab_home.png"); - marker.bringToTop() - marker.setDraggable(true) - maps.addOverlay(marker); - } - }) - /* #endif */ - }, methods:{ async afterRead(e){ this.imgList=this.imgList.concat(e.file.map(v=>Object.assign(v,{ @@ -451,6 +421,36 @@ import {dataType} from 'black-knight/lib/config/tools' this.$refs.picker.setColumnValues(e.columnIndex+1,e.value[0].children) } }, + openMap(){ + /* #ifdef APP-PLUS */ + this.showMap=true + if(!this.maps){ + var amap=uni.createMapContext("amap",this) + this.maps=amap.$getAppMap() + this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) + this.maps.onclick=(e)=>{ + console.log(e,'-------maps--click---------') + } + var polygon=new plus.maps.Polygon([ + new plus.maps.Point(116.39524,39.925301), + new plus.maps.Point(116.400444,39.925285), + new plus.maps.Point(116.400558,39.923282), + new plus.maps.Point(116.395502,39.923082), + ]) + polygon.setLineWidth(2) + polygon.setStrokeColor("#10C176") + polygon.setFillColor("#10C176") + polygon.setFillOpacity(0.3) + this.maps.addOverlay(polygon) + + var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); + marker.setIcon("/static/tab_home.png"); + marker.bringToTop() + marker.setDraggable(true) + this.maps.addOverlay(marker); + } + /* #endif */ + } }, } \ No newline at end of file diff --git a/uni_modules/d-picker/components/d-picker/d-picker.vue b/uni_modules/d-picker/components/d-picker/d-picker.vue index 42d7441..0bc0c8c 100644 --- a/uni_modules/d-picker/components/d-picker/d-picker.vue +++ b/uni_modules/d-picker/components/d-picker/d-picker.vue @@ -67,7 +67,7 @@ - {{v.goodsName}}{{v.detailedType}} + {{v.detailedType}} {{v.goodsName}}