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.

cancellation-contract.vue 6.2KB

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