Commit 78819d5e authored by renjintao's avatar renjintao

分割控制

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