Browse Source

修改bug

cr 3 years ago
parent
commit
dee935f00c
2 changed files with 21 additions and 12 deletions
  1. 20 11
      src/pages/manage/edit-good-form.vue
  2. 1 1
      src/pages/manage/index.vue

+ 20 - 11
src/pages/manage/edit-good-form.vue

@@ -518,7 +518,12 @@
518 518
             <button type="button" class="btn" @click="save('back')">
519 519
                 保存
520 520
             </button>
521
-            <button type="button" class="btn" @click="save('send')" :class="{dis:baseInfo.status ===0}">
521
+            <button
522
+                type="button"
523
+                class="btn"
524
+                @click="save('send')"
525
+                :class="{ dis: baseInfo.status === 0 }"
526
+            >
522 527
                 保存并推送
523 528
             </button>
524 529
         </div>
@@ -1226,10 +1231,14 @@ export default {
1226 1231
                 // 价格转换
1227 1232
                 let arr = JSON.parse(JSON.stringify(this.skuTableData));
1228 1233
                 for (let item of arr) {
1229
-                    item.price = parseInt(Number(item.price) * 100);
1230
-                    item.supplyPrice = parseInt(Number(item.supplyPrice) * 100);
1231
-                    item.cost = parseInt(Number(item.cost) * 100);
1232
-                    item.tagPrice = parseInt(Number(item.tagPrice) * 100);
1234
+                    item.price = parseInt((Number(item.price) * 1000) / 10);
1235
+                    item.supplyPrice = parseInt(
1236
+                        (Number(item.supplyPrice) * 1000) / 10
1237
+                    );
1238
+                    item.cost = parseInt((Number(item.cost) * 1000) / 10);
1239
+                    item.tagPrice = parseInt(
1240
+                        (Number(item.tagPrice) * 1000) / 10
1241
+                    );
1233 1242
                 }
1234 1243
                 skuInfo = JSON.stringify({
1235 1244
                     skuAttrs: this.skuAttrs,
@@ -1250,16 +1259,16 @@ export default {
1250 1259
             //规格判断
1251 1260
             if (this.specIndex === 0) {
1252 1261
                 sendData.baseInfo.price = parseInt(
1253
-                    Number(sendData.baseInfo.price) * 100
1262
+                    (Number(sendData.baseInfo.price) * 1000) / 10
1254 1263
                 );
1255 1264
                 sendData.baseInfo.supplyPrice = parseInt(
1256
-                    Number(sendData.baseInfo.supplyPrice) * 100
1265
+                    (Number(sendData.baseInfo.supplyPrice) * 1000) / 10
1257 1266
                 );
1258 1267
                 sendData.baseInfo.cost = parseInt(
1259
-                    Number(sendData.baseInfo.cost) * 100
1268
+                    (Number(sendData.baseInfo.cost) * 1000) / 10
1260 1269
                 );
1261 1270
                 sendData.baseInfo.tagPrice = parseInt(
1262
-                    Number(sendData.baseInfo.tagPrice) * 100
1271
+                    (Number(sendData.baseInfo.tagPrice) * 1000) / 10
1263 1272
                 );
1264 1273
             }
1265 1274
             this.submitLoading = true;
@@ -1274,7 +1283,7 @@ export default {
1274 1283
                     uni.hideLoading();
1275 1284
                     if (res.success) {
1276 1285
                         if (type === "send") {
1277
-                            this.sendProduct('text');
1286
+                            this.sendProduct("text");
1278 1287
                         }
1279 1288
                         this.router.back();
1280 1289
                     } else {
@@ -1601,7 +1610,7 @@ radio-group {
1601 1610
     & ~ .btn {
1602 1611
         border-left: 1px solid #999;
1603 1612
     }
1604
-    &.dis{
1613
+    &.dis {
1605 1614
         background-color: #eee;
1606 1615
         color: #666;
1607 1616
         pointer-events: none;

+ 1 - 1
src/pages/manage/index.vue

@@ -92,7 +92,7 @@
92 92
 
93 93
         <!-- <button class="btn" @click="layout">退出登录</button> -->
94 94
 
95
-        <div class="ver">0.5.61</div>
95
+        <div class="ver">0.5.62</div>
96 96
         <wyg-bottom-tab
97 97
             ref="tabbar"
98 98
             :tabIndex="2"