reportHistory.vue 6.4 KB

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