|
@ -22,7 +22,28 @@ |
|
|
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/> |
|
|
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="仓库"> |
|
|
<el-form-item label="仓库"> |
|
|
<el-input v-model="listQuery.params.warehouseName" placeholder="" clearable/> |
|
|
<el-select v-model="listQuery.params.warehouseName" filterable clearable placeholder="请选择" style="width:100%" @change="selectWarehouseName"> |
|
|
|
|
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="区域"> |
|
|
|
|
|
<el-select v-model="listQuery.params.wareZoneName" filterable clearable placeholder="请选择" @change="selectWareZoneName"> |
|
|
|
|
|
<el-option v-for="item in warehouseZoneList" :key="item.sid" :label="item.zoneName" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="库区"> |
|
|
|
|
|
<el-select v-model="listQuery.params.warehouseAreaName" filterable clearable placeholder="请选择" @change="selectWareAreaName"> |
|
|
|
|
|
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="库位"> |
|
|
|
|
|
<el-select v-model="listQuery.params.warehouseRackCode" filterable clearable placeholder="请选择" style="width:100%"> |
|
|
|
|
|
<el-option v-for="item in warehouseRackCodeList" :key="item.rackCode" :label="item.rackCode" :value="item.rackCode"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="供应商"> |
|
|
<el-form-item label="供应商"> |
|
|
<el-input v-model="listQuery.params.billObjName" placeholder="" clearable/> |
|
|
<el-input v-model="listQuery.params.billObjName" placeholder="" clearable/> |
|
@ -52,7 +73,10 @@ |
|
|
<el-table-column prop="goodsSkuCode" label="图号" align="center" width="120" /> |
|
|
<el-table-column prop="goodsSkuCode" label="图号" align="center" width="120" /> |
|
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="100" /> |
|
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="100" /> |
|
|
<el-table-column prop="unit" label="单位" align="center" width="100" /> |
|
|
<el-table-column prop="unit" label="单位" align="center" width="100" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" align="center" width="100" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" align="center" min-width="100" /> |
|
|
|
|
|
<el-table-column prop="wareZoneName" label="区域" align="center" min-width="100" /> |
|
|
|
|
|
<el-table-column prop="wareAreaName" label="库区" align="center" min-width="100" /> |
|
|
|
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" width="100" /> |
|
|
<el-table-column prop="inventoryCount" label="库存" align="center" width="120" /> |
|
|
<el-table-column prop="inventoryCount" label="库存" align="center" width="120" /> |
|
|
<el-table-column prop="billObjName" label="供应商" align="center" min-width="150" /> |
|
|
<el-table-column prop="billObjName" label="供应商" align="center" min-width="150" /> |
|
|
<el-table-column prop="manufacturerName" label="厂家" align="center" width="120" /> |
|
|
<el-table-column prop="manufacturerName" label="厂家" align="center" width="120" /> |
|
@ -75,6 +99,7 @@ import Pagination from '@/components/pagination' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
import req from '@/api/storage/sparePartsInventory' |
|
|
import req from '@/api/storage/sparePartsInventory' |
|
|
|
|
|
import { getAllRackByKQSid, getAllWarehouse, getAllWarehouseareaByZoneSid, getAllWarehousezoneBysid } from '@/api/Common/dictcommons' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'SparePartsInventory', |
|
|
name: 'SparePartsInventory', |
|
@ -101,6 +126,10 @@ export default { |
|
|
tableKey: 0, |
|
|
tableKey: 0, |
|
|
list: [], |
|
|
list: [], |
|
|
sids: [], // 用于导出的时候保存已选择的SIDs |
|
|
sids: [], // 用于导出的时候保存已选择的SIDs |
|
|
|
|
|
warehouseList: [], |
|
|
|
|
|
warehouseZoneList: [], |
|
|
|
|
|
wareAreaList: [], |
|
|
|
|
|
warehouseRackList: [], |
|
|
FormLoading: false, |
|
|
FormLoading: false, |
|
|
listLoading: false, |
|
|
listLoading: false, |
|
|
// 翻页 |
|
|
// 翻页 |
|
@ -114,6 +143,9 @@ export default { |
|
|
goodsSpuName: '', |
|
|
goodsSpuName: '', |
|
|
goodsSkuCode: '', |
|
|
goodsSkuCode: '', |
|
|
warehouseName: '', |
|
|
warehouseName: '', |
|
|
|
|
|
wareZoneName: '', |
|
|
|
|
|
wareAreaName: '', |
|
|
|
|
|
warehouseRackCode: '', |
|
|
billObjName: '', |
|
|
billObjName: '', |
|
|
manufacturerName: '', |
|
|
manufacturerName: '', |
|
|
orgPath: '', |
|
|
orgPath: '', |
|
@ -125,12 +157,20 @@ export default { |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
// 初始化变量 |
|
|
// 初始化变量 |
|
|
|
|
|
this.init() |
|
|
this.getList() |
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
init() { |
|
|
|
|
|
getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.warehouseList = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 搜索条件效果 |
|
|
// 搜索条件效果 |
|
|
clicksearchShow() { |
|
|
clicksearchShow() { |
|
|
this.isSearchShow = !this.isSearchShow |
|
|
this.isSearchShow = !this.isSearchShow |
|
@ -190,6 +230,9 @@ export default { |
|
|
goodsSpuName: '', |
|
|
goodsSpuName: '', |
|
|
goodsSkuCode: '', |
|
|
goodsSkuCode: '', |
|
|
warehouseName: '', |
|
|
warehouseName: '', |
|
|
|
|
|
wareZoneName: '', |
|
|
|
|
|
wareAreaName: '', |
|
|
|
|
|
warehouseRackCode: '', |
|
|
billObjName: '', |
|
|
billObjName: '', |
|
|
manufacturerName: '', |
|
|
manufacturerName: '', |
|
|
orgPath: '', |
|
|
orgPath: '', |
|
@ -199,6 +242,66 @@ export default { |
|
|
} |
|
|
} |
|
|
this.getList() |
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
selectWarehouseName(val) { |
|
|
|
|
|
const choose = this.warehouseList.filter((item) => item.sid === val) |
|
|
|
|
|
if (choose !== null || choose.length > 0) { |
|
|
|
|
|
this.listQuery.params.warehouseName = choose[0].warehouseName |
|
|
|
|
|
this.getWarehouseZoneList(choose[0].sid) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.listQuery.params.warehouseName = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.listQuery.params.wareZoneName = '' |
|
|
|
|
|
this.listQuery.params.wareAreaName = '' |
|
|
|
|
|
this.listQuery.params.warehouseRackCode = '' |
|
|
|
|
|
this.warehouseZoneList = [] |
|
|
|
|
|
this.wareAreaList = [] |
|
|
|
|
|
this.warehouseRackList = [] |
|
|
|
|
|
}, |
|
|
|
|
|
getWarehouseZoneList(sid) { |
|
|
|
|
|
getAllWarehousezoneBysid({ ckSid: sid }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.warehouseZoneList = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
selectWareZoneName(val) { |
|
|
|
|
|
const choose = this.warehouseZoneList.filter((item) => item.sid === val) |
|
|
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
|
|
this.listQuery.params.wareZoneName = choose[0].zoneName |
|
|
|
|
|
this.getWareAreaList(choose[0].sid) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.listQuery.params.wareZoneName = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.listQuery.params.wareAreaName = '' |
|
|
|
|
|
this.listQuery.params.warehouseRackCode = '' |
|
|
|
|
|
this.wareAreaList = [] |
|
|
|
|
|
this.warehouseRackList = [] |
|
|
|
|
|
}, |
|
|
|
|
|
getWareAreaList(sid) { |
|
|
|
|
|
getAllWarehouseareaByZoneSid({ qySid: sid }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.wareAreaList = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
selectWareAreaName(val) { |
|
|
|
|
|
const choose = this.wareAreaList.filter((item) => item.sid === val) |
|
|
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
|
|
this.listQuery.params.wareAreaName = choose[0].areaName |
|
|
|
|
|
this.getWarehouseRackList(choose[0].sid) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.listQuery.params.wareAreaName = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.listQuery.params.warehouseRackCode = '' |
|
|
|
|
|
this.warehouseRackList = [] |
|
|
|
|
|
}, |
|
|
|
|
|
getWarehouseRackList(sid) { |
|
|
|
|
|
getAllRackByKQSid({ kqSid: sid }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.warehouseRackList = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
doClose() { |
|
|
doClose() { |
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
this.$router.go(-1) |
|
|
this.$router.go(-1) |
|
|