From 67070b8c36d9a804b2defb1a209d9eb8bcfa7c29 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Tue, 12 Mar 2024 17:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86-=E5=BA=93?= =?UTF-8?q?=E4=BD=8D=E4=BF=A1=E6=81=AF:=20=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wmsManagement/storagelocation.js | 2 +- src/components/main.js | 23 ++------------ src/store/getters.js | 33 --------------------- src/views/login.vue | 7 +---- src/views/wmsManagement/storagelocation.vue | 12 ++++---- vue.config.js | 8 +---- 6 files changed, 11 insertions(+), 74 deletions(-) diff --git a/src/api/wmsManagement/storagelocation.js b/src/api/wmsManagement/storagelocation.js index 383bb4c..bd9681c 100644 --- a/src/api/wmsManagement/storagelocation.js +++ b/src/api/wmsManagement/storagelocation.js @@ -5,7 +5,7 @@ import { downFile } from '@/utils/request' export function production_warehouse_info(query) { // 发送get请求,获取工单列表 return request({ - url: '/mes/pro/workorder_v2/getWorkoderList', + url: '/mes/wm/storagelocation/production_warehouse_info', method: 'get', params: query, }) diff --git a/src/components/main.js b/src/components/main.js index 833d4c3..d8dfef8 100644 --- a/src/components/main.js +++ b/src/components/main.js @@ -37,21 +37,7 @@ 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' -import WmsCarrierSelect from "@/components/WmsCarrierSelect/index.vue"; // 全局方法挂载 Vue.prototype.getDicts = getDicts @@ -72,13 +58,8 @@ 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('WmsCarrierSelect',WmsCarrierSelect) -Vue.component('DictRadio',DictRadio) -Vue.component('DictSelect',DictSelect) -Vue.component('WmsWarehouseCascader',WmsWarehouseCascader) + + Vue.use(KrPrintDesigner); Vue.use(vuePlugsPrint); diff --git a/src/store/getters.js b/src/store/getters.js index 7d44885..ef5b69d 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -24,38 +24,5 @@ const getters = { currentWorkOrder_thirty: (state) => state.quality.currentWorkOrder_thirty, firstquality_time: (state) => state.quality.firstquality_time, - // 字典相关 - 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', 'wms_check_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, - carrierList: state => state.wms.carrierList, - carrierMap: state => state.wms.carrierMap, - 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 } export default getters \ No newline at end of file diff --git a/src/views/login.vue b/src/views/login.vue index b5a02f3..0c463e7 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -158,12 +158,7 @@ export default { if (valid) { this.loading = true if (this.loginForm.rememberMe) { - this.$store.dispatch("wms/getWarehouseList"); - this.$store.dispatch("wms/getAreaList"); - this.$store.dispatch("wms/getRackList"); - this.$store.dispatch("wms/getSuppliers"); - this.$store.dispatch("wms/getCustomer"); - this.$store.dispatch("wms/getCarrier"); + Cookies.set('username', this.loginForm.username, { expires: 30 }) Cookies.set('password', encrypt(this.loginForm.password), { expires: 30, diff --git a/src/views/wmsManagement/storagelocation.vue b/src/views/wmsManagement/storagelocation.vue index fe47c6f..2fa544a 100644 --- a/src/views/wmsManagement/storagelocation.vue +++ b/src/views/wmsManagement/storagelocation.vue @@ -46,8 +46,8 @@ export default { shelfList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'L'], layerList: [1, 2, 3], formInline: { - shelf: '', - layer: 0, + shelf: 'A', + layer: 1, }, pagination: { total: 0, @@ -64,13 +64,13 @@ export default { const query = { shelf: this.formInline.shelf, layer: this.formInline.layer, - pageNum: this.formInline.pageNum, - pageSize: this.formInline.pageSize, + pageNum: this.pagination.pageNum, + pageSize: this.pagination.pageSize, } production_warehouse_info(query).then((res) => { if (res.code == 200) { - this.tableData = res.data[0] - this.pagination.total = res.data[1] + this.tableData = res.data.item1 + this.pagination.total = res.data.item2 } }) }, diff --git a/vue.config.js b/vue.config.js index 72caead..f10fdd5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -37,13 +37,7 @@ module.exports = { port: 8887, // 项目启动port, open: true, proxy: { - [process.env.VUE_APP_BASE_API+'/wms']: { - target: 'http://localhost:8000/', // 后端接口地址 - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '', - }, - }, + // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: 'http://localhost:8888/', // 后端接口地址