storeBelieveInLight 1 rok temu
rodzic
commit
30bd368d93

+ 1 - 1
shop/productManagementModule/addProduct.vue

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

+ 6 - 1
shop/productManagementModule/productManagement.vue

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