Commit 67d901c1 authored by renjintao's avatar renjintao

配套table

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