wreportlist.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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" @tap="makeTelephone" :data-telephone="item.mobile">{{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="showModal" :data-itemid="item.id" :data-itemindex="index" :data-itemstatus="item.status" data-target="statusModal"><text class="cuIcon-write padding-right-xs"></text> 状态 </view>
  44. <view @tap="makeTelephone" :data-telephone="item.broker.mobile"><text class="cuIcon-phone padding-right-xs"></text> 联系经纪人 </view>
  45. <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>
  46. </view>
  47. </block>
  48. </view>
  49. <uni-load-more :status="pstatus"></uni-load-more>
  50. <view class="cu-modal bottom-modal show" v-if="modalName=='statusModal'" @tap="hideModal">
  51. <view class="cu-dialog" @tap.stop="">
  52. <view class="cu-bar bg-white justify-end">
  53. <view class="content">点击选择要更改的状态</view>
  54. <view class="action" @tap="hideModal">
  55. <text class="cuIcon-close text-red"></text>
  56. </view>
  57. </view>
  58. <view class="solids-top">
  59. <radio-group class="block" @change="statusChange">
  60. <view class="cu-list menu text-left">
  61. <view class="cu-item">
  62. <label class="flex justify-between align-center flex-sub">
  63. <view class="flex-sub">待审核</view>
  64. <radio class="round" :class="itemstatus==1?'checked':''" :checked="itemstatus==1?true:false" value="1"></radio>
  65. </label>
  66. </view>
  67. <view class="cu-item">
  68. <label class="flex justify-between align-center flex-sub">
  69. <view class="flex-sub">待面试</view>
  70. <radio class="round" :class="itemstatus==2?'checked':''" :checked="itemstatus==2?true:false" value="2"></radio>
  71. </label>
  72. </view>
  73. <view class="cu-item">
  74. <label class="flex justify-between align-center flex-sub">
  75. <view class="flex-sub">已入职</view>
  76. <radio class="round" :class="itemstatus==3?'checked':''" :checked="itemstatus==3?true:false" value="3"></radio>
  77. </label>
  78. </view>
  79. <view class="cu-item">
  80. <label class="flex justify-between align-center flex-sub">
  81. <view class="flex-sub">无效报备</view>
  82. <radio class="round" :class="itemstatus==4?'checked':''" :checked="itemstatus==4?true:false" value="4"></radio>
  83. </label>
  84. </view>
  85. </view>
  86. </radio-group>
  87. <view class="cu-form-group align-start solids-top" v-if="itemstatus==4">
  88. <textarea style="text-align: left;" maxlength="140" placeholder="请输入反馈信息..." @input="retremarkInput" :value="setremark"></textarea>
  89. </view>
  90. <view class="padding bg-white flex flex-direction">
  91. <button class="cu-btn bg-blue margin-tb-sm lg" @tap="statusUpdate">确认提交</button>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="cu-modal bottom-modal show" v-if="modalName=='detailModal'">
  97. <view class="cu-dialog">
  98. <view class="cu-bar bg-white justify-end">
  99. <view class="content">报备详情</view>
  100. <view class="action" @tap="hideModal">
  101. <text class="cuIcon-close text-red"></text>
  102. </view>
  103. </view>
  104. <view>
  105. <scroll-view scroll-y="true" class="echo-orderinfo">
  106. <view class="cu-bar bg-white solids-bottom margin-top-xs">
  107. <view class="action">
  108. <text class="cuIcon-title text-blue"></text> 报备信息
  109. </view>
  110. </view>
  111. <view class="padding bg-white">
  112. <view class="flex justify-start padding-bottom-sm">
  113. <view class="basis-xs text-gray padding-right-sm">招聘标题</view>
  114. <view class="basis-xl text-left"><text>{{nowreport.comjobs.title}}</text></view>
  115. </view>
  116. <view class="flex justify-start padding-bottom-sm">
  117. <view class="basis-xs text-gray padding-right-sm">报备姓名</view>
  118. <view class="basis-xl text-left"><text>{{nowreport.realname}}</text></view>
  119. </view>
  120. <view class="flex justify-start padding-bottom-sm">
  121. <view class="basis-xs text-gray padding-right-sm">手机号码</view>
  122. <view class="basis-xl text-left"><text>{{nowreport.mobile}}</text></view>
  123. </view>
  124. <view class="flex justify-start padding-bottom-sm">
  125. <view class="basis-xs text-gray padding-right-sm">身份证号</view>
  126. <view class="basis-xl text-left"><text>{{nowreport.idcard}}</text></view>
  127. </view>
  128. <view class="flex justify-start padding-bottom-sm">
  129. <view class="basis-xs text-gray padding-right-sm">报备状态</view>
  130. <view class="basis-xl text-left"><text>{{nowreport.status_text}}</text></view>
  131. </view>
  132. <view class="flex justify-start padding-bottom-sm">
  133. <view class="basis-xs text-gray padding-right-sm">预到时间</view>
  134. <view class="basis-xl text-left"><text>{{nowreport.arrivetime}}</text></view>
  135. </view>
  136. <view class="flex justify-start padding-bottom-sm">
  137. <view class="basis-xs text-gray padding-right-sm">报备备注</view>
  138. <view class="basis-xl text-left"><text>{{nowreport.remark==''?"无":nowreport.remark}}</text></view>
  139. </view>
  140. <view class="flex justify-start padding-bottom-sm">
  141. <view class="basis-xs text-gray padding-right-sm">报备时间</view>
  142. <view class="basis-xl text-left"><text>{{nowreport.createtime}}</text></view>
  143. </view>
  144. <view class="flex justify-start padding-bottom-sm">
  145. <view class="basis-xs text-gray padding-right-sm">反馈备注</view>
  146. <view class="basis-xl text-left"><text>{{nowreport.retremark==''?"无":nowreport.retremark}}</text></view>
  147. </view>
  148. </view>
  149. </scroll-view>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
  157. var _this;
  158. export default {
  159. components: {
  160. uniLoadMore
  161. },
  162. data() {
  163. return {
  164. isRotate: false,
  165. userinfo: false,
  166. workerinfo: false,
  167. filterbox: null,
  168. comjobslist: {
  169. title: "岗位",
  170. value: 0,
  171. data: []
  172. },
  173. statuslist: {
  174. title: "状态",
  175. value: 0,
  176. data: []
  177. },
  178. modalName: null,
  179. itemid: 0,
  180. itemindex: 0,
  181. itemstatus: 0,
  182. retremark: "",
  183. nowreport: {},
  184. pstatus: 'more',
  185. ppage: 1,
  186. psize: 20,
  187. plist: []
  188. };
  189. },
  190. onLoad: function() {
  191. _this = this;
  192. _this.userinfo = _this.checkLogin("/pages/my/my");
  193. _this.workerinfo = uni.getStorageSync('workerinfo') || false;
  194. if (_this.userinfo === false || _this.workerinfo === false) {
  195. uni.reLaunch({
  196. url: "/pages/my/my"
  197. });
  198. return false;
  199. }
  200. _this.$req.ajax({
  201. path: "wcomjobs/pagereport",
  202. data: {
  203. userid: _this.userinfo.id,
  204. workerid: _this.workerinfo.id,
  205. }
  206. }).then((data) => {
  207. _this.comjobslist.data = data.comjobslist;
  208. _this.statuslist.data = data.statuslist;
  209. _this.getMore();
  210. }).catch((err) => {
  211. console.log("err: " + JSON.stringify(err));
  212. });
  213. },
  214. onPullDownRefresh: function() {
  215. _this.pageRefresh();
  216. },
  217. onReachBottom: function() {
  218. if (_this.pstatus !== 'more') {
  219. return;
  220. }
  221. _this.getMore();
  222. },
  223. methods: {
  224. showFilter: function(e) {
  225. var nowfilterbox = e.currentTarget.dataset.filterbox;
  226. if (_this.filterbox == nowfilterbox){
  227. _this.filterbox = null;
  228. }else{
  229. _this.filterbox = nowfilterbox;
  230. }
  231. uni.pageScrollTo({
  232. scrollTop: 0,
  233. duration: 300
  234. });
  235. },
  236. checkComjobs: function(title,value) {
  237. _this.comjobslist.title = title;
  238. _this.comjobslist.value = value;
  239. _this.filterbox = null;
  240. _this.pageRefresh();
  241. },
  242. checkStatus: function(title,value) {
  243. _this.statuslist.title = title;
  244. _this.statuslist.value = value;
  245. _this.filterbox = null;
  246. _this.pageRefresh();
  247. },
  248. pageRefresh: function() {
  249. _this.pstatus = 'more';
  250. _this.ppage = 1;
  251. _this.plist = [];
  252. _this.getMore();
  253. },
  254. getMore: function() {
  255. _this.$req.ajax({
  256. path: "wcomjobs/listreport",
  257. data: {
  258. ppage: _this.ppage,
  259. psize: _this.psize,
  260. workerid: _this.workerinfo.id,
  261. comjobsid: _this.comjobslist.value,
  262. status: _this.statuslist.value
  263. }
  264. }).then((data) => {
  265. _this.pstatus = data.pstatus;
  266. _this.plist = _this.plist.concat(data.plist);
  267. _this.ppage += 1;
  268. uni.stopPullDownRefresh();
  269. }).catch((err) => {
  270. uni.showModal({
  271. title: '信息提示',
  272. content: err,
  273. showCancel: false
  274. });
  275. });
  276. },
  277. result: function(e) {
  278. _this.comjobsid = e.comjobsid;
  279. _this.status = e.status;
  280. _this.pageRefresh();
  281. },
  282. goDetail: function(comjobsid) {
  283. uni.navigateTo({
  284. url: '/pages/comjobs/detail?comjobsid=' + comjobsid
  285. });
  286. },
  287. showModal: function(e) {
  288. var itemindex = e.currentTarget.dataset.itemindex;
  289. _this.itemid = e.currentTarget.dataset.itemid;
  290. _this.itemindex = itemindex;
  291. _this.itemstatus = e.currentTarget.dataset.itemstatus;
  292. _this.nowreport = _this.plist[itemindex];
  293. _this.retremark = _this.nowreport.retremark;
  294. _this.modalName = e.currentTarget.dataset.target;
  295. },
  296. hideModal: function(e) {
  297. _this.modalName = null;
  298. },
  299. retremarkInput: function(e) {
  300. _this.retremark = e.detail.value;
  301. },
  302. statusChange: function(e) {
  303. let origin_status = _this.itemstatus;
  304. _this.itemstatus = e.detail.value;
  305. if (_this.itemstatus <= origin_status) {
  306. uni.showModal({
  307. title: '信息提示',
  308. content: '状态只能往下面的选',
  309. showCancel: false
  310. });
  311. _this.itemstatus = String(origin_status);
  312. _this.modalName = null;
  313. return false;
  314. }
  315. },
  316. statusUpdate: function(e) {
  317. _this.$req.ajax({
  318. path: "wcomjobs/setreportstatus",
  319. data: {
  320. workerid: _this.workerinfo.id,
  321. id: _this.itemid,
  322. status: _this.itemstatus,
  323. retremark: _this.retremark
  324. }
  325. }).then((data) => {
  326. _this.modalName = null;
  327. _this.plist[_this.itemindex] = data.report;
  328. }).catch((err) => {
  329. uni.showModal({
  330. title: '信息提示',
  331. content: err,
  332. showCancel: false
  333. });
  334. });
  335. },
  336. delComlog: function(e) {
  337. var itemlogid = e.currentTarget.dataset.itemlogid;
  338. var itemindex = e.currentTarget.dataset.itemindex;
  339. uni.showModal({
  340. title: '信息提示',
  341. content: '删除后不可恢复,确定要删除吗?',
  342. success: function(res) {
  343. if (res.confirm) {
  344. _this.$req.ajax({
  345. path: "wcomjobs/dellog",
  346. data: {
  347. userid: _this.userinfo.id,
  348. workerid: _this.workerinfo.id,
  349. logid: itemlogid
  350. }
  351. }).then((data) => {
  352. _this.modalName = null;
  353. _this.plist.splice( itemindex, 1 );
  354. }).catch((err) => {
  355. uni.showModal({
  356. title: '信息提示',
  357. content: err,
  358. showCancel: false
  359. });
  360. });
  361. }
  362. }
  363. });
  364. },
  365. makeTelephone: function(e) {
  366. var telephone = e.currentTarget.dataset.telephone;
  367. uni.makePhoneCall({
  368. phoneNumber: telephone
  369. });
  370. }
  371. }
  372. }
  373. </script>
  374. <style>
  375. .cu-list.menu-avatar>.cu-item .content {
  376. width: calc(100% - 150rpx);
  377. left: 30rpx;
  378. }
  379. .cu-list.menu-avatar>.cu-item .action {
  380. text-align: right;
  381. width: 150rpx;
  382. }
  383. </style>