Commit 5bde6613 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 8cb924ca 139f86a2
...@@ -51,82 +51,102 @@ $(function () { ...@@ -51,82 +51,102 @@ $(function () {
columns2:[ columns2:[
{ {
label:'公司名称', label:'公司名称',
align:'left',
value:'companyName' value:'companyName'
}, },
{ {
label:'委外加工日期', label:'委外加工日期',
align:'left',
value:'contractDate' value:'contractDate'
}, },
{ {
label:'委外加工单号', label:'委外加工单号',
align:'left',
value:'contractCode' value:'contractCode'
}, },
{ {
label:'供应商名称', label:'供应商名称',
align:'left',
value:'supName' value:'supName'
}, },
{ {
label:'材料编码', label:'材料编码',
align:'left',
value:'lcinventCode' value:'lcinventCode'
}, },
{ {
label:'材料名称', label:'材料名称',
align:'left',
value:'lcinventName' value:'lcinventName'
}, },
{ {
label:'材料规格', label:'材料规格',
align:'left',
value:'lcspec' value:'lcspec'
}, },
{ {
label:'计划出库数量', label:'计划出库数量',
align:'right',
value:'jhckQty' value:'jhckQty'
}, },
{ {
label:'计划出库重量', label:'计划出库重量',
align:'right',
value:'jhckWeight' value:'jhckWeight'
}, },
{ {
label:'出库日期', label:'出库日期',
align:'left',
value:'outDate' value:'outDate'
}, },
{ {
label:'实际出库数量', label:'实际出库数量',
align:'right',
value:'sjckoutQty' value:'sjckoutQty'
}, },
{ {
label:'实际出库重量', label:'实际出库重量',
align:'right',
value:'sjckoutWeight' value:'sjckoutWeight'
}, },
{ {
label:'成品编码', label:'成品编码',
align:'left',
value:'productCode' value:'productCode'
}, },
{ {
label:'成品名称', label:'成品名称',
align:'left',
value:'productName' value:'productName'
}, },
{ {
label:'成品规格', label:'成品规格',
align:'left',
value:'rkspec' value:'rkspec'
}, },
{ {
label:'计划入库数量', label:'计划入库数量',
align:'right',
value:'jhrkdepositQty' value:'jhrkdepositQty'
}, },
{ {
label:'计划入库重量', label:'计划入库重量',
align:'right',
value:'jhrkdepositWeight' value:'jhrkdepositWeight'
}, },
{ {
label:'入库日期', label:'入库日期',
align:'left',
value:'depositDate' value:'depositDate'
}, },
{ {
label:'实际入库数量', label:'实际入库数量',
align:'right',
value:'actualQty' value:'actualQty'
}, },
{ {
label:'实际入库重量', label:'实际入库重量',
align:'right',
value:'depositWeight' value:'depositWeight'
} }
], ],
...@@ -234,15 +254,19 @@ $(function () { ...@@ -234,15 +254,19 @@ $(function () {
let productCodeObj = {} let productCodeObj = {}
g.forEach(item3 =>{ g.forEach(item3 =>{
productCodeObj[item3.productCode.value] = ''; let valStr = item3.productCode.value + item3.outDate.value
productCodeObj[valStr] = '';
}) })
let gList = Object.keys(productCodeObj) let gList = Object.keys(productCodeObj)
let Hlist = gList.map(item4 => { let Hlist = gList.map(item4 => {
let d = g.filter(val7 => val7.productCode.value === item4); let d = g.filter(val7 => {
return d.map((val6,i5) => { let val2Str = val7.productCode.value + val7.outDate.value
return val2Str === item4
});
let arrFinal = d.map((val6,i5) => {
return { return {
...val6, ...val6,
productCode:{ productCode:{
...@@ -269,12 +293,31 @@ $(function () { ...@@ -269,12 +293,31 @@ $(function () {
...val6.jhrkdepositWeight, ...val6.jhrkdepositWeight,
rowspan: d.length, rowspan: d.length,
show: !i5 show: !i5
},
outDate:{
...val6.outDate,
rowspan: d.length,
show: !i5
},
sjckoutQty:{
...val6.sjckoutQty,
value: i5 && val6.sjckoutQty.value? (Number(val6.sjckoutQty.value||0)+Number(d[i5-1].sjckoutQty.value)): Number(val6.sjckoutQty.value||0),
rowspan: d.length,
show: !i5
},
sjckoutWeight:{
...val6.sjckoutWeight,
value: i5 && val6.sjckoutWeight.value? (Number(val6.sjckoutWeight.value||0)+Number(d[i5-1].sjckoutWeight.value)): Number(val6.sjckoutWeight.value||0),
rowspan: d.length,
show: !i5
} }
} }
}); });
arrFinal[0].sjckoutQty.value = arrFinal[arrFinal.length-1].sjckoutQty.value;
arrFinal[0].sjckoutWeight.value = arrFinal[arrFinal.length-1].sjckoutWeight.value;
return arrFinal
}) })
let finalArr = [] let finalArr = []
Hlist.forEach(item6=>{ Hlist.forEach(item6=>{
finalArr.push(...item6); finalArr.push(...item6);
...@@ -316,8 +359,8 @@ $(function () { ...@@ -316,8 +359,8 @@ $(function () {
arr1.forEach(item=>{ arr1.forEach(item=>{
that.list.push(...item); that.list.push(...item);
}) })
}else {
that.list = [];
} }
}, },
onFail: (err) => { onFail: (err) => {
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,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" :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" :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