myentry.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view>
  3. <view class="filterbg">
  4. <view class="flex justify-between solids-bottom padding bg-white">
  5. <view class="text-bold">推荐</view>
  6. <view class="flex justify-end">
  7. <view class="cu-tag radius" data-filterbox="comjobs" @tap="showFilter">{{comjobslist.title}}</view>
  8. <view class="cu-tag radius" data-filterbox="status" @tap="showFilter">{{statuslist.title}}</view>
  9. </view>
  10. </view>
  11. <view class="filtercon" v-if="filterbox!==null">
  12. <view class="padding bg-white" v-if="filterbox=='comjobs'">
  13. <block v-for="(item,index) in comjobslist.data" :key="index">
  14. <button class="cu-btn margin-lr-xs margin-tb-xs" @click="checkComjobs(item.title,item.value)">{{item.title}}</button>
  15. </block>
  16. </view>
  17. <view class="padding bg-white" v-if="filterbox=='status'">
  18. <block v-for="(item,index) in statuslist.data" :key="index">
  19. <button class="cu-btn margin-lr-xs margin-tb-xs" @click="checkStatus(item.title,item.value)">{{item.title}}</button>
  20. </block>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="cu-list menu-avatar">
  25. <block v-for="(item,index) in plist" :key="index">
  26. <view class="padding-lr padding-top-sm padding-bottom-xs bg-white margin-top-sm solid-bottom">{{item.comjobs.title}}</view>
  27. <view class="cu-item" style="height: 180rpx;">
  28. <view class="content">
  29. <view class="text-red">
  30. <view class="text-cut">{{item.realname}} - {{item.mobile}}</view>
  31. </view>
  32. <view class="text-gray text-sm">
  33. <view class="text-cut">预计到达日期:{{item.arrivetime}}</view>
  34. <view class="text-cut">报名时间:{{item.createtime}}</view>
  35. </view>
  36. </view>
  37. <view class="action">
  38. <view class="cu-tag round bg-gray sm">{{item.status_text}}</view>
  39. </view>
  40. </view>
  41. <view class="grid solids-top text-center col-3 padding-tb-sm bg-white">
  42. <!-- <view @tap="delComlog" :data-itemlogid="item.id" :data-itemindex="index"><text class="cuIcon-delete padding-right-xs"></text> 删除 </view> -->
  43. <view @tap="makeTelephone" :data-telephone="item.comjobs.telephone"><text class="cuIcon-phone padding-right-xs"></text> 岗位电话 </view>
  44. <view @tap="showModal" :data-itemid="item.id" :data-itemindex="index" :data-itemstatus="item.status" data-target="detailModal"><text class="cuIcon-search padding-right-xs"></text> 详情 </view>
  45. </view>
  46. </block>
  47. </view>
  48. <uni-load-more :status="pstatus"></uni-load-more>
  49. <view class="cu-modal bottom-modal show" v-if="modalName=='detailModal'">
  50. <view class="cu-dialog">
  51. <view class="cu-bar bg-white justify-end">
  52. <view class="content">报备详情</view>
  53. <view class="action" @tap="hideModal">
  54. <text class="cuIcon-close text-red"></text>
  55. </view>
  56. </view>
  57. <view>
  58. <scroll-view scroll-y="true" class="echo-orderinfo">
  59. <view class="cu-bar bg-white solids-bottom margin-top-xs">
  60. <view class="action">
  61. <text class="cuIcon-title text-blue"></text> 报备信息
  62. </view>
  63. </view>
  64. <view class="padding bg-white">
  65. <view class="flex justify-start padding-bottom-sm">
  66. <view class="basis-xs text-gray padding-right-sm">招聘标题</view>
  67. <view class="basis-xl text-left"><text>{{nowreport.comjobs.title}}</text></view>
  68. </view>
  69. <view class="flex justify-start padding-bottom-sm">
  70. <view class="basis-xs text-gray padding-right-sm">报备姓名</view>
  71. <view class="basis-xl text-left"><text>{{nowreport.realname}}</text></view>
  72. </view>
  73. <view class="flex justify-start padding-bottom-sm">
  74. <view class="basis-xs text-gray padding-right-sm">手机号码</view>
  75. <view class="basis-xl text-left"><text>{{nowreport.mobile}}</text></view>
  76. </view>
  77. <view class="flex justify-start padding-bottom-sm">
  78. <view class="basis-xs text-gray padding-right-sm">身份证号</view>
  79. <view class="basis-xl text-left"><text>{{nowreport.idcard}}</text></view>
  80. </view>
  81. <view class="flex justify-start padding-bottom-sm">
  82. <view class="basis-xs text-gray padding-right-sm">报备状态</view>
  83. <view class="basis-xl text-left"><text>{{nowreport.status_text}}</text></view>
  84. </view>
  85. <view class="flex justify-start padding-bottom-sm">
  86. <view class="basis-xs text-gray padding-right-sm">预到时间</view>
  87. <view class="basis-xl text-left"><text>{{nowreport.arrivetime}}</text></view>
  88. </view>
  89. <view class="flex justify-start padding-bottom-sm">
  90. <view class="basis-xs text-gray padding-right-sm">报备备注</view>
  91. <view class="basis-xl text-left"><text>{{nowreport.remark==''?"无":nowreport.remark}}</text></view>
  92. </view>
  93. <view class="flex justify-start padding-bottom-sm">
  94. <view class="basis-xs text-gray padding-right-sm">报备时间</view>
  95. <view class="basis-xl text-left"><text>{{nowreport.createtime}}</text></view>
  96. </view>
  97. <view class="flex justify-start padding-bottom-sm">
  98. <view class="basis-xs text-gray padding-right-sm">反馈备注</view>
  99. <view class="basis-xl text-left"><text>{{nowreport.retremark==''?"无":nowreport.retremark}}</text></view>
  100. </view>
  101. </view>
  102. </scroll-view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
  110. var _this;
  111. export default {
  112. components: {
  113. uniLoadMore
  114. },
  115. data() {
  116. return {
  117. isRotate: false,
  118. userinfo: false,
  119. brokerinfo: false,
  120. filterbox: null,
  121. comjobslist: {
  122. title: "岗位",
  123. value: 0,
  124. data: []
  125. },
  126. statuslist: {
  127. title: "状态",
  128. value: 0,
  129. data: []
  130. },
  131. modalName: null,
  132. itemid: 0,
  133. itemindex: 0,
  134. itemstatus: 0,
  135. retremark: "",
  136. nowreport: {},
  137. pstatus: 'more',
  138. ppage: 1,
  139. psize: 20,
  140. plist: []
  141. };
  142. },
  143. onLoad: function() {
  144. _this = this;
  145. _this.userinfo = uni.getStorageSync('userinfo') || false;
  146. _this.brokerinfo = uni.getStorageSync('brokerinfo') || false;
  147. if (_this.userinfo===false || _this.brokerinfo===false){
  148. uni.reLaunch({
  149. url: "/pages/my/my"
  150. });
  151. return false;
  152. }
  153. _this.$req.ajax({
  154. path: "wcomjobs/brokerPageReport",
  155. data: {
  156. userid: _this.userinfo.id,
  157. }
  158. }).then((data) => {
  159. _this.comjobslist.data = data.comjobslist;
  160. _this.statuslist.data = data.statuslist;
  161. _this.getMore();
  162. }).catch((err) => {
  163. console.log("err: " + JSON.stringify(err));
  164. });
  165. },
  166. onPullDownRefresh: function() {
  167. _this.pageRefresh();
  168. },
  169. onReachBottom: function() {
  170. if (_this.pstatus !== 'more') {
  171. return;
  172. }
  173. _this.getMore();
  174. },
  175. methods: {
  176. showFilter: function(e) {
  177. var nowfilterbox = e.currentTarget.dataset.filterbox;
  178. if (_this.filterbox == nowfilterbox){
  179. _this.filterbox = null;
  180. }else{
  181. _this.filterbox = nowfilterbox;
  182. }
  183. uni.pageScrollTo({
  184. scrollTop: 0,
  185. duration: 300
  186. });
  187. },
  188. checkComjobs: function(title,value) {
  189. _this.comjobslist.title = title;
  190. _this.comjobslist.value = value;
  191. _this.filterbox = null;
  192. _this.pageRefresh();
  193. },
  194. checkStatus: function(title,value) {
  195. _this.statuslist.title = title;
  196. _this.statuslist.value = value;
  197. _this.filterbox = null;
  198. _this.pageRefresh();
  199. },
  200. pageRefresh: function() {
  201. _this.pstatus = 'more';
  202. _this.ppage = 1;
  203. _this.plist = [];
  204. _this.getMore();
  205. },
  206. getMore: function() {
  207. _this.$req.ajax({
  208. path: "wcomjobs/brokerListReport",
  209. data: {
  210. ppage: _this.ppage,
  211. psize: _this.psize,
  212. userid: _this.userinfo.id,
  213. comjobsid: _this.comjobslist.value,
  214. status: _this.statuslist.value
  215. }
  216. }).then((data) => {
  217. _this.pstatus = data.pstatus;
  218. _this.plist = _this.plist.concat(data.plist);
  219. _this.ppage += 1;
  220. uni.stopPullDownRefresh();
  221. }).catch((err) => {
  222. uni.showModal({
  223. title: '信息提示',
  224. content: err,
  225. showCancel: false
  226. });
  227. });
  228. },
  229. result: function(e) {
  230. _this.comjobsid = e.comjobsid;
  231. _this.status = e.status;
  232. _this.pageRefresh();
  233. },
  234. goDetail: function(comjobsid) {
  235. uni.navigateTo({
  236. url: '/pages/comjobs/detail?comjobsid=' + comjobsid
  237. });
  238. },
  239. showModal: function(e) {
  240. var itemindex = e.currentTarget.dataset.itemindex;
  241. _this.itemid = e.currentTarget.dataset.itemid;
  242. _this.itemindex = itemindex;
  243. _this.itemstatus = e.currentTarget.dataset.itemstatus;
  244. _this.nowreport = _this.plist[itemindex];
  245. _this.retremark = _this.nowreport.retremark;
  246. _this.modalName = e.currentTarget.dataset.target;
  247. },
  248. hideModal: function(e) {
  249. _this.modalName = null;
  250. },
  251. makeTelephone: function(e) {
  252. var telephone = e.currentTarget.dataset.telephone;
  253. uni.makePhoneCall({
  254. phoneNumber: telephone
  255. });
  256. },
  257. goNavPage: function(pageurl) {
  258. _this.userinfo = _this.checkLogin("/pages/my/my");
  259. if (_this.userinfo===false){
  260. return false;
  261. }
  262. uni.redirectTo({
  263. url: pageurl
  264. });
  265. },
  266. }
  267. }
  268. </script>
  269. <style>
  270. .cu-list.menu-avatar>.cu-item .content {
  271. width: calc(100% - 150rpx);
  272. left: 30rpx;
  273. }
  274. .cu-list.menu-avatar>.cu-item .action {
  275. text-align: right;
  276. width: 150rpx;
  277. }
  278. </style>