完善库存
This commit is contained in:
@@ -173,7 +173,7 @@ export function getWarehouses(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 根据仓库查询库区
|
// 根据仓库查询库位
|
||||||
export function getWarehouseareas(data) {
|
export function getWarehouseareas(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/warehousearea/selectAll',
|
url: '/wms/apiadmin/warehousearea/selectAll',
|
||||||
|
|||||||
@@ -57,4 +57,31 @@ export default {
|
|||||||
data: params,
|
data: params,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 根据仓库查询库位
|
||||||
|
getWarehouseareas: function(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/apiadmin/warehouserack/selectAll',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 根据库区查询库位
|
||||||
|
getAllTypeByAreaSid: function(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/apiadmin/warehouserack/getAllTypeByAreaSid',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
// 修改是否可用状态
|
||||||
updateIsEnable: function(sid, isEnable) {
|
updateIsEnable: function(sid, isEnable) {
|
||||||
return request({
|
return request({
|
||||||
@@ -44,7 +42,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
// 新增、保存
|
||||||
saveWarehousearea: function(data) {
|
saveWarehousearea: function(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -27,42 +27,4 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 查询所有仓库
|
|
||||||
getWarehouses: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 根据仓库查询库区
|
|
||||||
getWarehouseareas: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/selectAll',
|
|
||||||
method: 'get',
|
|
||||||
params: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 根据仓库查询库位
|
|
||||||
getWarehouserack: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/apiadmin/warehouserack/selectAll',
|
|
||||||
method: 'get',
|
|
||||||
params: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/api/storage/historyInventory/historyInventory.js
Normal file
18
src/api/storage/historyInventory/historyInventory.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
// 历史库存 接口文档
|
||||||
|
export default {
|
||||||
|
// 查询分页列表 -- 历史库存
|
||||||
|
listPage: function(data) {
|
||||||
|
return request({
|
||||||
|
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||||
|
url: '/wms/apiadmin/warehouseinventoryhistory/listPage',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
43
src/api/storage/totalStatus/totalInventory.js
Normal file
43
src/api/storage/totalStatus/totalInventory.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
// 库存总量 接口文档
|
||||||
|
export default {
|
||||||
|
// 查询分页列表 -- 库存总量
|
||||||
|
listPage: function(data) {
|
||||||
|
return request({
|
||||||
|
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||||
|
url: '/wms/apiadmin/warehouseinventory/listPage',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询库存变化
|
||||||
|
getWarehouseInventoryRecord: function(data) {
|
||||||
|
return request({
|
||||||
|
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||||
|
url: '/wms/apiadmin/warehouseinventoryrecord/getWarehouseInventoryRecord',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询库区库存
|
||||||
|
getRackCountBySid: function(data) {
|
||||||
|
return request({
|
||||||
|
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||||
|
url: '/wms/apiadmin/warehouseinventory/getRackCountBySid',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
// 库位库存 接口文档
|
||||||
|
export default {
|
||||||
|
// 查询分页列表 -- 库位库存
|
||||||
|
listPage: function(data) {
|
||||||
|
return request({
|
||||||
|
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||||
|
url: '/wms/apiadmin/warehouseinventory/locationListPage',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -307,6 +307,38 @@ export const constantRoutes = [
|
|||||||
noCache: true
|
noCache: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/totalStatus/totalInventory',
|
||||||
|
component: () => import('@/views/storage/totalStatus/totalInventory/totalInventory'),
|
||||||
|
name: 'TotalStatus',
|
||||||
|
meta: {
|
||||||
|
title: '库存总量',
|
||||||
|
icon: 'product-add',
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/totalStatus/warehouseAreaInventory',
|
||||||
|
component: () => import('@/views/storage/totalStatus/warehouseAreaInventory/warehouseAreaInventory'),
|
||||||
|
name: 'WarehouseAreaInventory',
|
||||||
|
meta: {
|
||||||
|
title: '库区库存',
|
||||||
|
icon: 'product-add',
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '/totalStatus/historyInventory',
|
||||||
|
component: () => import('@/views/storage/totalStatus/historyInventory/historyInventory'),
|
||||||
|
name: 'HistoryInventory',
|
||||||
|
meta: {
|
||||||
|
title: '历史库存',
|
||||||
|
icon: 'product-add',
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -305,7 +305,6 @@
|
|||||||
// import divInfo from './receiptInfo.vue'
|
// import divInfo from './receiptInfo.vue'
|
||||||
import {
|
import {
|
||||||
typeValues,
|
typeValues,
|
||||||
getWarehouserack
|
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -626,7 +625,7 @@
|
|||||||
var query = {
|
var query = {
|
||||||
ckSid: sid
|
ckSid: sid
|
||||||
}
|
}
|
||||||
getWarehouserack(query).then((res) => {
|
req2.getWarehouseareas(query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.warehouseRackList2 = res.data
|
this.warehouseRackList2 = res.data
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,8 +212,8 @@
|
|||||||
import {
|
import {
|
||||||
choiceSupplierInfo,
|
choiceSupplierInfo,
|
||||||
getOrgSidByPath,
|
getOrgSidByPath,
|
||||||
getWarehouses,
|
// getWarehouses,
|
||||||
getWarehouseareas
|
// getWarehouseareas
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -265,16 +265,6 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getOrgPathSid() {
|
|
||||||
// getOrgSidByPath({
|
|
||||||
// orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
// }).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.formobj.createOrgSid = res.data
|
|
||||||
// this.formobj.useOrgSid = res.data
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
getOrgSidByPath({
|
getOrgSidByPath({
|
||||||
@@ -301,23 +291,6 @@
|
|||||||
},
|
},
|
||||||
getsupplierLust() {
|
getsupplierLust() {
|
||||||
|
|
||||||
// getOrgSidByPath({
|
|
||||||
// orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
// }).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.formobj.createOrgSid = res.data
|
|
||||||
// this.formobj.useOrgSid = res.data
|
|
||||||
// req.choiceSupplierInfo(res.data).then((resp) => {
|
|
||||||
// if (resp.success) {
|
|
||||||
// this.supplierNameList = resp.data
|
|
||||||
// console.log("aaaaaa", this.supplierNameList);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
|
|
||||||
choiceSupplierInfo({
|
choiceSupplierInfo({
|
||||||
createOrgSid: this.formobj.createOrgSid
|
createOrgSid: this.formobj.createOrgSid
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
@@ -342,37 +315,37 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getWarehouseAreaList(sid) {
|
// getWarehouseAreaList(sid) {
|
||||||
var query = {
|
// var query = {
|
||||||
ckSid: sid
|
// ckSid: sid
|
||||||
}
|
// }
|
||||||
getWarehouseareas(query).then((res) => {
|
// getWarehouseareas(query).then((res) => {
|
||||||
if (res.success) {
|
// if (res.success) {
|
||||||
this.warehouseRackList = res.data
|
// this.warehouseRackList = res.data
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseRackList);
|
// console.log("aaaaaa", this.warehouseRackList);
|
||||||
|
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
selectWarehouseName(row, val) {
|
// selectWarehouseName(row, val) {
|
||||||
console.log("selectWarehouseName", row);
|
// console.log("selectWarehouseName", row);
|
||||||
console.log("selectWarehouseName", val);
|
// console.log("selectWarehouseName", val);
|
||||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
// const choose = this.warehouseList.filter((item) => item.sid == val)
|
||||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
// console.log('>>>>>>>>>selectWarehouseName', choose)
|
||||||
row.warehouseName = choose[0].warehouseName
|
// row.warehouseName = choose[0].warehouseName
|
||||||
row.warehouseSid = choose[0].sid
|
// row.warehouseSid = choose[0].sid
|
||||||
|
|
||||||
},
|
// },
|
||||||
selectWarehouseAreaCode(val) {
|
// selectWarehouseAreaCode(val) {
|
||||||
console.log("selectWarehouseAreaCode", val);
|
// console.log("selectWarehouseAreaCode", val);
|
||||||
|
|
||||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
// const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
// console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
||||||
row.warehouseRackName = choose[0].areaCode
|
// row.warehouseRackName = choose[0].areaCode
|
||||||
row.warehouseRackSid = choose[0].sid
|
// row.warehouseRackSid = choose[0].sid
|
||||||
|
|
||||||
},
|
// },
|
||||||
|
|
||||||
batchAddAll() {
|
batchAddAll() {
|
||||||
|
|
||||||
@@ -682,9 +655,6 @@
|
|||||||
this.$refs['form_obj'].clearValidate()
|
this.$refs['form_obj'].clearValidate()
|
||||||
})
|
})
|
||||||
this.init()
|
this.init()
|
||||||
// this.getWarehouseList()
|
|
||||||
|
|
||||||
// this.getOrgPathSid()
|
|
||||||
var params = {
|
var params = {
|
||||||
sourceSid: row.sid
|
sourceSid: row.sid
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import req from '@/api/inStorage/receivingGoods.js'
|
import req from '@/api/inStorage/receivingGoods.js'
|
||||||
import {
|
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||||
getWarehouserack,
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
@@ -165,7 +163,7 @@
|
|||||||
var query = {
|
var query = {
|
||||||
ckSid: sid
|
ckSid: sid
|
||||||
}
|
}
|
||||||
getWarehouserack(query).then((res) => {
|
req2.getWarehouseareas(query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.warehouseRackList = res.data
|
this.warehouseRackList = res.data
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -371,7 +371,6 @@
|
|||||||
import {
|
import {
|
||||||
// getTypeValueList,
|
// getTypeValueList,
|
||||||
typeValues,
|
typeValues,
|
||||||
choiceSupplierInfo
|
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -656,7 +655,7 @@
|
|||||||
const data = resp.data
|
const data = resp.data
|
||||||
this.queryParams.total = data.total
|
this.queryParams.total = data.total
|
||||||
this.dataList = data.records
|
this.dataList = data.records
|
||||||
this.rowItemSid=''
|
this.rowItemSid = ''
|
||||||
this.from = {
|
this.from = {
|
||||||
first: [],
|
first: [],
|
||||||
two: [],
|
two: [],
|
||||||
|
|||||||
@@ -370,7 +370,6 @@
|
|||||||
import {
|
import {
|
||||||
// getTypeValueList,
|
// getTypeValueList,
|
||||||
typeValues,
|
typeValues,
|
||||||
choiceSupplierInfo
|
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -669,7 +668,7 @@
|
|||||||
const data = resp.data
|
const data = resp.data
|
||||||
this.queryParams.total = data.total
|
this.queryParams.total = data.total
|
||||||
this.dataList = data.records
|
this.dataList = data.records
|
||||||
this.rowItemSid=''
|
this.rowItemSid = ''
|
||||||
this.from = {
|
this.from = {
|
||||||
first: [],
|
first: [],
|
||||||
two: [],
|
two: [],
|
||||||
|
|||||||
@@ -371,7 +371,6 @@
|
|||||||
import {
|
import {
|
||||||
// getTypeValueList,
|
// getTypeValueList,
|
||||||
typeValues,
|
typeValues,
|
||||||
choiceSupplierInfo
|
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -654,7 +653,7 @@
|
|||||||
const data = resp.data
|
const data = resp.data
|
||||||
this.queryParams.total = data.total
|
this.queryParams.total = data.total
|
||||||
this.dataList = data.records
|
this.dataList = data.records
|
||||||
this.rowItemSid=''
|
this.rowItemSid = ''
|
||||||
this.from = {
|
this.from = {
|
||||||
first: [],
|
first: [],
|
||||||
two: [],
|
two: [],
|
||||||
|
|||||||
@@ -371,7 +371,6 @@
|
|||||||
import {
|
import {
|
||||||
// getTypeValueList,
|
// getTypeValueList,
|
||||||
typeValues,
|
typeValues,
|
||||||
choiceSupplierInfo
|
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -664,7 +663,7 @@
|
|||||||
const data = resp.data
|
const data = resp.data
|
||||||
this.queryParams.total = data.total
|
this.queryParams.total = data.total
|
||||||
this.dataList = data.records
|
this.dataList = data.records
|
||||||
this.rowItemSid=''
|
this.rowItemSid = ''
|
||||||
this.from = {
|
this.from = {
|
||||||
first: [],
|
first: [],
|
||||||
two: [],
|
two: [],
|
||||||
|
|||||||
@@ -117,7 +117,9 @@
|
|||||||
import req from '@/api/reports/inOutStorage.js'
|
import req from '@/api/reports/inOutStorage.js'
|
||||||
import {
|
import {
|
||||||
choiceSupplierInfo,
|
choiceSupplierInfo,
|
||||||
getOrgSidByPath
|
getOrgSidByPath,
|
||||||
|
getWarehouses,
|
||||||
|
getWarehouseareas
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
import ButtonBar from '@/components/ButtonBar'
|
||||||
import Pagination from '@/components/pagination'
|
import Pagination from '@/components/pagination'
|
||||||
@@ -264,7 +266,7 @@
|
|||||||
var parpams = {
|
var parpams = {
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||||
}
|
}
|
||||||
req.getWarehouses(parpams).then((res) => {
|
getWarehouses(parpams).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.warehouseList = res.data
|
this.warehouseList = res.data
|
||||||
|
|
||||||
@@ -274,10 +276,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getWarehouseAreaList(sid) {
|
getWarehouseAreaList(sid) {
|
||||||
|
|
||||||
var query = {
|
var query = {
|
||||||
ckSid: sid
|
ckSid: sid
|
||||||
}
|
}
|
||||||
req.getWarehouseareas(query).then((res) => {
|
getWarehouseareas(query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.warehouseRackList = res.data
|
this.warehouseRackList = res.data
|
||||||
|
|
||||||
@@ -285,6 +288,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
selectWarehouseName(val) {
|
selectWarehouseName(val) {
|
||||||
console.log("selectWarehouseName", val);
|
console.log("selectWarehouseName", val);
|
||||||
|
|||||||
@@ -0,0 +1,297 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--列表页面-->
|
||||||
|
<div v-show="viewState == 1">
|
||||||
|
<button-bar view-title="历史库存管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||||
|
<!--Start查询列表部分-->
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="searchcon">
|
||||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||||
|
<div v-show="isSearchShow" class="search">
|
||||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||||
|
<el-form-item label="商品">
|
||||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类别">
|
||||||
|
<el-select v-model="listQuery.params.goodsTypeSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in cateList" :key="i" :label="item.goodsTypeName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格">
|
||||||
|
<el-input v-model="listQuery.params.spec" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实际库存">
|
||||||
|
<el-input v-model="listQuery.params.countStart" placeholder="" clearable style="width: 100px;" /> 至
|
||||||
|
<el-input v-model="listQuery.params.countEnd" placeholder="" clearable style="width: 100px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="条码">
|
||||||
|
<el-input v-model="listQuery.params.barCode" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当日库存">
|
||||||
|
<el-date-picker v-model="listQuery.params.createDateEnd" type="date" placeholder="选择日期"
|
||||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="btn" style="text-align: center;">
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--End查询列表部分-->
|
||||||
|
<div class="listtop">
|
||||||
|
<div class="tit">历史库存列表</div>
|
||||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
|
||||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
<!--Start 主页面主要部分 -->
|
||||||
|
<div class="">
|
||||||
|
<el-table :data="list" style="width: 100%;margin-bottom: 20px;" row-key="sid" border
|
||||||
|
:tree-props="{children: 'children'}" ref="dataTreeList">
|
||||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||||
|
<el-table-column label="操作" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-button type="primary" size="mini" v-show="scope.row.mainSid=='0'"
|
||||||
|
@click="toDetail(scope.row)">查看</el-button> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称/规格" width="180" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuName}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuTitle}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品编码" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuCode}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuCode}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="barCode" label="条码" align="center" />
|
||||||
|
<el-table-column prop="unit" label="单位" align="center" />
|
||||||
|
<el-table-column prop="count" label="实际库存数量" align="center" />
|
||||||
|
<el-table-column prop="boxUnit" label="默认箱单位" align="center" />
|
||||||
|
<el-table-column prop="volume" label="实际体积m³" align="center" />
|
||||||
|
<el-table-column prop="weight" label="实际重量kg" align="center" />
|
||||||
|
<el-table-column prop="batchNumber" label="生产批次号" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Pagination from '@/components/pagination'
|
||||||
|
import pageye from '@/components/pagination/pageye'
|
||||||
|
import ButtonBar from '@/components/ButtonBar'
|
||||||
|
import req from '@/api/storage/historyInventory/historyInventory'
|
||||||
|
import req2 from '@/api/goods/goods.js'
|
||||||
|
import req3 from '@/api/goods/brand.js'
|
||||||
|
import req4 from '@/api/goods/category.js'
|
||||||
|
import req5 from '@/api/baseinfo/warehouse/warehouse.js'
|
||||||
|
import {
|
||||||
|
typeValues
|
||||||
|
} from '@/api/Common/dictcommons'
|
||||||
|
export default {
|
||||||
|
name: 'Capital',
|
||||||
|
components: {
|
||||||
|
Pagination,
|
||||||
|
pageye,
|
||||||
|
ButtonBar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btndisabled: false,
|
||||||
|
btnList: [{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toOpen',
|
||||||
|
btnLabel: '全部展开'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toRetract',
|
||||||
|
btnLabel: '全部收缩'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'success',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'export',
|
||||||
|
btnKey: 'toBuild',
|
||||||
|
btnLabel: '导出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'info',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'cross',
|
||||||
|
btnKey: 'doClose',
|
||||||
|
btnLabel: '关闭'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isSearchShow: false,
|
||||||
|
searchxianshitit: '显示查询条件',
|
||||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||||
|
tableKey: 0,
|
||||||
|
list: [],
|
||||||
|
listLoading: false,
|
||||||
|
// 翻页
|
||||||
|
listQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
warehouseList: [],
|
||||||
|
goodsList: [],
|
||||||
|
bankList: [],
|
||||||
|
cateList: [],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化变量
|
||||||
|
this.init()
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
|
||||||
|
typeValues({
|
||||||
|
type: 'billsType'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.billStateList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
var query = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||||
|
}
|
||||||
|
req2.getGoodsListAllByOrg(query).then((res) => {
|
||||||
|
this.goodsList = res.data
|
||||||
|
})
|
||||||
|
var parpams = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||||
|
}
|
||||||
|
// req3.getAllBrand(parpams).then(resp => {
|
||||||
|
// this.bankList = resp.data
|
||||||
|
// })
|
||||||
|
req4.getAllType(parpams).then(resp => {
|
||||||
|
this.cateList = resp.data
|
||||||
|
})
|
||||||
|
// req5.getAllWarehouse(parpams).then(resp => {
|
||||||
|
// this.warehouseList = resp.data
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
// 搜索条件效果
|
||||||
|
clicksearchShow() {
|
||||||
|
this.isSearchShow = !this.isSearchShow
|
||||||
|
if (this.isSearchShow) {
|
||||||
|
this.searchxianshitit = '隐藏查询条件'
|
||||||
|
} else {
|
||||||
|
this.searchxianshitit = '显示查询条件'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnHandle(btnKey) {
|
||||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||||
|
switch (btnKey) {
|
||||||
|
case 'toOpen':
|
||||||
|
this.toOpen()
|
||||||
|
break
|
||||||
|
case 'toRetract':
|
||||||
|
this.toRetract()
|
||||||
|
break
|
||||||
|
case 'toBuild':
|
||||||
|
this.toBuild()
|
||||||
|
break
|
||||||
|
case 'doClose':
|
||||||
|
this.doClose()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toOpen() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toRetract() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toBuild() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 表中序号
|
||||||
|
indexMethod(index) {
|
||||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||||
|
var pageindex = index + 1 + pagestart
|
||||||
|
return pageindex
|
||||||
|
},
|
||||||
|
// 查询列表信息
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
|
||||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath')
|
||||||
|
this.listQuery.params.menuUrl = this.$route.path
|
||||||
|
req.listPage(this.listQuery).then(response => {
|
||||||
|
this.listLoading = false
|
||||||
|
if (response.success) {
|
||||||
|
this.list = response.data.records
|
||||||
|
this.listQuery.total = response.data.total
|
||||||
|
} else {
|
||||||
|
this.list = []
|
||||||
|
this.listQuery.total = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询按钮
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 点击重置
|
||||||
|
handleReset() {
|
||||||
|
this.listQuery = {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetState() {
|
||||||
|
this.viewState = 1
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
|
this.$router.go(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
529
src/views/storage/totalStatus/totalInventory/totalInventory.vue
Normal file
529
src/views/storage/totalStatus/totalInventory/totalInventory.vue
Normal file
@@ -0,0 +1,529 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--列表页面-->
|
||||||
|
<div v-show="viewState == 1">
|
||||||
|
<button-bar view-title="库存总量管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||||
|
<!--Start查询列表部分-->
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="searchcon">
|
||||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||||
|
<div v-show="isSearchShow" class="search">
|
||||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||||
|
<el-form-item label="仓库">
|
||||||
|
<el-select v-model="listQuery.params.warehouseSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品">
|
||||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品牌">
|
||||||
|
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in bankList" :key="i" :label="item.brandName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类别">
|
||||||
|
<el-select v-model="listQuery.params.goodsTypeSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in cateList" :key="i" :label="item.goodsTypeName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格">
|
||||||
|
<el-input v-model="listQuery.params.spec" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实际库存">
|
||||||
|
<el-input v-model="listQuery.params.countStart" placeholder="" clearable style="width: 100px;" /> 至
|
||||||
|
<el-input v-model="listQuery.params.countEnd" placeholder="" clearable style="width: 100px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="条码">
|
||||||
|
<el-input v-model="listQuery.params.barCode" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货号">
|
||||||
|
<el-input v-model="listQuery.params.itemNumber" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="btn" style="text-align: center;">
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--End查询列表部分-->
|
||||||
|
<div class="listtop">
|
||||||
|
<div class="tit">库存总量列表</div>
|
||||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
|
||||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
<!--Start 主页面主要部分 -->
|
||||||
|
<div class="">
|
||||||
|
<el-table :data="list" style="width: 100%;margin-bottom: 20px;" row-key="sid" border
|
||||||
|
:tree-props="{children: 'children'}" ref="dataTreeList">
|
||||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||||
|
<!-- <el-table-column align="center" width="40" /> -->
|
||||||
|
<el-table-column label="操作" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" v-show="scope.row.mainSid=='0'"
|
||||||
|
@click="toDetail(scope.row)">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="goodsID" label="商品ID" align="center" /> -->
|
||||||
|
<el-table-column label="商品名称/规格" width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuName}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuTitle}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品编码" width="130" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuCode}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuCode}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="barCode" label="条码" align="center" />
|
||||||
|
<el-table-column prop="unit" label="单位" align="center" />
|
||||||
|
<el-table-column label="库存数量" align="center">
|
||||||
|
<el-table-column prop="useCount" label="可用" align="center" />
|
||||||
|
<el-table-column prop="count" label="实际" align="center" />
|
||||||
|
<el-table-column prop="allocateCount" label="锁定" align="center" />
|
||||||
|
<el-table-column prop="freezeCount" label="冻结" align="center" />
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="在途数量" align="center">
|
||||||
|
<el-table-column prop="inTransitSummary" label="在途汇总" width="100" align="center" />
|
||||||
|
<el-table-column prop="procurementInTransit" label="采购在途" width="100" align="center" />
|
||||||
|
<el-table-column prop="salesReturnInTransit" label="销退在途" width="100" align="center" />
|
||||||
|
<el-table-column prop="transferInTransit" label="调拨在途" width="100" align="center" />
|
||||||
|
<el-table-column prop="otherOnTheWay" label="其他在途" width="100" align="center" />
|
||||||
|
<el-table-column prop="workOrderInTransit" label="加工单在途" width="120" align="center" />
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="boxUnit" label="默认箱单位" width="120" align="center" />
|
||||||
|
<el-table-column prop="volume" label="实际体积m³" width="120" align="center" />
|
||||||
|
<el-table-column prop="weight" label="实际重量kg" width="120" align="center" />
|
||||||
|
<el-table-column label="查看" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" @click="toRackCountunt(scope.row)">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="serialNumber" label="序列号" width="100" align="center" />
|
||||||
|
<el-table-column prop="batchNumber" label="生产批次号" width="120" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<!--End 主页面主要部分-->
|
||||||
|
<!-- <div class="pages"> -->
|
||||||
|
<!-- <div class="tit" /> -->
|
||||||
|
<!-- 翻页 -->
|
||||||
|
<!-- <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" -->
|
||||||
|
<!-- :limit.sync="listQuery.size" class="pagination" @pagination="getList" /> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!--End查询列表部分-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-dialog title="库存变化详情" :visible.sync="dialogVisible" style=" width:150%;margin-left: -20%;">
|
||||||
|
|
||||||
|
<div class="search" style="margin-top: -30px;">
|
||||||
|
<el-form ref="listQueryform" :inline="true" :model="queryParams" label-width="100px" class="tab-header">
|
||||||
|
<el-form-item label="商品名称">
|
||||||
|
<el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格">
|
||||||
|
<el-input v-model="queryParams.params.spec" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库">
|
||||||
|
<el-input v-model="queryParams.params.warehouseName" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据类型">
|
||||||
|
<el-select v-model="queryParams.params.billType" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in billStateList" :label="item.dictValue" :value="item.dictKey">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发生时间">
|
||||||
|
<el-date-picker v-model="queryParams.params.startTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd" style="width: 200px;">
|
||||||
|
</el-date-picker> 至
|
||||||
|
<el-date-picker v-model="queryParams.params.endTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd" style="width: 200px;">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="btn" style="text-align: center;">
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter2">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset2">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table :data="dataList" border style="width: 100%;margin-top: 15px;">
|
||||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
|
||||||
|
<el-table-column prop="createTime" label="发生时间" align="center" />
|
||||||
|
<el-table-column prop="busTypeValue" label="单据类型" align="center" />
|
||||||
|
<el-table-column label="单据编号" width="180" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="text-decoration: underline;cursor: pointer;color: #018AD2;">{{scope.row.billNo}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="operator" label="操作员" align="center" />
|
||||||
|
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
||||||
|
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
|
||||||
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
|
||||||
|
<el-table-column prop="count" label="发生数量" align="center" />
|
||||||
|
<el-table-column prop="costIncurred" label="发生成本" align="center" />
|
||||||
|
<el-table-column prop="currentCount" label="库存数量" align="center" />
|
||||||
|
<el-table-column prop="inventoryCost" label="库存成本" align="center" />
|
||||||
|
</el-table>
|
||||||
|
<div class="pages">
|
||||||
|
<div class="tit" />
|
||||||
|
<!-- 翻页 -->
|
||||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="getList2" />
|
||||||
|
</div>
|
||||||
|
<!-- <div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
|
||||||
|
<el-button type="primary" style="margin-top: 20px;" @click="dialogVisible2==false">关 闭</el-button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog title="库区库存" :visible.sync="dialogVisible2" style=" width:150%;margin-left: -20%;">
|
||||||
|
|
||||||
|
<el-table :data="rackCountList" border style="width: 100%;margin-top: -30px;">
|
||||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
|
||||||
|
<el-table-column prop="rackCode" label="库区" align="center" />
|
||||||
|
<el-table-column prop="count" label="实际" align="center" />
|
||||||
|
<el-table-column prop="useCount" label="可用" align="center" />
|
||||||
|
<el-table-column prop="allocateCount" label="锁定" align="center" />
|
||||||
|
<el-table-column prop="freezeCount" label="冻结" align="center" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
|
||||||
|
<el-button type="primary" style="margin-top: 20px;" @click="dialogVisible2==false">关 闭</el-button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Pagination from '@/components/pagination'
|
||||||
|
import pageye from '@/components/pagination/pageye'
|
||||||
|
import ButtonBar from '@/components/ButtonBar'
|
||||||
|
import req from '@/api/storage/totalStatus/totalInventory'
|
||||||
|
import req2 from '@/api/goods/goods.js'
|
||||||
|
import req3 from '@/api/goods/brand.js'
|
||||||
|
import req4 from '@/api/goods/category.js'
|
||||||
|
import req5 from '@/api/baseinfo/warehouse/warehouse.js'
|
||||||
|
import {
|
||||||
|
typeValues
|
||||||
|
} from '@/api/Common/dictcommons'
|
||||||
|
export default {
|
||||||
|
name: 'Capital',
|
||||||
|
components: {
|
||||||
|
Pagination,
|
||||||
|
pageye,
|
||||||
|
ButtonBar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btndisabled: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogVisible2: false,
|
||||||
|
btnList: [{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toOpen',
|
||||||
|
btnLabel: '全部展开'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toRetract',
|
||||||
|
btnLabel: '全部收缩'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'success',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'export',
|
||||||
|
btnKey: 'toBuild',
|
||||||
|
btnLabel: '导出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'info',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'cross',
|
||||||
|
btnKey: 'doClose',
|
||||||
|
btnLabel: '关闭'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isSearchShow: false,
|
||||||
|
searchxianshitit: '显示查询条件',
|
||||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||||
|
tableKey: 0,
|
||||||
|
list: [],
|
||||||
|
sids: [], // 用于导出的时候保存已选择的SIDs
|
||||||
|
listLoading: false,
|
||||||
|
// 翻页
|
||||||
|
listQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"warehouseSid": "",
|
||||||
|
"goodsSpuSid": "",
|
||||||
|
"brandSid": "",
|
||||||
|
"spec": "",
|
||||||
|
"countStart": "",
|
||||||
|
"countEnd": "",
|
||||||
|
"barCode": "",
|
||||||
|
"itemNumber": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
warehouseList: [],
|
||||||
|
goodsList: [],
|
||||||
|
bankList: [],
|
||||||
|
cateList: [],
|
||||||
|
rackCountList: [],
|
||||||
|
queryParams: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"goodsSpuName": "",
|
||||||
|
"spec": "",
|
||||||
|
"warehouseName": "",
|
||||||
|
"billType": "",
|
||||||
|
"startTime": "",
|
||||||
|
"endTime": "",
|
||||||
|
"sid": "",
|
||||||
|
"type": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billStateList: [],
|
||||||
|
dataList: [],
|
||||||
|
itemInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化变量
|
||||||
|
this.init()
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
|
||||||
|
typeValues({
|
||||||
|
type: 'billsType'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.billStateList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
var query = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||||
|
}
|
||||||
|
req2.getGoodsListAllByOrg(query).then((res) => {
|
||||||
|
this.goodsList = res.data
|
||||||
|
})
|
||||||
|
var parpams = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||||
|
}
|
||||||
|
req3.getAllBrand(parpams).then(resp => {
|
||||||
|
this.bankList = resp.data
|
||||||
|
})
|
||||||
|
req4.getAllType(parpams).then(resp => {
|
||||||
|
this.cateList = resp.data
|
||||||
|
})
|
||||||
|
req5.getAllWarehouse(parpams).then(resp => {
|
||||||
|
this.warehouseList = resp.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索条件效果
|
||||||
|
clicksearchShow() {
|
||||||
|
this.isSearchShow = !this.isSearchShow
|
||||||
|
if (this.isSearchShow) {
|
||||||
|
this.searchxianshitit = '隐藏查询条件'
|
||||||
|
} else {
|
||||||
|
this.searchxianshitit = '显示查询条件'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnHandle(btnKey) {
|
||||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||||
|
switch (btnKey) {
|
||||||
|
case 'toOpen':
|
||||||
|
this.toOpen()
|
||||||
|
break
|
||||||
|
case 'toRetract':
|
||||||
|
this.toRetract()
|
||||||
|
break
|
||||||
|
case 'toBuild':
|
||||||
|
this.toBuild()
|
||||||
|
break
|
||||||
|
case 'doClose':
|
||||||
|
this.doClose()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toOpen() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toRetract() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toBuild() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 信息条数 获取点击时当前的sid
|
||||||
|
handleSelectionChange(row) {
|
||||||
|
const aa = []
|
||||||
|
row.forEach(element => {
|
||||||
|
aa.push(element.sid)
|
||||||
|
})
|
||||||
|
this.sids = aa
|
||||||
|
},
|
||||||
|
// 表中序号
|
||||||
|
indexMethod(index) {
|
||||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||||
|
var pageindex = index + 1 + pagestart
|
||||||
|
return pageindex
|
||||||
|
},
|
||||||
|
// 查询列表信息
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
|
||||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath')
|
||||||
|
this.listQuery.params.menuUrl = this.$route.path
|
||||||
|
req.listPage(this.listQuery).then(response => {
|
||||||
|
this.listLoading = false
|
||||||
|
if (response.success) {
|
||||||
|
this.list = response.data.records
|
||||||
|
this.listQuery.total = response.data.total
|
||||||
|
} else {
|
||||||
|
this.list = []
|
||||||
|
this.listQuery.total = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询按钮
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 点击重置
|
||||||
|
handleReset() {
|
||||||
|
this.listQuery = {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"warehouseSid": "",
|
||||||
|
"goodsSpuSid": "",
|
||||||
|
"brandSid": "",
|
||||||
|
"spec": "",
|
||||||
|
"countStart": "",
|
||||||
|
"countEnd": "",
|
||||||
|
"barCode": "",
|
||||||
|
"itemNumber": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 查询按钮
|
||||||
|
handleFilter2() {
|
||||||
|
this.queryParams.current = 1
|
||||||
|
this.getList2()
|
||||||
|
},
|
||||||
|
// 点击重置
|
||||||
|
handleReset2() {
|
||||||
|
this.queryParams = {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"goodsSpuName": "",
|
||||||
|
"spec": "",
|
||||||
|
"warehouseName": "",
|
||||||
|
"billType": "",
|
||||||
|
"startTime": "",
|
||||||
|
"endTime": "",
|
||||||
|
"sid": this.itemInfo.sid,
|
||||||
|
"type": this.itemInfo.mainSid == '0' ? '1' : "2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getList2()
|
||||||
|
},
|
||||||
|
getList2() {
|
||||||
|
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
||||||
|
this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
|
||||||
|
this.queryParams.params.menuUrl = this.$route.path
|
||||||
|
this.queryParams.params.sid = this.itemInfo.sid
|
||||||
|
this.queryParams.params.type = this.itemInfo.mainSid == '0' ? '1' : "2"
|
||||||
|
req.getWarehouseInventoryRecord(this.queryParams).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dataList = response.data.records
|
||||||
|
this.queryParams.total = response.data.total
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.queryParams.total = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toDetail(row) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.itemInfo = row
|
||||||
|
this.getList2()
|
||||||
|
},
|
||||||
|
toRackCountunt(row) {
|
||||||
|
var parpams = {
|
||||||
|
sid: row.sid,
|
||||||
|
type: row.mainSid == '0' ? '1' : '2',
|
||||||
|
orgSid: window.sessionStorage.getItem('orgSid')
|
||||||
|
}
|
||||||
|
req.getRackCountBySid(parpams).then(resp => {
|
||||||
|
this.rackCountList = resp.data
|
||||||
|
this.dialogVisible2 = true
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
resetState() {
|
||||||
|
this.viewState = 1
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
|
this.$router.go(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,408 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--列表页面-->
|
||||||
|
<div v-show="viewState == 1">
|
||||||
|
<button-bar view-title="库位库存管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||||
|
<!--Start查询列表部分-->
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="searchcon">
|
||||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||||
|
<div v-show="isSearchShow" class="search">
|
||||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||||
|
<!-- <el-form-item label="库存形态">
|
||||||
|
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in bankList" :key="i" :label="item.brandName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="仓库">
|
||||||
|
<el-select v-model="listQuery.params.warehouseSid" placeholder="请选择" style="width: 200px;"
|
||||||
|
@change="seleWarehouseSid">
|
||||||
|
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区">
|
||||||
|
<el-select v-model="listQuery.params.warehouseAreaSid" placeholder="请选择" style="width: 200px;"
|
||||||
|
@change="seleWarehouseAreaSid">
|
||||||
|
<el-option v-for="(item,i) in warehouseAreaList" :key="i" :label="item.areaName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位">
|
||||||
|
<el-select v-model="listQuery.params.warehouseRackCode" placeholder="请选择" style="width: 200px;"
|
||||||
|
@change="seleWarehouseRackCode">
|
||||||
|
<el-option v-for="(item,index) in warehouseRackList" :key="item.sid" :label="item.rackCode"
|
||||||
|
:value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品">
|
||||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="品牌">
|
||||||
|
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in bankList" :key="i" :label="item.brandName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="规格">
|
||||||
|
<el-input v-model="listQuery.params.spec" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实际库存">
|
||||||
|
<el-input v-model="listQuery.params.countStart" placeholder="" clearable style="width: 100px;" /> 至
|
||||||
|
<el-input v-model="listQuery.params.countEnd" placeholder="" clearable style="width: 100px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="条码">
|
||||||
|
<el-input v-model="listQuery.params.barCode" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="使用方式">
|
||||||
|
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" style="width: 200px;">
|
||||||
|
<el-option v-for="(item,i) in bankList" :key="i" :label="item.brandName" :value="item.sid">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
<div class="btn" style="text-align: center;">
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--End查询列表部分-->
|
||||||
|
<div class="listtop">
|
||||||
|
<div class="tit">库位库存列表</div>
|
||||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
|
||||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
<!--Start 主页面主要部分 -->
|
||||||
|
<div class="">
|
||||||
|
<el-table :data="list" style="width: 100%;margin-bottom: 20px;" row-key="sid" border
|
||||||
|
:tree-props="{children: 'children'}" ref="dataTreeList">
|
||||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||||
|
<el-table-column label="操作" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-button type="primary" size="mini" v-show="scope.row.mainSid=='0'"
|
||||||
|
@click="toDetail(scope.row)">查看</el-button> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称/规格" width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuName}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuTitle}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品编码" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-show="scope.row.mainSid=='0'">{{scope.row.goodsSpuCode}}</span>
|
||||||
|
<span v-show="scope.row.mainSid!='0'">{{scope.row.goodsSkuCode}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="barCode" label="条码" align="center" />
|
||||||
|
<el-table-column prop="unit" label="单位" align="center" />
|
||||||
|
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
||||||
|
<el-table-column prop="warehouseAreaName" label="库区" align="center" />
|
||||||
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
|
||||||
|
<el-table-column label="库存数量" align="center">
|
||||||
|
<el-table-column prop="useCount" label="可用" align="center" />
|
||||||
|
<el-table-column prop="count" label="实际" align="center" />
|
||||||
|
<el-table-column prop="allocateCount" label="锁定" align="center" />
|
||||||
|
<el-table-column prop="freezeCount" label="冻结" align="center" />
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Pagination from '@/components/pagination'
|
||||||
|
import pageye from '@/components/pagination/pageye'
|
||||||
|
import ButtonBar from '@/components/ButtonBar'
|
||||||
|
import req from '@/api/storage/warehouseAreaInventory/warehouseAreaInventory'
|
||||||
|
import req2 from '@/api/goods/goods.js'
|
||||||
|
import req3 from '@/api/baseinfo/warehouse/warehouse.js'
|
||||||
|
import req4 from '@/api/baseinfo/warehouseArea/warehouseArea.js'
|
||||||
|
import req5 from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||||
|
import {
|
||||||
|
typeValues
|
||||||
|
} from '@/api/Common/dictcommons'
|
||||||
|
export default {
|
||||||
|
name: 'Capital',
|
||||||
|
components: {
|
||||||
|
Pagination,
|
||||||
|
pageye,
|
||||||
|
ButtonBar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btndisabled: false,
|
||||||
|
btnList: [{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toOpen',
|
||||||
|
btnLabel: '全部展开'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'primary',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'plus',
|
||||||
|
btnKey: 'toRetract',
|
||||||
|
btnLabel: '全部收缩'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'success',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'export',
|
||||||
|
btnKey: 'toBuild',
|
||||||
|
btnLabel: '导出'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'info',
|
||||||
|
size: 'small',
|
||||||
|
icon: 'cross',
|
||||||
|
btnKey: 'doClose',
|
||||||
|
btnLabel: '关闭'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isSearchShow: false,
|
||||||
|
searchxianshitit: '显示查询条件',
|
||||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||||
|
tableKey: 0,
|
||||||
|
list: [],
|
||||||
|
listLoading: false,
|
||||||
|
// 翻页
|
||||||
|
listQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"warehouseSid": "",
|
||||||
|
"warehouseName": "",
|
||||||
|
"warehouseAreaSid": "",
|
||||||
|
"warehouseAreaName": "",
|
||||||
|
"warehouseRackCode": "",
|
||||||
|
"warehouseRackSid": "",
|
||||||
|
"goodsSid": "",
|
||||||
|
"spec": "",
|
||||||
|
"countStart": "",
|
||||||
|
"countEnd": "",
|
||||||
|
"barCode": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
warehouseList: [],
|
||||||
|
warehouseAreaList: [],
|
||||||
|
warehouseRackList: [],
|
||||||
|
goodsList: [],
|
||||||
|
bankList: [],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化变量
|
||||||
|
this.init()
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
|
||||||
|
typeValues({
|
||||||
|
type: 'billsType'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.billStateList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
var query = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||||
|
}
|
||||||
|
req2.getGoodsListAllByOrg(query).then((res) => {
|
||||||
|
this.goodsList = res.data
|
||||||
|
})
|
||||||
|
var parpams = {
|
||||||
|
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||||
|
}
|
||||||
|
req3.getAllWarehouse(parpams).then(resp => {
|
||||||
|
this.warehouseList = resp.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索条件效果
|
||||||
|
clicksearchShow() {
|
||||||
|
this.isSearchShow = !this.isSearchShow
|
||||||
|
if (this.isSearchShow) {
|
||||||
|
this.searchxianshitit = '隐藏查询条件'
|
||||||
|
} else {
|
||||||
|
this.searchxianshitit = '显示查询条件'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnHandle(btnKey) {
|
||||||
|
|
||||||
|
switch (btnKey) {
|
||||||
|
case 'toOpen':
|
||||||
|
this.toOpen()
|
||||||
|
break
|
||||||
|
case 'toRetract':
|
||||||
|
this.toRetract()
|
||||||
|
break
|
||||||
|
case 'toBuild':
|
||||||
|
this.toBuild()
|
||||||
|
break
|
||||||
|
case 'doClose':
|
||||||
|
this.doClose()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toOpen() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toRetract() {
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
this.$refs.dataTreeList.toggleRowExpansion(item, false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toBuild() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 表中序号
|
||||||
|
indexMethod(index) {
|
||||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||||
|
var pageindex = index + 1 + pagestart
|
||||||
|
return pageindex
|
||||||
|
},
|
||||||
|
// 查询列表信息
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
|
||||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath')
|
||||||
|
this.listQuery.params.menuUrl = this.$route.path
|
||||||
|
req.listPage(this.listQuery).then(response => {
|
||||||
|
this.listLoading = false
|
||||||
|
if (response.success) {
|
||||||
|
this.list = response.data.records
|
||||||
|
this.listQuery.total = response.data.total
|
||||||
|
} else {
|
||||||
|
this.list = []
|
||||||
|
this.listQuery.total = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRowKeys(row) {
|
||||||
|
|
||||||
|
if (row.mainSid != '0') {
|
||||||
|
return row.goodsSkuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
return row.goodsSpuCode;
|
||||||
|
},
|
||||||
|
// 查询按钮
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 点击重置
|
||||||
|
handleReset() {
|
||||||
|
this.listQuery = {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0,
|
||||||
|
params: {
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": "",
|
||||||
|
"warehouseSid": "",
|
||||||
|
"warehouseName": "",
|
||||||
|
"warehouseAreaSid": "",
|
||||||
|
"warehouseAreaName": "",
|
||||||
|
"warehouseRackCode": "",
|
||||||
|
"warehouseRackSid": "",
|
||||||
|
"goodsSid": "",
|
||||||
|
"spec": "",
|
||||||
|
"countStart": "",
|
||||||
|
"countEnd": "",
|
||||||
|
"barCode": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
resetState() {
|
||||||
|
this.viewState = 1
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
|
this.$router.go(-1)
|
||||||
|
},
|
||||||
|
seleWarehouseSid(val) {
|
||||||
|
console.log('seleWarehouseSid', val)
|
||||||
|
|
||||||
|
const choose = this.warehouseList.filter((item) => item.sid == val)
|
||||||
|
console.log('>>>>>>>>>seleWarehouseSid', choose)
|
||||||
|
this.listQuery.params.warehouseSid = choose[0].sid
|
||||||
|
this.listQuery.params.warehouseName = choose[0].warehouseName
|
||||||
|
|
||||||
|
this.listQuery.params.warehouseAreaSid = ''
|
||||||
|
this.listQuery.params.warehouseAreaName = ''
|
||||||
|
|
||||||
|
this.listQuery.params.warehouseRackSid = ''
|
||||||
|
this.listQuery.params.warehouseRackCode = ''
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
ckSid: choose[0].sid
|
||||||
|
}
|
||||||
|
|
||||||
|
req4.getAllWarehouseareaBysid(params).then(resp => {
|
||||||
|
this.warehouseAreaList = resp.data
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
seleWarehouseAreaSid(val) {
|
||||||
|
console.log('seleWarehouseAreaSid', val)
|
||||||
|
const choose = this.warehouseAreaList.filter((item) => item.sid == val)
|
||||||
|
console.log('>>>>>>>>>seleWarehouseAreaSid', choose)
|
||||||
|
this.listQuery.params.warehouseAreaSid = choose[0].sid
|
||||||
|
this.listQuery.params.warehouseAreaName = choose[0].areaName
|
||||||
|
|
||||||
|
this.listQuery.params.warehouseRackSid = ''
|
||||||
|
this.listQuery.params.warehouseRackCode = ''
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
areaSid: choose[0].sid
|
||||||
|
}
|
||||||
|
|
||||||
|
req5.getAllTypeByAreaSid(params).then(resp => {
|
||||||
|
this.warehouseRackList = resp.data
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
seleWarehouseRackCode(val) {
|
||||||
|
console.log('seleWarehouseRackCode', val)
|
||||||
|
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||||
|
console.log('>>>>>>>>>seleWarehouseRackCode', choose)
|
||||||
|
this.listQuery.params.warehouseRackSid = choose[0].sid
|
||||||
|
this.listQuery.params.warehouseRackCode = choose[0].rackCode
|
||||||
|
console.log('>>>>>>>>>warehouseRackSid', this.listQuery.params.warehouseRackSid)
|
||||||
|
console.log('>>>>>>>>>warehouseRackCode', this.listQuery.params.warehouseRackCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user