This commit is contained in:
杰 朱
2021-10-19 16:05:46 +08:00
parent 2249de273f
commit f1e2488b6d
6 changed files with 286 additions and 5 deletions

View File

@@ -11,11 +11,12 @@
<MenuItem to="/inventoryMom" name="3-3">跟单记录表</MenuItem>
<MenuItem to="/InventoryMonth" name="3-4">材料出库数据与品种</MenuItem>
<MenuItem to="/InventorySo" name="3-5">销售订单表</MenuItem> -->
<MenuItem to="/inventorysale" name="3-5">销售未发明细表</MenuItem>
<MenuItem to="/inventory-SNDetail" name="3-6">序列号查询</MenuItem>
<MenuItem to="/inventorybu" name="3-7">补料量查询</MenuItem>
<!-- <MenuItem to="/inventorypo" name="3-8">采购订单列表(PMC)</MenuItem> -->
<MenuItem to="/inventorypoc" name="3-9">采购跟进表(采购部)</MenuItem>
<MenuItem to="/Purchasesum" name="3-99">采购查询汇总</MenuItem>
<MenuItem to="/Purchasesum" name="3-99">采购查询汇总</MenuItem>
</MenuGroup>
</Submenu>
<Submenu name="4">

View File

@@ -11,6 +11,9 @@ export const getInventorymonth=(info)=>{
export const getInventorysocode=(info)=>{
return axios.post('/api/Pmc/Inventorysocode',info)
}
export const getInventorySale=(info)=>{
return axios.post('/api/Pmc/InventorySale',info)
}
export const getInventorybu=(info)=>{
return axios.post('/api/Pmc/Inventorybu',info)
}

View File

@@ -13,6 +13,7 @@ import inventoryerror from '@/bill/inventory-error.vue'
import inventoryMaterialAppVouch from '@/views/inventory-materialAppVouch.vue'
import inventorypick from '@/views/inventory-pick.vue'
import inventoryQmerror from '@/views/inventory-Qmerror.vue'
import inventorysale from '@/views/inventory-sale.vue'
export default [
{
@@ -26,6 +27,7 @@ export default [
{ path: '/InventoryMonth', component: InventoryMonth },
{ path: '/inventory-SNDetail', component: inventorySNDetail },
{ path: '/InventorySo', component: InventorySo },
{ path: '/inventorysale', component: inventorysale },
{ path: '/inventorybu', component: inventorybu },
{ path: '/inventorypo', component: inventorypo },
{ path: '/inventorypoc', component: inventorypoc },

View File

@@ -0,0 +1,275 @@
<template>
<div>
<h4>销售订单表</h4>
<div>
<Row :gutter="16">
<Col span="4">
<label>销售订单编号</label>
<Input v-model="filter.so_code" />
</Col>
<Col span="4">
<label>物料编号</label>
<Input autosize type="textarea" v-model="filter.inv_codes" />
</Col>
<Col span="4">
<label>规格</label>
<Input v-model="filter.inv_std" />
</Col>
<Col span="5">
<label>状态</label>
<div>
<Select v-model="filter.flag" 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>
<Table style="margin-top: 20px" size="small" 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 { getInventorySale } from '@/api/pmc'
import { pageingData, export_col_to_excel, dateFormatFull, dateFormat, sortByKey } from '@/libs/tools'
export default {
data() {
return {
PageSizeOpts: [10, 15, 20, 30],
pageNo: 1,
strfilter: '',
multiple: false,
pageSize: 15,
datas: [],
filter: {
inv_codes: '',
inv_std: '',
so_code: '',
dates: [],
flag: []
},
stateList: [
{
value: "1",
label: "15天内发货",
},
{
value: "2",
label: "15天以上发货",
},
{
value: "3",
label: "超期",
},
],
columns: [
{
title: '销售类型',
align: 'center',
key: 'cSTName',
width: '120'
},
{
title: '销售编号',
align: 'center',
key: 'cSOCode',
width: '150'
},
{
title: '订单日期',
align: 'center',
key: 'dDate',
render: (h, params) => {
return <div> {dateFormat(params.row.dDate)} </div>
}
},
{
title: '行号',
align: 'center',
key: 'iRowNo',
width: '80'
},
{
title: '客户名称',
align: 'center',
key: 'cCusAbbName'
},
{
title: '产品编码',
align: 'center',
key: 'cInvCode',
className: 'demo-table-info-new'
},
{
title: '产品名称',
align: 'center',
key: 'cInvName'
},
{
title: '规格型号',
align: 'center',
key: 'cInvStd',
width: '220'
},
{
title: '订单数',
align: 'center',
key: 'iQuantity'
},
{
title: '预计发货日期',
align: 'center',
key: 'dPreDate'
},
{
title: '发货日期',
align: 'center',
key: 'fhdDate',
render: (h, params) => {
return <div> {dateFormat(params.row.fhdDate)} </div>
}
},
{
title: '发货数量',
align: 'center',
key: 'fqty'
},
{
title: '出库数量',
align: 'center',
key: 'cqty'
},
{
title: '现存量',
align: 'center',
key: 'qty'
},
{
title: '在制量',
align: 'center',
key: 'momqty'
}
]
}
},
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() {
let _beginDate = null
let _endDate = null
if (this.filter.dates.length == 2 && this.filter.dates[0] !== '' && this.filter.dates[0] !== '') {
_beginDate = this.filter.dates[0]
_endDate = this.filter.dates[1]
}
let _filert = {
inv_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n,]/) : null,
inv_std: this.filter.inv_std,
so_codes: this.filter.so_code !== '' ? this.filter.so_code.split(/[,\s\n,]/) : null,
begin_date: _beginDate,
end_date: _endDate,
flag: this.filter.flag
}
let resp = await getInventorySale(_filert)
this.pageNo = 1
this.datas = resp.data.data
this.datas = sortByKey(resp.data.data, 'cSOCode')
},
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>

View File

@@ -58,8 +58,8 @@ module.exports = {
disableHostCheck: true,
proxy: {
'/api': {
target: 'http://10.0.0.250:8081', // 接口域名
// target: 'http://localhost:61448', // 接口域名
// target: 'http://10.0.0.250:8081', // 接口域名
target: 'http://localhost:61448', // 接口域名
changeOrigin: true, // 是否跨域
pathRewrite: {}
},