Переглянути джерело

提交时判断是否加价完成,提示

ylong 9 місяців тому
батько
коміт
03a2cdcc05
2 змінених файлів з 20 додано та 4 видалено
  1. 1 1
      .env.dev.js
  2. 19 3
      pages/home/index.vue

+ 1 - 1
.env.dev.js

@@ -1,5 +1,5 @@
 export default {
     "NODE_ENV": 'development',
-    "apiUrl":"https://bk.shuhi.com",
+    "apiUrl":"https://bpi.shuhi.com",
     "apiUrlPrefix":"/api",
 };

+ 19 - 3
pages/home/index.vue

@@ -43,7 +43,10 @@
         <view class="left-info" style="min-width: 194px">
           <view class="flex-a common-text">
             共<text class="color-red">{{ orderInfo.totalNum }}</text
-            >件 预估回收价 <text class="color-red">¥{{ orderInfo.totalRecycleMoney || 0 }}</text>
+            >件 预估回收价
+            <text class="color-red"
+              >¥{{ orderInfo.totalRecycleMoney || 0 }}</text
+            >
           </view>
           <text class="common-text tip"
             >*旧书预估价格满 {{ orderInfo.minOrderMoney }} 元起收</text
@@ -52,7 +55,7 @@
 
         <button
           class="scan-btn next-btn"
-          @click="onNext"
+          @click="handleValidate"
           :disabled="isDisabled"
         >
           下一步
@@ -115,6 +118,11 @@
       }}</text>
     </common-dialog>
 
+    <!-- 此订单还有未加价的图书,提交订单后将失去加价资格,确定提交吗? -->
+    <common-dialog ref="noUpsellDialog" title="温馨提示" @confirm="onNext">
+      <text>此订单还有未加价的图书,提交订单后将失去加价资格,确定提交吗?</text>
+    </common-dialog>
+
     <!-- 温馨提示弹窗 -->
     <KindReminder
       ref="kindReminder"
@@ -471,6 +479,14 @@ export default {
       this.$refs.scanBookList.handleDeleteBook(this.currentBook);
     },
 
+    handleValidate() {
+      if (this.bookList.some((v) => v.canInvite == 1)) {
+        this.$refs.noUpsellDialog.openPopup();
+      } else {
+        this.onNext();
+      }
+    },
+
     //提交
     onNext() {
       let orderId = this.orderInfo.orderId;
@@ -506,7 +522,7 @@ export default {
     updateBooksList(data, book) {
       this.bookList = data;
       // book.upsellMoney && this.getLastOrder();
-      this.getLastOrder()
+      this.getLastOrder();
     },
 
     toggleCollapse(step) {