modalDialog.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <view>
  3. <u-modal v-model="show" :content-style="{fontSize: '32rpx'}" @confirm="contentBtn"
  4. :show-title="false" confirm-text="知道了" :confirm-style="{fontWeight: '700'}">
  5. <view class="slot-content">
  6. <rich-text :nodes="content"></rich-text>
  7. </view>
  8. </u-modal>
  9. <!-- 关注公众号 -->
  10. <u-modal v-model="goFollowShow" :content-style="{fontSize: '32rpx'}" @confirm="goFollowShowBtn"
  11. :show-cancel-button="true" confirm-text="去关注" @cancel="cancel" :show-title="false"
  12. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  13. <view class="slot-content">
  14. <rich-text :nodes="accounts"></rich-text>
  15. </view>
  16. </u-modal>
  17. <u-modal v-model="cancelShow" :content="canceltext" :content-style="{fontSize: '32rpx',lineHeight: '80rpx'}"
  18. :confirm-style="{fontWeight: '700'}" @confirm="cancelShowBtn" @cancel="cancelBtn" :show-title="false"
  19. :show-cancel-button="true" :cancel-style="{borderRight:'1rpx solid #EBEBEB'}"></u-modal>
  20. <!-- 立即申请 -->
  21. <u-modal v-model="applyIsShow" :content-style="{fontSize: '32rpx'}" @confirm="applyIsShowBtn"
  22. :show-cancel-button="true" confirm-text="立即申请" @cancel="applyIsShowCancel" :show-title="false"
  23. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  24. <view class="slot-content">
  25. <rich-text :nodes="jurisdictionText"></rich-text>
  26. </view>
  27. </u-modal>
  28. <!-- 拨打电话 -->
  29. <u-modal v-model="showhasPermission" :content-style="{fontSize: '32rpx'}" @confirm="showhasPermissionBtn"
  30. :show-cancel-button="true" confirm-text="拨号" @cancel="showhasPermissionCancel" :show-title="false"
  31. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  32. <view class="slot-content">
  33. <rich-text :nodes="hasPermissionText"></rich-text>
  34. </view>
  35. </u-modal>
  36. <u-modal v-model="showRelation" confirm-text="知道了" :confirm-style="{fontWeight: '700'}"
  37. :content="contentRelation"></u-modal>
  38. <!-- 修改手机号 -->
  39. <u-modal width="650" v-model="editIsShowDlg" :content-style="{fontSize: '32rpx'}" @confirm="GoOutboundMobileBtn"
  40. :show-cancel-button="true" confirm-text="无需修改" cancel-text="前去修改"
  41. cancel-color="#3385FF"
  42. @cancel="GoOutboundMobileIsGo" :show-title="false"
  43. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" >
  44. <view class="slot-content">
  45. <rich-text :nodes="editIsShowAccounts"></rich-text>
  46. </view>
  47. </u-modal>
  48. <u-modal v-model="mailboxBindingDlg" :content-style="{fontSize: '32rpx'}" @confirm="gmailboxBindingDlgBtn"
  49. :show-cancel-button="true" confirm-text="设置" @cancel="cancelMailboxBindingDlg" :show-title="false"
  50. :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
  51. <view class="slot-content">
  52. <rich-text :nodes="mailboxText"></rich-text>
  53. </view>
  54. </u-modal>
  55. </view>
  56. </template>
  57. <script>
  58. import {
  59. activity
  60. } from "@/config/api.js"
  61. export default {
  62. data() {
  63. return {
  64. goFollowShow: false,
  65. show: false,
  66. cancelShow: false,
  67. applyIsShow: false,
  68. showRelation: false,
  69. showhasPermission: false,
  70. contentRelation: '申请已提交,请等待销售人员与您联系',
  71. content: '',
  72. accounts: '',
  73. canceltext: '',
  74. jurisdictionText: '',
  75. hasPermissionText: '',
  76. editIsShowAccounts:'',
  77. editIsShowDlg:false,
  78. mailboxBindingDlg:false,
  79. mailboxText:'您当前绑定的联系方式为邮箱,请先设置您的外呼号码'
  80. }
  81. },
  82. props: {
  83. isShow: {
  84. type: Boolean,
  85. default: false
  86. },
  87. signupType: {
  88. type: Number,
  89. },
  90. signupStatus: {
  91. type: String,
  92. default:'Success'
  93. },
  94. goFollow: {
  95. type: Boolean
  96. },
  97. isCancelShow: {
  98. type: Boolean,
  99. default: false
  100. },
  101. idTypeCancel: {
  102. type: Object
  103. },
  104. jurisdictionList: {
  105. type: Object
  106. },
  107. applyForIsShow: { //潜在用户
  108. type: Boolean
  109. },
  110. isShowhasPermission: { //联系销售
  111. type: Boolean
  112. },
  113. hasPermission: { //权限字段
  114. type: String
  115. },
  116. editIsShow:{
  117. type:Boolean,
  118. },
  119. countryCode:{
  120. type:String
  121. },
  122. mobileEdit:{
  123. type:String
  124. },
  125. goOnNextStep:{
  126. type:Boolean,
  127. default:false
  128. },
  129. mailboxBinding:{
  130. type:Boolean,
  131. default:false
  132. },
  133. },
  134. watch: {
  135. mailboxBinding(){
  136. this.mailboxBindingDlg=this.mailboxBinding
  137. },
  138. editIsShow(){
  139. this.editIsShowDlg=this.editIsShow
  140. if(this.editIsShow){
  141. this.editIsShowAccounts=`
  142. 默认外呼号码是您当前绑定的手机号:<br />
  143. ${this.countryCode}-${this.mobileEdit}<br/><br/>
  144. 是否需要修改您的外呼号码?
  145. `
  146. }
  147. },
  148. goFollow() {
  149. this.goFollowShow = this.goFollow
  150. },
  151. isShow() {
  152. this.show = this.isShow
  153. },
  154. signupType() {
  155. if(this.signupStatus!=='Success') return
  156. if (this.signupType == 1) {
  157. this.content = `${this.countryCode}-${this.mobileEdit}<br/>预约成功,已加入您的活动日程`
  158. this.accounts = `
  159. ${this.countryCode}-${this.mobileEdit}<br/>
  160. 预约成功,已加入您的活动日程<br/><br/>
  161. 想要及时获取活动时间变更通知,请关注【弘则研究】公众号
  162. `
  163. } else if(this.signupType == 999){
  164. this.content = '设置成功,会前15分钟会为您推送微信消息提醒'
  165. this.accounts = `设置成功,会前15分钟会为您推送微信消息提醒<br/><br/>
  166. 请关注【弘则研究】公众号,以获取微信消息提醒`
  167. } else{
  168. this.content = '报名成功,已加入您的活动日程'
  169. this.accounts = `
  170. 报名成功,已加入您的活动日程<br/><br/>
  171. 想要及时获取活动时间变更通知,请关注【弘则研究】公众号 `
  172. }
  173. },
  174. signupStatus() {
  175. if(this.signupStatus =='Success') return
  176. if (this.signupStatus == 'FullStarffed') {
  177. this.content = '此活动报名人数已满,请留意下期活动'
  178. } else if (this.signupStatus == 'TwoPeople') {
  179. this.content = '单机构最多2人报名同一活动,您所在机构报名人数已满'
  180. } else if (this.signupStatus == 'BreakPromise') {
  181. this.content = '由于爽约次数过多,您暂时被限制报名资格'
  182. } else if (this.signupStatus == 'Overtime') {
  183. this.content = '活动开始前1小时内无法预约,请联系对口销售处理'
  184. }
  185. },
  186. 'idTypeCancel.type': {
  187. handler: function() {
  188. if (this.idTypeCancel.type == 1) {
  189. this.canceltext = "您要取消此次活动预约外呼吗?"
  190. } else {
  191. this.canceltext = "您要取消此次活动的报名吗?"
  192. }
  193. },
  194. deep: true
  195. },
  196. isCancelShow() {
  197. this.cancelShow = this.isCancelShow
  198. },
  199. applyForIsShow() {
  200. this.jurisdictionText = this.jurisdictionList.PopupMsg
  201. this.applyIsShow = this.applyForIsShow
  202. },
  203. isShowhasPermission() {
  204. this.hasPermissionText = this.jurisdictionList.PopupMsg
  205. this.showhasPermission = this.isShowhasPermission
  206. }
  207. },
  208. methods: {
  209. contentBtn() {
  210. this.$parent.isShow = false
  211. this.show = false
  212. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  213. },
  214. //去关注
  215. goFollowShowBtn() {
  216. this.$parent.goFollow = false
  217. this.goFollowShow = false
  218. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  219. uni.navigateTo({
  220. url: '/activityPages/accountsOfficial/accountsOfficial'
  221. })
  222. },
  223. cancel() {
  224. this.$parent.goFollow = false
  225. this.goFollowShow = false
  226. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  227. },
  228. cancelBtn() {
  229. this.$parent.isCancelShow = false
  230. this.cancelShow = false
  231. },
  232. cancelShowBtn() {
  233. activity.signupCancel({
  234. ActivityId: this.idTypeCancel.id,
  235. SignupType: this.idTypeCancel.type,
  236. }).then(res => {
  237. if (res.Ret == 200) {
  238. this.idTypeCancel.cutId = res.Data.ActivityId
  239. if (this.signupType == 1) {
  240. uni.showToast({
  241. title: '预约外呼已取消',
  242. duration: 2000
  243. });
  244. } else {
  245. uni.showToast({
  246. title: '已取消报名',
  247. duration: 2000
  248. });
  249. }
  250. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  251. }
  252. this.$parent.isCancelShow = false
  253. this.cancelShow = false
  254. })
  255. },
  256. //立即申请
  257. applyIsShowBtn() {
  258. this.applyIsShow = false
  259. this.$parent.applyForIsShow = false
  260. if (this.hasPermission == 3) {
  261. uni.navigateTo({
  262. url: "/pages/applyTrial/applyTrial"
  263. })
  264. } else if (this.hasPermission == 4) {
  265. this.showRelation = true
  266. }
  267. },
  268. applyIsShowCancel() {
  269. this.applyIsShow = false
  270. this.$parent.applyForIsShow = false
  271. },
  272. showhasPermissionBtn() {
  273. uni.makePhoneCall({
  274. phoneNumber: this.jurisdictionList.SellerMobile //仅为示例
  275. });
  276. this.showhasPermission = false
  277. this.$parent.isShowhasPermission = false
  278. },
  279. showhasPermissionCancel() {
  280. this.showhasPermission = false
  281. this.$parent.isShowhasPermission = false
  282. },
  283. GoOutboundMobileBtn(){
  284. this.$parent.editIsShow=false
  285. this.editIsShowDlg=false
  286. if(this.goOnNextStep){
  287. this.goFollowShow=true
  288. }else {
  289. this.show=true
  290. }
  291. },
  292. GoOutboundMobileIsGo(){
  293. this.$parent.editIsShow=false
  294. this.editIsShowDlg=false
  295. this.$emit('cancelShowBtn', this.idTypeCancel, this.signupType, this.idTypeCancel.isNum)
  296. uni.navigateTo({
  297. url:'/activityPages/editOutbound/editOutbound?title=修改外呼号码&identification=修改&goOnNextStep='+this.goOnNextStep+"&id="+this.idTypeCancel.cutId+'&cellphone='+ this.countryCode+'-'+ this.mobileEdit,
  298. })
  299. },
  300. gmailboxBindingDlgBtn(){
  301. this.$parent.mailboxBinding=false
  302. this.mailboxBindingDlg=false
  303. this.$parent.signupType=''
  304. uni.navigateTo({
  305. url:'/activityPages/editOutbound/editOutbound?title=设置外呼号码&identification=邮箱&goOnNextStep='+this.goOnNextStep+"&id="+this.idTypeCancel.cutId
  306. })
  307. },
  308. cancelMailboxBindingDlg(){
  309. this.$parent.mailboxBinding=false
  310. this.mailboxBindingDlg=false
  311. }
  312. }
  313. }
  314. </script>
  315. <style scoped lang="scss">
  316. .slot-content {
  317. width: 100%;
  318. padding: 50rpx;
  319. text-align: center;
  320. font-size: 32rpx;
  321. color: #0F1826;
  322. line-height: 48rpx;
  323. }
  324. .u-model__footer__button.data-v-3626fcec {
  325. border-right: 1rpx solid #333;
  326. }
  327. </style>