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

225 lines
4.3 KiB

9 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
  1. <template>
  2. <view class="page">
  3. <navbar
  4. title="需提交的材料"
  5. leftClick
  6. @leftClick="$utils.navigateBack"
  7. />
  8. <view class="form">
  9. <view class="form-item"
  10. :key="item.id"
  11. v-for="(item, index) in formList">
  12. <view class="label">
  13. {{ item.title }}
  14. <br>
  15. <text>{{ item.descrip }}</text>
  16. </view>
  17. <view class="input"
  18. v-if="item.type == 0">
  19. <input type="text"
  20. :placeholder="'请输入' + item.title"
  21. v-model="form[item.keyName]"/>
  22. </view>
  23. <view class="input"
  24. v-else>
  25. <uv-upload
  26. :fileList="fileMapList[item.keyName]"
  27. :name="item.keyName"
  28. :maxCount="1"
  29. width="120rpx"
  30. height="120rpx"
  31. multiple
  32. @afterRead="afterRead"
  33. @delete="deleteImage">
  34. <view class="upload">
  35. <image :src="item.image"
  36. mode="aspectFit"
  37. style="width: 120rpx;height: 120rpx;" />
  38. </view>
  39. </uv-upload>
  40. </view>
  41. <view class="icon"
  42. v-if="item.type == 1">
  43. <uv-icon
  44. name="arrow-right"
  45. size="30rpx"
  46. ></uv-icon>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="uni-color-btn"
  51. v-if="formList.length > 0"
  52. @click="addMaterial()">
  53. 提交
  54. </view>
  55. <view class="uni-uncolor-btn"
  56. @click="$refs.customerServicePopup.open()">
  57. 联系客服
  58. </view>
  59. <view class="tips"
  60. style="text-align: center;padding: 20rpx 0;
  61. width: 750rpx;">
  62. 如有疑问请联系客服
  63. </view>
  64. <customerServicePopup ref="customerServicePopup"/>
  65. </view>
  66. </template>
  67. <script>
  68. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  69. export default {
  70. components : {
  71. customerServicePopup
  72. },
  73. data() {
  74. return {
  75. form : {
  76. },
  77. fileMapList : {},
  78. formList : [],
  79. id : 0,
  80. verification : {},
  81. }
  82. },
  83. onLoad({id}) {
  84. this.id = id
  85. this.queryCertById()
  86. },
  87. methods: {
  88. deleteImage(e){
  89. this.fileMapList[e.name].splice(e.index, 1)
  90. },
  91. afterRead(e){
  92. let self = this
  93. e.file.forEach(file => {
  94. self.$Oss.ossUpload(file.url).then(url => {
  95. self.fileMapList[e.name].push({
  96. url
  97. })
  98. })
  99. })
  100. },
  101. addMaterial(){
  102. this.formList.forEach(n => {
  103. if(n.type == 1){
  104. this.form[n.keyName] = this.fileMapList[n.keyName]
  105. .map((item) => item.url).join(",")
  106. }
  107. })
  108. if(this.$utils.verificationAll(this.form, this.verification)) {
  109. return
  110. }
  111. this.$api('addMaterial',this.form, res =>{
  112. if(res.code == 200){
  113. uni.showToast({
  114. title:'提交成功!等待审核',
  115. icon: 'none'
  116. })
  117. setTimeout(uni.navigateBack, 1000, -1)
  118. }
  119. })
  120. },
  121. queryCertById(){
  122. this.$api('queryCertById', {
  123. cerId : this.id,
  124. }, res => {
  125. if(res.code == 200){
  126. this.formList = res.result.employMaterialList
  127. res.result.employMaterialList.forEach(n => {
  128. if(n.type == 0){
  129. this.verification[n.keyName] = '请输入' + n.title
  130. this.form[n.keyName] = ''
  131. }else{
  132. this.verification[n.keyName] = '请上传' + n.title
  133. // this.fileMapList[n.keyName] = []
  134. this.$set(this.fileMapList, n.keyName, [])
  135. }
  136. })
  137. }
  138. })
  139. },
  140. }
  141. }
  142. </script>
  143. <style scoped lang="scss">
  144. .page{
  145. min-height: 100vh;
  146. .required::before{
  147. content: '*';
  148. color: #f00;
  149. }
  150. .form-item{
  151. padding: 30rpx 0;
  152. display: flex;
  153. align-items: center;
  154. border-bottom: 1rpx solid #00000009;
  155. font-size: 28rpx;
  156. .label{
  157. font-weight: 600;
  158. margin-right: 50rpx;
  159. text{
  160. font-size: 24rpx;
  161. font-weight: 500;
  162. }
  163. }
  164. .input{
  165. margin-left: auto;
  166. flex-shrink: 0;
  167. image{
  168. }
  169. input{
  170. text-align: right;
  171. }
  172. }
  173. .icon{
  174. margin-left: 10rpx;
  175. }
  176. }
  177. .tips{
  178. font-size: 26rpx;
  179. color: #777;
  180. padding-bottom: 20rpx;
  181. }
  182. .form {
  183. padding: 0 30rpx;
  184. background-color: #fff;
  185. margin: 20rpx;
  186. border-radius: 20rpx;
  187. .upload{
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. // width: 690rpx;
  192. width: 120rpx;
  193. height: 120rpx;
  194. border-radius: 50%;
  195. overflow: hidden;
  196. background-color: #f3f3f3;
  197. border-radius: 10rpx;
  198. // .btn-add{
  199. // margin: auto;
  200. // padding: 10rpx 20rpx;
  201. // background-color: $uni-color;
  202. // color: #fff;
  203. // border-radius: 10rpx;
  204. // }
  205. }
  206. }
  207. }
  208. </style>