|
@@ -9,7 +9,7 @@
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
<a-card size="small" :bordered="false" class="salesReturnReceive-cont">
|
|
|
- <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="searchForm">
|
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
|
<a-input id="salesReturnReceive-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
</a-form-item>
|
|
@@ -17,7 +17,7 @@
|
|
|
<a-input id="salesReturnReceive-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
</a-form-item>
|
|
|
<a-form-item>
|
|
|
- <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnReceive-refresh">查询</a-button>
|
|
|
+ <a-button type="primary" class="button-info" @click="searchForm" :disabled="disabled" id="salesReturnReceive-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReceive-reset">重置</a-button>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
}
|
|
|
insertByReceive(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.resetSearchForm()
|
|
|
+ this.resetSearchForm(true)
|
|
|
this.$message.info(res.message)
|
|
|
}
|
|
|
this.$refs.chooseProduct.resetLoading()
|
|
@@ -242,7 +242,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
_this.rowSelectionInfo = null
|
|
|
_this.$refs.table.clearTable()
|
|
|
- _this.resetSearchForm()
|
|
|
+ _this.resetSearchForm(false)
|
|
|
_this.$message.success(res.message)
|
|
|
}
|
|
|
_this.loading = false
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
receiveQty: val
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.$refs.table.refresh()
|
|
|
+ this.resetSearchForm(false)
|
|
|
this.$message.success(res.message)
|
|
|
} else {
|
|
|
record.receiveQty = record.receiveQtyBackups
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
returnReason: record.returnReason
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.$refs.table.refresh()
|
|
|
+ this.resetSearchForm(false)
|
|
|
this.$message.success(res.message)
|
|
|
} else {
|
|
|
record.returnReason = record.returnReasonBackups
|
|
@@ -323,9 +323,17 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm (flag) {
|
|
|
- this.queryParam.productName = ''
|
|
|
- this.queryParam.productCode = ''
|
|
|
- this.$refs.table.refresh(!!flag)
|
|
|
+ if (flag) {
|
|
|
+ this.queryParam.productName = ''
|
|
|
+ this.queryParam.productCode = ''
|
|
|
+ this.rowSelectionInfo = null
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
+ }
|
|
|
+ this.$refs.table.refresh(flag)
|
|
|
+ },
|
|
|
+ searchForm () {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|