优化单据关联选择界面,增加返回列表的按钮,增加判断提示
This commit is contained in:
@@ -13,6 +13,11 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
cancelText="关闭"
|
||||||
style="top:20px;height: 95%;">
|
style="top:20px;height: 95%;">
|
||||||
|
<template slot="footer">
|
||||||
|
<a-button @click="handleCancel">关闭(ESC)</a-button>
|
||||||
|
<a-button @click="handleBackBill" v-if="selectType === 'detail'">返回单据列表</a-button>
|
||||||
|
<a-button type="primary" @click="handleOk">确定</a-button>
|
||||||
|
</template>
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper" v-if="selectType === 'list'">
|
<div class="table-page-search-wrapper" v-if="selectType === 'list'">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
@@ -129,6 +134,7 @@
|
|||||||
selectBillDetailRows: [],
|
selectBillDetailRows: [],
|
||||||
showType: 'basic',
|
showType: 'basic',
|
||||||
selectType: 'list',
|
selectType: 'list',
|
||||||
|
oldTitle: '',
|
||||||
linkNumber: '',
|
linkNumber: '',
|
||||||
organId: '',
|
organId: '',
|
||||||
accountId: '',
|
accountId: '',
|
||||||
@@ -219,6 +225,7 @@
|
|||||||
this.queryParam.status = status
|
this.queryParam.status = status
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.selectedDetailRowKeys = []
|
||||||
this.initColumns(subType, organType)
|
this.initColumns(subType, organType)
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
@@ -231,6 +238,7 @@
|
|||||||
this.queryParam.purchaseStatus = purchaseStatus
|
this.queryParam.purchaseStatus = purchaseStatus
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.selectedDetailRowKeys = []
|
||||||
this.initColumns(subType, organType)
|
this.initColumns(subType, organType)
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
@@ -277,13 +285,19 @@
|
|||||||
onSelectDetailChange(selectedRowKeys) {
|
onSelectDetailChange(selectedRowKeys) {
|
||||||
this.selectedDetailRowKeys = selectedRowKeys;
|
this.selectedDetailRowKeys = selectedRowKeys;
|
||||||
},
|
},
|
||||||
|
handleBackBill() {
|
||||||
|
this.selectType = 'list'
|
||||||
|
this.title = this.oldTitle
|
||||||
|
this.selectedDetailRowKeys = []
|
||||||
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
if(this.selectType === 'list') {
|
if(this.selectType === 'list') {
|
||||||
this.getDepotByCurrentUser()
|
this.getDepotByCurrentUser()
|
||||||
this.getSelectBillRows();
|
this.getSelectBillRows();
|
||||||
this.selectType = 'detail'
|
|
||||||
this.title = "请选择单据明细"
|
|
||||||
if(this.selectBillRows && this.selectBillRows.length>0) {
|
if(this.selectBillRows && this.selectBillRows.length>0) {
|
||||||
|
this.selectType = 'detail'
|
||||||
|
this.oldTitle = this.title
|
||||||
|
this.title = "请选择单据明细"
|
||||||
let record = this.selectBillRows[0]
|
let record = this.selectBillRows[0]
|
||||||
this.linkNumber = record.number
|
this.linkNumber = record.number
|
||||||
this.organId = record.organId
|
this.organId = record.organId
|
||||||
@@ -294,6 +308,8 @@
|
|||||||
this.remark = record.remark
|
this.remark = record.remark
|
||||||
this.initListColumns()
|
this.initListColumns()
|
||||||
this.loadDetailData(1)
|
this.loadDetailData(1)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('抱歉,请选择单据!')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(this.selectedDetailRowKeys.length) {
|
if(this.selectedDetailRowKeys.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user