Commit 137d6c3ecf4f422d2c71bd4192da67cc6b4fbbbe
1 parent
53e23d4958
Exists in
master
验光填充逻辑补充
Showing
1 changed file
with
9 additions
and
226 deletions
Show diff stats
src/pages/purchaseLenses/purchaseLenses.vue
... | ... | @@ -169,181 +169,6 @@ |
169 | 169 | <text>确认以上输入信息来源于我的验光数据!</text> |
170 | 170 | </view> |
171 | 171 | </view> |
172 | - <!-- <view class="goods-form"> | |
173 | - <view class="data-title"> | |
174 | - <image src="../../static/icon-data.png"></image> | |
175 | - <text class="p1">填写验光数据</text> | |
176 | - </view> | |
177 | - <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> | |
178 | - <view class="picker"> | |
179 | - <view class="picker-choice"> | |
180 | - <view class="choice-left"> | |
181 | - <text class="p11">验光单取名:</text> | |
182 | - </view> | |
183 | - <input | |
184 | - class="choice-name uni-input" | |
185 | - :value="dataName" | |
186 | - @blur="fillData" | |
187 | - placeholder="下系" | |
188 | - /> | |
189 | - </view> | |
190 | - </view> | |
191 | - <view class="picker"> | |
192 | - <view class="picker-choice"> | |
193 | - <view class="choice-left"> | |
194 | - <text class="p11">{{pickerInfoList[0].nameC}}</text> | |
195 | - <text class="p12">{{pickerInfoList[0].nameE}}</text> | |
196 | - </view> | |
197 | - <text class="p13">左 (OD)</text> | |
198 | - <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> | |
199 | - <picker | |
200 | - @change="bindPickerChange01" | |
201 | - :value="pickerInfoList[0].nameIndex1" | |
202 | - :range="pickerInfoList[0].nameArray1" | |
203 | - > | |
204 | - <image src="../../static/detail-tabicon.png"></image> | |
205 | - </picker> | |
206 | - <text class="p13">右 (OS)</text> | |
207 | - <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> | |
208 | - <picker | |
209 | - @change="bindPickerChange02" | |
210 | - :value="pickerInfoList[0].nameIndex2" | |
211 | - :range="pickerInfoList[0].nameArray2" | |
212 | - > | |
213 | - <image src="../../static/detail-tabicon.png"></image> | |
214 | - </picker> | |
215 | - </view> | |
216 | - </view> | |
217 | - <view class="picker"> | |
218 | - <view class="picker-choice"> | |
219 | - <view class="choice-left"> | |
220 | - <text class="p11">{{pickerInfoList[1].nameC}}</text> | |
221 | - <text class="p12">{{pickerInfoList[1].nameE}}</text> | |
222 | - </view> | |
223 | - <text class="p13">左 (OD)</text> | |
224 | - <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> | |
225 | - <picker | |
226 | - @change="bindPickerChange11" | |
227 | - :value="pickerInfoList[1].nameIndex1" | |
228 | - :range="pickerInfoList[1].nameArray1" | |
229 | - > | |
230 | - <image src="../../static/detail-tabicon.png"></image> | |
231 | - </picker> | |
232 | - <text class="p13">右 (OS)</text> | |
233 | - <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> | |
234 | - <picker | |
235 | - @change="bindPickerChange12" | |
236 | - :value="pickerInfoList[1].nameIndex2" | |
237 | - :range="pickerInfoList[1].nameArray2" | |
238 | - > | |
239 | - <image src="../../static/detail-tabicon.png"></image> | |
240 | - </picker> | |
241 | - </view> | |
242 | - </view> | |
243 | - <view class="picker"> | |
244 | - <view class="picker-choice"> | |
245 | - <view class="choice-left"> | |
246 | - <text class="p11">{{pickerInfoList[2].nameC}}</text> | |
247 | - <text class="p12">{{pickerInfoList[2].nameE}}</text> | |
248 | - </view> | |
249 | - <text class="p13">左 (OD)</text> | |
250 | - <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text> | |
251 | - <picker | |
252 | - @change="bindPickerChange21" | |
253 | - :value="pickerInfoList[2].nameIndex1" | |
254 | - :range="pickerInfoList[2].nameArray1" | |
255 | - > | |
256 | - <image src="../../static/detail-tabicon.png"></image> | |
257 | - </picker> | |
258 | - <text class="p13">右 (OS)</text> | |
259 | - <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> | |
260 | - <picker | |
261 | - @change="bindPickerChange22" | |
262 | - :value="pickerInfoList[2].nameIndex2" | |
263 | - :range="pickerInfoList[2].nameArray2" | |
264 | - > | |
265 | - <image src="../../static/detail-tabicon.png"></image> | |
266 | - </picker> | |
267 | - </view> | |
268 | - </view> | |
269 | - <view class="picker"> | |
270 | - <view class="picker-choice"> | |
271 | - <view class="choice-left"> | |
272 | - <text class="p11">{{pickerInfoList[3].nameC}}</text> | |
273 | - <text class="p12">{{pickerInfoList[3].nameE}}</text> | |
274 | - </view> | |
275 | - <text class="p13">左 (OD)</text> | |
276 | - <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> | |
277 | - <picker | |
278 | - @change="bindPickerChange31" | |
279 | - :value="pickerInfoList[3].nameIndex1" | |
280 | - :range="pickerInfoList[3].nameArray1" | |
281 | - > | |
282 | - <image src="../../static/detail-tabicon.png"></image> | |
283 | - </picker> | |
284 | - <text class="p13">右 (OS)</text> | |
285 | - <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> | |
286 | - <picker | |
287 | - @change="bindPickerChange32" | |
288 | - :value="pickerInfoList[3].nameIndex2" | |
289 | - :range="pickerInfoList[3].nameArray2" | |
290 | - > | |
291 | - <image src="../../static/detail-tabicon.png"></image> | |
292 | - </picker> | |
293 | - </view> | |
294 | - </view> | |
295 | - <view class="picker"> | |
296 | - <view class="picker-choice"> | |
297 | - <view class="choice-left"> | |
298 | - <text class="p11">{{pickerInfoList[4].nameC}}</text> | |
299 | - </view> | |
300 | - <text class="p13-date">年 (Y)</text> | |
301 | - <text | |
302 | - class="p14" | |
303 | - style="width: 34px;" | |
304 | - >{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> | |
305 | - <picker | |
306 | - @change="bindPickerChange41" | |
307 | - :value="pickerInfoList[4].nameIndex1" | |
308 | - :range="pickerInfoList[4].nameArray1" | |
309 | - > | |
310 | - <image src="../../static/detail-tabicon.png"></image> | |
311 | - </picker> | |
312 | - <text class="p13-date">月 (M)</text> | |
313 | - <text | |
314 | - class="p14" | |
315 | - style="width: 30px;" | |
316 | - >{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> | |
317 | - <picker | |
318 | - @change="bindPickerChange42" | |
319 | - :value="pickerInfoList[4].nameIndex2" | |
320 | - :range="pickerInfoList[4].nameArray2" | |
321 | - > | |
322 | - <image src="../../static/detail-tabicon.png"></image> | |
323 | - </picker> | |
324 | - <text class="p13-date">日 (D)</text> | |
325 | - <text | |
326 | - class="p14" | |
327 | - style="width: 30px;" | |
328 | - >{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> | |
329 | - <picker | |
330 | - @change="bindPickerChange43" | |
331 | - :value="pickerInfoList[4].nameIndex3" | |
332 | - :range="pickerInfoList[4].nameArray3" | |
333 | - > | |
334 | - <image src="../../static/detail-tabicon.png"></image> | |
335 | - </picker> | |
336 | - </view> | |
337 | - </view> | |
338 | - <view class="confirm"> | |
339 | - <image | |
340 | - :src="tablist.confirm ? tabicon[0] : tabicon[1]" | |
341 | - @click="changeConfirm" | |
342 | - ></image> | |
343 | - <text>确认以上输入信息来源于我的验光数据!</text> | |
344 | - </view> | |
345 | - </view> --> | |
346 | - | |
347 | 172 | </template> |
348 | 173 | <template v-else> |
349 | 174 | <view |
... | ... | @@ -651,8 +476,8 @@ export default { |
651 | 476 | uni.showModal({ |
652 | 477 | title: '提示', |
653 | 478 | content: `是否填充已有的"${e.detail.value}"的数据`, |
654 | - success: ({ confirm }) => { | |
655 | - if (confirm) { | |
479 | + success: (res) => { | |
480 | + if (res.confirm) { | |
656 | 481 | this.kinds=2 |
657 | 482 | console.log('args===>',index) |
658 | 483 | // const mpList=Object.assign({},this.$store.state.mympList.mpList) |
... | ... | @@ -683,7 +508,9 @@ export default { |
683 | 508 | } |
684 | 509 | // this.checkedData = mpList[index] |
685 | 510 | // console.log('checkedData', this.checkedData) |
686 | - } | |
511 | + } else if(res.cancel){ | |
512 | + this.kinds=2 | |
513 | + } | |
687 | 514 | } |
688 | 515 | }) |
689 | 516 | } |
... | ... | @@ -746,51 +573,6 @@ export default { |
746 | 573 | this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] |
747 | 574 | }, |
748 | 575 | |
749 | - // 是否填充人员数据 | |
750 | - // fillData(e) { | |
751 | - // this.isDataName = false | |
752 | - // console.log('e---->', e) | |
753 | - // const mpList = this.mpList | |
754 | - | |
755 | -// <<<<<<< HEAD | |
756 | - // for (let index = 0; index < mpList.length; index++) { | |
757 | - // if (e.detail.value === mpList[index].name) { | |
758 | - // this.isDataName = true | |
759 | - // uni.showModal({ | |
760 | - // title: '提示', | |
761 | - // content: `是否填充已有的${e.detail.value}的数据`, | |
762 | - // success: ({ confirm }) => { | |
763 | - // if (confirm) { | |
764 | - // this.checkedData = mpList[index] | |
765 | - // console.log('checkedData', this.checkedData) | |
766 | - // } | |
767 | - // } | |
768 | - // }) | |
769 | - // } | |
770 | - // } | |
771 | - // }, | |
772 | -// ======= | |
773 | - // for (let index = 0; index < mpList.length; index++) { | |
774 | - // if (e.detail.value === mpList[index].name) { | |
775 | - // this.isDataName = true | |
776 | - // uni.showModal({ | |
777 | - // title: '提示', | |
778 | - // content: `是否自动填充已保存的${e.detail.value}的数据`, | |
779 | - // success: ({ confirm }) => { | |
780 | - // if (confirm) { | |
781 | - // this.checkedData = mpList[index] | |
782 | - // console.log('checkedData', this.checkedData) | |
783 | - // } | |
784 | - // } | |
785 | - // }) | |
786 | - // } | |
787 | - // } | |
788 | - // }, | |
789 | - // // 确认验光数据 | |
790 | - // changeConfirm() { | |
791 | - | |
792 | - // }, | |
793 | -// >>>>>>> 3a0878cc773855146d390a935b133980a5c0ee88 | |
794 | 576 | change(num) { |
795 | 577 | this.show[num] = !this.show[num] |
796 | 578 | this.$forceUpdate() |
... | ... | @@ -876,9 +658,6 @@ export default { |
876 | 658 | // time: this.pickerInfoChioce.time, |
877 | 659 | // img_url2: "http://localhost:8087/images/shop_1/1/", |
878 | 660 | }); |
879 | - store.dispatch('myLoveList/getLoveList', { | |
880 | - uid: this.$store.state.user.userInfo.uid, | |
881 | - }); | |
882 | 661 | flag=1 |
883 | 662 | } else{ |
884 | 663 | uni.showToast({ |
... | ... | @@ -973,6 +752,10 @@ export default { |
973 | 752 | |
974 | 753 | } |
975 | 754 | if(flag!=0){ |
755 | + // 如果数据验证无误,那么更新验光单的数据 | |
756 | + store.dispatch('myLoveList/getLoveList', { | |
757 | + uid: this.$store.state.user.userInfo.uid, | |
758 | + }); | |
976 | 759 | let i = 0 |
977 | 760 | // 判断出是哪一个sku被选中 |
978 | 761 | for (let index = 0; index < this.current.length; index++) { | ... | ... |