|  | @@ -20,13 +20,31 @@
 | 
	
		
			
				|  |  |                <a-col :lg="8">
 | 
	
		
			
				|  |  |                  <a-form-item name="project">
 | 
	
		
			
				|  |  |                    <template #label><span title="项目(project)">项目(project)</span></template>
 | 
	
		
			
				|  |  | -                  <a-input v-model:value="queryParam.project" placeholder="请选择"/>
 | 
	
		
			
				|  |  | +                  <ApiSelect
 | 
	
		
			
				|  |  | +                    :api="ProjectOption"
 | 
	
		
			
				|  |  | +                    showSearch
 | 
	
		
			
				|  |  | +                    v-model:value="queryParam.project"
 | 
	
		
			
				|  |  | +                    :filterOption="false"
 | 
	
		
			
				|  |  | +                    resultField="records"
 | 
	
		
			
				|  |  | +                    labelField="name"
 | 
	
		
			
				|  |  | +                    valueField="id"
 | 
	
		
			
				|  |  | +                    :params='{pageSize:-1}'
 | 
	
		
			
				|  |  | +                  />
 | 
	
		
			
				|  |  |                  </a-form-item>
 | 
	
		
			
				|  |  |                </a-col>
 | 
	
		
			
				|  |  |                <a-col :lg="8">
 | 
	
		
			
				|  |  | -                <a-form-item name="supplierName">
 | 
	
		
			
				|  |  | -                  <template #label><span title="供应商(supplierName)">供应商(supplierName)</span></template>
 | 
	
		
			
				|  |  | -                  <a-input placeholder="请输入供应商(supplierName)" v-model:value="queryParam.supplierName" allow-clear ></a-input>
 | 
	
		
			
				|  |  | +                <a-form-item name="supplier">
 | 
	
		
			
				|  |  | +                  <template #label><span title="供应商(supplier)">供应商(supplier)</span></template>
 | 
	
		
			
				|  |  | +                  <ApiSelect
 | 
	
		
			
				|  |  | +                    :api="supplierOption"
 | 
	
		
			
				|  |  | +                    showSearch
 | 
	
		
			
				|  |  | +                    v-model:value="queryParam.supplier"
 | 
	
		
			
				|  |  | +                    :filterOption="false"
 | 
	
		
			
				|  |  | +                    resultField="records"
 | 
	
		
			
				|  |  | +                    labelField="name"
 | 
	
		
			
				|  |  | +                    valueField="id"
 | 
	
		
			
				|  |  | +                    :params='{pageSize:-1}'
 | 
	
		
			
				|  |  | +                  />
 | 
	
		
			
				|  |  |                  </a-form-item>
 | 
	
		
			
				|  |  |                </a-col>
 | 
	
		
			
				|  |  |              </template>
 | 
	
	
		
			
				|  | @@ -62,21 +80,14 @@
 | 
	
		
			
				|  |  |      import {ref, reactive,onMounted} from 'vue';
 | 
	
		
			
				|  |  |      import {BasicTable, useTable, TableAction} from '/@/components/Table';
 | 
	
		
			
				|  |  |      import { useListPage } from '/@/hooks/system/useListPage'
 | 
	
		
			
				|  |  | -    import {useModal} from '/@/components/Modal';
 | 
	
		
			
				|  |  |      import {columns} from './defectiveProductsForm.data';
 | 
	
		
			
				|  |  | -    import {list,getExportUrl} from './defectiveProductsForm.api';
 | 
	
		
			
				|  |  | +    import {list,getExportUrl,supplierOption,ProjectOption} from './defectiveProductsForm.api';
 | 
	
		
			
				|  |  |      import { cloneDeep } from "lodash-es";
 | 
	
		
			
				|  |  | -    import { defHttp } from '/@/utils/http/axios';
 | 
	
		
			
				|  |  | -    import { JDictSelectTag} from '/@/components/Form';
 | 
	
		
			
				|  |  | -    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
 | 
	
		
			
				|  |  | -    import { message } from 'ant-design-vue';
 | 
	
		
			
				|  |  | +    import { ApiSelect} from '/@/components/Form';
 | 
	
		
			
				|  |  |      const formRef = ref();
 | 
	
		
			
				|  |  |      const queryParam = reactive<any>({
 | 
	
		
			
				|  |  |        type:'2'
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    //注册model
 | 
	
		
			
				|  |  | -    const [registerModal, {openModal}] = useModal();
 | 
	
		
			
				|  |  | -    var classOption = ref([]);
 | 
	
		
			
				|  |  |       //注册table数据
 | 
	
		
			
				|  |  |      const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
 | 
	
		
			
				|  |  |          tableProps:{
 | 
	
	
		
			
				|  | @@ -106,34 +117,6 @@
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |      const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -     // 自动请求并暴露内部方法
 | 
	
		
			
				|  |  | -     onMounted(() => {
 | 
	
		
			
				|  |  | -      getOptiom()
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    //  产品分类
 | 
	
		
			
				|  |  | -    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;
 | 
	
		
			
				|  |  | -              });
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      /* ----------------------以下为原生查询需要添加的-------------------------- */
 | 
	
		
			
				|  |  |      const toggleSearchStatus = ref<boolean>(false);
 | 
	
		
			
				|  |  |      const labelCol = reactive({
 | 
	
	
		
			
				|  | @@ -158,7 +141,6 @@
 | 
	
		
			
				|  |  |      function searchReset() {
 | 
	
		
			
				|  |  |        formRef.value.resetFields();
 | 
	
		
			
				|  |  |        selectedRowKeys.value = [];
 | 
	
		
			
				|  |  | -      queryParam.value.type='2'
 | 
	
		
			
				|  |  |        //刷新数据
 | 
	
		
			
				|  |  |        reload();
 | 
	
		
			
				|  |  |      }
 |