247 lines
4.8 KiB
Vue
247 lines
4.8 KiB
Vue
|
|
<template>
|
|||
|
|
<div>
|
|||
|
|
<h4>补料查询表</h4>
|
|||
|
|
<div>
|
|||
|
|
<Row :gutter="16">
|
|||
|
|
<Col span="4">
|
|||
|
|
<label>产品编码及数量(示例:905006,3,903001,2)</label>
|
|||
|
|
<Input autosize type="textarea" v-model="filter.inumsc" />
|
|||
|
|
</Col>
|
|||
|
|
|
|||
|
|
<Col span="3">
|
|||
|
|
<label>状态</label>
|
|||
|
|
<div>
|
|||
|
|
<Checkbox v-model="filter.outycl">去除原材料</Checkbox>
|
|||
|
|
</div>
|
|||
|
|
</Col>
|
|||
|
|
<Col span="3">
|
|||
|
|
<label>状态</label>
|
|||
|
|
<div>
|
|||
|
|
<Checkbox v-model="filter.outbcp">去除半成品</Checkbox>
|
|||
|
|
</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>
|
|||
|
|
|
|||
|
|
<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"
|
|||
|
|
/>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { getInventorybu } from "@/api/pmc";
|
|||
|
|
import {
|
|||
|
|
pageingData,
|
|||
|
|
export_col_to_excel,
|
|||
|
|
dateFormatFull,
|
|||
|
|
dateFormat,
|
|||
|
|
sortByKey,
|
|||
|
|
} from "@/libs/tools";
|
|||
|
|
export default {
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
loading: false,
|
|||
|
|
PageSizeOpts: [10, 15, 20, 30],
|
|||
|
|
pageNo: 1,
|
|||
|
|
strfilter: "",
|
|||
|
|
multiple: false,
|
|||
|
|
pageSize: 15,
|
|||
|
|
datas: [],
|
|||
|
|
filter: {
|
|||
|
|
inumsc: "",
|
|||
|
|
dates: [],
|
|||
|
|
outycl: false,
|
|||
|
|
outbcp: false,
|
|||
|
|
},
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
title: "产品编码",
|
|||
|
|
align: "center",
|
|||
|
|
key: "invcode1",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "产品名称",
|
|||
|
|
align: "center",
|
|||
|
|
key: "invname1",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "产品型号",
|
|||
|
|
align: "center",
|
|||
|
|
key: "anItemSpec",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "子件编码",
|
|||
|
|
align: "center",
|
|||
|
|
key: "invcode2",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "子件名称",
|
|||
|
|
align: "center",
|
|||
|
|
key: "invname2",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "供应类型",
|
|||
|
|
align: "center",
|
|||
|
|
key: "gytype",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "使用数量",
|
|||
|
|
align: "center",
|
|||
|
|
key: "sysl",
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "当前库存",
|
|||
|
|
align: "center",
|
|||
|
|
key: "dqkc",
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "子件需求量",
|
|||
|
|
align: "center",
|
|||
|
|
key: "zjxql",
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "补料量",
|
|||
|
|
align: "center",
|
|||
|
|
key: "bll",
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "采购在途",
|
|||
|
|
align: "center",
|
|||
|
|
key: "cgzt",
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
title: "委外在途",
|
|||
|
|
align: "center",
|
|||
|
|
key: "wwzt",
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
computed: {
|
|||
|
|
total() {
|
|||
|
|
return this.datas.length;
|
|||
|
|
},
|
|||
|
|
pagedData() {
|
|||
|
|
return pageingData(this.datas, this.pageSize, this.pageNo);
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
mounted() {},
|
|||
|
|
methods: {
|
|||
|
|
handelExport() {
|
|||
|
|
export_col_to_excel(this.columns, this.datas);
|
|||
|
|
},
|
|||
|
|
handleClick() {
|
|||
|
|
this.loadData();
|
|||
|
|
},
|
|||
|
|
async loadData() {
|
|||
|
|
try {
|
|||
|
|
let _filert = {
|
|||
|
|
inumsc:
|
|||
|
|
this.filter.inumsc !== ""
|
|||
|
|
? this.filter.inumsc.split(/[,\s\n,]/)
|
|||
|
|
: null,
|
|||
|
|
outycl: this.filter.outycl,
|
|||
|
|
outbcp: this.filter.outbcp,
|
|||
|
|
};
|
|||
|
|
this.loading=true;
|
|||
|
|
let resp = await getInventorybu(_filert);
|
|||
|
|
this.pageNo = 1;
|
|||
|
|
this.datas = resp.data.data;
|
|||
|
|
// this.datas = sortByKey(resp.data.data, "cSOCode");
|
|||
|
|
}catch (error) {}
|
|||
|
|
finally{this.loading=false;}
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
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>
|