diff --git a/NX.ERP.Webapp/src/views/FilterTable.vue b/NX.ERP.Webapp/src/views/FilterTable.vue
index 3dfe052..580bad1 100644
--- a/NX.ERP.Webapp/src/views/FilterTable.vue
+++ b/NX.ERP.Webapp/src/views/FilterTable.vue
@@ -5,10 +5,10 @@
@@ -20,7 +20,9 @@ export default {
name: "FilterTable",
props: {
columns: Array, //列描述数据对象
- data: Array //表格数据
+ data: Array, //表格数据
+ wf: Number
+
},
computed: {
/*
@@ -237,6 +239,15 @@ export default {
};
return;
}
+ if (column.wfsum == true) {
+ console.log(this.wf)
+ sums[key] = {
+ key,
+ value: this.wf
+ };
+ return;
+ }
+
if (column.issum != true) {
sums[key] = {
key,
diff --git a/NX.ERP.Webapp/src/views/inventory-sale copy.vue b/NX.ERP.Webapp/src/views/inventory-sale copy.vue
new file mode 100644
index 0000000..6cf2a47
--- /dev/null
+++ b/NX.ERP.Webapp/src/views/inventory-sale copy.vue
@@ -0,0 +1,552 @@
+
+
+
销售未发货明细表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NX.ERP.Webapp/src/views/inventory-sale.vue b/NX.ERP.Webapp/src/views/inventory-sale.vue
index 6c431dc..4522a6d 100644
--- a/NX.ERP.Webapp/src/views/inventory-sale.vue
+++ b/NX.ERP.Webapp/src/views/inventory-sale.vue
@@ -49,7 +49,7 @@
-
+
import { getInventorySale } from "@/api/pmc";
+import debounce from "lodash/debounce";
import FilterTable from "./FilterTable";
import {
pageingData,
@@ -88,6 +89,11 @@ const isqj = {
value: 2,
name: "否",
color: "green"
+ },
+ 3: {
+ value: 3,
+ name: "全",
+ color: "blue"
}
};
const stateListq = {
@@ -112,7 +118,10 @@ export default {
pageNo: 1,
strfilter: "",
multiple: false,
+ searchText: {},
pageSize: 9999,
+ temp: 1,
+ qhsum:0,
datas: [],
filter: {
inv_codes: "",
@@ -145,7 +154,7 @@ export default {
{
title: "客户",
align: "center",
- key: "cCusAbbName",
+ key: "c_cus_abb_name",
width: 145,
filter: {
type: "AutoComplete"
@@ -154,10 +163,10 @@ export default {
{
title: "订单日期",
align: "center",
- width: 145,
- key: "dDate",
+ width: 140,
+ key: "d_date",
render: (h, params) => {
- return {dateFormat(params.row.dDate)}
;
+ return {dateFormat(params.row.d_date)}
;
},
filter: {
type: "DatePicker"
@@ -166,7 +175,7 @@ export default {
{
title: "销售单号",
align: "center",
- key: "cSOCode",
+ key: "c_so_code",
width: "160",
filter: {
type: "AutoComplete"
@@ -176,18 +185,18 @@ export default {
{
title: "产品编码",
align: "center",
- key: "cInvCode",
+ key: "c_inv_code",
width: "120",
className: "demo-table-info-new",
filter: {
- type: "Input"
+ type: "AutoComplete"
}
},
{
title: "产品名称",
align: "center",
width: "150",
- key: "cInvName",
+ key: "c_inv_name",
filter: {
type: "AutoComplete"
}
@@ -195,27 +204,18 @@ export default {
{
title: "规格型号",
align: "center",
- key: "cInvStd",
- width: "220",
+ key: "c_inv_std",
+ width: "180",
filter: {
- type: "AutoComplete",
- }
+ type: "AutoComplete"
+ }
},
{
title: "未发数量",
align: "center",
- width: "120",
- issum:true,
- key: "wfiQuantity",
- filter: {
- type: "Input"
- }
- },
- {
- title: "欠货量",
- align: "center",
- width: "120",
- key: "kcyl",
+ width: "100",
+ issum: true,
+ key: "wfi_quantity",
filter: {
type: "Input"
}
@@ -223,17 +223,27 @@ export default {
{
title: "现存量",
align: "center",
- width: "120",
+ width: "100",
key: "xcl",
filter: {
type: "Input"
}
},
+ {
+ title: "欠货量",
+ align: "center",
+ width: "100",
+ wfsum: true,
+ key: "kcyl",
+ filter: {
+ type: "Input"
+ }
+ },
{
title: "预计发货日期",
align: "center",
- width: 145,
- key: "dPreDate",
+ width: 140,
+ key: "d_pre_date",
filter: {
type: "DatePicker"
}
@@ -242,8 +252,8 @@ export default {
{
title: "技术要求",
align: "center",
- key: "cMemo",
- width: "300",
+ key: "c_memo",
+ width: "280",
filter: {
type: "Input"
}
@@ -344,10 +354,10 @@ export default {
this.loadData();
},
Formatkcyl(kcyl) {
- if (kcyl > 0) {
- return "否";
- } else {
+ if (kcyl < 0) {
return "是";
+ } else {
+ return "否";
}
},
async loadData() {
@@ -378,8 +388,9 @@ export default {
};
let resp = await getInventorySale(_filert);
this.pageNo = 1;
- this.datas = resp.data.data;
- this.datas = sortByKey(resp.data.data, "dDate");
+ this.datas = resp.data.data.wfdetails;
+ this.qhsum = resp.data.data.sum_wfi_quantity;
+ //this.datas = sortByKey(resp.data.data, "dDate");
this.datas.forEach(item => {
if (item.datewaring === "15天内发货") {
item.cellClassName = {
@@ -396,7 +407,26 @@ export default {
}
});
},
- async onSearch(search) {
+ // throttle(method, context) {
+ // clearTimeout(method);
+ // method = setTimeout(function() {
+ // //method.call(context);
+ // }, 1200);
+ // },
+ throttle(method, delay) {
+ var timer = null;
+ return function() {
+ var context = this,
+ args = arguments;
+ clearTimeout(timer);
+ timer = setTimeout(function() {
+ method.apply(context, args);
+ }, delay);
+ };
+ },
+
+ async SonSearch(search) {
+ console.log(1);
//模拟数据库查询数据
//这个search应该是传到后台,然后台来根据条件查询数据库
//alert("查询条件:" + JSON.stringify(search, null, 4));
@@ -404,24 +434,23 @@ export default {
//console.log(search);
- if (JSON.stringify(search.cCusAbbName) == "{}") {
- search.cCusAbbName = "";
+ if (JSON.stringify(search.c_cus_abb_name) == "{}") {
+ search.c_cus_abb_name = "";
}
- if (JSON.stringify(search.cSOCode) == "{}") {
- search.cSOCode = "";
+ if (JSON.stringify(search.c_so_code) == "{}") {
+ search.c_so_code = "";
}
- if (JSON.stringify(search.cInvCode) == "{}") {
- search.cInvCode = "";
+ if (JSON.stringify(search.c_inv_code) == "{}") {
+ search.c_inv_code = "";
}
- if (JSON.stringify(search.cInvName) == "{}") {
- search.cInvName = "";
+ if (JSON.stringify(search.c_inv_name) == "{}") {
+ search.c_inv_name = "";
}
- if (JSON.stringify(search.cInvStd) == "{}") {
-
- search.cInvStd = "";
+ if (JSON.stringify(search.c_inv_std) == "{}") {
+ search.c_inv_std = "";
}
- if (JSON.stringify(search.wfiQuantity) == "{}") {
- search.wfiQuantity = "";
+ if (JSON.stringify(search.wfi_quantity) == "{}") {
+ search.wfi_quantity = "";
}
if (JSON.stringify(search.kcyl) == "{}") {
search.kcyl = "";
@@ -429,30 +458,33 @@ export default {
if (JSON.stringify(search.datewaring) == "{}") {
search.datewaring = "";
}
- if (JSON.stringify(search.cMemo) == "{}") {
- search.cMemo = "";
+ if (JSON.stringify(search.c_memo) == "{}") {
+ search.c_memo = "";
}
let _filert = {
- c_cus_abb_name: search.cCusAbbName,
- d_date: search.dDate,
- c_so_code: search.cSOCode,
- c_inv_code: search.cInvCode,
- c_inv_name: search.cInvName,
- c_inv_std: search.cInvStd,
- wfi_quantity: search.wfiQuantity,
+ c_cus_abb_name: search.c_cus_abb_name,
+ d_date: search.d_date,
+ c_so_code: search.c_so_code,
+ c_inv_code: search.c_inv_code,
+ c_inv_name: search.c_inv_name,
+ c_inv_std: search.c_inv_std,
+ wfi_quantity: search.wfi_quantity,
kcyl: search.kcyl,
- d_pre_date: search.dPreDate,
+ d_pre_date: search.d_pre_date,
datewaring: search.datewaring,
- c_memo: search.cMemo,
+ c_memo: search.c_memo,
jandate: search.jandate,
kcyl2: search.kcyl2
};
let resp = await getInventorySale(_filert);
+
+ //let resp = await getInventorySale(_filert);
this.pageNo = 1;
- this.datas = resp.data.data;
- this.datas = sortByKey(resp.data.data, "dDate");
+ this.datas = resp.data.data.wfdetails;
+ this.qhsum = resp.data.data.sum_wfi_quantity;
+ //this.datas = sortByKey(resp.data.data, "dDate");
this.datas.forEach(item => {
if (item.datewaring === "15天内发货") {
item.cellClassName = {
@@ -469,6 +501,14 @@ export default {
}
});
},
+ getRemote: debounce(function() {
+ this.SonSearch(this.searchText);
+ }, 500),
+
+ onSearch(search) {
+ this.searchText = search;
+ this.getRemote();
+ },
handlePagechange(page) {
this.pageNo = page;
@@ -541,6 +581,6 @@ body {
}
.ivu-auto-complete.ivu-select-dropdown {
- max-height: 500px;
+ max-height: 500px;
}
\ No newline at end of file
diff --git a/NX.ERP.Webapp/vue.config.js b/NX.ERP.Webapp/vue.config.js
index ec9247c..6f9fcfd 100644
--- a/NX.ERP.Webapp/vue.config.js
+++ b/NX.ERP.Webapp/vue.config.js
@@ -58,7 +58,7 @@ module.exports = {
disableHostCheck: true,
proxy: {
'/api': {
- // target: 'http://10.0.0.250:8081', // 接口域名
+ //target: 'http://10.0.0.250:30087', // 接口域名
target: 'http://localhost:61448', // 接口域名
changeOrigin: true, // 是否跨域
pathRewrite: {}