storeBelieveInLight 1 год назад
Родитель
Сommit
30bd368d93

+ 1 - 1
shop/productManagementModule/addProduct.vue

@@ -794,7 +794,7 @@ export default {
794
       this.getCalcAfterPrice(data);
794
       this.getCalcAfterPrice(data);
795
     },
795
     },
796
     getCalcAfterPrice(data) {
796
     getCalcAfterPrice(data) {
797
-      let bili = accMul(data.extension_one, 100); //比例
797
+      let bili = accDiv(data.extension_one, 100); //比例
798
       console.log(bili, "比例");
798
       console.log(bili, "比例");
799
       let gong_mer_profit = accMul(data.cost, bili); //利润
799
       let gong_mer_profit = accMul(data.cost, bili); //利润
800
       console.log(gong_mer_profit, "利润");
800
       console.log(gong_mer_profit, "利润");

+ 6 - 1
shop/productManagementModule/productManagement.vue

@@ -297,6 +297,7 @@ export default {
297
     this.is_panudn = true;
297
     this.is_panudn = true;
298
     this.list = [];
298
     this.list = [];
299
     await this.getProductListData();
299
     await this.getProductListData();
300
+     uni.hideLoading();
300
   },
301
   },
301
   onReachBottom() {
302
   onReachBottom() {
302
     console.log("onReachBottom");
303
     console.log("onReachBottom");
@@ -353,6 +354,7 @@ export default {
353
           title: "加载中",
354
           title: "加载中",
354
         });
355
         });
355
         const res = await getProductList(params);
356
         const res = await getProductList(params);
357
+         uni.hideLoading();
356
         if (res.data.status == 200) {
358
         if (res.data.status == 200) {
357
           this.tihsi = res.data.data.list.length;
359
           this.tihsi = res.data.data.list.length;
358
           if (res.data.data.count > 0) {
360
           if (res.data.data.count > 0) {
@@ -390,7 +392,7 @@ export default {
390
     async onHandleShow(item, type) {
392
     async onHandleShow(item, type) {
391
       const id = item.product_id;
393
       const id = item.product_id;
392
       const data = {
394
       const data = {
393
-        status: item.is_show,
395
+        status: item.is_show==1?0:1,
394
       };
396
       };
395
       const titleTips = item.is_show == 1 ? "商品下架中" : "商品上架中";
397
       const titleTips = item.is_show == 1 ? "商品下架中" : "商品上架中";
396
       const titleMsg = item.is_show == 1 ? "商品下架成功" : "商品上架成功";
398
       const titleMsg = item.is_show == 1 ? "商品下架成功" : "商品上架成功";
@@ -404,9 +406,12 @@ export default {
404
             title: titleMsg,
406
             title: titleMsg,
405
             icon: "none",
407
             icon: "none",
406
           });
408
           });
409
+          await this.getGoodsTabData()
407
           await this.getProductListData();
410
           await this.getProductListData();
411
+           uni.hideLoading();
408
         }
412
         }
409
       } catch (error) {
413
       } catch (error) {
414
+         uni.hideLoading();
410
       } finally {
415
       } finally {
411
         uni.hideLoading();
416
         uni.hideLoading();
412
         uni.hideToast();
417
         uni.hideToast();