Commit 0ad28df9 by zhangzhen

新表格模式页面查询条件优化5

parent 2eeee4a4
...@@ -48,118 +48,147 @@ $(function () { ...@@ -48,118 +48,147 @@ $(function () {
{ {
label:'公司编号', label:'公司编号',
value:'companyCode', value:'companyCode',
align:'left',
show: false show: false
}, },
{ {
label:'公司名称', label:'公司名称',
align:'left',
value:'companyName' value:'companyName'
}, },
{ {
label:'项目编码', label:'项目编码',
align:'left',
value:'projCode' value:'projCode'
}, },
{ {
label:'项目名称', label:'项目名称',
align:'left',
value:'projName' value:'projName'
}, },
{ {
label:'产品编码', label:'产品编码',
align:'left',
value:'productCode' value:'productCode'
}, },
{ {
label:'产品名称', label:'产品名称',
align:'left',
value:'productName' value:'productName'
}, },
{ {
label:'规格', label:'规格',
align:'left',
value:'spec' value:'spec'
}, },
{ {
label:'长度', label:'长度',
align:'right',
value:'length' value:'length'
}, },
{ {
label:'宽度', label:'宽度',
align:'right',
value:'width' value:'width'
}, },
{ {
label:'厚度', label:'厚度',
align:'right',
value:'thick' value:'thick'
}, },
{ {
label:'数量', label:'数量',
align:'right',
value:'quantity' value:'quantity'
}, },
{ {
label:'单重', label:'单重',
align:'right',
value:'singleWeight' value:'singleWeight'
}, },
{ {
label:'总重', label:'总重',
align:'right',
value:'totalWeight' value:'totalWeight'
}, },
{ {
label:'入库日期', label:'入库日期',
align:'left',
value:'depositDate' value:'depositDate'
}, },
{ {
label:'数量', label:'数量',
align:'right',
value:'invQty' value:'invQty'
}, },
{ {
label:'单重', label:'单重',
align:'right',
value:'invUnitWeight' value:'invUnitWeight'
}, },
{ {
label:'总量', label:'总量',
align:'right',
value:'invWeight' value:'invWeight'
}, },
{ {
label:'材料编码', label:'材料编码',
align:'left',
value:'clproductCode' value:'clproductCode'
}, },
{ {
label:'材料名称', label:'材料名称',
align:'left',
value:'clproductName' value:'clproductName'
}, },
{ {
label:'规格', label:'规格',
align:'left',
value:'clspec' value:'clspec'
}, },
{ {
label:'长度', label:'长度',
align:'right',
value:'cllength' value:'cllength'
}, },
{ {
label:'宽度', label:'宽度',
align:'right',
value:'clwidth' value:'clwidth'
}, },
{ {
label:'厚度', label:'厚度',
align:'right',
value:'clthick' value:'clthick'
}, },
{ {
label:'数量', label:'数量',
align:'right',
value:'clquantity' value:'clquantity'
}, },
{ {
label:'总重', label:'总重',
align:'right',
value:'cltotalWeight' value:'cltotalWeight'
}, },
{ {
label:'领料日期', label:'领料日期',
align:'left',
value:'receiptDate' value:'receiptDate'
}, },
{ {
label:'数量', label:'数量',
align:'right',
value:'llinvQty' value:'llinvQty'
}, },
{ {
label:'重量', label:'重量',
align:'right',
value:'llinvWeight' value:'llinvWeight'
}, },
{ {
label:'成材率', label:'成材率(%)',
align:'right',
value:'ccl' value:'ccl'
} }
], ],
...@@ -174,8 +203,16 @@ $(function () { ...@@ -174,8 +203,16 @@ $(function () {
let that = this; let that = this;
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val()); inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val());
inInfo.set("inqu_status-0-contractDate",$("#inqu_status-0-projName").val()) let depositDate = $("#inqu_status-0-depositDate").val()
inInfo.set("inqu_status-0-contractCode",$("#inqu_status-0-productName").val()) if(depositDate){
inInfo.set("inqu_status-0-depositDate",dayjs(depositDate).format("YYYYMMDD"));
}else{
$("#inqu_status-0-depositDate").val(dayjs().subtract(1,'d').format("YYYY-MM-DD"));
inInfo.set("inqu_status-0-depositDate",dayjs().subtract(1,'d').format("YYYYMMDD"));
}
inInfo.set("inqu_status-0-projName",$("#inqu_status-0-projName").val())
inInfo.set("inqu_status-0-productName",$("#inqu_status-0-productName").val())
IPLAT.EiCommunicator.send('HGSC013', 'query', inInfo, { IPLAT.EiCommunicator.send('HGSC013', 'query', inInfo, {
onSuccess: (res) => { onSuccess: (res) => {
if(res.extAttr.result && res.extAttr.result.length){ if(res.extAttr.result && res.extAttr.result.length){
...@@ -183,7 +220,8 @@ $(function () { ...@@ -183,7 +220,8 @@ $(function () {
let list = res.extAttr.result.map(item => { let list = res.extAttr.result.map(item => {
return { return {
...item, ...item,
depositDate: item.depositDate? dayjs(item.depositDate).format('YYYY-MM-DD'):'' depositDate: item.depositDate? dayjs(item.depositDate).format('YYYY-MM-DD'):'',
receiptDate: item.receiptDate? dayjs(item.receiptDate).format('YYYY-MM-DD'):''
} }
}).map(item =>{ }).map(item =>{
let obj = {} let obj = {}
...@@ -198,7 +236,7 @@ $(function () { ...@@ -198,7 +236,7 @@ $(function () {
}); });
let contractCodeObj = {} let contractCodeObj = {}
list.forEach(item =>{ list.forEach(item =>{
let valStr = item.companyCode.value+item.projCode.value let valStr = item.companyCode.value + item.projCode.value
contractCodeObj[valStr] = ''; contractCodeObj[valStr] = '';
}) })
let contractCodeList = Object.keys(contractCodeObj); let contractCodeList = Object.keys(contractCodeObj);
...@@ -209,12 +247,16 @@ $(function () { ...@@ -209,12 +247,16 @@ $(function () {
}); });
let obj2 ={} let obj2 ={}
a.forEach(item2 => { a.forEach(item2 => {
obj2[item2.productCode.value] = ''; let val3Str = item2.productCode.value + item2.depositDate.value
obj2[val3Str] = '';
}); });
let bList = Object.keys(obj2) let bList = Object.keys(obj2)
let Elist = bList.map(item3 => { let Elist = bList.map(item3 => {
return a.filter(val2 => val2.productCode.value === item3); return a.filter(val2 => {
}) let val4Str = val2.productCode.value + val2.depositDate.value
return val4Str === item3
});
});
if(Elist.length){ if(Elist.length){
let fList = []; let fList = [];
Elist.forEach(val4 => { Elist.forEach(val4 => {
...@@ -271,9 +313,33 @@ $(function () { ...@@ -271,9 +313,33 @@ $(function () {
value: i4? (Number(val5.ccl.value)+Number(val4[i4-1].ccl.value))/val4.length: Number(val5.ccl.value), value: i4? (Number(val5.ccl.value)+Number(val4[i4-1].ccl.value))/val4.length: Number(val5.ccl.value),
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
},
depositDate:{
...val5.depositDate,
rowspan: val4.length,
show: !i4
},
invQty:{
...val5.invQty,
value: i4? (Number(val5.invQty.value)+Number(val4[i4-1].invQty.value)): Number(val5.invQty.value),
rowspan: val4.length,
show: !i4
},
invUnitWeight:{
...val5.invUnitWeight,
rowspan: val4.length,
show: !i4
},
invWeight:{
...val5.invWeight,
value: i4? (Number(val5.invWeight.value)+Number(val4[i4-1].invWeight.value)): Number(val5.invWeight.value),
rowspan: val4.length,
show: !i4
} }
} }
}) })
g[0].invQty.value = g[g.length-1].invQty.value;
g[0].invWeight.value = g[g.length-1].invWeight.value;
let productCodeObj = {} let productCodeObj = {}
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect> </EF:EFSelect>
<%-- <EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>--%> <EF:EFDatePicker blockId="inqu_status" row="0" ename="depositDate" cname="入库日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</thead> </thead>
<tbody> <tbody>
<tr v-for="(valObj,i) in list" :key="i"> <tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show && k>0" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''"> <td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show && k>0" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''" :style="{textAlign:item.align}">
<span>{{valObj[item.value].value}}</span> <span>{{valObj[item.value].value}}</span>
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment