Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

cancellation-contract.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="oderPage">
  3. <view class="head">
  4. 您的ETC卡类型是记账卡,需要先解约,才可继续办理更换业务,请确认您的签约信息
  5. </view>
  6. <u-form :model="form" ref="myForm" :error-type="errorType">
  7. <view class="from">
  8. <u-form-item prop="name">
  9. <view class="from_item">
  10. <text><text style="color: red"></text>签约银行</text>
  11. <u-input v-model="form.bank" value="" class="input" disabled />
  12. </view>
  13. </u-form-item>
  14. <u-form-item prop="name">
  15. <view class="from_item">
  16. <text><text style="color: red"></text>签约时间</text>
  17. <u-input v-model="form.time" value="2022-10-11 12:11:12" class="input" disabled />
  18. </view>
  19. </u-form-item>
  20. <u-form-item prop="name">
  21. <view class="from_item">
  22. <text><text style="color: red"></text>卡号</text>
  23. <u-input v-model="form.code" value="12312313213123" class="input" disabled />
  24. </view>
  25. </u-form-item>
  26. <u-form-item prop="name">
  27. <view class="from_item">
  28. <text><text style="color: red"></text>车牌号</text>
  29. <u-input v-model="form.carID" value="贵A123321" class="input" disabled />
  30. </view>
  31. </u-form-item>
  32. </view>
  33. </u-form>
  34. <button class="submit" @click="toPage()">下一步</button>
  35. </view>
  36. </template>
  37. <script setup lang="ts">
  38. import navBar from "./components/nav-bar.vue";
  39. import { checkStr } from "@/utils/utils";
  40. import { ref, reactive } from "vue";
  41. import { navTo } from "@/utils/utils";
  42. import { onReady } from "@dcloudio/uni-app";
  43. // 表单数据
  44. const form = reactive({
  45. bank: "工商银行",
  46. time: "2022-10-11 10:12:30",
  47. code: "12321123312313",
  48. carID: "贵A123321",
  49. });
  50. // 验证规则
  51. const rules = {
  52. receiving1: [
  53. {
  54. required: true,
  55. message: "请选择",
  56. trigger: ["change", "blur"],
  57. },
  58. ],
  59. receiving2: [
  60. {
  61. required: true,
  62. message: "请选择",
  63. trigger: ["change", "blur"],
  64. },
  65. ],
  66. code: [
  67. {
  68. required: true,
  69. message: "请输入",
  70. trigger: ["change", "blur"],
  71. },
  72. ],
  73. phone: [
  74. {
  75. required: true,
  76. message: "请输入手机号",
  77. trigger: ["change", "blur"],
  78. },
  79. {
  80. // 自定义验证函数,见上说明
  81. validator: (rule, value, callback) => {
  82. // 上面有说,返回true表示校验通过,返回false表示不通过
  83. console.log(checkStr(value, "mobile"), "0011");
  84. return checkStr(value, "mobile");
  85. },
  86. message: "手机号码不正确",
  87. trigger: ["change", "blur"],
  88. },
  89. ],
  90. // status: [{
  91. // required: true,
  92. // message: '请选择状态',
  93. //
  94. // trigger: ['change', 'blur'],
  95. };
  96. // 验证提示类型(toast要版本为1.3.5才支持)
  97. const errorType = ["message", "border-bottom", "toast"];
  98. // 设置验证规则
  99. const myForm = ref(null);
  100. onReady(() => {
  101. myForm.value.setRules(rules);
  102. });
  103. // 单选数据列表
  104. const radiolist1 = reactive([
  105. {
  106. name: "营业点自提",
  107. disabled: false,
  108. },
  109. {
  110. name: "邮寄",
  111. disabled: false,
  112. },
  113. ]);
  114. // 单选
  115. const radioChange = (n) => {
  116. console.log("radioChange", n);
  117. // if (n == '卡退费') {
  118. // flag.value = true
  119. // console.log(flag.value);
  120. // } else {
  121. // flag.value = false
  122. // console.log(flag.value);
  123. // }
  124. };
  125. // // 提交
  126. // const submit = () => {
  127. // myForm.value.validate((valid) => {
  128. // console.log(valid);
  129. // if (valid) {
  130. // console.log('验证通过', form);
  131. // } else {
  132. // console.log('验证未通过');
  133. // }
  134. // })
  135. // }
  136. const toPage = () => {
  137. navTo("/subpackage/after-sale/replace-equipment/release-products");
  138. };
  139. </script>
  140. <style>
  141. page {
  142. width: 100%;
  143. height: 100%;
  144. display: flex;
  145. flex-direction: column;
  146. background: #eef7f7;
  147. }
  148. </style>
  149. <style lang="scss" scoped>
  150. .oderPage {
  151. flex: 1;
  152. width: 100%;
  153. .head {
  154. padding: 30rpx;
  155. font-size: 28rpx;
  156. color: #303133;
  157. padding-bottom: 0;
  158. }
  159. .from {
  160. background-color: #fff;
  161. margin-top: 30rpx;
  162. padding: 0 30rpx;
  163. ::v-deep .u-form-item {
  164. padding: 0;
  165. line-height: normal;
  166. .u-form-item__message {
  167. margin-bottom: 12rpx;
  168. }
  169. }
  170. .from_item {
  171. display: flex;
  172. flex-wrap: nowrap;
  173. justify-content: space-between;
  174. align-items: center;
  175. height: 80rpx;
  176. border-bottom: 1rpx solid #dcdcdc;
  177. .btn {
  178. font-size: 24rpx;
  179. font-family: Microsoft YaHei;
  180. font-weight: 400;
  181. color: #ffffff;
  182. background: #00b38b;
  183. border-radius: 10rpx;
  184. padding: 10rpx 15rpx;
  185. }
  186. ::v-deep .input {
  187. text-align: right;
  188. flex: 1;
  189. background: transparent;
  190. input {
  191. text-align: right;
  192. }
  193. }
  194. }
  195. .from_item1 {
  196. display: flex;
  197. flex-wrap: nowrap;
  198. flex-direction: column;
  199. justify-content: space-between;
  200. padding: 30rpx;
  201. border-bottom: #dcdcdc 1px solid;
  202. input {
  203. text-align: right;
  204. }
  205. .textarea {
  206. background-color: #f1f1f1;
  207. width: 100%;
  208. border-radius: 20rpx;
  209. margin-top: 10rpx;
  210. text-indent: 1rem;
  211. height: 180rpx;
  212. padding: 20rpx;
  213. box-sizing: border-box;
  214. }
  215. }
  216. }
  217. }
  218. .submit {
  219. background: linear-gradient(to left, #43a1e0 0%, #13e7c1 100%);
  220. width: 670rpx;
  221. height: 80rpx;
  222. color: #fff;
  223. border-radius: 100rpx;
  224. position: fixed;
  225. left: 50%;
  226. transform: translate(-50%);
  227. bottom: 60rpx;
  228. font-size: 32rpx;
  229. }
  230. </style>