平板端快衣店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

193 lines
3.9 KiB

<template>
<view>
<view class="search">
<u-search placeholder="输入商品名称/编号查询" v-model="keyword"></u-search>
</view>
<view class="topBox">
<u-grid :col="2" border @click="onGridClick">
<u-grid-item>
<u-icon name="grid" :size="size"></u-icon>
<view class="grid-text">分类管理</view>
</u-grid-item>
<u-grid-item>
<u-icon name="plus-circle" :size="size"></u-icon>
<view class="grid-text">新增入库</view>
</u-grid-item>
</u-grid>
</view>
<view class="list">
<ul>
<li v-for="item in list" :key="item.id">
<image src="../../static/images/logo.png" mode=""></image>
<view class="content">
<view class="title">
{{item.productName}}
</view>
<view class="">
{{item.barcode}}
<!-- {{item.attributeList}} -->
</view>
<view class="flexBox">
<view class="">
<view class="">
{{item.purchasePrice}}
</view>
<text> 采购价</text>
</view>
<view class="">
<view class="">
{{item.wholesalePrice}}
</view>
<text> 批发价</text>
</view>
<view class="">
<view class="">
{{item.price}}
</view>
<text> 零售价</text>
</view>
</view>
</view>
<view class="rightBox">
× {{item.stockCount}}
</view>
</li>
</ul>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
export default {
computed: mapState(['shopIndex', 'region']),
data() {
return {
size: 30,
list: [],
goodsProducts: [],
keyword:'',
}
},
onShow() {
console.log('onshow');
this.getProductInfoList()
},
methods: {
delect(e) {
console.log(e);
},
accounts(e) {
console.log(e);
},
onGridClick(target) {
switch (target) {
case 0:
uni.navigateTo({
url: '/pages/inventory/gategory'
})
break;
case 1:
uni.navigateTo({
url: '/pages/inventory/addinventory'
})
break;
default:
}
},
getProductInfoList() {
this.tui.request("/app/stock/getStockInfoByCondition", "get", {
shopId:1
// shopId:this.shopIndex
}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result
} else {}
}).catch((res) => {})
},
getProductInfoList() {
this.tui.request("/app/stock/getStockInfoByCondition", "get", {
productId:'1696065701200138241',
// shopId:this.shopIndex
}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result
} else {}
}).catch((res) => {})
},
},
onReachBottom: function() {}
}
</script>
<style lang="scss" scoped>
.search {
padding: 20upx;
background-color: #fff;
position: fixed;
top: 0;
z-index: 100;
width: 100%;
background-color: #fff;
}
.topBox {
margin: 20rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
margin-top: 120upx;
}
.list {
ul {
border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
margin: 20rpx;
li {
padding: 20rpx;
background-color: #fff;
display: flex;
width: 100%;
line-height: 38rpx;
image {
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
}
view {
flex: 4;
}
.content {
font-size: 12px;
color: #909399;
.title {
font-size: 13px;
color: #303133;
}
.flexBox {
display: flex;
text-align: center;
view {
color: $u-primary;
font-size: 14px;
text {
font-size: 12px;
color: #909399;
}
}
}
}
.rightBox {
flex: 1;
}
}
}
}
</style>