|
@@ -1,13 +1,15 @@
|
|
<template>
|
|
<template>
|
|
- <a-modal
|
|
|
|
- centered
|
|
|
|
- class="outStock-modal"
|
|
|
|
- :footer="null"
|
|
|
|
- :maskClosable="false"
|
|
|
|
|
|
+ <a-drawer
|
|
|
|
+ :zIndex="zIndex"
|
|
title="导入缺货"
|
|
title="导入缺货"
|
|
- v-model="isShow"
|
|
|
|
- @cancel="isShow=false"
|
|
|
|
- :width="860">
|
|
|
|
|
|
+ placement="right"
|
|
|
|
+ :visible="isShow"
|
|
|
|
+ :width="width"
|
|
|
|
+ :get-container="false"
|
|
|
|
+ :wrap-style="{ position: 'absolute' }"
|
|
|
|
+ @close="isShow=false"
|
|
|
|
+ wrapClassName="outStock-modal"
|
|
|
|
+ >
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<div class="outStock-con">
|
|
<div class="outStock-con">
|
|
<div>
|
|
<div>
|
|
@@ -43,12 +45,13 @@
|
|
@rowSelection="rowSelectionFun"
|
|
@rowSelection="rowSelectionFun"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
- :scroll="{ y: 450 }"
|
|
|
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
|
+ :scroll="{ y:tableHeight, x: 1000 }"
|
|
bordered>
|
|
bordered>
|
|
</s-table>
|
|
</s-table>
|
|
</div>
|
|
</div>
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
- <div class="btn-con">
|
|
|
|
|
|
+ <div class="btn-con" ref="btnBox">
|
|
<a-button
|
|
<a-button
|
|
id="outStock-cancel"
|
|
id="outStock-cancel"
|
|
size="large"
|
|
size="large"
|
|
@@ -64,8 +67,8 @@
|
|
style="padding: 0 30px;">确定</a-button>
|
|
style="padding: 0 30px;">确定</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div></a-spin>
|
|
|
|
- </a-modal>
|
|
|
|
|
|
+ </a-spin>
|
|
|
|
+ </a-drawer>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -102,6 +105,9 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
return {
|
|
return {
|
|
isShow: this.openModal, // 是否打开弹框
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
|
+ zIndex: 90,
|
|
|
|
+ width: '70%',
|
|
|
|
+ tableHeight: 0,
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
labelCol: { span: 4 },
|
|
labelCol: { span: 4 },
|
|
wrapperCol: { span: 20 }
|
|
wrapperCol: { span: 20 }
|
|
@@ -174,9 +180,19 @@ export default {
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.purchaseBillNo = ''
|
|
this.queryParam.purchaseBillNo = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
|
|
+ setTableH () {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ const searchBoxH = this.$refs.tableSearch.offsetHeight
|
|
|
|
+ const tabBoxH = this.$refs.btnBox.offsetHeight
|
|
|
|
+ this.tableHeight = window.innerHeight - searchBoxH - tabBoxH - 300
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
|
+ this.setTableH()
|
|
|
|
+ },
|
|
// 父页面传过来的弹框状态
|
|
// 父页面传过来的弹框状态
|
|
openModal (newValue, oldValue) {
|
|
openModal (newValue, oldValue) {
|
|
this.isShow = newValue
|
|
this.isShow = newValue
|
|
@@ -186,6 +202,11 @@ export default {
|
|
if (!newValue) {
|
|
if (!newValue) {
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
this.$refs.table.clearSelected() // 清空表格选中项
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
|
|
+ } else {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.setTableH()
|
|
|
|
+ }, 200)
|
|
|
|
+ this.resetSearchForm()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|