open.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div class="app-content">
  3. <div>
  4. <form>
  5. <div class="module-com input-line-wrap" style="padding:20upx 26upx 0upx 26upx;font-size:32upx;">
  6. 您正在<text @click="beginChangeCg(0)">开启</text>/<text @click="beginChangeCg(1)">关闭</text>零售店所需的完整功能,包括商城、订单管理、客户管理和<text @click="openPfShop2()">财务</text>管理等。
  7. </div>
  8. <div class="confirm-btn">
  9. <button class="admin-button-com big blue" @click="changeCg(0)"> 开启 </button>
  10. <button class="admin-button-com big default" style="margin-top:30upx;" @click="changeCg(1)"> 关闭 </button>
  11. </div>
  12. </form>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. import { changeOnlyCg } from "@/api/shop";
  18. import { openPfFn } from "@/api/apply";
  19. export default {
  20. name: "open",
  21. data() {
  22. return {
  23. };
  24. },
  25. methods: {
  26. init(){
  27. },
  28. openPfShop2(){
  29. uni.showLoading({mask:false})
  30. openPfFn().then(res=>{
  31. uni.hideLoading()
  32. if(res.code == 1){
  33. this.$msg(res.msg)
  34. }
  35. })
  36. },
  37. beginChangeCg(num){
  38. let that = this
  39. let title = num == 0 ? '开启' :'关闭'
  40. that.$util.confirmModal({content:'确认'+title+'?',okText:'确认'},() => {
  41. that.confirmRecover(num)
  42. })
  43. },
  44. changeCg(num){
  45. let that = this
  46. that.$msg('请联系管理员')
  47. },
  48. confirmRecover(num){
  49. let that = this
  50. changeOnlyCg({onlyCg:num}).then(res=>{
  51. if(res.code == 1){
  52. that.$store.commit("setLoginInfo", {})
  53. that.$store.commit("setMyShopInfo", {})
  54. that.$store.commit("setDictionariesInfo", {})
  55. // #ifdef APP-PLUS
  56. plus.runtime.restart()
  57. // #endif
  58. // #ifdef MP-WEIXIN
  59. that.pageTo({url:'/admin/home/workbench',type:3})
  60. // #endif
  61. }
  62. })
  63. }
  64. }
  65. };
  66. </script>
  67. <style lang="scss" scoped>
  68. .app-content {
  69. min-height: calc(100vh - 20upx);
  70. padding-top: 20upx;
  71. }
  72. .prompt-text {
  73. color: $fontColor3;
  74. padding-left: 30upx;
  75. margin-bottom: 30upx;
  76. }
  77. .module-com {
  78. margin-bottom: 20upx;
  79. .member-wrap {
  80. .member-det {
  81. font-size: 24upx;
  82. margin-left: 20upx;
  83. }
  84. }
  85. .remark-wrap {
  86. align-items: flex-start;
  87. .remark {
  88. height: 240upx;
  89. }
  90. }
  91. }
  92. .confirm-btn {
  93. width: calc(100% - 60upx);
  94. margin: 60upx 30upx 20upx;
  95. .admin-button-com {
  96. width: 100%;
  97. }
  98. }
  99. </style>