Commit 67d901c1 authored by renjintao's avatar renjintao

配套table

parent 78819d5e
...@@ -1570,6 +1570,10 @@ export default { ...@@ -1570,6 +1570,10 @@ export default {
originalManufacturer: '原厂家', originalManufacturer: '原厂家',
remark: '备注', remark: '备注',
materialCode: '物料编码', materialCode: '物料编码',
creationTime1: '入库时间',
creator1: '入库人',
total1: '库存',
count:'出库数'
}, },
stock_item: { stock_item: {
creationTime: '创建时间', creationTime: '创建时间',
......
...@@ -34,7 +34,15 @@ ...@@ -34,7 +34,15 @@
highlight-row highlight-row
@on-current-change="curChange" @on-current-change="curChange"
:height="tableHeight2-40" :height="tableHeight2-40"
></Table> >
<template slot-scope="{ row, index }" slot="counts">
<InputNumber
:max="row.total"
:min="0"
v-model="row.count"
/>
</template>
</Table>
</div> </div>
</Split> </Split>
</div> </div>
...@@ -68,7 +76,7 @@ export default { ...@@ -68,7 +76,7 @@ export default {
align: "right", align: "right",
}, },
{ {
key: "count", key: "",
title: "出库数", title: "出库数",
align: "right", align: "right",
}, },
...@@ -90,43 +98,44 @@ export default { ...@@ -90,43 +98,44 @@ export default {
colsOut: [ colsOut: [
{ {
key: "name", key: "name",
title: this.l("materialName"), title: this.l1("name"),
align: "left", align: "left",
}, },
{ {
key: "materialCode", key: "materialCode",
title: this.l("materialCode"), title: this.l1("materialCode"),
align: "left", align: "left",
}, },
{ {
key: "certificateOfApproval", key: "certificateOfApproval",
title: "产品合格证号", title: this.l1("certificateOfApproval"),
align: "right", align: "right",
}, },
{ {
key: "storeTitle", key: "storeTitle",
title: "库位", title: this.l1("storeTitle"),
align: "right", align: "right",
}, },
{ {
key: "creationTime", key: "creationTime",
title: "入库时间", title: this.l1("creationTime1"),
align: "right", align: "right",
}, },
{ {
key: "creator", key: "creator",
title: "入库人", title: this.l1("creator1"),
align: "right", align: "right",
}, },
{ {
key: "total", key: "total",
title: "库存", title: this.l1("total1"),
align: "right", align: "right",
}, },
{ {
key: "total", key: "count",
title: "出库数", title: this.l1("count"),
align: "right", align: "right",
slot: "counts",
}, },
], ],
datasOut: [], datasOut: [],
...@@ -157,11 +166,14 @@ export default { ...@@ -157,11 +166,14 @@ export default {
load(v) { load(v) {
Api.getitemlist({ id: v }).then((r) => { Api.getitemlist({ id: v }).then((r) => {
if (r.success) { if (r.success) {
let temData = []; //----测试多条数据start----
for (let i = 0; i < 10; i++) { // let temData = [];
temData = temData.concat(r.result.children); // for (let i = 0; i < 10; i++) {
} // temData = temData.concat(r.result.children);
this.datas = temData; // }
//this.datas = temData;
//----测试多条数据end----
this.datas = r.result.children;
} }
}); });
}, },
...@@ -195,6 +207,9 @@ export default { ...@@ -195,6 +207,9 @@ export default {
//alert(JSON.stringify(curRow)); //alert(JSON.stringify(curRow));
Api.supportmateriallistone({ id: curRow.materialId }).then((r) => { Api.supportmateriallistone({ id: curRow.materialId }).then((r) => {
if (r.success) { if (r.success) {
r.result.forEach((el) => {
el.count = 0;
});
this.datasOut = r.result; this.datasOut = r.result;
} }
}); });
...@@ -216,6 +231,10 @@ export default { ...@@ -216,6 +231,10 @@ export default {
key = "support_main" + "." + key; key = "support_main" + "." + key;
return this.$t(key); return this.$t(key);
}, },
l1(key) {
key = "stock" + "." + key;
return this.$t(key);
},
}, },
watch: { watch: {
eid(v) { eid(v) {
......
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