interview-application.vue 8.2 KB

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