|
@@ -2,7 +2,7 @@
|
|
|
<a-card size="small" :bordered="false" class="shoppingCar-wrap">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="searchForm">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="searchForm()">
|
|
|
<a-row type="flex" :gutter="12" justify="start">
|
|
|
<a-col flex="auto">
|
|
|
<a-form-item label="产品编码">
|
|
@@ -37,8 +37,8 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col flex="auto" style="margin-bottom:10px;">
|
|
|
- <a-button type="primary" @click="searchForm" :disabled="disabled" id="shoppingCar-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shoppingCar-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="searchForm()" :disabled="disabled" id="shoppingCar-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="shoppingCar-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -167,12 +167,15 @@ export default {
|
|
|
methods: {
|
|
|
...mapActions(['getCartList']),
|
|
|
// 查询
|
|
|
- searchForm () {
|
|
|
- // this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
+ searchForm (flag) {
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ if (flag) {
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
+ this.rowSelectionInfo = null
|
|
|
+ }
|
|
|
},
|
|
|
// 重置
|
|
|
- resetSearchForm () {
|
|
|
+ resetSearchForm (flag) {
|
|
|
this.queryParam.code = ''
|
|
|
this.queryParam.name = ''
|
|
|
this.queryParam.productBrandSn = undefined
|
|
@@ -182,8 +185,10 @@ export default {
|
|
|
this.queryParam.onlineFalg = undefined
|
|
|
this.productType = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
- this.rowSelectionInfo = null
|
|
|
- this.$refs.table.clearSelected()
|
|
|
+ if (flag) {
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
+ this.rowSelectionInfo = null
|
|
|
+ }
|
|
|
},
|
|
|
// 设置表头
|
|
|
getColumns () {
|
|
@@ -254,7 +259,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
this.$message.info(res.message)
|
|
|
this.getCartList()
|
|
|
- this.searchForm()
|
|
|
+ this.searchForm(true)
|
|
|
}
|
|
|
this.loading = false
|
|
|
})
|
|
@@ -328,7 +333,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
_this.$emit('ok')
|
|
|
_this.getCartList()
|
|
|
- _this.searchForm()
|
|
|
+ _this.searchForm(true)
|
|
|
_this.loading = false
|
|
|
} else {
|
|
|
_this.loading = false
|