ソースを参照

Merge remote-tracking branch 'origin/master'

family 1 年間 前
コミット
8374f0e914

+ 6 - 0
src/api/product.js

@@ -19,6 +19,12 @@ import request from './request'
19 19
   return request.post('store/product/edit_price/'+id,data)
20 20
 }
21 21
 /**
22
+ * @description 供应链商品 -- 删除
23
+ */
24
+export function Posteditdelete(id) {
25
+  return request.post('store/product/delete_xp/'+id)
26
+}
27
+/**
22 28
  * @description 供应链商品 -- 上下架
23 29
  */
24 30
  export function postchangeshow(data) {

+ 2 - 2
src/api/setting.js

@@ -111,8 +111,8 @@ export function storeUpdateApi(data) {
111 111
  * @description 获取商户分润比例
112 112
  * @param {Object} param params {Object} 传值参数
113 113
  */
114
-export function getMerchantProfitApi() {
115
-  return request.get(`getConfig/shop_bonus_setting`)
114
+export function getMerchantProfitApi() {  
115
+  return request.get(`getConfig/base_commission`)
116 116
 }
117 117
 
118 118
 /**

+ 1 - 1
src/router/modules/selection.js

@@ -6,7 +6,7 @@ const selectionRouter =
6 6
   name: 'selection',
7 7
   meta: {
8 8
     icon: 'dashboard',
9
-    title: '一壶茶供应链'
9
+    title: '幸福保供应链'
10 10
   },
11 11
   alwaysShow: true,
12 12
   component: Layout,

+ 1 - 1
src/settings.js

@@ -3,7 +3,7 @@ module.exports = {
3 3
   roterPre: '/merchant',
4 4
   // roterPre: '',
5 5
   // 路由标题
6
-  title: '一壶茶',
6
+  title: '幸福保',
7 7
   /**
8 8
    * @type {boolean} true | false
9 9
    * @description Whether show the settings right-panel

+ 1 - 1
src/views/login/index.vue

@@ -210,7 +210,7 @@ export default {
210 210
   methods: {
211 211
     getInfo() {
212 212
       loginConfigApi().then(({ data }) => {
213
-        data.login_banner[0].pic = 'https://cdn.bjtdba.com/vod/image/2024-04-13/20240413005952459.jpg'
213
+        data.login_banner[0].pic = 'https://cdn.bjtdba.com/vod/image/2025-02-02/20250202135218800.jpg'
214 214
         this.swiperList = data.login_banner
215 215
         this.loginLogo = data.login_logo
216 216
         

+ 151 - 116
src/views/product/addProduct/index.vue

@@ -186,23 +186,23 @@
186 186
             </el-form-item> -->
187 187
             <!-- 编辑进来的 -->
188 188
             <div v-if="formValidate.volunteer == false && merInfo.mer_id != 496">
189
-              <el-form-item label="商品类型:">
189
+              <!-- <el-form-item label="商品类型:"> -->
190 190
                 <!-- sadasdasd -->
191
-                <el-radio-group v-model="radio" @change="Typeshang">
192
-                  <el-radio label="1">普通商品</el-radio>
191
+                <!-- <el-radio-group v-model="radio" @change="Typeshang">
192
+                  <el-radio label="1">普通商品</el-radio> -->
193 193
                   <!-- <el-radio :label="2">事业一部</el-radio> -->
194 194
                   <!-- <el-radio :label="5" v-if="this.merchant_type == 3">大仓商品</el-radio> -->
195
-                  <el-radio v-if="specialMerchant == 'beishengtang'" label="7">积分商品</el-radio>
195
+                  <!-- <el-radio v-if="specialMerchant == 'beishengtang'" label="7">积分商品</el-radio> -->
196 196
 
197
-                  <el-radio v-if="merInfo.mer_type == '1'" label="8">会员商品</el-radio>
197
+                  <!-- <el-radio v-if="merInfo.mer_type == '1'" label="8">会员商品</el-radio>
198 198
                   <el-radio v-if="merInfo.mer_type == '1'" label="10">高级会员商品</el-radio>
199 199
                   <el-radio v-if="merInfo.mer_type == '1'" label="14">合伙人商品</el-radio>
200 200
                   <el-radio v-if="merInfo.mer_type == '1'" label="15">股权商品</el-radio>
201 201
                   <el-radio v-if="merInfo.mer_type == '1'" label="16">合伙人+股权商品</el-radio>
202
-                  <el-radio v-if="merInfo.mer_type == '2'" label="17">合伙人商品</el-radio>
202
+                  <el-radio v-if="merInfo.mer_type == '2'" label="17">合伙人商品</el-radio> -->
203 203
                   <!-- <el-radio :label="3">消费积分商品</el-radio> -->
204
-                </el-radio-group>
205
-              </el-form-item>
204
+                <!-- </el-radio-group>
205
+              </el-form-item> -->
206 206
 
207 207
               <!-- <el-form-item label="佣金:" prop="commission1" v-show="type == 2">
208 208
                 <div style="display: flex;">
@@ -239,7 +239,7 @@
239 239
               </el-radio-group>
240 240
             </el-form-item>
241 241
 
242
-            <el-form-item v-if="extensionStatus>0 && merInfo.mer_id != 496" label="佣金设置:" props="extension_type">
242
+            <el-form-item v-if="extensionStatus>0 && merInfo.mer_id != 496" label="分润设置:" props="extension_type">
243 243
               <el-radio-group v-model="formValidate.extension_type" @change="onChangetype(formValidate.extension_type)">
244 244
                 <el-radio label="1" class="radio">单独设置</el-radio>
245 245
                 <el-radio label="0" :disabled="formValidate.volunteer == 1?true:false">默认设置</el-radio>
@@ -324,7 +324,7 @@
324 324
           </el-col>
325 325
           <!-- 批量设置-->
326 326
           <el-col v-if="formValidate.spec_type == 1 && formValidate.attr.length>0" :span="24" class="noForm">
327
-            <el-form-item label="批量设置:" class="labeltop">
327
+            <!-- <el-form-item label="批量设置:" class="labeltop">
328 328
               <el-table :data="oneFormBatch" border class="tabNumWidth" size="mini">
329 329
                 <el-table-column align="center" label="图片" min-width="80">
330 330
                   <template slot-scope="scope">
@@ -336,19 +336,6 @@
336 336
                     </div>
337 337
                   </template>
338 338
                 </el-table-column>
339
-                <!-- 多规格大仓价格 -->
340
-                <!-- <template v-if="this.type == 5">
341
-                  <el-table-column align="center" label="大仓价格" min-width="120">
342
-                    <template slot-scope="scope">
343
-                      <el-input v-model="scope.row.dacang_price" type="number" :min="0" class="priceBox" />
344
-                    </template>
345
-                  </el-table-column>
346
-                </template> -->
347
-                <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
348
-                  <template slot-scope="scope">
349
-                    <el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
350
-                  </template>
351
-                </el-table-column>
352 339
 
353 340
                 <template v-if="merInfo.mer_id == 496">
354 341
                   <template v-if="formValidate.share_is == 1">
@@ -386,28 +373,46 @@
386 373
                 </template>
387 374
                 <template v-else>
388 375
                   <template v-if="formValidate.extension_type == 1">
389
-                    <el-table-column align="center" label="返佣(%)" min-width="120">
376
+                    <el-table-column align="center" label="分润比例(%)" min-width="120">
390 377
                       <template slot-scope="scope">
391 378
                         <el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
392 379
                       </template>
393
-                    </el-table-column>
380
+                    </el-table-column> -->
394 381
                     <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
395 382
                           <template slot-scope="scope">
396 383
                             <el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
397 384
                           </template>
398 385
                         </el-table-column> -->
386
+                  <!-- </template>
387
+                </template> -->
388
+
389
+                <!-- 多规格大仓价格 -->
390
+                <!-- <template v-if="this.type == 5">
391
+                  <el-table-column align="center" label="大仓价格" min-width="120">
392
+                    <template slot-scope="scope">
393
+                      <el-input v-model="scope.row.dacang_price" type="number" :min="0" class="priceBox" />
394
+                    </template>
395
+                  </el-table-column>
396
+                </template> -->
397
+                <!-- <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
398
+                  <template slot-scope="scope">
399
+                    <el-input  @input="handleInput(scope.row,scope.formThead[iii].title)" :disabled="formThead[iii].title==='销售价格'?'text':disabled" v-model="scope.row[iii]"  :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
399 400
                   </template>
400
-                </template>
401
+                </el-table-column> -->
401 402
 
403
+           
404
+<!-- 
402 405
                 <el-table-column align="center" label="操作" min-width="80">
403 406
                   <template>
404 407
                     <el-button type="text" class="submission" @click="batchAdd">批量添加</el-button>
405 408
                   </template>
406 409
                 </el-table-column>
407 410
               </el-table>
408
-            </el-form-item>
411
+            </el-form-item> -->
409 412
           </el-col>
410 413
           <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
414
+
415
+
411 416
             <!-- 单规格表格-->
412 417
             <el-form-item v-if="formValidate.spec_type == 0">
413 418
               <el-table :data="OneattrValue" border class="tabNumWidth" size="mini">
@@ -430,22 +435,6 @@
430 435
                   </el-table-column>
431 436
                 </template> -->
432 437
 
433
-                <template v-if="this.Spu_id==null||this.Spu_id==''||this.Spu_id==undefined">
434
-                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
435
-                    <template slot-scope="scope">
436
-                      <el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
437
-                    </template>
438
-                  </el-table-column>
439
-                </template>
440
-
441
-                <template v-else>
442
-                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
443
-                    <template slot-scope="scope">
444
-                      <el-input v-model="scope.row[iii]" :disabled="formThead[iii].title==='成本价'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
445
-                    </template>
446
-                  </el-table-column>
447
-                </template>
448
-
449 438
                 <template v-if="merInfo.mer_id == 496">
450 439
                   <template v-if="formValidate.share_is == 1">
451 440
                     <el-table-column align="center" label="分享奖(%)" min-width="120">
@@ -479,27 +468,45 @@
479 468
 
480 469
                 </template>
481 470
                 <template v-else>
482
-
483 471
                   <template v-if="formValidate.extension_type == 1">
484
-                    <el-table-column align="center" label="返利比例" min-width="120">
485
-                      <template slot-scope="scope">
486
-                        <el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
487
-                      </template>
488
-                    </el-table-column>
489
-                    <!-- <el-table-column align="center" label="大仓价格" min-width="120">
490
-                      <template slot-scope="scope">
491
-                        <el-input v-model="scope.row.dacang_price" type="number" :min="0" class="priceBox" />
492
-                      </template>
493
-                    </el-table-column> -->
494
-                    <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
495
-                      <template slot-scope="scope">
496
-                        <el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
497
-                      </template>
498
-                    </el-table-column> -->
472
+                  <el-table-column align="center" label="分润比例" min-width="125">
473
+                    <template slot-scope="scope">
474
+                      <div style="display: flex;">
475
+                        <div style="width: 80px;flex: 1;"><el-input @input="handleInput(scope.row, '分润比例')"  v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" /></div>
476
+                        <div style="width: 10px;margin-top: 10px;"><b>%</b></div>
477
+                      </div>
478
+                    </template>
479
+                  </el-table-column>
499 480
                   </template>
500 481
                 </template>
482
+
483
+                <template v-if="this.Spu_id==null||this.Spu_id==''||this.Spu_id==undefined">
484
+                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
485
+                    <template slot-scope="scope">
486
+                      <el-input @input="handleInput(scope.row,formThead[iii].title)" v-model="scope.row[iii]" :disabled="formThead[iii].title==='销售价格'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
487
+                    </template>
488
+                  </el-table-column>
489
+                </template>
490
+
491
+                <template v-else>
492
+                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
493
+                    <template slot-scope="scope">
494
+                      <el-input v-model="scope.row[iii]" :disabled="formThead[iii].title==='成本价'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
495
+                    </template>
496
+                  </el-table-column>
497
+                </template>
498
+
501 499
               </el-table>
502 500
             </el-form-item>
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
503 510
             <!-- 多规格表格-->
504 511
             <el-form-item v-if="formValidate.spec_type == 1 && formValidate.attr.length>0" class="labeltop" label="规格列表:">
505 512
               <el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
@@ -535,70 +542,71 @@
535 542
                   </el-table-column>
536 543
                 </template> -->
537 544
 
538
-                <template v-if="this.Spu_ids==null || this.Spu_ids=='' || this.Spu_ids==undefined">
539
-                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
545
+                <template v-if="merInfo.mer_id == 496">
546
+
547
+                <template v-if="formValidate.share_is == 1">
548
+                  <el-table-column align="center" label="分享奖(%)" min-width="120">
540 549
                     <template slot-scope="scope">
541
-                      <el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
550
+                      <el-input v-model="scope.row.share_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" @input="handleChangeShare" />
542 551
                     </template>
543 552
                   </el-table-column>
544 553
                 </template>
545
-                <template v-else>
546
-                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
554
+
555
+                <template v-if="formValidate.pension_is == 1">
556
+                  <el-table-column align="center" label="养老金(%)" min-width="120">
547 557
                     <template slot-scope="scope">
548
-                      <el-input v-model="scope.row[iii]" :disabled="formThead[iii].title==='成本价'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
558
+                      <el-input v-model="scope.row.pension_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" @input="handleChangePension" />
549 559
                     </template>
550 560
                   </el-table-column>
551
-                </template>
552
-
553
-                <template v-if="merInfo.mer_id == 496">
554 561
 
555
-                  <template v-if="formValidate.share_is == 1">
556
-                    <el-table-column align="center" label="分享奖(%)" min-width="120">
557
-                      <template slot-scope="scope">
558
-                        <el-input v-model="scope.row.share_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" @input="handleChangeShare" />
559
-                      </template>
560
-                    </el-table-column>
561
-                  </template>
562
+                </template>
562 563
 
563
-                  <template v-if="formValidate.pension_is == 1">
564
-                    <el-table-column align="center" label="养老金(%)" min-width="120">
565
-                      <template slot-scope="scope">
566
-                        <el-input v-model="scope.row.pension_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" @input="handleChangePension" />
567
-                      </template>
568
-                    </el-table-column>
564
+                <template>
565
+                  <el-table-column align="center" label="分红股权(%)" min-width="120">
566
+                    <template slot-scope="scope">
567
+                      <el-input v-model="scope.row.stock_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" />
568
+                    </template>
569
+                  </el-table-column>
570
+                  <el-table-column align="center" label="股票数量" min-width="120">
571
+                    <template slot-scope="scope">
572
+                      <el-input v-model="scope.row.shares_num" placeholder="请输入" type="number" :min="0" class="priceBox" />
573
+                    </template>
574
+                  </el-table-column>
569 575
 
570
-                  </template>
576
+                </template>
577
+                </template>
578
+                <template v-else>
571 579
 
572
-                  <template>
573
-                    <el-table-column align="center" label="分红股权(%)" min-width="120">
574
-                      <template slot-scope="scope">
575
-                        <el-input v-model="scope.row.stock_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" />
576
-                      </template>
577
-                    </el-table-column>
578
-                    <el-table-column align="center" label="股票数量" min-width="120">
579
-                      <template slot-scope="scope">
580
-                        <el-input v-model="scope.row.shares_num" placeholder="请输入" type="number" :min="0" class="priceBox" />
581
-                      </template>
582
-                    </el-table-column>
580
+                <template v-if="formValidate.extension_type == 1">
581
+                  <el-table-column align="center" label="分润比例(%)" min-width="120">
582
+                    <template slot-scope="scope">
583
+                      <el-input @input="handleInput(scope.row, '分润比例')" v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
584
+                    </template>
585
+                  </el-table-column>
586
+                  <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
587
+                                    <template slot-scope="scope">
588
+                                      <el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
589
+                                    </template>
590
+                                  </el-table-column> -->
591
+                </template>
592
+                </template>
583 593
 
584
-                  </template>
594
+                <template v-if="this.Spu_ids==null || this.Spu_ids=='' || this.Spu_ids==undefined">
595
+                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
596
+                    <template slot-scope="scope">
597
+                      <el-input v-model="scope.row[iii]" @input="handleInput(scope.row,formThead[iii].title)" :disabled="formThead[iii].title==='销售价格'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
598
+                    </template> 
599
+                  </el-table-column>
585 600
                 </template>
586 601
                 <template v-else>
587
-
588
-                  <template v-if="formValidate.extension_type == 1">
589
-                    <el-table-column align="center" label="一级返佣(%)" min-width="120">
590
-                      <template slot-scope="scope">
591
-                        <el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
592
-                      </template>
593
-                    </el-table-column>
594
-                    <!-- <el-table-column align="center" label="二级返佣(元)" min-width="120">
595
-                                      <template slot-scope="scope">
596
-                                        <el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
597
-                                      </template>
598
-                                    </el-table-column> -->
599
-                  </template>
602
+                  <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
603
+                    <template slot-scope="scope">
604
+                      <el-input v-model="scope.row[iii]" :disabled="formThead[iii].title==='成本价'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
605
+                    </template>
606
+                  </el-table-column>
600 607
                 </template>
601 608
 
609
+
602 610
               </el-table>
603 611
             </el-form-item>
604 612
           </el-col>
@@ -617,6 +625,8 @@ import ueditorFrom from '@/components/ueditorFrom'
617 625
 import { shippingListApi, templateLsitApi, productCreateApi, productDetailApi, categorySelectApi, categoryListApi, categoryBrandListApi, productUpdateApi, productConfigApi } from '@/api/product'
618 626
 import { getBaseInfo } from '@/api/user'
619 627
 import { roterPre } from '@/settings'
628
+import { getMerchantProfitApi } from '@/api/setting.js'
629
+import { B } from 'af-table-column'
620 630
 const defaultObj = {
621 631
   dacang_price: '',
622 632
   image: '',
@@ -633,8 +643,8 @@ const defaultObj = {
633 643
   temp_id: '',
634 644
   attrValue: [{
635 645
     image: '',
636
-    price: null,
637 646
     cost: null,
647
+    price: null,
638 648
     ot_price: null,
639 649
     stock: null,
640 650
     bar_code: '',
@@ -662,13 +672,13 @@ const defaultObj = {
662 672
 
663 673
 }
664 674
 const objTitle = {
665
-  price: {
666
-    title: '售价'
667
-  },
668 675
   // no_dacang_cost_price
669 676
   // dacang_cost_price
670 677
   cost: {
671
-    title: '成本价'
678
+    title: '成本价格'
679
+  },
680
+  price: {
681
+    title: '销售价格'
672 682
   },
673 683
   ot_price: {
674 684
     title: '原价'
@@ -692,6 +702,7 @@ export default {
692 702
   components: { ueditorFrom },
693 703
   data() {
694 704
     return {
705
+      base_commission: '',
695 706
       merchant_type: '',
696 707
       optionsCate: {
697 708
         value: 'store_category_id',
@@ -832,6 +843,7 @@ export default {
832 843
     }
833 844
   },
834 845
   created() {
846
+    this.getMerchantProfit()
835 847
     this.merchant_type = localStorage.getItem('merchant_type')
836 848
     console.log(this.merchant_type)
837 849
     this.tempRoute = Object.assign({}, this.$route)
@@ -865,7 +877,29 @@ export default {
865 877
     this.productCon()
866 878
   },
867 879
   methods: {
868
-
880
+    handleInput(value, title) {
881
+      if(title == '成本价格' || title == '分润比例'){
882
+        console.log('输入的内容:', value);
883
+        var bili = value.extension_one / 100;//比例
884
+        var gong_mer_profit = value.cost * bili//利润
885
+        var gong_market_price = Number(value.cost) + Number(gong_mer_profit)//加入利润后的价格
886
+        var plate_mer_profit = gong_mer_profit;
887
+        value.price = gong_market_price
888
+        value.gong_mer_profit = gong_mer_profit
889
+        value.gong_market_price = gong_market_price
890
+        value.plate_mer_profit = plate_mer_profit
891
+        console.log('计算的内容:', value);
892
+      }
893
+      // 这里可以执行其他逻辑,如发送数据到服务器等
894
+    },
895
+    // 获取商户分润比例
896
+    getMerchantProfit() {
897
+      getMerchantProfitApi().then(res => {
898
+        this.base_commission = res.message;
899
+      }).catch(err => {
900
+        this.$message.error(err.message)
901
+      })
902
+    },
869 903
     // 监测输入框的值是否变化
870 904
     handleChangeShare(value) {
871 905
       console.log('输入的', value)
@@ -1051,6 +1085,7 @@ export default {
1051 1085
           this.formValidate.attr = item.template_value
1052 1086
         }
1053 1087
       })
1088
+      this.onChangetype(this.formValidate.extension_type)
1054 1089
     },
1055 1090
     // 商户分类;
1056 1091
     getCategorySelect() {
@@ -1149,18 +1184,18 @@ export default {
1149 1184
       console.log(item, 'itemsss')
1150 1185
       if (item == 1) {
1151 1186
         this.OneattrValue.map(item => {
1152
-          this.$set(item, 'extension_one', null)
1187
+          this.$set(item, 'extension_one', this.base_commission)
1153 1188
           this.$set(item, 'extension_two', null)
1154 1189
         })
1155 1190
         this.ManyAttrValue.map(item => {
1156
-          this.$set(item, 'extension_one', null)
1191
+          this.$set(item, 'extension_one', this.base_commission)
1157 1192
           this.$set(item, 'extension_two', null)
1158 1193
         })
1159 1194
       } else {
1160 1195
         this.OneattrValue.map(item => {
1161 1196
           delete item.extension_one
1162 1197
           delete item.extension_two
1163
-          this.$set(item, 'extension_one', null)
1198
+          this.$set(item, 'extension_one', this.base_commission)
1164 1199
           this.$set(item, 'extension_two', null)
1165 1200
         })
1166 1201
         this.ManyAttrValue.map(item => {

+ 28 - 0
src/views/product/dxzwyhList/index.vue

@@ -149,6 +149,16 @@
149 149
 
150 150
             <el-button
151 151
               type="text"
152
+              size="small"
153
+              class="mr10"
154
+            >
155
+              <div @click="deleteXp(scope.row.product_id)">
156
+                删除
157
+              </div>
158
+            </el-button>
159
+
160
+            <el-button
161
+              type="text"
152 162
               @click=""
153 163
               size="small"
154 164
               class="mr10"
@@ -245,6 +255,7 @@
245 255
 import {
246 256
   postchangeshow,
247 257
   Posteditprice,
258
+  Posteditdelete,
248 259
   statusApi,
249 260
   Getproductgdx,
250 261
   getgonglstfilter,
@@ -356,6 +367,23 @@ export default {
356 367
 
357 368
 
358 369
     },
370
+    deleteXp(en) {
371
+        const _this = this
372
+        Posteditdelete(en).then(
373
+          (res) => {
374
+            if (res.status == 200) {
375
+              this.getList();
376
+              this.getLstFilterApi();
377
+              this.$message.success(res.message);
378
+            } else {
379
+              this.$message.error(res.message);
380
+            }
381
+          },
382
+          (fail) => {
383
+             this.$message.error(fail.message);
384
+          }
385
+        );
386
+    },
359 387
     // toggleSelection(rows) {
360 388
     //   if (rows) {
361 389
     //     rows.forEach((row) => {

+ 27 - 19
src/views/setting/fenrunbili.vue

@@ -2,7 +2,8 @@
2 2
   <div class="divBox">
3 3
     <el-form size="small" label-width="120px">
4 4
       <el-form-item label="商户分润比例:">
5
-        <el-select v-model="userFrom.scole" placeholder="请选择" class="filter-item" @change="scoleChange">
5
+        <el-input v-model="userFrom.value" placeholder="请输入" element-id="value" style="width: 20%" /> %
6
+        <!-- <el-select v-model="userFrom.scole" placeholder="请选择" class="filter-item" @change="scoleChange">
6 7
           <el-option value="30" label="30%" />
7 8
           <el-option value="35" label="35%" />
8 9
           <el-option value="40" label="40%" />
@@ -18,11 +19,11 @@
18 19
           <el-option value="90" label="90%" />
19 20
           <el-option value="95" label="95%" />
20 21
           <el-option value="100" label="100%" />
21
-        </el-select>
22
+        </el-select> -->
22 23
       </el-form-item>
23
-      <el-form-item label="积分比例:">
24
+      <!-- <el-form-item label="积分比例:">
24 25
         {{ userFrom.pension }}
25
-      </el-form-item>
26
+      </el-form-item> -->
26 27
       <el-button class="ResetSearch mr10" size="small" type="primary" @click="config()">确定</el-button>
27 28
     </el-form>
28 29
 
@@ -37,15 +38,17 @@ export default {
37 38
   data() {
38 39
     return {
39 40
       userFrom: {
40
-        scole: '30%',
41
-        pension: '5%'
41
+        value:0
42
+        // scole: '30%',
43
+        // pension: '5%'
42 44
       },
43 45
       params: {
44
-        name: 'shop_bonus_setting',
45
-        value: {
46
-          yanglao_rate: '5%',
47
-          shop_bonus_rate: '30%'
48
-        }
46
+        // name: 'shop_bonus_setting',
47
+        // value: 0
48
+        // value: {
49
+        //   yanglao_rate: '5%',
50
+        //   shop_bonus_rate: '30%'
51
+        // }
49 52
       }
50 53
     }
51 54
   },
@@ -60,28 +63,33 @@ export default {
60 63
     // 获取商户分润比例
61 64
     getMerchantProfit() {
62 65
       getMerchantProfitApi().then(res => {
63
-        this.userFrom.scole = res.data.shop_bonus_rate + '%'
64
-        this.userFrom.pension = res.data.yanglao_rate + '%'
66
+        this.userFrom.value = res.message
67
+        // this.userFrom.scole = res.data.shop_bonus_rate + '%'
68
+        // this.userFrom.pension = res.data.yanglao_rate + '%'
65 69
       }).catch(err => {
66 70
         this.$message.error(err.message)
67 71
       })
68 72
     },
69 73
     // 修改商户分润比例
70 74
     config() {
75
+      this.params = {
76
+        name: 'base_commission',
77
+        value: this.userFrom.value
78
+      };
71 79
       this.setMerchantProfit(this.params)
72 80
     },
73 81
     scoleChange(value) {
74
-      console.log(value, '<---  v  ')
75
-      console.log(value / 5, '<---  v % 5 ')
76
-      const pension = value / 5 - 1
77
-      this.userFrom.pension = pension + '%'
82
+      // console.log(value, '<---  v  ')
83
+      // console.log(value / 5, '<---  v % 5 ')
84
+      // const pension = value / 5 - 1
85
+      // this.userFrom.pension = pension + '%'
78 86
       // const params = {
79 87
       //   name: 'shop_bonus_setting',
80 88
       //   value: { yanglao_rate: pension,
81 89
       //     shop_bonus_rate: value }
82 90
       // }
83
-      this.params.value.yanglao_rate = pension
84
-      this.params.value.shop_bonus_rate = value
91
+      // this.params.value.yanglao_rate = pension
92
+      // this.params.value.shop_bonus_rate = value
85 93
     },
86 94
     // 修改商户分润比例
87 95
     setMerchantProfit(params) {

+ 1 - 1
src/views/user/list/index.vue

@@ -798,7 +798,7 @@ export default {
798 798
       }],
799 799
       companyLists: [
800 800
         { value: '13', label: '全部' },
801
-        { value: '13', label: '一壶茶' },
801
+        { value: '13', label: '幸福保' },
802 802
         { value: '13', label: '国盛' }], // 公司名称
803 803
       cardLists: [{ 'className': 'el-icon-s-goods', 'count': '21.00', 'field': '元', 'name': '总支付金额' }, { 'className': 'el-icon-s-goods', 'count': '0.00', 'field': '元', 'name': '服务商返利' }, { 'className': 'el-icon-s-order', 'count': '3.24', 'field': '元', 'name': '养老金' }],
804 804
       performanceList: [],