Browse Source

销售询价组-筛选条件修改

jingbb 4 months ago
parent
commit
f0451f7c06

+ 14 - 9
src/views/purchase/purchaseInquiryForm/components/SelectCustomerInquiryModal.vue

@@ -25,7 +25,7 @@
                     <a-col :md="6" :sm="8">
                         <a-form-item label="询价项目(inquiry project)">
                             <ApiSelect
-                                    :api="projectListList"
+                                    :api="ProjectOption"
                                     showSearch
                                     v-model:value="queryParams.inquiryProject"
                                     optionFilterProp="label"
@@ -33,6 +33,7 @@
                                     labelField="name"
                                     valueField="id"
                                     :disabled="fatherProject!==''"
+                                    :params='{pageSize:-1}'
                                     />
                         </a-form-item>
                     </a-col>
@@ -49,7 +50,16 @@
                         </a-col>
                         <a-col :md="6" :sm="8">
                             <a-form-item label="产品分类(product class)" >
-                                <JSelectInput   v-model:value="queryParams.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                                <ApiSelect
+                                :api="ClassList"
+                                showSearch
+                                v-model:value="queryParams.productionClass"
+                                :filterOption="false"
+                                resultField="records"
+                                labelField="name"
+                                valueField="id"
+                                :params='{pageSize:-1}'
+                                />
                             </a-form-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
@@ -117,10 +127,9 @@
     import { defHttp } from '/@/utils/http/axios';
     import { message } from 'ant-design-vue';
     import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
-    import { JDictSelectTag} from '/@/components/Form';
-    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+    import { JDictSelectTag,ApiSelect} from '/@/components/Form';
     import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
-    import {  ApiSelect, } from '/@/components/Form/index';
+    import {ProjectOption,ClassList} from '../purchaseInquiryForm.api';
     const emit = defineEmits([ 'selectCustomerInquiry']); //定义emit
     let classOption = ref([])
     var visible = ref(false)
@@ -439,10 +448,6 @@
        }
        
     }
-    function projectListList(){
-        let params = {pageSize:-1}
-        return defHttp.get({url:'/baseCode/baseProjectArchive/list',params});
-    }
     defineExpose({
       getTable
     });

+ 19 - 2
src/views/purchase/purchaseInquiryForm/purchaseInquiryForm.api.ts

@@ -15,7 +15,11 @@ enum Api {
   purCodeInquiryFormShipList = '/purCode/purInquiryForm/queryPurInquiryFormShipByMainId',
   purCodeInquiryFormProductList = '/purCode/purInquiryForm/queryPurInquiryFormProductByMainId',
   submitBatch='/purCode/purInquiryForm/submitBatch',
-  cancelSubmitBatch='/purCode/purInquiryForm/returnSubmitBatch'
+  cancelSubmitBatch='/purCode/purInquiryForm/returnSubmitBatch',
+  supplierList='/cuspCode/cuspSupplierProfile/list?pageSize=-1',
+  customerList='/cuspCode/cuspCustomerProfile/list',
+  projectList='/baseCode/baseProjectArchive/list',
+  classList='baseCode/baseProductClass/list',
 }
 /**
  * 导出api
@@ -116,4 +120,17 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
       });
     }
   });
-}
+}
+//获取供应商列表
+export const supplierOption = (params) => defHttp.get({url: Api.supplierList, params});
+
+//获取客户下拉框列表
+export const CustomerOption = (params) => defHttp.get({ url: Api.customerList, params });
+
+//获取项目下拉框列表
+export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
+/**
+ * 分类列表接口
+ * @param params
+ */
+export const ClassList = (params) => defHttp.get({url: Api.classList, params});

+ 33 - 34
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -20,13 +20,31 @@
             <a-col :lg="8">
               <a-form-item name="inquiryProject">
                 <template #label><span title="询价项目(inquiry project)">询价项目(inquiry project)</span></template>
-                <a-input placeholder="请输入询价项目(inquiry project)" v-model:value="queryParam.inquiryProject" allow-clear AutoComplete="off"></a-input>
+                <ApiSelect
+                    :api="ProjectOption"
+                    showSearch
+                    v-model:value="queryParam.inquiryProject"
+                    :filterOption="false"
+                    resultField="records"
+                    labelField="name"
+                    valueField="id"
+                    :params='{pageSize:-1}'
+                  />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
               <a-form-item name="inquirySuppiler">
                 <template #label><span title="询价供应商(inquiry supplier)">询价供应商(inquiry supplier)</span></template>
-                <a-input placeholder="请输入" v-model:value="queryParam.inquirySuppiler" allow-clear AutoComplete="off"></a-input>
+                <ApiSelect
+                  :api="supplierOption"
+                  showSearch
+                  v-model:value="queryParam.inquirySuppiler"
+                  :filterOption="false"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -38,7 +56,16 @@
             <a-col :lg="8">
               <a-form-item name="productionClass" >
                 <template #label><span title="产品分类(production class)">产品分类(production class)</span></template>
-                <JSelectInput   v-model:value="queryParam.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                <ApiSelect
+                  :api="ClassList"
+                  showSearch
+                  v-model:value="queryParam.productionClass"
+                  :filterOption="false"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -50,7 +77,7 @@
             <a-col :lg="8">
               <a-form-item name="maker">
                 <template #label><span title="厂家(maker)">厂家(maker)</span></template>
-                <a-input placeholder="请输入厂家(maker)" v-model:value="queryParam.maker" allow-clear AutoComplete="off"></a-input>
+                <JDictSelectTag v-model:value="queryParam.maker" placeholder="请选择" dictCode="factory"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -127,12 +154,10 @@
   import {useModal} from '/@/components/Modal';
   import PurchaseInquiryFormModal from './components/PurchaseInquiryFormModal.vue'
   import {columns,} from './PurchaseInquiryForm.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit} from './purchaseInquiryForm.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,ProjectOption,supplierOption,ClassList} from './purchaseInquiryForm.api';
   import { cloneDeep } from "lodash-es";
-  import { useUserStore } from '/@/store/modules/user';
   import { defHttp } from '/@/utils/http/axios';
-  import { JDictSelectTag} from '/@/components/Form';
-  import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+  import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import { message } from 'ant-design-vue';
   import { useGlobSetting } from '/@/hooks/setting';
   const { domainUrl } = useGlobSetting();
@@ -142,8 +167,6 @@
   const checkedKeys = ref<Array<string | number>>([]);
   //注册model
   const [registerModal, {openModal}] = useModal();
-  const userStore = useUserStore();
-  var classOption = ref([]);
    //注册table数据
   const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
       tableProps:{
@@ -187,10 +210,6 @@
     });
     reload();
   }
-   // 自动请求并暴露内部方法
-   onMounted(() => {
-    getOptiom()
-  });
 
    /**
     * 新增事件
@@ -211,26 +230,6 @@
        showFooter: true,
      });
    }
-  //  产品分类
-  function getOptiom(){
-        defHttp
-            .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
-            .then((res) => {
-                if (res.success) {
-                  classOption.value = []
-                  res.result.records.forEach(element => {
-                      var obj = {
-                        label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:''
-                      };
-                      classOption.value.push( obj)
-                  });    
-                }
-            })
-            .finally(() => {
-                // loading.value = false;
-            });
-  }
    /**
     * 详情
    */