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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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 style="color: #004576;"><text class="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="content">
  20. <view class="title"><text class="red">*</text>设备更换需将原设备寄回</view>
  21. <view class="title1"><image :src="`${$imgUrl}common/apply-goods.png`"></image><text>寄回信息</text></view>
  22. <view class="content-box">
  23. <view class="phone">
  24. <text>收件人:</text>
  25. <text>ETC售后</text>
  26. </view>
  27. <view class="phone">
  28. <text>联系电话:</text>
  29. <text>18798751224</text>
  30. </view>
  31. <view>此电话仅用于ETC售后收取快递,如需咨询业务请致电4008008787</view>
  32. </view>
  33. <view class="title1"><image :src="`${$imgUrl}common/tips.png`"></image><text>寄回地址</text></view>
  34. <view class="content-box">补换订单审核时效:设备签收后的2个自然日完成审核,审核通过后请关注订单物流单号;</view>
  35. </view>
  36. <button class="submit" @click="submit">下一步</button>
  37. </view>
  38. </template>
  39. <script setup lang="ts">
  40. import {
  41. navTo
  42. } from "@/utils/utils.ts"
  43. import {
  44. ref,
  45. reactive
  46. } from "vue";
  47. import {
  48. onReady
  49. } from "@dcloudio/uni-app";
  50. import {
  51. onLoad
  52. } from "@dcloudio/uni-app";
  53. // 表单数据
  54. const form = reactive({
  55. orderId: '',
  56. orderNo: '',
  57. applyType: '',
  58. })
  59. //接受通过该id查询订单详情
  60. const oldId = ref('')
  61. const applyType = ref('')
  62. //选择器数据
  63. const index = ref('-1');
  64. const columnsOld = ["换货-换卡签"]
  65. const columns = [
  66. {
  67. label: '换货-换卡签',
  68. // 其他属性值
  69. id: 'ALL'
  70. },
  71. ]
  72. const bindPickerChange = (e) => {
  73. console.log('picker发送选择改变,携带值为', e.detail.value)
  74. index.value = e.detail.value
  75. form.applyType = columns[e.detail.value].id
  76. applyType.value = columns[e.detail.value].label
  77. }
  78. // 验证规则
  79. const rules = {
  80. }
  81. // 验证提示类型(toast要版本为1.3.5才支持)
  82. const errorType = ['message', 'border-bottom', 'toast']
  83. // 设置验证规则
  84. const myForm = ref(null)
  85. onReady(() => {
  86. // myForm.value.setRules(rules)
  87. })
  88. let show = ref(false)
  89. // 打开地区先择器
  90. const showPicker = function () {
  91. show.value = true
  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(option,option.id);
  109. });
  110. </script>
  111. <style>
  112. page {
  113. width: 100%;
  114. height: 100%;
  115. display: flex;
  116. flex-direction: column;
  117. }
  118. </style>
  119. <style lang="scss" scoped>
  120. .oderPage {
  121. flex: 1;
  122. width: 100%;
  123. .from {
  124. background-color: #fff;
  125. ::v-deep .u-form-item {
  126. padding: 0;
  127. line-height: normal;
  128. .u-form-item__message {
  129. margin-bottom: 12rpx
  130. }
  131. }
  132. .from_item {
  133. display: flex;
  134. flex-wrap: nowrap;
  135. justify-content: space-between;
  136. padding: 0 30rpx;
  137. align-items: center;
  138. height: 80rpx;
  139. ::v-deep .input {
  140. text-align: right;
  141. flex: 1;
  142. background: transparent;
  143. input {
  144. text-align: right;
  145. }
  146. }
  147. }
  148. }
  149. }
  150. .submit {
  151. background:linear-gradient(to right,#01243A,#004576);
  152. width: 670rpx;
  153. height: 80rpx;
  154. color: #fff;
  155. border-radius: 100rpx;
  156. margin: 26px auto;
  157. font-size: 32rpx;
  158. }
  159. .red {
  160. color: red;
  161. margin-right: 10rpx;
  162. }
  163. .content{
  164. font-weight: 400;
  165. font-size: 28rpx;
  166. color: #6C6C6C;
  167. background-color: white;
  168. width: 100%;
  169. margin-top: 20rpx;
  170. padding: 30rpx;
  171. box-sizing: border-box;
  172. image{
  173. width: 8rpx;
  174. height: 26rpx;
  175. margin-right: 10rpx;
  176. }
  177. .title{
  178. font-weight: 400;
  179. font-size: 30rpx;
  180. color: #111111;
  181. }
  182. .title1{
  183. font-weight: 400;
  184. font-size: 28rpx;
  185. color: #111111;
  186. margin: 20rpx 0 30rpx 0;
  187. }
  188. .content-box{
  189. background: #F1F1F1;
  190. padding: 20rpx;
  191. .phone{
  192. margin-bottom: 6rpx;
  193. text:first-child{
  194. margin-right: 6rpx;
  195. }
  196. }
  197. }
  198. }
  199. </style>