1
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<MenuGroup title="单据">
|
||||
<MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem>
|
||||
<MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem>
|
||||
|
||||
<MenuItem to="/inventoryMaterialAppVouch" name="4-4">领料单查询</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
|
||||
6
NX.ERP.Webapp/src/api/materialAppVouch.js
Normal file
6
NX.ERP.Webapp/src/api/materialAppVouch.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import axios from 'axios'
|
||||
|
||||
//查询领料列表带库位
|
||||
export const getListAndPost = (info) => {
|
||||
return axios.post('/api/MaterialApp/ListAndPost', info)
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import inventorypoc from '@/views/inventory-poc.vue'
|
||||
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'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -29,4 +30,5 @@ export default [
|
||||
{ path: '/Purchasesum', component: Purchasesum },
|
||||
{ path: '/inventoryrrival', component: inventoryrrival },
|
||||
{ path: '/inventoryerror', component: inventoryerror },
|
||||
{ path: '/inventoryMaterialAppVouch', component: inventoryMaterialAppVouch },
|
||||
]
|
||||
|
||||
@@ -170,6 +170,11 @@ export default {
|
||||
align: "center",
|
||||
key: "iUnitCost",
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
align: "center",
|
||||
key: "csnmemo",
|
||||
},
|
||||
{
|
||||
title: "出库库单号",
|
||||
align: "center",
|
||||
|
||||
485
NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue
Normal file
485
NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue
Normal file
@@ -0,0 +1,485 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>领料单</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>领料单号</label>
|
||||
<Input autosize type="textarea" v-model="filter.app_vouch_order_no" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>物料编号</label>
|
||||
<Input v-model="filter.material_code" />
|
||||
</Col>
|
||||
<Col span="6">
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@click="handleClick"
|
||||
>查询</Button
|
||||
>
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
<Button size="large" type="info" @click="print"
|
||||
>打印</Button
|
||||
>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div id="tb">
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
:loading="loading"
|
||||
size="small"
|
||||
border
|
||||
:columns="columnsMaterialAppVouch"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
</div>
|
||||
<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.ArrivalDate}}
|
||||
</Col>
|
||||
<Col span="4">
|
||||
{{"业务员:"+this.cpersonname}}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
height="700"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns2"
|
||||
:data="datas2"
|
||||
>
|
||||
</Table>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//import vUpLoad from "@/bill/PrintView";
|
||||
import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
|
||||
import {getListAndPost} from "../api/materialAppVouch";
|
||||
export default {
|
||||
//components:{vUpLoad},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
modal1: false,
|
||||
printing: false,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
ccode:"",
|
||||
ArrivalDate:"",
|
||||
cpersonname:"",
|
||||
datas2: [],
|
||||
filter: {
|
||||
app_vouch_order_no: "",
|
||||
material_code: "",
|
||||
},
|
||||
dom: "",
|
||||
ranges: [
|
||||
{
|
||||
type: "price",
|
||||
ccode: "",
|
||||
// low: "", //区间的最小值
|
||||
// height: "", //区间的最大值
|
||||
},
|
||||
],
|
||||
columnsMaterialAppVouch: [
|
||||
// {
|
||||
// type: "index",
|
||||
// title: "序号",
|
||||
// width: 60,
|
||||
// align: "center",
|
||||
// },
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "material_code",
|
||||
width: 110,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "material_name",
|
||||
width: 130,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "material_spec",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "unit",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "数量",
|
||||
align: "center",
|
||||
key: "qty",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "position",
|
||||
width: 160,
|
||||
align: "left",
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "需求日期",
|
||||
align: "center",
|
||||
key: "demand_date",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "仓库",
|
||||
align: "center",
|
||||
key: "warehouse_name",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "领料单号",
|
||||
align: "center",
|
||||
key: "app_vouch_order_no",
|
||||
width: 150,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: "生产单号",
|
||||
align: "center",
|
||||
key: "product_order_no",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "行号",
|
||||
align: "center",
|
||||
key: "product_order_line_no",
|
||||
width: 70,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "product_code",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "product_name",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品规格",
|
||||
align: "product_spec",
|
||||
key: "Quantity",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: "到货单号",
|
||||
align: "center",
|
||||
key: "ArrivalCode",
|
||||
|
||||
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.ArrivalCode, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow(params.row.ArrivalCode); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.ArrivalCode
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "到货日期",
|
||||
align: "center",
|
||||
key: "ArrivalDate",
|
||||
},
|
||||
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cpersonname",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "MaterialCode",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "cinvm_unit",
|
||||
},
|
||||
|
||||
{
|
||||
title: "到货数量",
|
||||
align: "center",
|
||||
key: "Quantity",
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存库位",
|
||||
align: "center",
|
||||
key: "cPosName",
|
||||
width: 200,
|
||||
},
|
||||
],
|
||||
columns2: [
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "MaterialCode",
|
||||
width: 110,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
width: 130,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
width: 135,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "cinvm_unit",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "数量",
|
||||
align: "center",
|
||||
key: "Quantity",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "cPosName",
|
||||
width: 160,
|
||||
align: "left",
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
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.columnsMaterialAppVouch, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
},
|
||||
print() {
|
||||
this.dom = document.getElementById("tb");
|
||||
|
||||
// console.log(this.dom);
|
||||
this.$print(this.dom);
|
||||
},
|
||||
inventory(ranges) {
|
||||
const skus = new Array();
|
||||
//筛选条件
|
||||
this.datas.map((Item, index) => {
|
||||
if (Item.ArrivalCode == this.ranges[0].ccode) {
|
||||
skus.push({
|
||||
...Item,
|
||||
});
|
||||
}
|
||||
});
|
||||
return skus;
|
||||
},
|
||||
cancel() {
|
||||
this.datas2 = [];
|
||||
this.modal1 = false;
|
||||
},
|
||||
|
||||
async handleShow(h) {
|
||||
this.ranges[0].ccode = h;
|
||||
this.datas2 = this.inventory(this.ranges);
|
||||
this.ccode=h;
|
||||
this.ArrivalDate=this.datas2[0].ArrivalDate;
|
||||
this.cpersonname=this.datas2[0].cpersonname;
|
||||
|
||||
|
||||
this.modal1 = true;
|
||||
},
|
||||
|
||||
async loadData() {
|
||||
try {
|
||||
this.loading = true;
|
||||
let resp = await getListAndPost(this.filter);
|
||||
|
||||
this.pageNo = 1;
|
||||
this.datas = sortByKey(resp.data.data, "app_vouch_order_no");
|
||||
// this.datas = resp.data.data;
|
||||
} 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;
|
||||
font-size: 12px;
|
||||
}
|
||||
.ivu-table td.demo-table-info-nom {
|
||||
font-size: 11px;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -50,6 +50,18 @@
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="15">
|
||||
<label></label>
|
||||
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>默认不勾选查应领大于已领量,勾选则已领>0</label>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
|
||||
Reference in New Issue
Block a user