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

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

@@ -92,7 +92,7 @@
92
 
92
 
93
         <!-- <button class="btn" @click="layout">退出登录</button> -->
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
         <wyg-bottom-tab
96
         <wyg-bottom-tab
97
             ref="tabbar"
97
             ref="tabbar"
98
             :tabIndex="2"
98
             :tabIndex="2"