Browse Source

增加称重商品

cr 4 years ago
parent
commit
a1af0bbf6b

+ 2 - 2
.env

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = develop
7
 VUE_APP_ENV = develop
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

+ 2 - 2
.env.develop

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = production
7
 VUE_APP_ENV = production
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

+ 2 - 2
.env.production

@@ -7,13 +7,13 @@ NODE_ENV = 'production'
7
 VUE_APP_ENV = production
7
 VUE_APP_ENV = production
8
 
8
 
9
 # 接口请求基地址
9
 # 接口请求基地址
10
-VUE_APP_API_BASE_URL = https://delivery.ixiaokejia.com
10
+VUE_APP_API_BASE_URL = http://localhost:8076
11
 
11
 
12
 # 接口请求基地址
12
 # 接口请求基地址
13
 VUE_APP_WEBSOCKET_BASE_URL = 
13
 VUE_APP_WEBSOCKET_BASE_URL = 
14
 
14
 
15
 # 图片基地址
15
 # 图片基地址
16
-VUE_APP_IMAGE_BASE_URL = https://delivery.ixiaokejia.com
16
+VUE_APP_IMAGE_BASE_URL = http://localhost:8076
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
17
 VUE_APP_IMAGE_RESOURCE_URL = https://oss.ixiaokejia.com
18
 
18
 
19
 # 微信小程序appId
19
 # 微信小程序appId

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

@@ -571,6 +571,7 @@ export default {
571
                 type: self.subCategoryId || self.categoryId,
571
                 type: self.subCategoryId || self.categoryId,
572
                 status: this.typeStatus,
572
                 status: this.typeStatus,
573
                 keyword: this.searchVal || "",
573
                 keyword: this.searchVal || "",
574
+                weighingGoods:this.viewWeighGood?1:0,   // ,0-非称重商品,1-称重商品
574
             };
575
             };
575
 
576
 
576
             uni.showLoading({
577
             uni.showLoading({

+ 2 - 1
src/pages/manage/cashier/settlement.vue

@@ -609,7 +609,8 @@ export default {
609
                     n += (item.price / 100) * item.select_num;
609
                     n += (item.price / 100) * item.select_num;
610
                 }
610
                 }
611
             }
611
             }
612
-            return n;
612
+            n = n.toFixed(2);
613
+            return parseFloat(n);
613
             // return 100;
614
             // return 100;
614
         },
615
         },
615
         // 打折 优惠 后价格
616
         // 打折 优惠 后价格

+ 8 - 6
src/pages/manage/cashier/weighModal.vue

@@ -19,9 +19,9 @@
19
                     <div class="g-list__title">总价:</div>
19
                     <div class="g-list__title">总价:</div>
20
                     <div class="g-list__value">{{ weighData.amt }}g</div>
20
                     <div class="g-list__value">{{ weighData.amt }}g</div>
21
                 </li>
21
                 </li>
22
-                <li style="text-align: right;">
22
+                <!-- <li style="text-align: right;">
23
                     <span class="refresh" @click="getData">刷新重量</span>
23
                     <span class="refresh" @click="getData">刷新重量</span>
24
-                </li>
24
+                </li> -->
25
             </ul>
25
             </ul>
26
 
26
 
27
             <div class="modal-bottom">
27
             <div class="modal-bottom">
@@ -111,9 +111,11 @@ export default {
111
                 name: "unimp",
111
                 name: "unimp",
112
                 age: 1,
112
                 age: 1,
113
             });
113
             });
114
-            this.getWeight();
115
-            this.getPrice();
116
-            this.getAmt();
114
+            setInterval(() => {
115
+                this.getWeight();
116
+                this.getPrice();
117
+                this.getAmt();
118
+            }, 300);
117
         },
119
         },
118
 
120
 
119
         getWeight() {
121
         getWeight() {
@@ -230,7 +232,7 @@ export default {
230
 }
232
 }
231
 .refresh {
233
 .refresh {
232
     margin-top: px(30);
234
     margin-top: px(30);
233
-    
235
+
234
     display: inline-block;
236
     display: inline-block;
235
     border: 1px solid #d9d9d9;
237
     border: 1px solid #d9d9d9;
236
     color: #333;
238
     color: #333;