lilei 2 gadi atpakaļ
vecāks
revīzija
15ab3b4af1

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1676354278486
+  "version": 1676354638676
 }

+ 15 - 9
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -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,11 +167,15 @@ export default {
   methods: {
     ...mapActions(['getCartList']),
     // 查询
-    searchForm () {
+    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
@@ -181,6 +185,10 @@ export default {
       this.queryParam.onlineFalg = undefined
       this.productType = []
       this.$refs.table.refresh(true)
+      if (flag) {
+        this.$refs.table.clearSelected()
+        this.rowSelectionInfo = null
+      }
     },
     // 设置表头
     getColumns () {
@@ -251,7 +259,7 @@ export default {
             if (res.status == 200) {
               this.$message.info(res.message)
               this.getCartList()
-              this.searchForm()
+              this.searchForm(true)
             }
             this.loading = false
           })
@@ -325,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
@@ -342,8 +350,6 @@ export default {
       this.getColumns()
       this.setTableH()
       this.resetSearchForm()
-      this.$refs.table.clearSelected()
-      this.rowSelectionInfo = null
     },
     setTableH () {
       this.$nextTick(() => { // 页面渲染完成后的回调