特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
4.1 KiB

10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <!-- 电子合同 -->
  3. <view>
  4. <navbar title="电子合同"
  5. leftClick
  6. @leftClick="$utils.navigateBack"/>
  7. <view class="">
  8. <uv-tabs :list="tabs"
  9. lineColor="#3796F8"
  10. lineHeight="8rpx"
  11. lineWidth="50rpx"
  12. :scrollable="false"
  13. @click="clickTabs"></uv-tabs>
  14. </view>
  15. <view class="content">
  16. <view class="projectContent" v-for="(item, index) in list" :key="index">
  17. <view class="item">
  18. <image src="/static/image/contract/contract.png" mode="aspectFill"/>
  19. <view class="itemList">
  20. <view class="projectName">
  21. {{ item.title }}
  22. <text class="status" :class="{
  23. 'status-pending': role ? item.bossStatus === 0 : item.employeeStatus === 0,
  24. 'status-signed': role ? item.bossStatus === 1 : item.employeeStatus === 1,
  25. 'status-completed': role ? item.bossStatus === 2 : item.employeeStatus === 2
  26. }">
  27. {{ role ?
  28. (item.bossStatus === 0 ? '待签署' : item.bossStatus === 1 ? '已签署' : '已完成') :
  29. (item.employeeStatus === 0 ? '待签署' : item.employeeStatus === 1 ? '已签署' : '已完成')
  30. }}
  31. </text>
  32. </view>
  33. <view class="buyer">甲方{{ item.companyName }}</view>
  34. <view class="seller">乙方{{ item.employeeName }}</view>
  35. </view>
  36. <view class="actions">
  37. <view class="view-btn" @click="showPDF(item)">
  38. <uv-icon name="eye" color="#2979ff" size="30rpx"></uv-icon>
  39. <text>查看</text>
  40. </view>
  41. <view class="sign-btn"
  42. v-if="(role && item.bossStatus === 0) || (!role && item.employeeStatus === 0)"
  43. @click.stop="$utils.navigateTo('/pages_order/contract/electronicSignature?id=' + item.id)">
  44. <uv-icon name="edit-pen" color="#fff" size="30rpx"></uv-icon>
  45. <text>签署</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import mixinList from '@/mixins/list.js'
  55. import { mapState } from 'vuex'
  56. export default {
  57. mixins : [mixinList],
  58. data() {
  59. return {
  60. tabs: [
  61. {
  62. name: '全部合同'
  63. },
  64. {
  65. name: '待我签署'
  66. },
  67. {
  68. name: '他人签署'
  69. },
  70. {
  71. name: '签约完成'
  72. },
  73. ],
  74. type : 0,
  75. mixinsListApi : 'queryContractList',
  76. }
  77. },
  78. computed : {
  79. },
  80. onLoad() {
  81. this.queryParams.role = this.role ? 1 : 0
  82. },
  83. methods: {
  84. clickTabs({index}) {
  85. this.type = index
  86. this.getData()
  87. },
  88. showPDF(item){
  89. uni.downloadFile({
  90. url : item.contract,
  91. success : res => {
  92. uni.openDocument({
  93. filePath: res.tempFilePath,
  94. })
  95. }
  96. })
  97. },
  98. }
  99. }
  100. </script>
  101. <style scoped lang="scss">
  102. .content {
  103. width: 100%;
  104. height: 100%;
  105. .projectContent {
  106. background-color: #fff;
  107. display: flex;
  108. margin: 30rpx;
  109. border-radius: 20rpx;
  110. .item{
  111. display: flex;
  112. width: 100%;
  113. padding: 20rpx;
  114. image {
  115. width: 140rpx;
  116. height: 120rpx;
  117. margin-right: 20rpx;
  118. }
  119. .itemList {
  120. flex: 1;
  121. .projectName {
  122. font-size: 32rpx;
  123. font-weight: bold;
  124. margin-bottom: 16rpx;
  125. display: flex;
  126. align-items: center;
  127. .status {
  128. font-size: 24rpx;
  129. padding: 4rpx 16rpx;
  130. border-radius: 20rpx;
  131. margin-left: 16rpx;
  132. &.status-pending {
  133. background-color: #E6F7FF;
  134. color: #1890FF;
  135. }
  136. &.status-signed {
  137. background-color: #F6FFED;
  138. color: #52C41A;
  139. }
  140. &.status-completed {
  141. background-color: #F5F5F5;
  142. color: #666666;
  143. }
  144. }
  145. }
  146. .buyer, .seller {
  147. font-size: 24rpx;
  148. color: #666;
  149. margin-top: 8rpx;
  150. }
  151. }
  152. .actions {
  153. display: flex;
  154. flex-direction: column;
  155. justify-content: center;
  156. gap: 16rpx;
  157. .view-btn, .sign-btn {
  158. display: flex;
  159. align-items: center;
  160. padding: 12rpx 24rpx;
  161. border-radius: 30rpx;
  162. background-color: #F0F7FF;
  163. text {
  164. color: #2979ff;
  165. font-size: 24rpx;
  166. margin-left: 8rpx;
  167. }
  168. }
  169. .sign-btn {
  170. background-color: #2979ff;
  171. text, uv-icon {
  172. color: #fff;
  173. }
  174. }
  175. }
  176. }
  177. }
  178. }
  179. </style>