Преглед на файлове

专题装修导航店铺添加

ytf преди 2 години
родител
ревизия
a9d17497d3

+ 24 - 1
admin/src/components/MDiyItemEdit/index.js

@@ -366,6 +366,17 @@ export default class MDiyItem extends Component {
366 366
         <Input maxLength={250} style={{ width: 300 }} value={data.info.name} disabled={true}/>
367 367
       </FormItem>
368 368
       </div>;
369
+    } else if (data.url_type == 'storeinfo') {
370
+      render_con = <div className={`${styles.sub_part}`} style={{ borderBottomWidth: 0 }}>
371
+        <div className={`${styles.subtitle}`}>店铺名称</div>
372
+        <FormItem
373
+        key={`link_storeinfo_${index}`}
374
+        {...formItemLayoutModal}
375
+        label={''}
376
+      >
377
+        <Input maxLength={250} style={{ width: 300 }} value={data.info.storeName} disabled={true}/>
378
+      </FormItem>
379
+      </div>;
369 380
     } else if (data.url_type == 'svideo') {
370 381
       render_con = <div className={`${styles.sub_part}`} style={{ borderBottomWidth: 0 }}>
371 382
         <div className={`${styles.subtitle}`}>短视频名称</div>
@@ -418,6 +429,9 @@ export default class MDiyItem extends Component {
418 429
     } else if (data.url_type == 'live') {
419 430
       render_con = <Input key={`${select_data.type}_${select_data.id}_live${index}`} className={styles.more_link_input}
420 431
                           value={data.info.name} disabled={true}/>;
432
+    } else if (data.url_type == 'storeinfo') {
433
+      render_con = <Input key={`${select_data.type}_${select_data.id}_storeinfo${index}`} className={styles.more_link_input}
434
+                          value={data.info.storeName} disabled={true}/>;
421 435
     } else if (data.url_type == 'svideo') {
422 436
       render_con = <Input key={`${select_data.type}_${select_data.id}_svideo${index}`} className={styles.more_link_input}
423 437
                           value={data.info.videoName} disabled={true}/>;
@@ -485,7 +499,12 @@ export default class MDiyItem extends Component {
485 499
       data.url = '';//直播id
486 500
       data.url_type = 'live';//直播类型
487 501
       data.info = '';//用于存放额外信息
488
-    }  else if (val == 'svideo') {
502
+    } else if (val == 'storeinfo') {
503
+      //店铺详情
504
+      data.url = '';//店铺id
505
+      data.url_type = 'storeinfo';//店铺类型
506
+      data.info = '';//用于存放额外信息
507
+    } else if (val == 'svideo') {
489 508
       //短视频
490 509
       data.url = '';//短视频id
491 510
       data.url_type = 'svideo';//短视频类型
@@ -539,6 +558,10 @@ export default class MDiyItem extends Component {
539 558
       // data.url = val.liveId;
540 559
       data.url = val.roomId;
541 560
       data.info = val;
561
+    } else if (data.url_type == 'storeinfo') {
562
+      // data.url = val.liveId;
563
+      data.url = val.storeId;
564
+      data.info = val;
542 565
     } else if (data.url_type == 'svideo') {
543 566
       data.url = val.videoId;
544 567
       data.info = val;

+ 39 - 2
admin/src/components/SldSelGoodsSingleDiy/index.js

@@ -157,6 +157,21 @@ export default class SldSelGoodsSingleDiy extends Component {
157 157
     }, 
158 158
   ];
159 159
 
160
+  storeinfo_columns = [
161
+    {
162
+      title: ' ',
163
+      dataIndex: 'storeId',
164
+      align: 'center',
165
+      width: 30,
166
+      render: (text, record, index) => getTableNum(this.state.params, pageSize, index),
167
+    }, {
168
+      title: `店铺名称`,//店铺名称
169
+      align: 'center',
170
+      dataIndex: 'storeName',
171
+      width: 300,
172
+    },  
173
+  ];
174
+
160 175
   cat_columns = [
161 176
     {
162 177
       title: `${sldComLanguage('分类名称')}`,//分类名称
@@ -258,7 +273,8 @@ export default class SldSelGoodsSingleDiy extends Component {
258 273
 
259 274
   componentWillReceiveProps(nextProps, nextContext) {
260 275
     let { columns, modaltitle, search_data, sldpagination } = this.state;
261
-    if (nextProps.link_type == 'goods' || nextProps.link_type == 'live' || nextProps.link_type == 'category' || nextProps.link_type == 'topic' || nextProps.link_type == 'seckill' || nextProps.link_type == 'voucher') {
276
+    if (nextProps.link_type == 'goods' || nextProps.link_type == 'live' || nextProps.link_type == 'storeinfo' || nextProps.link_type == 'category' 
277
+        || nextProps.link_type == 'topic' || nextProps.link_type == 'seckill' || nextProps.link_type == 'voucher') {
262 278
       if (nextProps.link_type == 'goods') {
263 279
         columns = this.goods_columns;
264 280
         modaltitle = `${sldComLanguage('选择商品')}`;//选择商品
@@ -281,6 +297,17 @@ export default class SldSelGoodsSingleDiy extends Component {
281 297
         }];//筛选器
282 298
         sldpagination = true;
283 299
         this.rowKey = 'roomId';
300
+      }  else if (nextProps.link_type == 'storeinfo') {
301
+        columns = this.storeinfo_columns;
302
+        modaltitle = `选择店铺`;//选择店铺
303
+        search_data = [{
304
+          type: 'input',
305
+          label: `店铺名称`,//店铺名称
306
+          name: 'storeName',
307
+          placeholder: `请输入店铺名称`,//请输入店铺名称
308
+        }];//筛选器
309
+        sldpagination = true;
310
+        this.rowKey = 'storeId';
284 311
       }  else if (nextProps.link_type == 'category') {
285 312
         columns = this.cat_columns;
286 313
         modaltitle = `${sldComLanguage('选择分类')}`;//选择分类
@@ -390,6 +417,9 @@ export default class SldSelGoodsSingleDiy extends Component {
390 417
     } else if (link_type == 'live') {
391 418
       //获取直播数据
392 419
       dis_type = 'project/get_live_lists';
420
+    } else if (link_type == 'storeinfo') {
421
+      //获取直播数据
422
+      dis_type = 'project/get_storeinfo_lists';
393 423
     } else if (link_type == 'category') {
394 424
       //获取分类数据
395 425
       dis_type = 'project/get_cate_list_by_id';
@@ -415,13 +445,16 @@ export default class SldSelGoodsSingleDiy extends Component {
415 445
       dis_type = 'project/get_seckill_list';
416 446
       new_params = params;
417 447
     }
448
+    console.log(dis_type+new_params);
418 449
     dispatch({
419 450
       type: dis_type,
420 451
       payload: new_params,
421 452
       callback: (res) => {
422 453
         this.setState({ loading: false });
423 454
         if (res.state == 200) {
424
-          if (link_type == 'goods' || link_type == 'live' || link_type == 'topic' || link_type == 'seckill' || link_type == 'voucher') {
455
+          console.log(res);
456
+          if (link_type == 'goods' || link_type == 'live' || link_type == 'storeinfo' || link_type == 'topic' 
457
+                || link_type == 'seckill' || link_type == 'voucher') {
425 458
             data = res.data;
426 459
           } else if (link_type == 'category') {
427 460
             //id为0直接赋值
@@ -551,6 +584,10 @@ export default class SldSelGoodsSingleDiy extends Component {
551 584
       modalTableSeleData.roomId = record.roomId;
552 585
       modalTableSeleData.name = record.name;
553 586
       modalTableSeleData.anchorName = record.anchorName;
587
+    } else if (link_type == 'storeinfo') {
588
+      modalTableSeleData.storeId = record.storeId;
589
+      modalTableSeleData.storeName = record.storeName;
590
+      modalTableSeleData.anchorName = record.anchorName;
554 591
     } else if (link_type == 'topic') {
555 592
       if (this.props.client == 'mobile') {
556 593
         modalTableSeleData.decoId = record.decoId;

+ 5 - 0
admin/src/models/project.js

@@ -36,6 +36,11 @@ export default {
36 36
       const response = yield call(sldCommonService, payload, 'get', 'v3/live/admin/broad/list');
37 37
       if (callback) callback(response);
38 38
     },
39
+    //slodon_获取店铺列表
40
+    * get_storeinfo_lists({ payload, callback }, { call }) {
41
+      const response = yield call(sldCommonService, payload, 'get', 'v3/seller/admin/store/listinfo');
42
+      if (callback) callback(response);
43
+    },
39 44
     //slodon_获取移动端装修列表
40 45
     * get_diy_page_lists({ payload, callback }, { call }) {
41 46
       const response = yield call(sldCommonService, payload, 'get', 'v3/system/admin/mobileDeco/list');

+ 1 - 1
admin/src/pages/manage/goods/add_goods.js

@@ -14,7 +14,7 @@ import {
14 14
   isEqualArray,
15 15
   sldCommonTitleByBg,
16 16
 } from '@/utils/utils';
17
-import global from './global.less';
17
+import global from './globals.less';
18 18
 // import { apiUrl,uploadLimit } from '@/utils/sldconfig.js';
19 19
 import { uploadLimit } from '@/utils/sldconfig.js';
20 20
 import SldReactQuill from '@/components/SldReactQuill';

admin/src/pages/manage/goods/global.less → admin/src/pages/manage/goods/globals.less


+ 0 - 83
admin/src/pages/manage/goods/product.less

@@ -1,83 +0,0 @@
1
-.right_nav {
2
-  position: fixed;
3
-  top: 20vh;
4
-  right: 10px;
5
-  width:120px;
6
-  background:rgba(255,255,255,1);
7
-  box-shadow:0 0 15px 0 rgba(153,153,153,0.15);
8
-  .nav_title{
9
-    height:38px;
10
-    line-height: 38px;
11
-    width: 100%;
12
-    display: inline-block;
13
-    background:rgba(236,245,255,1);
14
-    text-align:center;
15
-    color: #08A9B7;
16
-    font-size: 14px;
17
-    font-weight: 700;
18
-  }
19
-  .nav_item{
20
-    color: #999;
21
-    font-size: 12px;
22
-    font-weight: 700;
23
-    padding: 9px 35px 9px 26px;
24
-    width:111px;
25
-    height:30px;
26
-    line-height: 12px;
27
-    background:#fff;
28
-    border-radius:15px 0 0 15px;
29
-    display: block;
30
-    margin: 10px 0 10px 9px;
31
-  }
32
-  .nav_item:hover,.nav_item.nav_sel{
33
-    color: #333;
34
-    background:rgba(65,157,253,.1);
35
-  }
36
-}
37
-
38
-.goods_detail_body{
39
-  border: 1px solid #F2F2F2;
40
-  padding: 15px;
41
-}
42
-
43
-.goods_info{
44
-  .goods_detail{
45
-    height: 80px;
46
-    margin-left: 10px;
47
-    flex: 1;
48
-  }
49
-  .goods_img{
50
-    width:80px;
51
-    height:80px;
52
-    background:rgba(248,248,248,1);
53
-    border:1px solid rgba(226,229,246,1);
54
-    border-radius:3px;
55
-    overflow: hidden;
56
-    display: inline-block;
57
-  }
58
-  .goods_name{
59
-    overflow: hidden;
60
-    text-overflow: ellipsis;
61
-    display: -webkit-box;
62
-    -webkit-line-clamp: 2;
63
-    /*! autoprefixer: off */
64
-    -webkit-box-orient: vertical;
65
-    word-break: break-word;
66
-    color:#333;
67
-    font-size: 14px;
68
-    line-height: 17px;
69
-    text-align: left;
70
-    height: 34px;
71
-    flex-shrink: 0;
72
-  }
73
-  .goods_brief{
74
-    color: #666;
75
-    font-size: 12px;
76
-    overflow: hidden;
77
-    text-overflow: ellipsis;
78
-    white-space: nowrap;
79
-    text-align: left;
80
-    width: 100%;
81
-    display: inline-block;
82
-  }
83
-}

+ 1 - 1
admin/src/pages/manage/goods/sel_goods_cat.js

@@ -7,7 +7,7 @@ import {
7 7
 	getSldEmptyH,sldFullHeight,
8 8
 	sldComLanguage,
9 9
 } from '@/utils/utils';
10
-import global from './global.less';
10
+import global from './globals.less';
11 11
 import { Scrollbars } from 'react-custom-scrollbars';
12 12
 
13 13
 let sthis = '';

+ 4 - 4
admin/src/pages/manage/product/goods_check_lists.js

@@ -146,7 +146,7 @@ export default class GoodsCheckLists extends Component {
146 146
           title: `${sldComLanguage('实际/虚拟销量')}`,
147 147
           dataIndex: 'actualSales',
148 148
           align: 'center',
149
-          width: 150,
149
+          width: 140,
150 150
           render: (text, record) => {
151 151
             return <div>{record.actualSales}/{record.virtualSales}</div>
152 152
           },
@@ -155,7 +155,7 @@ export default class GoodsCheckLists extends Component {
155 155
           title: `${sldComLanguage('状态')}`,
156 156
           dataIndex: 'stateValue',
157 157
           align: 'center',
158
-          width: 100,
158
+          width: 90,
159 159
         },
160 160
         {
161 161
           title: `${sldComLanguage('拒绝理由')}`,//拒绝理由
@@ -170,12 +170,12 @@ export default class GoodsCheckLists extends Component {
170 170
           title: `${sldComLanguage('发布时间')}`,//发布时间
171 171
           dataIndex: 'createTime',
172 172
           align: 'center',
173
-          width: 130,
173
+          width: 120,
174 174
         },
175 175
         {
176 176
           title: `${sldComLanguage('操作')}`,//操作
177 177
           align: 'center',
178
-          width: 120,
178
+          width: 150,
179 179
           render: (text, record) => {
180 180
             return (record.state == 20||record.state == 21)?<Fragment>
181 181
               {sldPopConfirmDiy('leftBottom', `${sldComLanguage('确认审核通过该商品吗?')}`, () => this.operateGoods({goodsIds:record.goodsId,state:1}), `${sldComLanguage('确定')}`, `${sldComLanguage('取消')}`,

+ 1 - 0
admin/src/utils/util_data.js

@@ -727,6 +727,7 @@ export function m_diy_link_type() {
727 727
     { key: 'point', name: `${sldComLanguage('积分商城')}` },
728 728
     { key: 'svideo_center', name: `${sldComLanguage('短视频中心')}` },
729 729
     { key: 'live', name: `${sldComLanguage('直播中心')}` },
730
+    { key: 'storeinfo', name: `${sldComLanguage('店铺')}` },
730 731
     { key: 'sign_center', name: `${sldComLanguage('签到中心')}` },
731 732
   ];
732 733
 }