增加 子件领料报表
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
<MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem>
|
||||
<MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem>
|
||||
<MenuItem to="/inventoryMaterialAppVouch" name="4-4">领料单查询</MenuItem>
|
||||
<MenuItem to="/inventorypick" name="4-5">生产领料需求查询</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
|
||||
@@ -17,4 +17,7 @@ export const getInventorybu=(info)=>{
|
||||
export const getInventorypo=(info)=>{
|
||||
return axios.post('/api/Pmc/InventoryPocode',info)
|
||||
}
|
||||
export const getPick=(info)=>{
|
||||
return axios.post('/api/ProductOrder/Pick',info)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import Purchasesum from '@/views/Purchasesum.vue'
|
||||
import inventoryrrival from '@/bill/inventory-arrival.vue'
|
||||
import inventoryerror from '@/bill/inventory-error.vue'
|
||||
import inventoryMaterialAppVouch from '@/views/inventory-materialAppVouch.vue'
|
||||
import inventorypick from '@/views/inventory-pick.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -31,4 +32,5 @@ export default [
|
||||
{ path: '/inventoryrrival', component: inventoryrrival },
|
||||
{ path: '/inventoryerror', component: inventoryerror },
|
||||
{ path: '/inventoryMaterialAppVouch', component: inventoryMaterialAppVouch },
|
||||
{ path: '/inventorypick', component: inventorypick },
|
||||
]
|
||||
|
||||
542
NX.ERP.Webapp/src/views/inventory-pick.vue
Normal file
542
NX.ERP.Webapp/src/views/inventory-pick.vue
Normal file
@@ -0,0 +1,542 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>生产子件需求</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>订单编号</label>
|
||||
<Input autosize type="textarea" v-model="filter.mo_codes" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>产品编码</label>
|
||||
<Input autosize type="textarea" v-model="filter.inv_codes" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>子件编码</label>
|
||||
<Input autosize type="textarea" v-model="filter.inv_codes1" />
|
||||
</Col>
|
||||
|
||||
<Col span="3">
|
||||
<label>状态</label>
|
||||
<div>
|
||||
<Select v-model="filter.by_finish" multiple>
|
||||
<Option
|
||||
v-for="item in stateList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<Button size="large" type="primary" icon="ios-search" @click="handleClick">查询</Button>
|
||||
<Button size="large" type="success" @click="handelExport">导出</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="15">
|
||||
<label>提示:点击蓝色单号,打印整单子件需求,点击产品号打印部装需求</label>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
></Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
:current="pageNo"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
:page-size-opts="PageSizeOpts"
|
||||
@on-change="handlePagechange"
|
||||
@on-page-size-change="handlePageSize"
|
||||
show-elevator
|
||||
show-sizer
|
||||
show-total
|
||||
size="small"
|
||||
/>
|
||||
|
||||
<Modal width="1366" v-model="modal1" title="单据详情" @on-cancel="cancel">
|
||||
<Button size="large" type="primary" @click="print">打印</Button>
|
||||
<div id="tb2">
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="7">
|
||||
<label></label>
|
||||
</Col>
|
||||
<Col span="6">
|
||||
<h1>生产子件需求</h1>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="8">{{"单据号:"+this.ccode}}</Col>
|
||||
<Col span="6">
|
||||
{{"产品编码:"+this.inv_code}}
|
||||
</Col>
|
||||
<Col span="4">
|
||||
{{"产品名称:"+this.c_inv_name}}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
height="700"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns2"
|
||||
:data="datas2"
|
||||
></Table>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPick } from "@/api/pmc";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
sortByKey,
|
||||
numberFormat
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
modal1: false,
|
||||
strfilter: "",
|
||||
ccode: "",
|
||||
inv_code: "",
|
||||
c_inv_name: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
datas2: [],
|
||||
ranges: [
|
||||
{
|
||||
type: "price",
|
||||
ccode: "",
|
||||
inv_code: ""
|
||||
|
||||
// low: "", //区间的最小值
|
||||
// height: "", //区间的最大值
|
||||
}
|
||||
],
|
||||
stateList: [
|
||||
{
|
||||
value: "2",
|
||||
label: "锁定"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "审核"
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "关闭"
|
||||
}
|
||||
],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_codes1: "",
|
||||
mo_codes: "",
|
||||
by_finish: ["3"],
|
||||
byiss: false
|
||||
},
|
||||
columns2: [
|
||||
{
|
||||
title: "子件编码",
|
||||
align: "center",
|
||||
width: 100,
|
||||
key: "invcode1",
|
||||
className: "demo-table-info-old"
|
||||
},
|
||||
{
|
||||
title: "子件名称",
|
||||
align: "center",
|
||||
width: 110,
|
||||
key: "cinvname1",
|
||||
className: "demo-table-info-old"
|
||||
},
|
||||
{
|
||||
title: "子件规格",
|
||||
width: 175,
|
||||
align: "center",
|
||||
key: "cinvstd1"
|
||||
},
|
||||
{
|
||||
title: "子件单位",
|
||||
width: 100,
|
||||
align: "center",
|
||||
key: "c_com_unit_name1"
|
||||
},
|
||||
|
||||
{
|
||||
title: "应领量",
|
||||
align: "center",
|
||||
key: "qty1",
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: "已领",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: "未领",
|
||||
align: "center",
|
||||
key: "wll",
|
||||
width: 110
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "c_pos_name",
|
||||
width: 160,
|
||||
align: "left"
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
// {
|
||||
// title: "生产订单号",
|
||||
// align: "center",
|
||||
// key: "mocode",
|
||||
|
||||
// width: 135,
|
||||
// className: "demo-table-info-new"
|
||||
// },
|
||||
{
|
||||
title: "生产订单号",
|
||||
align: "center",
|
||||
key: "mocode",
|
||||
width: 135,
|
||||
className: "demo-table-info-new",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.mocode //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow(params.row.mocode, ""); //点击事件
|
||||
}
|
||||
}
|
||||
},
|
||||
params.row.mocode
|
||||
)
|
||||
]);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "子件编码",
|
||||
align: "center",
|
||||
width: 100,
|
||||
key: "invcode1",
|
||||
|
||||
},
|
||||
{
|
||||
title: "子件名称",
|
||||
align: "center",
|
||||
width: 110,
|
||||
key: "cinvname1",
|
||||
|
||||
},
|
||||
{
|
||||
title: "子件规格",
|
||||
width: 175,
|
||||
align: "center",
|
||||
key: "cinvstd1"
|
||||
},
|
||||
{
|
||||
title: "子件单位",
|
||||
width: 100,
|
||||
align: "center",
|
||||
key: "c_com_unit_name1"
|
||||
},
|
||||
|
||||
{
|
||||
title: "应领量",
|
||||
align: "center",
|
||||
key: "qty1",
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: "已领",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: "未领",
|
||||
align: "center",
|
||||
key: "wll",
|
||||
width: 110
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "c_pos_name",
|
||||
width: 160,
|
||||
align: "left"
|
||||
},
|
||||
{
|
||||
title: "生产行号",
|
||||
align: "center",
|
||||
key: "sort_seq",
|
||||
|
||||
width: 95
|
||||
},
|
||||
{
|
||||
title: "类别",
|
||||
align: "center",
|
||||
key: "description",
|
||||
|
||||
width: 95
|
||||
},
|
||||
|
||||
// {
|
||||
// title: "产品编码",
|
||||
// align: "center",
|
||||
// key: "inv_code",
|
||||
// width: 100,
|
||||
|
||||
// className: "demo-table-info-new"
|
||||
// },
|
||||
{
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "inv_code",
|
||||
width: 135,
|
||||
className: "demo-table-info-old",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.inv_code //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow(params.row.mocode, params.row.inv_code); //点击事件
|
||||
}
|
||||
}
|
||||
},
|
||||
params.row.inv_code
|
||||
)
|
||||
]);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "c_inv_name",
|
||||
width: 100,
|
||||
|
||||
className: "demo-table-info-new"
|
||||
},
|
||||
{
|
||||
title: "产品规格",
|
||||
align: "center",
|
||||
key: "c_inv_std",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "c_com_unit_name",
|
||||
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
title: "投产量",
|
||||
align: "center",
|
||||
key: "qty",
|
||||
width: 60
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length;
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
},
|
||||
async loadData() {
|
||||
try {
|
||||
let _filert = {
|
||||
inv_codes:
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
inv_codes1:
|
||||
this.filter.inv_codes1 !== ""
|
||||
? this.filter.inv_codes1.split(/[,\s\n,]/)
|
||||
: null,
|
||||
mo_codes:
|
||||
this.filter.mo_codes !== ""
|
||||
? this.filter.mo_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
by_finish: this.filter.by_finish,
|
||||
byiss: this.filter.byiss
|
||||
};
|
||||
this.loading = true;
|
||||
let resp = await getPick(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
} catch (error) {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
this.dom = document.getElementById("tb2");
|
||||
|
||||
console.log(this.dom);
|
||||
this.$print(this.dom);
|
||||
},
|
||||
cancel() {
|
||||
this.datas2 = [];
|
||||
this.modal1 = false;
|
||||
},
|
||||
inventory(ranges) {
|
||||
const skus = new Array();
|
||||
//筛选条件
|
||||
if (this.ranges[0].inv_code != "") {
|
||||
this.datas.map((Item, index) => {
|
||||
if (
|
||||
Item.mocode == this.ranges[0].ccode &&
|
||||
Item.inv_code == this.ranges[0].inv_code
|
||||
) {
|
||||
skus.push({
|
||||
...Item
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.datas.map((Item, index) => {
|
||||
if (Item.mocode == this.ranges[0].ccode) {
|
||||
skus.push({
|
||||
...Item
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return skus;
|
||||
},
|
||||
|
||||
async handleShow(h, y) {
|
||||
this.ranges[0].ccode = h;
|
||||
this.ranges[0].inv_code = y;
|
||||
this.datas2 = this.inventory(this.ranges);
|
||||
this.ccode = h;
|
||||
this.inv_code=this.datas2[0].inv_code;
|
||||
this.c_inv_name=this.datas2[0].c_inv_name;
|
||||
this.modal1 = true;
|
||||
},
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style >
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-row td {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-error-row td {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-old {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
||||
.ivu-table td.demo-table-info-new {
|
||||
color: #ff6600;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user