Prechádzať zdrojové kódy

采购报价选定-筛选条件修改

jingbb 4 mesiacov pred
rodič
commit
93c6bb0316

+ 1 - 1
src/views/purchase/purchaseQuotationFrm/purchaseQuotationFormList.vue

@@ -77,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">

+ 12 - 2
src/views/purchase/selectionQuotationForm/SelectionQuotationForm.api.ts

@@ -15,7 +15,9 @@ enum Api {
   purCodeSelectFormShipList = '/purCode/purQuotationSelection/queryPurQuotationSelectionShipByMainId',
   purCodeSelectFormProductList = '/purCode/purQuotationSelection/queryPurQuotationSelectionProductByMainId',
   submitBatch='/purCode/purQuotationSelection/submitBatch',
-  cancelSubmitBatch='/purCode/purQuotationSelection/returnSubmitBatch'
+  cancelSubmitBatch='/purCode/purQuotationSelection/returnSubmitBatch',
+  classList='baseCode/baseProductClass/list',
+  projectList='/baseCode/baseProjectArchive/list',
 }
 /**
  * 导出api
@@ -116,4 +118,12 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
       });
     }
   });
-}
+}
+//获取项目下拉框列表
+export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
+/**
+ * 分类列表接口
+ * @param params
+ */
+export const ClassList = (params) =>
+  defHttp.get({url: Api.classList, params});

+ 23 - 33
src/views/purchase/selectionQuotationForm/selectionQuotationFormList.vue

@@ -20,7 +20,16 @@
             <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">
@@ -32,7 +41,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">
@@ -44,7 +62,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">
@@ -121,11 +139,10 @@
   import {useModal} from '/@/components/Modal';
   import SelectQuotationFormModal from './components/SelectQuotationFormModal.vue'
   import {columns,} from './SelectionQuotationForm.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit} from './SelectionQuotationForm.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,ProjectOption,ClassList} from './SelectionQuotationForm.api';
   import { cloneDeep } from "lodash-es";
   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();
@@ -134,7 +151,6 @@
   const queryParam = reactive<any>({});
   //注册model
   const [registerModal, {openModal}] = useModal();
-  var classOption = ref([]);
    //注册table数据
   const { tableContext,onExportXls } = useListPage({
       tableProps:{
@@ -167,12 +183,6 @@
     })
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
-
-   // 自动请求并暴露内部方法
-   onMounted(() => {
-    getOptiom()
-  });
-
    /**
     * 新增事件
     */
@@ -192,26 +202,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;
-            });
-  }
    /**
     * 详情
    */