storeBelieveInLight il y a 1 an
Parent
commit
c4e7c7d244
3 fichiers modifiés avec 38 ajouts et 33 suppressions
  1. 13 13
      components/editor.vue
  2. 2 3
      pages/cashier/index.vue
  3. 23 17
      shop/productManagementModule/addProduct.vue

+ 13 - 13
components/editor.vue

@@ -5,7 +5,6 @@
5 5
         <view
6 6
           class="toolbar"
7 7
           @tap="format"
8
-          style="height: 120px; overflow-y: auto"
9 8
         >
10 9
           <view
11 10
             :class="formats.bold ? 'ql-active' : ''"
@@ -19,6 +18,7 @@
19 18
             data-name="italic"
20 19
           >
21 20
           </view>
21
+           <view class="iconfont icon-charutupian" @tap="insertImage"></view>
22 22
           <view
23 23
             :class="formats.underline ? 'ql-active' : ''"
24 24
             class="iconfont icon-zitixiahuaxian"
@@ -134,7 +134,7 @@
134 134
             data-value="+1"
135 135
           ></view>
136 136
           <view class="iconfont icon-fengexian" @tap="insertDivider"></view>
137
-          <view class="iconfont icon-charutupian" @tap="insertImage"></view>
137
+         
138 138
           <view
139 139
             :class="formats.header === 1 ? 'ql-active' : ''"
140 140
             class="iconfont icon-format-header-1"
@@ -187,7 +187,7 @@ export default {
187 187
     },
188 188
 	placeholder:{
189 189
 		type:String,
190
-		default:"开始输入..."
190
+		default:"请输入商品详情信息..."
191 191
 	},
192 192
 	readOnly:{
193 193
 		type:Boolean,
@@ -208,7 +208,7 @@ export default {
208 208
          console.log(val)
209 209
          if(val){
210 210
           this.$nextTick(()=>{
211
-            this.onEditorReady()
211
+            // this.onEditorReady()
212 212
           })
213 213
          }
214 214
       },
@@ -217,7 +217,7 @@ export default {
217 217
   },
218 218
   mounted(){
219 219
      this.richText = this.value;
220
-     this.onEditorReady()
220
+    //  this.onEditorReady()
221 221
   },
222 222
   methods: {
223 223
     readOnlyChange() {
@@ -361,7 +361,7 @@ export default {
361 361
 @import "./editor-icon.css";
362 362
 
363 363
 .page-body {
364
-  height: calc(100vh - var(--window-top) - var(--status-bar-height));
364
+  height: calc(100% - var(--window-top) - var(--status-bar-height));
365 365
 }
366 366
 
367 367
 .wrapper {
@@ -375,11 +375,11 @@ export default {
375 375
 
376 376
 .iconfont {
377 377
   display: inline-block;
378
-  padding: 8px 8px;
379
-  width: 24px;
380
-  height: 24px;
378
+  padding: 16rpx;
379
+  width: 34rpx;
380
+  height: 34rpx;
381 381
   cursor: pointer;
382
-  font-size: 20px;
382
+  font-size: 40rpx;
383 383
 }
384 384
 
385 385
 .toolbar {
@@ -390,12 +390,12 @@ export default {
390 390
 
391 391
 .ql-container {
392 392
   box-sizing: border-box;
393
-  padding: 12px 15px;
393
+  padding: 24rpx 30rpx;
394 394
   width: 100%;
395 395
   min-height: 30vh;
396 396
   height: 100%;
397
-  margin-top: 20px;
398
-  font-size: 16px;
397
+  margin-top: 20rpx;
398
+  font-size: 32rpx;
399 399
   line-height: 1.5;
400 400
 }
401 401
 

+ 2 - 3
pages/cashier/index.vue

@@ -9,7 +9,7 @@
9 9
         <view class="cashier-tablin-nie">
10 10
           <view class="cashier-tablin-nie-left">
11 11
             <view class="cashier-tablin-nie-left-icon">
12
-              <image :src="merchantCashierShow.logo" mode="widthFix"> </image>
12
+              <image :src="merchantCashierShow.logo" mode="aspectFit"> </image>
13 13
             </view>
14 14
             <view class="cashier-tablin-nie-left-text">
15 15
               <view class="cashier-tablin-nie-left-text-top">
@@ -689,14 +689,13 @@ page {
689 689
             image {
690 690
               width: 100%;
691 691
               height: 100%;
692
-              height: auto;
693 692
               border-radius: 20rpx;
694 693
             }
695 694
           }
696 695
 
697 696
           .cashier-tablin-nie-left-text {
698 697
             width: 280rpx;
699
-            height: 100%;
698
+            height: 100%;
700 699
 		    margin-left: 15rpx;
701 700
             display: flex;
702 701
             flex-direction: column;

+ 23 - 17
shop/productManagementModule/addProduct.vue

@@ -211,7 +211,7 @@
211 211
             :adjust-position="false"
212 212
             placeholder="请输入分润比例"
213 213
             class="placeholder-class"
214
-            @input="changeInputHandleExtensionOne"
214
+            @change="changeInputHandleExtensionOne"
215 215
             :clearable="false"
216 216
           ></uni-easyinput>
217 217
           <view class="view-unit-input">%</view>
@@ -227,7 +227,7 @@
227 227
             placeholder="请输入商品成本价"
228 228
             class="placeholder-class"
229 229
             :clearable="false"
230
-            @input="changeInputHandleCost"
230
+            @change="changeInputHandleCost"
231 231
           ></uni-easyinput>
232 232
         </view>
233 233
         <!-- 商品售价 price-->
@@ -473,8 +473,8 @@ export default {
473 473
   async onLoad(e) {
474 474
     this.product_id = e.product_id || "";
475 475
     this.clickType = e.clickType;
476
-     await this.getGoodsClassCategoryData();
477
-      await this.getMerchantProfit();
476
+    await this.getGoodsClassCategoryData();
477
+    await this.getMerchantProfit();
478 478
     if (this.clickType == "updated" && this.product_id) {
479 479
       uni.showLoading({
480 480
         title: "加载中",
@@ -482,7 +482,7 @@ export default {
482 482
       });
483 483
       await this.getProductDetailData(this.product_id);
484 484
     }
485
-     await this.initData();
485
+    await this.initData();
486 486
   },
487 487
   onShow() {},
488 488
   methods: {
@@ -518,11 +518,11 @@ export default {
518 518
             dataArr.find((item) => item.value == data.cate_id) || {};
519 519
           this.pingtaifeilei.name = findObj.label || "";
520 520
           this.pingtaifeilei.id = findObj.value || data.cate_id || "";
521
-          console.log(this.base_commission,"this.base_commission")
521
+          console.log(this.base_commission, "this.base_commission");
522 522
           this.getCalcAfterPrice({
523
-            extension_one:attrValue.extension_one,
524
-            cost:this.attrValueForm.cost
525
-          })
523
+            extension_one: attrValue.extension_one,
524
+            cost: this.attrValueForm.cost,
525
+          });
526 526
           if (data.image) {
527 527
             this.fengMianImage = [];
528 528
             let fenMian = {
@@ -554,13 +554,12 @@ export default {
554 554
       await this.getBrandSelectData();
555 555
       await this.getShippingListData();
556 556
       await this.getGoodsClassData();
557
-    
557
+
558 558
       await this.productCon();
559 559
       await this.getMerInfo();
560
-     
561 560
     },
562 561
     convertToFlatArray(data) {
563
-     return Array.isArray(data)
562
+      return Array.isArray(data)
564 563
         ? data.flatMap((node) => {
565 564
             const { value, label, children = [] } = node;
566 565
             if (typeof value !== "number" || typeof label !== "string")
@@ -796,11 +795,11 @@ export default {
796 795
       uni.showLoading({
797 796
         title: "数据提交中...",
798 797
       });
799
-      let req = this.clickType === "updated" ? updateProduct : addProduct
800
-      let product_id = this.clickType === "updated"? this.product_id : ""
798
+      let req = this.clickType === "updated" ? updateProduct : addProduct;
799
+      let product_id = this.clickType === "updated" ? this.product_id : "";
801 800
 
802 801
       try {
803
-        const res = await req(product_id,newParams);
802
+        const res = await req(product_id, newParams);
804 803
         if (res.data.status == 200) {
805 804
           uni.showToast({
806 805
             title: "数据提交成功",
@@ -885,11 +884,13 @@ export default {
885 884
           this.attrValueForm.extension_one = this.base_commission;
886 885
         });
887 886
       }
888
-
887
+      this.attrValueForm.extension_one =
888
+        value < 5 ? "5" : value > 100 ? this.base_commission : value;
889 889
       let data = {
890 890
         extension_one: this.attrValueForm.extension_one,
891 891
         cost: this.attrValueForm.cost,
892 892
       };
893
+      console.log("changeInputHandleExtensionOne==>>>", data);
893 894
       this.getCalcAfterPrice(data);
894 895
     },
895 896
     getCalcAfterPrice(data) {
@@ -899,7 +900,12 @@ export default {
899 900
       console.log(gong_mer_profit, "利润");
900 901
       let gong_market_price = accAdd(data.cost, gong_mer_profit); //加入利润后的价格
901 902
       let plate_mer_profit = gong_mer_profit;
902
-      console.log(gong_market_price, "加入利润后的价格", plate_mer_profit);
903
+      console.log(
904
+        gong_market_price,
905
+        "加入利润后的价格",
906
+        "利润==>>>",
907
+        plate_mer_profit
908
+      );
903 909
       this.attrValueForm.price = gong_market_price;
904 910
       this.priceDefault = gong_market_price;
905 911
       this.attrValueForm.gong_mer_profit = gong_mer_profit;