Browse Source

销售单 新增 产品名称编码 查询条件

chenrui 3 years ago
parent
commit
bdd5d29acf
1 changed files with 39 additions and 2 deletions
  1. 39 2
      src/views/salesManagement/salesQuery/edit.vue

+ 39 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -47,6 +47,31 @@
             </div>
           </div>
         </a-alert>
+        <!-- 筛选条件 -->
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                <a-row :gutter="15">
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="salesEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="salesEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+          </a-col>
+        </a-row>
         <!-- 已选配件列表 -->
         <s-table
           class="sTable"
@@ -178,6 +203,7 @@ export default {
       spinning: false,
       salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
+      chooseDisabled: false,
       isInster: false, // 是否正在添加产品
       delLoading: false,
       newActive: false, // 选择促销品
@@ -205,7 +231,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.productForm.salesBillSn = this.$route.params.sn
-        return salesDetailStockList(Object.assign(parameter, this.productForm)).then(res => {
+        return salesDetailStockList(Object.assign(parameter, this.productForm, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -218,7 +244,11 @@ export default {
           return data
         })
       },
-      openGuideModal: false //  导入产品引导
+      openGuideModal: false, //  导入产品引导
+      queryParam: {
+        productCode: '',
+        productName: ''
+      }
     }
   },
   methods: {
@@ -244,8 +274,15 @@ export default {
         record.qty = record.qtyBackups
       }
     },
+    chooseResetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.$refs.table.refresh(true)
+    },
     //  重置
     resetSearchForm (flag) {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
       this.$refs.table.refresh(!!flag)
       this.getPromoacActiveList()
       this.getOrderDetail(false)