TurnSendInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="cell-list">
  3. <view class="input-search">
  4. <input
  5. type="text"
  6. value=""
  7. @confirm="searchConfirm"
  8. placeholder="请搜索"
  9. />
  10. </view>
  11. <view class="input-bottom"></view>
  12. <radio-group @change="radioChange">
  13. <template v-for="(item, index) in list">
  14. <label class="category_list">
  15. <view class="category_title">
  16. <view>
  17. <radio :value="index + ''" :checked="index == current" />
  18. </view>
  19. <view class="lable-title">
  20. <label>{{ item.name }}</label>
  21. </view>
  22. </view>
  23. </label>
  24. </template>
  25. </radio-group>
  26. <view class="list-none" v-if="list.length === 0">
  27. 暂无信息,请重新搜索
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { postJ } from '@/utils/api.js'
  33. export default {
  34. name: 'TurnSendInfo',
  35. data () {
  36. return {
  37. current: -1
  38. }
  39. },
  40. props: {
  41. //列表数据
  42. list: {
  43. type: Array,
  44. default: []
  45. }
  46. },
  47. methods: {
  48. searchConfirm (e) {
  49. let name = e.detail.value
  50. let data = {
  51. name: name
  52. }
  53. this.$emit('inputChange', data)
  54. },
  55. //获取人员信息
  56. radioChange (e) {
  57. let value = Number(e.detail.value)
  58. let employeeList = this.list
  59. let executorId = employeeList[value].id
  60. let executorName = employeeList[value].name
  61. //人员id 姓名
  62. let data = {
  63. executorId,
  64. executorName
  65. }
  66. this.$emit('radioChange', data)
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .input-search {
  73. position: fixed;
  74. width: 100%;
  75. padding: 10rpx 20rpx;
  76. height: 80rpx;
  77. z-index: 99;
  78. background-color: #ffffff;
  79. box-sizing: border-box;
  80. input {
  81. height: 80rpx;
  82. line-height: 80rpx;
  83. text-align: center;
  84. font-size: $uni-font-size-base;
  85. background-color: $page-bg;
  86. border-radius: 30rpx;
  87. }
  88. }
  89. .input-bottom {
  90. padding-bottom: 90rpx;
  91. }
  92. .category_list {
  93. display: flex;
  94. justify-content: space-between;
  95. align-items: center;
  96. padding: 0 20rpx;
  97. border-bottom: 1rpx solid #eeecec;
  98. .category_title {
  99. width: 100%;
  100. height: 90rpx;
  101. line-height: 90rpx;
  102. display: flex;
  103. align-items: flex-start;
  104. .lable-title {
  105. margin-left: 10rpx;
  106. width: 100%;
  107. display: flex;
  108. justify-content: space-between;
  109. align-items: center;
  110. padding-right: 20rpx;
  111. font-size: 32rpx;
  112. color: $uni-text-color;
  113. }
  114. }
  115. }
  116. </style>