|
@@ -248,19 +248,22 @@
|
|
|
<svg><use href="#i-sheet"/></svg>选择 Excel 文件
|
|
<svg><use href="#i-sheet"/></svg>选择 Excel 文件
|
|
|
</button>
|
|
</button>
|
|
|
<div v-else class="excel-selected-info">
|
|
<div v-else class="excel-selected-info">
|
|
|
- <div class="excel-file-info">
|
|
|
|
|
- <div class="excel-icon">
|
|
|
|
|
- <img src="@/assets/images/detail/file-excel.png" class="tab-icon" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="excel-file-text">
|
|
|
|
|
- <div class="excel-file-label">已选择文件</div>
|
|
|
|
|
- <div class="excel-file-name" :title="excelFileName">{{ excelFileName }}</div>
|
|
|
|
|
|
|
+ <div class="excel-icon">
|
|
|
|
|
+ <img src="@/assets/images/detail/file-excel.png" class="tab-icon" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="excel-file-text">
|
|
|
|
|
+ <div class="excel-file-name" :title="excelFileName">{{ excelFileName }}</div>
|
|
|
|
|
+ <div class="excel-file-actions">
|
|
|
|
|
+ <el-button type="primary" link class="reupload-btn" @click="selectExcel"
|
|
|
|
|
+ v-log="{ describe: { action: '重新上传Excel文件' } }">
|
|
|
|
|
+ 重新上传
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button type="danger" link class="delete-excel-btn" @click="clearExcel"
|
|
|
|
|
+ v-log="{ describe: { action: '删除Excel文件' } }">
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-button type="primary" link class="reupload-btn" @click="selectExcel"
|
|
|
|
|
- v-log="{ describe: { action: '重新上传Excel文件' } }">
|
|
|
|
|
- 重新上传
|
|
|
|
|
- </el-button>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<button class="lk data-prep-link" type="button" @click="downloadExcel"
|
|
<button class="lk data-prep-link" type="button" @click="downloadExcel"
|
|
|
title="用于非自定义详情页的商品基础资料模版"
|
|
title="用于非自定义详情页的商品基础资料模版"
|
|
@@ -1340,7 +1343,7 @@ const checkParams = async function () {
|
|
|
goods_art_no: JSON.parse(JSON.stringify(goods_art_nos.value)),
|
|
goods_art_no: JSON.parse(JSON.stringify(goods_art_nos.value)),
|
|
|
logo_path: form.logo_path || '',
|
|
logo_path: form.logo_path || '',
|
|
|
temp_name: form.selectTemplate?.template_id || '',
|
|
temp_name: form.selectTemplate?.template_id || '',
|
|
|
- excel_path: form.dataType == '1' ? form.excel_path : '',
|
|
|
|
|
|
|
+ excel_path: (isDetail && form.dataType == '1') ? (form.excel_path || '') : '',
|
|
|
template_image_order: form.selectTemplate?.template_image_order,
|
|
template_image_order: form.selectTemplate?.template_image_order,
|
|
|
temp_list,
|
|
temp_list,
|
|
|
token,
|
|
token,
|
|
@@ -1419,11 +1422,9 @@ const generate = async function () {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (form.services.includes('is_detail') || form.services.includes('is_upper_footer')) {
|
|
|
|
|
- if (form.dataType == '1' && !form.excel_path) {
|
|
|
|
|
- ElMessage.error('请上传商品基础资料')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (form.services.includes('is_detail') && form.dataType == '1' && !form.excel_path) {
|
|
|
|
|
+ ElMessage.error('请上传商品基础资料')
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 埋点:开始生成详情页
|
|
// 埋点:开始生成详情页
|
|
@@ -1472,7 +1473,7 @@ const generate = async function () {
|
|
|
goods_art_no: JSON.parse(JSON.stringify(goods_art_nos.value)),
|
|
goods_art_no: JSON.parse(JSON.stringify(goods_art_nos.value)),
|
|
|
logo_path: form.logo_path || '',
|
|
logo_path: form.logo_path || '',
|
|
|
temp_name: form.selectTemplate?.template_id || '',
|
|
temp_name: form.selectTemplate?.template_id || '',
|
|
|
- excel_path: form.dataType == '1' ? form.excel_path : '',
|
|
|
|
|
|
|
+ excel_path: (isDetail && form.dataType == '1') ? (form.excel_path || '') : '',
|
|
|
template_image_order: form.selectTemplate?.template_image_order,
|
|
template_image_order: form.selectTemplate?.template_image_order,
|
|
|
temp_list,
|
|
temp_list,
|
|
|
token,
|
|
token,
|
|
@@ -1758,6 +1759,10 @@ const getLogolist = async () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function clearExcel() {
|
|
|
|
|
+ form.excel_path = ''
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function selectExcel() {
|
|
function selectExcel() {
|
|
|
clientStore.ipc.removeAllListeners(icpList.utils.openFile);
|
|
clientStore.ipc.removeAllListeners(icpList.utils.openFile);
|
|
|
clientStore.ipc.send(icpList.utils.openFile, {
|
|
clientStore.ipc.send(icpList.utils.openFile, {
|
|
@@ -1940,25 +1945,27 @@ const selectFolder = () => {
|
|
|
margin-top: 4px;
|
|
margin-top: 4px;
|
|
|
text-align: left;
|
|
text-align: left;
|
|
|
align-self: flex-start;
|
|
align-self: flex-start;
|
|
|
- white-space: nowrap;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
|
|
+ white-space: normal;
|
|
|
|
|
+ overflow: visible;
|
|
|
|
|
+ line-height: 1.4;
|
|
|
max-width: 100%;
|
|
max-width: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.toggle {
|
|
.toggle {
|
|
|
margin-left: auto;
|
|
margin-left: auto;
|
|
|
- align-self: center;
|
|
|
|
|
|
|
+ align-self: flex-start;
|
|
|
flex: none;
|
|
flex: none;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
|
|
- gap: 7px;
|
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ gap: 4px;
|
|
|
.swl {
|
|
.swl {
|
|
|
- font-size: 13.5px;
|
|
|
|
|
|
|
+ font-size: 12px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
color: #8b95ab;
|
|
color: #8b95ab;
|
|
|
- min-width: 38px;
|
|
|
|
|
|
|
+ min-width: 0;
|
|
|
text-align: right;
|
|
text-align: right;
|
|
|
|
|
+ line-height: 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2154,7 +2161,6 @@ const selectFolder = () => {
|
|
|
margin: 0;
|
|
margin: 0;
|
|
|
transition: all 0.15s;
|
|
transition: all 0.15s;
|
|
|
&:hover {
|
|
&:hover {
|
|
|
- transform: translateY(-2px);
|
|
|
|
|
box-shadow: 0 10px 22px rgba(23, 43, 99, 0.14);
|
|
box-shadow: 0 10px 22px rgba(23, 43, 99, 0.14);
|
|
|
}
|
|
}
|
|
|
&.sel {
|
|
&.sel {
|
|
@@ -2280,11 +2286,13 @@ const selectFolder = () => {
|
|
|
border-radius: 14px;
|
|
border-radius: 14px;
|
|
|
box-shadow: 0 1px 2px rgba(23, 43, 99, 0.04), 0 10px 30px rgba(23, 43, 99, 0.06);
|
|
box-shadow: 0 1px 2px rgba(23, 43, 99, 0.04), 0 10px 30px rgba(23, 43, 99, 0.06);
|
|
|
padding: 11px 15px;
|
|
padding: 11px 15px;
|
|
|
|
|
+ text-align: left;
|
|
|
.stitle {
|
|
.stitle {
|
|
|
font-size: 15.5px;
|
|
font-size: 15.5px;
|
|
|
font-weight: 800;
|
|
font-weight: 800;
|
|
|
margin-bottom: 9px;
|
|
margin-bottom: 9px;
|
|
|
color: #1a2233;
|
|
color: #1a2233;
|
|
|
|
|
+ text-align: left;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2949,62 +2957,60 @@ const selectFolder = () => {
|
|
|
|
|
|
|
|
.excel-selected-info {
|
|
.excel-selected-info {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 64px;
|
|
|
|
|
|
|
+ min-height: 64px;
|
|
|
border: 1px solid #E5E6EB;
|
|
border: 1px solid #E5E6EB;
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
- padding: 12px 16px;
|
|
|
|
|
|
|
+ padding: 10px 12px;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
|
|
- gap: 16px;
|
|
|
|
|
|
|
+ gap: 10px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
|
|
|
- .excel-file-info {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- min-width: 0;
|
|
|
|
|
-
|
|
|
|
|
- .excel-icon {
|
|
|
|
|
- width: 32px;
|
|
|
|
|
- height: 32px;
|
|
|
|
|
- margin-right: 10px;
|
|
|
|
|
|
|
+ .excel-icon {
|
|
|
|
|
+ width: 36px;
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ flex: none;
|
|
|
|
|
|
|
|
- img {
|
|
|
|
|
- width: 32px;
|
|
|
|
|
- height: 32px;
|
|
|
|
|
- display: block;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 36px;
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ display: block;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .excel-file-text {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- min-width: 0;
|
|
|
|
|
- max-width: 100%;
|
|
|
|
|
-
|
|
|
|
|
- .excel-file-label {
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- text-align: left;
|
|
|
|
|
- color: #888;
|
|
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .excel-file-text {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ gap: 2px;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .excel-file-name {
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- color: #1D2129;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- max-width: 100%;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .excel-file-name {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #1D2129;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .excel-file-actions {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .reupload-btn {
|
|
|
|
|
|
|
+ .reupload-btn,
|
|
|
|
|
+ .delete-excel-btn {
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ height: auto;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3600,5 +3606,67 @@ const selectFolder = () => {
|
|
|
.side .right-section {
|
|
.side .right-section {
|
|
|
padding: 11px 15px;
|
|
padding: 11px 15px;
|
|
|
}
|
|
}
|
|
|
|
|
+.side .excel-selected-info {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ min-height: 72px;
|
|
|
|
|
+ border: 1px solid #E5E6EB;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ padding: 10px 12px;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ .excel-icon {
|
|
|
|
|
+ width: 53px;
|
|
|
|
|
+ height: 53px;
|
|
|
|
|
+ flex: none;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 53px;
|
|
|
|
|
+ height: 53px;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ object-fit: contain;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .excel-file-text {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: 6px;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ .excel-file-name {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #1D2129;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ line-height: 1.3;
|
|
|
|
|
+ }
|
|
|
|
|
+ .excel-file-actions {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .reupload-btn,
|
|
|
|
|
+ .delete-excel-btn {
|
|
|
|
|
+ padding: 5px !important;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ :deep(span) {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|