modalDialog.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <template>
  2. <view>
  3. <u-modal v-model="show" :content-style="{ fontSize: '32rpx' }" @confirm="contentBtn" :show-title="false" confirm-text="知道了" :confirm-style="{ fontWeight: '700' }">
  4. <view class="slot-content">
  5. <rich-text :nodes="content"></rich-text>
  6. </view>
  7. </u-modal>
  8. <!-- 关注公众号 -->
  9. <u-modal
  10. v-model="goFollowShow"
  11. :content-style="{ fontSize: '32rpx' }"
  12. @confirm="goFollowShowBtn"
  13. :show-cancel-button="true"
  14. confirm-text="去关注"
  15. @cancel="cancel"
  16. :show-title="false"
  17. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  18. :confirm-style="{ fontWeight: '700' }"
  19. >
  20. <view class="slot-content">
  21. <rich-text :nodes="accounts"></rich-text>
  22. </view>
  23. </u-modal>
  24. <u-modal
  25. v-model="cancelShow"
  26. :content="canceltext"
  27. :content-style="{ fontSize: '32rpx', lineHeight: '80rpx' }"
  28. :confirm-style="{ fontWeight: '700' }"
  29. @confirm="cancelShowBtn"
  30. @cancel="cancelBtn"
  31. :show-title="false"
  32. :show-cancel-button="true"
  33. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  34. ></u-modal>
  35. <!-- 立即申请 -->
  36. <u-modal
  37. v-model="applyIsShow"
  38. :content-style="{ fontSize: '32rpx' }"
  39. @confirm="applyIsShowBtn"
  40. :show-cancel-button="true"
  41. :confirm-text="isShowAlert ? '立即上传' : '立即申请'"
  42. @cancel="applyIsShowCancel"
  43. :show-title="false"
  44. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  45. :confirm-style="{ fontWeight: '700' }"
  46. >
  47. <view class="slot-content">
  48. <rich-text :nodes="jurisdictionText"></rich-text>
  49. </view>
  50. </u-modal>
  51. <!-- 拨打电话 -->
  52. <u-modal
  53. v-model="showhasPermission"
  54. :content-style="{ fontSize: '32rpx' }"
  55. @confirm="showhasPermissionBtn"
  56. :show-cancel-button="true"
  57. confirm-text="提交申请"
  58. @cancel="showhasPermissionCancel"
  59. :show-title="false"
  60. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  61. :confirm-style="{ fontWeight: '700' }"
  62. >
  63. <view class="slot-content">
  64. <!-- <rich-text :nodes="hasPermissionText"></rich-text> -->
  65. <text>您暂无权限参加此活动</text>
  66. <text>若想参加可以联系对口销售</text>
  67. <view
  68. >{{ jurisdictionList.SellerName }} : <text @click="mobileDial" class="seller-mobile"> {{ jurisdictionList.SellerMobile }}</text></view
  69. >
  70. <text>申请开通对应的试用权限</text>
  71. </view>
  72. </u-modal>
  73. <u-modal v-model="showRelation" confirm-text="知道了" :confirm-style="{ fontWeight: '700' }" :content="contentRelation"></u-modal>
  74. <!-- 修改手机号 -->
  75. <u-modal
  76. width="650"
  77. v-model="editIsShowDlg"
  78. :content-style="{ fontSize: '32rpx' }"
  79. @confirm="GoOutboundMobileBtn"
  80. :show-cancel-button="true"
  81. confirm-text="无需修改"
  82. cancel-text="前去修改"
  83. cancel-color="#3385FF"
  84. @cancel="GoOutboundMobileIsGo"
  85. :show-title="false"
  86. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  87. >
  88. <view class="slot-content">
  89. <rich-text :nodes="editIsShowAccounts"></rich-text>
  90. </view>
  91. </u-modal>
  92. <u-modal
  93. v-model="mailboxBindingDlg"
  94. :content-style="{ fontSize: '32rpx' }"
  95. @confirm="gmailboxBindingDlgBtn"
  96. :show-cancel-button="true"
  97. confirm-text="设置"
  98. @cancel="cancelMailboxBindingDlg"
  99. :show-title="false"
  100. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  101. :confirm-style="{ fontWeight: '700' }"
  102. >
  103. <view class="slot-content">
  104. <rich-text :nodes="mailboxText"></rich-text>
  105. </view>
  106. </u-modal>
  107. </view>
  108. </template>
  109. <script>
  110. import { User, activity, FreeButton } from "@/config/api.js";
  111. export default {
  112. data() {
  113. return {
  114. goFollowShow: false,
  115. show: false,
  116. cancelShow: false,
  117. applyIsShow: false,
  118. showRelation: false,
  119. showhasPermission: false,
  120. contentRelation: "申请已提交,请等待销售人员与您联系",
  121. content: "",
  122. accounts: "",
  123. canceltext: "",
  124. jurisdictionText: "",
  125. hasPermissionText: "",
  126. editIsShowAccounts: "",
  127. editIsShowDlg: false,
  128. mailboxBindingDlg: false,
  129. mailboxText: "您当前绑定的联系方式为邮箱,请先设置您的外呼号码",
  130. isShowAlert: false, //获取权限弹窗是否展示免费月卡接口
  131. };
  132. },
  133. props: {
  134. isShow: {
  135. type: Boolean,
  136. default: false,
  137. },
  138. signupType: {
  139. // type: Number,
  140. },
  141. signupStatus: {
  142. type: String,
  143. default: "Success",
  144. },
  145. goFollow: {
  146. type: Boolean,
  147. },
  148. isCancelShow: {
  149. type: Boolean,
  150. default: false,
  151. },
  152. idTypeCancel: {
  153. type: Object,
  154. },
  155. jurisdictionList: {
  156. type: Object,
  157. },
  158. applyForIsShow: {
  159. //潜在用户
  160. type: Boolean,
  161. },
  162. isShowhasPermission: {
  163. //联系销售
  164. type: Boolean,
  165. },
  166. hasPermission: {
  167. //权限字段
  168. type: String,
  169. },
  170. editIsShow: {
  171. type: Boolean,
  172. },
  173. countryCode: {
  174. type: String,
  175. },
  176. mobileEdit: {
  177. type: String,
  178. },
  179. goOnNextStep: {
  180. type: Boolean,
  181. default: false,
  182. },
  183. mailboxBinding: {
  184. type: Boolean,
  185. default: false,
  186. },
  187. },
  188. watch: {
  189. mailboxBinding() {
  190. this.mailboxBindingDlg = this.mailboxBinding;
  191. },
  192. editIsShow() {
  193. this.editIsShowDlg = this.editIsShow;
  194. if (this.editIsShow) {
  195. this.editIsShowAccounts = `
  196. 默认外呼号码是您当前绑定的手机号:<br />
  197. ${this.countryCode}-${this.mobileEdit}<br/><br/>
  198. 是否需要修改您的外呼号码?
  199. `;
  200. }
  201. },
  202. goFollow() {
  203. this.goFollowShow = this.goFollow;
  204. },
  205. isShow() {
  206. this.show = this.isShow;
  207. },
  208. signupType() {
  209. if (this.signupStatus !== "Success") return;
  210. if (this.signupType == 1) {
  211. this.content = `${this.countryCode}-${this.mobileEdit}<br/>预约成功,已加入您的活动日程 <br/><br/> 请关注【查研观向小助手】公众号,及时获取活动信息变更提醒
  212. `;
  213. this.accounts = `
  214. ${this.countryCode}-${this.mobileEdit}<br/>
  215. 预约成功,已加入您的活动日程<br/><br/>
  216. 想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号
  217. `;
  218. } else if (this.signupType == 999) {
  219. this.content = "设置成功<br /> <br/>请关注【查研观向小助手】公众号,会前15分钟为您推送微信提醒";
  220. this.accounts = `设置成功,会前15分钟会为您推送微信消息提醒<br/><br/>
  221. 请关注【查研观向小助手】公众号,以获取微信消息提醒`;
  222. } else if (this.signupType == "summaryIsHandel") {
  223. this.content = "会议纪要预约成功 <br/><br/> 请关注【查研观向小助手】公众号,若有调研纪要发布/更新,将及时为您推送微信消息";
  224. this.accounts = `
  225. 会议纪要预约成功<br/><br/>
  226. 请关注【查研观向小助手】公众号,若有调研纪要发布/更新,将及时为您推送微信消息 `;
  227. } else {
  228. this.content = `报名成功,已加入您的活动日程 <br/><br/> 请关注【查研观向小助手】公众号,${this.signupType == 'CClass' ? '及时获取活动信息变更提醒':'会前1小时为您推送微信提醒'}`;
  229. this.accounts = `
  230. 报名成功,已加入您的活动日程<br/><br/>
  231. 想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号 `;
  232. }
  233. },
  234. signupStatus() {
  235. if (this.signupStatus == "Success") return;
  236. if (this.signupStatus == "FullStarffed") {
  237. this.content = "此活动报名人数已满,请留意下期活动";
  238. } else if (this.signupStatus == "TwoPeople") {
  239. this.content = "单机构最多2人报名同一活动,您所在机构报名人数已满";
  240. } else if (this.signupStatus == "BreakPromise") {
  241. this.content = "由于爽约次数过多,您暂时被限制报名资格";
  242. } else if (this.signupStatus == "Overtime") {
  243. this.content = "活动开始前1小时内无法预约,请联系对口销售处理";
  244. }
  245. },
  246. "idTypeCancel.type": {
  247. handler: function () {
  248. if (this.idTypeCancel.type == 1) {
  249. this.canceltext = "您要取消此次活动预约外呼吗?";
  250. } else {
  251. this.canceltext = "您要取消此次活动的报名吗?";
  252. }
  253. },
  254. deep: true,
  255. },
  256. isCancelShow() {
  257. this.cancelShow = this.isCancelShow;
  258. },
  259. applyForIsShow() {
  260. this.jurisdictionText = this.isShowAlert ? "上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡" : this.jurisdictionList.PopupMsg;
  261. this.applyIsShow = this.applyForIsShow;
  262. },
  263. isShowhasPermission() {
  264. this.hasPermissionText = this.jurisdictionList.PopupMsg;
  265. this.showhasPermission = this.isShowhasPermission;
  266. },
  267. },
  268. methods: {
  269. contentBtn() {
  270. this.$parent.isShow = false;
  271. this.show = false;
  272. this.$emit("cancelShowBtn", this.idTypeCancel, this.signupType, this.idTypeCancel.isNum);
  273. },
  274. //去关注
  275. goFollowShowBtn() {
  276. this.$parent.goFollow = false;
  277. this.goFollowShow = false;
  278. this.$emit("cancelShowBtn", this.idTypeCancel, this.signupType, this.idTypeCancel.isNum);
  279. uni.navigateTo({
  280. url: "/activityPages/accountsOfficial/accountsOfficial",
  281. });
  282. },
  283. cancel() {
  284. this.$parent.goFollow = false;
  285. this.goFollowShow = false;
  286. this.$emit("cancelShowBtn", this.idTypeCancel, this.signupType, this.idTypeCancel.isNum);
  287. },
  288. cancelBtn() {
  289. this.$parent.isCancelShow = false;
  290. this.cancelShow = false;
  291. },
  292. cancelShowBtn() {
  293. activity
  294. .signupCancel({
  295. ActivityId: this.idTypeCancel.id,
  296. SignupType: this.idTypeCancel.type,
  297. })
  298. .then((res) => {
  299. if (res.Ret == 200) {
  300. this.idTypeCancel.cutId = res.Data.ActivityId;
  301. if (this.signupType == 1) {
  302. uni.showToast({
  303. title: "预约外呼已取消",
  304. duration: 2000,
  305. });
  306. } else {
  307. uni.showToast({
  308. title: "已取消报名",
  309. duration: 2000,
  310. });
  311. }
  312. this.$emit("cancelShowBtn", this.idTypeCancel, this.signupType, this.idTypeCancel.isNum);
  313. }
  314. this.$parent.isCancelShow = false;
  315. this.cancelShow = false;
  316. });
  317. },
  318. //立即申请
  319. applyIsShowBtn() {
  320. this.applyIsShow = false;
  321. this.$parent.applyForIsShow = false;
  322. if (this.hasPermission == 3) {
  323. uni.navigateTo({
  324. url: "/pageMy/applyTrial/applyTrial?tryType=Activity&detailId=" + this.jurisdictionList.ActivityId,
  325. });
  326. } else if (this.hasPermission == 4) {
  327. this.showRelation = true;
  328. } else if (this.hasPermission == 5) {
  329. this.showhasPermissionBtn();
  330. }
  331. },
  332. applyIsShowCancel() {
  333. this.applyIsShow = false;
  334. this.$parent.applyForIsShow = false;
  335. },
  336. showhasPermissionBtn() {
  337. User.applyTry({
  338. TryType: "Activity",
  339. DetailId: this.jurisdictionList.ActivityId,
  340. }).then((res) => {
  341. this.showhasPermission = false;
  342. this.$parent.isShowhasPermission = false;
  343. });
  344. },
  345. mobileDial() {
  346. uni.makePhoneCall({
  347. phoneNumber: this.jurisdictionList.SellerMobile, //仅为示例
  348. });
  349. this.showhasPermission = false;
  350. this.$parent.isShowhasPermission = false;
  351. },
  352. showhasPermissionCancel() {
  353. this.showhasPermission = false;
  354. this.$parent.isShowhasPermission = false;
  355. },
  356. GoOutboundMobileBtn() {
  357. this.$parent.editIsShow = false;
  358. this.editIsShowDlg = false;
  359. if (this.goOnNextStep) {
  360. this.goFollowShow = true;
  361. } else {
  362. this.show = true;
  363. }
  364. },
  365. GoOutboundMobileIsGo() {
  366. this.$parent.editIsShow = false;
  367. this.editIsShowDlg = false;
  368. this.$emit("cancelShowBtn", this.idTypeCancel, this.signupType, this.idTypeCancel.isNum);
  369. uni.navigateTo({
  370. url:
  371. "/activityPages/editOutbound/editOutbound?title=修改外呼号码&identification=修改&goOnNextStep=" +
  372. this.goOnNextStep +
  373. "&id=" +
  374. this.idTypeCancel.cutId +
  375. "&cellphone=" +
  376. this.countryCode +
  377. "-" +
  378. this.mobileEdit,
  379. });
  380. },
  381. gmailboxBindingDlgBtn() {
  382. this.$parent.mailboxBinding = false;
  383. this.mailboxBindingDlg = false;
  384. this.$parent.signupType = "";
  385. uni.navigateTo({
  386. url: "/activityPages/editOutbound/editOutbound?title=设置外呼号码&identification=邮箱&goOnNextStep=" + this.goOnNextStep + "&id=" + this.idTypeCancel.cutId,
  387. });
  388. },
  389. cancelMailboxBindingDlg() {
  390. this.$parent.mailboxBinding = false;
  391. this.mailboxBindingDlg = false;
  392. },
  393. //获取权限弹窗是否展示免费月卡接口
  394. async userIsShowAlert() {
  395. const res = await FreeButton.userIsShowAlert();
  396. if (res.Ret === 200) {
  397. this.isShowAlert = res.Data.IsShow;
  398. }
  399. },
  400. },
  401. mounted() {
  402. this.userIsShowAlert();
  403. },
  404. };
  405. </script>
  406. <style scoped lang="scss">
  407. .slot-content {
  408. width: 100%;
  409. padding: 50rpx;
  410. text-align: center;
  411. font-size: 32rpx;
  412. color: #0f1826;
  413. line-height: 48rpx;
  414. }
  415. .seller-mobile {
  416. display: inline-block;
  417. color: #2979ff;
  418. }
  419. .u-model__footer__button.data-v-3626fcec {
  420. border-right: 1rpx solid #333;
  421. }
  422. </style>