diff --git a/src/components/ItemSelect.vue b/src/components/ItemSelect.vue
deleted file mode 100644
index 3a07072..0000000
--- a/src/components/ItemSelect.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-
- .item-select-wrapper
- el-select(
- v-model="value1"
- filterable
- remote
- clearable
- :remote-method="doSearch"
- :loading="loading"
- :size="size"
- )
- el-option(
- v-for="item in options"
- :key="item.id"
- :label="item.itemName"
- :value="item.id"
- )
- div {{item.itemName}}
- .info {{item.itemNo}}
-
-
-
-
-
diff --git a/src/config/business.js b/src/config/business.js
deleted file mode 100644
index 4b346bd..0000000
--- a/src/config/business.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export const DICT_TYPES = [
- 'wms_receipt_type', 'wms_shipment_type', 'wms_movement_type'
-]
diff --git a/src/main.js b/src/main.js
index 70e4bd4..bd2b6a2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -37,21 +37,11 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
-//wms table组件
-import WmsTable from '@/components/WmsTable'
-
-import WmsSupplierSelect from '@/components/WmsSupplierSelect'
-import WmsCustomerSelect from '@/components/WmsCustomerSelect'
-import KrPrintDesigner from "kr-print-designer";
-import "kr-print-designer/lib/kr-print-designer.css";
import DictRadio from '@/components/DictRadio'
import DictSelect from '@/components/DictSelect'
-import WmsWarehouseCascader from '@/components/WmsWarehouseCascader'
-import vuePlugsPrint from '@/utils/vuePlugsPrint'
-
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
@@ -71,15 +61,9 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
-Vue.component('WmsTable',WmsTable)
-Vue.component('WmsSupplierSelect',WmsSupplierSelect)
-Vue.component('WmsCustomerSelect',WmsCustomerSelect)
Vue.component('DictRadio',DictRadio)
Vue.component('DictSelect',DictSelect)
-Vue.component('WmsWarehouseCascader',WmsWarehouseCascader)
-Vue.use(KrPrintDesigner);
-Vue.use(vuePlugsPrint);
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)
diff --git a/src/permission.js b/src/permission.js
index e8c5141..1055d6a 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -22,11 +22,6 @@ router.beforeEach((to, from, next) => {
//当页面刷新,vuex里面没值,请求重新获取,数据会重新初始化
if (store.getters.roles.length === 0) {
isRelogin.show = true
- store.dispatch("wms/getWarehouseList");
- store.dispatch("wms/getAreaList");
- store.dispatch("wms/getRackList");
- store.dispatch('wms/getSuppliers')
- store.dispatch('wms/getCustomer')
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(() => {
isRelogin.show = false
diff --git a/src/store/getters.js b/src/store/getters.js
index aaba52f..a7e55ba 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -11,40 +11,8 @@ const getters = {
roles: state => state.user.roles,
permissions: state => state.user.permissions,
permission_routes: state => state.permission.routes,
- topbarRouters: state => state.permission.topbarRouters,
- defaultRoutes: state => state.permission.defaultRoutes,
- sidebarRouters: state => state.permission.sidebarRouters,
-
- // 字典相关
- items: state => state.dict.items,
- dictTypeMap: state => state.dict.dictTypeMap,
- opTypes: state => {
- const map = state.dict.dictTypeMap
- let res = [];
- ['wms_receipt_type', 'wms_shipment_type', 'wms_movement_type'].forEach(it => {
- if (!map[it]) {
- return
- }
- res = res.concat(map[it])
- })
- return res
- },
- opTypeMap: (state, getters) => {
- const arr = getters.opTypes, map = {};
- arr.forEach(it => map[it.value] = it.label);
- return map;
- },
-
- // wms相关
- supplierList: state => state.wms.supplierList,
- customerList: state => state.wms.customerList,
- customerMap: state => state.wms.customerMap,
- supplierMap: state => state.wms.supplierMap,
- warehouseList: state => state.wms.warehouseList,
- warehouseMap: state => state.wms.warehouseMap,
- areaList: state => state.wms.areaList,
- areaMap: state => state.wms.areaMap,
- rackList: state => state.wms.rackList,
- rackMap: state => state.wms.rackMap
+ topbarRouters:state => state.permission.topbarRouters,
+ defaultRoutes:state => state.permission.defaultRoutes,
+ sidebarRouters:state => state.permission.sidebarRouters,
}
-export default getters
+export default getters
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index e70241d..53b8437 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -5,8 +5,6 @@ import user from './modules/user'
import tagsView from './modules/tagsView'
import permission from './modules/permission'
import settings from './modules/settings'
-import dict from './modules/dict'
-import wms from './modules/wms'
import getters from './getters'
Vue.use(Vuex)
@@ -17,9 +15,7 @@ const store = new Vuex.Store({
user,
tagsView,
permission,
- settings,
- dict,
- wms
+ settings
},
getters
})
diff --git a/src/store/modules/dict.js b/src/store/modules/dict.js
deleted file mode 100644
index f0883d6..0000000
--- a/src/store/modules/dict.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import { allWmsItem } from '@/api/wms/item'
-import { listByTypes } from '@/api/system/dict/data'
-import { DICT_TYPES } from '@/config/business'
-export default {
- state: {
- items: [],
- dictTypeMap: {},
- },
- mutations: {
- SET_ITEMS(state, list) {
- state.items = list
- },
- SET_DICT_TYPE_MAP(state, list) {
- const map = {};
- list.forEach(it => {
- const {dictType} = it;
- let arr = map[dictType];
- if (!arr) {
- arr = [];
- map[dictType] = arr;
- }
- arr.push(it);
- })
- state.dictTypeMap = map;
- }
- },
- actions: {
- loadItems({commit}) {
- return allWmsItem()
- .then(res => {
- commit('SET_ITEMS', res);
- return res
- })
- },
- loadAllDict({ commit }) {
- listByTypes(DICT_TYPES).then(res => {
- const { rows } = res
- commit('SET_DICT_TYPE_MAP', rows.map(it => ({value: it.dictValue, label: it.dictLabel, dictType: it.dictType})))
- })
- }
- }
-}
diff --git a/src/store/modules/wms.js b/src/store/modules/wms.js
deleted file mode 100644
index 7ff0f3d..0000000
--- a/src/store/modules/wms.js
+++ /dev/null
@@ -1,98 +0,0 @@
-import { listWmsSupplier } from "@/api/wms/supplier";
-import { listWmsWarehouse } from "@/api/wms/warehouse";
-import { listWmsArea } from "@/api/wms/area";
-import { listWmsRack } from "@/api/wms/rack";
-import {listWmsCustomer} from "@/api/wms/customer";
-
-const state = {
- supplierList: [],
- customerList: [],
- customerMap: new Map(),
- supplierMap: new Map(),
- warehouseList: [],
- warehouseMap: new Map(),
- areaList:[],
- areaMap:new Map(),
- rackList:[],
- rackMap:new Map()
-}
-const mutations = {
- SET_SUPPLIERS(state, list) {
- state.supplierList = list;
- state.supplierMap = new Map();
- list.forEach((supplier) => {
- state.supplierMap.set(supplier.id, supplier.supplierName)
- })
- },
- SET_CUSTOMERS(state, list) {
- state.customerList = list;
- state.customerMap = new Map();
- list.forEach((customer) => {
- state.customerMap.set(customer.id, customer.customerName)
- })
- },
- SET_WAREHOUSE(state, list){
- state.warehouseList = list;
- state.warehouseMap = new Map();
- list.forEach((warehouse) => {
- state.warehouseMap.set(warehouse.id, warehouse.warehouseName)
- })
- },
- SET_AREA(state, list){
- state.areaList = list;
- state.areaMap = new Map();
- list.forEach((area) => {
- state.areaMap.set(area.id, area.areaName)
- })
- },
- SET_RACK(state, list){
- state.rackList = list;
- state.rackMap = new Map();
- list.forEach((rack) => {
- state.rackMap.set(rack.id, rack.rackName)
- })
- },
-}
-const actions = {
- getSuppliers({ commit }) {
- return listWmsSupplier({}, { page: 0, size: 1000 })
- .then(res => {
- const { content } =res
- commit('SET_SUPPLIERS', content);
- })
- },
- getCustomer({ commit }) {
- return listWmsCustomer({}, { page: 0, size: 1000 })
- .then(res => {
- const { content } =res
- commit('SET_CUSTOMERS', content);
- })
- },
- getWarehouseList({ commit }) {
- return listWmsWarehouse({}, { page: 0, size: 1000 })
- .then(res => {
- const { content } =res
- commit('SET_WAREHOUSE', content);
- })
- },
- getAreaList({ commit }) {
- return listWmsArea({}, { page: 0, size: 1000 })
- .then(res => {
- const { content } =res
- commit('SET_AREA', content);
- })
- },
- getRackList({ commit }) {
- return listWmsRack({}, { page: 0, size: 1000 })
- .then(res => {
- const { content } =res
- commit('SET_RACK', content);
- })
- },
-}
-export default {
- namespaced: true,
- state,
- mutations,
- actions
-}
diff --git a/src/views/components/ItemSelect.vue b/src/views/components/ItemSelect.vue
deleted file mode 100644
index c30438f..0000000
--- a/src/views/components/ItemSelect.vue
+++ /dev/null
@@ -1,213 +0,0 @@
-
-.prod-sku-select-wrapper
- .search
- el-form(inline label-width="64")
- el-form-item(label="商品类型")
- .w200
- el-select(v-model="query.itemType" clearable)
- el-option(
- v-for="dict in dict.type.wms_item_type"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- )
- el-form-item(label="快速筛选")
- el-input.w200(v-model="query.search" placeholder="编号、名称、ID" )
- el-button(type="primary" @click="clickQuery") 查询
- .center
- .left.flex-one
- .statistic {{total}} 个商品
- .content
- .header.flex-center
- el-checkbox(
- :value="leftAllChecked === 1"
- @input="leftAllChecked = $event"
- :indeterminate="leftAllChecked === 2"
- :disabled="editableList.length === 0")
- .flex-one.tc.ml8 商品信息
- .prods
- .prod.flex-center(v-for="p in list" :key="p.id")
- el-checkbox(
- v-model="p.checked"
- :disabled="rightListKeySet.has(p.id)"
- )
- .flex-one.flex-center(@click="p.checked = !p.checked")
- .ml8
- div {{p.itemName}}
- .mt8
- el-tag(v-if="p.itemType" size="mini") {{p.itemType}}
- span.ml8 {{p.itemNo}}
- el-empty(v-if="list.length === 0" :image-size="64")
- .tr
- el-pagination(
- :total="total",
- :page-size="pageReq.size"
- :current.sync="pageReq.page"
- :pageSizeOpts="[10, 20, 50, 100]"
- show-sizer
- show-total
- @on-change="handleChangePage"
- @on-page-size-change="handleChangeSize",
- )
- .ops
- div
- el-button(@click="moveRight") >
- br
- el-button.mt8(@click="moveLeft") <
- .right.flex-one
- .statistic {{rightList.length}} 个商品已选
- .content
- .header.flex-center
- el-checkbox(
- :value="rightAllChecked === 1"
- @input="rightAllChecked = $event"
- :indeterminate="rightAllChecked === 2"
- :disabled="rightList.length === 0")
- .flex-one.tc.ml8 商品信息
- .prods
- .prod.flex-center(v-for="p in rightList")
- el-checkbox(v-model="p.checked")
- .flex-one.flex-center(@click="p.checked = !p.checked")
- .ml8
- div {{p.itemName}}
- .mt8
- el-tag(v-if="p.itemType" size="mini") {{p.itemType}}
- span.ml8 {{p.itemNo}}
- el-empty(v-if="rightList.length === 0" :image-size="64")
-
-
-
-
-