master
Mr.sun 2 years ago
parent 7cf9f75adb
commit fa5f21a854
  1. 231
      src/views/businessQuery/commodityInventory/index.vue

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

Loading…
Cancel
Save