123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <a-modal
- centered
- class="importGuide-modal"
- :footer="null"
- :maskClosable="false"
- title="导入"
- v-model="isShow"
- @cancle="isShow=false"
- :width="750">
- <div class="importGuide-con">
- <div class="explain-con">
- <div class="explain-item">
- <div class="explain-tit">
- <span>1</span>准备导入
- </div>
- <p>所有允许导入的数据字段请参考模板,数据字段不符合规则,整条不予以导入。</p>
- <ul>
- <li>1) “产品编码”字段为必填项。</li>
- <li>2) “起订量限制“为选项,只可选择”按整箱‘或者“按设置数量”,选择“按设置数量”时,“起订数量”为必填项。</li>
- </ul>
- <a-button type="link" icon="download">下载导入模板</a-button>
- </div>
- <div class="explain-item">
- <div class="explain-tit">
- <span>2</span>上传数据文件
- </div>
- <p>目前支持的文件类型*.xls,*.xlsx.</p>
- <a-button type="primary" class="button-info" icon="plus-circle">添加文件</a-button>
- </div>
- </div>
- <!-- 按钮 -->
- <div class="btn-con">
- <a-button
- type="primary"
- id="importGuide-nextStep"
- size="large"
- class="button-primary"
- @click="handlerNextStep"
- style="padding: 0 60px;">下一步</a-button>
- <a-button
- id="importGuide-cancel"
- size="large"
- class="button-cancel"
- @click="isShow=false"
- style="padding: 0 60px;margin-left: 15px;">取消</a-button>
- </div>
- </div>
- <!-- 导入 -->
- <chooseImportModal :openModal="openImportModal" @close="openImportModal=false" />
- </a-modal>
- </template>
- <script>
- import ChooseImportModal from './chooseImportModal.vue'
- export default {
- name: 'ImportGuideModal',
- components: { ChooseImportModal },
- props: {
- openModal: { // 弹框显示状态
- type: Boolean,
- default: false
- },
- itemId: {
- type: [Number, String],
- default: ''
- },
- nowData: {
- type: Object,
- default: null
- }
- },
- data () {
- return {
- isShow: this.openModal, // 是否打开弹框
- openImportModal: false // 导入
- }
- },
- methods: {
- // 下一步
- handlerNextStep () {
- this.openImportModal = true
- this.$emit('close')
- }
- },
- watch: {
- // 父页面传过来的弹框状态
- openModal (newValue, oldValue) {
- this.isShow = newValue
- },
- // 重定义的弹框状态
- isShow (newValue, oldValue) {
- if (!newValue) {
- this.$emit('close')
- }
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .importGuide-modal{
- .importGuide-con{
- .explain-con{
- .explain-item{
- margin-bottom: 10px;
- .explain-tit{
- font-weight: bold;
- span{
- display: inline-block;
- width: 18px;
- height: 18px;
- line-height: 16px;
- text-align: center;
- margin-right: 5px;
- border-radius: 50%;
- border: 1px solid rgba(0, 0, 0, 0.3);
- }
- }
- p{
- margin: 8px 0;
- padding-left: 23px;
- }
- ul{
- list-style: none;
- padding: 0;
- padding-left: 23px;
- margin: 0;
- li{
- line-height: 26px;
- }
- }
- }
- }
- .btn-con{
- text-align: center;
- margin: 30px 0 20px;
- .button-cancel{
- font-size: 12px;
- }
- }
- }
- }
- </style>
|