modalDialog.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view>
  3. <u-modal v-model="show" :content="content" :content-style="{fontSize: '32rpx'}" @confirm="contentBtn"
  4. :show-title="false" confirm-text="知道了" :confirm-style="{fontWeight: '700'}"></u-modal>
  5. <!-- 关注公众号 -->
  6. <u-modal v-model="goFollowShow" :content-style="{fontSize: '32rpx'}" @confirm="goFollowShowBtn"
  7. :show-cancel-button="true" confirm-text="去关注" @cancel="cancel" :show-title="false"
  8. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  9. <view class="slot-content">
  10. <rich-text :nodes="accounts"></rich-text>
  11. </view>
  12. </u-modal>
  13. <u-modal v-model="cancelShow" :content="canceltext" :content-style="{fontSize: '32rpx',lineHeight: '80rpx'}"
  14. :confirm-style="{fontWeight: '700'}" @confirm="cancelShowBtn" @cancel="cancelBtn" :show-title="false"
  15. :show-cancel-button="true" :cancel-style="{borderRight:'1rpx solid #EBEBEB'}"></u-modal>
  16. <!-- 立即申请 -->
  17. <u-modal v-model="applyIsShow" :content-style="{fontSize: '32rpx'}" @confirm="applyIsShowBtn"
  18. :show-cancel-button="true" confirm-text="立即申请" @cancel="applyIsShowCancel" :show-title="false"
  19. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  20. <view class="slot-content">
  21. <rich-text :nodes="jurisdictionText"></rich-text>
  22. </view>
  23. </u-modal>
  24. <!-- 拨打电话 -->
  25. <u-modal v-model="showhasPermission" :content-style="{fontSize: '32rpx'}" @confirm="showhasPermissionBtn"
  26. :show-cancel-button="true" confirm-text="拨号" @cancel="showhasPermissionCancel" :show-title="false"
  27. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  28. <view class="slot-content">
  29. <rich-text :nodes="hasPermissionText"></rich-text>
  30. </view>
  31. </u-modal>
  32. <u-modal v-model="showRelation" confirm-text="知道了" :confirm-style="{fontWeight: '700'}"
  33. :content="contentRelation"></u-modal>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. activity
  39. } from "@/config/api.js"
  40. export default {
  41. data() {
  42. return {
  43. goFollowShow: false,
  44. show: false,
  45. cancelShow: false,
  46. applyIsShow: false,
  47. showRelation: false,
  48. showhasPermission: false,
  49. contentRelation: '申请已提交,请等待销售人员与您联系',
  50. content: '',
  51. accounts: '',
  52. canceltext: '',
  53. jurisdictionText: '',
  54. hasPermissionText: '',
  55. }
  56. },
  57. props: {
  58. isShow: {
  59. type: Boolean,
  60. default: false
  61. },
  62. signupType: {
  63. type: Number,
  64. },
  65. signupStatus: {
  66. type: String
  67. },
  68. goFollow: {
  69. type: Boolean
  70. },
  71. isCancelShow: {
  72. type: Boolean,
  73. default: false
  74. },
  75. idTypeCancel: {
  76. type: Object
  77. },
  78. jurisdictionList: {
  79. type: Object
  80. },
  81. applyForIsShow: { //潜在用户
  82. type: Boolean
  83. },
  84. isShowhasPermission: { //联系销售
  85. type: Boolean
  86. },
  87. hasPermission: { //权限字段
  88. type: String
  89. }
  90. },
  91. watch: {
  92. goFollow() {
  93. this.goFollowShow = this.goFollow
  94. },
  95. isShow() {
  96. this.show = this.isShow
  97. },
  98. signupType() {
  99. if (this.signupType == 1) {
  100. this.content = '预约成功,已加入您的活动日程'
  101. this.accounts = `
  102. 预约成功,已加入您的活动日程<br/><br/>
  103. 关注【弘则研究】公众号,及时获取活动时间变更通知
  104. `
  105. } else {
  106. this.content = '报名成功,已加入您的活动日程'
  107. this.accounts = `
  108. 报名成功,已加入您的活动日程<br/><br/>
  109. 关注【弘则研究】公众号,及时获取活动时间变更通知
  110. `
  111. }
  112. },
  113. signupStatus() {
  114. if (this.signupStatus == 'FullStarffed') {
  115. this.content = '此活动报名人数已满,请留意下期活动'
  116. } else if (this.signupStatus == 'TwoPeople') {
  117. this.content = '单机构最多2人报名同一活动,您所在机构报名人数已满'
  118. } else if (this.signupStatus == 'BreakPromise') {
  119. this.content = '由于爽约次数过多,您暂时被限制报名资格'
  120. } else if (this.signupStatus == 'Overtime') {
  121. this.content = '活动开始前1小时内无法预约,请联系对口销售处理'
  122. }
  123. },
  124. 'idTypeCancel.type': {
  125. handler: function() {
  126. if (this.idTypeCancel.type == 1) {
  127. this.canceltext = "您要取消此次活动预约外呼吗?"
  128. } else {
  129. this.canceltext = "您要取消此次活动的报名吗?"
  130. }
  131. },
  132. deep: true
  133. },
  134. isCancelShow() {
  135. this.cancelShow = this.isCancelShow
  136. },
  137. applyForIsShow() {
  138. this.jurisdictionText = this.jurisdictionList.PopupMsg
  139. this.applyIsShow = this.applyForIsShow
  140. },
  141. isShowhasPermission() {
  142. this.hasPermissionText = this.jurisdictionList.PopupMsg
  143. this.showhasPermission = this.isShowhasPermission
  144. }
  145. },
  146. methods: {
  147. contentBtn() {
  148. this.$parent.isShow = false
  149. this.show = false
  150. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  151. },
  152. //去关注
  153. goFollowShowBtn() {
  154. this.$parent.goFollow = false
  155. this.goFollowShow = false
  156. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  157. uni.navigateTo({
  158. url: '/pages/accountsOfficial/accountsOfficial'
  159. })
  160. },
  161. cancel() {
  162. this.$parent.goFollow = false
  163. this.goFollowShow = false
  164. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  165. },
  166. cancelBtn() {
  167. this.$parent.isCancelShow = false
  168. this.cancelShow = false
  169. },
  170. cancelShowBtn() {
  171. activity.signupCancel({
  172. ActivityId: this.idTypeCancel.id,
  173. SignupType: this.idTypeCancel.type,
  174. }).then(res => {
  175. if (res.Ret == 200) {
  176. this.idTypeCancel.cutId = res.Data.ActivityId
  177. if (this.signupType == 1) {
  178. uni.showToast({
  179. title: '预约外呼已取消',
  180. duration: 2000
  181. });
  182. } else {
  183. uni.showToast({
  184. title: '已取消报名',
  185. duration: 2000
  186. });
  187. }
  188. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  189. }
  190. this.$parent.isCancelShow = false
  191. this.cancelShow = false
  192. })
  193. },
  194. //立即申请
  195. applyIsShowBtn() {
  196. this.applyIsShow = false
  197. this.$parent.applyForIsShow = false
  198. if (this.hasPermission == 3) {
  199. uni.navigateTo({
  200. url: "/pages/applyTrial/applyTrial"
  201. })
  202. } else if (this.hasPermission == 4) {
  203. this.showRelation = true
  204. }
  205. },
  206. applyIsShowCancel() {
  207. this.applyIsShow = false
  208. this.$parent.applyForIsShow = false
  209. },
  210. showhasPermissionBtn() {
  211. uni.makePhoneCall({
  212. phoneNumber: this.jurisdictionList.SellerMobile //仅为示例
  213. });
  214. this.showhasPermission = false
  215. this.$parent.isShowhasPermission = false
  216. },
  217. showhasPermissionCancel() {
  218. this.showhasPermission = false
  219. this.$parent.isShowhasPermission = false
  220. }
  221. }
  222. }
  223. </script>
  224. <style scoped lang="scss">
  225. .slot-content {
  226. width: 100%;
  227. padding: 50rpx;
  228. text-align: center;
  229. font-size: 32rpx;
  230. color: #0F1826;
  231. line-height: 48rpx;
  232. }
  233. .u-model__footer__button.data-v-3626fcec {
  234. border-right: 1rpx solid #333;
  235. }
  236. </style>