check.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <zj-page-layout>
  3. <view class="top-container">
  4. <view class="input">
  5. <u-input placeholder="请输入条码" v-model="code">
  6. <template slot="suffix">
  7. <u-icon @click="scanCode" name="scan" size="30"></u-icon>
  8. </template>
  9. </u-input>
  10. </view>
  11. <u-button type="primary" @tap="getDetail" text="查询"></u-button>
  12. </view>
  13. <view class="all-container" v-for="(item, index) in dataList" :key="index">
  14. <view class="info-container card">
  15. <view class="common-title">延保信息</view>
  16. <view>
  17. <view class="row">
  18. <view class="label">订单单号</view>
  19. <view class="value">{{ item.id }}</view>
  20. </view>
  21. <view class="row">
  22. <view class="label">服务类型</view>
  23. <view class="value">延保</view>
  24. </view>
  25. <view class="row">
  26. <view class="label">产品品牌</view>
  27. <view class="value">{{ item.brandName }}</view>
  28. </view>
  29. <view class="row">
  30. <view class="label">产品大类</view>
  31. <view class="value">{{ item.mainName }}</view>
  32. </view>
  33. <view class="row">
  34. <view class="label">服务内容</view>
  35. <view class="value">{{ item.increContent }}</view>
  36. </view>
  37. <view class="row">
  38. <view class="label">使用限值</view>
  39. <view class="value">{{ item.limitNum + '年' }}</view>
  40. </view>
  41. <view class="row">
  42. <view class="label">下单时间</view>
  43. <view class="value">{{ item.createTime }}</view>
  44. </view>
  45. <view class="row">
  46. <view class="label">销售网点</view>
  47. <view class="value">{{ item.websitName }}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="info-container card">
  52. <view class="common-title">产品信息</view>
  53. <view>
  54. <view class="row">
  55. <view class="label">内机条码</view>
  56. <view class="value">{{ item.insideCode }}</view>
  57. </view>
  58. <view class="row">
  59. <view class="label">原保到期</view>
  60. <view class="value">{{ item.insureTime.substring(0, 10) }}</view>
  61. </view>
  62. <view class="row">
  63. <view class="label">服务期限</view>
  64. <view class="value">{{
  65. item.insureTime.substring(0, 10) + '至' + item.serviceEndTime.substring(0, 10)
  66. }}</view>
  67. </view>
  68. </view>
  69. <view class="imgs">
  70. <view class="it">
  71. <image :src="item.insideCodeImg" mode="aspectFill"></image>
  72. <view class="text">内机条码</view>
  73. </view>
  74. <view class="it">
  75. <image :src="item.machineImg" mode="aspectFill"></image>
  76. <view class="text">机器铭牌(含出厂日期)</view>
  77. </view>
  78. <view class="it">
  79. <image :src="item.buyCertImg" mode="aspectFill"></image>
  80. <view class="text">购机凭证</view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="user-container card">
  85. <view class="common-title">客户信息</view>
  86. <view class="user">{{ item.userName }} {{ item.userMobile }}</view>
  87. <view class="address">{{ item.userAddress }}</view>
  88. </view>
  89. </view>
  90. </zj-page-layout>
  91. </template>
  92. <script>
  93. import { wxScanCode } from '@/common/utils/util.js'
  94. export default {
  95. data() {
  96. return {
  97. dataList: [],
  98. code: ''
  99. }
  100. },
  101. onLoad() {
  102. // this.getDetail();
  103. },
  104. computed: {
  105. deadline() {
  106. return function (time, num) {
  107. let date = new Date(time)
  108. date.setFullYear(date.getFullYear() + num)
  109. let y = date.getFullYear(),
  110. m = date.getMonth() + 1,
  111. d = date.getDate()
  112. return `${y}-${m > 9 ? m : '0' + m}-${d > 9 ? d : '0' + d}`
  113. }
  114. }
  115. },
  116. methods: {
  117. getDetail() {
  118. if (!this.code) {
  119. return this.$toast('请先输入或扫描条码!')
  120. }
  121. this.$api
  122. .post('/increConfig/listIncreCode', {
  123. pageNum: 1,
  124. pageSize: 10,
  125. code: this.code,
  126. payStatus: 'PAID'
  127. })
  128. .then(res => {
  129. if (res.data.records.length == 0) {
  130. this.$toast('暂未查询到该条码的延保信息')
  131. }
  132. this.dataList = res.data.records
  133. })
  134. },
  135. // 扫码
  136. async scanCode() {
  137. var codeVal = await wxScanCode(['barCode'])
  138. this.code = codeVal
  139. this.getDetail()
  140. },
  141. // 下拉刷新
  142. refresherrefresh() {},
  143. // 触底加载
  144. scrolltolower() {}
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. .top-container {
  150. padding: 30rpx 30rpx 0;
  151. ::v-deep .u-input {
  152. background: #ffffff;
  153. height: 80rpx;
  154. }
  155. ::v-deep .u-button {
  156. margin-top: 20rpx;
  157. }
  158. }
  159. .card {
  160. @include zj-card;
  161. padding: 30rpx;
  162. margin-top: 30rpx;
  163. }
  164. .common-title {
  165. font-weight: 500;
  166. }
  167. .all-container {
  168. padding: 0 30rpx 30rpx;
  169. }
  170. .info-container {
  171. .row {
  172. display: flex;
  173. margin-top: 20rpx;
  174. .label {
  175. font-size: 28rpx;
  176. color: $sec-font;
  177. margin-right: 20rpx;
  178. flex-shrink: 0;
  179. }
  180. .value {
  181. font-size: 28rpx;
  182. }
  183. .ctrl {
  184. font-size: 28rpx;
  185. color: $theme-color;
  186. margin-left: 20rpx;
  187. }
  188. }
  189. .imgs {
  190. display: flex;
  191. margin-top: 20rpx;
  192. .it {
  193. width: 180rpx;
  194. margin-right: 30rpx;
  195. image {
  196. width: 180rpx;
  197. height: 180rpx;
  198. }
  199. .text {
  200. font-size: 24rpx;
  201. text-align: center;
  202. }
  203. }
  204. }
  205. }
  206. .user-container {
  207. .user {
  208. font-size: 28rpx;
  209. margin-top: 20rpx;
  210. }
  211. .address {
  212. font-size: 28rpx;
  213. margin-top: 20rpx;
  214. }
  215. }
  216. </style>