reportHistory.vue 6.7 KB

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