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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
| <template>
| <view class="overflow" style="padding-bottom: 150rpx">
| <cu-custom bgColor="bg-white" :isBack="true">
| <block slot="backText"> </block>
| <block slot="content">异常处理</block>
| </cu-custom>
|
|
| <u-form
| labelPosition="left"
| label-width="180rpx"
| :model="warehouse"
| ref="warehouseRef"
| >
| <!-- <u-row
| class="border_bottom margin_top10rpx padding_left25rpx"
| style="background-color: #fff"
| >
| <u-col span="12">
| <u-form-item
| label="包装号:"
| prop="packageCode"
| required
| class="uFormItem"
| >
| <u-input
| v-model.trim="warehouse.packageCode"
| @confirm="getContainerData(1)"
| placeholder="请录入或扫码"
| class="width"
| :focus="curFoucus"
| >
| </u-input>
| </u-form-item>
| </u-col>
| </u-row> -->
| <u-row
| class="border_bottom margin_top10rpx padding_left25rpx"
| style="background-color: #fff"
| >
| <u-col span="12">
|
| <u-form-item label="" class="uFormItem">
| <button class=" bg-grey" @click="do_PartClear">269位置清除扫码信息</button>
| </u-form-item>
| </u-col>
| <u-col span="12">
|
| <u-form-item label="" class="uFormItem">
| <button class=" bg-grey" @click="do_OneKeyClearUpiQueue">一键清除269位置到BZ01的板件队列</button>
| </u-form-item>
| </u-col>
| </u-row>
| </u-form>
| </div>
| </u-popup>
| </view>
| </template>
| <script>
| import ButtonModal from "@/components/buttonModal.vue";
| import ModalCode from "@/components/ModalCode.vue";
| import {
| WmsOperationTaskSetNG,
| PartClear,
| OneKeyClearUpiQueue,
| querySingleUpiByUpi,
| getenumDataList,
| } from "@/api/putIn/artificial.js";
|
| export default {
| data() {
| return {
| operator: "",
| warehouse: {
| packageCode: "",
| upi: "",
| },
| singlist: [ ], //详情列表
| ordersId: 0, //当前容器绑定的上架单
| rescode: 0,
| resmessage: "",
| options: [
| {
| text: "详情",
| style: {
| backgroundColor: "#fc9f35",
| },
| },
| ],
| detailshow: false,
| materlist: {},
| curFoucus: true,
| timer: null,
| timerSm: null,
| detailableZb: false,
| detailable: false,
| gridFocus: false,
| gridable: true,
| kwbhAllowed: false,
| enumList: [],
| areaCodeEnum: [],
| upiFlagEnum: [],
| };
| },
| components: {
| ButtonModal,
| ModalCode,
| },
| created() {
| getenumDataList({
| EnumName: "UpiStatusEnum",
| }).then((res) => {
| this.enumList = res.result || [];
| });
| getenumDataList({
| EnumName: "AreaCodeEnum",
| }).then((res) => {
| this.areaCodeEnum = res.result || [];
| });
| getenumDataList({
| EnumName: "UpiFlagEnum",
| }).then((res) => {
| this.upiFlagEnum = res.result || [];
| });
| },
| onLoad() {
| this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
| },
| mounted() {},
| methods: {
| getEnumName(value) {
| const name = this.enumList.find((item) => item.value === value);
| return name ? name.name : "";
| },
| getUpiFlagEnumName(value) {
| const name = this.upiFlagEnum.find((item) => item.value === value);
| return name ? name.name : "";
| },
| getAreaCodeEnumName(value) {
| const name = this.areaCodeEnum.find((item) => item.value === value);
| return name ? name.name : "";
| },
| //获取的信息
| getContainerData() {
| if (!this.warehouse.upi) {
| uni.showToast({
| title: "请扫部件条码",
| icon: "none",
| duration: 2000,
| });
| return;
| }
| querySingleUpiByUpi({
| upi: this.warehouse.upi,
| }).then((res) => {
| const result = res.result;
| if (Array.isArray(result) && result.length == 0) {
| uni.showToast({
| title: "数据不存在",
| icon: "none",
| duration: 5000,
| });
| this.singlist = [];
| return;
| }
| this.singlist = res.result;
| });
| },
| // 如果打开一个的时候,不需要关闭其他,则无需实现本方法
| open(index) {
| // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
| // 原本为'false',再次设置为'false'会无效
| this.singlist[index].show = true;
| this.singlist.map((val, idx) => {
| if (index != idx) this.singlist[idx].show = false;
| });
| },
| close(index) {
| this.singlist[index].show = false;
| },
| //物料详情
| longpress(index, eindex) {
| this.materlist = this.singlist[index];
| this.detailshow = true;
| },
|
| do_OneKeyClearUpiQueue() {
| const params = {
| };
| uni.showModal({
| title: "一键清除269位置到BZ01的板件队列",
| content: "是否确认 一键清除269位置到BZ01的板件队列?",
| showCancel: true,
| cancelColor: "#333333",
| success: (res) => {
| if (res.confirm) {
| OneKeyClearUpiQueue(params).then((res) => {
| this.rescode = 200;
| this.$refs.resmodal.show = true;
| this.resmessage = "一键清除269位置到BZ01的板件队列成功";
| });
| } else if (res.cancel) {
| }
| },
| });
|
| },
| //确认
| do_PartClear() {
| const params = {
| };
| uni.showModal({
| title: "清理269扫码信息",
| content: "是否确认清理269扫码信息?",
| showCancel: true,
| cancelColor: "#333333",
| success: (res) => {
| if (res.confirm) {
| PartClear(params).then((res) => {
| this.rescode = 200;
| this.$refs.resmodal.show = true;
| this.resmessage = "清理269扫码信息成功";
| });
| } else if (res.cancel) {
| }
| },
| });
|
| },
| rest() {
| this.warehouse.upi = "";
| this.singlist = [];
| },
|
|
| },
| };
| </script>
| <style lang="scss">
| .content {
| height: 500rpx;
| overflow-y: scroll;
| width: 100%;
| padding: 15rpx;
| box-sizing: border-box;
|
| .content-item {
| padding: 15rpx;
| background-color: #fff;
| margin-bottom: 15rpx;
| border-radius: 8rpx;
| font-size: 32rpx;
| }
| }
|
| .bg_item {
| background: #ffebcd !important;
| }
| </style>
|
|