diff --git a/src/components/DictRadio/index.vue b/src/components/DictRadio/index.vue
index a099717..cff2056 100644
--- a/src/components/DictRadio/index.vue
+++ b/src/components/DictRadio/index.vue
@@ -16,10 +16,10 @@ export default {
computed: {
radioValue: {
get() {
- return this.value;
+ return this.radioValue;
},
set(v) {
- this.$emit('input', v);
+ this.$emit('update:modelValue', v);
}
}
},
@@ -35,7 +35,7 @@ export default {
},
methods: {
change(val) {
- this.$emit('change', val);
+ this.$emit('update:modelValue', val);
}
}
};
diff --git a/src/components/OssImageUpload/index.vue b/src/components/OssImageUpload/index.vue
index d8fcd1b..ac5d3d0 100644
--- a/src/components/OssImageUpload/index.vue
+++ b/src/components/OssImageUpload/index.vue
@@ -44,7 +44,7 @@ import { getToken } from '@/utils/auth';
export default {
props: {
- value: [String, Object, Array],
+ modelValue: [String, Object, Array],
// 图片数量限制
limit: {
type: Number,
@@ -82,11 +82,11 @@ export default {
};
},
watch: {
- value: {
+ modelValue: {
handler(val) {
if (val) {
// 首先将值转为数组
- const list = Array.isArray(val) ? val : this.value.split(',');
+ const list = Array.isArray(val) ? val : this.modelValue.split(',');
// 然后将数组转为对象数组
this.fileList = list.map((item) => {
if (typeof item === 'string') {
@@ -115,7 +115,7 @@ export default {
const findex = this.fileList.map((f) => f.name).indexOf(file.name);
if (findex > -1) {
this.fileList.splice(findex, 1);
- this.$emit('input', this.listToString(this.fileList));
+ this.$emit('update:modelValue', this.listToString(this.fileList));
}
},
// 上传成功回调
@@ -126,7 +126,7 @@ export default {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
- this.$emit('input', this.listToString(this.fileList));
+ this.$emit('update:modelValue', this.listToString(this.fileList));
this.$modal.closeLoading();
}
},
diff --git a/src/views/pms/brand/index.vue b/src/views/pms/brand/index.vue
index 7d1d17d..7af6c81 100644
--- a/src/views/pms/brand/index.vue
+++ b/src/views/pms/brand/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -20,17 +20,16 @@
-
-
+
-
+
@@ -47,7 +46,7 @@
-
+
@@ -74,7 +73,6 @@ import { addPmsBrand, delPmsBrand, exportPmsBrand, getPmsBrand, listPmsBrand, up
export default {
name: 'PmsBrand',
- dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
@@ -108,11 +106,14 @@ export default {
// 表单参数
form: {},
// 表单校验
- rules: {}
+ rules: {},
+ normalStatusMap:[]
};
},
- created() {
+ async created() {
this.getList();
+ const normalStatusMap = await this.getDictionaryByKey('sys_normal_disable');
+ this.normalStatusMap = normalStatusMap;
},
methods: {
/** 查询品牌管理列表 */
@@ -175,7 +176,9 @@ export default {
this.reset();
const id = row.id || this.ids;
getPmsBrand(id).then((response) => {
- this.form = response;
+ const { data } = response || {};
+ data.showStatus = data.showStatus.toString();
+ this.form = data || {};
this.open = true;
this.title = '修改品牌管理';
});
diff --git a/src/views/pms/productCategory/index.vue b/src/views/pms/productCategory/index.vue
index e7f525c..8ed77ba 100644
--- a/src/views/pms/productCategory/index.vue
+++ b/src/views/pms/productCategory/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -31,13 +31,13 @@
-
+
-
+
@@ -58,7 +58,7 @@
-
+
@@ -89,12 +89,10 @@ import {
updatePmsProductCategory,
exportPmsProductCategory
} from '@/api/pms/productCategory';
-import ProductCategorySelect from '@/views/components/ProductCategorySelect';
+import { useMallStore } from '@/store/modules/mall.js';
export default {
name: 'PmsProductCategory',
- dicts: ['sys_show_status'],
- components: { ProductCategorySelect },
data() {
return {
// 遮罩层
@@ -130,11 +128,14 @@ export default {
// 表单参数
form: {},
// 表单校验
- rules: {}
+ rules: {},
+ showStatusMap: []
};
},
- created() {
+ async created() {
this.getList();
+ const showStatusMap = await this.getDictionaryByKey('sys_show_status');
+ this.showStatusMap = showStatusMap;
},
methods: {
/** 查询商品分类列表 */
@@ -198,7 +199,9 @@ export default {
this.reset();
const id = row.id || this.ids;
getPmsProductCategory(id).then((response) => {
- this.form = response;
+ const { data } = response || {};
+ data.showStatus = data.showStatus.toString();
+ this.form = data || {};
this.open = true;
this.title = '修改商品分类';
});
@@ -225,7 +228,8 @@ export default {
});
}
p.then(() => {
- this.$store.dispatch('mall/loadProductCategories', true);
+ useMallStore().loadProductCategories();
+ // this.$store.dispatch('mall/loadProductCategories', true);
});
}
});
diff --git a/src/views/pms/sku/index.vue b/src/views/pms/sku/index.vue
index 44c5bfc..5d71577 100644
--- a/src/views/pms/sku/index.vue
+++ b/src/views/pms/sku/index.vue
@@ -1,13 +1,26 @@
-
-
+
+
+
+
+
-
+
@@ -26,10 +39,9 @@
-
-
+
-
+
@@ -45,13 +57,26 @@
-
-
+
+
+
+
+
-
+
@@ -73,7 +98,7 @@