Parcourir la source

除库存管理节点-下拉框不可手动输入

jingbb il y a 3 mois
Parent
commit
6b08529a41
45 fichiers modifiés avec 422 ajouts et 521 suppressions
  1. 15 23
      src/views/BasicData/components/productArchiveModel.vue
  2. 4 3
      src/views/BasicData/components/productCassificationModel.vue
  3. 12 6
      src/views/baseCode/ProjectArchive/BaseProjectArchive.data.ts
  4. 8 4
      src/views/baseCode/ShipArchive/BaseShipArchive.data.ts
  5. 42 68
      src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts
  6. 1 8
      src/views/cuspCode/CustomerProfile/CuspCustomerProfileList.vue
  7. 1 1
      src/views/cuspCode/DeadlineReminder/deadlindeReminderList.vue
  8. 37 27
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts
  9. 1 5
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluationList.vue
  10. 16 5
      src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue
  11. 2 1
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts
  12. 1 0
      src/views/publicComponents/components/AddProjectModal.vue
  13. 6 3
      src/views/purchase/arrivedGoods/ArriveGoodsList.vue
  14. 18 31
      src/views/purchase/arrivedGoods/components/ArriveGoodsFormForm.vue
  15. 2 1
      src/views/purchase/commissionPayRequest/commissionPayRequestList.vue
  16. 2 1
      src/views/purchase/commissionPayRequest/components/commissionPayRequestForm.vue
  17. 2 1
      src/views/purchase/freightPurchaseOrder/FreightPurchaseOrderList.vue
  18. 19 35
      src/views/purchase/freightPurchaseOrder/components/FreightPurOrderForm.vue
  19. 2 1
      src/views/purchase/payment/paymentList.vue
  20. 2 1
      src/views/purchase/purPaymentRequest/components/purPaymentRequestForm.vue
  21. 2 1
      src/views/purchase/purPaymentRequest/purPaymentRequesttList.vue
  22. 0 5
      src/views/purchase/purchaseInquiryForm/PurchaseInquiryForm.data.ts
  23. 22 59
      src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue
  24. 6 3
      src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue
  25. 14 30
      src/views/purchase/purchaseOrder/PurchaseOrderFormList.vue
  26. 3 5
      src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue
  27. 18 33
      src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue
  28. 7 3
      src/views/purchase/purchaseQuotationFrm/purchaseQuotationFormList.vue
  29. 4 2
      src/views/purchase/selectionQuotationForm/selectionQuotationFormList.vue
  30. 4 2
      src/views/saleCode/advancePayment/advancePaymentList.vue
  31. 25 29
      src/views/saleCode/advancePayment/components/advancePaymentForm.vue
  32. 7 3
      src/views/saleCode/deliveryNotice/deliveryNoticeList.vue
  33. 1 1
      src/views/saleCode/quotation/components/quotationFormForm.vue
  34. 5 28
      src/views/saleCode/quotation/quotation.vue
  35. 26 30
      src/views/saleCode/receiptOrder/components/receiptOrderForm.vue
  36. 5 2
      src/views/saleCode/receiptOrder/receiptOrdertList.vue
  37. 4 1
      src/views/saleCode/rfp/SaleRfp.data.ts
  38. 1 1
      src/views/saleCode/rfp/components/SaleRfpModal.vue
  39. 16 4
      src/views/saleCode/saleContract/SaleContract.data.ts
  40. 5 2
      src/views/saleCode/saleInquiryForm/SaleInquiryForm.api.ts
  41. 42 46
      src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue
  42. 1 1
      src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue
  43. 1 0
      src/views/saleCode/salesInvoice/components/saleInvoiceForm.vue
  44. 4 2
      src/views/saleCode/salesInvoice/salesInvoiceList.vue
  45. 6 3
      src/views/saleCode/salesOrder/SaleOrderFormList.vue

+ 15 - 23
src/views/BasicData/components/productArchiveModel.vue

@@ -13,7 +13,16 @@
            <a-row :gutter="24">
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classId" label="分类(class)">
-                <JSelectInput   v-model:value="model.classId"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                <ApiSelect
+                                    :api="classOption"
+                                    :showSearch="true"
+                                    v-model:value="model.classId"
+                                    :filterOption="true"
+                                    resultField="records"
+                                    labelField="name"
+                                    valueField="id"
+                                    optionFilterProp='label'
+                                />
                </a-form-item>
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
@@ -104,7 +113,7 @@
 <script lang="ts" setup>
   import { defHttp } from '/@/utils/http/axios';
   import { message } from 'ant-design-vue';
-  import { JDictSelectTag} from '/@/components/Form';
+  import { JDictSelectTag,JSearchSelect,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { ref, reactive, toRaw, toRefs, watch, nextTick, onMounted, getCurrentInstance } from 'vue';
   const emit = defineEmits([ 'success']); //定义emit
@@ -112,7 +121,6 @@
   var visible = ref(false)
   let title = ref('')
   let loading = ref(false)
-  let classOption = ref([])
   let model = ref({
     classId:'',
     code:'',
@@ -173,25 +181,6 @@
           });
     
   }
-  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;
-        });
-  }
   function handleCancel() {
     form.value.resetFields()
     visible.value = false
@@ -206,7 +195,10 @@
         title.value = '编辑档案(edit)'
         model.value = record
     }
-    getOptiom()
+  }
+  function classOption(){
+      var params = {pageSize:-1}
+      return defHttp.get({ url: 'baseCode/baseProductClass/list',params})
   }
   
   defineExpose({

+ 4 - 3
src/views/BasicData/components/productCassificationModel.vue

@@ -74,10 +74,11 @@
       label: '上级分类(parent)',
       //字段
       field: 'parentId',
-      //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
-      component: 'Select',
+       //组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
+       component: 'JSearchSelect',
       componentProps:{
-        options: classOption,
+        dict: 'base_product_class,name,id,del_flag=0',
+        // options: classOption,
         stringToNumber: true,
       },
     },

+ 12 - 6
src/views/baseCode/ProjectArchive/BaseProjectArchive.data.ts

@@ -64,7 +64,7 @@ export const searchFormSchema: FormSchema[] = [
       componentProps: {
               // mode: 'multiple',//multiple: 多选;不填写为单选
               //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
-              api: ()=> defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list?pageSize=-1' }),
+              api: ()=> defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list' }),
               //数值转成String
               numberToString: false,
               //标题字段
@@ -72,9 +72,12 @@ export const searchFormSchema: FormSchema[] = [
               //值字段
               valueField: 'id',
               //请求参数
-              params:{},
+              params:{pageSize:-1},
               //返回结果字段
-              resultField:'records'
+              resultField:'records',
+              filterOption:"true",
+              optionFilterProp:'label',
+              showSearch:"true"
             },
       //colProps: {span: 6},
  	  },
@@ -111,7 +114,7 @@ export const formSchema: FormSchema[] = [
      componentProps: {
              // mode: 'multiple',//multiple: 多选;不填写为单选
              //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
-             api: ()=> defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list?pageSize=-1' }),
+             api: ()=> defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list' }),
              //数值转成String
              numberToString: false,
              //标题字段
@@ -119,9 +122,12 @@ export const formSchema: FormSchema[] = [
              //值字段
              valueField: 'id',
              //请求参数
-             params:{},
+             params:{pageSize:-1},
              //返回结果字段
-             resultField:'records'
+             resultField:'records',
+             filterOption:"true",
+             optionFilterProp:'label',
+             showSearch:"true"
            },
   },
   {

+ 8 - 4
src/views/baseCode/ShipArchive/BaseShipArchive.data.ts

@@ -83,7 +83,8 @@ export const searchFormSchema: FormSchema[] = [
     component: 'JDictSelectTag',
     labelWidth: 150,
     componentProps:{
-      dictCode:"ship_factory"
+      dictCode:"ship_factory",
+      showSearch:true
    },
     //colProps: {span: 6},
  },
@@ -111,7 +112,8 @@ export const searchFormSchema: FormSchema[] = [
   component: 'JDictSelectTag',
   labelWidth: 150,
   componentProps:{
-    dictCode:"ship_type"
+    dictCode:"ship_type",
+    showSearch:true
  },
       //colProps: {span: 6},
 },
@@ -176,7 +178,8 @@ export const formSchema: FormSchema[] = [
     field: 'shipType',
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:"ship_type"
+        dictCode:"ship_type",
+        showSearch:true
      },
   },
   {
@@ -184,7 +187,8 @@ export const formSchema: FormSchema[] = [
     field: 'shipFactory',
     component: 'JDictSelectTag',
     componentProps:{
-        dictCode:"ship_factory"
+        dictCode:"ship_factory",
+        showSearch:true
      },
   },
   {

+ 42 - 68
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

@@ -179,7 +179,8 @@ export const searchFormSchema: FormSchema[] = [
       field: "country",
       component: 'JDictSelectTag',
       componentProps:{
-          dictCode:"country"
+          dictCode:"country",
+          showSearch: true
       },
       labelWidth: 150,
       //colProps: {span: 6},
@@ -198,10 +199,25 @@ export const searchFormSchema: FormSchema[] = [
  {
     label: "中间人(intermediator)",
     field: "intermediator",
-    component: 'JDictSelectTag',
-    componentProps:{
-        dictCode:"intermediator"
-     },
+    component: 'ApiSelect',
+    componentProps: {
+            // mode: 'multiple',//multiple: 多选;不填写为单选
+            //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
+            api: ()=> defHttp.get({ url: '/cuspCode/cuspIntermediator/list' }),
+            //数值转成String
+            numberToString: false,
+            //标题字段
+            labelField: 'name',
+            //值字段
+            valueField: 'id',
+            //请求参数
+            params:{pageSize:-1,status:1},
+            //返回结果字段
+            resultField:'records',
+            filterOption:"true",
+            optionFilterProp:'label',
+            showSearch:"true"
+          },
     labelWidth: 150,
     //colProps: {span: 6},
   },
@@ -366,7 +382,8 @@ export const formSchema: FormSchema[] = [
     labelWidth: 250,
     component: 'JDictSelectTag',
     componentProps:{
-      dictCode:"country"
+      dictCode:"country",
+      showSearch: true
    },
   },
   {
@@ -423,10 +440,25 @@ export const formSchema: FormSchema[] = [
     field: 'intermediator',
     colProps: {span: 12},
     labelWidth: 200,
-    component: 'JSelectInput',
-    componentProps:{
-      options:intermediatorOption
-     },
+    component: 'ApiSelect',
+    componentProps: {
+            // mode: 'multiple',//multiple: 多选;不填写为单选
+            //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
+            api: ()=> defHttp.get({ url: '/cuspCode/cuspIntermediator/list' }),
+            //数值转成String
+            numberToString: false,
+            //标题字段
+            labelField: 'name',
+            //值字段
+            valueField: 'id',
+            //请求参数
+            params:{pageSize:-1,status:1},
+            //返回结果字段
+            resultField:'records',
+            filterOption:"true",
+            optionFilterProp:'label',
+            showSearch:"true"
+          },
   },
   {
     label: '中间人佣金(intermediator commission)',
@@ -540,50 +572,6 @@ export const cuspCustomerProfileManColumns: JVxeColumn[] = [
       slotName: 'action',
     },
   ]
-
-
-// 高级查询数据
-export const superQuerySchema = {
-  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
-  code: {title: '编码',order: 2,view: 'text', type: 'string',},
-  name: {title: '名称',order: 3,view: 'text', type: 'string',},
-  abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
-  nameUsedBefore: {title: '曾用名',order: 5,view: 'text', type: 'string',},
-  dutyParagraph: {title: '税号',order: 6,view: 'text', type: 'string',},
-  legalPerson: {title: '法人',order: 7,view: 'text', type: 'string',},
-  contacts: {title: '联系人',order: 8,view: 'text', type: 'string',},
-  phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
-  email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
-  registerAddress: {title: '注册地址',order: 11,view: 'text', type: 'string',},
-  officeAddress: {title: '办公地址',order: 12,view: 'text', type: 'string',},
-  invoiceAddress: {title: '发票地址',order: 13,view: 'text', type: 'string',},
-  currency: {title: '币种',order: 14,view: 'text', type: 'string',},
-  country: {title: '国家',order: 15,view: 'text', type: 'string',},
-  paymentTerms: {title: '付款条件',order: 16,view: 'list', type: 'string',dictCode: '',},
-  creditLimit: {title: '信用额度',order: 17,view: 'number', type: 'number',},
-  discount: {title: '折扣',order: 18,view: 'number', type: 'number',},
-  commission: {title: '佣金',order: 19,view: 'number', type: 'number',},
-  intermediator: {title: '中间人',order: 20,view: 'text', type: 'string',},
-  intermediatorCommission: {title: '中间人佣金',order: 21,view: 'number', type: 'number',},
-  priority: {title: '优先级',order: 22,view: 'list', type: 'string',dictCode: '',},
-  notes: {title: '备注',order: 23,view: 'text', type: 'string',},
-  files: {title: '文件',order: 24,view: 'text', type: 'string',},
-  //子表高级查询
-  cuspCustomerProfileMan: {
-    title: '客户档案-联系人',
-    view: 'table',
-    fields: {
-        status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
-        headId: {title: '主表主键(客户档案)',order: 2,view: 'text', type: 'string',},
-        code: {title: '编码',order: 3,view: 'text', type: 'string',},
-        name: {title: '姓名',order: 4,view: 'text', type: 'string',},
-        mobile: {title: '电话',order: 5,view: 'text', type: 'string',},
-        email: {title: '邮箱',order: 6,view: 'text', type: 'string',},
-        position: {title: '职位',order: 7,view: 'text', type: 'string',},
-    }
-  },
-};
-
 /**
 * 流程表单调用这个方法获取formSchema
 * @param param
@@ -592,17 +580,3 @@ export function getBpmFormSchema(_formData): FormSchema[]{
 // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
   return formSchema;
 }
-export function getIntermediatorOptions(){
-  let params = {pageSize:'-1',status:1}
-  defHttp.get({url:'/cuspCode/cuspIntermediator/list',params}, { isTransformResponse: false }).then(res=>{
-    if(res){
-      intermediatorOption.value.splice(0,intermediatorOption.value.length);
-        res.result.records.forEach(item=>{
-          intermediatorOption.value.push({
-            label: item.name,
-            value: item.id
-          })
-        })      
-    }
-  })
-}

+ 1 - 8
src/views/cuspCode/CustomerProfile/CuspCustomerProfileList.vue

@@ -21,7 +21,6 @@
               </a-button>
         </a-dropdown>
         <!-- 高级查询 -->
-        <!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" /> -->
       </template>
        <!--操作栏-->
       <template #action="{ record }">
@@ -42,7 +41,7 @@
   import { useListPage } from '/@/hooks/system/useListPage'
   import {useModal} from '/@/components/Modal';
   import CuspCustomerProfileModal from './components/CuspCustomerProfileModal.vue'
-  import {columns, searchFormSchema, superQuerySchema,getIntermediatorOptions} from './CuspCustomerProfile.data';
+  import {columns, searchFormSchema, superQuerySchema} from './CuspCustomerProfile.data';
   import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './CuspCustomerProfile.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { useUserStore } from '/@/store/modules/user';
@@ -88,12 +87,6 @@
     })
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
-  onMounted(() => {
-    getIntermediatorOptions()
-  })
-  // 高级查询配置
-  const superQueryConfig = reactive(superQuerySchema);
-
   /**
    * 高级查询事件
    */

+ 1 - 1
src/views/cuspCode/DeadlineReminder/deadlindeReminderList.vue

@@ -42,7 +42,7 @@
                         </a-col>
                         <a-col :md="6" :sm="8">
                             <a-form-item label="国家(country)">
-                                <JDictSelectTag v-model:value="queryParams.country" placeholder="请选择" dictCode="country"/>
+                                <JDictSelectTag v-model:value="queryParams.country" placeholder="请选择" dictCode="country" showSearch/>
                             </a-form-item>
                         </a-col>
                        <!-- <a-col :md="6" :sm="8">

+ 37 - 27
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts

@@ -1,13 +1,7 @@
 import {BasicColumn} from '/@/components/Table';
 import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
 import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
-import { getWeekMonthQuarterYear } from '/@/utils';
 import { defHttp } from '/@/utils/http/axios';
-import {ref,onMounted} from 'vue';
-import { optionOptions } from 'ant-design-vue/es/vc-mentions/src/Option';
-var supplierOption = ref([])
 //列表数据
 export const columns: BasicColumn[] = [
    {
@@ -75,11 +69,26 @@ export const searchFormSchema: FormSchema[] = [
      {
         label: "供应商(supplier)",
         field: "supplierId",
-        component: 'JSelectInput',
         labelWidth:150,
-        componentProps:{
-          options:supplierOption
-        },
+        component: 'ApiSelect',
+        componentProps: {
+                // mode: 'multiple',//multiple: 多选;不填写为单选
+                //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
+                api: ()=> defHttp.get({ url: '/cuspCode/cuspSupplierProfile/list' }),
+                //数值转成String
+                numberToString: false,
+                //标题字段
+                labelField: 'name',
+                //值字段
+                valueField: 'id',
+                //请求参数
+                params:{pageSize:-1},
+                //返回结果字段
+                resultField:'records',
+                filterOption:"true",
+                optionFilterProp:'label',
+                showSearch:"true"
+              },
         //colProps: {span: 6},
     },
      {
@@ -137,10 +146,25 @@ export const formSchema: FormSchema[] = [
   {
     label: '供应商(supplier)',
     field: 'supplierId',
-    component: 'JSelectInput',
+    component: 'ApiSelect',
     labelWidth:150,
-    componentProps:{
-      options:supplierOption
+    componentProps: {
+      // mode: 'multiple',//multiple: 多选;不填写为单选
+      //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
+      api: ()=> defHttp.get({ url: '/cuspCode/cuspSupplierProfile/list' }),
+      //数值转成String
+      numberToString: false,
+      //标题字段
+      labelField: 'name',
+      //值字段
+      valueField: 'id',
+      //请求参数
+      params:{pageSize:-1},
+      //返回结果字段
+      resultField:'records',
+      filterOption:"true",
+      optionFilterProp:'label',
+      showSearch:"true"
     },
   },
   {
@@ -244,17 +268,3 @@ export function getBpmFormSchema(_formData): FormSchema[]{
 // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
   return formSchema;
 }
-export function getSupplierOptions(){
-  let params = {pageSize:'-1'}
-  defHttp.get({url:'/cuspCode/cuspSupplierProfile/list',params}, { isTransformResponse: false }).then(res=>{
-    if(res){
-      res.result.records.forEach(item=>{
-        supplierOption.value.push({
-          label: item.name,
-          value: item.id
-        })
-      })
-    }
-  })
-}
-export const supplierOptions = supplierOption.value

+ 1 - 5
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluationList.vue

@@ -42,7 +42,7 @@
   import {useModal} from '/@/components/Modal';
   import { message } from 'ant-design-vue';
   import CuspSupplierEvaluationModal from './components/CuspSupplierEvaluationModal.vue'
-  import {columns, searchFormSchema, superQuerySchema,getSupplierOptions} from './CuspSupplierEvaluation.data';
+  import {columns, searchFormSchema} from './CuspSupplierEvaluation.data';
   import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,supplierList} from './CuspSupplierEvaluation.api';
   import { useUserStore } from '/@/store/modules/user';
 
@@ -90,10 +90,6 @@
     })
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
-  onMounted(() => {
-    getSupplierOptions()
-  });
-
 
    /**
     * 新增事件

+ 16 - 5
src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue

@@ -31,7 +31,16 @@
                 </a-col>
                 <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="8">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierId" label="供应商(supplier)">
-                    <JSelectInput   v-model:value="model.supplierId"  placeholder="请选择" :options="supplierOptions" :disabled="!showFooter"></JSelectInput>
+                    <ApiSelect
+                                    :api="supplierOption"
+                                    :showSearch="true"
+                                    v-model:value="model.supplierId"
+                                    :filterOption="true"
+                                    resultField="records"
+                                    labelField="name"
+                                    valueField="id"
+                                    optionFilterProp='label'
+                                />
                   </a-form-item>
                 </a-col>
                 <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="8">
@@ -76,10 +85,8 @@
 <script lang="ts" setup>
     import {ref, computed, unref,reactive} from 'vue';
     import { defHttp } from '/@/utils/http/axios';
-    import {formSchema,cuspSupplierEvaluationScoreColumns,supplierOptions} from '../CuspSupplierEvaluation.data';
-    import {saveOrUpdate,cuspSupplierEvaluationScoreList} from '../CuspSupplierEvaluation.api';
-    import { JDictSelectTag } from '/@/components/Form';
-    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+    import {saveOrUpdate} from '../CuspSupplierEvaluation.api';
+    import { JDictSelectTag, ApiSelect} from '/@/components/Form';
     // Emits声明
     const emit = defineEmits(['register','success']);
     const isUpdate = ref(true);
@@ -219,6 +226,10 @@
     model.value.deliveryTimeScore = model.value.deliveryTimeScore?model.value.deliveryTimeScore:'0'
     model.value.serviceScore = model.value.serviceScore?model.value.serviceScore:'0'
   }
+  function supplierOption(){
+      var params = {pageSize:-1}
+      return defHttp.get({ url: '/cuspCode/cuspSupplierProfile/list',params})
+  }
   defineExpose({
     getAdd,
     getEdit,

+ 2 - 1
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts

@@ -162,7 +162,8 @@ export const searchFormSchema: FormSchema[] = [
       component: 'JDictSelectTag',
       labelWidth: 150,
       componentProps:{
-        dictCode: 'country'
+        dictCode: 'country',
+        showSearch: true,
       },
       //colProps: {span: 6},
  	},

+ 1 - 0
src/views/publicComponents/components/AddProjectModal.vue

@@ -24,6 +24,7 @@
                                     labelField="name"
                                     valueField="id"
                                     optionFilterProp='label'
+                                    :params="{pageSize:-1}"
                                 />
                                 <!-- <a-input v-model:value="model.customer" placeholder="请输入客户(customer)" ></a-input> -->
                             </a-form-item>

+ 6 - 3
src/views/purchase/arrivedGoods/ArriveGoodsList.vue

@@ -24,11 +24,12 @@
                   :api="ProjectOption"
                   showSearch
                   v-model:value="queryParam.project"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -39,11 +40,12 @@
                   :api="supplierOption"
                   showSearch
                   v-model:value="queryParam.supplier"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -60,11 +62,12 @@
                   :api="ClassList"
                   showSearch
                   v-model:value="queryParam.productionClass"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 18 - 31
src/views/purchase/arrivedGoods/components/ArriveGoodsFormForm.vue

@@ -21,7 +21,18 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="供应商(supplier)" v-bind="validateInfos.supplierName" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="ArriveGoodsForm-supplierName" name="supplierName">
-                <JSelectInput   v-model:value="formData.supplier"  placeholder="请选择" allow-clear  :options="supplierOption" @change="changeSupplier"></JSelectInput>
+                <ApiSelect
+                  :api="supplierOption"
+                  showSearch
+                  v-model:value="formData.supplier"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  @change="changeSupplier"
+                  optionFilterProp='label'
+                />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -173,7 +184,7 @@
   import { defineComponent, ref, reactive, computed, toRaw} from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryArriveGoodsShipTable, queryArriveGoodsDetailByMainId, queryDataById,ClassList, saveOrUpdate} from '../ArriveGoodsForm.api';
+  import { queryArriveGoodsShipTable, queryArriveGoodsDetailByMainId, queryDataById,ClassList, saveOrUpdate,supplierOption} from '../ArriveGoodsForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {ArriveGoodsFormShipColumns, ArriveGoodsDetailColumns} from '../ArriveGoodsForm.data';
   import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
@@ -261,7 +272,6 @@
         notes:'',
         arrivalDetails:"",
       });
-      var supplierOption = ref([]);
       //表单验证
       const validatorRules = reactive({
       });
@@ -297,7 +307,6 @@
         formData.purchasemanName=userStore.getUserInfo.realname;
         formData.purchaseDepartment = userStore.getUserInfo.orgCode
         formData.purchaseDepartmentName = userStore.getUserInfo.orgName
-        getSupplierOption()
       }
       async function edit(row) {
         //主表数据
@@ -307,7 +316,6 @@
         ArriveGoodsFormShipFormShipTable.dataSource = [...ArriveGoodsFormShipFormShipDataList];
         const arriveDetailsFormProductDataList = await queryArriveGoodsDetailByMainId(row['id']);
         arriveDetailsFormProductTable.dataSource = [...arriveDetailsFormProductDataList];
-        getSupplierOption()
         if(arriveDetailsFormProductTable.dataSource.length!==0){
           notAllowEdit.value = true
         }else{
@@ -434,32 +442,11 @@
           formData.recipientAddress = data[0].recipientAddress
           getShipList(data[0].headId)
       }
-      function getSupplierOption(){
-        defHttp
-            .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
-            .then((res) => {
-                if (res.success) {
-                  supplierOption.value = []
-                  res.result.records.forEach(element => {
-                      var obj = {
-                        label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:''
-                      };
-                      supplierOption.value.push( obj)
-                  });    
-                }
-            })
-            .finally(() => {
-                // loading.value = false;
-            });
-      }
-      function changeSupplier(prop){
+      async function changeSupplier(prop){
         if(prop){
-          supplierOption.value.map(item=>{
-            if(item.value==prop){
-              formData.supplierName = item.label
-            }
-          })
+          var params={id:formData.supplier}
+          var obj = await supplierOption(params)
+          formData.suppilerName = obj.records[0].name
         }else{
           formData.supplier = ''
           formData.supplierName = ''
@@ -505,7 +492,7 @@
         addAddiveGoods,
         changeSupplier,
         supplierOption,
-        ClassList
+        ClassList,
       }
     }
   });

+ 2 - 1
src/views/purchase/commissionPayRequest/commissionPayRequestList.vue

@@ -30,11 +30,12 @@
                     :api="listPayee"
                     showSearch
                     v-model:value="queryParam.payee"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                     optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>

+ 2 - 1
src/views/purchase/commissionPayRequest/components/commissionPayRequestForm.vue

@@ -25,11 +25,12 @@
                   :api="listPayee"
                   showSearch
                   v-model:value="formData.payee"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 2 - 1
src/views/purchase/freightPurchaseOrder/FreightPurchaseOrderList.vue

@@ -30,10 +30,11 @@
                   :api="Supplierlist"
                   showSearch
                   v-model:value="queryParam.supplier"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 19 - 35
src/views/purchase/freightPurchaseOrder/components/FreightPurOrderForm.vue

@@ -21,7 +21,17 @@
 						</a-col>	
 						<a-col :span="12">
 							<a-form-item label="供应商(supplier)" v-bind="validateInfos.supplier"  id="SaleOrderForm-supplierName" name="supplierName">
-                <JSelectInput   v-model:value="formData.supplier"  placeholder="请选择" allow-clear  :options="supplierOption" @change="changeSupplier"></JSelectInput>
+                <ApiSelect
+                  :api="Supplierlist"
+                  showSearch
+                  v-model:value="formData.supplier"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  @change="changeSupplier"
+                  optionFilterProp='label'
+                />
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
@@ -95,7 +105,7 @@
   import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
   import SelectDeliveryNoticeModal from './SelectDeliveryNoticeModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
-  import { JDictSelectTag} from '/@/components/Form';
+  import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form, message } from 'ant-design-vue';
   import moment from 'moment';
@@ -108,7 +118,8 @@
       JDictSelectTag,
       JSelectInput,
       SelectPrpductModal,
-      SelectDeliveryNoticeModal
+      SelectDeliveryNoticeModal,
+      ApiSelect
     },
     props:{
       formDisabled:{
@@ -148,7 +159,6 @@
         currency:'',
         notes:'',
       });
-      var supplierOption = ref([]);
       //表单验证
       const validatorRules = reactive({
         supplier: [
@@ -183,7 +193,6 @@
         DeliveryDoticeTable.dataSource = [];
         FreightProductDetailsTable.dataSource = [];
         activeKey.value = 'FreightProductDetails'
-        getSupplierOption()
       }
       async function edit(row) {
         //主表数据
@@ -193,7 +202,6 @@
         DeliveryDoticeTable.dataSource = [...DeliveryDoticeDataList];
         const FreightProductDetailsDataList = await queryFreightProDetailsByMainId(row['id']);
         FreightProductDetailsTable.dataSource = [...FreightProductDetailsDataList];
-        getSupplierOption()
       }
 
       async function queryMainData(id) {
@@ -216,13 +224,11 @@
 
       async function getFormData() {
         try {
-          debugger
           // 触发表单验证
           await validate();
         } catch ({ errorFields }) {
           if (errorFields) {
             const firstField = errorFields[0];
-            debugger
             if (firstField) {
               formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
             }
@@ -267,32 +273,11 @@
         newArray.splice(prop.rowIndex, 1)
         DeliveryDoticeTable.dataSource = newArray        
       }
-      function getSupplierOption(){
-        defHttp
-            .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
-            .then((res) => {
-                if (res.success) {
-                  supplierOption.value = []
-                  res.result.records.forEach(element => {
-                      var obj = {
-                        label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:''
-                      };
-                      supplierOption.value.push( obj)
-                  });    
-                }
-            })
-            .finally(() => {
-                // loading.value = false;
-            });
-      }
-      function changeSupplier(prop){
+      async function changeSupplier(prop){
         if(prop){
-          supplierOption.value.map(item=>{
-            if(item.value==prop){
-              formData.supplierName = item.label
-            }
-          })
+          var params={id:formData.supplier}
+          var obj = await Supplierlist(params)
+          formData.supplierName = obj.records[0].name
         }else{
           formData.supplier = ''
           formData.supplierName = ''
@@ -355,13 +340,12 @@
         handleDelete1,
         Supplierlist,
         changeSupplier,
-        supplierOption,
         SelectPrpductModalRef,
         SelectProduct,
         addProduct,
         SelectDeliveryNoticeModalRef,
         addDelivery,
-        selectDelivery
+        selectDelivery,
       }
     }
   });

+ 2 - 1
src/views/purchase/payment/paymentList.vue

@@ -30,11 +30,12 @@
                     :api="supplierOption"
                     showSearch
                     v-model:value="queryParam.sellerId"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                     optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>

+ 2 - 1
src/views/purchase/purPaymentRequest/components/purPaymentRequestForm.vue

@@ -20,12 +20,13 @@
                   :api="supplierOption"
                   showSearch
                   v-model:value="formData.supplier"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
                   @change="changeSupplier"
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 2 - 1
src/views/purchase/purPaymentRequest/purPaymentRequesttList.vue

@@ -24,11 +24,12 @@
                   :api="supplierOption"
                   showSearch
                   v-model:value="queryParam.supplier"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
                 </a-form-item>
               </a-col>

+ 0 - 5
src/views/purchase/purchaseInquiryForm/PurchaseInquiryForm.data.ts

@@ -15,12 +15,7 @@ export const columns: BasicColumn[] = [
     title: '单据日期(bill date)',
     align:"center",
     dataIndex: 'billDate',
-    customRender:({text}) =>{
-      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
-      return text;
-    },
    },
-  
    {
     title: '询价项目(inquiry project)',
     align:"center",

+ 22 - 59
src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue

@@ -22,7 +22,18 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="PuechaseInquiryFormForm-inquirySuppiler" name="inquirySuppiler" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1">
-                  <JSelectInput   v-model:value="formData.inquirySuppiler"  placeholder="请选择" allow-clear  :options="supplierOption" @change="changeSupplier"></JSelectInput>
+                <ApiSelect
+                  :api="supplierOption"
+                  showSearch
+                  v-model:value="formData.inquirySuppiler"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  @change="changeSupplier"
+                  optionFilterProp='label'
+                />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -37,7 +48,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="PuechaseInquiryFormForm-productionClass" name="productionClass">
-                <JSelectInput   v-model:value="formData.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                <JDictSelectTag v-model:value="formData.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false" showSearch/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -152,7 +163,7 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryQurcodeInquiryFormShipListByMainId, queryPurcodeInquiryFormProductListByMainId, queryDataById, saveOrUpdate } from '../purchaseInquiryForm.api';
+  import { queryQurcodeInquiryFormShipListByMainId, queryPurcodeInquiryFormProductListByMainId, queryDataById, saveOrUpdate,supplierOption } from '../purchaseInquiryForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {PuechaseInquiryFormShipColumns, PuechaseInquiryFormProductColumns} from '../PurchaseInquiryForm.data';
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
@@ -161,7 +172,7 @@
   import SelectCustomerInquiryModal from './SelectCustomerInquiryModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
-  import { JDictSelectTag} from '/@/components/Form';
+  import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form ,message} from 'ant-design-vue';
   import moment from 'moment';
@@ -178,6 +189,7 @@
       JDictSelectTag,
       JSelectInput,
       SelectCustomerInquiryModal,
+      ApiSelect
     },
     props:{
       formDisabled:{
@@ -189,7 +201,6 @@
     },
     emits:['success'],
     setup(props, {emit}) {
-      var classOption = ref([]);
       const loading = ref(false);
       const formRef = ref();
       var SelectPrpductModalRef = ref()
@@ -211,7 +222,6 @@
       var BaseShipArchiveAccessoriesListRef = ref();
       const activeKey = ref('PuechaseInquiryFormProduct');
       var notAllowEdit = ref(false);
-      var supplierOption = ref([]);
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -278,8 +288,6 @@
         PuechaseInquiryFormShipTable.dataSource = [];
         PuechaseInquiryFormProductTable.dataSource = [];
         activeKey.value = 'PuechaseInquiryFormProduct'
-        getSupplierOption()
-        getOptiom()
         inquiryPeriod.value = []
         notAllowEdit.value=false
       }
@@ -292,8 +300,6 @@
         PuechaseInquiryFormShipTable.dataSource = [...PuechaseInquiryFormShipDataList];
         const PuechaseInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
         PuechaseInquiryFormProductTable.dataSource = [...PuechaseInquiryFormProductDataList];
-        getSupplierOption()
-        getOptiom()
         inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
         inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
         notAllowEdit.value=true
@@ -488,26 +494,6 @@
       function onSearchProject(){
         SelectProjectModalRef.value.getTable()
       }
-      function getSupplierOption(){
-        defHttp
-            .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
-            .then((res) => {
-                if (res.success) {
-                  supplierOption.value = []
-                  res.result.records.forEach(element => {
-                      var obj = {
-                        label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:'',
-                        paymentTerms:element.paymentTerms?element.paymentTerms:''
-                      };
-                      supplierOption.value.push( obj)
-                  });    
-                }
-            })
-            .finally(() => {
-                // loading.value = false;
-            });
-      }
       function onChangeInquiryPeriod(data){
         inquiryPeriod.value = data
         formData.inquiryPeriodBegin = data[0].format('YYYY-MM-DD')
@@ -516,38 +502,18 @@
       function SelectCustomerInquiry(){
           SelectCustomerInquiryModalRef.value.getTable(formData)
       }
-      function changeSupplier(prop){
+      async function changeSupplier(prop){ 
         if(prop){
-          supplierOption.value.map(item=>{
-            if(item.value==prop){
-              formData.suppilerName = item.label
-              formData.paymentTerms = item.paymentTerms
-            }
-          })
+          var params={id:formData.inquirySuppiler}
+          var obj = await supplierOption(params)
+          formData.suppilerName = obj.records[0].name
+          formData.paymentTerms = obj.records[0].paymentTerms
         }else{
           formData.inquirySuppiler = ''
           formData.suppilerName = ''
         }
         
       }
-      //  产品分类
-      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;
-          });
-      }
       return {
         PuechaseInquiryFormShipTableRef,
         PuechaseInquiryFormShipTable,
@@ -581,16 +547,13 @@
         SelectCustomerInquiryModalRef,
         onSearchProject,
         addProject,
-        getSupplierOption,
-        supplierOption,
         inquiryPeriod,
         onChangeInquiryPeriod,
         SelectCustomerInquiry,
         addProductFromCustomer,
         changeSupplier,
         notAllowEdit,
-        getOptiom,
-        classOption
+        supplierOption
       }
     }
   });

+ 6 - 3
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.inquiryProject"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
               </a-form-item>
             </a-col>
@@ -39,11 +40,12 @@
                   :api="supplierOption"
                   showSearch
                   v-model:value="queryParam.inquirySuppiler"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -60,11 +62,12 @@
                   :api="ClassList"
                   showSearch
                   v-model:value="queryParam.productionClass"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 14 - 30
src/views/purchase/purchaseOrder/PurchaseOrderFormList.vue

@@ -26,7 +26,17 @@
             <a-col :lg="8">
               <a-form-item name="supplier">
                 <template #label><span title="供应商(supplier)">供应商(supplier)</span></template>
-                <a-input placeholder="请输入供应商(supplier)" v-model:value="queryParam.supplier" allow-clear ></a-input>
+                <ApiSelect
+                  :api="supplierOption"
+                  showSearch
+                  v-model:value="queryParam.supplier"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  optionFilterProp='label'
+                />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -38,7 +48,7 @@
             <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" style="width: 100%;"></JSelectInput>
+                <JDictSelectTag v-model:value="queryParam.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false" showSearch/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -158,10 +168,10 @@
   import {useModal} from '/@/components/Modal';
   import PurchaseOrderFormModal from './components/PurchaseOrderFormModal.vue'
   import {columns, superQuerySchema} from './PurchaseOrderForm.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,bacthClose,cancelBatchClose,bacthConfirm,cancelBatchConfirm} from './PurchaseOrderyForm.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,bacthClose,cancelBatchClose,bacthConfirm,cancelBatchConfirm,supplierOption} from './PurchaseOrderyForm.api';
   import { cloneDeep } from "lodash-es";
   import { defHttp } from '/@/utils/http/axios';
-  import { JDictSelectTag} from '/@/components/Form';
+  import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
   import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
@@ -176,7 +186,6 @@
   const queryParam = reactive<any>({});
   //注册model
   const [registerModal, {openModal}] = useModal();
-  var classOption = ref([]);
    //注册table数据
   const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
       tableProps:{
@@ -222,11 +231,6 @@
     });
     reload();
   }
-   // 自动请求并暴露内部方法
-   onMounted(() => {
-    getOptiom()
-  });
-
    /**
     * 新增事件
     */
@@ -279,26 +283,6 @@
    function handleExportInvoice(){
 
    }
-  //  产品分类
-  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;
-            });
-  }
    /**
     * 详情
    */

+ 3 - 5
src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

@@ -38,7 +38,7 @@
                   resultField="records"
                   labelField="name"
                   valueField="id"
-                  :disabled="notAllowEdit"
+                  disabled
                 />
 							</a-form-item>
 						</a-col>
@@ -221,7 +221,7 @@
   import { defineComponent, ref, reactive, computed, toRaw} from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryPurOrderFormShipFormShippTable, queryPurOrderFormProductListByMainId,ClassList, queryDataById, saveOrUpdate,queryVersonHistoryById,queryPurVersonFormShipListByMainId, queryPurVersonProductListByMainId,supplierOption} from '../PurchaseOrderyForm.api';
+  import { queryPurOrderFormShipFormShippTable, queryPurOrderFormProductListByMainId,ClassList, queryDataById,supplierOption, saveOrUpdate,queryVersonHistoryById,queryPurVersonFormShipListByMainId, queryPurVersonProductListByMainId} from '../PurchaseOrderyForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {purchaseOrderShipColumns, purchaseOrderProductColumns} from '../PurchaseOrderForm.data';
   import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
@@ -231,13 +231,11 @@
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
-  import { JDictSelectTag} from '/@/components/Form';
+  import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form, message } from 'ant-design-vue';
   import { useUserStore } from '/@/store/modules/user';
-  import {  ApiSelect, } from '/@/components/Form/index';
   import moment from 'moment';
-import { itemList } from '/@/views/system/dict/dict.api';
   const useForm = Form.useForm;
   export default defineComponent({
     name: "SaleOrderForm",

+ 18 - 33
src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue

@@ -22,7 +22,18 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="报价供应商(quotation supplier)" v-bind="validateInfos.quotationSuppiler" id="PuechaseQuotationFormForm-quotationSuppiler" name="quotationSuppiler">
-                  <JSelectInput   v-model:value="formData.quotationSuppiler"  placeholder="请选择" allow-clear  :options="supplierOption" @change="changeSupplier"></JSelectInput>
+                <ApiSelect
+                  :api="supplierOption"
+                  showSearch
+                  v-model:value="formData.quotationSuppiler"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  @change="changeSupplier"
+                  optionFilterProp='label'
+                />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -168,7 +179,7 @@
   import { defineComponent, ref, reactive, computed, toRaw} from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { PuechaseQuotationFormShippTable, queryPurcodeQuotationFormProductListByMainId, queryDataById, saveOrUpdate,ClassList } from '../PurchaseQuotationForm.api';
+  import { PuechaseQuotationFormShippTable, queryPurcodeQuotationFormProductListByMainId, queryDataById, saveOrUpdate,ClassList,supplierOption } from '../PurchaseQuotationForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {PuechaseQuotationFormShipColumns, PuechaseQuotationFormProductColumns} from '../PurchaseQuotationForm.data';
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
@@ -227,7 +238,6 @@
       var BaseShipArchiveAccessoriesListRef = ref();
       const activeKey = ref('PuechaseQuotationFormProduct');
       var notAllowEdit = ref(false);
-      var supplierOption = ref([]);
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -289,7 +299,6 @@
         PuechaseQuotationFormShipTable.dataSource = [];
         PuechaseQuotationFormProductTable.dataSource = [];
         activeKey.value = 'PuechaseQuotationFormProduct'
-        getSupplierOption()
         notAllowEdit.value=false
       }
 
@@ -301,7 +310,6 @@
         PuechaseQuotationFormShipTable.dataSource = [...PuechaseQuotationFormShipDataList];
         const PuechaseQuotationFormProductDataList = await queryPurcodeQuotationFormProductListByMainId(row['id']);
         PuechaseQuotationFormProductTable.dataSource = [...PuechaseQuotationFormProductDataList];
-        getSupplierOption()
         notAllowEdit.value=true
       }
 
@@ -476,37 +484,15 @@
       function onSearchProject(){
         SelectProjectModalRef.value.getTable()
       }
-      function getSupplierOption(){
-        defHttp
-            .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
-            .then((res) => {
-                if (res.success) {
-                  supplierOption.value = []
-                  res.result.records.forEach(element => {
-                      var obj = {
-                        label: element.name?element.name:'无名称请维护',
-                        value: element.id?element.id:'',
-                        paymentTerms:element.paymentTerms?element.paymentTerms:''
-                      };
-                      supplierOption.value.push( obj)
-                  });    
-                }
-            })
-            .finally(() => {
-                // loading.value = false;
-            });
-      }
       function SelectSupplierInquiry(){
           SelectSupplierInquiryModalRef.value.getTable(formData)
       }
-      function changeSupplier(prop){
+      async function changeSupplier(prop){
         if(prop){
-          supplierOption.value.map(item=>{
-            if(item.value==prop){
-              formData.suppilerName = item.label,
-              formData.paymentTerms = item.paymentTerms
-            }
-          })
+          var params={id:prop}
+          var obj = await supplierOption(params)
+          formData.suppilerName = obj.records[0].name
+          formData.paymentTerms = obj.records[0].paymentTerms
         }else{
           formData.quotationSuppiler = ''
           formData.suppilerName = ''
@@ -544,7 +530,6 @@
         SelectSupplierInquiryModalRef,
         onSearchProject,
         addProject,
-        getSupplierOption,
         supplierOption,
         SelectSupplierInquiry,
         addProductFromCustomer,

+ 7 - 3
src/views/purchase/purchaseQuotationFrm/purchaseQuotationFormList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.quotationProject"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
               </a-form-item>
             </a-col>
@@ -39,11 +40,12 @@
                   :api="supplierOption"
                   showSearch
                   v-model:value="queryParam.quotationSuppiler"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -60,11 +62,13 @@
                   :api="ClassList"
                   showSearch
                   v-model:value="queryParam.productionClass"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
+
                 />
               </a-form-item>
             </a-col>

+ 4 - 2
src/views/purchase/selectionQuotationForm/selectionQuotationFormList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.inquiryProject"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
               </a-form-item>
             </a-col>
@@ -45,11 +46,12 @@
                   :api="ClassList"
                   showSearch
                   v-model:value="queryParam.productionClass"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>

+ 4 - 2
src/views/saleCode/advancePayment/advancePaymentList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.project"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>
@@ -39,11 +40,12 @@
                   :api="CustomerOption"
                   showSearch
                   v-model:value="queryParam.customer"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="abbreviation"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
                 </a-form-item>
               </a-col>

+ 25 - 29
src/views/saleCode/advancePayment/components/advancePaymentForm.vue

@@ -21,12 +21,23 @@
 						</a-col>
             <a-col :span="24">
 							<a-form-item label="销售订单(sale order)" v-bind="validateInfos.saleOrder" id="saleInvoiceForm-saleOrder" name="saleOrder" >
-                <a-input-search v-model:value="formData.saleOrder" placeholder="" allow-clear enter-button="Search" @search="changeSaleOrder"></a-input-search>
+                <a-input-search v-model:value="formData.saleOrder" placeholder="" allow-clear readOnly enter-button="Search" @search="changeSaleOrder"></a-input-search>
 							</a-form-item>
 						</a-col>
 						<a-col :span="24">
 							<a-form-item label="客户(customer)" v-bind="validateInfos.customer" id="saleInvoiceForm-customer" name="customer" >
-                <JSelectInput   v-model:value="formData.customer"  placeholder="请选择" :options="customerOption" ></JSelectInput>
+                <ApiSelect
+                  :api="CustomerOption"
+                  showSearch
+                  v-model:value="formData.customer"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="abbreviation"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  optionFilterProp='label'
+                  @change="changeCustomer"
+                />
 							</a-form-item>
 						</a-col>
 						<a-col :span="24">
@@ -66,14 +77,14 @@
 <script lang="ts">
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
-  import {queryDataById, saveOrUpdate } from '../advancePaymentForm.api';
+  import {queryDataById, saveOrUpdate,CustomerOption } from '../advancePaymentForm.api';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
   import SelectSaleOrderMianModal from '../../../publicComponents/SelectSaleOrderMianModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
-  import { JDictSelectTag,JSelectMultiple} from '/@/components/Form';
+  import { JDictSelectTag,JSelectMultiple,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form,message } from 'ant-design-vue';
   import { useUserStore } from '/@/store/modules/user';
@@ -90,7 +101,8 @@
       JDictSelectTag,
       JSelectInput,
       JSelectMultiple,
-      SelectSaleOrderMianModal
+      SelectSaleOrderMianModal,
+      ApiSelect
     },
     props:{
       formDisabled:{
@@ -106,7 +118,6 @@
       const formRef = ref();
       var SelectProjectModalRef = ref()
       const SelectSaleOrderMianModalRef = ref()
-      var customerOption =ref([]);
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -154,7 +165,6 @@
       //新增方法
       function add() {
         resetFields();
-        getCustomerOptions()
         formData.salesman=userStore.getUserInfo.username;
         formData.saleDepartment = userStore.getUserInfo.orgCode
       }
@@ -162,7 +172,6 @@
       async function edit(row) {
         //主表数据
         await queryMainData(row.id);
-        getCustomerOptions()
       }
       //获取主表
       async function queryMainData(id) {
@@ -234,24 +243,6 @@
           formData.customerName =data[0].customerId_dictText
         }
       }
-      //获取客户列表
-      function getCustomerOptions(){
-          let params = {pageSize:'-1',status:1}
-          defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
-            if(res){
-              customerOption.value = []
-              res.result.records.forEach(item=>{
-                customerOption.value.push({
-                  label: item.name,
-                  value: item.id,
-                  priority:item.priority,
-                  intermediatorCommission:item.intermediatorCommission,
-                  commission:item.commission
-                })
-              })
-            }
-          })
-      }
       //选择项目  
       function onSearchProject(){
         SelectProjectModalRef.value.getTable()
@@ -274,6 +265,11 @@
           formData.advanceRatio = Number(prop.data) / Number(formData.orderAmount)*100
         }
       }
+      async function changeCustomer(value){
+        var params={id:value}
+        var obj = await CustomerOption(params)
+        formData.customerName = obj.records[0].name
+      }
       return {
         validatorRules,
         validateInfos,
@@ -291,12 +287,12 @@
         SelectProjectModalRef,
         onSearchProject,
         addProject,
-        getCustomerOptions,
-        customerOption,
         changeSaleOrder,
         SelectSaleOrderMianModalRef,
         addSaleOrderMian,
-        changeAdvanceAmount
+        changeAdvanceAmount,
+        CustomerOption,
+        changeCustomer
       }
     }
   });

+ 7 - 3
src/views/saleCode/deliveryNotice/deliveryNoticeList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.project"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>
@@ -39,11 +40,13 @@
                     :api="CustomerOption"
                     showSearch
                     v-model:value="queryParam.customer"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="abbreviation"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
+                    
                   />
                 </a-form-item>
               </a-col>
@@ -60,11 +63,12 @@
                       :api="ClassList"
                       showSearch
                       v-model:value="queryParam.productionClass"
-                      :filterOption="false"
+                      :filterOption="true"
                       resultField="records"
                       labelField="name"
                       valueField="id"
                       :params='{pageSize:-1}'
+                      optionFilterProp='label'
                     />
                 </a-form-item>
               </a-col>

+ 1 - 1
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -36,7 +36,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="quotationFormForm-productionClass" name="productionClass" :labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
-                <JSelectInput   v-model:value="formData.productionClass"  placeholder="请选择" :options="classOption"></JSelectInput>
+                <JDictSelectTag v-model:value="formData.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false" showSearch/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">

+ 5 - 28
src/views/saleCode/quotation/quotation.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.quotationProject"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
               </a-form-item>
             </a-col>
@@ -39,11 +40,12 @@
                   :api="CustomerOption"
                   showSearch
                   v-model:value="queryParam.quotationCustomer"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="abbreviation"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -56,7 +58,7 @@
             <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>
+                <JDictSelectTag v-model:value="queryParam.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false" showSearch/> 
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -168,7 +170,6 @@
   //注册model
   const [registerModal, {openModal}] = useModal();
   const userStore = useUserStore();
-  var classOption = ref([]);
   var ViewHistoryVersionModalRef = ref();
    //注册table数据
   const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
@@ -215,10 +216,6 @@
     });
     reload();
   }
-   // 自动请求并暴露内部方法
-   onMounted(() => {
-    getOptiom()
-  });
 
    /**
     * 新增事件
@@ -253,26 +250,6 @@
    function handleViewHistory(record: Recordable){
     ViewHistoryVersionModalRef.value.getTable(record)
    }
-  //  产品分类
-  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;
-            });
-  }
    /**
     * 详情
    */

+ 26 - 30
src/views/saleCode/receiptOrder/components/receiptOrderForm.vue

@@ -16,7 +16,7 @@
 						</a-col>
             <a-col :span="24">
 							<a-form-item label="发票(invoice)" v-bind="validateInfos.invoice" id="saleInvoiceForm-invoice" name="invoice">
-								<a-input-search v-model:value="formData.invoice" placeholder="请输入"  allow-clear enter-button="Search" @search="onSearchInvoice"></a-input-search>
+								<a-input-search v-model:value="formData.invoice" placeholder="请输入" readOnly allow-clear enter-button="Search" @search="onSearchInvoice"></a-input-search>
 							</a-form-item>
 						</a-col>
 						<a-col :span="24">
@@ -26,12 +26,23 @@
 						</a-col>
 						<a-col :span="24">
 							<a-form-item label="销售订单(sale order)" v-bind="validateInfos.saleOrder" id="saleInvoiceForm-saleOrder" name="saleOrder">
-								<a-input-search v-model:value="formData.saleOrder" placeholder="请输入"  allow-clear enter-button="Search" @search="onSearchSaleOrderMianModal"></a-input-search>
+								<a-input-search v-model:value="formData.saleOrder" placeholder="请输入"  readOnly allow-clear enter-button="Search" @search="onSearchSaleOrderMianModal"></a-input-search>
 							</a-form-item>
 						</a-col>
             <a-col :span="24">
 							<a-form-item label="购方(buyer)" v-bind="validateInfos.customer" id="saleInvoiceForm-customer" name="customer" >
-                <JSelectInput   v-model:value="formData.customer"  placeholder="请选择" :options="customerOption" ></JSelectInput>
+                <ApiSelect
+                  :api="CustomerOption"
+                  showSearch
+                  v-model:value="formData.customer"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="abbreviation"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  optionFilterProp='label'
+                  @change="changeCustomer"
+                />
 							</a-form-item>
 						</a-col>
 						<a-col :span="24">
@@ -67,13 +78,13 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import {queryDataById, saveOrUpdate } from '../receiptOrderForm.api';
+  import {queryDataById, saveOrUpdate,CustomerOption } from '../receiptOrderForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import SelectSaleOrderMianModal from '../../../publicComponents/SelectSaleOrderMianModal.vue';
   import SelectInvoiceModal from './SelectInvoiceModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
-  import { JDictSelectTag,JSelectMultiple} from '/@/components/Form';
+  import { JDictSelectTag,JSelectMultiple,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form,message } from 'ant-design-vue';
   import { useUserStore } from '/@/store/modules/user';
@@ -90,7 +101,8 @@
       JDictSelectTag,
       JSelectInput,
       JSelectMultiple,
-      SelectInvoiceModal
+      SelectInvoiceModal,
+      ApiSelect
     },
     props:{
       formDisabled:{
@@ -106,7 +118,6 @@
       const formRef = ref();
       var SelectSaleOrderMianModalModalRef = ref()
       const SelectInvoiceModalRef = ref()
-      var customerOption =ref([]);
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -155,7 +166,6 @@
       //新增方法
       function add() {
         resetFields();
-        getCustomerOptions()
         formData.salesman=userStore.getUserInfo.username;
         formData.saleDepartment = userStore.getUserInfo.orgCode
       }
@@ -163,7 +173,6 @@
       async function edit(row) {
         //主表数据
         await queryMainData(row.id);
-        getCustomerOptions()
       }
       //获取主表
       async function queryMainData(id) {
@@ -237,24 +246,6 @@
         formData.customer = data[0].customer
         formData.customer =  data[0].buyerTaxNumber
       }
-      //获取客户列表
-      function getCustomerOptions(){
-          let params = {pageSize:'-1',status:1}
-          defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
-            if(res){
-              customerOption.value = []
-              res.result.records.forEach(item=>{
-                customerOption.value.push({
-                  label: item.name,
-                  value: item.id,
-                  priority:item.priority,
-                  intermediatorCommission:item.intermediatorCommission,
-                  commission:item.commission
-                })
-              })
-            }
-          })
-      }
       //选择项目  
       function onSearchSaleOrderMianModal(){
         SelectSaleOrderMianModalModalRef.value.getTable()
@@ -262,6 +253,11 @@
       function onSearchInvoice(){
         SelectInvoiceModalRef.value.getTable()
       }
+      async function changeCustomer(value){
+        var params={id:value}
+        var obj = await CustomerOption(params)
+        formData.customerName = obj.records[0].name
+      }
       return {
         validatorRules,
         validateInfos,
@@ -279,11 +275,11 @@
         SelectSaleOrderMianModalModalRef,
         onSearchSaleOrderMianModal, 
         addSaleOrderMain,
-        getCustomerOptions,
-        customerOption,
         onSearchInvoice,
         SelectInvoiceModalRef,
-        addInvoice
+        addInvoice,
+        CustomerOption,
+        changeCustomer
       }
     }
   });

+ 5 - 2
src/views/saleCode/receiptOrder/receiptOrdertList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.project"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>
@@ -39,11 +40,13 @@
                   :api="CustomerOption"
                   showSearch
                   v-model:value="queryParam.customer"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="abbreviation"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
+
                 />
                 </a-form-item>
               </a-col>

+ 4 - 1
src/views/saleCode/rfp/SaleRfp.data.ts

@@ -113,7 +113,10 @@ export const searchFormSchema: FormSchema[] = [
             //请求参数
             params:{pageSize:-1},
             //返回结果字段
-            resultField:'records'
+            resultField:'records',
+            filterOption:"true",
+              optionFilterProp:'label',
+              showSearch:"true"
           },
     //colProps: {span: 6},
    },

+ 1 - 1
src/views/saleCode/rfp/components/SaleRfpModal.vue

@@ -2,7 +2,7 @@
   <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" width="95%" @ok="handleSubmit" >
       <BasicForm @register="registerForm" name="SaleRfpForm" >
           <template #project="props">
-            <a-input-search v-model:value="props.model.projectName"  placeholder="请输入项目(project)" AutoComplete="off"  allow-clear enter-button="Search" @search="onSearchProject()"></a-input-search>
+            <a-input-search v-model:value="props.model.projectName"  placeholder="请输入项目(project)" readOnly AutoComplete="off"  allow-clear enter-button="Search" @search="onSearchProject()"></a-input-search>
           </template>
       </BasicForm>
       <SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>

+ 16 - 4
src/views/saleCode/saleContract/SaleContract.data.ts

@@ -122,7 +122,10 @@ export const searchFormSchema: FormSchema[] = [
         //请求参数
         params:{pageSize:-1},
         //返回结果字段
-        resultField:'records'
+        resultField:'records',
+        filterOption:"true",
+        showSearch:"true",
+        optionFilterProp:'label'
       },
       //colProps: {span: 6},
  	},
@@ -144,7 +147,10 @@ export const searchFormSchema: FormSchema[] = [
       //请求参数
       params:{pageSize:-1},
       //返回结果字段
-      resultField:'records'
+      resultField:'records',
+      filterOption:"true",
+      showSearch:"true",
+      optionFilterProp:'label'
     },
     //colProps: {span: 6},
   },
@@ -177,7 +183,10 @@ export const searchFormSchema: FormSchema[] = [
               //请求参数
               params:{},
               //返回结果字段
-              resultField:'records'
+              resultField:'records',
+              filterOption:"true",
+              showSearch:"true",
+              optionFilterProp:'label'
             },
       //colProps: {span: 6},
  	},
@@ -302,7 +311,10 @@ export const formSchema: FormSchema[] = [
       //请求参数
       params:{},
       //返回结果字段
-      resultField:'records'
+      resultField:'records',
+      filterOption:"true",
+      showSearch:"true",
+      optionFilterProp:'label'
     },
   },
   {

+ 5 - 2
src/views/saleCode/saleInquiryForm/SaleInquiryForm.api.ts

@@ -17,7 +17,8 @@ enum Api {
   submitBatch='/saleCode/saleInquiryForm/submitBatch',
   cancelSubmitBatch='/saleCode/saleInquiryForm/returnSubmitBatch',
   customerList='/cuspCode/cuspCustomerProfile/list?pageSize=-1',
-  projectList='/baseCode/baseProjectArchive/list'
+  projectList='/baseCode/baseProjectArchive/list',
+  classOption='baseCode/baseProductClass/list'
 }
 /**
  * 导出api
@@ -124,4 +125,6 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
 export const CustomerOption = (params) => defHttp.get({ url: Api.customerList, params });
 
 //获取项目下拉框列表
-export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
+export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
+//获取项目下拉框列表
+export const ClassOption = (params) => defHttp.get({ url: Api.classOption, params });

+ 42 - 46
src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue

@@ -2,47 +2,49 @@
   <div class="p-2">
     <!--查询区域-->
     <div class="jeecg-basic-table-form-container">
-      <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
+      <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" >
         <a-row :gutter="24">
           <a-col :lg="8">
-              <a-form-item name="billDate">
+              <a-form-item name="billDate" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="单据日期(bill date)">单据日期(bill date)</span></template>
                 <a-range-picker value-format="YYYY-MM-DD"  v-model:value="queryParam.billDate" class="query-group-cust"/>
               </a-form-item>
           </a-col> 
           <a-col :lg="8">
-              <a-form-item name="billCode">
+              <a-form-item name="billCode" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="询价单号(bill code)">询价单号(bill code)</span></template>
                 <a-input placeholder="请输入询价单号(bill code)" v-model:value="queryParam.billCode" allow-clear AutoComplete="off"></a-input>
               </a-form-item>
           </a-col>          
           <template v-if="toggleSearchStatus">
             <a-col :lg="8">
-              <a-form-item name="inquiryProject">
+              <a-form-item name="inquiryProject" :label-col="{ style: 'width: 280px' }">
                 <template #label><span title="询价项目(inquiry project)" AutoComplete="off">询价项目(inquiry project)</span></template>
                 <ApiSelect
                   :api="ProjectOption"
                   showSearch
                   v-model:value="queryParam.inquiryProject"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="inquiryCustomer">
+              <a-form-item name="inquiryCustomer" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="询价客户(inquiry customer)">询价客户(inquiry customer)</span></template>
                 <ApiSelect
                   :api="CustomerOption"
                   showSearch
                   v-model:value="queryParam.inquiryCustomer"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="abbreviation"
                   valueField="id"
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -53,79 +55,89 @@
               </a-form-item>
             </a-col> -->
             <a-col :lg="8">
-              <a-form-item name="priority">
+              <a-form-item name="priority" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="优先级(priority)">优先级(priority)</span></template>
                 <JDictSelectTag v-model:value="queryParam.priority" placeholder="请选择" dictCode="priority"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="productionClass" >
+              <a-form-item name="productionClass" :label-col="{ style: 'width: 280px' }">
                 <template #label><span title="产品分类(production class)">产品分类(production class)</span></template>
-                <JSelectInput   v-model:value="queryParam.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                <ApiSelect
+                  :api="ClassOption"
+                  showSearch
+                  v-model:value="queryParam.productionClass"
+                  :filterOption="true"
+                  resultField="records"
+                  labelField="name"
+                  valueField="id"
+                  :params='{pageSize:-1}'
+                  optionFilterProp='label'
+                />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="model">
+              <a-form-item name="model" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="机型(model)">机型(model)</span></template>
                 <JDictSelectTag v-model:value="queryParam.model" placeholder="请选择" dictCode="model_typer"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="maker">
+              <a-form-item name="maker" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="厂家(maker)">厂家(maker)</span></template>
                 <a-input placeholder="请输入厂家(maker)" v-model:value="queryParam.maker" allow-clear AutoComplete="off"></a-input>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="inquiryPlatform">
+              <a-form-item name="inquiryPlatform" :label-col="{ style: 'width: 280px' }">
                 <template #label><span title="询价平台(inquiry platform)">询价平台(inquiry platform)</span></template>
                 <JDictSelectTag v-model:value="queryParam.inquiryPlatform" placeholder="请选择" dictCode="inquiry_platform"/>
               </a-form-item>
             </a-col>
 
             <a-col :lg="8">
-              <a-form-item name="status">
+              <a-form-item name="status" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="状态(status)">状态(status)</span></template>
                 <JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="inquiry_status"/>
               </a-form-item>
             </a-col>
             
             <a-col :lg="8">
-              <a-form-item name="saleDepartment" >
+              <a-form-item name="saleDepartment" :label-col="{ style: 'width: 200px' }" >
                 <template #label><span title="销售部门(sale department)">销售部门(sale department)</span></template>
 								<JSelectDept v-model:value="queryParam.saleDepartment" :multiple="false" />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="salesman">
-                <template #label><span title="业务员(salesman)">业务员(salesman)</span></template>
-                <JSelectUser v-model:value="queryParam.salesman" placeholder="请选择" :multiple="false"></JSelectUser>
+              <a-form-item name="inquiryTeam" :label-col="{ style: 'width: 280px' }">
+                <template #label><span title="采购询价组(procurement inquiry team)">采购询价组(procurement inquiry team)</span></template>
+                <JSelectDept v-model:value="queryParam.inquiryTeam" :multiple="false"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="inquiryTeam" :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                <template #label><span title="采购询价组(procurement inquiry team)">采购询价组(procurement inquiry team)</span></template>
-                <JSelectDept v-model:value="queryParam.inquiryTeam" :multiple="false"/>
+              <a-form-item name="salesman" :label-col="{ style: 'width: 200px' }">
+                <template #label><span title="业务员(salesman)">业务员(salesman)</span></template>
+                <JSelectUser v-model:value="queryParam.salesman" placeholder="请选择" :multiple="false"></JSelectUser>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="submit">
+              <a-form-item name="submit" :label-col="{ style: 'width: 200px' }">
                 <template #label><span title="提交(submit)">提交(submit)</span></template>
                 <JDictSelectTag v-model:value="queryParam.submit" placeholder="请选择" dictCode="yes_or_no"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="otherStatus">
-                <template #label><span title="其他状态(other status)">其他状态(other statu)</span></template>
-                <a-input placeholder="其他状态(other status)" v-model:value="queryParam.otherStatus" allow-clear ></a-input>
-              </a-form-item>
-            </a-col> 
-            <a-col :lg="8">
-              <a-form-item name="customerInquiryNumber" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+              <a-form-item name="customerInquiryNumber" :label-col="{ style: 'width: 280px' }">
                 <template #label><span title="客户询价单号(customer inquiry number)">客户询价单号(customer inquiry number)</span></template>
                 <a-input placeholder="请输入客户询价单号(customer inquiry number)" v-model:value="queryParam.customerInquiryNumber" allow-clear AutoComplete="off"></a-input>
               </a-form-item>
             </a-col>
+            <a-col :lg="8">
+              <a-form-item name="otherStatus" :label-col="{ style: 'width: 200px' }">
+                <template #label><span title="其他状态(other status)">其他状态(other statu)</span></template>
+                <a-input placeholder="其他状态(other status)" v-model:value="queryParam.otherStatus" allow-clear ></a-input>
+              </a-form-item>
+            </a-col> 
           </template>
           <a-col :xl="6" :lg="7" :md="8" :sm="24" >
             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
@@ -186,7 +198,7 @@
   import {useModal} from '/@/components/Modal';
   import SaleInquiryFormModal from './components/SaleInquiryFormModal.vue'
   import {columns, superQuerySchema} from './SaleInquiryForm.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,ProjectOption,CustomerOption} from './SaleInquiryForm.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,ProjectOption,CustomerOption,ClassOption} from './SaleInquiryForm.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { cloneDeep } from "lodash-es";
   import { useUserStore } from '/@/store/modules/user';
@@ -395,22 +407,6 @@
 
   /* ----------------------以下为原生查询需要添加的-------------------------- */
   const toggleSearchStatus = ref<boolean>(false);
-  const labelCol = reactive({
-    xs:24,
-    sm:8,
-  });
-  const wrapperCol = reactive({
-    xs: 24,
-    sm: 16,
-  });
-  const labelCol1 = reactive({
-    xs:24,
-    sm:12,
-  });
-  const wrapperCol1 = reactive({
-    xs: 24,
-    sm: 12,
-  });
   /**
    * 重置
    */

+ 1 - 1
src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue

@@ -52,7 +52,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="SaleInquiryFormForm-productionClass" name="productionClass">
-                <JDictSelectTag v-model:value="formData.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false"/>
+                <JDictSelectTag v-model:value="formData.productionClass" placeholder=""    dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"  page="false" showSearch/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">

+ 1 - 0
src/views/saleCode/salesInvoice/components/saleInvoiceForm.vue

@@ -79,6 +79,7 @@
                 <ApiSelect
                   :api="listHeard"
                   showSearch
+                  :filterOption="true"
                   v-model:value="formData.seller"
                   optionFilterProp="label"
                   resultField="records"

+ 4 - 2
src/views/saleCode/salesInvoice/salesInvoiceList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.project"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>
@@ -39,11 +40,12 @@
                     :api="CustomerOption"
                     showSearch
                     v-model:value="queryParam.customer"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="abbreviation"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
                 </a-form-item>
               </a-col>

+ 6 - 3
src/views/saleCode/salesOrder/SaleOrderFormList.vue

@@ -24,11 +24,12 @@
                     :api="ProjectOption"
                     showSearch
                     v-model:value="queryParam.project"
-                    :filterOption="false"
+                    :filterOption="true"
                     resultField="records"
                     labelField="name"
                     valueField="id"
                     :params='{pageSize:-1}'
+                    optionFilterProp='label'
                   />
               </a-form-item>
             </a-col>
@@ -39,11 +40,12 @@
                   :api="CustomerOption"
                   showSearch
                   v-model:value="queryParam.customer"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="abbreviation"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>
@@ -60,11 +62,12 @@
                   :api="ClassList"
                   showSearch
                   v-model:value="queryParam.productionClass"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="name"
                   valueField="id"
                   :params='{pageSize:-1}'
+                  optionFilterProp='label'
                 />
               </a-form-item>
             </a-col>