Commit 23b342f3 by 黑潮

update: 虚拟礼品上传模板

parent 609a7bcd
......@@ -72,7 +72,7 @@
<div slot="description">
<div class="pickup-upload">
<span class="inline-block step-text" style="margin-bottom:20px">上传完善后的文件。</span>
<dm-upload-file
<!-- <dm-upload-file
width="232"
class="inline-block ml10"
:show-file-list="false"
......@@ -84,7 +84,6 @@
with-credentials>
<el-button class="upload-trigger"><i class="iconfont-components4 icon-cp-shangc upload-icon"></i> 上传</el-button>
<span slot="tip" class="upload-tip inline-block">
<!-- <el-button style="margin-right: 30px" type="text" @click="downloadFile">下载文件模板</el-button> -->
<el-popover trigger="hover" placement="right" popper-class="upload-popper">
<el-button slot="reference" type="text" style="font-size:12px;line-height:17px">查看导入规则</el-button>
<div class="upload-tip-text">
......@@ -95,9 +94,30 @@
</div>
</el-popover>
</span>
<!-- <div slot="file-item" slot-scope="{fileData}">{{ fileData.name }}</div> -->
<!-- <div slot="file-item" slot-scope="{fileData}">{{ fileData.name }}</div> -->
</dm-upload-file>
</dm-upload-file> -->
<el-upload
ref="uploadFile"
class="inline-block ml10"
:show-file-list="false"
:auto-upload="false"
:action="uploadAction"
accept=".xls,.xlsx"
:on-change="beforeUploadFile"
:data="{ giftId: giftId, remark: '', giftName: goodsForm.giftName }"
with-credentials>
<el-button class="upload-trigger"><i class="iconfont-components4 icon-cp-shangc upload-icon"></i> 上传</el-button>
</el-upload>
<span class="ml20 upload-tip inline-block">
<el-popover trigger="hover" placement="right" popper-class="upload-popper">
<el-button slot="reference" type="text" style="font-size:12px;line-height:17px">查看导入规则</el-button>
<div class="upload-tip-text">
<p style="margin-bottom:10px">1.请按照顺序维护表头,所有变量均为必填项;</p>
<p style="margin-bottom:10px">2.请勿导入重复的内容,导入的内容在原来基础上增加库存;</p>
<p style="margin-bottom:10px">3.上传完整仅支持.xlsx .xls文件的导入,填充数据不超过“10万”条;</p>
<p>4.正在异步上传处理中,我们将按照顺序分批次(5000/1批次)更新库存,请稍候刷新查看库存上传结果;</p>
</div>
</el-popover>
</span>
<div class="pickup-list">
<p class="pickup-list-name" v-if="uploadFile.name">
<i class="iconfont-welfare4 icon-wenjian1 file-icon"></i>
......@@ -355,6 +375,7 @@ export default {
},
beforeUploadFile(file, fileList){
this.uploadFile.name = file.name;
this.$refs.uploadFile.uploadFiles = [ file ];
},
downloadFile() {
if(!this.isEdit){
......@@ -604,6 +625,7 @@ export default {
if (this.isEdit) {
giftUpdate(params).then(res =>{
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.$refs.uploadFile.submit();
}).finally(() => {
this.btnLoading = false;
this.$emit('updateLoading');
......@@ -620,6 +642,7 @@ export default {
}
this.$store.commit('updateShowCornerCanUseApp', true);
this.$router.push({ path: '/gift-manage/virtual-gift' });
this.$refs.uploadFile.submit();
}).finally(() => {
this.$emit('updateLoading');
this.btnLoading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment