card.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="costumer-card">
  3. <view class="left">
  4. <view class="h-tag" v-if="data.type == '101'">销售</view>
  5. <view class="h-tag" v-if="data.type == '102'">原材料</view>
  6. <!-- <view class="h-tag" v-if="data.type == '103'">倒料</view> -->
  7. <!-- <view class="h-tag" v-if="data.type == '104'">材料</view> -->
  8. <!-- <view class="name">{{data.companyContact || ''}}</view> -->
  9. </view>
  10. <view class="right">
  11. <view class="company">{{data.name || ''}}</view>
  12. <!-- <view class="phone">{{data.companyContactPhone || ''}}</view> -->
  13. </view>
  14. <view class="icon" @click="toEdit(data.id)">
  15. <u-icon name="edit-pen-fill" color="#a6a6a6" size="24"/>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. props:{
  22. data:{
  23. type:Object,
  24. default:{},
  25. },
  26. path:{
  27. type:String,
  28. default:'customer'
  29. }
  30. },
  31. methods:{
  32. toEdit(id){
  33. uni.navigateTo({ url: `/subpages/${this.path}/add-edit?id=${id}`})
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="less" scoped>
  39. .costumer-card{
  40. padding: 32rpx;
  41. // margin-bottom: 32rpx;
  42. border-bottom: 1px solid #eee;
  43. background-color: #fff;
  44. display: flex;
  45. .left{
  46. width: 180rpx;
  47. .h-tag{
  48. background-color: #f7f8fa;
  49. width: 128rpx;
  50. color: #3A34D6;
  51. line-height: 48rpx;
  52. height: 48rpx;
  53. font-size: 24rpx;
  54. border-radius: 48rpx;
  55. text-align: center;
  56. }
  57. .name{
  58. text-align: center;
  59. font-size: 28rpx;
  60. line-height: 28rpx;
  61. width: 128rpx;
  62. color: #a6a6a6;
  63. margin-top:24rpx ;
  64. }
  65. }
  66. .right{
  67. flex: 1;
  68. .company{
  69. line-height: 48rpx;
  70. color: #000;
  71. }
  72. .phone{
  73. font-size: 28rpx;
  74. line-height: 28rpx;
  75. color: #a6a6a6;
  76. margin-top:24rpx ;
  77. }
  78. }
  79. .icon{
  80. width: 48rpx;
  81. height: 48rpx;
  82. padding: 24rpx;
  83. }
  84. }
  85. </style>