修复商品管理的bug
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'done', Merchant): void;
|
(e: 'done', Spec): void;
|
||||||
(e: 'clear'): void;
|
(e: 'clear'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|||||||
@@ -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 => {
|
||||||
|
|||||||
Reference in New Issue
Block a user