|
|
@@ -38,9 +38,20 @@
|
|
|
type="textarea"
|
|
|
:rows="2"
|
|
|
disabled
|
|
|
- placeholder="自动拼接:品牌名 + 规格型号 + 产品分类 + 发票规格"
|
|
|
+ placeholder="自动拼接:品牌+规格型号+【描述】+(单位:单位)"
|
|
|
+ />
|
|
|
+ <div class="form-item-tip">A10产品名称由系统自动拼接:品牌+规格型号+【描述】+(单位:单位),无需手动填写</div>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 商品描述 -->
|
|
|
+ <el-form-item label="商品说明:">
|
|
|
+ <el-input
|
|
|
+ v-model="productForm.productDescription"
|
|
|
+ :rows="3"
|
|
|
+ placeholder="请输入商品描述"
|
|
|
+ maxlength="30"
|
|
|
+ show-word-limit
|
|
|
/>
|
|
|
- <div class="form-item-tip">A10产品名称由系统自动拼接:品牌名 + 规格型号 + 产品分类(三级分类)+ 发票规格,无需手动填写</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 规格型号 和 UPC(69)条码 -->
|
|
|
@@ -159,9 +170,9 @@
|
|
|
<el-input v-model="productForm.promotionTitle" type="textarea" :rows="3" placeholder="请输入促销标题" maxlength="300" show-word-limit />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- 商品简介 -->
|
|
|
- <el-form-item label="商品简介:">
|
|
|
- <el-input v-model="productForm.productDescription" type="textarea" :rows="3" placeholder="请输入商品简介" maxlength="500" show-word-limit />
|
|
|
+ <!-- 商品说明 -->
|
|
|
+ <el-form-item label="商品说明:">
|
|
|
+ <el-input v-model="productForm.productExplain" type="textarea" :rows="3" placeholder="请输入商品说明" maxlength="500" show-word-limit />
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
@@ -417,18 +428,8 @@
|
|
|
|
|
|
<!-- 商品详情 -->
|
|
|
<el-form-item label="商品详情:" required>
|
|
|
- <el-tabs v-model="activeDetailTab" type="border-card">
|
|
|
- <el-tab-pane label="电脑端详情" name="pc">
|
|
|
- <div class="view-disabled-wrapper">
|
|
|
- <Editor v-model="productForm.pcDetail" :height="400" :readOnly="true" />
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="移动端详情" name="mobile">
|
|
|
- <div class="view-disabled-wrapper">
|
|
|
- <Editor v-model="productForm.mobileDetail" :height="400" :readOnly="true" />
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <div class="pc-detail-content" v-if="productForm.pcDetail" v-html="productForm.pcDetail"></div>
|
|
|
+ <div v-else class="text-gray-400">暂无详情</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
@@ -534,7 +535,6 @@ import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue';
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import { Warning, ArrowRight, Check, Plus, CircleCheck, Search } from '@element-plus/icons-vue';
|
|
|
-import Editor from '@/components/Editor/index.vue';
|
|
|
import UploadImage from '@/components/upload-image/index.vue';
|
|
|
import TaxCodeSelect from '@/components/TaxCodeSelect/index.vue';
|
|
|
import { categoryTreeVO, CategoryVO } from '@/api/product/category/types';
|
|
|
@@ -579,9 +579,6 @@ const productFormRef = ref();
|
|
|
const serviceGuarantees = ref<(string | number)[]>([]);
|
|
|
const installationServices = ref<string[]>([]);
|
|
|
|
|
|
-// 商品详情选项卡
|
|
|
-const activeDetailTab = ref('pc');
|
|
|
-
|
|
|
// 轮播图URL数组(UI管理用)
|
|
|
const carouselImages = ref<string[]>([]);
|
|
|
|
|
|
@@ -1176,14 +1173,21 @@ const handleSalesVolumeInput = (val: string) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// A10产品名称自动拼接(品牌名 + 规格型号 + 产品分类 + 发票规格)
|
|
|
+// A10产品名称自动拼接(品牌+规格型号+【描述】+(单位:单位))
|
|
|
const a10ProductNameComputed = computed(() => {
|
|
|
const brand = brandOptions.value.find((b) => Number(b.id) === Number(productForm.brandId));
|
|
|
const brandName = brand?.brandName || '';
|
|
|
const specificationsCode = productForm.specificationsCode || '';
|
|
|
- const categoryName = selectedLevel3Name.value || '';
|
|
|
- const invoiceSpecs = productForm.invoiceSpecs || '';
|
|
|
- return [brandName, specificationsCode, categoryName, invoiceSpecs].filter((s) => s.trim()).join(' ');
|
|
|
+ const description = (productForm.productDescription || '').trim();
|
|
|
+ const unit = unitOptions.value.find((u: any) => Number(u.id) === Number(productForm.unitId));
|
|
|
+ const unitName = unit?.unitName || '';
|
|
|
+
|
|
|
+ const parts: string[] = [];
|
|
|
+ if (brandName.trim()) parts.push(brandName.trim());
|
|
|
+ if (specificationsCode.trim()) parts.push(specificationsCode.trim());
|
|
|
+ if (description) parts.push(`【${description}】`);
|
|
|
+ if (unitName.trim()) parts.push(`(单位:${unitName.trim()})`);
|
|
|
+ return parts.join(' ');
|
|
|
});
|
|
|
|
|
|
// 格式化价格为两位小数(不允许负数)
|
|
|
@@ -1789,5 +1793,26 @@ onMounted(async () => {
|
|
|
opacity: 0.9;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ .pc-detail-content {
|
|
|
+ width: 100%;
|
|
|
+ line-height: 1.6;
|
|
|
+ color: #303133;
|
|
|
+ word-break: break-word;
|
|
|
+
|
|
|
+ :deep(img) {
|
|
|
+ max-width: 100%;
|
|
|
+ height: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(table) {
|
|
|
+ max-width: 100%;
|
|
|
+ border-collapse: collapse;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(p) {
|
|
|
+ margin: 0 0 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|