Compare commits
2 Commits
2ab8f7ca26
...
50713ea57e
Author | SHA1 | Date | |
---|---|---|---|
50713ea57e | |||
5ec80073fe |
@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request, {requestWcs} from '@/utils/request'
|
||||
|
||||
// 查询出库任务列表
|
||||
export function listTASK(query) {
|
||||
@ -58,3 +58,12 @@ export function autoRunTASK(wmsOutTaskId) {
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 下发任务至 WCS
|
||||
export function issueWmsOutTaskToWcs(data) {
|
||||
return requestWcs({
|
||||
url: '/StackerCraneCK',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request, {requestWcs} from '@/utils/request'
|
||||
|
||||
// 查询入库任务列表
|
||||
export function listWmsInTask(query) {
|
||||
@ -46,9 +46,16 @@ export function delWmsInTask(id) {
|
||||
// 批量执行入库任务
|
||||
export function issueBatchWmsInTask(data) {
|
||||
return request({
|
||||
url: '/wm/wmsInTask/open/issueBatch',
|
||||
url: '/wm/wmsInTask/open/issueBatch/' + data,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
// 下发任务至 WCS
|
||||
export function issueWmsInTaskToWcs(data) {
|
||||
return requestWcs({
|
||||
url: '/StackerCraneRK',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,13 @@ const service = axios.create({
|
||||
timeout: 30000
|
||||
})
|
||||
|
||||
const serviceWcs = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: "http://192.168.8.60:1880",
|
||||
// 超时
|
||||
timeout: 30000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
service.interceptors.request.use(config => {
|
||||
// 是否需要设置 token
|
||||
@ -113,11 +120,9 @@ service.interceptors.response.use(res => {
|
||||
let {message} = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
} else if (message.includes("timeout")) {
|
||||
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({
|
||||
@ -131,9 +136,15 @@ service.interceptors.response.use(res => {
|
||||
|
||||
// 通用下载方法
|
||||
export function download(url, params, filename) {
|
||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||
downloadLoadingInstance = Loading.service({
|
||||
text: "正在下载数据,请稍候",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
})
|
||||
return service.post(url, params, {
|
||||
transformRequest: [(params) => { return tansParams(params) }],
|
||||
transformRequest: [(params) => {
|
||||
return tansParams(params)
|
||||
}],
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
responseType: 'blob'
|
||||
}).then(async (data) => {
|
||||
@ -156,3 +167,5 @@ export function download(url, params, filename) {
|
||||
}
|
||||
|
||||
export default service
|
||||
|
||||
export const requestWcs = serviceWcs
|
||||
|
@ -190,17 +190,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="24">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="上级库位" prop="attr1">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.superiorName" placeholder="请选择上级库位" />
|
||||
<el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <div style="display: flex">-->
|
||||
<!-- <el-form-item label="上级库位" prop="attr1">-->
|
||||
<!-- <div style="display: flex">-->
|
||||
<!-- <el-input v-model="form.superiorName" placeholder="请选择上级库位" />-->
|
||||
<!-- <el-button @click="selecareaVisible=true" icon="el-icon-search"></el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -35,7 +35,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:8081`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
Loading…
Reference in New Issue
Block a user