|
@@ -137,7 +137,9 @@
|
|
|
<div class="flex-item left">
|
|
<div class="flex-item left">
|
|
|
<div class="section-title">
|
|
<div class="section-title">
|
|
|
<img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
|
|
<img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
|
|
|
- 详情资料准备 (2选1)
|
|
|
|
|
|
|
+ 详情资料准备 (2选1)
|
|
|
|
|
+
|
|
|
|
|
+ <el-button v-if="form.dataType == '1'" type="text" class="mar-left-10 fs-16" @click="downloadExcel">下载商品基础资料模版</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -236,6 +238,8 @@ const disabledButton = ref(true)
|
|
|
let templates = ref([])
|
|
let templates = ref([])
|
|
|
let goods_art_nos = ref([])
|
|
let goods_art_nos = ref([])
|
|
|
let partErrList = ref([])
|
|
let partErrList = ref([])
|
|
|
|
|
+const excel_template_url = ref('')
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 定义一个定时器变量
|
|
// 定义一个定时器变量
|
|
|
const INTERVAL = ref<number | NodeJS.Timeout | null>(null);
|
|
const INTERVAL = ref<number | NodeJS.Timeout | null>(null);
|
|
@@ -286,10 +290,24 @@ const getCompanyTemplates = async () => {
|
|
|
if (templates.value.length > 0) {
|
|
if (templates.value.length > 0) {
|
|
|
form.selectTemplate = templates.value[0]
|
|
form.selectTemplate = templates.value[0]
|
|
|
}
|
|
}
|
|
|
|
|
+ excel_template_url.value = data.excel_template_url
|
|
|
// 计算总页数
|
|
// 计算总页数
|
|
|
totalPage.value = Math.ceil(templates.value.length / itemsPerPage);
|
|
totalPage.value = Math.ceil(templates.value.length / itemsPerPage);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const downloadExcel = () => {
|
|
|
|
|
+ const a = document.createElement('a')
|
|
|
|
|
+ a.href = excel_template_url.value,
|
|
|
|
|
+ a.download = '商品基础资料模版'
|
|
|
|
|
+ document.body.appendChild(a)
|
|
|
|
|
+ a.click()
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ document.body.removeChild(a);
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const onCurrentChange = (page) => {
|
|
const onCurrentChange = (page) => {
|
|
|
queryParams.current = page;
|
|
queryParams.current = page;
|