importGuideModal.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <a-modal
  3. centered
  4. class="importGuide-modal"
  5. :footer="null"
  6. :maskClosable="false"
  7. title="导入"
  8. v-model="isShow"
  9. @cancle="isShow=false"
  10. :width="750">
  11. <div class="importGuide-con">
  12. <div class="explain-con">
  13. <div class="explain-item">
  14. <div class="explain-tit">
  15. <span>1</span>准备导入
  16. </div>
  17. <p>所有允许导入的数据字段请参考模板,数据字段不符合规则,整条不予以导入。</p>
  18. <ul>
  19. <li>1) “产品编码”字段为必填项。</li>
  20. <li>2) “起订量限制“为选项,只可选择”按整箱‘或者“按设置数量”,选择“按设置数量”时,“起订数量”为必填项。</li>
  21. </ul>
  22. <a-button type="link" icon="download">下载导入模板</a-button>
  23. </div>
  24. <div class="explain-item">
  25. <div class="explain-tit">
  26. <span>2</span>上传数据文件
  27. </div>
  28. <p>目前支持的文件类型*.xls,*.xlsx.</p>
  29. <a-button type="primary" class="button-info" icon="plus-circle">添加文件</a-button>
  30. </div>
  31. </div>
  32. <!-- 按钮 -->
  33. <div class="btn-con">
  34. <a-button
  35. type="primary"
  36. id="importGuide-nextStep"
  37. size="large"
  38. class="button-primary"
  39. @click="handlerNextStep"
  40. style="padding: 0 60px;">下一步</a-button>
  41. <a-button
  42. id="importGuide-cancel"
  43. size="large"
  44. class="button-cancel"
  45. @click="isShow=false"
  46. style="padding: 0 60px;margin-left: 15px;">取消</a-button>
  47. </div>
  48. </div>
  49. <!-- 导入 -->
  50. <chooseImportModal :openModal="openImportModal" @close="openImportModal=false" />
  51. </a-modal>
  52. </template>
  53. <script>
  54. import ChooseImportModal from './chooseImportModal.vue'
  55. export default {
  56. name: 'ImportGuideModal',
  57. components: { ChooseImportModal },
  58. props: {
  59. openModal: { // 弹框显示状态
  60. type: Boolean,
  61. default: false
  62. },
  63. itemId: {
  64. type: [Number, String],
  65. default: ''
  66. },
  67. nowData: {
  68. type: Object,
  69. default: null
  70. }
  71. },
  72. data () {
  73. return {
  74. isShow: this.openModal, // 是否打开弹框
  75. openImportModal: false // 导入
  76. }
  77. },
  78. methods: {
  79. // 下一步
  80. handlerNextStep () {
  81. this.openImportModal = true
  82. this.$emit('close')
  83. }
  84. },
  85. watch: {
  86. // 父页面传过来的弹框状态
  87. openModal (newValue, oldValue) {
  88. this.isShow = newValue
  89. },
  90. // 重定义的弹框状态
  91. isShow (newValue, oldValue) {
  92. if (!newValue) {
  93. this.$emit('close')
  94. }
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="less" scoped>
  100. .importGuide-modal{
  101. .importGuide-con{
  102. .explain-con{
  103. .explain-item{
  104. margin-bottom: 10px;
  105. .explain-tit{
  106. font-weight: bold;
  107. span{
  108. display: inline-block;
  109. width: 18px;
  110. height: 18px;
  111. line-height: 16px;
  112. text-align: center;
  113. margin-right: 5px;
  114. border-radius: 50%;
  115. border: 1px solid rgba(0, 0, 0, 0.3);
  116. }
  117. }
  118. p{
  119. margin: 8px 0;
  120. padding-left: 23px;
  121. }
  122. ul{
  123. list-style: none;
  124. padding: 0;
  125. padding-left: 23px;
  126. margin: 0;
  127. li{
  128. line-height: 26px;
  129. }
  130. }
  131. }
  132. }
  133. .btn-con{
  134. text-align: center;
  135. margin: 30px 0 20px;
  136. .button-cancel{
  137. font-size: 12px;
  138. }
  139. }
  140. }
  141. }
  142. </style>