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

221 lines
4.9 KiB

11 months ago
10 months ago
7 months ago
10 months ago
6 months ago
10 months ago
6 months ago
6 months ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
8 months ago
11 months ago
10 months ago
8 months ago
10 months ago
11 months ago
8 months ago
11 months ago
7 months ago
7 months ago
11 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
10 months ago
6 months ago
11 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. if(index == 0){
  87. delete this.queryParams.status
  88. }
  89. this.queryParams.status = index
  90. this.getData()
  91. },
  92. showPDF(item){
  93. // this.$utils.
  94. // navigateTo('/pages_order/contract/contractDetail?id='
  95. // + item.id)
  96. // 只能查看内容的时候
  97. if(this.role && item.bossStatus != 0 ||
  98. item.employeeStatus != 0 && !this.role
  99. ){
  100. uni.downloadFile({
  101. url : item.contract,
  102. success : res => {
  103. uni.openDocument({
  104. filePath: res.tempFilePath,
  105. })
  106. }
  107. })
  108. return
  109. }
  110. uni.showModal({
  111. title: '您希望的操作是?!',
  112. cancelText: '签署合同',
  113. confirmText: '查看内容',
  114. success : e => {
  115. if(e.confirm){
  116. uni.downloadFile({
  117. url : item.contract,
  118. success : res => {
  119. uni.openDocument({
  120. filePath: res.tempFilePath,
  121. })
  122. }
  123. })
  124. }else{
  125. this.$utils.
  126. navigateTo('/pages_order/contract/electronicSignature?id='
  127. + item.id)
  128. }
  129. }
  130. })
  131. },
  132. }
  133. }
  134. </script>
  135. <style scoped lang="scss">
  136. .content {
  137. width: 100%;
  138. height: 100%;
  139. .projectContent {
  140. background-color: #fff;
  141. display: flex;
  142. margin: 30rpx;
  143. border-radius: 20rpx;
  144. .item{
  145. display: flex;
  146. width: 100%;
  147. padding: 20rpx;
  148. image {
  149. width: 140rpx;
  150. height: 120rpx;
  151. margin-right: 20rpx;
  152. }
  153. .itemList {
  154. flex: 1;
  155. .projectName {
  156. font-size: 32rpx;
  157. font-weight: bold;
  158. margin-bottom: 16rpx;
  159. display: flex;
  160. align-items: center;
  161. .status {
  162. font-size: 24rpx;
  163. padding: 4rpx 16rpx;
  164. border-radius: 20rpx;
  165. margin-left: 16rpx;
  166. &.status-pending {
  167. background-color: #E6F7FF;
  168. color: #1890FF;
  169. }
  170. &.status-signed {
  171. background-color: #F6FFED;
  172. color: #52C41A;
  173. }
  174. &.status-completed {
  175. background-color: #F5F5F5;
  176. color: #666666;
  177. }
  178. }
  179. }
  180. .buyer, .seller {
  181. font-size: 24rpx;
  182. color: #666;
  183. margin-top: 8rpx;
  184. }
  185. }
  186. .actions {
  187. display: flex;
  188. flex-direction: column;
  189. justify-content: center;
  190. gap: 16rpx;
  191. .view-btn, .sign-btn {
  192. display: flex;
  193. align-items: center;
  194. padding: 12rpx 24rpx;
  195. border-radius: 30rpx;
  196. background-color: #F0F7FF;
  197. text {
  198. color: #2979ff;
  199. font-size: 24rpx;
  200. margin-left: 8rpx;
  201. }
  202. }
  203. .sign-btn {
  204. background-color: #2979ff;
  205. text, uv-icon {
  206. color: #fff;
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }
  213. </style>