apply-popup.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div class="apply">
  3. <van-popup :show="show" class="form-popup">
  4. <div class="popup-body">
  5. <div class="popup-header">
  6. <div class="title">请确认企业签到信息</div>
  7. <div class="close" @click="close">
  8. <i class="iconfont icon-guanbi"></i>
  9. </div>
  10. </div>
  11. <div class="popup-center">
  12. <van-form>
  13. <van-field
  14. readonly
  15. class="input-item"
  16. label="*公司名称"
  17. placeholder="请填写公司名称"
  18. :value="signInfo.companyName"
  19. />
  20. <van-field
  21. readonly
  22. class="input-item"
  23. label="*参与人姓名"
  24. placeholder="请填写参与人姓名"
  25. :value="signInfo.participants"
  26. />
  27. <van-field
  28. readonly
  29. class="input-item"
  30. label="*参与人职位"
  31. placeholder="请填写参与人职位"
  32. :value="signInfo.participantsPosition"
  33. />
  34. <van-field
  35. readonly
  36. class="input-item"
  37. label="*参与总人数"
  38. placeholder="请填写参与总人数"
  39. :value="signInfo.participantsNumber"
  40. />
  41. <van-field
  42. readonly
  43. class="input-item"
  44. label="说明"
  45. :value="signInfo.remark"
  46. type="textarea"
  47. autosize
  48. />
  49. </van-form>
  50. </div>
  51. <div class="popup-foot-but">
  52. <div class="cancel" @click="cancel()">取消</div>
  53. <div class="gb" @click="confirm">确认</div>
  54. </div>
  55. </div></van-popup
  56. >
  57. </div>
  58. </template>
  59. <script>
  60. import { richScan } from "@/js_sdk/http";
  61. import vanPopup from "../../wxcomponents/weapp/dist/popup/index";
  62. import vanField from "../../wxcomponents/weapp/dist/popup/index";
  63. export default {
  64. props: {
  65. referenceId: {
  66. // 关联id
  67. type: String,
  68. default: "",
  69. },
  70. referenceType: {
  71. // 关联类型
  72. type: String,
  73. default: "",
  74. },
  75. },
  76. components: {
  77. vanPopup,
  78. vanField,
  79. },
  80. data() {
  81. return {
  82. signInfo: {},
  83. show: false,
  84. companyName: "",
  85. participants: "",
  86. participantsPosition: "",
  87. participantsPhone: "",
  88. partakeNumber: "",
  89. remark: "",
  90. };
  91. },
  92. mounted() {},
  93. methods: {
  94. cancel() {
  95. uni.navigateBack({});
  96. },
  97. init(signInfo) {
  98. this.signInfo = signInfo;
  99. this.show = true;
  100. },
  101. close() {
  102. this.show = false;
  103. this.initData();
  104. },
  105. initData() {
  106. this.companyName = "";
  107. this.participants = "";
  108. this.participantsPosition = "";
  109. this.participantsPhone = "";
  110. this.partakeNumber = "";
  111. this.remark = "";
  112. },
  113. confirm() {
  114. const _this = this;
  115. richScan({
  116. signInCode: _this.signInfo.signInCode,
  117. }).then((res) => {
  118. if (res.errmsg == "成功") {
  119. this.$showToast(res.data);
  120. if (res.data == "签到成功") {
  121. uni.navigateBack({});
  122. }
  123. }
  124. });
  125. _this.show = false;
  126. _this.initData();
  127. },
  128. },
  129. };
  130. </script>
  131. <style lang="scss" type="text/scss">
  132. .form-popup {
  133. top: 50%;
  134. width: 644rpx;
  135. border-radius: 15rpx;
  136. .popup-body {
  137. padding-bottom: 100rpx;
  138. position: relative;
  139. .popup-header {
  140. padding: 30rpx 40rpx;
  141. @include flex;
  142. .title {
  143. font-size: 28rpx;
  144. color: #a1a1a1;
  145. }
  146. .close {
  147. width: 80rpx;
  148. text-align: right;
  149. i {
  150. font-size: 30rpx;
  151. color: $color4;
  152. }
  153. }
  154. }
  155. .popup-center {
  156. padding: 0 40rpx;
  157. width: 700rpx;
  158. .input-item {
  159. margin-top: 30rpx;
  160. .van-field__label {
  161. font-size: 28rpx;
  162. color: #333;
  163. line-height: 60rpx;
  164. }
  165. .van-field__body {
  166. input {
  167. line-height: 60rpx;
  168. }
  169. }
  170. }
  171. }
  172. .popup-foot-but {
  173. box-sizing: border-box;
  174. position: absolute;
  175. width: 100%;
  176. bottom: 0;
  177. left: 0;
  178. padding: 0 0 20rpx 0rpx;
  179. display: flex;
  180. .gb {
  181. text-align: center;
  182. width: 152rpx;
  183. font-size: 28rpx;
  184. color: #fff;
  185. background: $main;
  186. line-height: 64rpx;
  187. border-radius: 6rpx;
  188. float: right;
  189. margin-left: 295rpx;
  190. }
  191. .cancel {
  192. text-align: center;
  193. width: 152rpx;
  194. font-size: 28rpx;
  195. color: rgb(51, 51, 51);
  196. border: 2rpx solid #ccc;
  197. background: white;
  198. line-height: 64rpx;
  199. border-radius: 6rpx;
  200. margin-left: 100rpx;
  201. float: left;
  202. }
  203. }
  204. }
  205. }
  206. .apply {
  207. display: flex;
  208. justify-content: space-between;
  209. align-items: center;
  210. width: 700rpx;
  211. }
  212. .popup-foot-but {
  213. position: absolute;
  214. width: 100%;
  215. bottom: 0;
  216. left: 0;
  217. text-align: center;
  218. padding: 0 0 30rpx;
  219. .gb {
  220. width: 284rpx;
  221. font-size: 28rpx;
  222. color: #fff;
  223. background: $blue;
  224. line-height: 92rpx;
  225. border-radius: 10rpx;
  226. }
  227. }
  228. </style>