Commit 9be044b0 by 姜雷

用户卡片添加showCellphone参数控制是否展示全部的用户手机号码

parent 5e926cbb
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
:customerId="customerId" :customerId="customerId"
:visible="visible" :visible="visible"
:showMoney="showMoney" :showMoney="showMoney"
:showCellphone="showCellphone"
ref="userContent" ref="userContent"
> >
<button <button
...@@ -65,6 +66,10 @@ export default { ...@@ -65,6 +66,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showCellphone: {
type: Boolean,
default: false,
},
}, },
mixins: [Popup], mixins: [Popup],
// mounted() { // mounted() {
......
...@@ -77,6 +77,10 @@ export default { ...@@ -77,6 +77,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showCellphone: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
......
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
<span>{{getTypeLabel(customerType)}}</span> <span>{{getTypeLabel(customerType)}}</span>
</div> </div>
<div class="UserInfo-Name-Col"> <div class="UserInfo-Name-Col">
<span>{{$formatePhone(customerPhone)}}</span> <span v-if="showCellphone">{{customerPhone}}</span>
<span v-else>{{$formatePhone(customerPhone)}}</span>
<span>{{getSexLabel(customerSex)}}</span> <span>{{getSexLabel(customerSex)}}</span>
</div> </div>
</div> </div>
...@@ -144,6 +145,10 @@ export default { ...@@ -144,6 +145,10 @@ export default {
showEdit: { type: Function, default: () => {} }, showEdit: { type: Function, default: () => {} },
showAccount: { type: Function, default: () => {} }, showAccount: { type: Function, default: () => {} },
toggleLock: { type: Function, default: () => {} }, toggleLock: { type: Function, default: () => {} },
showCellphone: {
type: Boolean,
default: false,
},
}, },
mixins: [getUserInfoLabelMixin], mixins: [getUserInfoLabelMixin],
data() { data() {
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<span>{{getTypeLabel(customerBaseInfo.customerType)}}</span> <span>{{getTypeLabel(customerBaseInfo.customerType)}}</span>
</div> </div>
<div class="UserInfo-Name-Col"> <div class="UserInfo-Name-Col">
<span>{{$formatePhone(customerBaseInfo.customerPhone)}}</span> <span v-if="showCellphone">{{customerBaseInfo.customerPhone}}</span>
<span v-else>{{$formatePhone(customerBaseInfo.customerPhone)}}</span>
<span>{{getSexLabel(customerBaseInfo.customerSex)}}</span> <span>{{getSexLabel(customerBaseInfo.customerSex)}}</span>
</div> </div>
</div> </div>
...@@ -84,6 +85,12 @@ import UserBaseInfoMixin from '../../mixins/user/userBaseInfo.js'; ...@@ -84,6 +85,12 @@ import UserBaseInfoMixin from '../../mixins/user/userBaseInfo.js';
import getUserInfoLabelMixin from '@/mixins/user/getUserInfoLabel.js'; import getUserInfoLabelMixin from '@/mixins/user/getUserInfoLabel.js';
export default { export default {
props: {
showCellphone: {
type: Boolean,
default: false,
},
},
mixins: [UserBaseInfoMixin, getUserInfoLabelMixin], mixins: [UserBaseInfoMixin, getUserInfoLabelMixin],
}; };
</script> </script>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
:customerId="customerId" :customerId="customerId"
:customerPhone="customerPhone" :customerPhone="customerPhone"
:showMoney="showMoney" :showMoney="showMoney"
:showCellphone="showCellphone"
:visible="visible" :visible="visible"
ref="UserInfo" ref="UserInfo"
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment