From 753f7a32582cacbca53067320b607136152c5830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com> Date: Fri, 22 Oct 2021 15:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=8E=A7=E4=BB=B6=E5=85=A8?= =?UTF-8?q?=E9=9D=A2=20=E6=94=AF=E6=8C=81AutoComplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8/Pmc/PmcQuery.cs | 4 +-- NX.ERP.Webapp/src/views/FilterTable.vue | 37 ++++++++++++++++++---- NX.ERP.Webapp/src/views/inventory-sale.vue | 9 +++--- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs index 8644c63..b2bdc99 100644 --- a/NX.ERP.U8/Pmc/PmcQuery.cs +++ b/NX.ERP.U8/Pmc/PmcQuery.cs @@ -856,7 +856,7 @@ select *from tempdb..tablepzck20210526 { string sql = $@" select *from ( - select f.cCusAbbName,CONVERT(varchar(100),b.dDate, 23) as dDate ,b.cSOCode,a.cInvCode,a.cInvName,g.cInvStd, a.iQuantity - isnull(d.cqty,0) as wfiQuantity + select f.cCusAbbName,CONVERT(varchar(100),b.dDate, 23) as dDate ,b.cSOCode,a.cInvCode,a.cInvName,g.cInvStd, a.iQuantity - isnull(d.cqty,0) as wfiQuantity,b.cCloser , isnull(cs.qty,0) as xcl, b.cVerifier @@ -904,7 +904,7 @@ select *from tempdb..tablepzck20210526 // where.Add(" a.iQuantity - isnull(d.cqty,0) >0 and b.cVerifier is not null "); - where.Add(" mm.wfiQuantity >0 and mm.cVerifier is not null and mm.cInvCode like '9%' "); + where.Add(" mm.wfiQuantity >0 and mm.cVerifier is not null and mm.cInvCode like '9%' and isnull( mm.cCloser ,'') ='' "); if(info1 ==null) { info1 = new NX.ERP.Model.Request.SaleinvRequest(); diff --git a/NX.ERP.Webapp/src/views/FilterTable.vue b/NX.ERP.Webapp/src/views/FilterTable.vue index d0de1b9..6ce9ebe 100644 --- a/NX.ERP.Webapp/src/views/FilterTable.vue +++ b/NX.ERP.Webapp/src/views/FilterTable.vue @@ -23,17 +23,42 @@ export default { data: Array //表格数据 }, computed: { + /* custnanme() { - this.data3=[]; + this.data3 = []; this.data.forEach(item => { - //console.log(1) + this.data3.push(item.cCusAbbName); }); this.data3 = this.noRepeat(this.data3); this.data3 = this.data3.slice(0, 10); - //console.log(this.data); + //console.log(this.columns); + //console.log(this.arraydata); return this.data3; + }, + */ + getarraydata:function(){ + + this.arraydata=[] + this.columns.forEach(element => { + this.arraydata[element.key] = []; + }); + for (var item = 0; item < this.data.length; item++) { + //遍历对象数组,item表示某个具体的对象 + for (var i in this.data[item]) { + if (this.arraydata.hasOwnProperty(i)) { + this.arraydata[i].push(this.data[item][i]); + } + //console.log(this.objectList[item][i]); //objectList[item][i]表示某个对象的某个具体属性值,i表示属性名,可以打印出来看一下; + } + } + + return function(key){ + this.arraydata[key] = this.noRepeat(this.arraydata[key]); + return this.arraydata[key]; + } } + }, data() { return { @@ -43,6 +68,7 @@ export default { } ], data3: [], + arraydata: new Array(), tableColumnsFilters: [], search: {} //过滤条件保存的对象,就是保存Input框和Select中值 }; @@ -92,7 +118,7 @@ export default { props: { value: "", //Select选项列表一般 0 为全部 transfer: true, - data: this.custnanme, + data: this.getarraydata(this.columns[index].key), filterMethod: this.filterMethod }, on: { @@ -230,7 +256,7 @@ export default { }, 0); sums[key] = { key, - value: v + value: v }; } else { sums[key] = { @@ -239,7 +265,6 @@ export default { }; } }); - return sums; } diff --git a/NX.ERP.Webapp/src/views/inventory-sale.vue b/NX.ERP.Webapp/src/views/inventory-sale.vue index c539067..08d3caf 100644 --- a/NX.ERP.Webapp/src/views/inventory-sale.vue +++ b/NX.ERP.Webapp/src/views/inventory-sale.vue @@ -169,7 +169,7 @@ export default { key: "cSOCode", width: "160", filter: { - type: "Input" + type: "AutoComplete" } }, @@ -189,7 +189,7 @@ export default { width: "150", key: "cInvName", filter: { - type: "Input" + type: "AutoComplete" } }, { @@ -198,7 +198,7 @@ export default { key: "cInvStd", width: "220", filter: { - type: "Input" + type: "AutoComplete" } }, { @@ -526,6 +526,7 @@ body { } .ivu-select-dropdown-transfer { - width: 150px; + width: 165px; + height: 350px; } \ No newline at end of file