|
@@ -32,8 +32,17 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="分类(class)">
|
|
|
- <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
|
|
|
- <JSelectInput v-model:value="queryParams.classId" placeholder="请选择" :options="classOption" ></JSelectInput>
|
|
|
+ <ApiSelect
|
|
|
+ :api="ClassList"
|
|
|
+ showSearch
|
|
|
+ v-model:value="queryParams.classId"
|
|
|
+ :filterOption="true"
|
|
|
+ resultField="records"
|
|
|
+ labelField="name"
|
|
|
+ valueField="id"
|
|
|
+ :params='{pageSize:-1}'
|
|
|
+ optionFilterProp="label"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -101,10 +110,10 @@
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|
|
- import { JDictSelectTag,JInput} from '/@/components/Form';
|
|
|
+ import { JDictSelectTag,JInput,ApiSelect} from '/@/components/Form';
|
|
|
import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
|
|
|
+ import {ClassList} from '../purchase/arrivedGoods/ArriveGoodsForm.api';
|
|
|
const emit = defineEmits([ 'selectProduct']); //定义emit
|
|
|
- let classOption = ref([])
|
|
|
var visible = ref(false)
|
|
|
var productType=ref('')
|
|
|
var modeaTitle =ref('选择产品(select product)')
|
|
@@ -137,7 +146,8 @@
|
|
|
title: '英文名(English name)',
|
|
|
key: 'englishName',
|
|
|
dataIndex: 'englishName',
|
|
|
- align:"center"
|
|
|
+ align:"center",
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '备件号(partno)',
|
|
@@ -284,25 +294,6 @@
|
|
|
pagination.value.pageSize = paginations.pageSize;
|
|
|
loadData()
|
|
|
};
|
|
|
- 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 searchQuery(){
|
|
|
pagination.value.current = 1
|
|
|
selectedRowKeys.value = []
|
|
@@ -388,14 +379,12 @@
|
|
|
modeaTitle.value = '选择产品(select product)'
|
|
|
productType.value=''
|
|
|
loadData()
|
|
|
- getOptiom()
|
|
|
}
|
|
|
function getTableVirtual(){
|
|
|
visible.value = true
|
|
|
productType.value='Virtual'
|
|
|
modeaTitle.value = '选择虚拟产品(select virtual products)'
|
|
|
loadData()
|
|
|
- getOptiom()
|
|
|
}
|
|
|
defineExpose({
|
|
|
getTable,
|