Commit 0ad28df9 by zhangzhen

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

parent 2eeee4a4
......@@ -48,118 +48,147 @@ $(function () {
{
label:'公司编号',
value:'companyCode',
align:'left',
show: false
},
{
label:'公司名称',
align:'left',
value:'companyName'
},
{
label:'项目编码',
align:'left',
value:'projCode'
},
{
label:'项目名称',
align:'left',
value:'projName'
},
{
label:'产品编码',
align:'left',
value:'productCode'
},
{
label:'产品名称',
align:'left',
value:'productName'
},
{
label:'规格',
align:'left',
value:'spec'
},
{
label:'长度',
align:'right',
value:'length'
},
{
label:'宽度',
align:'right',
value:'width'
},
{
label:'厚度',
align:'right',
value:'thick'
},
{
label:'数量',
align:'right',
value:'quantity'
},
{
label:'单重',
align:'right',
value:'singleWeight'
},
{
label:'总重',
align:'right',
value:'totalWeight'
},
{
label:'入库日期',
align:'left',
value:'depositDate'
},
{
label:'数量',
align:'right',
value:'invQty'
},
{
label:'单重',
align:'right',
value:'invUnitWeight'
},
{
label:'总量',
align:'right',
value:'invWeight'
},
{
label:'材料编码',
align:'left',
value:'clproductCode'
},
{
label:'材料名称',
align:'left',
value:'clproductName'
},
{
label:'规格',
align:'left',
value:'clspec'
},
{
label:'长度',
align:'right',
value:'cllength'
},
{
label:'宽度',
align:'right',
value:'clwidth'
},
{
label:'厚度',
align:'right',
value:'clthick'
},
{
label:'数量',
align:'right',
value:'clquantity'
},
{
label:'总重',
align:'right',
value:'cltotalWeight'
},
{
label:'领料日期',
align:'left',
value:'receiptDate'
},
{
label:'数量',
align:'right',
value:'llinvQty'
},
{
label:'重量',
align:'right',
value:'llinvWeight'
},
{
label:'成材率',
label:'成材率(%)',
align:'right',
value:'ccl'
}
],
......@@ -174,8 +203,16 @@ $(function () {
let that = this;
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val());
inInfo.set("inqu_status-0-contractDate",$("#inqu_status-0-projName").val())
inInfo.set("inqu_status-0-contractCode",$("#inqu_status-0-productName").val())
let depositDate = $("#inqu_status-0-depositDate").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, {
onSuccess: (res) => {
if(res.extAttr.result && res.extAttr.result.length){
......@@ -183,7 +220,8 @@ $(function () {
let list = res.extAttr.result.map(item => {
return {
...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 =>{
let obj = {}
......@@ -198,7 +236,7 @@ $(function () {
});
let contractCodeObj = {}
list.forEach(item =>{
let valStr = item.companyCode.value+item.projCode.value
let valStr = item.companyCode.value + item.projCode.value
contractCodeObj[valStr] = '';
})
let contractCodeList = Object.keys(contractCodeObj);
......@@ -209,12 +247,16 @@ $(function () {
});
let obj2 ={}
a.forEach(item2 => {
obj2[item2.productCode.value] = '';
let val3Str = item2.productCode.value + item2.depositDate.value
obj2[val3Str] = '';
});
let bList = Object.keys(obj2)
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){
let fList = [];
Elist.forEach(val4 => {
......@@ -271,9 +313,33 @@ $(function () {
value: i4? (Number(val5.ccl.value)+Number(val4[i4-1].ccl.value))/val4.length: Number(val5.ccl.value),
rowspan: val4.length,
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 = {}
......
......@@ -68,7 +68,7 @@
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</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="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
......@@ -100,7 +100,7 @@
</thead>
<tbody>
<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>
</td>
</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