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.

apply-ex-goods-step1.vue 4.4KB

2 vuotta sitten
11 kuukautta sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
1 vuosi sitten
11 kuukautta sitten
10 kuukautta sitten
1 vuosi sitten
2 vuotta sitten
11 kuukautta sitten
2 vuotta sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
11 kuukautta sitten
2 vuotta sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
7 kuukautta sitten
2 vuotta sitten
1 vuosi sitten
2 vuotta sitten
7 kuukautta sitten
2 vuotta sitten
2 vuotta sitten
1 vuosi sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <view class="oderPage">
  3. <u-form :model="form" :error-type="errorType">
  4. <view class="from">
  5. <u-form-item prop="applyType">
  6. <view class="from_item">
  7. <text><text style="color: red;">*</text>申请类型:</text>
  8. <view style="display: flex;">
  9. <picker @change="bindPickerChange" :value="index" :range="columnsOld">
  10. <view class="uni-input">{{index>=0?columnsOld[index]:"请选择"}}</view>
  11. </picker>
  12. <u-icon name="arrow-right" style="margin-left: 10px;display: flex;"
  13. @click="showPicker"></u-icon>
  14. </view>
  15. </view>
  16. </u-form-item>
  17. </view>
  18. </u-form>
  19. <view class="message">
  20. <view><text class="red">*</text>设备更换需将原设备寄回</view>
  21. <view>寄回信息:</view>
  22. <view>收件人:ETC售后 联系电话:18798751224(此电话仅用于ETC售后收取快递,如需咨询业务请致电4008008787)</view>
  23. <view>寄回地址:{{state.address}}</view>
  24. <view>补换订单审核时效:设备签收后的2个自然日完成审核,审核通过后请关注订单物流单号;</view>
  25. </view>
  26. <button class="submit" @click="submit">下一步</button>
  27. </view>
  28. </template>
  29. <script setup lang="ts">
  30. import {
  31. navTo
  32. } from "@/utils/utils.ts"
  33. import {
  34. ref,
  35. reactive
  36. } from "vue";
  37. import {
  38. onReady
  39. } from "@dcloudio/uni-app";
  40. import {
  41. onLoad
  42. } from "@dcloudio/uni-app";
  43. // 表单数据
  44. const form = reactive({
  45. orderId: '',
  46. applyType: '',
  47. operation: ''
  48. })
  49. const state = reactive({
  50. address: '',
  51. })
  52. //接受通过该id查询订单详情
  53. const oldId = ref('')
  54. const applyType = ref('')
  55. //选择器数据
  56. const index = ref('-1');
  57. const columnsOld = ["换货-换卡签"]
  58. const columns = [
  59. {
  60. label: '换货-换卡签',
  61. // 其他属性值
  62. id: 'ALL'
  63. },
  64. ]
  65. const bindPickerChange = (e) => {
  66. console.log('picker发送选择改变,携带值为', e.detail.value)
  67. index.value = e.detail.value
  68. form.applyType = columns[e.detail.value].id
  69. applyType.value = columns[e.detail.value].label
  70. }
  71. // 验证规则
  72. const rules = {
  73. }
  74. // 验证提示类型(toast要版本为1.3.5才支持)
  75. const errorType = ['message', 'border-bottom', 'toast']
  76. // 设置验证规则
  77. const myForm = ref(null)
  78. onReady(() => {
  79. // myForm.value.setRules(rules)
  80. })
  81. let show = ref(false)
  82. // 打开地区先择器
  83. const showPicker = function () {
  84. show.value = true
  85. }
  86. // 确定地区
  87. const confirm = (e) => {
  88. console.log(e, columns[e].id, columns[e].label);
  89. index.value = e
  90. form.applyType = columns[e].id
  91. applyType.value = columns[e].label
  92. }
  93. // 提交
  94. const submit = () => {
  95. if (form.applyType) {
  96. console.log('验证通过', form);
  97. navTo(`/subpackage/orders/apply-ex-goods?orderId=${form.orderId}&applyType=${form.applyType}`) //测试用
  98. } else {
  99. uni.showToast({
  100. title: "请选择申请类型",
  101. icon: "none"
  102. })
  103. }
  104. }
  105. onLoad((option) => {
  106. form.orderId = option.orderId
  107. oldId.value = option.id
  108. console.log(form,option.id);
  109. });
  110. </script>
  111. <style>
  112. page {
  113. width: 100%;
  114. height: 100%;
  115. display: flex;
  116. flex-direction: column;
  117. background-color: #F3F3F3;
  118. }
  119. </style>
  120. <style lang="scss" scoped>
  121. .oderPage {
  122. flex: 1;
  123. width: 100%;
  124. .from {
  125. background-color: #fff;
  126. margin-top: 20rpx;
  127. ::v-deep .u-form-item {
  128. padding: 0;
  129. line-height: normal;
  130. .u-form-item__message {
  131. margin-bottom: 12rpx
  132. }
  133. }
  134. .from_item {
  135. display: flex;
  136. flex-wrap: nowrap;
  137. justify-content: space-between;
  138. padding: 0 30rpx;
  139. align-items: center;
  140. height: 80rpx;
  141. ::v-deep .input {
  142. text-align: right;
  143. flex: 1;
  144. background: transparent;
  145. input {
  146. text-align: right;
  147. }
  148. }
  149. }
  150. .from_item1 {
  151. display: flex;
  152. flex-wrap: nowrap;
  153. flex-direction: column;
  154. justify-content: space-between;
  155. padding: 30rpx;
  156. border-bottom: #DCDCDC 1px solid;
  157. input {
  158. text-align: right;
  159. }
  160. .textarea {
  161. background-color: #F1F1F1;
  162. width: 100%;
  163. border-radius: 20rpx;
  164. margin-top: 10rpx;
  165. text-indent: 1rem;
  166. height: 180rpx;
  167. padding: 20rpx;
  168. box-sizing: border-box;
  169. }
  170. }
  171. }
  172. }
  173. .submit {
  174. background: linear-gradient(to left, #43A1E0 0%, #13E7C1 100%);
  175. width: 670rpx;
  176. height: 80rpx;
  177. color: #fff;
  178. border-radius: 100rpx;
  179. margin: 26px auto;
  180. font-size: 32rpx;
  181. }
  182. .red {
  183. color: red;
  184. margin-right: 10rpx;
  185. }
  186. .message {
  187. font-size: 30rpx;
  188. margin-top: 30rpx;
  189. padding: 0 20rpx;
  190. }
  191. </style>