diff --git a/RuoYi-App-master/api/out/appointOut.js b/RuoYi-App-master/api/out/appointOut.js new file mode 100644 index 0000000..be8eb65 --- /dev/null +++ b/RuoYi-App-master/api/out/appointOut.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +/** + * 根据托盘码查询库存物料信息 + * GET /out/handAllotStock/list + * @param {Object} params - { trayCode: '托盘码' } + * 返回字段:trayCode, stockId, productId, productName, quantity, spare1(规格), spare3(单位), + * spare4(型号), cargoSpaceId, cargoSpaceName, warehouseId, inDate, lotNo 等 + */ +export function queryTrayInfo(params) { + return request({ + url: '/out/handAllotStock/list', + method: 'get', + params: params + }) +} + +/** + * 获取出口列表(portType=2 为出口) + * GET /bas/warehousePort/list + * @param {Object} params - { portType: '2', warehouseId: '' } + */ +export function getExitPortList(params) { + return request({ + url: '/bas/warehousePort/list', + method: 'get', + params: { portType: '2', ...params } + }) +} + +/** + * 指定货位出库 - 生成出库作业 + * POST /job/outmydoJob/pointOut + * @param {Array} stockIds - 库存ID数组,如 ['KC202601220164'] + * @param {String} exitId - 出口ID + * @param {String} type - 出库类型(传 '2') + * + * 注意:后端用 @RequestParam String[] stockIds,Spring 要求重复同名参数: + * stockIds=A&stockIds=B + * axios 默认序列化数组会带方括号(stockIds[]=A),需手动拼 URL 避免 400 报错。 + */ +export function pointOut(stockIds, exitId, type) { + // 把数组拼成重复参数:stockIds=A&stockIds=B&exitId=1&type=2 + const idPart = (Array.isArray(stockIds) ? stockIds : [stockIds]) + .map(id => `stockIds=${encodeURIComponent(id)}`) + .join('&') + const url = `/job/outmydoJob/pointOut?${idPart}&exitId=${encodeURIComponent(exitId)}&type=${encodeURIComponent(type)}` + return request({ + url, + method: 'post' + }) +} diff --git a/RuoYi-App-master/main.js b/RuoYi-App-master/main.js index 83ef23b..db8abbb 100644 --- a/RuoYi-App-master/main.js +++ b/RuoYi-App-master/main.js @@ -2,15 +2,33 @@ import Vue from 'vue' import App from './App' import store from './store' // store import plugins from './plugins' // plugins +import VueI18n from 'vue-i18n' import './permission' // permission +// ÒýÈëÓïÑ԰ü +import enUS from './locales/en-US.json' +import zhCN from './locales/zh-CN.json' + Vue.use(plugins) +Vue.use(VueI18n) Vue.config.productionTip = false Vue.prototype.$store = store +// ´´½¨i18nʵÀý +const i18n = new VueI18n({ + locale: uni.getStorageSync('language') || 'zh-CN', // ĬÈÏÓïÑÔ + messages: { + 'en-US': enUS, + 'zh-CN': zhCN + } +}) + +Vue.prototype._i18n = i18n + App.mpType = 'app' const app = new Vue({ + i18n, ...App }) diff --git a/RuoYi-App-master/pages.json b/RuoYi-App-master/pages.json index 3390a6d..bd60d63 100644 --- a/RuoYi-App-master/pages.json +++ b/RuoYi-App-master/pages.json @@ -192,6 +192,13 @@ "navigationBarTitleText" : "异常出库" } }, + { + "path" : "pages/out/appointOut", + "style" : + { + "navigationBarTitleText" : "指定出库" + } + }, { "path" : "pages/pandian/confirm", "style" : diff --git a/RuoYi-App-master/pages/index.vue b/RuoYi-App-master/pages/index.vue index 2c144c6..6299e3e 100644 --- a/RuoYi-App-master/pages/index.vue +++ b/RuoYi-App-master/pages/index.vue @@ -64,6 +64,15 @@ 空托盘出入库 + + + + + + 指定出库 + 扫托盘码生成出库作业 + + - - 激活授权码 - - - - - - - - 取 消 - 激 活 - - - - - - - + + + + + {{ $t('login.appTitle') }} + + + + + + + + + + + + + + + + + + + + + + + {{ $t('login.version') }} + {{ $t('login.copyright') }} + + - diff --git a/RuoYi-App-master/pages/out/appointOut.vue b/RuoYi-App-master/pages/out/appointOut.vue new file mode 100644 index 0000000..df0d816 --- /dev/null +++ b/RuoYi-App-master/pages/out/appointOut.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/RuoYi-App-master/pages/out/menu.vue b/RuoYi-App-master/pages/out/menu.vue index 1712bfa..db199cc 100644 --- a/RuoYi-App-master/pages/out/menu.vue +++ b/RuoYi-App-master/pages/out/menu.vue @@ -55,6 +55,15 @@ 点对点搬运 + + + + + + 指定出库 + 扫托盘码生成出库作业 + + @@ -122,6 +131,11 @@ export default { box-shadow: 0 6rpx 16rpx rgba(64, 158, 255, 0.25); } + &.green { + background: linear-gradient(135deg, #52c41a, #3a9d0f); + box-shadow: 0 6rpx 16rpx rgba(82, 196, 26, 0.25); + } + &:hover { transform: rotate(15deg) scale(1.1); } diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 40e140d..f483b3c 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 -const baseUrl = 'http://localhost:8080' // 后端接口 +const baseUrl = 'http://localhost:8081' // 后端接口 const port = process.env.port || process.env.npm_config_port || 80 // 端口