Commit 4bc42d2b by qinjianhui

feat: 商品属性管理优化

parent 125d728c
...@@ -11,15 +11,16 @@ module.exports = { ...@@ -11,15 +11,16 @@ module.exports = {
parser: '@babel/eslint-parser', parser: '@babel/eslint-parser',
}, },
rules: { rules: {
"space-before-function-paren": 0, 'space-before-function-paren': 0,
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'comma-dangle': ['error', 'always-multiline'], 'comma-dangle': 'off',
// eslint-disable-next-line no-dupe-keys
'space-before-function-paren': 'off', 'space-before-function-paren': 'off',
indent: 'off', indent: 'off',
'multiline-ternary': 'off', 'multiline-ternary': 'off',
"vue/multi-word-component-names":"off", 'vue/multi-word-component-names': 'off',
'eol-last': 0, 'eol-last': 0,
'vue/no-mutating-props':"off" 'vue/no-mutating-props': 'off',
}, },
} }
{ {
"tabWidth": 2, "tabWidth": 2,
"singleQuote": true, "singleQuote": true,
"printWidth": 180, "printWidth": 80,
"semi": false, "semi": false,
"trailingComma": "none", "trailingComma": "none",
"bracketSpacing": true, "bracketSpacing": true,
......
{
"singleQuote": true,
"semi": false,
"trailingComma": "all",
"printWidth": 60
}
...@@ -1045,10 +1045,6 @@ ul li { ...@@ -1045,10 +1045,6 @@ ul li {
padding: 0 8px; padding: 0 8px;
} }
.el-dialog__footer .el-button {
width: 100px;
}
.operate-popper { .operate-popper {
min-width: 100px; min-width: 100px;
} }
......
...@@ -36,6 +36,7 @@ import { ...@@ -36,6 +36,7 @@ import {
Tooltip, Tooltip,
ColorPicker, ColorPicker,
CheckboxGroup, CheckboxGroup,
Popover,
} from 'element-ui' } from 'element-ui'
const components = [ const components = [
...@@ -71,6 +72,7 @@ const components = [ ...@@ -71,6 +72,7 @@ const components = [
Tooltip, Tooltip,
ColorPicker, ColorPicker,
CheckboxGroup, CheckboxGroup,
Popover,
] ]
export default { export default {
......
...@@ -101,6 +101,22 @@ const routes = [ ...@@ -101,6 +101,22 @@ const routes = [
name: 'system_category_style', name: 'system_category_style',
meta: { title: '类别风格' }, meta: { title: '类别风格' },
}, },
{
path: '/saas/sku-sort',
component: () => import('@/views/system/sku-sort.vue'),
name: 'system_sku-sort',
meta: {
title: '属性类别管理',
},
},
{
path: '/saas/sku-manage',
component: () => import('@/views/system/sku-manage.vue'),
name: 'system_sku-manage',
meta: {
title: '商品属性管理',
},
},
], ],
}, },
] ]
......
...@@ -252,6 +252,22 @@ export default { ...@@ -252,6 +252,22 @@ export default {
index: '/saas/category-style', index: '/saas/category-style',
children: [], children: [],
}, },
{
id: 9,
path: '',
label: '属性类别管理',
icon: 'el-icon-box',
index: '/saas/sku-sort',
children: [],
},
{
id: 10,
path: '',
label: '商品属性管理',
icon: 'el-icon-box',
index: '/saas/sku-manage',
children: [],
},
], ],
}, },
], ],
......
...@@ -612,6 +612,7 @@ export default { ...@@ -612,6 +612,7 @@ export default {
pageSize: pageSize, pageSize: pageSize,
currentPage: currentPage, currentPage: currentPage,
}, },
baseURL: '/api/manage/rest',
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
...@@ -638,7 +639,9 @@ export default { ...@@ -638,7 +639,9 @@ export default {
? 'baseCategoryInfo' ? 'baseCategoryInfo'
: 'baseStyleInfo' : 'baseStyleInfo'
const url = `${text}/get?id=${this.formId}` const url = `${text}/get?id=${this.formId}`
axios.get(url).then((res) => { axios.get(url, {
baseURL: '/api/manage/rest',
}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
const data = res.data const data = res.data
this.addcurrencyform = Object.assign({}, data) this.addcurrencyform = Object.assign({}, data)
...@@ -734,20 +737,22 @@ export default { ...@@ -734,20 +737,22 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
alllist(url, arr) { alllist(url, arr) {
axios.get(url).then((res) => { axios
if (res.code === 200) { .get(url, { baseURL: '/api/manage/rest' })
this[arr] = res.data .then((res) => {
this.$nextTick(() => { if (res.code === 200) {
if (this.$refs.addcurrencyform) { this[arr] = res.data
this.$refs.addcurrencyform.clearValidate() this.$nextTick(() => {
} if (this.$refs.addcurrencyform) {
}) this.$refs.addcurrencyform.clearValidate()
} else { }
this.$alert(res.message, '错误提示', { })
dangerouslyUseHTMLString: true, } else {
}) this.$alert(res.message, '错误提示', {
} dangerouslyUseHTMLString: true,
}) })
}
})
}, },
}, },
} }
......
...@@ -137,6 +137,8 @@ export default { ...@@ -137,6 +137,8 @@ export default {
pageSize, pageSize,
currentPage, currentPage,
...this.searchForm, ...this.searchForm,
}, {
baseURL: '/api/manage/rest',
}) })
.then((res) => { .then((res) => {
this.sourceData = res.data.records this.sourceData = res.data.records
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment