diff --git a/.commitlintrc.js b/admin/.commitlintrc.js similarity index 100% rename from .commitlintrc.js rename to admin/.commitlintrc.js diff --git a/.env b/admin/.env similarity index 100% rename from .env rename to admin/.env diff --git a/.env.beta b/admin/.env.beta similarity index 100% rename from .env.beta rename to admin/.env.beta diff --git a/.env.prod b/admin/.env.prod similarity index 100% rename from .env.prod rename to admin/.env.prod diff --git a/.env.test b/admin/.env.test similarity index 100% rename from .env.test rename to admin/.env.test diff --git a/.eslintignore b/admin/.eslintignore similarity index 100% rename from .eslintignore rename to admin/.eslintignore diff --git a/.eslintrc.js b/admin/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to admin/.eslintrc.js diff --git a/.gitignore b/admin/.gitignore similarity index 100% rename from .gitignore rename to admin/.gitignore diff --git a/.husky/commit-msg b/admin/.husky/commit-msg similarity index 100% rename from .husky/commit-msg rename to admin/.husky/commit-msg diff --git a/.husky/pre-commit b/admin/.husky/pre-commit similarity index 100% rename from .husky/pre-commit rename to admin/.husky/pre-commit diff --git a/.lintstagedrc.js b/admin/.lintstagedrc.js similarity index 100% rename from .lintstagedrc.js rename to admin/.lintstagedrc.js diff --git a/.prettierrc.js b/admin/.prettierrc.js similarity index 100% rename from .prettierrc.js rename to admin/.prettierrc.js diff --git a/.vscode/extensions.json b/admin/.vscode/extensions.json similarity index 100% rename from .vscode/extensions.json rename to admin/.vscode/extensions.json diff --git a/.vscode/extra.code-snippets b/admin/.vscode/extra.code-snippets similarity index 100% rename from .vscode/extra.code-snippets rename to admin/.vscode/extra.code-snippets diff --git a/.vscode/settings.json b/admin/.vscode/settings.json similarity index 100% rename from .vscode/settings.json rename to admin/.vscode/settings.json diff --git a/Dockerfile b/admin/Dockerfile similarity index 100% rename from Dockerfile rename to admin/Dockerfile diff --git a/README.md b/admin/README.md similarity index 100% rename from README.md rename to admin/README.md diff --git a/TODO.md b/admin/TODO.md similarity index 100% rename from TODO.md rename to admin/TODO.md diff --git a/deploy.yaml b/admin/deploy.yaml similarity index 100% rename from deploy.yaml rename to admin/deploy.yaml diff --git a/index.html b/admin/index.html similarity index 100% rename from index.html rename to admin/index.html diff --git a/jsconfig.json b/admin/jsconfig.json similarity index 100% rename from jsconfig.json rename to admin/jsconfig.json diff --git a/package.json b/admin/package.json similarity index 100% rename from package.json rename to admin/package.json diff --git a/public/favicon.ico b/admin/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to admin/public/favicon.ico diff --git a/src/App.vue b/admin/src/App.vue similarity index 100% rename from src/App.vue rename to admin/src/App.vue diff --git a/src/api/auth.js b/admin/src/api/auth.js similarity index 100% rename from src/api/auth.js rename to admin/src/api/auth.js diff --git a/src/api/file.js b/admin/src/api/file.js similarity index 100% rename from src/api/file.js rename to admin/src/api/file.js diff --git a/admin/src/api/sales/order.js b/admin/src/api/sales/order.js new file mode 100644 index 0000000..e1078c4 --- /dev/null +++ b/admin/src/api/sales/order.js @@ -0,0 +1,42 @@ +import request from '@/utils/request.js'; +export const search = (params) => { + return request({ + url: '/mall/trade/admin/tradeOrder/page', + method: 'get', + params, + }); +}; +export const detail = (id) => { + return request({ + url: '/uc/employee/' + id, + method: 'get', + }); +}; +export const create = (data) => { + return request({ + url: '/uc/employee', + method: 'post', + data, + }); +}; +export const update = (data) => { + return request({ + url: '/uc/employee', + method: 'put', + data, + }); +}; +export const remove = (idList) => { + return request({ + url: '/uc/employee', + method: 'delete', + params: { idList }, + }); +}; +export const enable = (params) => { + return request({ + url: '/uc/employee/enable', + method: 'put', + params, + }); +}; diff --git a/src/api/system/customer.js b/admin/src/api/system/customer.js similarity index 100% rename from src/api/system/customer.js rename to admin/src/api/system/customer.js diff --git a/src/api/system/employee.js b/admin/src/api/system/employee.js similarity index 100% rename from src/api/system/employee.js rename to admin/src/api/system/employee.js diff --git a/src/assets/layouts/login-bgp.png b/admin/src/assets/layouts/login-bgp.png similarity index 100% rename from src/assets/layouts/login-bgp.png rename to admin/src/assets/layouts/login-bgp.png diff --git a/src/assets/layouts/tabs-bgp.png b/admin/src/assets/layouts/tabs-bgp.png similarity index 100% rename from src/assets/layouts/tabs-bgp.png rename to admin/src/assets/layouts/tabs-bgp.png diff --git a/src/components/ElEditor.vue b/admin/src/components/ElEditor.vue similarity index 100% rename from src/components/ElEditor.vue rename to admin/src/components/ElEditor.vue diff --git a/src/components/ElUploadImage.vue b/admin/src/components/ElUploadImage.vue similarity index 100% rename from src/components/ElUploadImage.vue rename to admin/src/components/ElUploadImage.vue diff --git a/src/components/TableList.vue b/admin/src/components/TableList.vue similarity index 100% rename from src/components/TableList.vue rename to admin/src/components/TableList.vue diff --git a/src/components/extra/ElButton.vue b/admin/src/components/extra/ElButton.vue similarity index 100% rename from src/components/extra/ElButton.vue rename to admin/src/components/extra/ElButton.vue diff --git a/src/components/extra/ElCascader.vue b/admin/src/components/extra/ElCascader.vue similarity index 100% rename from src/components/extra/ElCascader.vue rename to admin/src/components/extra/ElCascader.vue diff --git a/src/components/extra/ElCheckboxGroup.vue b/admin/src/components/extra/ElCheckboxGroup.vue similarity index 100% rename from src/components/extra/ElCheckboxGroup.vue rename to admin/src/components/extra/ElCheckboxGroup.vue diff --git a/src/components/extra/ElDialog.vue b/admin/src/components/extra/ElDialog.vue similarity index 100% rename from src/components/extra/ElDialog.vue rename to admin/src/components/extra/ElDialog.vue diff --git a/src/components/extra/ElDropdown.vue b/admin/src/components/extra/ElDropdown.vue similarity index 100% rename from src/components/extra/ElDropdown.vue rename to admin/src/components/extra/ElDropdown.vue diff --git a/src/components/extra/ElIcon.vue b/admin/src/components/extra/ElIcon.vue similarity index 100% rename from src/components/extra/ElIcon.vue rename to admin/src/components/extra/ElIcon.vue diff --git a/src/components/extra/ElImage.vue b/admin/src/components/extra/ElImage.vue similarity index 100% rename from src/components/extra/ElImage.vue rename to admin/src/components/extra/ElImage.vue diff --git a/src/components/extra/ElInput.vue b/admin/src/components/extra/ElInput.vue similarity index 100% rename from src/components/extra/ElInput.vue rename to admin/src/components/extra/ElInput.vue diff --git a/src/components/extra/ElRadioGroup.vue b/admin/src/components/extra/ElRadioGroup.vue similarity index 100% rename from src/components/extra/ElRadioGroup.vue rename to admin/src/components/extra/ElRadioGroup.vue diff --git a/src/components/extra/ElSelect.vue b/admin/src/components/extra/ElSelect.vue similarity index 100% rename from src/components/extra/ElSelect.vue rename to admin/src/components/extra/ElSelect.vue diff --git a/src/components/extra/ElTable.vue b/admin/src/components/extra/ElTable.vue similarity index 100% rename from src/components/extra/ElTable.vue rename to admin/src/components/extra/ElTable.vue diff --git a/src/configs/index.js b/admin/src/configs/index.js similarity index 100% rename from src/configs/index.js rename to admin/src/configs/index.js diff --git a/src/icons/index.js b/admin/src/icons/index.js similarity index 100% rename from src/icons/index.js rename to admin/src/icons/index.js diff --git a/src/icons/index.json b/admin/src/icons/index.json similarity index 100% rename from src/icons/index.json rename to admin/src/icons/index.json diff --git a/src/icons/remixicon.eot b/admin/src/icons/remixicon.eot similarity index 100% rename from src/icons/remixicon.eot rename to admin/src/icons/remixicon.eot diff --git a/src/icons/remixicon.less b/admin/src/icons/remixicon.less similarity index 100% rename from src/icons/remixicon.less rename to admin/src/icons/remixicon.less diff --git a/src/icons/remixicon.svg b/admin/src/icons/remixicon.svg similarity index 100% rename from src/icons/remixicon.svg rename to admin/src/icons/remixicon.svg diff --git a/src/icons/remixicon.symbol.svg b/admin/src/icons/remixicon.symbol.svg similarity index 100% rename from src/icons/remixicon.symbol.svg rename to admin/src/icons/remixicon.symbol.svg diff --git a/src/icons/remixicon.ttf b/admin/src/icons/remixicon.ttf similarity index 100% rename from src/icons/remixicon.ttf rename to admin/src/icons/remixicon.ttf diff --git a/src/icons/remixicon.woff b/admin/src/icons/remixicon.woff similarity index 100% rename from src/icons/remixicon.woff rename to admin/src/icons/remixicon.woff diff --git a/src/icons/remixicon.woff2 b/admin/src/icons/remixicon.woff2 similarity index 100% rename from src/icons/remixicon.woff2 rename to admin/src/icons/remixicon.woff2 diff --git a/src/icons/svg/logo.svg b/admin/src/icons/svg/logo.svg similarity index 100% rename from src/icons/svg/logo.svg rename to admin/src/icons/svg/logo.svg diff --git a/src/icons/svg/msb.svg b/admin/src/icons/svg/msb.svg similarity index 100% rename from src/icons/svg/msb.svg rename to admin/src/icons/svg/msb.svg diff --git a/src/icons/svg/vue.svg b/admin/src/icons/svg/vue.svg similarity index 100% rename from src/icons/svg/vue.svg rename to admin/src/icons/svg/vue.svg diff --git a/src/icons/utils.js b/admin/src/icons/utils.js similarity index 100% rename from src/icons/utils.js rename to admin/src/icons/utils.js diff --git a/src/layouts/components/aside.vue b/admin/src/layouts/components/aside.vue similarity index 100% rename from src/layouts/components/aside.vue rename to admin/src/layouts/components/aside.vue diff --git a/src/layouts/components/breakcrumb.vue b/admin/src/layouts/components/breakcrumb.vue similarity index 100% rename from src/layouts/components/breakcrumb.vue rename to admin/src/layouts/components/breakcrumb.vue diff --git a/src/layouts/components/footer.vue b/admin/src/layouts/components/footer.vue similarity index 100% rename from src/layouts/components/footer.vue rename to admin/src/layouts/components/footer.vue diff --git a/src/layouts/components/header.vue b/admin/src/layouts/components/header.vue similarity index 100% rename from src/layouts/components/header.vue rename to admin/src/layouts/components/header.vue diff --git a/src/layouts/components/logo.vue b/admin/src/layouts/components/logo.vue similarity index 100% rename from src/layouts/components/logo.vue rename to admin/src/layouts/components/logo.vue diff --git a/src/layouts/components/main.vue b/admin/src/layouts/components/main.vue similarity index 100% rename from src/layouts/components/main.vue rename to admin/src/layouts/components/main.vue diff --git a/src/layouts/components/menu-item.vue b/admin/src/layouts/components/menu-item.vue similarity index 100% rename from src/layouts/components/menu-item.vue rename to admin/src/layouts/components/menu-item.vue diff --git a/src/layouts/components/menu.vue b/admin/src/layouts/components/menu.vue similarity index 100% rename from src/layouts/components/menu.vue rename to admin/src/layouts/components/menu.vue diff --git a/src/layouts/components/operation.vue b/admin/src/layouts/components/operation.vue similarity index 100% rename from src/layouts/components/operation.vue rename to admin/src/layouts/components/operation.vue diff --git a/src/layouts/components/profile.vue b/admin/src/layouts/components/profile.vue similarity index 100% rename from src/layouts/components/profile.vue rename to admin/src/layouts/components/profile.vue diff --git a/src/layouts/components/tabs.vue b/admin/src/layouts/components/tabs.vue similarity index 100% rename from src/layouts/components/tabs.vue rename to admin/src/layouts/components/tabs.vue diff --git a/src/layouts/components/title.vue b/admin/src/layouts/components/title.vue similarity index 100% rename from src/layouts/components/title.vue rename to admin/src/layouts/components/title.vue diff --git a/src/layouts/components/view.vue b/admin/src/layouts/components/view.vue similarity index 100% rename from src/layouts/components/view.vue rename to admin/src/layouts/components/view.vue diff --git a/src/layouts/default.vue b/admin/src/layouts/default.vue similarity index 100% rename from src/layouts/default.vue rename to admin/src/layouts/default.vue diff --git a/src/main.js b/admin/src/main.js similarity index 100% rename from src/main.js rename to admin/src/main.js diff --git a/src/plugins/element-plus.js b/admin/src/plugins/element-plus.js similarity index 100% rename from src/plugins/element-plus.js rename to admin/src/plugins/element-plus.js diff --git a/src/plugins/global-api.js b/admin/src/plugins/global-api.js similarity index 100% rename from src/plugins/global-api.js rename to admin/src/plugins/global-api.js diff --git a/src/plugins/index.js b/admin/src/plugins/index.js similarity index 100% rename from src/plugins/index.js rename to admin/src/plugins/index.js diff --git a/src/router/demo.js b/admin/src/router/demo.js similarity index 100% rename from src/router/demo.js rename to admin/src/router/demo.js diff --git a/src/router/index.js b/admin/src/router/index.js similarity index 100% rename from src/router/index.js rename to admin/src/router/index.js diff --git a/admin/src/router/modules/sales.js b/admin/src/router/modules/sales.js new file mode 100644 index 0000000..d1b3f11 --- /dev/null +++ b/admin/src/router/modules/sales.js @@ -0,0 +1,23 @@ +export default [ + { + path: '/sales', + name: 'SalesCenter', + component: () => import('@/layouts/default.vue'), + meta: { + title: '销售中心', + icon: 'money-dollar-circle-fill', + layout: true, + }, + children: [ + { + path: 'order', + name: 'OrderManagement', + component: () => import('@/views/sales/order/index.vue'), + meta: { + title: '订单管理', + icon: 'barcode-box-fill', + }, + }, + ], + }, +]; diff --git a/src/router/modules/system.js b/admin/src/router/modules/system.js similarity index 100% rename from src/router/modules/system.js rename to admin/src/router/modules/system.js diff --git a/src/store/index.js b/admin/src/store/index.js similarity index 100% rename from src/store/index.js rename to admin/src/store/index.js diff --git a/src/store/modules/core/auth.js b/admin/src/store/modules/core/auth.js similarity index 100% rename from src/store/modules/core/auth.js rename to admin/src/store/modules/core/auth.js diff --git a/src/store/modules/core/layout.js b/admin/src/store/modules/core/layout.js similarity index 100% rename from src/store/modules/core/layout.js rename to admin/src/store/modules/core/layout.js diff --git a/src/store/modules/core/local.js b/admin/src/store/modules/core/local.js similarity index 100% rename from src/store/modules/core/local.js rename to admin/src/store/modules/core/local.js diff --git a/admin/src/store/modules/sales/order.js b/admin/src/store/modules/sales/order.js new file mode 100644 index 0000000..689a340 --- /dev/null +++ b/admin/src/store/modules/sales/order.js @@ -0,0 +1,103 @@ +import * as api from '@/api/sales/order.js'; +import { ElMessage, ElMessageBox } from '@/plugins/element-plus'; +const state = () => ({ + code: 'OrderManagement', + condition: {}, + list: [], + total: 0, + opts: { + init: false, + source: [], + status: [], + }, +}); +const getters = {}; +const mutations = { + setCode: (state, data) => (state.code = data), + setCondition: (state, data) => (state.condition = data), + setList: (state, data) => (state.list = data), + setTotal: (state, data) => (state.total = data), + setOpts: (state, data) => (state.opts = data), +}; +const actions = { + search: async ({ state, commit, rootGetters }) => { + let res = await api.search({ ...rootGetters['local/page'](state.code), ...state.condition }); + if (res) { + commit('setList', res.records); + commit('setTotal', res.total); + } else { + ElMessage.error('查询失败'); + commit('setList', []); + } + return res; + }, + load: async ({ commit }) => { + commit('setOpts', { + init: true, + source: [ + { label: '未知来源', value: 1 }, + { label: '安卓端APP', value: 2 }, + { label: 'IOS端APP', value: 3 }, + ], + status: [ + { label: '待支付', value: 1 }, + { label: '已关闭', value: 2 }, + { label: '待发货', value: 3 }, + { label: '已发货', value: 4 }, + { label: '已收货', value: 5 }, + { label: '已完成', value: 6 }, + ], + }); + }, + detail: async (context, id) => { + let res = await api.detail(id); + if (!res) { + ElMessage.error('加载详情失败'); + } + return res; + }, + save: async ({ dispatch }, data) => { + let save = data.id ? api.update : api.create; + let res = await save(data); + if (res) { + ElMessage.success('保存成功'); + dispatch('search'); + } else { + ElMessage.error('保存失败'); + } + return res; + }, + remove: async ({ dispatch }, idList) => { + if (!idList.length) { + ElMessage.warning('请选择要删除的数据'); + } else { + try { + await ElMessageBox.confirm('数据删除后无法恢复,确定要删除吗?', '危险操作'); + let res = await api.remove(idList.join(',')); + if (res) { + ElMessage.success('删除成功'); + dispatch('search'); + } else { + ElMessage.error('删除失败'); + } + } catch (e) { + console.info('取消删除', e); + } + } + }, + enable: async ({ dispatch }, data) => { + let res = await api.enable(data); + if (res) { + ElMessage.success((data.isEnable ? '启用' : '禁用') + '成功'); + dispatch('search'); + } else { + ElMessage.error((data.isEnable ? '启用' : '禁用') + '失败'); + } + }, +}; +export default { + state, + getters, + mutations, + actions, +}; diff --git a/src/store/modules/system/customer.js b/admin/src/store/modules/system/customer.js similarity index 100% rename from src/store/modules/system/customer.js rename to admin/src/store/modules/system/customer.js diff --git a/src/store/modules/system/employee.js b/admin/src/store/modules/system/employee.js similarity index 100% rename from src/store/modules/system/employee.js rename to admin/src/store/modules/system/employee.js diff --git a/src/styles/base.less b/admin/src/styles/base.less similarity index 100% rename from src/styles/base.less rename to admin/src/styles/base.less diff --git a/src/styles/globalVariables.module.less b/admin/src/styles/globalVariables.module.less similarity index 100% rename from src/styles/globalVariables.module.less rename to admin/src/styles/globalVariables.module.less diff --git a/src/styles/loading.less b/admin/src/styles/loading.less similarity index 100% rename from src/styles/loading.less rename to admin/src/styles/loading.less diff --git a/src/utils/debug.js b/admin/src/utils/debug.js similarity index 100% rename from src/utils/debug.js rename to admin/src/utils/debug.js diff --git a/src/utils/request.js b/admin/src/utils/request.js similarity index 100% rename from src/utils/request.js rename to admin/src/utils/request.js diff --git a/src/views/demo/iconDemo.vue b/admin/src/views/demo/iconDemo.vue similarity index 100% rename from src/views/demo/iconDemo.vue rename to admin/src/views/demo/iconDemo.vue diff --git a/src/views/demo/sortableTableDemo.vue b/admin/src/views/demo/sortableTableDemo.vue similarity index 100% rename from src/views/demo/sortableTableDemo.vue rename to admin/src/views/demo/sortableTableDemo.vue diff --git a/src/views/global/404.vue b/admin/src/views/global/404.vue similarity index 100% rename from src/views/global/404.vue rename to admin/src/views/global/404.vue diff --git a/src/views/global/login.vue b/admin/src/views/global/login.vue similarity index 100% rename from src/views/global/login.vue rename to admin/src/views/global/login.vue diff --git a/src/views/home/index.vue b/admin/src/views/home/index.vue similarity index 100% rename from src/views/home/index.vue rename to admin/src/views/home/index.vue diff --git a/admin/src/views/sales/order/index.vue b/admin/src/views/sales/order/index.vue new file mode 100644 index 0000000..c426104 --- /dev/null +++ b/admin/src/views/sales/order/index.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/views/system/customer/form.vue b/admin/src/views/system/customer/form.vue similarity index 100% rename from src/views/system/customer/form.vue rename to admin/src/views/system/customer/form.vue diff --git a/src/views/system/customer/index.vue b/admin/src/views/system/customer/index.vue similarity index 100% rename from src/views/system/customer/index.vue rename to admin/src/views/system/customer/index.vue diff --git a/src/views/system/employee/form.vue b/admin/src/views/system/employee/form.vue similarity index 100% rename from src/views/system/employee/form.vue rename to admin/src/views/system/employee/form.vue diff --git a/src/views/system/employee/index.vue b/admin/src/views/system/employee/index.vue similarity index 100% rename from src/views/system/employee/index.vue rename to admin/src/views/system/employee/index.vue diff --git a/vite.config.js b/admin/vite.config.js similarity index 98% rename from vite.config.js rename to admin/vite.config.js index 1078ca2..e23afdd 100644 --- a/vite.config.js +++ b/admin/vite.config.js @@ -20,7 +20,7 @@ export default (configEnv) => { open: false, proxy: { '/api': { - target: 'http://192.168.10.2:4500/', + target: 'http://192.168.10.20:8090/', // target: 'https://gateway-test.mashibing.cn', // 测试地址 // target: 'https://gateway.mashibing.cn', // 预发地址 // target: 'https://gateway.mashibing.com', // 生产环境 diff --git a/src/views/system/permission/form.vue b/src/views/system/permission/form.vue deleted file mode 100644 index f950b7b..0000000 --- a/src/views/system/permission/form.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - - diff --git a/src/views/system/permission/index.vue b/src/views/system/permission/index.vue deleted file mode 100644 index 442fc0b..0000000 --- a/src/views/system/permission/index.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - - - diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue deleted file mode 100644 index ca57cfc..0000000 --- a/src/views/system/role/index.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - -