特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
2.6 KiB

4 months ago
  1. <template>
  2. <!-- 记工记账 -->
  3. <view class="page">
  4. <navbar title="记账"
  5. bgColor="#F9FEFE"
  6. leftClick @leftClick="$utils.navigateBack" />
  7. <uv-cell
  8. title="选择日期"
  9. rightIconStyle="fontSize: 30rpx;"
  10. :value="form.date || '请选择选择日期'"
  11. @click="$refs.datetimePicker.open()"
  12. isLink
  13. ></uv-cell>
  14. <view class="form-sheet-cell">
  15. <view class="label">
  16. 类型
  17. </view>
  18. <uv-radio-group v-model="form.type">
  19. <view class="price">
  20. <uv-radio
  21. :customStyle="{margin: '8px'}"
  22. v-for="(item, index) in typeList"
  23. :key="index"
  24. iconSize="30rpx"
  25. size="40rpx"
  26. labelSize="26rpx"
  27. :label="item.name"
  28. :name="item.name">
  29. </uv-radio>
  30. </view>
  31. </uv-radio-group>
  32. </view>
  33. <view class="form-sheet-cell">
  34. <view class="label">
  35. 金额
  36. </view>
  37. <input placeholder="请输入金额"
  38. type="number"
  39. v-model="form.phone" />
  40. </view>
  41. <view class="form-sheet-cell">
  42. <view class="label">
  43. 备注
  44. </view>
  45. <uv-textarea
  46. v-model="form.workDetail"
  47. count
  48. :maxlength="300"
  49. autoHeight
  50. placeholder="请输入备注"></uv-textarea>
  51. </view>
  52. <view class="uni-color-btn"
  53. @click="submit">
  54. 确认
  55. </view>
  56. <uv-datetime-picker
  57. ref="datetimePicker"
  58. mode="date"
  59. v-model="dateValue"
  60. @confirm="datetimePickerConfim"/>
  61. </view>
  62. </template>
  63. <script>
  64. import mixinList from '@/mixins/list.js'
  65. export default {
  66. mixins : [mixinList],
  67. data() {
  68. return {
  69. form : {
  70. date : '',
  71. time : 0.5,
  72. type : '收入',
  73. },
  74. id : 0,
  75. dateValue : new Date().getTime(),
  76. typeList : [
  77. {
  78. name : '收入',
  79. },
  80. {
  81. name : '支出',
  82. },
  83. ],
  84. }
  85. },
  86. onLoad({id}) {
  87. this.id = id
  88. },
  89. onShow() {},
  90. methods: {
  91. datetimePickerConfim(e){
  92. this.form.date = this.$dayjs(e.value).format('YYYY-MM-DD')
  93. },
  94. submit(){
  95. },
  96. }
  97. }
  98. </script>
  99. <style scoped lang="scss">
  100. .page {
  101. background-color: #fff;
  102. .form-sheet-cell{
  103. display: flex;
  104. background-color: #fff;
  105. padding: 20rpx 30rpx;
  106. align-items: center;
  107. .label{
  108. width: 160rpx;
  109. }
  110. .price{
  111. display: flex;
  112. text-align: center;
  113. input{
  114. width: 150rpx;
  115. border: 1px solid $uni-color;
  116. margin: 0 10rpx;
  117. }
  118. }
  119. input{
  120. flex: 1;
  121. background-color: rgba($uni-color, 0.1);
  122. padding: 10rpx 20rpx;
  123. border-radius: 10rpx;
  124. }
  125. .right-icon{
  126. margin-left: auto;
  127. }
  128. }
  129. /deep/ .uv-textarea{
  130. background-color: rgba($uni-color, 0.1) !important;
  131. min-height: 400rpx;
  132. }
  133. }
  134. </style>