Browse Source

联调库存详情

master
邓宏 2 years ago
parent
commit
9a807c6a82
  1. 4
      common/request.js
  2. 11
      pages/stock/already.vue
  3. 22
      pages/stock/goods_detail.vue
  4. 14
      pages/stock/record.vue

4
common/request.js

@ -3,8 +3,8 @@ import store from "@/store"
export function host(host='default',suffix='/plant_manage'){ export function host(host='default',suffix='/plant_manage'){
var url=process.env.NODE_ENV === 'development'?{ var url=process.env.NODE_ENV === 'development'?{
// default:`http://e5ruv4.natappfree.cc` //陈 // default:`http://e5ruv4.natappfree.cc` //陈
default:`http://nys8cm.natappfree.cc` //马 // default:`http://nys8cm.natappfree.cc` //马
// default:`http://7r39sr.natappfree.cc` //何 default:`http://4gg9xn.natappfree.cc` //何
// default:`http://192.168.0.116:8080` //孙 // default:`http://192.168.0.116:8080` //孙
}:{ }:{
default:`` default:``

11
pages/stock/already.vue

@ -76,7 +76,7 @@
<d-search v-model="searchVal.search" @search="clean();search()"/> <d-search v-model="searchVal.search" @search="clean();search()"/>
<scroll-view scroll-y @scrollotower="search"> <scroll-view scroll-y @scrollotower="search">
<view class="card" v-for="(v,k) in list" :key="k" @click="toAddSpecs(v.id)"> <view class="card" v-for="(v,k) in list" :key="k">
<view class="info"> <view class="info">
<text>{{v.agriculturalGoods}}</text> <text>{{v.substanceName}}</text> <text>({{v.specDescribe}})</text> <text>{{v.agriculturalGoods}}</text> <text>{{v.substanceName}}</text> <text>({{v.specDescribe}})</text>
</view> </view>
@ -104,11 +104,9 @@ export default {
}, },
list:[], list:[],
total:0, total:0,
intoPage:"",//formRecord
} }
}, },
onLoad(options){ onLoad(options){
this.intoPage=options.intoPage
this.search() this.search()
}, },
methods:{ methods:{
@ -137,13 +135,6 @@ export default {
} }
} }
}, },
toAddSpecs(id){
if(this.intoPage=='formRecord'){
uni.navigateTo({
url:`/pages/massif/agrSpecs?id=${id}`
})
}
},
} }
} }
</script> </script>

22
pages/stock/goods_detail.vue

@ -24,22 +24,22 @@
<view class="title">基本信息</view> <view class="title">基本信息</view>
<view class="item"> <view class="item">
<text>批次号</text> <text>A23366683</text> <text>批次号</text> <text>{{detail.batchNo}}</text>
</view> </view>
<view class="item"> <view class="item">
<text>出库类型</text> <text>销售出库</text> <text>出库类型</text> <text>{{detail.inOutType}}</text>
</view> </view>
<view class="item"> <view class="item">
<text>农资名称</text> <text>中量元素水溶肥</text> <text>农资名称</text> <text>{{detail.substanceName}}</text>
</view> </view>
<view class="item"> <view class="item">
<text>规格</text> <text>100kg/</text> <text>规格</text> <text>{{detail.specDescribe}}</text>
</view> </view>
<view class="item"> <view class="item">
<text>物品数量</text> <text>2(200kg)</text> <text>物品数量</text> <text>{{detail.number}}({{detail.equivalentAmount}}{{detail.unit}})</text>
</view> </view>
<view class="item"> <view class="item">
<text>供销商</text> <text>云南云天化股份有限公司</text> <text>供销商</text> <text>{{detail.supplierName}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -48,8 +48,14 @@
export default { export default {
data(){ data(){
return{ return{
detail:{}
} }
} },
onLoad(){
var eventChannel = this.getOpenerEventChannel();
eventChannel.on('detail', data=>{
this.detail=data
})
},
} }
</script> </script>

14
pages/stock/record.vue

@ -66,7 +66,7 @@
</style> </style>
<template> <template>
<view class="container"> <view class="container">
<view class="card" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/stock/goods_detail'})"> <view class="card" v-for="(v,k) in list" :key="k" @click="toDetail(v)">
<view class="head"> <view class="head">
<text class="plant-rili"/> <text>批次号{{v.batchNo}}</text> <text>{{v.inOutType}}</text> <text class="plant-rili"/> <text>批次号{{v.batchNo}}</text> <text>{{v.inOutType}}</text>
</view> </view>
@ -84,7 +84,7 @@ export default {
data(){ data(){
return{ return{
searchVal:{ searchVal:{
baseId: this.$store.state.plantBaseInfoId, baseId: "1611250480973049857",//this.$store.state.plantBaseInfoId,
pageNo:1, pageNo:1,
pageSize:6, pageSize:6,
}, },
@ -115,7 +115,15 @@ export default {
}) })
} }
} }
} },
toDetail(e){
uni.navigateTo({
url:"/pages/stock/goods_detail",
success(res){
res.eventChannel.emit("detail",e)
}
})
},
}, },
onReachBottom(){ onReachBottom(){
this.search() this.search()

Loading…
Cancel
Save