销售未发货前段也好了
This commit is contained in:
@@ -17,17 +17,15 @@
|
|||||||
<Input v-model="filter.inv_std" />
|
<Input v-model="filter.inv_std" />
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
<Col span="4">
|
||||||
<Col span="5">
|
<label>时间预警</label>
|
||||||
<label>状态</label>
|
|
||||||
<div>
|
<div>
|
||||||
<Select v-model="filter.flag" multiple>
|
<Select v-model="filter.flag" multiple>
|
||||||
<Option
|
<Option
|
||||||
v-for="item in stateList"
|
v-for="item in stateList"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
>{{ item.label }}</Option
|
>{{ item.label }}</Option>
|
||||||
>
|
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
@@ -57,178 +55,217 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getInventorySale } from '@/api/pmc'
|
import { getInventorySale } from "@/api/pmc";
|
||||||
import { pageingData, export_col_to_excel, dateFormatFull, dateFormat, sortByKey } from '@/libs/tools'
|
import {
|
||||||
|
pageingData,
|
||||||
|
export_col_to_excel,
|
||||||
|
dateFormatFull,
|
||||||
|
dateFormat,
|
||||||
|
sortByKey
|
||||||
|
} from "@/libs/tools";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
PageSizeOpts: [10, 15, 20, 30],
|
PageSizeOpts: [10, 15, 20, 30],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
strfilter: '',
|
strfilter: "",
|
||||||
multiple: false,
|
multiple: false,
|
||||||
pageSize: 15,
|
pageSize: 15,
|
||||||
datas: [],
|
datas: [],
|
||||||
filter: {
|
filter: {
|
||||||
inv_codes: '',
|
inv_codes: "",
|
||||||
inv_std: '',
|
inv_std: "",
|
||||||
so_code: '',
|
so_code: "",
|
||||||
dates: [],
|
dates: [],
|
||||||
flag: []
|
flag: []
|
||||||
},
|
},
|
||||||
stateList: [
|
stateList: [
|
||||||
{
|
{
|
||||||
value: "1",
|
value: "1",
|
||||||
label: "15天内发货",
|
label: "15天内发货"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "2",
|
value: "2",
|
||||||
label: "15天以上发货",
|
label: "15天以上发货"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "3",
|
value: "3",
|
||||||
label: "超期",
|
label: "超期"
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '销售类型',
|
type: "index",
|
||||||
align: 'center',
|
title: "序号",
|
||||||
key: 'cSTName',
|
width: 65,
|
||||||
width: '120'
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '销售编号',
|
title: "客户",
|
||||||
align: 'center',
|
align: "center",
|
||||||
key: 'cSOCode',
|
key: "cCusAbbName"
|
||||||
width: '150'
|
},
|
||||||
|
{
|
||||||
|
title: "订单日期",
|
||||||
|
align: "center",
|
||||||
|
key: "dDate",
|
||||||
|
render: (h, params) => {
|
||||||
|
return <div> {dateFormat(params.row.dDate)} </div>;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "销售单号",
|
||||||
|
align: "center",
|
||||||
|
key: "cSOCode",
|
||||||
|
width: "150"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '订单日期',
|
title: "产品编码",
|
||||||
align: 'center',
|
align: "center",
|
||||||
key: 'dDate',
|
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) => {
|
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: {
|
computed: {
|
||||||
total() {
|
total() {
|
||||||
return this.datas.length
|
return this.datas.length;
|
||||||
},
|
},
|
||||||
pagedData() {
|
pagedData() {
|
||||||
return pageingData(this.datas, this.pageSize, this.pageNo)
|
return pageingData(this.datas, this.pageSize, this.pageNo);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handelExport() {
|
handelExport() {
|
||||||
export_col_to_excel(this.columns, this.datas)
|
export_col_to_excel(this.columns, this.datas);
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
this.loadData()
|
this.loadData();
|
||||||
|
},
|
||||||
|
Formatkcyl(kcyl) {
|
||||||
|
if (kcyl > 0) {
|
||||||
|
return "否";
|
||||||
|
} else {
|
||||||
|
return "是";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async loadData() {
|
async loadData() {
|
||||||
let _beginDate = null
|
let _beginDate = null;
|
||||||
let _endDate = null
|
let _endDate = null;
|
||||||
if (this.filter.dates.length == 2 && this.filter.dates[0] !== '' && this.filter.dates[0] !== '') {
|
if (
|
||||||
_beginDate = this.filter.dates[0]
|
this.filter.dates.length == 2 &&
|
||||||
_endDate = this.filter.dates[1]
|
this.filter.dates[0] !== "" &&
|
||||||
|
this.filter.dates[0] !== ""
|
||||||
|
) {
|
||||||
|
_beginDate = this.filter.dates[0];
|
||||||
|
_endDate = this.filter.dates[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
let _filert = {
|
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,
|
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,
|
begin_date: _beginDate,
|
||||||
end_date: _endDate,
|
end_date: _endDate,
|
||||||
flag: this.filter.flag
|
flag: this.filter.flag
|
||||||
|
};
|
||||||
|
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'
|
||||||
}
|
}
|
||||||
let resp = await getInventorySale(_filert)
|
}
|
||||||
this.pageNo = 1
|
else if (item.datewaring==="超期")
|
||||||
this.datas = resp.data.data
|
{
|
||||||
this.datas = sortByKey(resp.data.data, 'cSOCode')
|
item.cellClassName= {
|
||||||
|
datewaring: 'demo-table-info-cell-age'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
item.cellClassName= {
|
||||||
|
datewaring: 'demo-table-info-cell-name'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handlePagechange(page) {
|
handlePagechange(page) {
|
||||||
this.pageNo = page
|
this.pageNo = page;
|
||||||
},
|
},
|
||||||
handlePageSize(pageSize) {
|
handlePageSize(pageSize) {
|
||||||
this.pageSize = pageSize
|
this.pageSize = pageSize;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@@ -269,6 +306,19 @@ a {
|
|||||||
color: #187;
|
color: #187;
|
||||||
font-weight: 600;
|
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 {
|
body {
|
||||||
padding: 10px 1;
|
padding: 10px 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user