Procházet zdrojové kódy

添加客户优化

shish před 1 rokem
rodič
revize
21afeebd77
1 změnil soubory, kde provedl 10 přidání a 5 odebrání
  1. 10 5
      ghsApp/src/pagesClient/member/addCustomer.vue

+ 10 - 5
ghsApp/src/pagesClient/member/addCustomer.vue

@@ -18,7 +18,6 @@
           <input v-model="form.confirmMobile1" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile1" placeholder="花店手机号" />
         </tui-list-cell>
       </view>
-
       <view>
         <div class="btn-wrap">
           <button class="admin-button-com blue big" formType="submit">确认</button>
@@ -126,10 +125,16 @@ export default {
         miniOpenId:currentMiniOpenId
       }).then(res => {
         if(res.code == 1){
-          this.$msg(res.msg)
-          setTimeout(() => {
-            uni.navigateBack();
-          }, 2000)
+          if(res.data.customId && res.data.customId>0){
+              this.$util.confirmModal({content:'客户已经存在',okText:'查看',cancelText:'取消'},() => {
+                this.$util.pageTo({url: "/pagesClient/member/detail?id="+res.data.customId,type:2})
+              })
+          }else{
+            this.$msg(res.msg)
+            setTimeout(() => {
+              uni.navigateBack();
+            }, 2000)
+          }
         }
       });
     }