Browse Source

采购申请 修改列表数量累计

master
邓宏 2 years ago
parent
commit
057cb6dc53
  1. 6
      pages/massif/mana/index.vue
  2. 2
      pages/purchase/agrProdList.vue
  3. 10
      pages/purchase/apply.vue
  4. 2
      pages/purchase/detail.vue
  5. 16
      pages/purchase/specs.vue
  6. 66
      uni_modules/d-form/components/d-form/d-form.vue
  7. 2
      uni_modules/d-picker/components/d-picker/d-picker.vue

6
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:{

2
pages/purchase/agrProdList.vue

@ -61,7 +61,7 @@
<scroll-view scroll-y @scrolltolower="search">
<view class="card" v-for="(v,k) in list" :key="k" @click="toAddSepc(v.id)">
<view class="name">
<text>{{v.goodsName}}</text> {{v.detailedType}} <text class="plant-youbian"/>
<text>{{v.detailedType}}</text> {{v.goodsName}} <text class="plant-youbian"/>
</view>
<view class="company">
<text>{{v.detailedParentName}}</text> <text class="over">{{v.supplier}}</text>

10
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)
}
}}
})
},

2
pages/purchase/detail.vue

@ -67,7 +67,7 @@
<view class="card">
<view v-for="(v,k) in list" :key="k">
<view class="head">
<text>{{v.goodsName}}</text> <text>{{v.detailedType}}</text> <text>({{v.goodsSpecification}})</text>
<text>{{v.detailedType}}</text> <text>{{v.goodsName}}</text> <text>({{v.goodsSpecification}})</text>
</view>
<view class="info">
<text>{{v.detailedParentName}}</text> <text class="over">{{v.supplier}}</text> <text :data-total="v.heft">{{v.packing}}</text>

16
pages/purchase/specs.vue

@ -116,8 +116,8 @@
<view class="container">
<view class="card fertilizer">
<view class="name">
<text>{{formData.goodsName}}</text>
<text>{{formData.detailedType}}</text>
<text>{{formData.goodsName}}</text>
<text class="plant-jiantou_zuoyouqiehuan" @click="$refs.dPicker.show=true"/>
</view>
<view class="company">
@ -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(){

66
uni_modules/d-form/components/d-form/d-form.vue

@ -187,7 +187,7 @@
</u-input>
<button v-if="btnText" @click="btnFun" class="cu-btn bg-green shadow">{{btnText}}</button>
</view>
<view v-else-if="type=='map'" class="map plant-dingweixiao" :class="{noData:true}" @click="showMap=true">选择经纬度</view>
<view v-else-if="type=='map'" class="map plant-dingweixiao" :class="{noData:true}" @click="openMap">选择经纬度</view>
<view v-else-if="type=='select'" class="plant-youbian" :class="{noData: !value[0]}" @click="show=true">{{pickerContent}}</view>
<u-upload v-else-if="type=='upImg'" :fileList="imgs" previewFullImage multiple :maxCount="num" @delete="delImg" @afterRead="afterRead">
<view class="album">
@ -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 */
}
},
}
</script>

2
uni_modules/d-picker/components/d-picker/d-picker.vue

@ -67,7 +67,7 @@
<picker-view :value="[value]" indicator-style="height:90rpx;" @change="changeVal=$event.detail.value[0]">
<picker-view-column>
<view v-for="(v,k) in list" :key="k" class="item" style="height:90rpx;">
<view class="name"><text>{{v.goodsName}}</text><text>{{v.detailedType}}</text></view>
<view class="name"><text>{{v.detailedType}}</text> <text>{{v.goodsName}}</text></view>
<view class="company" :data-name="v.detailedParentName" :data-company="v.supplier"/>
</view>
</picker-view-column>

Loading…
Cancel
Save