interview-application.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div>
  3. <BottomPopup
  4. :show="showDialog"
  5. @touchmove.stop.prevent
  6. @onClose="onPopupClose"
  7. :borderRadius="12"
  8. >
  9. <div :class="['evaluate', !isPC && 'evaluate-h5']">
  10. <div :class="['evaluate-header', !isPC && 'evaluate-h5-header']">
  11. <div
  12. :class="['evaluate-header-content', !isPC && 'evaluate-h5-header-content']"
  13. >
  14. 面试预约
  15. </div>
  16. </div>
  17. <div
  18. v-if="!isPC"
  19. :class="['evaluate-header-close', !isPC && 'evaluate-h5-header-close']"
  20. @click="ShowDialogClose"
  21. >
  22. <image
  23. src="@/static/images/company/close.png"
  24. mode=""
  25. style="width: 30px; height: 30px"
  26. />
  27. </div>
  28. <div :class="['evaluate-content', !isPC && 'evaluate-h5-content']">
  29. <div class="item">
  30. <div class="label">预约日期:</div>
  31. <picker
  32. class="picker"
  33. mode="date"
  34. :value="params.date"
  35. @change="bindDateChange"
  36. >
  37. <view class="uni-input">{{
  38. params.date ? params.date : "请选择预约日期"
  39. }}</view>
  40. </picker>
  41. </div>
  42. <div class="item">
  43. <div class="label">预约时间:</div>
  44. <picker
  45. class="picker"
  46. mode="time"
  47. :value="params.time"
  48. @change="bindTimeChange"
  49. >
  50. <view class="uni-input">{{
  51. params.time ? params.time : "请选择预约时间"
  52. }}</view>
  53. </picker>
  54. </div>
  55. <div class="item">
  56. <div class="label">面试地址:</div>
  57. <input
  58. @tap="inputClick"
  59. style="
  60. height: 40px;
  61. width: 94%;
  62. background: #f8f8f8;
  63. text-align: left;
  64. line-height: 39px;
  65. padding: 0px 11px;
  66. "
  67. @input="replaceInputPerson"
  68. :value="params.interviewAddress"
  69. focus
  70. placeholder="请选择面试地址"
  71. />
  72. </div>
  73. <div class="item">
  74. <div class="label">联系人:</div>
  75. <input
  76. style="
  77. height: 40px;
  78. width: 94%;
  79. background: #f8f8f8;
  80. text-align: left;
  81. line-height: 39px;
  82. padding: 0px 11px;
  83. "
  84. @input="replaceInputPerson"
  85. :value="params.contact"
  86. focus
  87. placeholder="联系人"
  88. />
  89. </div>
  90. <div class="item">
  91. <div class="label">联系电话:</div>
  92. <input
  93. style="
  94. height: 40px;
  95. width: 94%;
  96. background: #f8f8f8;
  97. text-align: left;
  98. line-height: 39px;
  99. padding: 0px 11px;
  100. "
  101. @input="replaceInputPhone"
  102. :value="params.contactMobile"
  103. focus
  104. placeholder="联系电话"
  105. />
  106. </div>
  107. <div class="item">
  108. <div class="label">信息费:</div>
  109. <div style="color: red">{{ userInfo.hc ? userInfo.hc : 0 }}元</div>
  110. </div>
  111. <div
  112. :class="['evaluate-content-button', !isPC && 'evaluate-h5-content-button']"
  113. >
  114. <button :class="['btn', 'btn-valid']" @click="submitEvaluate">确定</button>
  115. </div>
  116. </div>
  117. </div>
  118. </BottomPopup>
  119. </div>
  120. </template>
  121. <script>
  122. import {
  123. TUITranslateService,
  124. TUIStore,
  125. StoreName,
  126. IConversationModel,
  127. TUIChatService,
  128. SendMessageParams,
  129. } from "@tencentcloud/chat-uikit-engine";
  130. import config from "@/request/config";
  131. import BottomPopup from "../../../components/common/BottomPopup/indexYQ.vue";
  132. export default {
  133. components: { BottomPopup },
  134. props: ["showDialog", "jobInfoData", "mapAddress"],
  135. data() {
  136. return {
  137. isPC: false,
  138. inpvalue: "",
  139. comment: "",
  140. params: {
  141. date: "",
  142. time: "",
  143. companyUserId: "",
  144. contact: "",
  145. contactMobile: "",
  146. interviewAddress: "",
  147. interviewStatus: "0",
  148. interviewTime: "",
  149. postId: "",
  150. recruitUserId: "",
  151. lat: "",
  152. lng: "",
  153. },
  154. userInfo: {},
  155. addressObj: {},
  156. };
  157. },
  158. watch: {
  159. jobInfoData: {
  160. handler(val) {
  161. this.userInfo = val;
  162. },
  163. immediate: true,
  164. deep: true,
  165. },
  166. mapAddress: {
  167. handler(val) {
  168. this.addressObj = val;
  169. let list = this.addressObj.location.split(",");
  170. this.params.interviewAddress =
  171. this.addressObj.district + this.addressObj.address + this.addressObj.name;
  172. this.params.lng = list[0];
  173. this.params.lat = list[1];
  174. },
  175. immediate: true,
  176. deep: true,
  177. },
  178. },
  179. methods: {
  180. inputClick() {
  181. uni.navigateTo({
  182. url: `/pages/merChantSide/map`,
  183. });
  184. },
  185. replaceInputPerson(val) {
  186. this.params.contact = val.detail.value;
  187. },
  188. replaceInputPhone(val) {
  189. this.params.contactMobile = val.detail.value;
  190. },
  191. bindDateChange(val) {
  192. this.params.date = val.detail.value;
  193. },
  194. bindTimeChange(val) {
  195. this.params.time = val.detail.value;
  196. },
  197. ShowDialogClose() {
  198. this.$emit("close", false);
  199. },
  200. submitEvaluate() {
  201. let that = this;
  202. this.params.companyUserId = uni.getStorageSync("userId");
  203. this.params.recruitUserId = this.userInfo.recruitUserId;
  204. this.params.interviewTime = this.params.date + " " + this.params.time;
  205. this.params.postId = this.userInfo.postId;
  206. this.params.resumeId = this.userInfo.resumeId;
  207. const header = {
  208. "Content-Type": "application/json",
  209. Authorization: uni.getStorageSync("token")
  210. ? uni.getStorageSync("token")
  211. : uni.getStorageSync("unitoken"),
  212. };
  213. that.$emit("onload", true);
  214. that.$emit("close", false);
  215. uni.request({
  216. url: config.baseUrl + "/recruit/companyInterview/invite",
  217. method: "post",
  218. header: header,
  219. data: that.params,
  220. //请求成功后返回
  221. success: (res) => {
  222. console.log(res);
  223. if (res.data.code == 200) {
  224. uni.$u.toast("发送成功!");
  225. that.params.interviewAddress = "";
  226. } else {
  227. uni.$u.toast(res.data.msg);
  228. }
  229. },
  230. fail: (error) => {
  231. console.log(error);
  232. uni.showToast({
  233. title: error.data.msg,
  234. //显示持续时间为 2秒
  235. duration: 2000,
  236. });
  237. },
  238. });
  239. that.$emit("onload", true);
  240. that.$emit("close", false);
  241. },
  242. },
  243. };
  244. </script>
  245. <style scoped lang="scss">
  246. .picker {
  247. height: 40px;
  248. width: 94%;
  249. background: #f8f8f8;
  250. text-align: left;
  251. line-height: 39px;
  252. padding: 0px 11px;
  253. }
  254. .item {
  255. width: 100%;
  256. display: flex;
  257. flex-direction: row;
  258. align-items: center;
  259. margin-bottom: 10px;
  260. .label {
  261. width: 100px;
  262. }
  263. }
  264. .evaluate-h5 {
  265. padding: 0px !important;
  266. }
  267. .evaluate-header {
  268. background: url("../../../../static/images/company/popupHeader.png") no-repeat;
  269. background-size: 100% 100%;
  270. padding: 20px;
  271. }
  272. .evaluate-h5-content {
  273. padding: 20px !important;
  274. }
  275. .evaluate-h5-header {
  276. display: flex;
  277. justify-content: center !important;
  278. }
  279. .evaluate-h5-header-close {
  280. position: absolute;
  281. right: 10px;
  282. top: 8px;
  283. }
  284. .btn-valid {
  285. background: linear-gradient(90deg, #02d17e 0%, #00b594 100%);
  286. border-radius: 12rpx;
  287. }
  288. </style>
  289. <style
  290. scoped
  291. lang="scss"
  292. src="../../../components/TUIChat/message-input-toolbar/evaluate/style/index.scss"
  293. ></style>