Compare commits
No commits in common. "50713ea57e313884fd4715f330e2e23a38399d30" and "2ab8f7ca26e6e157a416adda8e70cb3a4d368ca8" have entirely different histories.
50713ea57e
...
2ab8f7ca26
@ -1,4 +1,4 @@
|
|||||||
import request, {requestWcs} from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询出库任务列表
|
// 查询出库任务列表
|
||||||
export function listTASK(query) {
|
export function listTASK(query) {
|
||||||
@ -58,12 +58,3 @@ export function autoRunTASK(wmsOutTaskId) {
|
|||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下发任务至 WCS
|
|
||||||
export function issueWmsOutTaskToWcs(data) {
|
|
||||||
return requestWcs({
|
|
||||||
url: '/StackerCraneCK',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request, {requestWcs} from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询入库任务列表
|
// 查询入库任务列表
|
||||||
export function listWmsInTask(query) {
|
export function listWmsInTask(query) {
|
||||||
@ -46,16 +46,9 @@ export function delWmsInTask(id) {
|
|||||||
// 批量执行入库任务
|
// 批量执行入库任务
|
||||||
export function issueBatchWmsInTask(data) {
|
export function issueBatchWmsInTask(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wm/wmsInTask/open/issueBatch/' + data,
|
url: '/wm/wmsInTask/open/issueBatch',
|
||||||
method: 'post',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 下发任务至 WCS
|
|
||||||
export function issueWmsInTaskToWcs(data) {
|
|
||||||
return requestWcs({
|
|
||||||
url: '/StackerCraneRK',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {Notification, MessageBox, Message, Loading} from 'element-ui'
|
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {getToken} from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import {tansParams, blobValidate} from "@/utils/ruoyi";
|
import { tansParams, blobValidate } from "@/utils/ruoyi";
|
||||||
import cache from '@/plugins/cache'
|
import cache from '@/plugins/cache'
|
||||||
import {saveAs} from 'file-saver'
|
import { saveAs } from 'file-saver'
|
||||||
|
|
||||||
let downloadLoadingInstance;
|
let downloadLoadingInstance;
|
||||||
// 是否显示重新登录
|
// 是否显示重新登录
|
||||||
export let isRelogin = {show: false};
|
export let isRelogin = { show: false };
|
||||||
|
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
@ -20,13 +20,6 @@ const service = axios.create({
|
|||||||
timeout: 30000
|
timeout: 30000
|
||||||
})
|
})
|
||||||
|
|
||||||
const serviceWcs = axios.create({
|
|
||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
|
||||||
baseURL: "http://192.168.8.60:1880",
|
|
||||||
// 超时
|
|
||||||
timeout: 30000
|
|
||||||
})
|
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
@ -68,8 +61,8 @@ service.interceptors.request.use(config => {
|
|||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
}, error => {
|
}, error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
@ -79,26 +72,26 @@ service.interceptors.response.use(res => {
|
|||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||||
// 二进制数据则直接返回
|
// 二进制数据则直接返回
|
||||||
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
if (code === 401) {
|
if (code === 401) {
|
||||||
if (!isRelogin.show) {
|
if (!isRelogin.show) {
|
||||||
isRelogin.show = true;
|
isRelogin.show = true;
|
||||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||||
confirmButtonText: '重新登录',
|
confirmButtonText: '重新登录',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/index';
|
location.href = '/index';
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code === 500) {
|
} else if (code === 500) {
|
||||||
Message({
|
Message({
|
||||||
@ -117,12 +110,14 @@ service.interceptors.response.use(res => {
|
|||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('err' + error)
|
console.log('err' + error)
|
||||||
let {message} = error;
|
let { message } = error;
|
||||||
if (message == "Network Error") {
|
if (message == "Network Error") {
|
||||||
message = "后端接口连接异常";
|
message = "后端接口连接异常";
|
||||||
} else if (message.includes("timeout")) {
|
}
|
||||||
|
else if (message.includes("timeout")) {
|
||||||
message = "系统接口请求超时";
|
message = "系统接口请求超时";
|
||||||
} else if (message.includes("Request failed with status code")) {
|
}
|
||||||
|
else if (message.includes("Request failed with status code")) {
|
||||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||||
}
|
}
|
||||||
Message({
|
Message({
|
||||||
@ -136,16 +131,10 @@ service.interceptors.response.use(res => {
|
|||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(url, params, filename) {
|
export function download(url, params, filename) {
|
||||||
downloadLoadingInstance = Loading.service({
|
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||||
text: "正在下载数据,请稍候",
|
|
||||||
spinner: "el-icon-loading",
|
|
||||||
background: "rgba(0, 0, 0, 0.7)",
|
|
||||||
})
|
|
||||||
return service.post(url, params, {
|
return service.post(url, params, {
|
||||||
transformRequest: [(params) => {
|
transformRequest: [(params) => { return tansParams(params) }],
|
||||||
return tansParams(params)
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
}],
|
|
||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}).then(async (data) => {
|
}).then(async (data) => {
|
||||||
const isLogin = await blobValidate(data);
|
const isLogin = await blobValidate(data);
|
||||||
@ -167,5 +156,3 @@ export function download(url, params, filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default service
|
export default service
|
||||||
|
|
||||||
export const requestWcs = serviceWcs
|
|
||||||
|
@ -165,11 +165,11 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label-width="80">
|
<el-form-item label-width="80">
|
||||||
<el-switch v-model="autoGenFlag"
|
<el-switch v-model="autoGenFlag"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
active-text="自动生成"
|
active-text="自动生成"
|
||||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -190,16 +190,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- <el-col :span="24">-->
|
|
||||||
<!-- <div style="display: flex">-->
|
<el-col :span="24">
|
||||||
<!-- <el-form-item label="上级库位" prop="attr1">-->
|
<div style="display: flex">
|
||||||
<!-- <div style="display: flex">-->
|
<el-form-item label="上级库位" prop="attr1">
|
||||||
<!-- <el-input v-model="form.superiorName" placeholder="请选择上级库位" />-->
|
<div style="display: flex">
|
||||||
<!-- <el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>-->
|
<el-input v-model="form.superiorName" placeholder="请选择上级库位" />
|
||||||
<!-- </div>-->
|
<el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>
|
||||||
<!-- </el-form-item>-->
|
</div>
|
||||||
<!-- </div>-->
|
</el-form-item>
|
||||||
<!-- </el-col>-->
|
</div>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -35,7 +35,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8081`,
|
target: `http://localhost:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
Loading…
Reference in New Issue
Block a user