Browse Source

feat:仓库新增、开单mock接口

zhangxin 2 months ago
parent
commit
15c38136ea

+ 13 - 0
components/custom-tab-select/index.vue

@@ -44,6 +44,10 @@ export default {
44 44
       type: [String, Number, Array],
45 45
       default: ""
46 46
     },
47
+    isClear: {
48
+      type: Boolean,
49
+      default: false
50
+    }
47 51
   },
48 52
   computed: {
49 53
     isMultiple() {
@@ -97,6 +101,15 @@ export default {
97 101
         }
98 102
       },
99 103
       immediate: true
104
+    },
105
+    isClear: {
106
+      handler(val) {
107
+        if (val) {
108
+          this.activeValue = '';
109
+          this.activeValues = [];
110
+        }
111
+      },
112
+      immediate: true
100 113
     }
101 114
   },
102 115
   methods: {

+ 2 - 2
components/person-picker/index.vue

@@ -30,8 +30,8 @@ export default {
30 30
         this.columns = [];
31 31
         this.show = false;
32 32
     },
33
-    recyclePersonConfirm({ columnIndex, value, values }) {
34
-        this.$emit('selectPerson', value[value.length -1]);
33
+    recyclePersonConfirm({ columnIndex, value, values,index }) {
34
+        this.$emit('selectPerson', value[value.length - 1] ? value[value.length - 1] : value[value.length - 2]);
35 35
         this.close();
36 36
     },
37 37
     recyclePersonChange(e) {

+ 237 - 24
mock/mockData.js

@@ -291,11 +291,11 @@ const mockDataList = {
291 291
           agentPrice:'12345',//代理价格
292 292
           stock:'12345',//库存数量
293 293
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
294
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
295
-        
294
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
295
+          downStatus:'1',//下架状态 0:已下架 1:已上架
296 296
         },
297 297
         {
298
-          id:'',//商品库存id
298
+          id:'123456754',//商品库存id
299 299
           name:'Rolex',//商品名称
300 300
           model:'Submariner Date 126610LN',//型号
301 301
           costPrice:'12345',//成本价格
@@ -304,11 +304,11 @@ const mockDataList = {
304 304
           agentPrice:'12345',//代理价格
305 305
           stock:'12345',//库存数量
306 306
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
307
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
308
-        
307
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
308
+          downStatus:'0',//下架状态 0:已下架 1:已上架
309 309
         },
310 310
         {
311
-          id:'',//商品库存id
311
+          id:'123456754',//商品库存id
312 312
           name:'Rolex',//商品名称
313 313
           model:'Submariner Date 126610LN',//型号
314 314
           costPrice:'12345',//成本价格
@@ -317,11 +317,76 @@ const mockDataList = {
317 317
           agentPrice:'12345',//代理价格
318 318
           stock:'12345',//库存数量
319 319
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
320
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
321
-        
320
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
321
+          downStatus:'1',//下架状态 0:已下架 1:已上架
322
+        },
323
+        {
324
+          id:'123456754',//商品库存id
325
+          name:'Rolex',//商品名称
326
+          model:'Submariner Date 126610LN',//型号
327
+          costPrice:'12345',//成本价格
328
+          salesPrice:'12345',//销售价格
329
+          peerPrice:'12345',//同行价格
330
+          agentPrice:'12345',//代理价格
331
+          stock:'12345',//库存数量
332
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
333
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
334
+          downStatus:'0',//下架状态 0:已下架 1:已上架
335
+        },
336
+        {
337
+          id:'123456754',//商品库存id
338
+          name:'Rolex',//商品名称
339
+          model:'Submariner Date 126610LN',//型号
340
+          costPrice:'12345',//成本价格
341
+          salesPrice:'12345',//销售价格
342
+          peerPrice:'12345',//同行价格
343
+          agentPrice:'12345',//代理价格
344
+          stock:'12345',//库存数量
345
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
346
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
347
+          downStatus:'1',//下架状态 0:已下架 1:已上架
348
+        },
349
+        {
350
+          id:'123456754',//商品库存id
351
+          name:'Rolex',//商品名称
352
+          model:'Submariner Date 126610LN',//型号
353
+          costPrice:'12345',//成本价格
354
+          salesPrice:'12345',//销售价格
355
+          peerPrice:'12345',//同行价格
356
+          agentPrice:'12345',//代理价格
357
+          stock:'12345',//库存数量
358
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
359
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
360
+          downStatus:'1',//下架状态 0:已下架 1:已上架
361
+        },
362
+        {
363
+          id:'123456754',//商品库存id
364
+          name:'Rolex',//商品名称
365
+          model:'Submariner Date 126610LN',//型号
366
+          costPrice:'12345',//成本价格
367
+          salesPrice:'12345',//销售价格
368
+          peerPrice:'12345',//同行价格
369
+          agentPrice:'12345',//代理价格
370
+          stock:'12345',//库存数量
371
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
372
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
373
+          downStatus:'1',//下架状态 0:已下架 1:已上架
374
+        },
375
+        {
376
+          id:'123456754',//商品库存id
377
+          name:'Rolex',//商品名称
378
+          model:'Submariner Date 126610LN',//型号
379
+          costPrice:'12345',//成本价格
380
+          salesPrice:'12345',//销售价格
381
+          peerPrice:'12345',//同行价格
382
+          agentPrice:'12345',//代理价格
383
+          stock:'12345',//库存数量
384
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
385
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
386
+          downStatus:'1',//下架状态 0:已下架 1:已上架
322 387
         },
323 388
         {
324
-          id:'',//商品库存id
389
+          id:'123456754',//商品库存id
325 390
           name:'Rolex',//商品名称
326 391
           model:'Submariner Date 126610LN',//型号
327 392
           costPrice:'12345',//成本价格
@@ -330,10 +395,11 @@ const mockDataList = {
330 395
           agentPrice:'12345',//代理价格
331 396
           stock:'12345',//库存数量
332 397
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
333
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
398
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
399
+          downStatus:'1',//下架状态 0:已下架 1:已上架
334 400
         },
335 401
         {
336
-          id:'',//商品库存id
402
+          id:'123456754',//商品库存id
337 403
           name:'Rolex',//商品名称
338 404
           model:'Submariner Date 126610LN',//型号
339 405
           costPrice:'12345',//成本价格
@@ -342,10 +408,11 @@ const mockDataList = {
342 408
           agentPrice:'12345',//代理价格
343 409
           stock:'12345',//库存数量
344 410
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
345
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
411
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
412
+          downStatus:'1',//下架状态 0:已下架 1:已上架
346 413
         },
347 414
         {
348
-          id:'',//商品库存id
415
+          id:'123456754',//商品库存id
349 416
           name:'Rolex',//商品名称
350 417
           model:'Submariner Date 126610LN',//型号
351 418
           costPrice:'12345',//成本价格
@@ -354,10 +421,11 @@ const mockDataList = {
354 421
           agentPrice:'12345',//代理价格
355 422
           stock:'12345',//库存数量
356 423
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
357
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
424
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
425
+          downStatus:'1',//下架状态 0:已下架 1:已上架
358 426
         },
359 427
         {
360
-          id:'',//商品库存id
428
+          id:'123456754',//商品库存id
361 429
           name:'Rolex',//商品名称
362 430
           model:'Submariner Date 126610LN',//型号
363 431
           costPrice:'12345',//成本价格
@@ -366,10 +434,11 @@ const mockDataList = {
366 434
           agentPrice:'12345',//代理价格
367 435
           stock:'12345',//库存数量
368 436
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
369
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
437
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
438
+          downStatus:'1',//下架状态 0:已下架 1:已上架
370 439
         },
371 440
         {
372
-          id:'',//商品库存id
441
+          id:'123456754',//商品库存id
373 442
           name:'Rolex',//商品名称
374 443
           model:'Submariner Date 126610LN',//型号
375 444
           costPrice:'12345',//成本价格
@@ -378,10 +447,11 @@ const mockDataList = {
378 447
           agentPrice:'12345',//代理价格
379 448
           stock:'12345',//库存数量
380 449
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
381
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
450
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
451
+          downStatus:'1',//下架状态 0:已下架 1:已上架
382 452
         },
383 453
         {
384
-          id:'',//商品库存id
454
+          id:'123456754',//商品库存id
385 455
           name:'Rolex',//商品名称
386 456
           model:'Submariner Date 126610LN',//型号
387 457
           costPrice:'12345',//成本价格
@@ -390,10 +460,11 @@ const mockDataList = {
390 460
           agentPrice:'12345',//代理价格
391 461
           stock:'12345',//库存数量
392 462
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
393
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
463
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
464
+          downStatus:'1',//下架状态 0:已下架 1:已上架
394 465
         },
395 466
         {
396
-          id:'',//商品库存id
467
+          id:'123456754',//商品库存id
397 468
           name:'Rolex',//商品名称
398 469
           model:'Submariner Date 126610LN',//型号
399 470
           costPrice:'12345',//成本价格
@@ -402,8 +473,74 @@ const mockDataList = {
402 473
           agentPrice:'12345',//代理价格
403 474
           stock:'12345',//库存数量
404 475
           imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
405
-          platform:[]//同步平台,此功能暂时不做,先定义一个字段
406
-        }
476
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
477
+          downStatus:'1',//下架状态 0:已下架 1:已上架
478
+        },
479
+        {
480
+          id:'123456754',//商品库存id
481
+          name:'Rolex',//商品名称
482
+          model:'Submariner Date 126610LN',//型号
483
+          costPrice:'12345',//成本价格
484
+          salesPrice:'12345',//销售价格
485
+          peerPrice:'12345',//同行价格
486
+          agentPrice:'12345',//代理价格
487
+          stock:'12345',//库存数量
488
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
489
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
490
+          downStatus:'1',//下架状态 0:已下架 1:已上架
491
+        },
492
+        {
493
+          id:'123456754',//商品库存id
494
+          name:'Rolex',//商品名称
495
+          model:'Submariner Date 126610LN',//型号
496
+          costPrice:'12345',//成本价格
497
+          salesPrice:'12345',//销售价格
498
+          peerPrice:'12345',//同行价格
499
+          agentPrice:'12345',//代理价格
500
+          stock:'12345',//库存数量
501
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
502
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
503
+          downStatus:'1',//下架状态 0:已下架 1:已上架
504
+        },
505
+        {
506
+          id:'123456754',//商品库存id
507
+          name:'Rolex',//商品名称
508
+          model:'Submariner Date 126610LN',//型号
509
+          costPrice:'12345',//成本价格
510
+          salesPrice:'12345',//销售价格
511
+          peerPrice:'12345',//同行价格
512
+          agentPrice:'12345',//代理价格
513
+          stock:'12345',//库存数量
514
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
515
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
516
+          downStatus:'1',//下架状态 0:已下架 1:已上架
517
+        },
518
+        {
519
+          id:'123456754',//商品库存id
520
+          name:'Rolex',//商品名称
521
+          model:'Submariner Date 126610LN',//型号
522
+          costPrice:'12345',//成本价格
523
+          salesPrice:'12345',//销售价格
524
+          peerPrice:'12345',//同行价格
525
+          agentPrice:'12345',//代理价格
526
+          stock:'12345',//库存数量
527
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
528
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
529
+          downStatus:'1',//下架状态 0:已下架 1:已上架
530
+        },
531
+        {
532
+          id:'123456754',//商品库存id
533
+          name:'Rolex',//商品名称
534
+          model:'Submariner Date 126610LN',//型号
535
+          costPrice:'12345',//成本价格
536
+          salesPrice:'12345',//销售价格
537
+          peerPrice:'12345',//同行价格
538
+          agentPrice:'12345',//代理价格
539
+          stock:'12345',//库存数量
540
+          imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
541
+          platform:[],//同步平台,此功能暂时不做,先定义一个字段
542
+          downStatus:'1',//下架状态 0:已下架 1:已上架
543
+        },
407 544
       ],
408 545
       total: 20,//总条数
409 546
     }
@@ -557,7 +694,52 @@ const mockDataList = {
557 694
   '/warehouse/wareHouseAdd': {
558 695
     method: 'post',
559 696
     data:{
560
-
697
+      goodPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//商品图片
698
+      desc:'',//商品描述
699
+      type:'1',//商品分类 1-腕表 2-箱包 3-珠宝 4-鞋靴 5-配饰 6-服饰 7-其他
700
+      dictLabel:'Rolex',//商品名称
701
+      dictValue:'12345',//商品名称id
702
+      series:'',//系列
703
+      model:'',//型号
704
+      dialType:'',//机芯类型
705
+      caseMaterial:'',//表壳材质
706
+      dialDiameter:'',//表盘直径
707
+      material:'',//材质
708
+      size:'',//尺寸
709
+      yardage:'',//尺码
710
+      price:'',//官方指导价
711
+      productCondition:'',//商品成色 1-闲置未使用 2-二手
712
+      detailPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//细节图片
713
+      title:'',//商品标题
714
+      productNo:'',//商品货号
715
+      productAttribute:'1',//商品属性 1-自有商品 2-寄卖商品 3-质押商品 4-其它
716
+      stock:'',//库存数量
717
+      costPrice:'',//总成本价
718
+      samePrice:'',//同行价格
719
+      agentPrice:'',//代理价格
720
+      salePrice:'',//销售价格
721
+      productPosition:'',//商品位置
722
+      watchYear:'',//手表年份
723
+      identifyingPerson:'',//鉴定人员
724
+      identifyingPersonId:'',//鉴定人员id
725
+      recycleType:'1',//回收类型 1-线上 2-同行 3-门店 4-其它
726
+      recyclePerson:'',//回收人员
727
+      recyclePersonId:'',//回收人员id
728
+      recycleBottomDesc:'',//回收留底图描述
729
+      recycleBottomFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//回收留底图
730
+      recycleTime:'2026-01-06',//回收时间
731
+      indentifyCode:'',//独立编码
732
+      targetAudience:'general',// general-通用 man-男 woman-女
733
+      productCard:'',//商品保卡 has-有 no-无
734
+      cardYear:'',//保卡年份 如果有商品保卡就有这个字段,如果没有商品保卡,这个字段为空
735
+      productCardPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//商品保卡图片留底
736
+      productTag:'',//商品标签
737
+      productAttachment:'',//商品附件
738
+      productDesc:'',//商品备注
739
+      productDescPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//商品备注图片
740
+      payType:'1',//付款方式 1:微信 2:支付宝 3:银行卡 4:现金 5:数字货币 6:挂账
741
+      submitType:'inAndUp',//提交类型 onlyIn:仅入库 inAndUp:入库并上架
742
+      continuousWarehousing:'0',//是否连续入库 1:是 0:否
561 743
     },
562 744
     url: '/prod-api/crm/warehouse/wareHouseAdd',
563 745
     delay: 300,
@@ -565,6 +747,37 @@ const mockDataList = {
565 747
       code: 200,
566 748
       msg: 'success'
567 749
     }
750
+  },
751
+  // 仓库模块-详情-开单
752
+  '/warehouse/wareHouseOpenOrder': {
753
+    method: 'post',
754
+    data:{
755
+      id:'',//商品库存id
756
+      url:'',//商品图片
757
+      dictLabel:'Rolex',//商品名称
758
+      dictValue:'12345',//商品名称id
759
+      model:'',//型号
760
+      totalCost:'',//总成本价
761
+      suggestedPrice:'',//建议价格
762
+      price:'',//成交金额
763
+      quantity:'',//开单数量
764
+      orderType:1,//订单类型 1-零售 2-寄卖 3-同行 4-退货 5-质押
765
+      warehouseDate:'2026-01-06',//开单日期
766
+      recyclePerson:'',//销售人员
767
+      recyclePersonId:'',//销售人员id
768
+      payType:1,//付款方式 1:微信 2:支付宝 3:银行卡 4:现金 5:数字货币 6:挂账
769
+      afterSaleTab:[1,2],//售后保障配置 多选 1-假一赔三 2-一年质保 3-一年内八折回收 4-送保养一次 5-原厂配件保证
770
+      payTypeProofPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//支付凭证上传图片
771
+      remark:'',//备注
772
+      address:'',//收货地址
773
+      amountReceived:'',//实收
774
+    },
775
+    url: '/prod-api/crm/warehouse/wareHouseOpenOrder',
776
+    delay: 300,
777
+    response: {
778
+      code: 200,
779
+      msg: 'success'
780
+    }
568 781
   }
569 782
   
570 783
 

+ 325 - 154
pages/wareHouse/components/add.vue

@@ -3,8 +3,8 @@
3 3
         <view class="add_page">
4 4
             <u-navbar class="nav-bar" title="商品入库" :autoBack="true" :placeholder="true" v-hideNav>
5 5
                 <view class="u-nav-slot" slot="right">
6
-                    <u-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange">
7
-                        <u-checkbox label="连续入库" name="continuous"></u-checkbox>
6
+                    <u-checkbox-group v-model="continuousWarehousing" placement="column">
7
+                        <u-checkbox label="连续入库" name="1"></u-checkbox>
8 8
                     </u-checkbox-group>
9 9
                 </view>
10 10
             </u-navbar>
@@ -22,12 +22,17 @@
22 22
                         </u--textarea>
23 23
                         <view class="btn_group_recognition">
24 24
                             <u-button text="清除" @click="clearRecognitionContent()"></u-button>
25
-                            <u-button text="粘贴识别" type="primary" @click="handlePasteRecognition(recognitionContent)"></u-button>
25
+                            <u-button text="粘贴识别" type="primary"
26
+                                @click="handlePasteRecognition(recognitionContent)"></u-button>
26 27
                         </view>
27 28
                     </u-form-item>
28 29
                     <u-form-item label="商品图片" required prop="imgs" borderBottom>
29
-                        <u-upload :fileList="goodPicFileList" @afterRead="afterReadGoodPic" @delete="deleteGoodPic"
30
-                            name="3" multiple :maxCount="9" :previewFullImage="true"></u-upload>
30
+                        <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
31
+                            @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
32
+                            :images="formData.goodPicFileList" :previewEnabled="true" :imageWidth="150"
33
+                            :imageHeight="150"></ImgsRowScroll>
34
+                        <u-upload @afterRead="afterReadGoodPic" name="3" multiple :maxCount="9"
35
+                            :previewFullImage="true"></u-upload>
31 36
                     </u-form-item>
32 37
                     <u-form-item label="商品描述(详细的描述让用户更好的了解您的产品)" required prop="desc" borderBottom>
33 38
                         <u--textarea v-model="formData.desc" clearable placeholder="95新 WHZ19219H
@@ -36,11 +41,14 @@
36 41
                         配件中溯卡" count autoHeight maxlength="250" height="100" confirmType="done"></u--textarea>
37 42
                     </u-form-item>
38 43
                     <u-form-item label="商品分类" required prop="type" borderBottom>
39
-                        <TabSelect :tabList="typeList" @tabChange="handleTabChangeType" :colNum="4" mode="single">
44
+                        <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType"
45
+                            :colNum="4" mode="single">
40 46
                         </TabSelect>
41 47
                     </u-form-item>
42
-                    <u-form-item label="品牌" required prop="brand" class="u-form-item-row" borderBottom @click="showBrandList">
43
-                        <FormSelectToPage :val="formData.brand"></FormSelectToPage>
48
+                    <u-form-item label="品牌" required prop="dictLabel" class="u-form-item-row" borderBottom
49
+                        @click="showBrandList">
50
+                        <FormSelectToPage :val="formData.dictLabel"></FormSelectToPage>
51
+                        <BrandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></BrandList>
44 52
                     </u-form-item>
45 53
                     <u-form-item label="系列" class="u-form-item-row" borderBottom>
46 54
                         <u--input v-model="formData.series" placeholder="请输入" clearable border="none"></u--input>
@@ -49,7 +57,7 @@
49 57
                         <u--input v-model="formData.model" placeholder="请输入" clearable border="none"></u--input>
50 58
                     </u-form-item>
51 59
                     <u-form-item label="机芯类型" class="u-form-item-row" borderBottom>
52
-                        <u--input v-model="formData.brand" placeholder="请输入" clearable border="none"></u--input>
60
+                        <u--input v-model="formData.dialType" placeholder="请输入" clearable border="none"></u--input>
53 61
                     </u-form-item>
54 62
                     <u-form-item label="表壳材质" class="u-form-item-row" borderBottom>
55 63
                         <u--input v-model="formData.caseMaterial" placeholder="请输入" clearable border="none"></u--input>
@@ -70,14 +78,28 @@
70 78
                         <u--input v-model="formData.price" placeholder="请输入" clearable border="none"></u--input>
71 79
                     </u-form-item>
72 80
                     <u-form-item label="商品成色" required prop="productCondition" borderBottom>
73
-                        <TabSelect :tabList="productConditionList" :colNum="2" mode="single"
74
-                            @tabChange="handleTabChangeProductCondition"></TabSelect>
81
+                        <TabSelect :tabList="productConditionList" :isClear="productConditionIsClear"
82
+                            @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single"></TabSelect>
75 83
                     </u-form-item>
76 84
                     <u-form-item label="细节图" borderBottom>
77
-                        <u-upload :fileList="detailVideoFileList" @afterRead="afterReadDeatilVideo"
78
-                            @delete="deleteDetailVideo" name="2" multiple :maxCount="10" accept="video"></u-upload>
79
-                        <u-upload :fileList="detailPicFileList" @afterRead="afterReadDetailPic"
80
-                            @delete="deleteDetailPic" name="1" multiple :maxCount="10"></u-upload>
85
+                        <view class="detail_pic_container">
86
+                            <!-- <view>
87
+                                <text class="tip">视频:</text>
88
+                                <ImgsRowScroll v-if="formData.detailVideoFileList.length > 0" :isShowDeleteIcon="true"
89
+                                    @deleteVideoInfo="getDeleteDetailVideoInfo" imgMode="aspectFill" :totalWidth="400"
90
+                                    :videos="formData.detailVideoFileList" :previewEnabled="true" :imageWidth="150"
91
+                                    :imageHeight="150" accept="video"></ImgsRowScroll>
92
+                                <u-upload @afterRead="afterReadDeatilVideo"  name="2" multiple :maxCount="10" accept="video"></u-upload>
93
+                            </view> -->
94
+                            <view>
95
+                                <!-- <text class="tip">图片:</text> -->
96
+                                <ImgsRowScroll v-if="formData.detailPicFileList.length > 0" :isShowDeleteIcon="true"
97
+                                    @deleteImgInfo="getDeleteDetailPicInfo" imgMode="aspectFill" :totalWidth="400"
98
+                                    :images="formData.detailPicFileList" :previewEnabled="true" :imageWidth="150"
99
+                                    :imageHeight="150"></ImgsRowScroll>
100
+                                <u-upload @afterRead="afterReadDetailPic" name="1" multiple :maxCount="10"></u-upload>
101
+                            </view>
102
+                        </view>
81 103
                     </u-form-item>
82 104
                     <u-form-item label="商品标题" borderBottom>
83 105
                         <u--textarea v-model="formData.title" clearable :placeholder="titlePlaceholder" count autoHeight
@@ -87,8 +109,9 @@
87 109
                         <u--input v-model="formData.productNo" placeholder="请输入" clearable border="none"></u--input>
88 110
                     </u-form-item>
89 111
                     <u-form-item label="商品属性" required prop="productAttribute" borderBottom>
90
-                        <TabSelect :tabList="productAttributeList" :colNum="4" mode="single"
91
-                            @tabChange="handleTabChangeProductAttribute"></TabSelect>
112
+                        <TabSelect :tabList="productAttributeList"  :colNum="4" mode="single"
113
+                            :isClear="productAttributeIsClear" @tabChange="handleTabChangeProductAttribute">
114
+                        </TabSelect>
92 115
                     </u-form-item>
93 116
                     <u-form-item label="库存数量" required prop="stock" class="u-form-item-row" borderBottom>
94 117
                         <u--input v-model="formData.stock" placeholder="请输入" clearable border="none"></u--input>
@@ -112,24 +135,37 @@
112 135
                     <u-form-item label="手表年份" class="u-form-item-row" borderBottom>
113 136
                         <u--input v-model="formData.watchYear" placeholder="请输入" clearable border="none"></u--input>
114 137
                     </u-form-item>
115
-                    <u-form-item label="鉴定人员" class="u-form-item-row" borderBottom>
116
-                        <u--input v-model="formData.identifyingPerson" placeholder="请输入" clearable
117
-                            border="none"></u--input>
138
+                    <u-form-item label="鉴定人员" class="u-form-item-row" borderBottom @click="identifyingPersonClick">
139
+                        <FormSelectToPage :val="formData.identifyingPerson" :isDelete="true"
140
+                            @handleClear="clear('identifyingPerson')"></FormSelectToPage>
141
+                        <PersonPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员"
142
+                            @selectPerson="handleSelectIdentifyingPerson"></PersonPicker>
118 143
                     </u-form-item>
119 144
                     <u-form-item label="回收类型" borderBottom>
120
-                        <TabSelect :tabList="recycleTypeList" :colNum="4" mode="single"
121
-                            @tabChange="handleTabChangeRecycleType">
145
+                        <TabSelect :tabList="recycleTypeList" :colNum="4" mode="single" 
146
+                            :isClear="recycleTypeIsClear" @tabChange="handleTabChangeRecycleType">
122 147
                         </TabSelect>
123 148
                     </u-form-item>
124
-                    <u-form-item label="回收人员" class="u-form-item-row" borderBottom>
125
-                        <u--input v-model="formData.recyclePerson" disabledColor="#fff" disabled clearable border="none"></u--input>
149
+                    <u-form-item label="回收人员" class="u-form-item-row" borderBottom @click="recyclePersonClick">
150
+                        <!-- <u--input v-model="formData.recyclePerson" disabledColor="#fff" disabled clearable
151
+                            border="none"></u--input> -->
152
+                        <FormSelectToPage :val="formData.recyclePerson" :isDelete="true"
153
+                            @handleClear="clear('recyclePerson')"></FormSelectToPage>
154
+                        <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员"
155
+                            @selectPerson="handleSelectRecyclePerson"></PersonPicker>
126 156
                     </u-form-item>
127 157
                     <u-form-item label="回收留底图" borderBottom>
128 158
                         <view class="recycle_bottom_desc">
129 159
                             <u--textarea v-model="formData.recycleBottomDesc" clearable count autoHeight maxlength="250"
130 160
                                 height="100" confirmType="done"></u--textarea>
131
-                            <u-upload :fileList="recycleBottomFileList" @afterRead="afterReadRecycleBottom"
132
-                                @delete="deleteRecycleBottom" name="1" multiple :maxCount="1" accept="image"></u-upload>
161
+                            <view>
162
+                                <ImgsRowScroll v-if="formData.recycleBottomPicList.length > 0" :isShowDeleteIcon="true"
163
+                                    @deleteImgInfo="getDeleteRecycleBottomPicInfo" imgMode="aspectFill"
164
+                                    :totalWidth="400" :images="formData.recycleBottomPicList" :previewEnabled="true"
165
+                                    :imageWidth="150" :imageHeight="150"></ImgsRowScroll>
166
+                                <u-upload @afterRead="afterReadRecycleBottom" name="1" multiple :maxCount="1"
167
+                                    accept="image"></u-upload>
168
+                            </view>
133 169
                         </view>
134 170
                     </u-form-item>
135 171
                     <u-form-item label="回收时间" required prop="recycleTime" class="u-form-item-row" borderBottom
@@ -162,8 +198,11 @@
162 198
                             border="none"></u--input>
163 199
                     </u-form-item>
164 200
                     <u-form-item label="保卡图片或独立编码照片留底(仅内部人员可见)" borderBottom>
165
-                        <u-upload :fileList="productCardFileList" @afterRead="afterReadProductCard"
166
-                            @delete="deleteProductCard" name="3" multiple :maxCount="9"
201
+                        <ImgsRowScroll v-if="formData.productCardPicFileList.length > 0" :isShowDeleteIcon="true"
202
+                            @deleteImgInfo="getDeleteProductCardPicInfo" imgMode="aspectFill" :totalWidth="400"
203
+                            :images="formData.productCardPicFileList" :previewEnabled="true" :imageWidth="150"
204
+                            :imageHeight="150"></ImgsRowScroll>
205
+                        <u-upload @afterRead="afterReadProductCardPic" name="3" multiple :maxCount="9"
167 206
                             :previewFullImage="true"></u-upload>
168 207
                     </u-form-item>
169 208
                     <u-form-item label="商品标签" class="u-form-item-row" borderBottom>
@@ -177,13 +216,19 @@
177 216
                         <view class="recycle_bottom_desc">
178 217
                             <u--textarea v-model="formData.productDesc" clearable count autoHeight maxlength="250"
179 218
                                 height="100" confirmType="done"></u--textarea>
180
-                            <u-upload :fileList="productCardFileList" @afterRead="afterReadProductCard"
181
-                                @delete="deleteProductCard" name="1" multiple :maxCount="1" accept="image"></u-upload>
219
+                            <view>
220
+                                <ImgsRowScroll v-if="formData.productDescPicFileList.length > 0"
221
+                                    :isShowDeleteIcon="true" @deleteImgInfo="getDeleteProductDescPicInfo"
222
+                                    imgMode="aspectFill" :totalWidth="400" :images="formData.productDescPicFileList"
223
+                                    :previewEnabled="true" :imageWidth="150" :imageHeight="150"></ImgsRowScroll>
224
+                                <u-upload @afterRead="afterReadProductDescPic" name="1" multiple :maxCount="1"
225
+                                    accept="image"></u-upload>
226
+                            </view>
182 227
                         </view>
183 228
                     </u-form-item>
184 229
                     <u-form-item label="付款方式" borderBottom>
185
-                        <TabSelect :tabList="paymentTabList" :echoInfo="payTypeEcho" :colNum="4" mode="single"
186
-                            @tabChange="handlePaymentTabChange">
230
+                        <TabSelect :tabList="paymentTabList" :echoInfo="payTypeEcho" :colNum="4" mode="single" 
231
+                            :isClear="payTypeIsClear" @tabChange="handlePayTypeTabChange">
187 232
                         </TabSelect>
188 233
                     </u-form-item>
189 234
                 </u--form>
@@ -194,31 +239,36 @@
194 239
             <u-button plain type="primary" @click="submitForm('onlyIn')">仅入库</u-button>
195 240
             <u-button type="primary" @click="submitForm('inAndUp')">入库并上架</u-button>
196 241
         </view>
197
-        <BrandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></BrandList>
198 242
     </view>
199 243
 </template>
200 244
 <script>
201 245
 import TabSelect from '@/components/custom-tab-select/index.vue'
202 246
 import FormSelectToPage from '@/components/form-select-to-page/index.vue'
203 247
 import BrandList from '@/components/brand-list/index.vue'
248
+import ImgsRowScroll from '@/components/imgs-row-scroll/index.vue'
249
+import PersonPicker from '@/components/person-picker/index.vue'
250
+
204 251
 export default {
205 252
     components: {
206 253
         TabSelect,
207 254
         FormSelectToPage,
208 255
         BrandList,
256
+        ImgsRowScroll,
257
+        PersonPicker
209 258
     },
210 259
     data() {
211 260
         return {
212 261
             checkboxValue: [],
213 262
             recognitionContent: '',
214 263
             formData: {
215
-                imgs: [],
264
+                goodPicFileList: [],//商品图片
216 265
                 desc: '',
217 266
                 type: '',
218
-                brand: '',
219
-                brandId: '',
267
+                dictLabel: '',
268
+                dictValue: '',
220 269
                 series: '',
221 270
                 model: '',
271
+                dialType: '',
222 272
                 caseMaterial: '',
223 273
                 dialDiameter: '',
224 274
                 material: '',
@@ -226,6 +276,8 @@ export default {
226 276
                 yardage: '',
227 277
                 price: '',
228 278
                 productCondition: '',
279
+                detailPicFileList: [],//细节图片
280
+                // detailVideoFileList:[],
229 281
                 productNo: '',
230 282
                 stock: null,
231 283
                 costPrice: '',
@@ -235,21 +287,27 @@ export default {
235 287
                 productPosition: '',
236 288
                 watchYear: '',
237 289
                 identifyingPerson: '',
290
+                identifyingPersonId: '',
238 291
                 recycleType: '',
239 292
                 recyclePerson: '',
293
+                recyclePersonId: '',
240 294
                 recycleBottomDesc: '',
241
-                recycleTime: null,
295
+                recycleBottomPicList: [],//回收留底图
296
+                recycleTime: this.$dayjs().format('YYYY-MM-DD'),
242 297
                 indentifyCode: '',
243 298
                 targetAudience: '',
244 299
                 productCard: '',
245 300
                 cardYear: '',
301
+                productCardPicFileList: [],//商品保卡图片或独立编码照片留底
246 302
                 productTag: '',
247 303
                 productAttachment: '',
248 304
                 productDesc: '',
249
-                paymentType: '',
305
+                productDescPicFileList: [],//商品备注图片
306
+                payType: '',
250 307
             },
308
+            continuousWarehousing: [],//是否连续入库 1:是 0:否
251 309
             rules: {
252
-                imgs: [
310
+                goodPicFileList: [
253 311
                     { required: true, message: '请上传商品图片', trigger: 'blur' },
254 312
                 ],
255 313
                 desc: [
@@ -258,7 +316,7 @@ export default {
258 316
                 type: [
259 317
                     { required: true, message: '请选择商品分类', trigger: 'blur' },
260 318
                 ],
261
-                brand: [
319
+                dictLabel: [
262 320
                     { required: true, message: '请选择品牌', trigger: 'blur' },
263 321
                 ],
264 322
                 productCondition: [
@@ -337,19 +395,19 @@ export default {
337 395
             ],
338 396
             recycleTypeList: [
339 397
                 {
340
-                    name: '其它',
398
+                    name: '线上',
341 399
                     value: '1',
342 400
                 },
343 401
                 {
344
-                    name: '线上',
402
+                    name: '同行',
345 403
                     value: '2',
346 404
                 },
347 405
                 {
348
-                    name: '同行',
406
+                    name: '门店',
349 407
                     value: '3',
350 408
                 },
351 409
                 {
352
-                    name: '门店',
410
+                    name: '其它',
353 411
                     value: '4',
354 412
                 },
355 413
             ],
@@ -379,39 +437,127 @@ export default {
379 437
                     value: 6,
380 438
                 },
381 439
             ],
382
-            brandToUrl: '/pages/wareHouse/components/brandList',
383
-            // 上传
384
-            goodPicFileList: [{ url: 'https://uviewui.com/swiper/1.jpg' }],//商品图片
385
-            detailPicFileList: [],//细节图片
386
-            detailVideoFileList: [],//细节视频
387
-            recycleBottomFileList: [],//回收留底图
388
-            productCardFileList: [],//商品保卡图片或独立编码照片留底
389
-            productTagFileList: [],//商品标签图片留底
390
-            payTypeEcho:''//付款方式识别回显
440
+            typeIsClear: false,//商品分类是否清空
441
+            productConditionIsClear: false,//商品成色是否清空
442
+            productAttributeIsClear: false,//商品属性是否清空
443
+            recycleTypeIsClear: false,//回收类型是否清空
444
+            payTypeIsClear: false,//付款方式是否清空
445
+            payTypeEcho: ''//付款方式识别回显
391 446
         }
392 447
     },
393 448
     methods: {
394
-        handleSelectedBrand(info) {
395
-            this.formData.brand = info.dictLabel;
396
-            this.formData.brandId = info.dictValue;
397
-        },
398
-        // 显示品牌列表
399
-        showBrandList() {
400
-            this.$refs.brandListRef.showBrandList();
401
-        },
402
-        submitForm() {
449
+        // 提交表单
450
+        submitForm(submitType) {
403 451
             this.$refs.addForm.validate().then((valid) => {
404 452
                 if (valid) {
405
-                    console.log('表单校验通过');
453
+                    if (this.formData.title == '') {
454
+                        this.formData.title = this.formData.desc.substring(0, 50);
455
+                    }
456
+                    const data = {
457
+                        ...this.formData,
458
+                        submitType: submitType, //提交类型 onlyIn:仅入库 inAndUp:入库并上架
459
+                        continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
460
+                    }
461
+                    uni.$u.api.wareHouseAdd(data).then(res => {
462
+                        console.log(res);
463
+                        if (res.code === 200) {
464
+                            uni.$u.toast('新增成功');
465
+                            if (data.continuousWarehousing == '0') {
466
+                                setTimeout(() => {
467
+                                    uni.navigateBack({
468
+                                        delta: 1
469
+                                    });
470
+                                }, 1000);
471
+                            } else {
472
+                                this.clearForm();
473
+                            }
474
+                        } else {
475
+                            uni.$u.toast(res.msg);
476
+                        }
477
+                    })
406 478
                 } else {
407 479
                     console.log('表单校验不通过');
408 480
                 }
409 481
             });
410 482
         },
411
-        handleTabChange(e) {
412
-            console.log(e);
483
+        clearForm() {
484
+            this.formData = {
485
+                goodPicFileList: [],//商品图片
486
+                desc: '',
487
+                type: '',
488
+                dictLabel: '',
489
+                dictValue: '',
490
+                series: '',
491
+                model: '',
492
+                dialType: '',
493
+                caseMaterial: '',
494
+                dialDiameter: '',
495
+                material: '',
496
+                size: '',
497
+                yardage: '',
498
+                price: '',
499
+                productCondition: '',
500
+                detailPicFileList: [],//细节图片
501
+                // detailVideoFileList:[],
502
+                productNo: '',
503
+                stock: null,
504
+                costPrice: '',
505
+                samePrice: '',
506
+                agentPrice: '',
507
+                salePrice: '',
508
+                productPosition: '',
509
+                watchYear: '',
510
+                identifyingPerson: '',
511
+                identifyingPersonId: '',
512
+                recycleType: '',
513
+                recyclePerson: '',
514
+                recyclePersonId: '',
515
+                recycleBottomDesc: '',
516
+                recycleBottomPicList: [],//回收留底图
517
+                recycleTime: this.$dayjs().format('YYYY-MM-DD'),
518
+                indentifyCode: '',
519
+                targetAudience: '',
520
+                productCard: '',
521
+                cardYear: '',
522
+                productCardPicFileList: [],//商品保卡图片或独立编码照片留底
523
+                productTag: '',
524
+                productAttachment: '',
525
+                productDesc: '',
526
+                productDescPicFileList: [],//商品备注图片
527
+                payType: '',
528
+            }
529
+            this.typeIsClear = true;
530
+            this.productConditionIsClear = true;
531
+            this.productAttributeIsClear = true;
532
+            this.recycleTypeIsClear = true;
533
+            this.payTypeIsClear = true;
534
+            this.continuousWarehousing = [];
535
+            this.$refs.addForm.resetFields();
536
+        },
537
+        // 选择品牌
538
+        handleSelectedBrand(info) {
539
+            this.formData.dictLabel = info.dictLabel;
540
+            this.formData.dictValue = info.dictValue;
541
+            this.$refs.addForm.validateField('dictLabel');
542
+        },
543
+        // 显示品牌列表
544
+        showBrandList() {
545
+            this.$refs.brandListRef.showBrandList();
413 546
         },
547
+        // 清空输入框
414 548
         clear(key) {
549
+            // 鉴定人
550
+            if (key == 'identifyingPerson') {
551
+                this.formData.identifyingPerson = '';
552
+                this.formData.identifyingPersonId = '';
553
+                return;
554
+            }
555
+            // 回收人
556
+            if (key == 'recyclePerson') {
557
+                this.formData.recyclePerson = '';
558
+                this.formData.recyclePersonId = '';
559
+                return;
560
+            }
415 561
             this.formData[key] = '';
416 562
         },
417 563
         // 商品分类
@@ -435,90 +581,116 @@ export default {
435 581
             this.formData.recycleType = e;
436 582
         },
437 583
         // 付款方式
438
-        handlePaymentTabChange(e) {
439
-            console.log(e);
584
+        handlePayTypeTabChange(e) {
585
+            this.formData.payType = e;
440 586
         },
587
+        // 打开回收时间选择器
441 588
         clickRecycleTimeRow() {
442 589
             this.recycleTimeShow = true;
443 590
         },
591
+        // 确认回收时间
444 592
         confirmRecycleTime(val) {
445
-            this.formData.recycleTime = this.$dayjs(val.value).format('YYYY-MM-DD');
446
-            console.log(val, this.formData.recycleTime);
447
-            this.recycleTimeShow = false;
593
+            this.$nextTick(() => {
594
+                this.formData.recycleTime = this.$dayjs(val.value).format('YYYY-MM-DD');
595
+                this.recycleTimeShow = false;
596
+            })
448 597
         },
598
+        // 关闭回收时间选择器
449 599
         closeRecycleTimePicker(val) {
450 600
             this.recycleTimeShow = false;
451 601
         },
452
-        cancelRecycleTimePicker(val) {
453
-            console.log(val);
454
-            this.recycleTimeShow = false;
602
+        // 打开鉴定人选择器
603
+        identifyingPersonClick() {
604
+            this.$refs.identifyingPersonPickerRef.open();
455 605
         },
456
-        recycleTimeFormatter(value) {
457
-            if (value) {
458
-                console.log(value);
459
-
460
-            }
461
-            return ''
606
+        // 选择鉴定人
607
+        handleSelectIdentifyingPerson(info) {
608
+            this.formData.identifyingPerson = info.label;
609
+            this.formData.identifyingPersonId = info.id;
610
+        },
611
+        // 打开回收人选择器
612
+        recyclePersonClick() {
613
+            this.$refs.recyclePersonPickerRef.open();
462 614
         },
463
-        // 删除商品图片
464
-        deleteGoodPic(event) {
465
-            console.log(event);
466
-            // this[`fileList${event.name}`].splice(event.index, 1);
615
+        // 选择回收人
616
+        handleSelectRecyclePerson(info) {
617
+            this.formData.recyclePerson = info.label;
618
+            this.formData.recyclePersonId = info.id;
467 619
         },
468 620
         // 新增商品图片
469 621
         async afterReadGoodPic(event) {
470
-            console.log(event);
471
-            // this.fileList = [...this.fileList, ...event.fileList];
472
-        },
473
-        // 删除细节视频
474
-        deleteVideo(event) {
475
-            console.log(event);
476
-            // this[`fileList${event.name}`].splice(event.index, 1);
622
+            event.file.forEach(item => {
623
+                uni.$u.api.uploadFile(item.url).then((res) => {
624
+                    this.formData.goodPicFileList.push(res.data.url);
625
+                    uni.$u.toast("文件上传成功");
626
+                }).catch(() => {
627
+                    uni.$u.toast("上传文件失败");
628
+                })
629
+            })
477 630
         },
478
-        // 新增细节视频
479
-        async afterReadVideo(event) {
480
-            console.log(event);
481
-            // this.fileList2 = [...this.fileList2, ...event.fileList];
631
+        // 获取删除商品图片信息
632
+        getDeleteGoodPicInfo(info) {
633
+            this.formData.goodPicFileList = info.newImages
482 634
         },
483
-        // 删除细节图片
484
-        deleteDetailPic(event) {
485
-            console.log(event);
486
-            // this[`fileList${event.name}`].splice(event.index, 1);
635
+        // 获取删除细节图片信息
636
+        getDeleteDetailPicInfo(info) {
637
+            this.formData.detailPicFileList = info.newImages
487 638
         },
488 639
         // 新增细节图片
489 640
         async afterReadDetailPic(event) {
490
-            console.log(event);
491
-            // this.fileList1 = [...this.fileList1, ...event.fileList];
641
+            event.file.forEach(item => {
642
+                uni.$u.api.uploadFile(item.url).then((res) => {
643
+                    this.formData.detailPicFileList.push(res.data.url);
644
+                    uni.$u.toast("文件上传成功");
645
+                }).catch(() => {
646
+                    uni.$u.toast("上传文件失败");
647
+                })
648
+            })
492 649
         },
493
-        // 删除回收留底图
494
-        deleteRecycleBottom(event) {
495
-            console.log(event);
496
-            // this[`fileList${event.name}`].splice(event.index, 1);
650
+        // 获取删除回收留底图信息
651
+        getDeleteRecycleBottomPicInfo(info) {
652
+            this.formData.recycleBottomPicList = info.newImages
497 653
         },
498 654
         // 新增回收留底图
499 655
         async afterReadRecycleBottom(event) {
500
-            console.log(event);
501
-            // this.fileList3 = [...this.fileList3, ...event.fileList];
656
+            event.file.forEach(item => {
657
+                uni.$u.api.uploadFile(item.url).then((res) => {
658
+                    this.formData.recycleBottomPicList.push(res.data.url);
659
+                    uni.$u.toast("文件上传成功");
660
+                }).catch(() => {
661
+                    uni.$u.toast("上传文件失败");
662
+                })
663
+            })
502 664
         },
503 665
         // 删除商品保卡图片或独立编码照片留底
504
-        deleteProductCard(event) {
505
-            console.log(event);
506
-            // this[`fileList${event.name}`].splice(event.index, 1);
666
+        getDeleteProductCardPicInfo(info) {
667
+            this.formData.productCardPicFileList = info.newImages
507 668
         },
508 669
         // 新增商品保卡图片或独立编码照片留底
509
-        async afterReadProductCard(event) {
510
-            console.log(event);
511
-            // this.fileList4 = [...this.fileList4, ...event.fileList];
670
+        async afterReadProductCardPic(event) {
671
+            event.file.forEach(item => {
672
+                uni.$u.api.uploadFile(item.url).then((res) => {
673
+                    this.formData.productCardPicFileList.push(res.data.url);
674
+                    uni.$u.toast("文件上传成功");
675
+                }).catch(() => {
676
+                    uni.$u.toast("上传文件失败");
677
+                })
678
+            })
512 679
         },
513
-        // 删除商品标签图片留底
514
-        deleteProductTag(event) {
515
-            console.log(event);
516
-            // this[`fileList${event.name}`].splice(event.index, 1);
680
+        // 获取删除商品备注图片信息
681
+        getDeleteProductDescPicInfo(info) {
682
+            this.formData.productDescPicFileList = info.newImages
517 683
         },
518
-        // 新增商品标签图片留底
519
-        async afterReadProductTag(event) {
520
-            console.log(event);
521
-            // this.fileList5 = [...this.fileList5, ...event.fileList];
684
+        // 新增商品备注图片
685
+        async afterReadProductDescPic(event) {
686
+            event.file.forEach(item => {
687
+                uni.$u.api.uploadFile(item.url).then((res) => {
688
+                    this.formData.productDescPicFileList.push(res.data.url);
689
+                    uni.$u.toast("文件上传成功");
690
+                }).catch(() => {
691
+                    uni.$u.toast("上传文件失败");
692
+                })
693
+            })
522 694
         },
523 695
         async handlePasteRecognition(text) {
524 696
             // 品牌:浪琴
@@ -534,55 +706,52 @@ export default {
534 706
             }
535 707
             try {
536 708
                 if (!text) return {};
537
-                
709
+
538 710
                 const result = {};
539 711
                 // 支持中文冒号和英文冒号
540 712
                 const lines = text.split(/[\n\r]+/);
541
-                
713
+
542 714
                 lines.forEach(line => {
543
-                const lineStr = line.trim();
544
-                if (!lineStr) return;
545
-                
546
-                // 尝试中文冒号
547
-                let separatorIndex = lineStr.indexOf(':');
548
-                // 如果没有中文冒号,尝试英文冒号
549
-                if (separatorIndex === -1) {
550
-                    separatorIndex = lineStr.indexOf(':');
551
-                }
552
-                
553
-                if (separatorIndex > 0) {
554
-                    const key = lineStr.substring(0, separatorIndex).trim();
555
-                    const value = lineStr.substring(separatorIndex + 1).trim();
556
-                    result[key] = value;
557
-                }
715
+                    const lineStr = line.trim();
716
+                    if (!lineStr) return;
717
+
718
+                    // 尝试中文冒号
719
+                    let separatorIndex = lineStr.indexOf(':');
720
+                    // 如果没有中文冒号,尝试英文冒号
721
+                    if (separatorIndex === -1) {
722
+                        separatorIndex = lineStr.indexOf(':');
723
+                    }
724
+
725
+                    if (separatorIndex > 0) {
726
+                        const key = lineStr.substring(0, separatorIndex).trim();
727
+                        const value = lineStr.substring(separatorIndex + 1).trim();
728
+                        result[key] = value;
729
+                    }
558 730
                 });
559
-                console.log(result);
560
-                if(result['品牌']){
561
-                    this.formData.brand = result['品牌'];
731
+                if (result['品牌']) {
732
+                    this.formData.dictLabel = result['品牌'];
562 733
                 }
563
-                if(result['来源']){
734
+                if (result['来源']) {
564 735
                     this.formData.desc = result['来源'];
565 736
                 }
566
-                if(result['实价']){
737
+                if (result['实价']) {
567 738
                     this.formData.costPrice = result['实价'];
568 739
                 }
569
-                if(result['型号']){
740
+                if (result['型号']) {
570 741
                     this.formData.model = result['型号'];
571 742
                 }
572
-                if(result['编码']){
743
+                if (result['编码']) {
573 744
                     this.formData.indentifyCode = result['编码'];
574 745
                 }
575
-                if(result['日期']){
746
+                if (result['日期']) {
576 747
                     this.formData.recycleTime = result['日期'];
577 748
                 }
578
-                if(result['备注']){
749
+                if (result['备注']) {
579 750
                     this.formData.productDesc = result['备注'];
580 751
                 }
581
-                if(result['付款方式']){
582
-                    console.log(result['付款方式']);
583
-                    
752
+                if (result['付款方式']) {
584 753
                     this.getPaymentType(result['付款方式'])
585
-                    this.formData.paymentType = result['付款方式'];
754
+                    this.formData.payType = result['付款方式'];
586 755
 
587 756
                 }
588 757
                 // return result;
@@ -590,15 +759,17 @@ export default {
590 759
                 uni.$u.toast("文本识别异常");
591 760
             }
592 761
         },
593
-        clearRecognitionContent(){
762
+        // 清空识别内容
763
+        clearRecognitionContent() {
594 764
             this.recognitionContent = '';
595 765
         },
766
+        // 识别内容 回显付款方式
596 767
         getPaymentType(val) {
597 768
             let arr = []
598
-            this.paymentTabList.filter(item=>{
599
-                if(item.name == val) arr.push(item.value)
769
+            this.paymentTabList.filter(item => {
770
+                if (item.name == val) arr.push(item.value)
600 771
             })
601
-            if(arr.length > 0){
772
+            if (arr.length > 0) {
602 773
                 this.payTypeEcho = arr[0]
603 774
             }
604 775
         }

+ 13 - 1
pages/wareHouse/components/detail.vue

@@ -310,8 +310,20 @@ export default {
310 310
                 })
311 311
                 return
312 312
             }
313
+            const params = {
314
+                id: this.goodsId,
315
+                url: this.imgsUrl[0].url,
316
+                dictLabel: this.coreInfo.dictLabel,
317
+                dictValue: this.coreInfo.dictValue,
318
+                model: this.coreInfo.model,
319
+                totalCost: Number(this.coreInfo.originalCost) + Number(this.coreInfo.additionalCost),
320
+                suggestedPrice: this.coreInfo.suggestedPrice,
321
+                recyclePerson: this.coreInfo.recyclePerson,
322
+                recyclePersonId: this.coreInfo.recyclePersonId,
323
+                warehouseDate: this.coreInfo.warehouseDate,
324
+            }
313 325
             uni.navigateTo({
314
-                url: '/pages/wareHouse/components/openOrder?id=' + this.goodsId
326
+                url: '/pages/wareHouse/components/openOrder?params=' + JSON.stringify(params),
315 327
             });
316 328
         },
317 329
         viewLog() {

+ 96 - 46
pages/wareHouse/components/openOrder.vue

@@ -6,7 +6,7 @@
6 6
             <img :src="openOrderForm.url" alt="">
7 7
             <view class="header_box">
8 8
                <view class="title">
9
-                  {{ openOrderForm.title }} | {{ openOrderForm.desc }}
9
+                  {{ openOrderForm.dictLabel }} | {{ openOrderForm.model }}
10 10
                </view>
11 11
                <view class="header_detail_box">
12 12
                   <view class="total_cost">
@@ -15,7 +15,7 @@
15 15
                   </view>
16 16
                   <view class="advice_price">
17 17
                      <view class="advice_price_title">建议标价</view>
18
-                     <view class="advice_price_price">¥{{ openOrderForm.advicePrice }}</view>
18
+                     <view class="advice_price_price">¥{{ openOrderForm.suggestedPrice }}</view>
19 19
                   </view>
20 20
                </view>
21 21
             </view>
@@ -33,28 +33,32 @@
33 33
             </view>
34 34
             <view class="card_item">
35 35
                <u-form-item label="订单类型">
36
-                  <TabSelect :tabList="tabList" mode="multiple" :colNum="4" :defaultIndex="1"
36
+                  <TabSelect :tabList="tabList" mode="single" :colNum="4" :defaultIndex="1"
37 37
                      @tabChange="changeOrderType">
38 38
                   </tabSelect>
39 39
                </u-form-item>
40 40
             </view>
41 41
             <view class="card_item">
42 42
                <u-form-item label="销售人员与时间" class="sales_person_box_form">
43
-                  <view class="sales_person_box" @click="personShow = true">
43
+                  <view class="sales_person_box" @click="recyclePersonClick">
44 44
                      <u-icon name="man-add" size="36rpx" color="#374151"></u-icon>
45
-                     <view class="text">{{ openOrderForm.salesPerson }}</view>
45
+                     <view class="text">{{ openOrderForm.recyclePerson }}</view>
46
+                     <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员"
47
+                            @selectPerson="handleSelectRecyclePerson"></PersonPicker>
46 48
                   </view>
47 49
                   <view class="sales_person_box" @click="dateShow = true">
48 50
                      <u-icon name="calendar" size="36rpx" color="#374151"></u-icon>
49
-                     <view class="text">{{ openOrderForm.date }}</view>
51
+                     <view class="text">{{ openOrderForm.warehouseDate }}</view>
52
+                     <u-datetime-picker :show="dateShow" v-model="openOrderForm.warehouseDate" mode="date" @confirm="confirmDate"
53
+                        @close="closeDate" @cancel="closeDate"></u-datetime-picker>
50 54
                   </view>
51 55
 
52 56
                </u-form-item>
53 57
             </view>
54 58
             <view class="card_item">
55 59
                <u-form-item label="收款方式">
56
-                  <TabSelect :tabList="paymentTabList" mode="single" :colNum="4" :defaultIndex="1"
57
-                     @tabChange="changePaymentTab">
60
+                  <TabSelect :tabList="payTypeTabList" mode="single" :colNum="4" :defaultIndex="1"
61
+                     @tabChange="changepayTypeTab">
58 62
                   </tabSelect>
59 63
                </u-form-item>
60 64
             </view>
@@ -67,8 +71,11 @@
67 71
             </view>
68 72
             <view class="card_item">
69 73
                <u-form-item label="支付凭证上传">
70
-                  <u-upload :fileList="paymentProof" @afterRead="afterReadPaymentProof" @delete="deletePaymentProof"
71
-                     name="1" multiple :maxCount="10"></u-upload>
74
+                  <ImgsRowScroll v-if="payTypeProofPicFileList.length > 0" :isShowDeleteIcon="true"
75
+                     @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
76
+                     :images="payTypeProofPicFileList" :previewEnabled="true" :imageWidth="150" :imageHeight="150">
77
+                  </ImgsRowScroll>
78
+                  <u-upload @afterRead="afterReadpayTypeProofPic" name="1" multiple :maxCount="10"></u-upload>
72 79
                </u-form-item>
73 80
             </view>
74 81
             <view class="card_item">
@@ -86,43 +93,43 @@
86 93
       <view class="bottom_box">
87 94
          <view class="bottom_box_item">
88 95
             <view class="bottom_box_item_title">实收总计</view>
89
-            <view class="bottom_box_item_price">¥{{ openOrderForm.amountReceived }}</view>
96
+            <view class="bottom_box_item_price">¥{{ openOrderForm.price * openOrderForm.quantity || 0 }}</view>
90 97
          </view>
91
-         <u-button color="#3c9cff" type="primary" @click="submitForm"  icon="checkmark">确认开单</u-button>
98
+         <u-button color="#3c9cff" type="primary" @click="submitForm" icon="checkmark">确认开单</u-button>
92 99
       </view>
93
-      <u-popup :show="personShow" @close="close" @open="open">
94
-         人员选择
95
-      </u-popup>
96
-      <u-datetime-picker :show="dateShow" v-model="openOrderForm.date" mode="date" @confirm="confirmDate"
97
-         @close="closeDate" @cancel="closeDate"></u-datetime-picker>
98 100
    </view>
99 101
 </template>
100 102
 <script>
101 103
 import TabSelect from '@/components/custom-tab-select/index.vue'
104
+import ImgsRowScroll from '@/components/imgs-row-scroll/index.vue'
105
+import PersonPicker from '@/components/person-picker/index.vue'
102 106
 export default {
103 107
    components: {
104 108
       TabSelect,
109
+      ImgsRowScroll,
110
+      PersonPicker,
105 111
    },
106 112
    data() {
107 113
       return {
114
+         payTypeProofPicFileList: [],
108 115
          openOrderForm: {
109
-            url: require('../imgs/1.jpg'),
110
-            title: 'ROLEX',
111
-            desc: 'SUBMSRINER DATE 126610LN',
112
-            totalCost: '82500',
113
-            advicePrice: '890000',
114
-            price: null,
115
-            quantity: 1,
116
-            salesPerson: 'IT秦',
117
-            orderType: [],
118
-            date: '2026-1-1',
119
-            paymentTab: 1,
120
-            afterSaleTab: [],
121
-            remark: '',
122
-            address: '',
123
-            amountReceived: 89000,
116
+            // url: '',
117
+            // dictLabel: '',
118
+            // dictValue: '',
119
+            // model: '',
120
+            // totalCost: '',
121
+            // suggestedPrice: '',
122
+            // price: null,
123
+            // quantity: 1,
124
+            // recyclePerson: '',
125
+            // recyclePersonId: '',
126
+            // orderType: [],
127
+            // warehouseDate: '',
128
+            // payTypeTab: 1,
129
+            // afterSaleTab: [],
130
+            // remark: '',
131
+            // address: '',
124 132
          },
125
-         paymentProof: [],
126 133
          tabList: [
127 134
             {
128 135
                name: '零售',
@@ -145,7 +152,7 @@ export default {
145 152
                value: 5,
146 153
             },
147 154
          ],
148
-         paymentTabList: [
155
+         payTypeTabList: [
149 156
             {
150 157
                name: '微信',
151 158
                value: 1,
@@ -198,43 +205,86 @@ export default {
198 205
                { required: true, message: '请输入成交金额', trigger: ['blur'] },
199 206
             ],
200 207
          },
201
-         personShow: false,
202 208
          dateShow: false,
203 209
       }
204 210
    },
211
+   onLoad() {
212
+      const params = this.$route.query.params
213
+      if (params) {
214
+         this.openOrderForm = JSON.parse(params)
215
+         this.openOrderForm.quantity = 1
216
+         // Object.keys(params).forEach(key => {
217
+         //    this.openOrderForm[key] = params[key]
218
+         // })
219
+      }
220
+   },
205 221
    methods: {
206 222
       changeOrderType(val) {
207 223
          this.openOrderForm.orderType = val
208 224
       },
209
-      changePaymentTab(val) {
210
-         this.openOrderForm.paymentTab = val
225
+      changepayTypeTab(val) {
226
+         this.openOrderForm.payTypeTab = val
211 227
       },
212 228
       changeAfterSaleTab(val) {
213 229
          this.openOrderForm.afterSaleTab = val
214 230
       },
231
+      // 打开回收人选择器
232
+      recyclePersonClick() {
233
+         this.$refs.recyclePersonPickerRef.open();
234
+      },
235
+      handleSelectRecyclePerson(person) {
236
+         this.openOrderForm.recyclePerson = person.label
237
+         this.openOrderForm.recyclePersonId = person.id
238
+      },
215 239
       handleClickOutside() {
216 240
          this.personShow = false
217 241
       },
218 242
       confirmDate(val) {
219
-         this.openOrderForm.date = this.$dayjs(val.value).format('YYYY-MM-DD');
220
-         console.log(this.openOrderForm.date);
221
-
243
+         this.$nextTick(() => {
244
+            this.openOrderForm.warehouseDate = this.$dayjs(val.value).format('YYYY-MM-DD');
245
+         })
222 246
          this.dateShow = false
223 247
       },
224 248
       closeDate() {
225 249
          this.dateShow = false
226 250
       },
227
-      afterReadPaymentProof(file) {
228
-         // this.paymentProof.push(file)
229
-      },
230
-      deletePaymentProof(index) {
231
-         // this.paymentProof.splice(index, 1)
251
+      getDeleteGoodPicInfo(info) {
252
+         this.payTypeProofPicFileList = info.newImages
232 253
       },
254
+       async afterReadpayTypeProofPic(event) {
255
+            event.file.forEach(item => {
256
+                uni.$u.api.uploadFile(item.url).then((res) => {
257
+                    this.payTypeProofPicFileList.push(res.data.url);
258
+                    uni.$u.toast("文件上传成功");
259
+                }).catch(() => {
260
+                    uni.$u.toast("上传文件失败");
261
+                })
262
+            })
263
+        },
233 264
       submitForm() {
234 265
          this.$refs.openOrderForm.validate().then(res => {
235 266
             if (res) {
267
+               const data = {
268
+                  ...this.openOrderForm,
269
+                  payTypeProofPicFileList: this.payTypeProofPicFileList,
270
+                  amountReceived: Number(this.openOrderForm.price) * Number(this.openOrderForm.quantity),
271
+               }
272
+               uni.$u.api.wareHouseOpenOrder(data).then(res => {
273
+                  if (res.code === 200) {
274
+                     uni.$u.toast("开单成功");
275
+                     setTimeout(() => {
276
+                        uni.navigateBack({
277
+                              delta: 2
278
+                        });
279
+                     }, 1000);
280
+                  } else {
281
+                     uni.$u.toast(res.msg);
282
+                  }
283
+               }).catch(() => {
284
+                  uni.$u.toast("开单失败");
285
+               })
236 286
                console.log('提交成功', this.openOrderForm);
237
-               
287
+
238 288
             }
239 289
          })
240 290
       },

+ 4 - 4
pages/wareHouse/components/searchFilter.vue

@@ -20,11 +20,11 @@
20 20
             </u-form-item>
21 21
             <u-form-item label="回收人员" labelWidth="70" @click="recyclePersonClick">
22 22
                 <FormSelectToPage :val="formData.recyclePerson" :isDelete="true" borderType="bottom" @handleClear="clear('recyclePerson')"></FormSelectToPage>
23
-                <personPicker ref="recyclePersonPickerRef" title="请选择回收人员" @selectPerson="handleSelectRecyclePerson"></personPicker>
23
+                <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员" @selectPerson="handleSelectRecyclePerson"></PersonPicker>
24 24
             </u-form-item>
25 25
             <u-form-item label="鉴定人员" labelWidth="70" @click="identifyingPersonClick">
26 26
                 <FormSelectToPage :val="formData.identifyingPerson" :isDelete="true" borderType="bottom" @handleClear="clear('identifyingPerson')"></FormSelectToPage>
27
-                <personPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员" @selectPerson="handleSelectIdentifyingPerson"></personPicker>
27
+                <PersonPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员" @selectPerson="handleSelectIdentifyingPerson"></PersonPicker>
28 28
             </u-form-item>
29 29
             <u-form-item label="商品属性" labelWidth="70">
30 30
                 <TabSelect :tabList="productAttributeList" :colNum="3" :echoInfo="formData.productAttribute" mode="multiple" @tabChange="handleTabChangeProductAttribute"></TabSelect>
@@ -40,13 +40,13 @@
40 40
 <script>
41 41
 import FormSelectToPage from '@/components/form-select-to-page/index.vue'
42 42
 import BrandList from '@/components/brand-list/index.vue'
43
-import personPicker from '@/components/person-picker/index.vue'
43
+import PersonPicker from '@/components/person-picker/index.vue'
44 44
 import TabSelect from '@/components/custom-tab-select/index.vue'
45 45
 export default {
46 46
     components: {
47 47
         FormSelectToPage,
48 48
         BrandList,
49
-        personPicker,
49
+        PersonPicker,
50 50
         TabSelect,
51 51
     },
52 52
     name: 'searchFilter',

+ 16 - 5
pages/wareHouse/index.vue

@@ -27,7 +27,7 @@
27 27
 					<text class="card-value">{{ wareHouseCard.totalNum }}</text>
28 28
 				</view>
29 29
 			</view>
30
-
30
+			<!-- <u-upload @afterRead="uploadTestAfter" name="1" multiple :maxCount="10"></u-upload> -->
31 31
 			<view class="search-wrapper">
32 32
 				<u-search placeholder="搜索编号、名称、品牌..." v-model="searchString" bg-color="#f9fafb" border-radius="4rpx"
33 33
 					:show-action="false" class="search-input-wrap" showAction @clear="handleSearch" @custom="handleSearch"></u-search>
@@ -62,8 +62,7 @@
62 62
 				<view @click="handleToDetail(goods)" class="goods-item" v-for="(goods, goodsIndex) in goodsList" :key="`goods-${goodsIndex}`">
63 63
 					<view class="goods-img-container">
64 64
 						<image class="goods-img" :src="goods.imgUrl" mode="aspectFill" lazy-load></image>
65
-						<view class="stock-indicator"
66
-							v-if="goods.stock > 0"></view>
65
+						<view :class="['stock-indicator', goods.downStatus == '1' ? 'up-indicator' : 'down-indicator']"></view>
67 66
 					</view>
68 67
 
69 68
 					<view class="goods-info">
@@ -128,6 +127,7 @@ export default {
128 127
 	data() {
129 128
 		return {
130 129
 			searchString:'',//搜索编号、名称、品牌...
130
+			category:1,
131 131
 			searchInfo:{},
132 132
 			pageNum:1,
133 133
 			pageSize:10,
@@ -202,6 +202,16 @@ export default {
202 202
 		};
203 203
 	},
204 204
 	methods: {
205
+		uploadTestAfter(info){
206
+			console.log(info);
207
+			info.file.forEach(item=>{
208
+				uni.$u.api.uploadFile(item.url).then((res) => {
209
+					uni.$u.toast("文件上传成功");
210
+				}).catch(() => {
211
+					uni.$u.toast("上传文件失败");
212
+				})
213
+			})
214
+		},
205 215
 		getList(){
206 216
 			uni.$u.api.wareHouseList({
207 217
 				pageNum: this.pageNum,
@@ -210,7 +220,8 @@ export default {
210 220
 			{
211 221
 				searchString:this.searchString,
212 222
 				sortType:this.curSortType.id,
213
-				...this.searchInfo,
223
+				category:this.category,
224
+				...this.searchInfo
214 225
 			}).then(res => {
215 226
 				if(this.pageNum == 1){
216 227
 					this.goodsList = res.rows;
@@ -237,7 +248,7 @@ export default {
237 248
 			this.getList();
238 249
 		},
239 250
 		switchTab(item) {
240
-			this.searchInfo.category = item.id;
251
+			this.category = item.id;
241 252
 			this.handleSearch();
242 253
 		},
243 254
 		handleToDetail(item) {

+ 7 - 1
pages/wareHouse/styles/add.scss

@@ -12,8 +12,14 @@
12 12
             display: flex;
13 13
             gap: 20rpx;
14 14
         }
15
+        ::v-deep .detail_pic_container{
16
+            display: flex;
17
+            flex-direction: column;
18
+            .tip{
19
+                font-size:24rpx;
20
+            }
21
+        }
15 22
     }
16
-
17 23
 }
18 24
 
19 25
 .btn_group {

+ 6 - 1
pages/wareHouse/styles/index.scss

@@ -270,9 +270,14 @@
270 270
       width: 20rpx;
271 271
       height: 20rpx;
272 272
       border-radius: 50%;
273
-      background-color: #09bb07;
274 273
       border: 2rpx solid #ffffff;
275 274
     }
275
+    .up-indicator{
276
+      background-color: #09bb07;
277
+    }
278
+    .down-indicator{
279
+      background-color: #c7d5c7;
280
+    }
276 281
     .goods-info {
277 282
       flex: 1;
278 283
       .goods-brand {

+ 1 - 1
pages/wareHouse/styles/openOrder.scss

@@ -1,6 +1,6 @@
1 1
 .open_order {
2
+    padding-bottom: 142rpx;
2 3
     .open_order_content {
3
-        margin-bottom:150rpx;
4 4
         .header {
5 5
             display: flex;
6 6
             justify-content: flex-start;

+ 3 - 1
utils/api.js

@@ -130,7 +130,9 @@ const install = (Vue, vm) => {
130 130
 		wareHouseLog:(params)=>http.get(mockApi+'/warehouse/wareHouseLog',{ params }),//仓库中心-获取仓库操作日志
131 131
 		wareHouseUpdate:(data)=>http.post(mockApi+'/warehouse/wareHouseUpdate',data),//仓库中心-编辑商品库存
132 132
 		wareHouseLock:(data)=>http.post(mockApi+'/warehouse/wareHouseLock',data),//仓库中心-锁单
133
-		wareHouseDown:(data)=>http.post(mockApi+'/warehouse/wareHouseDown',data),//仓库中心-下架
133
+		wareHouseDown:(data)=>http.post(mockApi+'/warehouse/wareHouseDown',data),//仓库中心-下架商品
134
+		wareHouseAdd:(data)=>http.post(mockApi+'/warehouse/wareHouseAdd',data),//仓库中心-新增商品
135
+		wareHouseOpenOrder:(data)=>http.post(mockApi+'/warehouse/wareHouseOpenOrder',data),//仓库中心-开单
134 136
 
135 137
 
136 138