修改接口参数
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
<h4>销售订单表</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="8">
|
||||
<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>
|
||||
@@ -11,33 +16,27 @@
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>销售订单表</label>
|
||||
<Input v-model="filter.so_code" />
|
||||
|
||||
<Col span="3">
|
||||
<label>期间</label>
|
||||
<div>
|
||||
<DatePicker v-model="filter.dates" type="daterange"></DatePicker>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>状态</label>
|
||||
<div>
|
||||
<Checkbox v-model="filter.by_finish">包含已经交货</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
|
||||
>
|
||||
<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>
|
||||
<Table style="margin-top: 20px" size="small" border :columns="columns" :data="pagedData"> </Table>
|
||||
|
||||
<Page
|
||||
style="margin-top: 20px"
|
||||
@@ -56,157 +55,159 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorysocode } from "@/api/pmc";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
} from "@/libs/tools";
|
||||
import { getInventorysocode } 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: "",
|
||||
strfilter: '',
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: '',
|
||||
dates: [],
|
||||
by_finish: false
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "销售类型",
|
||||
align: "center",
|
||||
key: "cSTName",
|
||||
width: "120",
|
||||
title: '销售类型',
|
||||
align: 'center',
|
||||
key: 'cSTName',
|
||||
width: '120'
|
||||
},
|
||||
{
|
||||
title: "销售编号",
|
||||
align: "center",
|
||||
key: "cSOCode",
|
||||
width: "150",
|
||||
title: '销售编号',
|
||||
align: 'center',
|
||||
key: 'cSOCode',
|
||||
width: '150'
|
||||
},
|
||||
|
||||
{
|
||||
title: "订单日期",
|
||||
align: "center",
|
||||
key: "dDate",
|
||||
title: '订单日期',
|
||||
align: 'center',
|
||||
key: 'dDate',
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.dDate)} </div>;
|
||||
},
|
||||
return <div> {dateFormat(params.row.dDate)} </div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "行号",
|
||||
align: "center",
|
||||
key: "iRowNo",
|
||||
width: "80",
|
||||
title: '行号',
|
||||
align: 'center',
|
||||
key: 'iRowNo',
|
||||
width: '80'
|
||||
},
|
||||
{
|
||||
title: "客户名称",
|
||||
align: "center",
|
||||
key: "cCusAbbName",
|
||||
title: '客户名称',
|
||||
align: 'center',
|
||||
key: 'cCusAbbName'
|
||||
},
|
||||
{
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "cInvCode",
|
||||
className: "demo-table-info-new",
|
||||
title: '产品编码',
|
||||
align: 'center',
|
||||
key: 'cInvCode',
|
||||
className: 'demo-table-info-new'
|
||||
},
|
||||
{
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
title: '产品名称',
|
||||
align: 'center',
|
||||
key: 'cInvName'
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cInvStd",
|
||||
width: "220",
|
||||
title: '规格型号',
|
||||
align: 'center',
|
||||
key: 'cInvStd',
|
||||
width: '220'
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
align: "center",
|
||||
key: "iQuantity",
|
||||
title: '订单数',
|
||||
align: 'center',
|
||||
key: 'iQuantity'
|
||||
},
|
||||
{
|
||||
title: "发货时间",
|
||||
align: "center",
|
||||
key: "fhdDate",
|
||||
title: '发货时间',
|
||||
align: 'center',
|
||||
key: 'fhdDate',
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.fhdDate)} </div>;
|
||||
},
|
||||
return <div> {dateFormat(params.row.fhdDate)} </div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "发货数量",
|
||||
align: "center",
|
||||
key: "fqty",
|
||||
title: '发货数量',
|
||||
align: 'center',
|
||||
key: 'fqty'
|
||||
},
|
||||
{
|
||||
title: "出库数量",
|
||||
align: "center",
|
||||
key: "cqty",
|
||||
title: '出库数量',
|
||||
align: 'center',
|
||||
key: 'cqty'
|
||||
},
|
||||
{
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "qty",
|
||||
title: '现存量',
|
||||
align: 'center',
|
||||
key: 'qty'
|
||||
},
|
||||
{
|
||||
title: "在制量",
|
||||
align: "center",
|
||||
key: "momqty",
|
||||
},
|
||||
],
|
||||
};
|
||||
title: '在制量',
|
||||
align: 'center',
|
||||
key: 'momqty'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.datas.length;
|
||||
return this.datas.length
|
||||
},
|
||||
pagedData() {
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||
},
|
||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
handelExport() {
|
||||
export_col_to_excel(this.columns, this.datas);
|
||||
export_col_to_excel(this.columns, this.datas)
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
|
||||
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_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n,]/) : null,
|
||||
inv_std: this.filter.inv_std,
|
||||
so_code: this.filter.so_code,
|
||||
};
|
||||
let resp = await getInventorysocode(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas =resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "cSOCode");
|
||||
so_codes: this.filter.so_code !== '' ? this.filter.so_code.split(/[,\s\n,]/) : null,
|
||||
begin_date: _beginDate,
|
||||
end_date: _endDate,
|
||||
by_finish: this.filter.by_finish
|
||||
}
|
||||
let resp = await getInventorysocode(_filert)
|
||||
this.pageNo = 1
|
||||
this.datas = resp.data.data
|
||||
this.datas = sortByKey(resp.data.data, 'cSOCode')
|
||||
},
|
||||
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page;
|
||||
this.pageNo = page
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
},
|
||||
},
|
||||
};
|
||||
this.pageSize = pageSize
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user