task_detail.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view>
  3. <view class="dtop">
  4. <view class="title">{{ item.title || '' }}</view>
  5. </view>
  6. <view class="mbos">
  7. <view class="ms mt0">
  8. <view class="mtitle">兼职金额</view>
  9. <view class="desc mb15">{{ item.salary }}</view>
  10. <view class="mtitle">兼职时间</view>
  11. <view class="desc mb15">{{ item.startDate }}{{ item.endDate }},共计:{{ item.days }}</view>
  12. <view class="mtitle">兼职地点</view>
  13. <view class="desc mb15">{{ item.address || '工作地点不限' }}</view>
  14. <view class="mtitle">结算方式</view>
  15. <view class="desc mb15">在规定时间内完工结算(平台打款)</view>
  16. <view class="mtitle">兼职描述</view>
  17. <u-parse :content="item.contents" class="item"></u-parse>
  18. <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers" v-if="item.latitude"></map>
  19. </view>
  20. </view>
  21. <view class="mfooter">
  22. <view class="cn">
  23. <view class="f">
  24. <button class="btn" @click="go('/pages/user/resume/application/task_list?taskId=' + obj.id + '&role=' + obj.role)">
  25. <text class="icon">&#xe656;</text>
  26. <text>任务日志</text>
  27. </button>
  28. </view>
  29. <view class="f">
  30. <button class="btn" @click="send()" :disabled="obj.isComplete == 1 || obj.isComplete == 2">
  31. <text class="icon">&#xe612;</text>
  32. <text v-if="obj.isComplete == 0">确认完成</text>
  33. <text v-if="obj.isComplete == 1">等待甲方确认</text>
  34. <text v-if="obj.isComplete == 2">任务完成</text>
  35. <text v-if="obj.isComplete == 3">申请完成驳回</text>
  36. </button>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. item: {},
  47. obj: {}
  48. };
  49. },
  50. onLoad(e) {
  51. this.obj = JSON.parse(e.item);
  52. this.http.request({
  53. url: '/app/position/detail/' + this.obj.positionId,
  54. success: (res) => {
  55. this.item = res.data.data.position;
  56. this.item.days = this.util.days(this.item.startDate, this.item.endDate);
  57. }
  58. });
  59. },
  60. methods: {
  61. go(url) {
  62. uni.navigateTo({ url: url });
  63. },
  64. send() {
  65. uni.showModal({
  66. title: '提示',
  67. content: '确定提交完成申请?',
  68. success: (res) => {
  69. if (res.confirm) {
  70. this.http.request({
  71. url: '/app/deliver/yTaskComplete',
  72. data: { id: this.obj.id },
  73. method: 'POST',
  74. success: (res) => {
  75. //通知模板订阅消息
  76. uni.requestSubscribeMessage({
  77. tmplIds: ['87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'],
  78. complete: (c) => {
  79. uni.showModal({ content: '提交完成申请成功,等待甲方确认', showCancel: false });
  80. }
  81. });
  82. }
  83. });
  84. }
  85. }
  86. });
  87. }
  88. }
  89. };
  90. </script>
  91. <style lang="scss">
  92. .mfooter {
  93. background-color: white;
  94. bottom: 0px;
  95. border-top: 1px solid $line;
  96. .cn {
  97. padding: 0px 10px 15px 10px;
  98. overflow: hidden;
  99. display: flex;
  100. .f {
  101. flex: 1;
  102. padding: 0px 10px 0px 10px;
  103. .btn {
  104. width: 100%;
  105. }
  106. }
  107. }
  108. }
  109. </style>