|
|
@ -92,7 +92,7 @@ |
|
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
|
<view class="card item" v-for="(v,k) in list" :key="k" @click="$u.route({url:'pages/warehouse/detail',params:{id:v.warehouseId}})"> |
|
|
|
<view class="card item" v-for="(v,k) in list" :key="k" @click="toDetail(v)"> |
|
|
|
<view class="img"> |
|
|
|
<u-image width="100%" height="144rpx" radius="16rpx" mode="aspectFill" :src="`${host}/${v.warehousePic[0]}`"> |
|
|
|
<text slot="error" class="plant-xiaopangchetupianjiazaishibai" style="font-size:45rpx"/> |
|
|
@ -104,10 +104,10 @@ |
|
|
|
<view class="title">{{v.warehouseName}} <text class="plant-youbian"/></view> |
|
|
|
<view class="adder">{{v.warehouseAddress}}</view> |
|
|
|
<view class="data"> |
|
|
|
<text>库存种类:{{v.inventoryCount||0}}种</text> <text>{{v.capacity||0}}㎡</text> |
|
|
|
<text>库存种类:{{v.inventoryCount||0}}种</text> <text>{{v.warehouseVolume||0}}㎡</text> |
|
|
|
</view> |
|
|
|
<view class="btns"> |
|
|
|
<text class="plant-xiugai" @click.stop="toAdd(v.warehouseId)">修改</text> |
|
|
|
<text class="plant-xiugai" @click.stop="toAdd(v)">修改</text> |
|
|
|
<text class="plant-shanchu" @click.stop="del(k)">删除</text> |
|
|
|
<text class="plant-chakan" @click.stop="$u.route({url:'pages/stock/mana',params:{id:v.id, goodsType:({1:'nz',2:'ncp'})[v.goodsType]}})">查看库存</text> |
|
|
|
</view> |
|
|
@ -118,7 +118,7 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import request,{host} from '@/common/request.js' |
|
|
|
import request,{host} from '@/common/request' |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
@ -192,13 +192,24 @@ import request,{host} from '@/common/request.js' |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
toAdd(id){ |
|
|
|
toAdd(e){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:`/pages/warehouse/info?id=${id||''}`, |
|
|
|
url:`/pages/warehouse/info`, |
|
|
|
events:{update:()=>{ |
|
|
|
this.clean() |
|
|
|
this.search() |
|
|
|
}} |
|
|
|
}}, |
|
|
|
success(res){ |
|
|
|
res.eventChannel.emit("detail", e) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
toDetail(e){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:"/pages/warehouse/detail", |
|
|
|
success(res){ |
|
|
|
res.eventChannel.emit('detail', {...e}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|