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

+ 2 - 3
pages/cashier/index.vue

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

+ 23 - 17
shop/productManagementModule/addProduct.vue

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