record.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <theme>
  3. <view class="wrap">
  4. <Navbar title="意向记录" fixed border> </Navbar>
  5. <view class="content">
  6. <List url="/rongimcall/froms/lists" ref="listRef" @datas="getList">
  7. <template #item="{ item }">
  8. <view class="item_card">
  9. <ImageGrid
  10. :images="urlStrToArr(item.goods_imgs)"
  11. isSeeLarge
  12. v-if="item.goods_imgs"
  13. />
  14. <view class="item_header">
  15. <view class="goods_info">
  16. <view class="goods_name">{{ item.goods_name }}</view>
  17. <view class="goods_desc" v-if="item.goods_desc">
  18. {{ item.goods_desc }}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="item_content">
  23. <view class="price_section">
  24. <view class="price_label"><trans _t="价格区间" />:</view>
  25. <view class="price_value">
  26. <text v-if="item.min_price && item.max_price">
  27. {{ symbol.symbol }}&nbsp;{{ Moneyhtml(item.min_price) }} -
  28. {{ symbol.symbol }}&nbsp;{{ Moneyhtml(item.max_price) }}
  29. </text>
  30. <text v-else-if="item.min_price">
  31. <trans _t="最低价" />:{{ symbol.symbol }}&nbsp;{{
  32. Moneyhtml(item.min_price)
  33. }}
  34. </text>
  35. <text v-else-if="item.max_price">
  36. <trans _t="最高价" />:{{ symbol.symbol }}&nbsp;{{
  37. Moneyhtml(item.max_price)
  38. }}
  39. </text>
  40. </view>
  41. </view>
  42. <view class="quantity_section" v-if="item.goods_num">
  43. <view class="quantity_label"><trans _t="购买数量" />:</view>
  44. <view class="quantity_value">{{ item.goods_num }}</view>
  45. </view>
  46. </view>
  47. <!-- 联系人信息 -->
  48. <view class="item_footer">
  49. <view class="contact_info">
  50. <view class="contact_item">
  51. <text class="contact_label"
  52. ><trans _t="联系人姓名" />:</text
  53. >
  54. <text class="contact_value">{{ item.name }}</text>
  55. </view>
  56. <view class="contact_item">
  57. <text class="contact_label"
  58. ><trans _t="联系人电话" />:</text
  59. >
  60. <text class="contact_value">{{ item.mobile }}</text>
  61. </view>
  62. </view>
  63. <view class="item_time">
  64. <text class="time_text">{{
  65. useGlobal().$format(item.indate)
  66. }}</text>
  67. </view>
  68. </view>
  69. </view>
  70. </template>
  71. </List>
  72. </view>
  73. </view>
  74. </theme>
  75. </template>
  76. <script setup>
  77. import Navbar from "@/components/navbar";
  78. import List from "@/components/list";
  79. import ImageGrid from "@/components/ImageGrid";
  80. import { computed, ref, nextTick } from "vue";
  81. import { t } from "@/locale";
  82. import { onShow } from "@dcloudio/uni-app";
  83. import { useGlobal, urlStrToArr, Moneyhtml } from "@/utils";
  84. import { useSystemStore } from "@/store";
  85. const useSystem = useSystemStore();
  86. const symbol = computed(() => useSystem.getSymbol);
  87. const listRef = ref(null);
  88. const dataList = ref([]);
  89. const getList = (list) => {
  90. dataList.value = list;
  91. };
  92. onShow(() => {
  93. nextTick(() => {
  94. listRef.value && listRef.value.handleRefresh();
  95. });
  96. });
  97. </script>
  98. <style lang="less" scoped>
  99. @import url("@/style.less");
  100. .wrap {
  101. background: var(--bg);
  102. min-height: 100vh;
  103. .content {
  104. flex-grow: 1;
  105. height: calc(100vh - 44px);
  106. flex-direction: column;
  107. padding: 24rpx;
  108. box-sizing: border-box;
  109. .item_card {
  110. background: var(--card-bg, #fff);
  111. border-radius: 20rpx;
  112. padding: 24rpx;
  113. margin-bottom: 24rpx;
  114. box-shadow: 0px 4rpx 20rpx 0px rgba(0, 0, 0, 0.08);
  115. border: 1px solid var(--border-color, #f0f0f0);
  116. .item_header {
  117. display: flex;
  118. margin-bottom: 20rpx;
  119. .goods_images {
  120. width: 160rpx;
  121. height: 160rpx;
  122. margin-right: 20rpx;
  123. border-radius: 12rpx;
  124. overflow: hidden;
  125. background: var(--bg-light, #f8f9fa);
  126. flex-shrink: 0;
  127. .main_image {
  128. width: 100%;
  129. height: 100%;
  130. }
  131. .no_image {
  132. width: 100%;
  133. height: 100%;
  134. display: flex;
  135. align-items: center;
  136. justify-content: center;
  137. background: var(--bg-light, #f8f9fa);
  138. .no_image_text {
  139. color: var(--text-light, #999);
  140. .size(20rpx);
  141. }
  142. }
  143. }
  144. .goods_info {
  145. flex: 1;
  146. display: flex;
  147. flex-direction: column;
  148. justify-content: space-between;
  149. .goods_name {
  150. color: var(--text);
  151. .size(28rpx);
  152. font-weight: 600;
  153. line-height: 1.4;
  154. margin-bottom: 8rpx;
  155. word-wrap: break-word;
  156. word-break: break-all;
  157. }
  158. .goods_desc {
  159. color: var(--text-light, #666);
  160. .size(24rpx);
  161. line-height: 1.4;
  162. word-wrap: break-word;
  163. word-break: break-all;
  164. }
  165. }
  166. }
  167. .item_content {
  168. margin-bottom: 20rpx;
  169. padding: 16rpx 0;
  170. border-top: 1px solid var(--border-light, #f0f0f0);
  171. border-bottom: 1px solid var(--border-light, #f0f0f0);
  172. .price_section {
  173. display: flex;
  174. align-items: center;
  175. margin-bottom: 12rpx;
  176. .price_label {
  177. color: var(--text-light, #666);
  178. .size(24rpx);
  179. margin-right: 12rpx;
  180. min-width: 120rpx;
  181. }
  182. .price_value {
  183. color: var(--red);
  184. .size(26rpx);
  185. font-weight: 600;
  186. }
  187. }
  188. .quantity_section {
  189. display: flex;
  190. align-items: center;
  191. .quantity_label {
  192. color: var(--text-light, #666);
  193. .size(24rpx);
  194. margin-right: 12rpx;
  195. min-width: 120rpx;
  196. }
  197. .quantity_value {
  198. color: var(--text);
  199. .size(26rpx);
  200. font-weight: 500;
  201. }
  202. }
  203. }
  204. .item_footer {
  205. display: flex;
  206. justify-content: space-between;
  207. align-items: flex-end;
  208. .contact_info {
  209. flex: 1;
  210. .contact_item {
  211. display: flex;
  212. align-items: center;
  213. margin-bottom: 8rpx;
  214. &:last-child {
  215. margin-bottom: 0;
  216. }
  217. .contact_label {
  218. color: var(--text-light, #666);
  219. .size(22rpx);
  220. margin-right: 12rpx;
  221. min-width: 100rpx;
  222. }
  223. .contact_value {
  224. color: var(--text);
  225. .size(24rpx);
  226. font-weight: 500;
  227. }
  228. }
  229. }
  230. .item_time {
  231. .time_text {
  232. color: var(--text-light, #999);
  233. .size(20rpx);
  234. }
  235. }
  236. }
  237. }
  238. .null_warp {
  239. .null_text {
  240. min-height: 100rpx;
  241. .flex_center();
  242. .size(28rpx);
  243. color: #333;
  244. }
  245. }
  246. }
  247. }
  248. </style>