Blame view

lvdao-miniapp/pages/orderList/inventory.vue 3.32 KB
ad7d1a78   杨鑫   '最新'
1
  <template>
a72e57a5   wesley88   1
2
  	<view class="page">
6b583a85   wesley88   1
3
  		<view v-if="alllist.length == 0" style="text-align: center;margin-top: 50rpx;" class="tit1">暂无数据</view>
a72e57a5   wesley88   1
4
5
  		<!-- <u-tabs active-color="#26c570" :list="list" :current="current" @change="change"></u-tabs> -->
  		<view style="padding: 0 20rpx;">
53c1431a   wesley88   1
6
  			<view v-for="(item,index) in alllist" :key="index"   @click="gopath('/pages/orderList/inventorydetails',item.productId)"
a72e57a5   wesley88   1
7
8
9
10
11
12
13
14
15
16
17
18
19
  				style="background: #fff;margin-top: 40rpx;padding: 30rpx;border-radius: 18rpx;">
  					<view style="display: flex;">
  						<view>
  							<image style="width: 200rpx;height: 200rpx;bitem-radius: 18rpx;overflow: hidden;" mode="aspectFill"
  								:src="imgurl+item.productImage"></image>
  						</view>
  						<view style="display: flex;flex-direction: column;justify-content: space-between;margin-left: 15rpx;">
  							<view>{{item.productName}}</view>
  							<view  class="t1">售价区间:{{ item.section }}</view>
  							<view  class="t1">会员价:{{ item.memberSection || '-'}}</view>
  							<view  class="t1">积分兑换:{{item.ifCredit=='1'?'允许':item.ifCredit=='0'?'不允许':'-'}}</view>
  						</view>	
  					</view>
53c1431a   wesley88   1
20
  <!-- 					<view style="display: flex;justify-content: space-between;">
a72e57a5   wesley88   1
21
22
23
24
25
26
27
  						<view  class="t1">库存:{{ item.stockNumber }}</view>
  						<view  class="t1">销量:{{ item.volume }}</view>
  					</view>
  					<view style="display: flex;justify-content: space-between;">
  						<view  class="t1">上架状态:{{item.shelveState=='0'?'未上架':item.shelveState=='1'?'已上架':item.shelveState=='2'?'待审核':item.shelveState=='3'?'审核失败':'-'}}</view>	
  						<view  class="t1">登记状态:{{item.registrationStatus=='1'?'已入库':'未入库'}}</view>
  					</view>
53c1431a   wesley88   1
28
  					<view  class="t1">驳回原因:{{ item.reject || '-'}}</view> -->
a72e57a5   wesley88   1
29
30
31
32
  				</view>
  			</view>
  		</view>
  	</view>
ad7d1a78   杨鑫   '最新'
33
34
35
  </template>
  
  <script>
a72e57a5   wesley88   1
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  	export default {
  		data() {
  			return {
  				list: [
  					{
  						type:'',
  						name: '全部'
  					},
  					{
  						type:'1',
  						name: '待付款'
  					},
  					{
  						type:'2',
  						name: '待发货',
  					},
  					{
  						type:'3',
  						name: '已发货',
  					},
  					{
  						type:'4',
  						name: '已完成',
  					},
  					{
  						type:'5',
  						name: '已关闭',
  					},
  				],
  				current: 0,
  				alllist: [],
  				pageindex: {
  					page: 1,
  					pageSize: 10,
  					state:''
  				},
  				imgurl: '',
  				total:0
  			};
  		},
  		onLoad(optiong) {
  			this.imgurl = this.$img
6b583a85   wesley88   1
78
79
80
81
82
  			if(uni.getStorageSync('shopId')) {
  				this.getALL()
  			} else {
  				
  			}
a72e57a5   wesley88   1
83
84
85
86
87
88
89
90
91
92
  		},
  		onReachBottom (e){
  			console.error(e)
  			if (this.alllist.length < this.total) {
  				this.pageindex.page++
  				this.getALL()
  			}
  		},
  		methods: {
  			gopath(url,id){
6b583a85   wesley88   1
93
94
95
  				uni.navigateTo({
  					url:url+'?id='+id
  				})
a72e57a5   wesley88   1
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  			},
  			getALL() {
  				this.$http.sendRequest('/product/getAll', 'POST', this.pageindex,2).then(res => {
  					//成功回调	
  					this.alllist = [...this.alllist,...res.data.data.list]
  					this.total = res.data.data.total
  					console.error(this.alllist)
  				})
  			},
  			change(index) {
  				this.current = index;
  				if(this.current == 0) {
  					this.pageindex.state = ''
  				} else {
  					this.pageindex.state = this.list[this.current].type
  				}
  				this.pageindex.page = 1
  				this.alllist = []
  				this.getALL()
  			}
  
  		}
  	}
ad7d1a78   杨鑫   '最新'
119
120
  </script>
  
a72e57a5   wesley88   1
121
122
123
124
125
126
127
128
  <style scoped lang="scss">
  	.page {}
  
  	.t1 {
  		font-size: 26rpx;
  		color: #979797;
  		line-height: 50rpx;
  	}
ad7d1a78   杨鑫   '最新'
129
  </style>