فهرست منبع

部门列表/业务员列表-增加筛选条件

jingbb 8 ماه پیش
والد
کامیت
f33862f220
2فایلهای تغییر یافته به همراه80 افزوده شده و 5 حذف شده
  1. 45 4
      src/views/production/Popup/OperatorsPopup.vue
  2. 35 1
      src/views/production/Popup/deparmentPopup.vue

+ 45 - 4
src/views/production/Popup/OperatorsPopup.vue

@@ -9,7 +9,33 @@
       @ok='handleOk'
       >
       <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%">
-      <a-form-model ref="formRef">
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+              <a-row :gutter="24">
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="名称">
+                    <a-input placeholder="请输入" v-model="queryParam.name" ></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="编码">
+                    <a-input placeholder="请输入" v-model="queryParam.code" ></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col  :md="8" :sm="24">
+                  <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                    <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                    <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                      {{ toggleSearchStatus ? '收起' : '展开' }}
+                      <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+                    </a> -->
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+        </div>
+        <a-form-model ref="formRef">
             <a-table
             ref="table"
             size="middle"
@@ -49,7 +75,7 @@
             pagination:{
                 current: 1,
                 pageSize: 5,
-                pageSizeOptions: ['5', '10', '20'],
+                pageSizeOptions: ['5', '10', '20','50'],
                 showTotal: (total, range) => {
                     return range[0] + "-" + range[1] + " 共" + total + "条"
                 },
@@ -83,6 +109,12 @@
                     dataIndex: 'Code',
                     ellipsis: true,
                 },
+                {
+                    title: '部门',
+                    align:"center",
+                    dataIndex: 'DeptName',
+                    ellipsis: true,
+                },
             ]
           }
         },
@@ -104,8 +136,9 @@
                     this.handleCancel()
                 }
             },
-            getData(data){
+            getData(data,dept){
                 this.queryParam.Org = data
+                this.queryParam.DeptId = dept
                 this.selectedRowKeys = []
                 this.selectedRows = []
                 getAction('/production/safetyStock/selectOperators',this.queryParam).then(res=>{
@@ -125,7 +158,15 @@
             handleTableChange(pagination, filters, sorter) {
                 this.queryParam.pageNo = pagination.current
                 this.queryParam.pageSize = pagination.pageSize
-                this.getData(this.queryParam.Org)
+                this.getData(this.queryParam.Org,this.queryParam.DeptId)
+            },
+            searchQuery(){
+                this.getData(this.queryParam.Org,this.queryParam.DeptId)
+            },
+            searchReset(){
+                this.queryParam.name = ''
+                this.queryParam.code = ''
+                this.getData(this.queryParam.Org,this.queryParam.DeptId)
             },
             onSelectChange(selectedRowKeys, selectionRows) {
               this.selectedRowKeys = selectedRowKeys;

+ 35 - 1
src/views/production/Popup/deparmentPopup.vue

@@ -9,7 +9,33 @@
       @ok='handleOk'
       >
       <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%">
-      <a-form-model ref="formRef">
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+              <a-row :gutter="24">
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="名称">
+                    <a-input placeholder="请输入" v-model="queryParam.name" ></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="编码">
+                    <a-input placeholder="请输入" v-model="queryParam.code" ></a-input>
+                  </a-form-item>
+                </a-col>
+                <a-col  :md="8" :sm="24">
+                  <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                    <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                    <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                      {{ toggleSearchStatus ? '收起' : '展开' }}
+                      <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+                    </a> -->
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+        </div>
+        <a-form-model ref="formRef">
             <a-table
             ref="table"
             size="middle"
@@ -122,6 +148,14 @@
                         }
                 })
             },
+            searchQuery(){
+                this.getData(this.queryParam.Org)
+            },
+            searchReset(){
+                this.queryParam.name = ''
+                this.queryParam.code = ''
+                this.getData(this.queryParam.Org)
+            },
             handleTableChange(pagination, filters, sorter) {
                 this.queryParam.pageNo = pagination.current
                 this.queryParam.pageSize = pagination.pageSize