瀏覽代碼

bug 修复

lilei 4 年之前
父節點
當前提交
bb0df620f6
共有 2 個文件被更改,包括 17 次插入3 次删除
  1. 5 2
      src/views/Service/PurchasedServiceList.vue
  2. 12 1
      src/views/SetmealSales/VerificationRecords.vue

+ 5 - 2
src/views/Service/PurchasedServiceList.vue

@@ -61,8 +61,8 @@
             </a-form-item>
           </a-col>
           <a-col :lg="6" :sm="12">
-            <a-button type="primary" @click="refresh" id="PurchasedServiceList-search">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" id="PurchasedServiceList-resetSearchForm">重置</a-button>
+            <a-button type="primary" @click="refresh" :disabled="disabled" id="PurchasedServiceList-search">查询</a-button>
+            <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm" id="PurchasedServiceList-resetSearchForm">重置</a-button>
             <a-button style="margin-left: 8px" class="export-btn" @click="handleExport" id="PurchasedServiceList-handleExport">导出</a-button>
           </a-col>
         </a-row>
@@ -119,6 +119,7 @@ export default {
   },
   data () {
     return {
+      disabled: false,
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam, {
           freeChoiceFlag: 1
@@ -131,12 +132,14 @@ export default {
           searchData.beginDate = ''
           searchData.endDate = ''
         }
+        this.disabled = true
         return listCustomerBundle(searchData).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           for (let i = 0; i < res.data.list.length; i++) {
             const _item = res.data.list[i]
             _item.no = no + i + 1
           }
+          this.disabled = false
           return res.data
         })
       },

+ 12 - 1
src/views/SetmealSales/VerificationRecords.vue

@@ -18,7 +18,13 @@
           </a-col>
           <a-col :span="6">
             <a-form-item label="核销门店" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
-              <a-select placeholder="请选择" allowClear v-model="searchForm.usedStoreId" id="VerificationRecords-usedStoreId">
+              <a-select
+                placeholder="请选择"
+                showSearch
+                allowClear
+                :filter-option="filterOption"
+                v-model="searchForm.usedStoreId"
+                id="VerificationRecords-usedStoreId">
                 <a-select-option v-for="item in storeOptionData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
@@ -189,6 +195,11 @@ export default {
   },
   methods: {
     moment,
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
     // 不可选日期
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()