step3.vue
4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<template>
<view class="container">
<view class="" v-if="!isScan">
<view class="flex padding-sm" style="background: #F5E4C2;" v-if="qptipsObj.type">
<u-icon name="warning-fill" color="#FFA500"></u-icon>
<view class="" style="color: #ffa500;">
注意:发出气瓶数{{this.qptipsObj.type}}订单所需数,请确认是否继续配送!
</view>
</view>
<view class="cardCss usuallyCard">
<view class="flex justify-between" v-for="(item,index) in qpParams" :key="index">
<view class="flex">
<view class="">
<u-image width="50px" height="50px" radius="10" :src="item.image"></u-image>
</view>
<view class="flex flex-direction justify-between margin-left-sm">
<view class="text-bold text-lg">
{{item.fSpmc || ""}}
</view>
<view class="text-sm text-grey">
{{item.fMs || ""}}
</view>
</view>
</view>
<view class="flex align-center text-grey">
X{{item.fSl || ""}}
</view>
</view>
</view>
<view class="cardCss usuallyCard">
<u-collapse ref="collapse1" :border="false" :value="qpsf.mpfc.length?['1']:['']">
<u-collapse-item title="满瓶发出" name="1">
<view class="flex justify-between align-center" style="margin: 10px 15px 0px 15px;" v-for="(item,index) in qpsf.mpfc"
:key="index">
<view class="">
{{item.code}} | {{item.qpgg}}
</view>
<view class="" @click="del(1,index)">
<u-icon name="trash" size="18"></u-icon>
</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
<view class="cardCss usuallyCard">
<u-collapse ref="collapse2" :border="false" :value="qpsf.kphs.length?['2']:['']">
<u-collapse-item title="空瓶回收" name="2">
<view class="flex justify-between align-center" style="margin: 10px 15px 0px 15px;" v-for="(item,index) in qpsf.kphs"
:key="index">
<view class="">
{{item.code}} | {{item.qpgg}}
</view>
<view class="" @click="del(2,index)">
<u-icon name="trash" size="18"></u-icon>
</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
<!-- <view class="cardCss usuallyCard">
<u-collapse ref="collapse3" :border="false" :value="qpsf.mphs.length?['3']:['']">
<u-collapse-item title="满瓶回收" name="3">
<view class="flex justify-between align-center" style="margin: 10px 15px 0px 15px;" v-for="(item,index) in qpsf.mphs"
:key="index">
<view class="">
{{item.code}} | {{item.qpgg}}
</view>
<view class="" @click="del(3,index)">
<u-icon name="trash" size="18"></u-icon>
</view>
</view>
</u-collapse-item>
</u-collapse>
</view> -->
<view class="scanAreaCss flex justify-around">
<view class="flex flex-direction align-center margin-tb-sm" @click="openScan(1)">
<view class="">
<u-image src="/static/images/home/saoma.png" width="22px" height="22px"></u-image>
</view>
<view class="margin-top-xs themeColor">
满瓶发出
</view>
</view>
<view class="flex flex-direction align-center margin-tb-sm" @click="openScan(2)">
<view class="">
<u-image src="/static/images/home/saoma.png" width="22px" height="22px"></u-image>
</view>
<view class="margin-top-xs themeColor">
空瓶回收
</view>
</view>
<!-- <view class="flex flex-direction align-center margin-tb-sm" @click="openScan(3)">
<view class="">
<u-image src="/static/images/home/saoma.png" width="22px" height="22px"></u-image>
</view>
<view class="margin-top-xs themeColor">
满瓶回收
</view>
</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
props: {
},
data() {
return {
isScan: false
}
},
props: {
qpsf: {
type: Object,
default: () => {}
},
qpParams: {
type: Array,
default: () => []
},
qptipsObj: {
type: Object,
default: () => {}
}
},
watch: {
qpsf: {
handler() {
this.$nextTick(() => {
// 重新触发mounted生命周期钩子
console.log("监听qpsf", this.qpsf);
this.setQplist();
this.$forceUpdate();
});
},
immediate: true,
deep: true,
}
},
computed: {
},
mounted() {
this.setQplist();
console.log("qpparams", this.qpParams);
},
methods: {
setQplist() {
setTimeout(() => {
this.$nextTick(() => {
// nextTick延迟回调,否则第一次不更新
this.$refs.collapse1.init();
this.$refs.collapse2.init();
// this.$refs.collapse3.init();
})
}, 500)
},
openScan(e) {
this.$emit('openScan', e)
},
del(e, index) {
this.$emit('del', e, index)
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: relative;
}
.cardCss {
margin: 10px 12px;
padding: 20px 15px;
}
.scanAreaCss {
width: 100%;
position: fixed;
bottom: 50px;
height: 60px;
background: #3D3935;
}
</style>