diff --git a/src/api/asn.js b/src/api/asn.js index a9a4fdf..d4fa661 100644 --- a/src/api/asn.js +++ b/src/api/asn.js @@ -23,5 +23,18 @@ export function edit(data) { data }) } +export function getAsnList() { + return request({ + url: 'api/asn/getAsnList', + method: 'post' + }) +} +export function startAsn(id) { + return request({ + url: 'api/asn/startAsn', + method: 'post', + data: id + }) +} -export default { add, edit, del } +export default { add, edit, del, getAsnList, startAsn } diff --git a/src/api/billType.js b/src/api/billType.js index e0fcbf0..d4e58f0 100644 --- a/src/api/billType.js +++ b/src/api/billType.js @@ -23,5 +23,10 @@ export function edit(data) { data }) } - +export function getBillType() { + return request({ + url: 'api/billType/getBillType', + method: 'post' + }) +} export default { add, edit, del } diff --git a/src/api/point.js b/src/api/point.js index 18837ad..1b4958a 100644 --- a/src/api/point.js +++ b/src/api/point.js @@ -7,7 +7,6 @@ export function getPoints(params) { params }) } - export function add(data) { return request({ url: 'api/point', diff --git a/src/views/base-data/asn/asn.vue b/src/views/base-data/asn/asn.vue deleted file mode 100644 index ac25e55..0000000 --- a/src/views/base-data/asn/asn.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/src/views/base-data/billType/index.vue b/src/views/base-data/billType/index.vue index 983f02a..bfdfee3 100644 --- a/src/views/base-data/billType/index.vue +++ b/src/views/base-data/billType/index.vue @@ -48,6 +48,9 @@ + + + + - + 呼叫空车 - 满车入库 - + 呼叫满车 空车入库 @@ -259,8 +271,9 @@ import viewFullStockIn from '@/views/base-data/point/fullStockIn.vue'; import viewFullStockOut from '@/views/base-data/point/fullStockOut.vue'; import pointUrl from '@/api/point' import multiAdjust from "@/views/base-data/point/multiAdjust.vue"; +import {getStockTypes} from "@/api/stockType"; -const defaultForm = {id: null, status: 'FREE', enabled: 1, code: null, name: null, description: null, area: null} +const defaultForm = {id: null, status: 'FREE', enabled: 1, code: null, name: null, description: null, area: null, storageType: null} export default { name: 'Point', components: { @@ -286,8 +299,10 @@ export default { return { //地标点数据 fileList:[], + //存储类型(容器) + storageTypes:[], from1: [], - fromBack: [], + fromBack: {storageType: null,ids:[]}, pointListData: [], headers: {'Authorization': getToken()}, queryTypeOptions: [ @@ -300,7 +315,7 @@ export default { ], callStock: { pointCode: '', - agvScene: 'ZC' + ids: [] }, callStockBack: { pointCode: '', @@ -333,6 +348,7 @@ export default { this.getArea() //获取点位表的数据 this.getPointListData(); + this.getStorageTypes(); }, methods: { handleSuccess(response, file, fileList, crud) { @@ -376,26 +392,45 @@ export default { }) }) }, - //呼叫空车 - callEmpty() { - this.callStock.pointCode = this.from1.pointCode - this.callStock.agvScene = "ZC" - pointUrl.pointCallStock(this.callStock).then(res => { - this.callEmptyCarStatus = false; - this.crud.notify("呼叫成功", CRUD.NOTIFICATION_TYPE.SUCCESS); - }).catch(e => { - this.crud.notify("呼叫失败", CRUD.NOTIFICATION_TYPE.ERROR); + getStorageTypes() { + getStockTypes({ }).then(res => { + this.storageTypes= res.content.map(function(obj) { + if (obj.hasChildren) { + obj.children = null + } + return obj + }) }) }, - //空车入库 - callStockBackIn() { - this.callStockBack.pointCode = this.fromBack.pointCode - this.callStockBack.agvScene = "ZC" - pointUrl.pointStockBack(this.callStockBack).then(res => { - this.EmptyCarBackStatus = false; - this.crud.notify("呼叫成功", CRUD.NOTIFICATION_TYPE.SUCCESS); + //容器搬运 + callEmpty(datas) { + const ids = []; + for (let i = 0; i < datas.length; i++) { + ids.push(datas[i].id) + } + this.callStock.pointCode = this.from1.pointCode + this.callStock.ids=ids + pointUrl.pointCallStock(this.callStock).then(res => { + this.callEmptyCarStatus = false; + this.crud.toQuery() + this.crud.notify("搬运成功", CRUD.NOTIFICATION_TYPE.SUCCESS); }).catch(e => { - this.crud.notify("呼叫失败", CRUD.NOTIFICATION_TYPE.ERROR); + this.crud.notify("搬运失败", CRUD.NOTIFICATION_TYPE.ERROR); + }) + }, + //容器入场 + callStockBackIn(datas) { + const ids = []; + for (let i = 0; i < datas.length; i++) { + ids.push(datas[i].id) + } + this.fromBack.ids=ids; + pointUrl.pointStockBack(this.fromBack).then(res => { + this.EmptyCarBackStatus = false; + this.crud.toQuery() + this.crud.notify("入场成功", CRUD.NOTIFICATION_TYPE.SUCCESS); + }).catch(e => { + this.crud.notify("入场失败", CRUD.NOTIFICATION_TYPE.ERROR); }) }, //获取点位表的数据 diff --git a/src/views/business-data/asn/index.vue b/src/views/business-data/asn/index.vue new file mode 100644 index 0000000..3263316 --- /dev/null +++ b/src/views/business-data/asn/index.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/views/business-data/asnDetail/index.vue b/src/views/business-data/asnDetail/index.vue index f8466fe..b1219b3 100644 --- a/src/views/business-data/asnDetail/index.vue +++ b/src/views/business-data/asnDetail/index.vue @@ -5,6 +5,8 @@ + - + - + - - - + :title="crud.status.title" width="500px"> + + + + - - + - + - - + + + + +