特易招,招聘小程序
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.

187 lines
4.2 KiB

3 weeks ago
1 week ago
1 week ago
4 months ago
4 months ago
4 months ago
1 month ago
4 months ago
1 month ago
1 day ago
4 months ago
1 day ago
1 month ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
1 week ago
4 months ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week 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. this.queryParams.status = 0
  83. },
  84. methods: {
  85. clickTabs({index}) {
  86. this.type = index
  87. this.queryParams.status = index
  88. this.getData()
  89. },
  90. showPDF(item){
  91. uni.downloadFile({
  92. url : item.contract,
  93. success : res => {
  94. uni.openDocument({
  95. filePath: res.tempFilePath,
  96. })
  97. }
  98. })
  99. },
  100. }
  101. }
  102. </script>
  103. <style scoped lang="scss">
  104. .content {
  105. width: 100%;
  106. height: 100%;
  107. .projectContent {
  108. background-color: #fff;
  109. display: flex;
  110. margin: 30rpx;
  111. border-radius: 20rpx;
  112. .item{
  113. display: flex;
  114. width: 100%;
  115. padding: 20rpx;
  116. image {
  117. width: 140rpx;
  118. height: 120rpx;
  119. margin-right: 20rpx;
  120. }
  121. .itemList {
  122. flex: 1;
  123. .projectName {
  124. font-size: 32rpx;
  125. font-weight: bold;
  126. margin-bottom: 16rpx;
  127. display: flex;
  128. align-items: center;
  129. .status {
  130. font-size: 24rpx;
  131. padding: 4rpx 16rpx;
  132. border-radius: 20rpx;
  133. margin-left: 16rpx;
  134. &.status-pending {
  135. background-color: #E6F7FF;
  136. color: #1890FF;
  137. }
  138. &.status-signed {
  139. background-color: #F6FFED;
  140. color: #52C41A;
  141. }
  142. &.status-completed {
  143. background-color: #F5F5F5;
  144. color: #666666;
  145. }
  146. }
  147. }
  148. .buyer, .seller {
  149. font-size: 24rpx;
  150. color: #666;
  151. margin-top: 8rpx;
  152. }
  153. }
  154. .actions {
  155. display: flex;
  156. flex-direction: column;
  157. justify-content: center;
  158. gap: 16rpx;
  159. .view-btn, .sign-btn {
  160. display: flex;
  161. align-items: center;
  162. padding: 12rpx 24rpx;
  163. border-radius: 30rpx;
  164. background-color: #F0F7FF;
  165. text {
  166. color: #2979ff;
  167. font-size: 24rpx;
  168. margin-left: 8rpx;
  169. }
  170. }
  171. .sign-btn {
  172. background-color: #2979ff;
  173. text, uv-icon {
  174. color: #fff;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. }
  181. </style>