|
@@ -1,10 +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 { getWeekMonthQuarterYear } from '/@/utils';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
-import {ref,onMounted} from 'vue';
|
|
|
+import {ref } from 'vue';
|
|
|
var customerOption = ref([])
|
|
|
var projectOption = ref([])
|
|
|
//列表数据
|
|
@@ -210,19 +207,20 @@ export const formSchema: FormSchema[] = [
|
|
|
{
|
|
|
label: '项目(project)',
|
|
|
field: 'projectId',
|
|
|
- component: 'JSelectInput',
|
|
|
- componentProps:{
|
|
|
- options:projectOption,
|
|
|
- onChange: (value) => {
|
|
|
- },
|
|
|
+ component: 'Select',
|
|
|
+ componentProps: ({ formModel, formActionType }) => {
|
|
|
+ return {
|
|
|
+ options:projectOption,
|
|
|
+ onChange: (e: any) => {
|
|
|
+ projectOption.value.map(item=>{
|
|
|
+ if(item.value==e){
|
|
|
+ formActionType.setFieldsValue({customerId:item.customerId})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- labelWidth:150,
|
|
|
- dynamicRules: ({model,schema}) => {
|
|
|
- return [
|
|
|
- { required: true, message: '请输入项目!'},
|
|
|
- ];
|
|
|
- },
|
|
|
- },
|
|
|
{
|
|
|
label: '采购方式(procurement method)',
|
|
|
field: 'procurementMethod',
|
|
@@ -397,7 +395,7 @@ export function getProjectOptions(){
|
|
|
projectOption.value.push({
|
|
|
label: item.name,
|
|
|
value: item.id,
|
|
|
- customerName:item.customerId
|
|
|
+ customerId:item.customerId
|
|
|
})
|
|
|
})
|
|
|
}
|