detail.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  1. <!-- 招聘详情 -->
  2. <template>
  3. <view class="loading_text" v-if="loading">加载中...</view>
  4. <view v-else>
  5. <view class="order_status_box">
  6. <image :src="process_line_arrow"></image>
  7. </view>
  8. <!-- 招聘信息 -->
  9. <view class="top_bg" style="padding-bottom: 20upx;position: relative;">
  10. <view class="main_width">
  11. <view class="green_title">{{data.title}}</view>
  12. <view class="green_sara">
  13. <view style="line-height: 44upx;">{{sys_role==0?data.salary:data.feetotal}}</view>
  14. <view style="font-size: 30upx;margin-left: 6upx;">元 /{{data.settleType?'完工结':'天'}}</view>
  15. </view>
  16. <view class="work_time">
  17. <view>
  18. <text
  19. v-if="data.settle_catalog==0">{{((data.begin_datetime==data.finish_datetime)||!data.finish_datetime)?data.begin_datetime:(data.begin_datetime+'~'+data.finish_datetime)}}</text>
  20. <text v-else>{{data.begin_datetime+'开始报名'}}</text>
  21. </view>
  22. <view style="margin-left: 20upx;display: flex;align-items: center;">
  23. <image class="mini_icon" src="../../static/clock_grey.png"></image>
  24. <text style="margin-left: 4upx;">{{data.begin_hour}}~{{data.finish_hour}}</text>
  25. </view>
  26. </view>
  27. <view class="guanfan">
  28. <view style="display: flex;align-items: center;">
  29. <image style="width: 30upx;height: 30upx;margin-right: 4upx;"
  30. :src="data.meals_providing==0?'../../static/guanfan_grey.png':'../../static/guanfan_green.png'">
  31. </image>
  32. <text
  33. :style="data.meals_providing==0?'color: #9B9B9B;':'color: #00C7B2;'">{{data.meals_providing==0?'不管饭':'管饭'}}</text>
  34. </view>
  35. <view style="display: flex;align-items: center;">
  36. <view class="has_signed">
  37. <image :key="index"
  38. v-for="(item,index) in formate_enrolled_heads(data.enrolled_heads, (Number(data.now_worker_total000)))"
  39. :src="serverUrl+'touxiang/'+item+'.png'"></image>
  40. </view>
  41. <text>{{data.now_worker_total000==0?'':(data.now_worker_total000+'人已报名')}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view style="padding: 0upx 0 20upx;position: relative;" class="main_width">
  47. <view @click="check_ins(8)" class="ins_nav">
  48. <image style="margin-right: 2upx;width: 32upx;height: 30upx;" src="../../static/ins_blue.png"></image>
  49. 小优保障
  50. </view>
  51. <view class="page_title">招聘要求</view>
  52. <view class="tags_top">
  53. <view>{{data.gender_mode==0?'性别不限':data.gender_mode==1?'限男':'限女'}}</view>
  54. <view>{{data.age_mode==0?'年龄不限':(data.age_min+'岁-'+data.age_max+'岁')}}</view>
  55. <view v-if="data.need_total">
  56. 总需求{{data.need_total}}人{{data.need_perday>0&&data.settle_catalog==1?(' 每天'+data.need_perday+'人'):''}}
  57. </view>
  58. </view>
  59. <view style="clear: both;height: 15upx;"></view>
  60. <view style="padding-bottom: 40upx;clear: both;">
  61. <view class="page_title2">岗位详情</view>
  62. <view style="margin-top: 10upx;font-size: 30upx;" class="main_text">工作内容</view>
  63. <view style="margin-top: 10upx;">
  64. <text class="main_text">{{data.work_desc}}</text>
  65. </view>
  66. <view style="margin-top: 30upx;font-size: 30upx;" class="main_text">工作要求</view>
  67. <view style="margin-top: 10upx;">
  68. <text class="main_text">{{data.requirements}}</text>
  69. </view>
  70. <image mode="widthFix" style="width: 100%;margin-top: 30upx;" v-if="data.profile_photo"
  71. :src="data.profile_photo"></image>
  72. </view>
  73. </view>
  74. <view v-if="!loading" style="margin-top: 0upx;padding-bottom: 20upx;">
  75. <mapBox :dataSource="positionData"></mapBox>
  76. </view>
  77. <!-- 公告声明,信息举报 -->
  78. <view v-if="sys_role==0&&IS_TOURIST!=1" class="ggsm_xxjb">
  79. <image @click="check_ins(13)" :src="ggsmImg"></image>
  80. <image @click="open_complaint_modal" :src="xxjbImg"></image>
  81. </view>
  82. <view class="main_width">
  83. <view style="margin-top: 30upx;padding-bottom: 30upx;">
  84. <view class="page_title2">机构信息</view>
  85. <view style="margin-top: 0upx;display: flex;flex-direction: row;justify-content: space-between;">
  86. <navigator :url="'../personal/resumeCheckMerchant?id='+id"
  87. style="display: flex;align-items: center;" class="main_text">
  88. <image
  89. style="width: 32upx;height:32upx;margin-right: 6upx;border-radius: 50%;margin-left: 7upx;"
  90. :src="data.bt_profile_photo"></image>
  91. {{data.bt_linker_name||data.bt_nickname||'--'}}
  92. <image style="width: 32upx;height:32upx;margin-left: 6upx;"
  93. :src="data.bt_linker_gender=='0'?'../../static/male.png': '../../static/female.png'">
  94. </image>
  95. </navigator>
  96. <navigator :url="'/pages/personal/appraisal?type=0&id='+data.biz_traderid"
  97. style="display: flex;align-items: center;">
  98. <trailerStars v-if="!loading" allowTap="0" v-on:changeScore="changeScore"
  99. :innerScore="data.trader_appraisal_avg">
  100. </trailerStars>
  101. <view style="color: #8E97AE;margin-left: 10upx;">{{data.trader_appraisal_avg.toFixed(1)}}</view>
  102. </navigator>
  103. </view>
  104. <navigator :url="'../personal/resumeCheckMerchant?id='+id"
  105. style="margin-top: 10upx;align-items: center;display: flex;margin-right: 10upx;" class="main_text">
  106. {{data.bt_companyname}}
  107. <image v-if="data.bt_certif_confirmed!=0" style="width: 50upx;height: 50upx;margin-right: 0upx;"
  108. :src="data.bt_certif_confirmed==1?serverUrlImg8:serverUrlImg9"></image>
  109. <text
  110. :style="'font-size: 22upx;color:'+(data.bt_certif_confirmed==0?'#909090':data.bt_certif_confirmed==1?'#f7942d':'#00c3b8')">{{data.bt_certif_confirmed==0?'商家认证中':data.bt_certif_confirmed==1?'个人认证':'企业认证'}}</text>
  111. </navigator>
  112. <!-- 小优保险 -->
  113. <view @click="check_ins(9)" style="background-color: #fff4f1;margin-top: 16upx;" class="insurance">
  114. <view style="display: flex;align-items: center;margin-left: 4%;">
  115. <image style="width: 36upx;height: 40upx;" :src="serverUrlImg7"></image>
  116. <view style="color: #fd5529;font-size: 34upx;margin-left: 20upx;">
  117. <view style="color: #F7942D;font-size: 32upx;">小优保险</view>
  118. <view style="color: #F7942D;font-size: 26upx;">为您保驾护航</view>
  119. </view>
  120. </view>
  121. <view style="margin-right: 4%; color: #F7942D;display: flex;align-items: center;">
  122. 了解详情
  123. <image style="width: 13upx;height: 22upx;margin-left: 10upx;"
  124. src="../../static/arrow_right_orange.png">
  125. </image>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="line_grey"></view>
  131. <view style="height: 150upx;"></view>
  132. <!-- 底部tab,只有会员端 才显示 -->
  133. <view :class="isIphoneX? 'det_btn_box det_btn_box2':'det_btn_box'" v-if="sys_role==0">
  134. <block>
  135. <!-- 分享按钮 -->
  136. <view @click="open_share_modal" style="background-color: #ffffff;height: 110upx;" class="bot_each2">
  137. <image style="width: 70upx;height: 48upx;" :src="share_botImg"></image>
  138. <view style="font-size: 24upx;text-align: center;margin-top: 8upx;">
  139. 成单得{{((Number(data.feetotal)-Number(data.salary))*(Number(data.sharer_fetchrate))).toFixed(2)}}元
  140. </view>
  141. </view>
  142. <!-- 报名和取消报名 -->
  143. <view v-if="data.todoinfo.canToEnroll" @click="open_sign_modal()" style="background-color: #00C7B2;"
  144. class="bot_each">
  145. <image style="width: 50upx;height: 48upx;" :src="sign2Img"></image>
  146. <view style="margin-left: 8upx;">报名</view>
  147. </view>
  148. <view v-else-if="data.todoinfo.canCancelEnroll==1" @click="open_cancel_sign_modal()"
  149. style="background-color: #de0003;" class="bot_each">取消报名</view>
  150. <view v-else style="background-color: #de0003;" class="bot_each">不可取消</view>
  151. <view @click="communicate" style="background-color: #f7942d;" class="bot_each">
  152. <image style="width: 50upx;height: 50upx;" :src="chatImg"></image>
  153. <view style="margin-left: 8upx;">沟通</view>
  154. </view>
  155. </block>
  156. </view>
  157. <!-- 投诉遮罩 -->
  158. <uni-popup ref="popup" :mask-click="false">
  159. <view class="modal_box">
  160. <view style="padding: 30upx;">
  161. <view style="font-weight: bold;margin-bottom: 20upx;">
  162. {{complain_type == 'order'?'投诉本次工单':'投诉此招聘信息'}}
  163. </view>
  164. <view
  165. style="display: inline-block;margin-right: 12upx;margin-bottom: 12upx;color: #f7942d;border: 2upx solid #f7942d; padding: 4upx 12upx;"
  166. :key="index" v-for="(item,index) in complain_ipt_arr" @click="add_ipt_value(index)">
  167. {{item.text}}
  168. </view>
  169. </view>
  170. <textarea style="height: 350upx;font-size: 30upx;" v-model="ipt_value" @input="ipt_change"
  171. placeholder="请输入投诉内容"></textarea>
  172. <view class="modal_btn">
  173. <view @click="close_complaint_modal" class="modal_btn_cancel">取消</view>
  174. <view @click="submitNewComplaint" class="modal_btn_confirm">提交</view>
  175. </view>
  176. </view>
  177. </uni-popup>
  178. <!-- 分享遮罩 -->
  179. <uni-popup :animation="false" ref="popup_share" :mask-click="false">
  180. <view class="modal_box">
  181. <image style="width: 100%;" mode="widthFix" :src="serverUrlImg4"></image>
  182. <view class="modal_btn">
  183. <view style="width: 25%;" @click="close_share_modal" class="modal_btn_cancel">取消</view>
  184. <button style="width: 35%;" open-type="share" class="modal_btn_confirm">
  185. 发送好友
  186. </button>
  187. <view @click="save_img" style="width: 35%;" class="modal_btn_confirm">分享到朋友圈</view>
  188. </view>
  189. </view>
  190. </uni-popup>
  191. <!-- 报名遮罩 -->
  192. <uni-popup ref="popup_sign" :mask-click="false">
  193. <view class="modal_box">
  194. <view style="color: #313131;text-align: center;font-size: 38upx;line-height: 90upx;">注意事项</view>
  195. <view class="mention">
  196. <view>1、确认好工作再报名,录取后无法随意更换或取消。</view>
  197. <view>2、乱报名将被平台记录会降低信用分对个人信用和报名造成影响。</view>
  198. <view>3、工作中敷衍、偷懒、弄虚作假等行为导致商家不支付薪资后果自行承担。</view>
  199. <view>4、商家已预付工资到平台,整体流程将在平台内进行,平台会保障您的合法权益。</view>
  200. <view>
  201. <navigator v-if="!user_info.true_name" url="/pages/personal/authentication">
  202. 5、实名认证后免费赠送最高10万元的人身意外险,点击去认证。
  203. </navigator>
  204. </view>
  205. <view style="color: #01bcc3;font-weight: bold;align-items: center;">
  206. 本次报名需支付{{data['base_config']['value']}}元押金
  207. <image src="../../static/ques.png" @click="show_yajin_info()"
  208. style="margin-left: 10upx;width: 35upx;height: 35upx;"></image>
  209. </view>
  210. </view>
  211. <view class="modal_btn">
  212. <view @click="close_sign_modal" class="modal_btn_cancel">取消</view>
  213. <view v-if="data.settle_catalog==1" @click="sign" class="modal_btn_confirm">
  214. 选择报名日期</view>
  215. <view @click="sign" class="modal_btn_confirm" v-else>确认报名</view>
  216. </view>
  217. </view>
  218. </uni-popup>
  219. <!-- 取消报名遮罩 -->
  220. <uni-popup ref="popup_cancel_sign" :mask-click="false">
  221. <view style="padding-top: 30upx;" class="modal_box">
  222. <textarea style="height: 350upx;font-size: 30upx;" v-model="ipt_value" @input="textarea_ipt"
  223. placeholder="请填写取消报名的原因"></textarea>
  224. <view class="modal_btn">
  225. <view @click="close_cancel_sign_modal" class="modal_btn_cancel">返回</view>
  226. <view @click="cancel_sign" class="modal_btn_confirm">确认取消</view>
  227. </view>
  228. </view>
  229. </uni-popup>
  230. <!-- 押金说明遮罩 -->
  231. <uni-popup ref="popup_yajin" :mask-click="false">
  232. <view class="modal_box">
  233. <view style="color: #313131;text-align: center;font-size: 38upx;line-height: 90upx;">押金支付说明</view>
  234. <view class="mention">
  235. <view>1、每个工作报名都会收取押金,若同一时间段报名多个工作,若一商家录取则其他同一时间段报名被动取消,押金一并返还。</view>
  236. <view>2、未录取前取消工作或未录取工作,押金自然返还。</view>
  237. <view>3、录取之后完成工作,押金会和工资同时返还。</view>
  238. <view>4、取之后,若商家违约取消工作,补偿金会和押金自然返还。</view>
  239. <view>5、仅限因个人原因未到协定岗位者,押金扣除补偿给商家。</view>
  240. </view>
  241. <view class="modal_btn">
  242. <view style="margin: 0 auto;" @click="close_yajin_info" class="modal_btn_confirm">我知道了</view>
  243. </view>
  244. </view>
  245. </uni-popup>
  246. <!-- 日期选择遮罩 -->
  247. <uni-popup ref="popup_date" :mask-click="false">
  248. <view class="modal_box">
  249. <view style="padding-top: 30upx;">
  250. <view style="width: 50%;float: left;color: #1dd7a8;line-height: 70upx;text-align: center;"
  251. :key="index" @click="picker_data(item)" v-for="(item,index) in itemList">{{item}}</view>
  252. </view>
  253. <view class="modal_btn">
  254. <view style="width: 50%;clear: both;top: ;" @click="close_date_modal" class="modal_btn_cancel">取消
  255. </view>
  256. </view>
  257. </view>
  258. </uni-popup>
  259. </view>
  260. </template>
  261. <script>
  262. import commonData from '../../commonData.js'
  263. import commonFun from '../../commonFun.js'
  264. import trailerStars from '../../components/starts/index.vue'
  265. import share from '../../components/share/index.vue'
  266. import mapBox from '../../components/mapBox/index.vue'
  267. export default {
  268. data() {
  269. return {
  270. // 在线图片
  271. formate_enrolled_heads: commonFun.formate_enrolled_heads,
  272. serverUrl: this.serverUrl,
  273. ggsmImg: this.serverUrl + 'ggsm.jpg',
  274. xxjbImg: this.serverUrl + 'xxjb.jpg',
  275. chatImg: this.serverUrl + 'chat.png',
  276. sign2Img: this.serverUrl + 'sign2.png',
  277. share_botImg: this.serverUrl + 'share_bot.png',
  278. process_line_arrow: this.serverUrl + 'process_line_arrow.png',
  279. serverUrlImg4: this.serverUrl + 'show/complaint_modal.png',
  280. serverUrlImg6: this.serverUrl + 'new/cancel.png',
  281. serverUrlImg7: this.serverUrl + 'new/insurance2.png',
  282. serverUrlImg8: this.serverUrl + 'cer_1.png',
  283. serverUrlImg9: this.serverUrl + 'cer_2.png',
  284. IS_TOURIST: uni.getStorageSync('IS_TOURIST'), // 获取游客模式
  285. sys_role: commonData.sys_role, //角色,0是会员,1是商家
  286. id: '', //招聘详情id
  287. detailType: 0, //进入招聘详情的类型,1是用户工单进入,0是非用户工单进入
  288. data: { //招聘详情
  289. todoinfo: {}
  290. },
  291. positionData: {}, //位置信息
  292. loading: true, //加载中
  293. shareId: '', //分享者id//可以没有
  294. user_info: {
  295. true_name: '',
  296. }, //个人信息
  297. ipt_value: '', //投诉内容
  298. picurls: '',
  299. picurls2: '',
  300. todo_title: '',
  301. todo_remarks: '',
  302. todo: '',
  303. reason: '',
  304. breakdate: '',
  305. pickDateList: [],
  306. is_agree: [],
  307. isIphoneX: uni.getStorageSync('isIphoneX'),
  308. open_date_modal_type: 'sign',
  309. itemList: [],
  310. complain_ipt_arr: [{
  311. text: '散播违法/敏感言论'
  312. }, {
  313. text: '涉黄'
  314. }, {
  315. text: '职位虚假'
  316. }, {
  317. text: '薪资虚假'
  318. }, {
  319. text: '违法/欺诈行为'
  320. }, {
  321. text: '变相收费'
  322. }, {
  323. text: '与实际工作不符'
  324. }, {
  325. text: '商家要求线下结账'
  326. }, {
  327. text: '其他'
  328. }, ],
  329. complain_type: 'recruit',
  330. }
  331. },
  332. onShareAppMessage(e) {
  333. this.close_share_modal()
  334. console.log(e.target.dataset.key)
  335. return {
  336. title: this.data.title,
  337. path: '/pages/order/detail?id=' + this.id + '&share=' + this.user_info.id
  338. }
  339. },
  340. methods: {
  341. // 取消报名
  342. cancel_sign() {
  343. let reason = this.reason
  344. if (!reason) {
  345. uni.showModal({
  346. title: '请填写取消报名的原因!',
  347. showCancel: false
  348. })
  349. return
  350. }
  351. uni.showModal({
  352. title: '确认取消报名?',
  353. success: (res) => {
  354. if (res.confirm) {
  355. uni.showLoading({
  356. title: '加载中...',
  357. mask: true
  358. })
  359. let params = {
  360. bizCatalog: 'TodoWorkEntity',
  361. handleMode: 'enrollCancel',
  362. reason,
  363. }
  364. this.data.todoinfo.canCancelEnroll == 1 ? params.workId = this.data.todoinfo
  365. .tdwkid : params
  366. .teamid = this.data.todoinfo.workteamid
  367. console.log('取消报名请求参数')
  368. console.log(params)
  369. commonFun.requestUrl('&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle', params,
  370. res => {
  371. if (res.status) {
  372. uni.showModal({
  373. content: '取消报名成功',
  374. showCancel: false,
  375. success: () => {
  376. this.close_cancel_sign_modal()
  377. this.get_data()
  378. }
  379. })
  380. uni.hideLoading()
  381. }
  382. })
  383. }
  384. }
  385. })
  386. },
  387. // 保存图片
  388. save_img() {
  389. uni.showLoading({
  390. title: '加载中...',
  391. mask: true
  392. })
  393. commonFun.requestUrl('&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle', {
  394. bizCatalog: 'WorkerEntity',
  395. handleMode: 'fetchRecuritPoster',
  396. recuritid: this.id
  397. }, res => {
  398. if (res.status) {
  399. console.log(res.data.Result)
  400. uni.downloadFile({
  401. url: res.data.Result,
  402. success: (res) => {
  403. if (res.statusCode === 200) {
  404. uni.saveImageToPhotosAlbum({
  405. filePath: res.tempFilePath,
  406. success: function() {
  407. uni.showToast({
  408. title: "保存成功",
  409. icon: "none"
  410. });
  411. },
  412. fail: function(e) {
  413. uni.showModal({
  414. title: '保存图片失败',
  415. content: JSON.stringify(e),
  416. showCancel: false,
  417. success: function(res) {}
  418. });
  419. }
  420. });
  421. }
  422. },
  423. fail(e) {
  424. uni.showModal({
  425. title: '保存图片失败',
  426. content: JSON.stringify(e),
  427. showCancel: false,
  428. success: function(res) {}
  429. });
  430. }
  431. })
  432. }
  433. uni.hideLoading()
  434. })
  435. },
  436. // 选中同意违约协议
  437. checkboxChange(e) {
  438. this.is_agree = e.detail.value
  439. },
  440. // 选择日期
  441. picker_data(date) {
  442. this.close_date_modal()
  443. if (this.open_date_modal_type == 'break') {
  444. this.breakdate = date
  445. } else {
  446. this.sign_fun(date)
  447. }
  448. },
  449. // 输入操作备注
  450. textarea_ipt(e) {
  451. this.reason = e.target.value
  452. },
  453. // 获取工单详情数据
  454. get_detail_data(bizId) {
  455. commonFun.requestUrl('&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle', {
  456. bizCatalog: 'RecruitEntity',
  457. handleMode: 'fetch',
  458. bizId
  459. }, res => {
  460. if (res.status) {
  461. this.pickDateList = res.data.Result.pickDateList
  462. }
  463. })
  464. },
  465. // 查看小优保险
  466. check_ins(index) {
  467. uni.navigateTo({
  468. url: '/pages/login/web?index=' + index
  469. })
  470. },
  471. // 输入框输入
  472. ipt_change(e) {
  473. this.ipt_value = e.target.value
  474. },
  475. // 追加输入框内容
  476. add_ipt_value(index) {
  477. this.ipt_value = this.ipt_value + '#' + this.complain_ipt_arr[index]['text']
  478. },
  479. // 提交新的投诉
  480. submitNewComplaint() {
  481. if (this.ipt_value == '') {
  482. uni.showModal({
  483. content: '请输入投诉内容!',
  484. showCancel: false
  485. })
  486. return
  487. }
  488. uni.showLoading({
  489. title: '加载中...',
  490. mask: true
  491. })
  492. let params = {
  493. bizCatalog: 'InteractionEntity',
  494. handleMode: 'submitNewComplaint',
  495. content: this.ipt_value
  496. }
  497. if (this.complain_type == 'order') {
  498. params.workid = this.data.todoinfo.tdwkid
  499. } else {
  500. params.recuritid = this.id
  501. }
  502. // console.log(params)
  503. // return
  504. commonFun.requestUrl('&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle', params,
  505. res => {
  506. if (res.status) {
  507. uni.showModal({
  508. content: '投诉成功!',
  509. showCancel: false
  510. })
  511. uni.hideLoading()
  512. this.close_complaint_modal()
  513. }
  514. })
  515. },
  516. // 获取个人信息
  517. get_info() {
  518. commonFun.get_user_info(res => {
  519. if (res.status) {
  520. this.user_info = res.data.Result
  521. console.log('招聘详情页获取个人信息')
  522. console.log(this.user_info)
  523. console.log(JSON.stringify(this.user_info))
  524. }
  525. })
  526. },
  527. // 报名执行函数
  528. sign_fun(planDotime) {
  529. uni.showModal({
  530. title: '确认报名?',
  531. success: (res) => {
  532. if (res.confirm) {
  533. uni.showLoading({
  534. title: '加载中...',
  535. mask: true
  536. })
  537. uni.login({
  538. success: res => {
  539. let params = {
  540. bizCatalog: 'TodoWorkEntity',
  541. handleMode: 'singleEnroll',
  542. recruitId: this.id,
  543. planDotime,
  544. sharerWorkerId: this.shareId,
  545. minaCode: res.code,
  546. }
  547. console.log('报名请求参数')
  548. console.log(params)
  549. commonFun.requestUrl(
  550. '&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle',
  551. params,
  552. res => {
  553. if (res.status) {
  554. console.log('报名返回结果')
  555. console.log(res)
  556. // 无需支付
  557. if (res.data.Result.payResult) {
  558. uni.showModal({
  559. content: '报名成功',
  560. showCancel: false,
  561. success: () => {
  562. this.get_data()
  563. }
  564. })
  565. uni.hideLoading()
  566. this.close_sign_modal()
  567. return
  568. }
  569. // 需要支付
  570. let prePayInfo = res.data.Result
  571. .prePayInfo
  572. console.log('prePayInfo')
  573. console.log(prePayInfo)
  574. uni.hideLoading()
  575. uni.requestPayment({
  576. ...prePayInfo,
  577. success: (res2) => {
  578. uni.showModal({
  579. content: '报名成功',
  580. showCancel: false,
  581. success: () => {
  582. this.get_data()
  583. }
  584. })
  585. uni.hideLoading()
  586. this.close_sign_modal()
  587. },
  588. fail: function(res2) {
  589. if (res2.errMsg.indexOf(
  590. 'cancel') == -1) {
  591. uni.showModal({
  592. title: '支付失败',
  593. content: JSON
  594. .stringify(
  595. res2
  596. ),
  597. showCancel: false,
  598. })
  599. }
  600. }
  601. });
  602. }
  603. })
  604. }
  605. })
  606. }
  607. }
  608. })
  609. },
  610. // 报名
  611. sign() {
  612. let itemList = []
  613. for (let i in this.data.pickDateList) {
  614. itemList.push(this.data.pickDateList[i])
  615. }
  616. this.itemList = itemList
  617. if (this.data.settle_catalog == 1) {
  618. console.log(itemList)
  619. this.open_date_modal()
  620. this.open_date_modal_type = 'sign'
  621. } else {
  622. this.sign_fun('')
  623. }
  624. },
  625. // 点击评分
  626. changeScore(e) {
  627. console.log(e)
  628. },
  629. // 沟通
  630. communicate() {
  631. uni.showActionSheet({
  632. itemList: ['拨号', '在线联系'],
  633. success: (res) => {
  634. if (res.tapIndex == 0) {
  635. uni.makePhoneCall({
  636. phoneNumber: this.data.linker_phone
  637. })
  638. } else {
  639. let data = this.data
  640. uni.setStorageSync('targetUser', {
  641. name: data.bt_companyname,
  642. avatar: data.bt_profile_photo
  643. })
  644. uni.navigateTo({
  645. url: '/pages/message/chat?to=mer_' + this.data.biz_traderid + '&id=' +
  646. this.data.id +
  647. '&title=' + this.data.title + '【' + data.salary + '元/' + (data
  648. .settleType ? '完工结' : '天') +
  649. '】'
  650. })
  651. }
  652. },
  653. fail: function(res) {}
  654. });
  655. },
  656. // 打开日期选择遮罩
  657. open_date_modal() {
  658. this.$refs.popup_date.open('top')
  659. },
  660. // 关闭日期选择遮罩
  661. close_date_modal() {
  662. this.$refs.popup_date.close('top')
  663. },
  664. // 打开取消报名窗口
  665. open_cancel_sign_modal() {
  666. this.$refs.popup_cancel_sign.open('top')
  667. },
  668. // 关闭消报名窗口
  669. close_cancel_sign_modal() {
  670. this.$refs.popup_cancel_sign.close('top')
  671. },
  672. // 打开分享窗口
  673. open_share_modal() {
  674. this.$refs.popup_share.open('top')
  675. },
  676. // 关闭分享窗口
  677. close_share_modal() {
  678. this.$refs.popup_share.close('top')
  679. },
  680. // 打开投诉窗口
  681. open_complaint_modal() {
  682. this.$refs.popup.open('top')
  683. },
  684. // 关闭投诉窗口
  685. close_complaint_modal() {
  686. this.$refs.popup.close('top')
  687. },
  688. // 打开报名窗口
  689. open_sign_modal() {
  690. if (this.IS_TOURIST == 1) {
  691. uni.showModal({
  692. title: '请登录后报名!',
  693. confirmText: '去登录',
  694. success: (res) => {
  695. if (res.confirm) {
  696. uni.navigateTo({
  697. url: '../login/index?need_back=1'
  698. })
  699. }
  700. }
  701. })
  702. return
  703. }
  704. this.$refs.popup_sign.open('top')
  705. },
  706. // 关闭报名窗口
  707. close_sign_modal() {
  708. this.$refs.popup_sign.close('top')
  709. },
  710. // 获取数据
  711. get_data(bizId = this.id) {
  712. uni.showLoading({
  713. title: '加载中...',
  714. mask: true
  715. })
  716. commonFun.requestUrl('&WsAjaxBiz=' + ((this.IS_TOURIST == 1 || this.IS_TOURIST == '') ? 'Public' :
  717. 'Worker') +
  718. '&WsAjaxAction=entityDataHandle', {
  719. bizCatalog: 'RecruitEntity',
  720. handleMode: 'fetch',
  721. bizId
  722. }, res => {
  723. if (res.status) {
  724. this.data = res.data.Result
  725. this.positionData = {
  726. work_addr: this.data.work_addr,
  727. work_addr1: this.data.work_addr1,
  728. work_addr_lng: this.data.work_addr_lng,
  729. work_addr_lat: this.data.work_addr_lat,
  730. }
  731. console.log('招聘详情页获取')
  732. this.complain_type = this.data['todoinfo']['canCancelEnroll'] == 0 && !this.data[
  733. 'todoinfo']['canToEnroll'] ? 'order' : 'recruit'
  734. console.log(this.data)
  735. }
  736. this.loading = false
  737. uni.hideLoading()
  738. uni.stopPullDownRefresh()
  739. })
  740. },
  741. // 绑定分享关系
  742. bind_share() {
  743. commonFun.requestUrl('&WsAjaxBiz=Worker&WsAjaxAction=entityDataHandle', {
  744. bizCatalog: 'RecruitEntity',
  745. handleMode: 'markshare',
  746. recruitId: this.id,
  747. sharerWorkerId: this.shareId,
  748. }, res => {
  749. console.log('点击被分享招聘返回')
  750. console.log(res)
  751. })
  752. uni.setStorageSync('shareBindId', '')
  753. },
  754. show_yajin_info() {
  755. this.$refs.popup_yajin.open('top')
  756. },
  757. close_yajin_info() {
  758. this.$refs.popup_yajin.close('top')
  759. },
  760. },
  761. onShow() {
  762. this.IS_TOURIST = uni.getStorageSync('IS_TOURIST') == '' ? 1 : uni.getStorageSync('IS_TOURIST')
  763. this.get_info()
  764. this.get_data()
  765. let shareBindId = uni.getStorageSync('shareBindId')
  766. if (shareBindId && this.IS_TOURIST != 1) { //非游客模式绑定
  767. this.bind_share()
  768. }
  769. },
  770. onLoad(e) {
  771. // console.log('招聘详情页面e')
  772. // console.log(e)
  773. this.id = e.id //测试id:369,正式的时候把 || 369去掉
  774. // this.id = 578
  775. if (e.detailType) { //进入招聘详情的类型,1是用户工单进入,0是非用户工单进入
  776. this.detailType = e.detailType
  777. }
  778. // 通过点击被分享进入的招聘
  779. if (e.share) {
  780. this.shareId = e.share
  781. if (this.IS_TOURIST != 1 && this.IS_TOURIST != '') { // 非游客模式绑定
  782. this.bind_share()
  783. } else { //游客模式执行
  784. uni.setStorageSync('shareBindId', this.shareId)
  785. }
  786. }
  787. },
  788. onPullDownRefresh() {
  789. this.get_info()
  790. this.get_data(this.id);
  791. },
  792. components: {
  793. trailerStars,
  794. share,
  795. mapBox,
  796. },
  797. }
  798. </script>
  799. <style>
  800. @import url("./detail.css");
  801. </style>