Commit 78819d5e authored by renjintao's avatar renjintao

分割控制

parent 955680d7
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<state code="aps.plan.supportingStatus" :value="row.status+''" type="text"></state> <state code="aps.plan.supportingStatus" :value="row.status+''" type="text"></state>
</span> </span>
</p> </p>
<Split v-model="split" mode="vertical"> <Split v-model="split" mode="vertical" @on-move-end="moveEnd">
<div slot="top" class="demo-split-pane" style="background:#fff;height:100%"> <div slot="top" class="demo-split-pane" style="background:#fff;height:100%">
<Table <Table
:columns="cols" :columns="cols"
...@@ -19,30 +19,22 @@ ...@@ -19,30 +19,22 @@
border border
highlight-row highlight-row
@on-current-change="curChange" @on-current-change="curChange"
:height="tableHeight" :height="tableHeight1"
></Table> ></Table>
</div> </div>
<div slot="bottom" class="demo-split-pane" style="background:#fff;height:100%"> <div slot="bottom" class="demo-split-pane" style="background:#fff;height:100%">
<p class="mt10 mb10"> <p class="mt10 mb10">
<Button type="primary">出库</Button> <Button type="primary" @click="getMetaiAll">出库</Button>
</p> </p>
<Table <Table
:columns="colsOut" :columns="colsOut"
:data="dataOut" :data="datasOut"
class="tableCommon" class="tableCommon"
border border
highlight-row highlight-row
@on-current-change="curChange" @on-current-change="curChange"
:height="tableHeight-40" :height="tableHeight2-40"
> ></Table>
<template slot-scope="{ row, index }" slot="outSup">
<InputNumber
:max="row.totalCount-row.applicationNumber"
:min="0"
v-model="row.count"
/>
</template>
</Table>
</div> </div>
</Split> </Split>
</div> </div>
...@@ -90,58 +82,51 @@ export default { ...@@ -90,58 +82,51 @@ export default {
title: this.l("remark"), title: this.l("remark"),
align: "left", align: "left",
}, },
{
key: "action",
title: "操作",
align: "center",
render: (h, params) => {
return h("op", {}, "配套");
},
},
], ],
datas: [], datas: [],
tableHeight: "", tableHeight1: "",
tableHeight2: "",
splitHeight: "",
colsOut: [ colsOut: [
{ {
key: "materialName", key: "name",
title: this.l("materialName"), title: this.l("materialName"),
align: "left", align: "left",
}, },
{ {
key: "materialNumber", key: "materialCode",
title: this.l("materialNumber"), title: this.l("materialCode"),
align: "left", align: "left",
}, },
{ {
key: "", key: "certificateOfApproval",
title: "产品合格证号", title: "产品合格证号",
align: "right", align: "right",
}, },
{ {
key: "", key: "storeTitle",
title: "库位", title: "库位",
align: "right", align: "right",
}, },
{ {
key: "", key: "creationTime",
title: "入库时间", title: "入库时间",
align: "right", align: "right",
}, },
{ {
key: "", key: "creator",
title: "入库人", title: "入库人",
align: "right", align: "right",
}, },
{ {
key: "", key: "total",
title: "库存", title: "库存",
align: "right", align: "right",
}, },
{ {
key: "", key: "total",
title: "出库数", title: "出库数",
align: "right", align: "right",
slot: "outSup",
}, },
], ],
datasOut: [], datasOut: [],
...@@ -152,12 +137,16 @@ export default { ...@@ -152,12 +137,16 @@ export default {
row: Object, row: Object,
}, },
mounted() { mounted() {
this.tableHeight = (window.innerHeight - 150) / 2; this.splitHeight = window.innerHeight - 150;
this.tableHeight1 = this.splitHeight * this.split;
this.tableHeight2 = this.splitHeight * (1 - this.split);
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
window.screenHeight = window.innerHeight; window.screenHeight = window.innerHeight;
this.tableHeight = (window.screenHeight - 150) / 2; this.splitHeight = window.screenHeight - 150;
this.tableHeight1 = this.splitHeight * this.split;
this.tableHeight2 = this.splitHeight * (1 - this.split);
})(); })();
}; };
if (this.eid > 0) { if (this.eid > 0) {
...@@ -204,16 +193,25 @@ export default { ...@@ -204,16 +193,25 @@ export default {
curChange(curRow, oldRow) { curChange(curRow, oldRow) {
//点击物料行 //点击物料行
//alert(JSON.stringify(curRow)); //alert(JSON.stringify(curRow));
Api.supportmateriallistone({ materialId:curRow.materialId}).then((r) => { Api.supportmateriallistone({ id: curRow.materialId }).then((r) => {
if (r.success) { if (r.success) {
let temData = []; this.datasOut = r.result;
for (let i = 0; i < 10; i++) {
temData = temData.concat(r.result);
}
this.datasOut = temData;
} }
}); });
}, },
getMetaiAll() {
//点击物料行
//alert(JSON.stringify(curRow));
Api.supportmateriallist({ id: 31 }).then((r) => {
if (r.success) {
// this.datasOut = r.result;
}
});
},
moveEnd() {
this.tableHeight1 = this.splitHeight * this.split;
this.tableHeight2 = this.splitHeight * (1 - this.split);
},
l(key) { l(key) {
key = "support_main" + "." + key; key = "support_main" + "." + key;
return this.$t(key); return this.$t(key);
......
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