|
|
@@ -52,9 +52,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)条码 -->
|
|
|
@@ -173,9 +184,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>
|
|
|
|
|
|
|
|
|
@@ -524,19 +535,9 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 商品详情 -->
|
|
|
- <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>
|
|
|
+ <el-form-item label="商品详情:">
|
|
|
+ <div class="detail-content" v-if="productForm.pcDetail" v-html="productForm.pcDetail"></div>
|
|
|
+ <span v-else class="detail-empty">暂无内容</span>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
@@ -1281,14 +1282,22 @@ 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 || '';
|
|
|
+ const unit = unitOptions.value.find((u) => Number(u.id) === Number(productForm.unitId));
|
|
|
+ const unitName = unit?.unitName || '';
|
|
|
+
|
|
|
+ const parts: string[] = [];
|
|
|
+ if (brandName.trim()) parts.push(brandName);
|
|
|
+ if (specificationsCode.trim()) parts.push(specificationsCode);
|
|
|
+ if (description.trim()) parts.push(`【${description}】`);
|
|
|
+ if (unitName.trim()) parts.push(`(单位:${unitName})`);
|
|
|
+
|
|
|
+ return parts.join(' ');
|
|
|
});
|
|
|
|
|
|
// 格式化价格为两位小数(不允许负数)
|
|
|
@@ -1845,5 +1854,35 @@ onMounted(async () => {
|
|
|
opacity: 0.9;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ .detail-content {
|
|
|
+ width: 100%;
|
|
|
+ padding: 12px 16px;
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
+ border-radius: 4px;
|
|
|
+ background-color: #fafafa;
|
|
|
+ color: #303133;
|
|
|
+ line-height: 1.6;
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail-empty {
|
|
|
+ color: #909399;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|