修复商品管理的bug

This commit is contained in:
2024-07-28 02:12:17 +08:00
parent 032d046dd8
commit 8c16f8df9c
3 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,6 @@
import { listGoodsCategory } from '@/api/shop/goodsCategory'; import { listGoodsCategory } from '@/api/shop/goodsCategory';
import { toTreeData } from 'ele-admin-pro/es'; import { toTreeData } from 'ele-admin-pro/es';
import { GoodsCategory } from '@/api/shop/goodsCategory/model'; import { GoodsCategory } from '@/api/shop/goodsCategory/model';
import { FileRecordParam } from '@/api/system/file/model';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
@@ -114,6 +113,7 @@
watch( watch(
() => props.options, () => props.options,
() => { () => {
console.log(props.merchantId);
if (props.merchantId) { if (props.merchantId) {
where.merchantId = props.merchantId; where.merchantId = props.merchantId;
} }

View File

@@ -40,7 +40,7 @@
); );
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'done', Merchant): void; (e: 'done', Spec): void;
(e: 'clear'): void; (e: 'clear'): void;
}>(); }>();

View File

@@ -608,7 +608,7 @@
const goodsId = props.data?.goodsId; const goodsId = props.data?.goodsId;
if(goodsId){ if(goodsId){
listGoodsSpec({goodsId}).then(data => { listGoodsSpec({goodsId}).then(data => {
console.log(data[0].specValue);
const specValue = data[0].specValue; const specValue = data[0].specValue;
if(specValue){ if(specValue){
spec.value = JSON.parse(specValue).map( d => { spec.value = JSON.parse(specValue).map( d => {