diff --git a/yxt-as-ui/src/api/warehouse/warehouseArea.js b/yxt-as-ui/src/api/warehouse/warehouseArea.js index 83d6c59cb8..02df44762f 100644 --- a/yxt-as-ui/src/api/warehouse/warehouseArea.js +++ b/yxt-as-ui/src/api/warehouse/warehouseArea.js @@ -18,11 +18,11 @@ export default { getAllWarehousearea: function(params) { return request({ url: '/wms/apiadmin/base/wmswarehousearea/listAll', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } }) }, @@ -30,13 +30,26 @@ export default { // 根据仓库sid查询库区 getAllWarehouseareaBysid: function(params) { return request({ - url: '/wms/apiadmin/base/wmswarehousearea/selectAll', - method: 'get', - params: params, - headers: { 'Content-Type': 'application/json' } + url: '/wms/apiadmin/base/wmswarehousearea/selectAll', + method: 'get', + params: params, + headers: { + 'Content-Type': 'application/json' + } }) }, + // 根据区域sid查询库区 + getAllWarehouseareaByZoneSid: function(params) { + return request({ + url: '/wms/apiadmin/base/wmswarehousearea/selectAreaAll', + method: 'get', + params: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, // 修改是否可用状态 updateIsEnable: function(sid, isEnable) { diff --git a/yxt-as-ui/src/api/warehouse/warehouseZone.js b/yxt-as-ui/src/api/warehouse/warehouseZone.js new file mode 100644 index 0000000000..67e08144c1 --- /dev/null +++ b/yxt-as-ui/src/api/warehouse/warehouseZone.js @@ -0,0 +1,84 @@ +import request from '@/utils/request' +// 仓库区域 接口 +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 区域查询 + getAllWarehousezone: function(params) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/listAll', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + + // 根据仓库sid查询区域 + getAllWarehousezoneBysid: function(params) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/selectAll', + method: 'get', + params: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + + // 修改是否可用状态 + updateIsEnable: function(sid, isEnable) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/updateIsEnable/' + sid + "/" + isEnable + }); + }, + + + // 新增、保存 + saveWarehousezone: function(data) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/saveOrUpdate', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + // 初始化 + initWarehousezone: function(data) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/initialization/' + data, + method: 'get' + }); + }, + + + // 区域-- 删除 + deleteBySids: function(data) { + return request({ + url: '/wms/apiadmin/base/wmswarehousezone/delBySids', + method: 'DELETE', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + +} diff --git a/yxt-as-ui/src/router/index.js b/yxt-as-ui/src/router/index.js index 19e7dc7e8c..788f34cca5 100644 --- a/yxt-as-ui/src/router/index.js +++ b/yxt-as-ui/src/router/index.js @@ -340,6 +340,15 @@ export const constantRoutes = [{ title: '仓库管理', noCache: true } + }, + { + path: '/warehouseZone/warehouseZone', + component: () => import('@/views/warehouse/warehouseZone/warehouseZone.vue'), + name: 'WarehouseZone', + meta: { + title: '仓库区域管理', + noCache: true + } } ] }, diff --git a/yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue b/yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue index 2e2af04e54..86e6de0396 100644 --- a/yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue +++ b/yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue @@ -31,6 +31,16 @@ + + * 选择所属区域 + + + + + + + * 选择所属库区 @@ -41,36 +51,17 @@ - - * 库位编码 - - - - - - - - - - + 备注 @@ -121,6 +112,7 @@ import req from '@/api/warehouse/goodsShelves.js' import req2 from '@/api/warehouse/warehouse.js' import req3 from '@/api/warehouse/warehouseArea.js' + import req4 from '@/api/warehouse/warehouseZone.js' export default { components: {}, data() { @@ -132,6 +124,8 @@ rackCode: '', warehouseName: '', warehouseSid: '', + zoneName: '', + zoneSid: '', locationName: '', locationSid: '', remarks: '', @@ -141,6 +135,7 @@ userSid: window.sessionStorage.getItem('userSid'), }, warehouseList: [], + warehouseZoneList: [], warehouseAreaList: [], rules: { warehouseName: [{ @@ -148,6 +143,11 @@ message: '请选择所属仓库', trigger: 'change' }], + zoneName: [{ + required: true, + message: '请选择所属区域', + trigger: 'change' + }], locationName: [{ required: true, message: '请选择所属库区', @@ -178,14 +178,12 @@ }, getWarehouseArea(sid) { - this.formobj.locationSid = '' - this.formobj.locationName = '' var params = { - ckSid: sid + qySid: sid } - req3.getAllWarehouseareaBysid(params).then(resp => { + req3.getAllWarehouseareaByZoneSid(params).then(resp => { console.log('>>>>>>>>>getAllWarehousearea', resp) this.warehouseAreaList = resp.data }).catch(() => {}) @@ -197,10 +195,33 @@ this.formobj.warehouseSid = choose[0].sid this.formobj.warehouseName = choose[0].warehouseName - this.getWarehouseArea(choose[0].sid) + this.formobj.zoneSid = '' + this.formobj.zoneName = '' + this.formobj.locationSid = '' + this.formobj.locationName = '' + this.getAllWarehousezone(choose[0].sid) + }, + + getAllWarehousezone(sid) { + req4.getAllWarehousezoneBysid({ + ckSid: sid + }).then(resp => { + this.warehouseZoneList = resp.data + }) + }, + selectWarehouseZoneChange(val) { + const choose = this.warehouseZoneList.filter((item) => item.sid == val) + console.log('>>>>>>>>>selectWarehouseZoneChange', choose) + this.formobj.zoneSid = choose[0].sid + this.formobj.zoneName = choose[0].zoneName + + this.formobj.locationSid = '' + this.formobj.locationName = '' + this.getWarehouseArea(choose[0].sid) }, + selectWarehouseAreaChange(val) { const choose = this.warehouseAreaList.filter((item) => item.sid == val) console.log('>>>>>>>>>selectWarehouseAreaChange', choose) @@ -262,6 +283,8 @@ rackCode: '', warehouseName: '', warehouseSid: '', + zoneName: '', + zoneSid: '', locationName: '', locationSid: '', remarks: '', diff --git a/yxt-as-ui/src/views/warehouse/goodsShelves/index.vue b/yxt-as-ui/src/views/warehouse/goodsShelves/index.vue index b531dc7a49..6afeaa339f 100644 --- a/yxt-as-ui/src/views/warehouse/goodsShelves/index.vue +++ b/yxt-as-ui/src/views/warehouse/goodsShelves/index.vue @@ -61,6 +61,7 @@ + diff --git a/yxt-as-ui/src/views/warehouse/warehouseArea/index.vue b/yxt-as-ui/src/views/warehouse/warehouseArea/index.vue index d3960f6309..aa02bbab1d 100644 --- a/yxt-as-ui/src/views/warehouse/warehouseArea/index.vue +++ b/yxt-as-ui/src/views/warehouse/warehouseArea/index.vue @@ -24,7 +24,7 @@ - @@ -49,7 +49,7 @@ @selection-change="selectionLineChangeHandle"> - @@ -177,18 +178,18 @@ }, getwarehouse() { - var parpams = { - orgPath:window.sessionStorage.getItem('defaultOrgPath'), - } + var parpams = { + orgPath: window.sessionStorage.getItem('defaultOrgPath'), + } req2.getAllWarehouse(parpams).then(resp => { console.log('>>>>>>>>>getAllWarehouse', resp) this.warehouseList = resp.data }).catch(() => {}) }, getWarehouseAreaType() { - var parpams = { - orgPath:window.sessionStorage.getItem('defaultOrgPath'), - } + var parpams = { + orgPath: window.sessionStorage.getItem('defaultOrgPath'), + } req3.getAllWarehouseareatype(parpams).then(resp => { console.log('>>>>>>>>>getAllWarehouseareatype', resp) this.warehouseAreaTypeLsit = resp.data diff --git a/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue b/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue index bcbff1cc6e..886fecc8f0 100644 --- a/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue +++ b/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue @@ -31,6 +31,17 @@ + + + * 选择所属区域 + + + + + + + * 库区名称 @@ -38,6 +49,9 @@ + + + 库区编码 @@ -47,9 +61,6 @@ - - - 库区容量 @@ -66,6 +77,9 @@ + + + * 库区类型 @@ -77,11 +91,7 @@ - - - - - + 备注 @@ -92,49 +102,6 @@ - - - - @@ -144,6 +111,7 @@ import req from '@/api/warehouse/warehouseArea.js' import req2 from '@/api/warehouse/warehouse.js' import req3 from '@/api/warehouse/warehouseAreaType.js' + import req4 from '@/api/warehouse/warehouseZone.js' export default { components: {}, data() { @@ -158,6 +126,8 @@ remarks: '', warehouseName: '', warehouseSid: '', + zoneName: '', + zoneSid: '', areaTypeSid: "", areaTypeName: "", useOrgSid: window.sessionStorage.getItem('departmentSid'), @@ -167,6 +137,7 @@ }, warehouseList: [], + warehouseZoneList: [], warehouseTypeList: [], rules: { warehouseName: [{ @@ -174,6 +145,11 @@ message: '请选择所属仓库', trigger: 'change' }], + zoneName: [{ + required: true, + message: '请选择所属区域', + trigger: 'change' + }], areaName: [{ required: true, @@ -277,6 +253,10 @@ volume: '', unit: '', remarks: '', + warehouseName: '', + warehouseSid: '', + zoneName: '', + zoneSid: '', areaTypeSid: "", areaTypeName: "", useOrgSid: window.sessionStorage.getItem('departmentSid'), @@ -313,7 +293,28 @@ console.log('>>>>>>>>>selectWarehouseChange', choose) this.formobj.warehouseSid = choose[0].sid this.formobj.warehouseName = choose[0].warehouseName + + this.formobj.zoneSid = '' + this.formobj.zoneName = '' + this.getAllWarehousezone(choose[0].sid) + + }, + + getAllWarehousezone(sid) { + req4.getAllWarehousezoneBysid({ + ckSid: sid + }).then(resp => { + this.warehouseZoneList = resp.data + }) + }, + + selectWarehouseZoneChange(val) { + const choose = this.warehouseZoneList.filter((item) => item.sid == val) + console.log('>>>>>>>>>selectWarehouseZoneChange', choose) + this.formobj.zoneSid = choose[0].sid + this.formobj.zoneName = choose[0].zoneName }, + selectWarehouseTypeValueChange(val) { const choose = this.warehouseTypeList.filter((item) => item.sid == val) console.log('>>>>>>>>>selectWarehouseTypeValueChange', choose) diff --git a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue new file mode 100644 index 0000000000..3f273cf21d --- /dev/null +++ b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue @@ -0,0 +1,337 @@ + + + + + + + + {{ searchxianshitit }} + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 仓库区域列表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue new file mode 100644 index 0000000000..970f76e877 --- /dev/null +++ b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue @@ -0,0 +1,246 @@ + + + + + + {{title}}仓库区域 + + + 保存 + 关闭 + + + + + + + + + + + + + + * 选择所属仓库 + + + + + + + + + * 区域名称 + + + + + + + 区域编码 + + {{formobj.zoneCode}} + + + + + + + + + + 区域面积 + + + + + + + 计量单位 + + + + + + + 备注 + + + + + + + + + + + + + +