reportHistory.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <div class="reportHistory">
  3. <div class="list">
  4. <div
  5. class="list-row"
  6. v-for="(item, index) in pageList"
  7. :key="index"
  8. @click="jumpDetailsPage(item, item.id)"
  9. >
  10. <div class="cell_1 width100">
  11. <div class="width100 height44rpx mb8rpx">
  12. <div class="report_title" @click="jumpDetailsPage(item, item.id)">
  13. {{ item.companyName }}
  14. </div>
  15. </div>
  16. <div class="width100 height44rpx mb8rpx">
  17. <div class="report_title" @click="jumpDetailsPage(item, item.id)">
  18. 走访类型:{{ getDicType(item.interviewType) }}
  19. </div>
  20. </div>
  21. <!-- <div class="width100 height40rpx mb8rpx border_bottom_f5f5f5">
  22. <div class="second_title height40rpx">
  23. 是否需要处理:{{ item.isStatus == "1" ? "否" : "是" }}
  24. </div>
  25. </div> -->
  26. <div
  27. class="width60 float_left list_date height40rpx lh40rpx margint8rpx"
  28. >
  29. {{ item.interviewTime }}
  30. </div>
  31. <div
  32. class="width40 float_left margint8rpx"
  33. v-if="
  34. !(
  35. (item.handleUserName || item.handleUserName == 'null') &&
  36. (item.handleResult || item.handleResult == 'null')
  37. )
  38. "
  39. >
  40. <!-- <van-button
  41. color="#1D18BC"
  42. class="colorfffff height40rpx float_right"
  43. size="mini"
  44. v-if="item.isStatus == 2"
  45. @click="openHandleReportDialog(item)"
  46. >
  47. 处理登记
  48. </van-button> -->
  49. </div>
  50. </div>
  51. </div>
  52. <div class="list-row" v-if="pageList.length == 0">
  53. <van-empty
  54. class="disblock marginauto"
  55. style="background: white"
  56. description="暂无数据"
  57. />
  58. </div>
  59. <handle-report ref="handleReport" @changeActive="getInterviewList()" />
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. import vanTab from "../../../../wxcomponents/weapp/dist/tab/index";
  65. import vanTabs from "../../../../wxcomponents/weapp/dist/tabs/index";
  66. import vanButton from "../../../../wxcomponents/weapp/dist/button/index";
  67. import vanEmpty from "../../../../wxcomponents/weapp/dist/empty/index";
  68. import vanDivider from "../../../../wxcomponents/weapp/dist/divider/index";
  69. import handleReport from "./handlereport.vue";
  70. import {
  71. getInterviewList,
  72. getByCodes,
  73. getUserLocalStorageInfo,
  74. } from "@/js_sdk/http.js";
  75. const form = {
  76. status: [],
  77. chaoxiang: [],
  78. statusArray: [],
  79. chaoxiangArray: [],
  80. zaitiTypeArray: [],
  81. roomSize1: "",
  82. roomSize2: "",
  83. guidePrice1: "",
  84. guidePrice2: "",
  85. loupan_value: null,
  86. groupIds: null,
  87. pageNum: 1,
  88. dic_key: ["interviewType"],
  89. dic_SelectList: {},
  90. pageSize: 10,
  91. total: 0,
  92. mnpBuildingIds: "",
  93. };
  94. export default {
  95. components: {
  96. vanTab,
  97. vanTabs,
  98. vanEmpty,
  99. vanDivider,
  100. vanButton,
  101. handleReport,
  102. },
  103. name: "reportHistoryr.vue",
  104. data() {
  105. return {
  106. dic_key: ["interviewType"],
  107. dic_SelectList: {},
  108. pageList: [],
  109. search: {
  110. pageSize: 10,
  111. pageNum: 1,
  112. },
  113. };
  114. },
  115. mounted() {
  116. this.search.interviewUserId =
  117. getUserLocalStorageInfo().user.id == 1
  118. ? ""
  119. : getUserLocalStorageInfo().user.id;
  120. this.getInterviewList();
  121. this.getByCodes();
  122. // this.findYuanQuList()
  123. // this.getByCodes()
  124. },
  125. onLoad() {
  126. this.search.interviewUserId =
  127. getUserLocalStorageInfo().user.id == 1
  128. ? ""
  129. : getUserLocalStorageInfo().user.id;
  130. this.getInterviewList();
  131. },
  132. methods: {
  133. jumpDetailsPage(item, id) {
  134. console.log(item);
  135. if (item.isStatus == 2 && !item.handleUserName && !item.handleResult) {
  136. return;
  137. }
  138. uni.navigateTo({
  139. url:
  140. "/pages/subPackages/companyreport/components/reportDetails?id=" + id,
  141. });
  142. },
  143. changeActive() {
  144. this.$emit("changeActive");
  145. const token = uni.getStorageSync("laocui_user_info");
  146. this.search.createdBy =
  147. JSON.parse(token).user.id == 1 ? "" : JSON.parse(token).user.id;
  148. this.getInterviewList();
  149. this.getByCodes();
  150. },
  151. async getByCodes() {
  152. let data = await getByCodes(JSON.stringify(this.dic_key));
  153. this.dic_SelectList = this.$common.handleDicList(data);
  154. this.dic_SelectList.interviewType[0].id;
  155. },
  156. getDicType(value) {
  157. if (!value) return;
  158. let interviewType = this.dic_SelectList.interviewType;
  159. let index = interviewType.findIndex((e) => e.value == value);
  160. if (index != -1) {
  161. return interviewType[index].label;
  162. } else {
  163. return "";
  164. }
  165. },
  166. async getMoreListData() {
  167. let that = this;
  168. that.search.pageNum = that.search.pageNum + 1;
  169. let list = await getInterviewList(that.search);
  170. if (list.rows == 0) {
  171. that.$showToast("没有更多数据了");
  172. } else {
  173. list.rows.forEach((e) => {
  174. that.pageList.push(e);
  175. });
  176. }
  177. },
  178. async getInterviewList() {
  179. const token = uni.getStorageSync("laocui_user_info");
  180. this.search.createdBy =
  181. JSON.parse(token).user.id == 1 ? "" : JSON.parse(token).user.id;
  182. this.search.pageNum = 1;
  183. this.search.pageSize = 10;
  184. this.search.total = 0;
  185. let data = await getInterviewList(this.search);
  186. this.pageList = data.rows;
  187. },
  188. openHandleReportDialog(item) {
  189. this.$refs.handleReport.openDianlog(item);
  190. },
  191. },
  192. };
  193. </script>
  194. <style lang="scss">
  195. /deep/.van-cell {
  196. padding: 0 0 0 28rpx !important;
  197. }
  198. .inputClass {
  199. padding: 0 0 0 28rpx !important;
  200. }
  201. .reportHistory {
  202. .search_btn {
  203. margin-left: 18rpx;
  204. width: calc(100% - 18rpx);
  205. height: 60rpx;
  206. }
  207. .reset_btn {
  208. color: #2628a9 !important;
  209. width: 100%;
  210. height: 60rpx;
  211. }
  212. .list-row {
  213. width: calc(100% - 64rpx);
  214. padding: 32rpx;
  215. background: #ffffff;
  216. margin-bottom: 16rpx;
  217. display: flex;
  218. //height: 278rpx;
  219. border-radius: 8rpx 8rpx 8rpx 8rpx;
  220. }
  221. .second_title {
  222. float: left;
  223. width: 50%;
  224. font-size: 28rpx;
  225. font-family: PingFang SC-Medium, PingFang SC;
  226. font-weight: 500;
  227. color: #777777;
  228. }
  229. .list {
  230. width: calc(100% - 64rpx);
  231. margin: 32rpx;
  232. }
  233. .form {
  234. width: calc(100% - 128rpx);
  235. margin: 32rpx;
  236. background: #ffffff;
  237. padding: 32rpx;
  238. .label {
  239. height: 53rpx;
  240. line-height: 53rpx;
  241. }
  242. }
  243. .checklist-box {
  244. margin: 0 !important;
  245. margin-right: 16rpx !important;
  246. }
  247. .labelcolmt26 {
  248. input {
  249. border-radius: 8rpx 8rpx 8rpx 8rpx;
  250. border: 2rpx solid #cccccc;
  251. text-align: center;
  252. }
  253. .van-col {
  254. margin-top: 26rpx !important;
  255. }
  256. label {
  257. color: #333333;
  258. font-size: 30rpx;
  259. margin-top: 10rpx !important;
  260. }
  261. .uni-data-checklist {
  262. margin-top: -10rpx !important;
  263. }
  264. }
  265. .status {
  266. .uni-data-checklist {
  267. margin-top: 0rpx !important;
  268. }
  269. label {
  270. color: #333333;
  271. font-size: 30rpx;
  272. padding-right: 0rpx !important;
  273. }
  274. }
  275. }
  276. </style>