SysTipModal.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div ref="container">
  3. <a-modal
  4. :width="630"
  5. :visible="visible"
  6. :confirm-loading="confirmLoading"
  7. :getContainer="() => $refs.container"
  8. :mask="true"
  9. :maskClosable="false"
  10. @cancel="handleCancel"
  11. centered
  12. wrapClassName="sys-tip-modal-wrap"
  13. :footer="null"
  14. >
  15. <template #title>
  16. <div class="title-wrap">提醒</div>
  17. </template>
  18. <div class="tip-body">
  19. <div class="tip-content">
  20. <div class="text-title">无动销提醒</div>
  21. <p class="text-val" v-for="(item,index) in dataInfo.noMovingPinReminder" :key="index">{{ `${index+1}.${item}` }}</p>
  22. <p class="text-val" v-show="dataInfo.noMovingPinReminder.length===0">暂无</p>
  23. <div class="text-title">过期提醒</div>
  24. <p class="text-val" v-for="(item,index) in dataInfo.expirationReminder" :key="index">{{ `${index+1}.${item}` }}</p>
  25. <p class="text-val" v-show="dataInfo.expirationReminder.length===0">暂无</p>
  26. <div class="text-title">库存提醒</div>
  27. <p class="text-val" v-for="(item,index) in dataInfo.inventoryReminder" :key="index">{{ `${index+1}.${item}` }}</p>
  28. <p class="text-val" v-show="dataInfo.inventoryReminder.length===0">暂无</p>
  29. </div>
  30. <div class="btn-wrap">
  31. <a-button type="primary" @click="handleOk" class="confirm-btn">好的</a-button>
  32. </div>
  33. </div>
  34. </a-modal>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. visible: false,
  42. confirmLoading: false,
  43. dataInfo: {
  44. expirationReminder: [],
  45. inventoryReminder: [],
  46. noMovingPinReminder: []
  47. },
  48. }
  49. },
  50. methods: {
  51. open(data = {}) {
  52. this.visible = true
  53. this.dataInfo = { ...data }
  54. },
  55. handleCancel() {
  56. this.visible = false
  57. },
  58. handleOk() {
  59. this.visible = false
  60. },
  61. },
  62. }
  63. </script>
  64. <style lang="less">
  65. .sys-tip-modal-wrap {
  66. .ant-modal-header {
  67. border-bottom: 0;
  68. background-color: transparent;
  69. }
  70. .ant-modal-footer {
  71. border-top: 0;
  72. text-align: center;
  73. }
  74. .ant-modal-content {
  75. background: url('./sys-tip-bg.png') no-repeat;
  76. background-size: 100% 100%;
  77. background-blend-mode: lighten;
  78. }
  79. .ant-modal-body {
  80. padding-top: 0;
  81. }
  82. .confirm-btn {
  83. width: 118px;
  84. }
  85. .title-wrap {
  86. position: relative;
  87. padding-left: 16px;
  88. font-size: 20px;
  89. &::before {
  90. position: absolute;
  91. content: '';
  92. left: 0;
  93. top: 50%;
  94. transform: translateY(-50%);
  95. height: 20px;
  96. width: 4px;
  97. background: #1890ff;
  98. border-radius: 4px;
  99. }
  100. }
  101. .tip-body {
  102. position: relative;
  103. padding: 16px;
  104. width: 100%;
  105. border-radius: 8px;
  106. box-shadow: 0px 0px 10px 0px #3f6bfd24;
  107. background-color: rgba(255, 255, 255, 0.8);
  108. }
  109. .tip-content {
  110. max-height: 300px;
  111. overflow: hidden scroll;
  112. }
  113. .btn-wrap {
  114. margin-top: 16px;
  115. text-align: center;
  116. }
  117. .text-title {
  118. font-family: PingFang SC;
  119. font-weight: 500;
  120. font-size: 16px;
  121. margin: 8px 0;
  122. }
  123. .text-val {
  124. font-size: 14px;
  125. font-family: PingFang SC;
  126. font-weight: 400;
  127. font-size: 14px;
  128. margin-bottom: 0;
  129. }
  130. }
  131. </style>