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

223 lines
4.2 KiB

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