diff --git a/src/api/basicdata/basicdataGoodsAllocation.js b/src/api/basicdata/basicdataGoodsAllocation.js new file mode 100644 index 00000000..ed7dea49 --- /dev/null +++ b/src/api/basicdata/basicdataGoodsAllocation.js @@ -0,0 +1,50 @@ +import request from '@/axios'; + +export const getList = (current, size, params) => { + return request({ + url: '/api/logpm-basicdata/goodsAllocation/list', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getDetail = (id) => { + return request({ + url: '/api/logpm-basicdata/goodsAllocation/detail', + method: 'get', + params: { + id + } + }) +} + +export const remove = (ids) => { + return request({ + url: '/api/logpm-basicdata/goodsAllocation/remove', + method: 'post', + params: { + ids, + } + }) +} + +export const add = (row) => { + return request({ + url: '/api/logpm-basicdata/goodsAllocation/save', + method: 'post', + data: row + }) +} + +export const update = (row) => { + return request({ + url: '/api/logpm-basicdata/goodsAllocation/update', + method: 'post', + data: row + }) +} + diff --git a/src/option/basicdata/basicdataGoodsAllocation.js b/src/option/basicdata/basicdataGoodsAllocation.js new file mode 100644 index 00000000..b9a3c4bd --- /dev/null +++ b/src/option/basicdata/basicdataGoodsAllocation.js @@ -0,0 +1,172 @@ +export default { + height:'auto', + calcHeight: 30, + tip: false, + searchShow: true, + searchMenuSpan: 6, + border: true, + index: true, + viewBtn: true, + selection: true, + dialogClickModal: false, + column: [ + { + label: "租户号", + prop: "tenantId", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "创建人", + prop: "createUser", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "创建时间", + prop: "createTime", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "更新人", + prop: "updateUser", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "更新时间", + prop: "updateTime", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "状态", + prop: "status", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "是否已删除;1-未删除,2-已删除", + prop: "isDeleted", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "创建部门", + prop: "createDept", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + { + label: "主键", + prop: "id", + type: "input", + addDisplay: false, + editDisplay: false, + viewDisplay: false, + hide: true, + }, + // { + // label: "预留1", + // prop: "reserve1", + // type: "input", + // }, + // { + // label: "预留2", + // prop: "reserve2", + // type: "input", + // }, + // { + // label: "预留3", + // prop: "reserve3", + // type: "input", + // }, + // { + // label: "预留4", + // prop: "reserve4", + // type: "input", + // }, + // { + // label: "预留5", + // prop: "reserve5", + // type: "input", + // }, + { + label: "货区编号", + prop: "goodsAreaId", + type: "input", + }, + { + label: "货位名称", + prop: "goodsAllocationName", + type: "input", + }, + { + label: "仓库编号", + prop: "warehouseId", + type: "input", + }, + { + label: "货架编号", + prop: "goodsShelfId", + type: "input", + }, + { + label: "列编码", + prop: "rowNum", + type: "input", + }, + { + label: "层编码", + prop: "storeyNum", + type: "input", + }, + { + label: "启用状态", + prop: "enableStatus", + type: "select", + search: true, + dicUrl: '/api/blade-system/dict-biz/dictionary?code=enable_status', + props: { + label: 'dictValue', + value: 'dictKey', + } + }, + { + label: "货位状态", + prop: "allocationStatuc", + type: "select", + search: true, + dicUrl: '/api/blade-system/dict-biz/dictionary?code=allocation_status', + props: { + label: 'dictValue', + value: 'dictKey', + } + }, + ] +} diff --git a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue new file mode 100644 index 00000000..26ea687a --- /dev/null +++ b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue b/src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue index 42887b5d..7be71d7a 100644 --- a/src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue +++ b/src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue @@ -346,7 +346,6 @@ export default { this.box = true getDetail(row.id).then(res => { this.form = res.data.data; - this.form.isStrageArea = this.form.isStrageArea.toString(); }); }, handleView (row) { @@ -355,7 +354,6 @@ export default { this.box = true; getDetail(row.id).then(res => { this.form = res.data.data; - this.form.isStrageArea = this.form.isStrageArea.toString(); }); }, handleDelete () { @@ -432,7 +430,6 @@ export default { //是否备货区区状态字典值回显 this.isStrageAreaData.forEach(strageAreaData=>{ strageAreaData.dictKey = parseInt(strageAreaData.dictKey); - if (item.isStrageArea === strageAreaData.dictKey){ item.isStrageArea = strageAreaData.dictValue; } diff --git a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue index bb5f3547..e40d1cf2 100644 --- a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue +++ b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue @@ -9,7 +9,7 @@ - + @@ -135,8 +135,8 @@ - - + + @@ -149,12 +149,7 @@ - - - - - - + @@ -176,8 +171,7 @@ import { getList, getDetail, add, update, remove } from "@/api/basicdata/basicdataGoodsShelf"; import option from "@/option/basicdata/basicdataGoodsShelf"; import { mapGetters } from "vuex"; -import {getWarehouseList} from "@/api/basicdata/basicdataWarehouse"; -import {getGoodsAreaList,getNodeList} from "@/api/basicdata/basicdataGoodsArea"; +import {getNodeList} from "@/api/basicdata/basicdataGoodsArea"; import { getDictionaryBiz } from '@/api/system/dict'; export default { data () { @@ -195,9 +189,7 @@ export default { // 是否为查看模式 view: false, // 查询信息 - query: { - info: [] - }, + query: {}, // 分页信息 page: { currentPage: 1, @@ -223,7 +215,7 @@ export default { //级联选择器列表数据 optioner: [], validatorRules: { - goodsAreaName: [ + goodsAreaInfo: [ { required: true, message: '请选择货区!', trigger: 'change' } ], goodsShelfName: [ @@ -272,7 +264,6 @@ export default { this.goodsShelfStatusData = res.data.data; }); getNodeList().then(res=>{ - console.log(res.data.data,".............."); this.optioner = res.data.data; }) }, @@ -289,6 +280,7 @@ export default { this.onLoad(this.page); }, handleSubmit () { + console.log("this.form",this.form); //表单校验添加租户编码 this.$refs.form.validate(valid=>{ if (valid) { @@ -329,12 +321,20 @@ export default { handleEdit (row) { this.title = '编辑' this.box = true - this.$refs['form'].resetFields(); - getDetail(row.id).then(res => { + console.log(">>>>>>>>>>>"+row); res.data.data.goodsShelfStatus = res.data.data.goodsShelfStatus.toString() res.data.data.enableStatus = res.data.data.enableStatus.toString() this.form = res.data.data; + let a=[]; + if (!!res.data.data.goodsAreaId&&!!res.data.data.warehouseId){ + a.push(res.data.data.warehouseId) + a.push(res.data.data.goodsAreaId) + } + this.form.goodsAreaInfo=a; + // this.form.goodsAreaInfo.push(res.data.data.warehouseId) + // this.form.goodsAreaInfo.push(res.data.data.goodsAreaId) + }); }, handleView (row) { @@ -364,15 +364,11 @@ export default { enableFalse = item; } }) - console.log(enableTrue); - console.log(enableFalse); if (row.enableStatus===enableTrue.dictValue){ - console.log(enableTrue.dictValue); row.enableStatus=enableFalse.dictKey; }else { row.enableStatus=enableTrue.dictKey; } - console.log(JSON.stringify(row)); update(row).then(() => { this.box = false; this.onLoad(this.page); @@ -381,7 +377,6 @@ export default { message: "操作成功!" }); }) - // console.log(">>>>>>启用状态"+JSON.stringify(row)); }, @@ -463,6 +458,8 @@ export default { }, selectionClear () { this.selectionList = []; + this.query.warehouseId=null; + this.query.goodsAreaId=null; this.$refs.table.clearSelection(); }, currentChange (currentPage) { @@ -475,6 +472,24 @@ export default { }, onLoad (page, params = {}) { this.loading = true; + let ids = []; + + if (!!this.query.goodsAreaInfo){ + if (this.query.goodsAreaInfo.length===1){ + //仓库下没有货区信息 + ids = this.query.goodsAreaInfo; + this.query.warehouseId = ids[0]; + this.query.goodsAreaInfo = null; + }else if (this.query.goodsAreaInfo.length===2){ + //正常查询 + ids = this.query.goodsAreaInfo; + this.query.warehouseId = ids[0]; + this.query.goodsAreaId = ids[1]; + this.query.goodsAreaInfo = null; + }else { + console.log('error!!'); + } + } getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { const data = res.data.data; data.records.forEach(item=>{ @@ -482,7 +497,6 @@ export default { if (item.enableStatus === enableStatus.sort){ item.enableStatus = enableStatus.dictValue; } - }) this.goodsShelfStatusData.forEach(goodsShelfStatus=>{ if (item.goodsShelfStatus === goodsShelfStatus.sort){ @@ -493,7 +507,6 @@ export default { this.page.total = data.total; this.data = data.records; - console.log(data); this.loading = false; this.selectionClear(); });