detail.vue 30 KB

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