Procházet zdrojové kódy

style:资产找回

xyh8905170 před 2 roky
rodič
revize
234be9ffe5

+ 1 - 0
common/js/env.js

@@ -3,6 +3,7 @@
 // let baseUrl = `https://jje.admin.xinyuekj.com.cn`
 // let baseUrl = `https://jje.admin.xinyuekj.com.cn/test-api`
 let baseUrl = `http://65i1sxopd9qp.ngrok.xiaomiqiu123.top`
+
 // let baseUrl = `http://127.0.0.1:9000`
 // let baseUrl = `http://192.168.1.7:8080`
 // let baseUrl = `http://192.168.1.2:8080`

+ 25 - 0
myPages/systemSwitch/index.rpx.scss

@@ -313,5 +313,30 @@
     align-items: center;
     justify-content: space-around;
   }
+  .popupItemSelect {
+    width: 558rpx;
+    height: 100rpx;
+    background-color: #FAFAFA;
+    border-radius: 16rpx;
+    border: 4rpx solid #FFE05C;
+    margin:24rpx ;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    box-sizing: border-box;
+  }
+  .popupItemSelect::after {
+    content: '√';
+    color: #fff;
+    z-index: 1000;
+    display: inline-block;
+    width: 32rpx;
+    height: 32rpx;
+    transform: rotate(20deg);
+    position: absolute;
+    top: 0;
+    right: 0;
+  }
+
 }
 

+ 95 - 55
myPages/systemSwitch/index.vue

@@ -41,14 +41,14 @@
             <u--input v-model="userInfo.phone" disabledColor="#ffffff" placeholder="填写老系统电话" border="bottom"
                       maxlength="11"></u--input>
           </u-form-item>
-          <u-form-item label="老系统会员姓名" prop="memberName" labelPosition="top" labelWidth="auto" labelAlign="right">
-            <u--input v-model="userInfo.memberName" disabledColor="#ffffff" placeholder="填写姓名" border="bottom"
-                      maxlength="16"></u--input>
-          </u-form-item>
-          <u-form-item label="当前手机号" prop="phonenumber" labelWidth="auto" labelAlign="right">
-            <u--input v-model="userInfo.phonenumber" disabledColor="#ffffff" placeholder="填写当前手机号"
-                      border="bottom" maxlength="11"></u--input>
-          </u-form-item>
+          <!--          <u-form-item label="老系统会员姓名" prop="memberName" labelPosition="top" labelWidth="auto" labelAlign="right">-->
+          <!--            <u&#45;&#45;input v-model="userInfo.memberName" disabledColor="#ffffff" placeholder="填写姓名" border="bottom"-->
+          <!--                      maxlength="16"></u&#45;&#45;input>-->
+          <!--          </u-form-item>-->
+          <!--          <u-form-item label="当前手机号" prop="phonenumber" labelWidth="auto" labelAlign="right">-->
+          <!--            <u&#45;&#45;input v-model="userInfo.phonenumber" disabledColor="#ffffff" placeholder="填写当前手机号"-->
+          <!--                      border="bottom" maxlength="11"></u&#45;&#45;input>-->
+          <!--          </u-form-item>-->
           <u-form-item labelWidth="auto" labelAlign="right" label="验证码" prop="smsCode" width="120">
             <u--input v-model="userInfo.smsCode" disabledColor="#ffffff" placeholder="请输入验证码" border="bottom"
                       maxlength="6"></u--input>
@@ -67,10 +67,11 @@
             <view class="h-value">
               <view class="h-name">会员编号</view>
               <view class="h-text">{{ userMemberInfo.memberNo }}</view>
+              <view v-if="userMemberInfo.isCommit" style="color: red">(已找回)</view>
             </view>
             <view class="h-value">
-              <view class="h-name">会员卡号</view>
-              <view class="h-text">{{ userMemberInfo.memberCard }}</view>
+              <view class="h-name">开卡店铺</view>
+              <view class="h-text">{{ userMemberInfo.store }}</view>
             </view>
             <view class="h-value">
               <view class="h-name">会员姓名</view>
@@ -170,11 +171,13 @@
     </view>
     <view v-if="currentStep == 0" class="button-group">
       <!-- <button @click="prevStep" :disabled="currentStep === 0">上一步</button> -->
-      <button class="h-btn" @click="open()" :disabled="currentStep === steps.length - 1">查询</button>
+      <button class="h-btn" @click="nextStep(1)" :disabled="currentStep === steps.length - 1">查询</button>
     </view>
     <view v-if="currentStep == 1" class="button-group">
-      <button class="h-btn" style="background-color: #EEEEEE;width: 240rpx" @click="prevStep" :disabled="currentStep === 0">上一步</button>
-      <view class="h-btn" @click="nextStep(2)" :disabled="currentStep === steps.length - 1">
+      <button class="h-btn" style="background-color: #EEEEEE;width: 240rpx" @click="prevStep"
+              :disabled="currentStep === 0">上一步
+      </button>
+      <view class="h-btn" v-if="isCommit == 0" @click="nextStep(2)" :disabled="currentStep === steps.length - 1">
         <text>确认并迁移</text>
       </view>
     </view>
@@ -183,19 +186,21 @@
       <uni-popup ref="popup" :isMaskClick="false">
         <view class="popup-content">
           <text class="text" style="text-align: center">选择会员编号</text>
-          <view v-for="item in numberList"  >
-            <view class="popupItem" :class="item.isSelect"  @click="SelectItem(item.number)":style="item.nmbStatus == 1?'background-color: #93D21A;color:#FFFFFF': null">
+          <view v-for="item in numberList">
+            <view class="popupItem" :class="{'popupItemSelect':item.isSelect == true }" @click="SelectItem(item)"
+                  :style="item.isCommit == 1?'background-color: #93D21A;color:#FFFFFF': null">
               <view>
-                <text>{{ item.number }}</text>
+                <text>{{ item.memberNo }}</text>
               </view>
-              <view style="width:100rpx" >
-                <text v-if="item.nmbStatus == 1 " style="text-align: right">已找回</text>
+              <view style="width:100rpx">
+                <text v-if="item.isCommit == 1 " style="text-align: right">已找回</text>
               </view>
             </view>
           </view>
           <view class="button-popup">
-            <button class="h-btn" style="background-color: #EEEEEE;" @click="this.$refs.popup.close()" >取消</button>
-            <view class="h-btn" style="background-color: #FFE05C;" @click="nextStep(0)" :disabled="currentStep === steps.length - 1">
+            <button class="h-btn" style="background-color: #EEEEEE;" @click="this.$refs.popup.close()">取消</button>
+            <view class="h-btn" style="background-color: #FFE05C;" @click="nextStep(0)"
+                  :disabled="currentStep === steps.length - 1">
               <text>确定</text>
             </view>
           </view>
@@ -214,13 +219,11 @@ export default {
   },
   data() {
     return {
-      isSelect:false,
+      isCommit: 0,
+      isSelect: false,
       isShow: true,
       showCanvas: false,
-      numberList:[
-        {number:'FJWOIU43294423',nmbStatus:0},
-        {number:'ASDFGH43294423',nmbStatus:1},
-        {number:'QWERTY43294423',nmbStatus:0}],
+      numberList: [],
       currentStep: 0,
       steps: ['账户查询', '信息确认', '账户迁移'], // 步骤条的文字内容
       step1Value: '',
@@ -228,7 +231,8 @@ export default {
       step3Value: '',
       userInfo: {
         auth: true,
-        phone: '18231041846',
+        phone: '13984090522',
+        // phone: '',
         memberName: '赵梓熠-测试',
         phonenumber: '18231041846',
         smsCode: '',
@@ -385,8 +389,13 @@ export default {
   },
 
   methods: {
-    SelectItem(data){
-      console.log(data,'selectItem')
+    SelectItem(data) {
+      this.isSelect = true
+      this.userMemberInfo = data
+      this.numberList.forEach(e => {
+        e.isSelect = false
+      })
+      data.isSelect = true
     },
 
     // 关闭签名框
@@ -455,30 +464,49 @@ export default {
     },
     // 查询老会员系统数据
     getOldMember() {
-      this.$api.getOldMember(this.userInfo).then((res) => {
-        if (!!res) {
-          this.userMemberInfo = res.data.data;
-          this.userInfo.memberNo = res.data.data.memberNo;
+      this.$api.getOldMember(this.userInfo).then(res => {
+        console.log(res.data.data.length, '5555555555')
+        if (res.data.data.length != 0) {
+          if (res.data.data.length === 1) {
+            this.numberList = res.data.data
+            console.log(this.numberList, '1111111')
+            this.userMemberInfo = res.data.data[0]
+            this.isCommit = res.data.data[0].isCommit
+            if (this.currentStep < this.steps.length - 1) {
+              this.currentStep++;
+              this.getOrderRechargeOldList()
+            }
+          } else {
+            this.$refs.popup.open()
+            this.numberList = res.data.data
+            console.log(this.numberList, '33333333')
+            const newarr = []
+            this.numberList.map((item) => {
+              newarr.push(Object.assign(item, {isSelect: false}))
+            })
+            this.numberList = newarr
+
+          }
         } else {
           uni.$u.toast('未查询到数据');
         }
-      // 查询充值记录
-      this.getOrderRechargeOldList();
-
-      this.timer = setTimeout(() => {
-        if (this.currentStep < this.steps.length - 1) {
-          this.currentStep++;
-        }
-      }, 0)
+        // // 查询充值记录
+        // this.getOrderRechargeOldList();
+        //
+        // this.timer = setTimeout(() => {
+        //   if (this.currentStep < this.steps.length - 1) {
+        //     this.currentStep++;
+        //   }
+        // }, 0)
       }).catch((res) => {
         uni.showToast({
-          title: "操作失败"
+          title: "操作失败111"
         })
       });
     },
     // 查询会员消费记录
     getOrderConsumeLogOld() {
-      this.$api.getOrderConsumeLogOld(this.userInfo).then((res) => {
+      this.$api.getOrderConsumeLogOld(this.userMemberInfo).then((res) => {
         this.memberInfoRecords = res.data.data;
       }).catch(() => {
         uni.showToast({
@@ -488,7 +516,7 @@ export default {
     },
     // 查询叶会员充值记录
     getOrderRechargeOldList() {
-      this.$api.getOrderRechargeOldList(this.userInfo).then((res) => {
+      this.$api.getOrderRechargeOldList(this.userMemberInfo).then((res) => {
         this.memberInfoRecords = res.data.data;
       }).catch(() => {
         uni.showToast({
@@ -499,8 +527,8 @@ export default {
     // 提交保存
     submitOldData() {
       console.log(this.userInfo.memberNo)
-      this.userInfo.memberNo = '18902'
-      this.$api.submitOldData(this.userInfo).then((res) => {
+      // this.userInfo.memberNo = '18902'
+      this.$api.submitOldData(this.userMemberInfo).then(res => {
         console.log(res)
         if (this.currentStep < this.steps.length - 1) {
           this.currentStep++;
@@ -511,24 +539,36 @@ export default {
         })
       });
     },
-    open(){
-      this.$refs.popup.open()
+    open() {
+
     },
     nextStep(idx) {
-      if (idx == 0) { // 查询数据
-        this.$refs.popup.close()
-        console.log(this.$refs.form1.validate(), '2222222222')
+      if (idx == 0) { // 点击确认
+        if (this.isSelect === true) {
+          this.$refs.popup.close()
+          console.log(this.$refs.form1.validate(), '2222222222')
+          this.getOldMember();
+          this.getOrderRechargeOldList()
+          if (this.currentStep < this.steps.length - 1) {
+            this.currentStep++;
+          }
+        } else {
+          uni.showToast({
+            icon: 'none',
+            duration: 3000,
+            title: '请选择会员编号'
+          });
+        }
+      }
+
+      if (idx == 1) { // 点击查询数据
         this.$refs.form1.validate().then(res => {
           this.getOldMember();
         }).catch(errors => {
           uni.$u.toast('校验失败,请认真填写')
+
         })
-      }
 
-      if (idx == 1) { // 显示查询数据
-        if (this.currentStep < this.steps.length - 1) {
-          this.currentStep++;
-        }
       }
 
       if (idx == 2) { // 用户签名确认

+ 4 - 1
package.json

@@ -4,5 +4,8 @@
   },
   "devDependencies": {
     "mockm": "1.1.27-alpha.2"
+  },
+  "dependencies": {
+    "uview-ui": "^2.0.36"
   }
-}
+}

+ 3 - 2
pages/index/index.vue

@@ -221,7 +221,7 @@
 <!--            </view>-->
 <!--          </view>-->
           <view class="footer ">
-            <view class="">---到底了---</view>
+<!--            <view class="">-&#45;&#45;到底了-&#45;&#45;</view>-->
           </view>
         </view>
       </view>
@@ -554,7 +554,7 @@ export default {
 
 /* 头部内容 */
 .head-wrap {
-  height: 1300rpx;
+  height: 1375rpx;
   background: #FFE05C;
 
   .content-info {
@@ -1006,6 +1006,7 @@ export default {
   text-align: center;
   color: #666;
   margin-bottom: 40px;
+  background-color:#FFE05C ;
 }
 
 .tabBarView {

+ 1 - 1
pages/my/index.vue

@@ -115,7 +115,7 @@ export default {
         // {thumb:'/static/me/u1803.png',title:'实名认证',rightText:'',to:'/myPages/realNameAuth/index'},
         {thumb: '/static/me/u1812.png', title: '服务对象管理', rightText: '', to: '/myPages/ServiceObjectManagement/index'},
         {thumb: '/static/me/u3.png', title: '邀请有礼', rightText: '', to: '/myPages/promotionCenter/index'},
-        {thumb: '/static/me/u1833.png', title: '新老系统切换', rightText: '', to: '/myPages/systemSwitch/index'},
+        {thumb: '/static/me/u1833.png', title: '资产找回', rightText: '', to: '/myPages/systemSwitch/index'},
         {thumb: '/static/me/u826.png', title: '储值服务', rightText: '', to: '/myPages/recharge/index'},
         {thumb: '/static/me/u701.png', title: '交易记录', rightText: '', to: '/myPages/transactionRecord/index'},
         {thumb: '/static/me/u11.png', title: '会员须知', rightText: '', to: '/myPages/aboutOur/index'}