interview-application.vue 8.0 KB

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