|
|
|
@ -1,33 +1,72 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="search-box"> |
|
|
|
<div class="search-box"> |
|
|
|
<el-form :inline="true" :model="query"> |
|
|
|
<el-form |
|
|
|
|
|
|
|
:inline="true" |
|
|
|
|
|
|
|
:model="query" |
|
|
|
|
|
|
|
> |
|
|
|
<el-form-item label="仓库名称"> |
|
|
|
<el-form-item label="仓库名称"> |
|
|
|
<el-input v-model="query.branchName" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.branchName" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="库位"> |
|
|
|
<el-form-item label="库位"> |
|
|
|
<el-input v-model="query.locationName" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.locationName" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="商品编码"> |
|
|
|
<el-form-item label="商品编码"> |
|
|
|
<el-input v-model="query.goodNo" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.goodNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="商品名称"> |
|
|
|
<el-form-item label="商品名称"> |
|
|
|
<el-input v-model="query.goodName" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.goodName" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="库龄"> |
|
|
|
<el-form-item label="库龄"> |
|
|
|
<el-input v-model="query.DiffDate" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.DiffDate" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="箱号"> |
|
|
|
<el-form-item label="箱号"> |
|
|
|
<el-input v-model="query.containerCode" placeholder="请输入" clearable @keyup.enter.native="queryTable" ></el-input> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="query.containerCode" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter.native="queryTable" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<rrOpt @query="queryTable(1)" @reset="toReset" /> |
|
|
|
<rrOpt |
|
|
|
|
|
|
|
@query="queryTable(1)" |
|
|
|
|
|
|
|
@reset="toReset" |
|
|
|
|
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="opt-box"> |
|
|
|
<div class="opt-box"> |
|
|
|
<div class="opt-box-right"> |
|
|
|
<div class="opt-box-right"> |
|
|
|
<el-button type="primary" @click="generate">导出</el-button> |
|
|
|
<el-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="generate" |
|
|
|
|
|
|
|
>导出</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="layout-full"> |
|
|
|
<div class="layout-full"> |
|
|
|
@ -44,169 +83,175 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { storageList } from "@/api/warehousing/acceptance"; |
|
|
|
import { storageList } from '@/api/warehousing/acceptance' |
|
|
|
import { pageStockDReport } from "@/api/businessQuery/index"; |
|
|
|
import { pageStockDReport } from '@/api/businessQuery/index' |
|
|
|
import { getBranchList } from "@/api/system/branch"; |
|
|
|
import { getBranchList } from '@/api/system/branch' |
|
|
|
import { getConsignorList } from "@/api/basicData/cargoOwner"; |
|
|
|
import { getConsignorList } from '@/api/basicData/cargoOwner' |
|
|
|
import {dealEmptyQueryCondition} from "@/utils"; |
|
|
|
import { dealEmptyQueryCondition } from '@/utils' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "commodityInventory", |
|
|
|
name: 'commodityInventory', |
|
|
|
dicts: [], |
|
|
|
dicts: [], |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
const _that = this; |
|
|
|
const _that = this |
|
|
|
return { |
|
|
|
return { |
|
|
|
options: [], |
|
|
|
options: [], |
|
|
|
options2: [], |
|
|
|
options2: [], |
|
|
|
options3: [], |
|
|
|
options3: [], |
|
|
|
loading: false, |
|
|
|
loading: false, |
|
|
|
query: { |
|
|
|
query: { |
|
|
|
branchName: "", // 仓库名称 |
|
|
|
branchName: '', // 仓库名称 |
|
|
|
locationName: "", // 库位 |
|
|
|
locationName: '', // 库位 |
|
|
|
goodNo: "", // 商品编码 |
|
|
|
goodNo: '', // 商品编码 |
|
|
|
goodName: "", // 商品名称 |
|
|
|
goodName: '', // 商品名称 |
|
|
|
DiffDate: "", // 库龄 |
|
|
|
DiffDate: '', // 库龄 |
|
|
|
containerCode: "", // 箱号 |
|
|
|
containerCode: '' // 箱号 |
|
|
|
}, |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
tableData: [], |
|
|
|
paging: { |
|
|
|
paging: { |
|
|
|
page: 1, // 当前页 |
|
|
|
page: 1, // 当前页 |
|
|
|
size: 10, // 页面大小 |
|
|
|
size: 10, // 页面大小 |
|
|
|
total: 0, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
tableConfig: [ |
|
|
|
tableConfig: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "仓库名称", |
|
|
|
label: '仓库名称', |
|
|
|
prop: "branchName", |
|
|
|
prop: 'branchName', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "库区", |
|
|
|
label: '库区', |
|
|
|
prop: "areaName", |
|
|
|
prop: 'areaName', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "库位", |
|
|
|
label: '库位', |
|
|
|
prop: "locationName", |
|
|
|
prop: 'locationName', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
},{ |
|
|
|
|
|
|
|
label: "箱号", |
|
|
|
|
|
|
|
prop: "containerCode", |
|
|
|
|
|
|
|
istrue: true, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "商品编码", |
|
|
|
label: '箱号', |
|
|
|
prop: "goodNo", |
|
|
|
prop: 'containerCode', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "商品名称", |
|
|
|
label: '商品编码', |
|
|
|
prop: "goodName", |
|
|
|
prop: 'goodNo', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "总数量", |
|
|
|
label: '商品名称', |
|
|
|
prop: "totalAmount", |
|
|
|
prop: 'goodName', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "可用数量", |
|
|
|
label: '总数量', |
|
|
|
prop: "quantityAvailable", |
|
|
|
prop: 'totalAmount', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "分配数量", |
|
|
|
label: '可用数量', |
|
|
|
prop: "allocatedAmount", |
|
|
|
prop: 'quantityAvailable', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "生产日期", |
|
|
|
label: '分配数量', |
|
|
|
prop: "productionDate", |
|
|
|
prop: 'allocatedAmount', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "有效期", |
|
|
|
label: '生产日期', |
|
|
|
prop: "expiredDate", |
|
|
|
prop: 'productionDate', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "库龄", |
|
|
|
label: '有效期', |
|
|
|
prop: "diffDate", |
|
|
|
prop: 'expiredDate', |
|
|
|
istrue: true, |
|
|
|
istrue: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '库龄', |
|
|
|
|
|
|
|
prop: 'diffDate', |
|
|
|
|
|
|
|
istrue: true |
|
|
|
|
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
tableProps: { |
|
|
|
tableProps: { |
|
|
|
"max-height": 700, |
|
|
|
'max-height': 700 |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async created() { |
|
|
|
async created() { |
|
|
|
// this.getTableHeaderCom("list_replenish", { |
|
|
|
// this.getTableHeaderCom("list_replenish", { |
|
|
|
// config: this.tableConfig, |
|
|
|
// config: this.tableConfig, |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
this.queryTable(); |
|
|
|
this.queryTable() |
|
|
|
// this.getSelect(); |
|
|
|
// this.getSelect(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 重置 |
|
|
|
// 重置 |
|
|
|
toReset() { |
|
|
|
toReset() { |
|
|
|
this.query = {}; |
|
|
|
this.query = {} |
|
|
|
this.queryTable(1); |
|
|
|
this.queryTable(1) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
// 导出 |
|
|
|
generate() { |
|
|
|
generate() { |
|
|
|
const request = { |
|
|
|
const request = { |
|
|
|
pageSize: null, |
|
|
|
pageSize: null, |
|
|
|
pageNum: null, |
|
|
|
pageNum: null, |
|
|
|
...this.query, |
|
|
|
...this.query |
|
|
|
}; |
|
|
|
} |
|
|
|
dealEmptyQueryCondition(request); |
|
|
|
dealEmptyQueryCondition(request) |
|
|
|
this.download( |
|
|
|
this.download('report/stock/exportInStock', request, `商品库存列表_${new Date().getTime()}.xlsx`) |
|
|
|
"report/stock/exportInStock", |
|
|
|
|
|
|
|
request, |
|
|
|
|
|
|
|
`商品库存列表_${new Date().getTime()}.xlsx` |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 表格数据 |
|
|
|
// 表格数据 |
|
|
|
queryTable(val) { |
|
|
|
queryTable(val) { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true |
|
|
|
this.paging.page = typeof (val) === 'undefined' ? this.paging.page : val; |
|
|
|
if (Object.prototype.toString.call(val) === '[object Object]') { |
|
|
|
|
|
|
|
// this.queryParams.pageSize = val.size |
|
|
|
|
|
|
|
this.paging.size = val.size |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.paging.page = val |
|
|
|
|
|
|
|
this.pageNum = val |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// this.paging.page = typeof val === 'undefined' ? this.paging.page : val |
|
|
|
|
|
|
|
// this.paging.page instanceof Object === true ? (this.paging.page = this.paging.page.size) : this.paging.page |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
pageSize: this.paging.size, |
|
|
|
pageSize: this.paging.size, |
|
|
|
pageNum: this.paging.page, |
|
|
|
pageNum: this.paging.page, |
|
|
|
...this.query, |
|
|
|
...this.query |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pageStockDReport(obj) |
|
|
|
pageStockDReport(obj) |
|
|
|
.then((res) => { |
|
|
|
.then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.code === 200) { |
|
|
|
this.tableData = res.rows; |
|
|
|
this.tableData = res.rows |
|
|
|
this.paging.total = res.total; |
|
|
|
this.paging.total = res.total |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下拉数据 |
|
|
|
// 下拉数据 |
|
|
|
getSelect() { |
|
|
|
getSelect() { |
|
|
|
// 仓库名称 |
|
|
|
// 仓库名称 |
|
|
|
getBranchList({ |
|
|
|
getBranchList({ |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: -1, |
|
|
|
pageSize: -1 |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
this.options = res.rows; |
|
|
|
this.options = res.rows |
|
|
|
}); |
|
|
|
}) |
|
|
|
// 库位 |
|
|
|
// 库位 |
|
|
|
storageList().then((res) => { |
|
|
|
storageList().then((res) => { |
|
|
|
this.options2 = res.data; |
|
|
|
this.options2 = res.data |
|
|
|
}); |
|
|
|
}) |
|
|
|
// 货主ID |
|
|
|
// 货主ID |
|
|
|
getConsignorList().then((res) => { |
|
|
|
getConsignorList().then((res) => { |
|
|
|
this.options3 = res.data; |
|
|
|
this.options3 = res.data |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.opt-box { |
|
|
|
.opt-box { |
|
|
|
|