Jelajahi Sumber

客户列表的修改

shish 11 bulan lalu
induk
melakukan
9a59a552a2

+ 13 - 1
hdPad/src/pages/home/components/customInfo.vue

@@ -29,7 +29,16 @@
         <view class="info-item">
           <text class="label">生日</text>
           <view class="value-container">
-            <text class="value">{{customInfo.birthday || ''}}</text>
+
+            <text class="value" v-if="Number(customInfo.birthdayMonth)>0">
+              {{ customInfo.lunar==1?"农历 ":"" }}{{ customInfo.birthdayMonth }}月{{ customInfo.birthdayDate }}日
+              <text v-if="customInfo.lunar==1 && customInfo.birthday!='0000-00-00'">({{customInfo.birthday}})</text>
+              <text @click="changeBirthday()" style="color:#007aff;margin-left:20upx;">修改</text>
+            </text>
+            <text class="value" v-else>
+              <text style="color:#007aff;" @click="changeBirthday()">设置</text>
+            </text>
+
           </view>
         </view>
 
@@ -126,6 +135,9 @@ export default {
 		}
 	},
   methods:{
+    changeBirthday() {
+      this.$emit('changeBirthday')
+    },
     getCustomDetail(id){
       getDetail({userId:id}).then(res=>{
         if(res.code == 1){

+ 10 - 7
hdPad/src/pages/home/components/customList.vue

@@ -53,19 +53,22 @@
                             <text class="name-text">{{ item.name }}</text>
                         </view>
                         <view class="customer-balance-level">
-
                             <block v-if="item.passStatus == 1">
-                                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" class="balance">没有下过单</text>
-                                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" class="balance">超1周未下单</text>
-                                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" class="balance">超1个月未下单</text>
-                                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" class="balance">超半年未下单</text>
-                                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" class="balance">超1年未下单</text>
+                                <block v-if="item.overTimeUnExpend>0">
+                                    <text v-if="item.overTimeUnExpend == 10000" class="balance">没有下过单</text>
+                                    <text v-if="item.overTimeUnExpend == 7" class="balance">超1周未下单</text>
+                                    <text v-if="item.overTimeUnExpend == 30" class="balance">超1个月未下单</text>
+                                    <text v-if="item.overTimeUnExpend == 180" class="balance">超半年未下单</text>
+                                    <text v-if="item.overTimeUnExpend == 365" class="balance">超1年未下单</text>
+                                </block>
+                                <block v-else>
+                                    <text class="balance"></text>
+                                </block>
                             </block>
                             <block v-else>
                                 <text class="balance">待审核</text>
                             </block>
                             <text class="level">{{ item.memberName }}</text>
-
                         </view>
                         <view class="customer-details">
                             <text class="mobile">{{ item.mobile }}</text>

+ 5 - 4
hdPad/src/pages/home/custom.vue

@@ -9,11 +9,9 @@
                 <customList ref="customListRef" @getCustomInfo="getCustomInfo"></customList>
             </view>
             <view class="custom-info">
-                <customInfo ref="customInforRef" :selectCustomId="selectCustomId" @goBalance="goBalance"></customInfo>
-            </view>
-            <view class="custom-asset" v-if="showIndex == 0">
-
+                <customInfo ref="customInforRef" :selectCustomId="selectCustomId" @goBalance="goBalance" @changeBirthday="changeBirthday"></customInfo>
             </view>
+            <view class="custom-asset" v-if="showIndex == 0"></view>
             <view class="custom-asset balance" v-if="showIndex == 1">
                 <balanceChange ref="balanceChangeRef" :customId="selectCustomId"></balanceChange>
             </view>
@@ -44,6 +42,9 @@ export default {
         ...mapGetters(["getLoginInfo"])
     },
     methods: {
+        changeBirthday(){
+
+        },
         goBalance(){
             this.showIndex = 1
             // 确保组件已经渲染后再调用refresh方法