memberList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <!-- 商家-已报名人员列表 -->
  2. <template>
  3. <view>
  4. <view class="main_width">
  5. <view class="loading_text" v-if="loading">加载中...</view>
  6. <view v-else>
  7. <view class="plan_dotime_box" v-if="plan_dotime_arr.length>1">
  8. <view class="plan_dotime">
  9. <view :style="current_plan_dotime==''? 'font-weight: bold;':'font-weight: normal;'"
  10. @click="set_plan_dotime('')">全部报名日期</view>
  11. <view :style="current_plan_dotime==item? 'font-weight: bold;':'font-weight: normal;'"
  12. @click="set_plan_dotime(item)" v-for="item in plan_dotime_arr">{{item}}</view>
  13. </view>
  14. <view style="clear: both;"></view>
  15. </view>
  16. <view v-if="item.plan_dotime == current_plan_dotime||current_plan_dotime==''" class="item_box"
  17. :key="index" v-for="(item, index) in data">
  18. <view style="position: relative;" class="item">
  19. <view v-if="workteam_mode==0" style="position: absolute;right: 0;top: 0;"
  20. :class="item.wk_realname_handled=='1'? 'tags':'tags2' ">
  21. {{item.wk_realname_handled=='1'?'已实名':'未实名'}}
  22. </view>
  23. <!-- 状态名称-->
  24. <view style="display: flex;align-items: center;">
  25. <view @click="show_remark(item.remark)" class="status_title">
  26. {{item.statusName||''}}{{item.salary_status==1?'(部分结算)':''}}{{item.statusName == '已结算'&&item.final_status == 1?' 自动结算':''}}
  27. </view>
  28. </view>
  29. <!-- 基础信息显示 -->
  30. <view>
  31. <!-- 头像姓名 -->
  32. <view style="position: relative;" class="mem_item">
  33. <view class="auth" v-if="item.wk_idcard">身份已认证</view>
  34. <image :src="item.wkprofile_photo?item.wkprofile_photo: '../../static/user.png'">
  35. </image>
  36. <view style="font-size: 32upx;margin-left: 15upx;">
  37. {{item.wk_name}}
  38. </view>
  39. <view @click="contact(item)" style="color: #01bcc3; margin-left: 15upx;">联系会员</view>
  40. </view>
  41. <!-- 性别年龄 -->
  42. <view class="box" style="display: flex;align-items: center;margin-top:30upx;">
  43. <view style="width: 25%;text-align: left;">性别:{{item.gender}}</view>
  44. <view style="width: 25%;">年龄:{{item.wk_age}}</view>
  45. <view style="width: 25%;color: #01bcc3;">
  46. <navigator :url="'/pages/personal/resumeCheck?id='+item.wkid">查看简历</navigator>
  47. </view>
  48. <view style="border: none;width:25%;color: #01bcc3;">
  49. <navigator :url="'/pages/personal/appraisal?type=1&id='+item.wkid">查看评价</navigator>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 操作模块 双方评价 -->
  54. <view style="margin-top: 30upx;">
  55. <!-- 已结算显示 -->
  56. <view v-if="item.status==5">
  57. <!-- 会员对我的评价 -->
  58. <view v-if="item.wk_appraiseLevel!=-1">
  59. <view v-if="item.wk_appraiseLevel">
  60. <view style="display: flex;align-items: center;height: 50upx;">
  61. <view style="margin-right: 10upx;color: #ff5500;">会员评价</view>
  62. <trailerStars allowTap="0" :innerScore="item.wk_appraiseLevel">
  63. </trailerStars>
  64. </view>
  65. <view style="color: #8E97AE;">评价内容:{{item.wk_appraiseRemark}}
  66. </view>
  67. </view>
  68. <view style="color: #ff5500;" v-else>待会员评价</view>
  69. </view>
  70. <!-- 我对会员的评价 -->
  71. <view v-if="item.td_appraiseLevel!=-1" style="margin-top: 20upx;">
  72. <view v-if="item.td_appraiseLevel">
  73. <view style="display: flex;align-items: center;height: 50upx;">
  74. <view style="margin-right: 10upx;color: #ff5500;">我的评价</view>
  75. <trailerStars allowTap="0" :innerScore="item.td_appraiseLevel">
  76. </trailerStars>
  77. </view>
  78. <view style="color: #8E97AE;">评价内容:
  79. {{item.td_appraiseRemark}}
  80. </view>
  81. </view>
  82. <view style="display: flex;" v-else>
  83. <view @click="open_modal('appraise',item.id)" class="confirm">评价该会员</view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. <view style="color: #8D8D8D;margin-top: 5upx;">
  89. 报名时间:{{item.createtime}}</view>
  90. <view style="color: #8D8D8D;margin-top: 5upx;" v-if="item.plan_dotime">
  91. 上班日期:{{item.plan_dotime}}</view>
  92. <view>
  93. <view style="color: #8D8D8D;margin-top: 5upx;" v-if="item.worked_begintime">
  94. 开始工作时间:{{item.worked_begintime}}</view>
  95. <view style="color: #8D8D8D;margin-top: 5upx;" v-if="item.worked_finishtime">
  96. 结束工作时间:{{item.worked_finishtime}}</view>
  97. </view>
  98. <!-- 操作模块 录用,结算 -->
  99. <view style="margin-left: 2%;" class="order_box">
  100. <!-- 待录用显示 -->
  101. <view class="order_btn_box" v-if="item.status==1">
  102. <view @click="open_modal('refuseSign',item.id, item)" class="cancel">拒绝
  103. </view>
  104. <view @click="open_modal('allowSign',item.id,item)" class="confirm">录用
  105. </view>
  106. </view>
  107. <!-- 待结算显示 -->
  108. <view class="order_btn_box" v-if="item.status==4">
  109. <view @click="open_modal('refusePay',item.id,item)" class="cancel">拒绝支付</view>
  110. <view @click="open_modal('allowPay',item.id,item)" class="confirm">确认支付</view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="loading_text" v-if="data.length==0&&!loading">暂无数据</view>
  117. <view style="height: 200upx;"></view>
  118. </view>
  119. <!-- 遮罩内容 -->
  120. <uni-popup ref="popup" :mask-click="false">
  121. <view style="overflow: hidden;" class="modal_box">
  122. <!-- 评分 -->
  123. <view v-if="todo == 'appraise'" style="margin-top: 30upx;margin-left: 30upx;">
  124. <trailerStars allowTap="1" v-on:changeScore="changeScore" :innerScore="score">
  125. </trailerStars>
  126. </view>
  127. <view style=" margin-top: 30upx;">
  128. <textarea v-model="reason" @input="textarea_ipt" style="text-indent: 20upx;"
  129. :placeholder="todo_remarks"></textarea>
  130. <view class="modal_btn">
  131. <view @click="close_modal()" class="modal_btn_cancel">取消</view>
  132. <view @click="process()" class="modal_btn_confirm">
  133. 确认{{todo_title}}{{todo=='allowPay'?(btr_feetotal+'元'):''}}</view>
  134. </view>
  135. </view>
  136. </view>
  137. </uni-popup>
  138. </view>
  139. </template>
  140. <script>
  141. import commonData from '../../commonData.js'
  142. import commonFun from '../../commonFun.js'
  143. import trailerStars from '../../components/starts/index.vue'
  144. export default {
  145. data() {
  146. return {
  147. checkUrlImg: 'url(' + this.serverUrl + 'check.png)',
  148. greenUrlImg: 'url(' + this.serverUrl + 'green_point.png)',
  149. downUrlImg: 'url(' + this.serverUrl + 'arrow_down_green.png)',
  150. id: '', //招聘id
  151. loading: false,
  152. check_box: [], //单选框单选状态
  153. data: [],
  154. workId: '',
  155. todo_title: '',
  156. todo_remarks: '',
  157. todo: '',
  158. reason: '',
  159. score: 5,
  160. btr_feetotal: '', //需要支付的金额
  161. status: 0, //get_data()中的status参数
  162. plan_dotime_arr: [], //可选日期
  163. current_plan_dotime: '',
  164. }
  165. },
  166. onPullDownRefresh() {
  167. this.get_data()
  168. },
  169. onLoad(e) {
  170. this.id = e.id //订单id
  171. // this.id = 503 //订单id
  172. this.status = e.status || 0
  173. this.get_data()
  174. },
  175. components: {
  176. trailerStars
  177. },
  178. methods: {
  179. set_plan_dotime(value) {
  180. this.current_plan_dotime = value
  181. },
  182. // 联系会员
  183. contact(item) {
  184. if (item.status > 1 || item.status == -3 || item.status == -5 || item.status == -8) {
  185. uni.showActionSheet({
  186. itemList: ['在线沟通', '拨打电话'],
  187. success: (res) => {
  188. if (res.tapIndex == 0) {
  189. uni.setStorageSync('targetUser', {
  190. name: item.wk_name,
  191. avatar: item.wkprofile_photo
  192. })
  193. // console.log(item)
  194. // console.log(uni.getStorageSync('targetUser'))
  195. uni.navigateTo({
  196. url: '/pages/message/chat?to=user_' + item.wkid
  197. })
  198. } else {
  199. uni.makePhoneCall({
  200. phoneNumber: item.bu_mobile,
  201. fail: res => {
  202. uni.showModal({
  203. title: '拨号失败',
  204. content: JSON.stringify(res),
  205. showCancel: false
  206. })
  207. }
  208. });
  209. }
  210. },
  211. });
  212. } else {
  213. uni.showModal({
  214. title: '录取后获得联系方式',
  215. showCancel: false
  216. })
  217. }
  218. },
  219. // 输入操作备注
  220. textarea_ipt(e) {
  221. this.reason = e.target.value
  222. },
  223. // 打开遮罩
  224. open_modal(todo, workId, item = {}) {
  225. if (item) {
  226. this.btr_feetotal = item.btr_feetotal
  227. }
  228. this.workId = workId
  229. this.todo_remarks = commonData.todo_title_obj[todo]['remarks'] + (commonData.todo_title_obj[todo][
  230. 'is_require'
  231. ] ?
  232. '(必填)' : '')
  233. this.todo_title = commonData.todo_title_obj[todo]['title']
  234. this.todo = todo
  235. this.$refs.popup.open('top')
  236. },
  237. // 关闭遮罩
  238. close_modal() {
  239. this.$refs.popup.close('top')
  240. },
  241. // 处理
  242. process() {
  243. let params = {
  244. bizCatalog: 'TodoWorkEntity',
  245. handleMode: commonData.todo_title_obj[this.todo]['handleMode'],
  246. todo: commonData.todo_title_obj[this.todo]['todo'],
  247. teamid: '',
  248. workid: this.workId,
  249. reason: this.reason,
  250. appraiseLevel: this.score,
  251. appraiseRemark: this.reason,
  252. }
  253. console.log(params)
  254. if (this.todo == "appraise" && !params.appraiseLevel) {
  255. uni.showModal({
  256. content: '请评价后提交!',
  257. showCancel: false
  258. })
  259. return
  260. }
  261. console.log('process请求参数', params)
  262. // return
  263. if (commonData.todo_title_obj[this.todo]['is_require'] && params.reason == '') {
  264. uni.showModal({
  265. content: commonData.todo_title_obj[this.todo]['title'] + '备注是必填的!',
  266. showCancel: false
  267. })
  268. return
  269. }
  270. if (this.todo == 'allowPay' || this.todo == 'allowSign') {
  271. commonFun.paySettleMer(this.workId, () => {
  272. this.reason = ''
  273. this.close_modal()
  274. this.get_data()
  275. }, this.todo == 'allowPay' ? 'paySettle' : 'auditEnroll')
  276. return
  277. }
  278. uni.showLoading({
  279. title: '加载中...',
  280. mask: true
  281. })
  282. commonFun.requestUrl('&WsAjaxBiz=Trader&WsAjaxAction=entityDataHandle', params, res => {
  283. if (res.status) {
  284. uni.showModal({
  285. content: this.todo_title + '成功!',
  286. showCancel: false,
  287. success: res => {
  288. this.reason = ''
  289. this.close_modal()
  290. this.get_data()
  291. }
  292. })
  293. }
  294. uni.hideLoading()
  295. })
  296. },
  297. // 获取数据
  298. get_data() {
  299. this.loading = true
  300. uni.showLoading({
  301. title: '加载中...',
  302. mask: true
  303. })
  304. let params = {
  305. bizCatalog: 'TodoWorkEntity',
  306. handleMode: 'fetchall',
  307. pageIndex: 1,
  308. pageSize: 1000,
  309. orderby: 0,
  310. query: {
  311. recuritId: this.id,
  312. status: this
  313. .status, //0空-全部;1-待提交;2-已报名待审核;3-已审核待开工;4-报名被驳回;5-已开始工作;6-已结束工作待结算;7-已结算;8-主动取消报名;9-被违约 10-被动取消报名;11-未结算; 91-进行中;92-异常工单;,
  314. teamstatus: "",
  315. recuritTitle: '', //招聘标题筛选
  316. memberName: "", //成员姓名
  317. },
  318. }
  319. console.log('报名人员页面列表请求参数', params)
  320. commonFun.requestUrl('&WsAjaxBiz=Trader&WsAjaxAction=fetchPageData', params, res => {
  321. if (res.status) {
  322. this.data = res.data.Result.pageData.map(item => {
  323. item.gender = item.wk_gender == 0 ? '男' : item.wk_gender == 1 ? '女' : '--'
  324. return item
  325. })
  326. this.check_box = this.data.map(item => false)
  327. let plan_dotime_arr = []
  328. this.data.map(item => {
  329. if (plan_dotime_arr.indexOf(item.plan_dotime) == -1) {
  330. plan_dotime_arr.push(item.plan_dotime)
  331. }
  332. })
  333. this.plan_dotime_arr = plan_dotime_arr
  334. console.log('报名人员页面列表', this.data)
  335. console.log(this.plan_dotime_arr)
  336. }
  337. this.loading = false
  338. uni.hideLoading()
  339. uni.stopPullDownRefresh()
  340. })
  341. },
  342. // 评价星星回调
  343. changeScore(e) {
  344. this.score = e
  345. },
  346. // 展示备注信息
  347. show_remark(content) {
  348. uni.showModal({
  349. title: '操作备注',
  350. content,
  351. showCancel: false
  352. })
  353. }
  354. }
  355. }
  356. </script>
  357. <style>
  358. @import url("./memberList.css");
  359. </style>