business-entering.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="top">
  5. <text class="title">业务录入</text>
  6. </view>
  7. <view class="item">
  8. <view class="l">企业名称:</view>
  9. <view class="r">
  10. <u-input placeholder="输入企业名称"/>
  11. </view>
  12. </view>
  13. <view class="item">
  14. <view class="l">车牌号:</view>
  15. <view class="r">
  16. <u-input placeholder="输入车牌号"/>
  17. </view>
  18. </view>
  19. <view class="item">
  20. <view class="l">车型:</view>
  21. <view class="r">
  22. <picker class="p-picker" id="chexing" @change="bindPickerChange($event)" :value="chexingIndex" :range="chexing">
  23. <text class="p-text">{{chexing[chexingIndex]}}</text>
  24. <u-icon class="p-icon" name="arrow-down-fill" color="#999" size="20"></u-icon>
  25. </picker>
  26. </view>
  27. </view>
  28. <view class="item">
  29. <view class="l">载重:</view>
  30. <view class="r">
  31. <u-input placeholder="输入载重"/>
  32. <view class="unit">吨</view>
  33. </view>
  34. </view>
  35. <view class="item">
  36. <view class="l">商品分类:</view>
  37. <view class="r">
  38. <picker class="p-picker" id="spfl" @change="bindPickerChange($event)" :value="spflIndex" :range="spfl">
  39. <text class="p-text">{{spfl[spflIndex]}}</text>
  40. <u-icon class="p-icon" name="arrow-down-fill" color="#999" size="20"></u-icon>
  41. </picker>
  42. </view>
  43. </view>
  44. <view class="item">
  45. <view class="l">商品名称:</view>
  46. <view class="r">
  47. <u-input placeholder="输入商品名称"/>
  48. </view>
  49. </view>
  50. <view class="item">
  51. <view class="l">商品重量:</view>
  52. <view class="r">
  53. <u-input placeholder="输入商品重量"/>
  54. <view class="unit">KG</view>
  55. </view>
  56. </view>
  57. <view class="item">
  58. <view class="l">商品数量:</view>
  59. <view class="r">
  60. <u-input placeholder="输入商品数量"/>
  61. <view class="unit">个</view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="common-btn2">+增加商品</view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. chexingIndex: 0,
  73. chexingShow:false,
  74. chexing: ['车型1', '车型2' , '车型3'],
  75. spflIndex: 0,
  76. spflShow:false,
  77. spfl: ['商品类型1', '商品类型2' , '商品类型3'],
  78. }
  79. },
  80. methods: {
  81. bindPickerChange: function(e) {
  82. var nowId = e.target.id;//当前picker的ID id需要自己设置 在picker中
  83. var value = e.detail.value;//当前picker选中的值
  84. switch (nowId) {//根据ID判断是哪个picker
  85. case "chexing"://picker的ID
  86. this.chexingIndex = value;
  87. break;
  88. case "spfl"://picker的ID
  89. this.spflIndex = value;
  90. break;
  91. }
  92. },
  93. }
  94. }
  95. </script>
  96. <style lang="scss">
  97. page{
  98. background-color: #fff;
  99. }
  100. @import '@/common/common.scss'
  101. </style>