销售未发货前段也好了
This commit is contained in:
@@ -17,17 +17,15 @@
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
|
||||
|
||||
<Col span="5">
|
||||
<label>状态</label>
|
||||
<Col span="4">
|
||||
<label>时间预警</label>
|
||||
<div>
|
||||
<Select v-model="filter.flag" multiple>
|
||||
<Option
|
||||
v-for="item in stateList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
>{{ item.label }}</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
@@ -38,7 +36,7 @@
|
||||
</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"
|
||||
@@ -57,178 +55,217 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorySale } from '@/api/pmc'
|
||||
import { pageingData, export_col_to_excel, dateFormatFull, dateFormat, sortByKey } from '@/libs/tools'
|
||||
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: '',
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: '',
|
||||
inv_std: '',
|
||||
so_code: '',
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
dates: [],
|
||||
flag: []
|
||||
},
|
||||
stateList: [
|
||||
stateList: [
|
||||
{
|
||||
value: "1",
|
||||
label: "15天内发货",
|
||||
label: "15天内发货"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "15天以上发货",
|
||||
label: "15天以上发货"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "超期",
|
||||
},
|
||||
label: "超期"
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: '销售类型',
|
||||
align: 'center',
|
||||
key: 'cSTName',
|
||||
width: '120'
|
||||
type: "index",
|
||||
title: "序号",
|
||||
width: 65,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: '销售编号',
|
||||
align: 'center',
|
||||
key: 'cSOCode',
|
||||
width: '150'
|
||||
title: "客户",
|
||||
align: "center",
|
||||
key: "cCusAbbName"
|
||||
},
|
||||
{
|
||||
title: "订单日期",
|
||||
align: "center",
|
||||
key: "dDate",
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.dDate)} </div>;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "销售单号",
|
||||
align: "center",
|
||||
key: "cSOCode",
|
||||
width: "150"
|
||||
},
|
||||
|
||||
{
|
||||
title: '订单日期',
|
||||
align: 'center',
|
||||
key: 'dDate',
|
||||
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: "wfiQuantity"
|
||||
},
|
||||
{
|
||||
title: "库存余量",
|
||||
align: "center",
|
||||
key: "kcyl"
|
||||
},
|
||||
{
|
||||
title: "预计发货日期",
|
||||
align: "center",
|
||||
key: "dPreDate"
|
||||
},
|
||||
|
||||
{
|
||||
title: "技术要求",
|
||||
align: "center",
|
||||
key: "cMemo",
|
||||
width: "300"
|
||||
},
|
||||
{
|
||||
title: "时间预警",
|
||||
align: "center",
|
||||
key: "datewaring",
|
||||
},
|
||||
{
|
||||
title: "超期天数",
|
||||
align: "center",
|
||||
key: "jandate"
|
||||
},
|
||||
{
|
||||
title: "是否欠机",
|
||||
align: "center",
|
||||
key: "kcyl",
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.dDate)} </div>
|
||||
return <div> {this.Formatkcyl(params.row.kcyl)} </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
|
||||
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();
|
||||
},
|
||||
Formatkcyl(kcyl) {
|
||||
if (kcyl > 0) {
|
||||
return "否";
|
||||
} else {
|
||||
return "是";
|
||||
}
|
||||
},
|
||||
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 _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_codes: this.filter.so_code !== '' ? this.filter.so_code.split(/[,\s\n,]/) : null,
|
||||
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')
|
||||
};
|
||||
let resp = await getInventorySale(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "dDate");
|
||||
this.datas.forEach((item) => {
|
||||
if(item.datewaring==="15天内发货")
|
||||
{
|
||||
item.cellClassName= {
|
||||
datewaring: 'demo-table-info-cell-address'
|
||||
}
|
||||
}
|
||||
else if (item.datewaring==="超期")
|
||||
{
|
||||
item.cellClassName= {
|
||||
datewaring: 'demo-table-info-cell-age'
|
||||
}
|
||||
}
|
||||
else{
|
||||
item.cellClassName= {
|
||||
datewaring: 'demo-table-info-cell-name'
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page
|
||||
this.pageNo = page;
|
||||
},
|
||||
handlePageSize(pageSize) {
|
||||
this.pageSize = pageSize
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -269,6 +306,19 @@ a {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-info-cell-name {
|
||||
background-color: #2db7f5;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-info-cell-age {
|
||||
background-color: #ff6600;
|
||||
color: #fff;
|
||||
}
|
||||
.ivu-table .demo-table-info-cell-address {
|
||||
background-color: #187;
|
||||
color: #fff;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user