|  | @@ -2,7 +2,6 @@ import {BasicColumn} from '/@/components/Table';
 | 
	
		
			
				|  |  |  import {FormSchema} from '/@/components/Table';
 | 
	
		
			
				|  |  |  import { defHttp } from '/@/utils/http/axios';
 | 
	
		
			
				|  |  |  import {ref } from 'vue';
 | 
	
		
			
				|  |  | -import moment from 'moment';
 | 
	
		
			
				|  |  |  var customerOption = ref([])
 | 
	
		
			
				|  |  |  var projectOption = ref([])
 | 
	
		
			
				|  |  |  //列表数据
 | 
	
	
		
			
				|  | @@ -91,25 +90,33 @@ export const searchFormSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |        label: "单据编码(bill code)",
 | 
	
		
			
				|  |  |        field: 'billCode',
 | 
	
		
			
				|  |  |        component: 'Input',
 | 
	
		
			
				|  |  | -      labelWidth:150,
 | 
	
		
			
				|  |  | +      labelWidth:180,
 | 
	
		
			
				|  |  |        componentProps:{
 | 
	
		
			
				|  |  |          AutoComplete:'off'
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        //colProps: {span: 6},
 | 
	
		
			
				|  |  |   	},
 | 
	
		
			
				|  |  | -	
 | 
	
		
			
				|  |  | -	{
 | 
	
		
			
				|  |  | -      label: "客户(customer)",
 | 
	
		
			
				|  |  | -      field: 'customerId',
 | 
	
		
			
				|  |  | -      labelWidth:150,
 | 
	
		
			
				|  |  | -      component: 'JSelectInput',
 | 
	
		
			
				|  |  | -      componentProps:{
 | 
	
		
			
				|  |  | -        options:customerOption,
 | 
	
		
			
				|  |  | -        stringToNumber:true
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      //colProps: {span: 6},
 | 
	
		
			
				|  |  | - 	},
 | 
	
		
			
				|  |  | +   {
 | 
	
		
			
				|  |  | +    label: "客户(customer)",
 | 
	
		
			
				|  |  | +    field: 'customerId',
 | 
	
		
			
				|  |  | +    component: 'ApiSelect',
 | 
	
		
			
				|  |  | +    componentProps: {
 | 
	
		
			
				|  |  | +            // mode: 'multiple',//multiple: 多选;不填写为单选
 | 
	
		
			
				|  |  | +            //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
 | 
	
		
			
				|  |  | +            api: ()=> defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list' }),
 | 
	
		
			
				|  |  | +            //数值转成String
 | 
	
		
			
				|  |  | +            numberToString: false,
 | 
	
		
			
				|  |  | +            //标题字段
 | 
	
		
			
				|  |  | +            labelField: 'name',
 | 
	
		
			
				|  |  | +            //值字段
 | 
	
		
			
				|  |  | +            valueField: 'id',
 | 
	
		
			
				|  |  | +            //请求参数
 | 
	
		
			
				|  |  | +            params:{pageSize:-1},
 | 
	
		
			
				|  |  | +            //返回结果字段
 | 
	
		
			
				|  |  | +            resultField:'records'
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +    //colProps: {span: 6},
 | 
	
		
			
				|  |  | +   },
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |      label: "投标结果(tender result)",
 | 
	
		
			
				|  |  |      field: 'tenderResult',
 | 
	
	
		
			
				|  | @@ -133,12 +140,23 @@ export const searchFormSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |      label: "系统项目(project)",
 | 
	
		
			
				|  |  |      field: 'projectId',
 | 
	
		
			
				|  |  | -    component: 'JSelectInput',
 | 
	
		
			
				|  |  | -    labelWidth:150,
 | 
	
		
			
				|  |  | -    componentProps:{
 | 
	
		
			
				|  |  | -      options:projectOption
 | 
	
		
			
				|  |  | +    component: 'ApiSelect',
 | 
	
		
			
				|  |  | +    labelWidth:180,
 | 
	
		
			
				|  |  | +    componentProps: {
 | 
	
		
			
				|  |  | +      // mode: 'multiple',//multiple: 多选;不填写为单选
 | 
	
		
			
				|  |  | +      //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
 | 
	
		
			
				|  |  | +      api: ()=> defHttp.get({ url: 'baseCode/baseProjectArchive/list' }),
 | 
	
		
			
				|  |  | +      //数值转成String
 | 
	
		
			
				|  |  | +      numberToString: false,
 | 
	
		
			
				|  |  | +      //标题字段
 | 
	
		
			
				|  |  | +      labelField: 'name',
 | 
	
		
			
				|  |  | +      //值字段
 | 
	
		
			
				|  |  | +      valueField: 'id',
 | 
	
		
			
				|  |  | +      //请求参数
 | 
	
		
			
				|  |  | +      params:{pageSize:-1},
 | 
	
		
			
				|  |  | +      //返回结果字段
 | 
	
		
			
				|  |  | +      resultField:'records'
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    //colProps: {span: 6},
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |   {
 | 
	
	
		
			
				|  | @@ -177,7 +195,7 @@ export const searchFormSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |      label: "备注(notes)",
 | 
	
		
			
				|  |  |      field: 'tenderCode',
 | 
	
		
			
				|  |  |      component: 'Input',
 | 
	
		
			
				|  |  | -    labelWidth:150,
 | 
	
		
			
				|  |  | +    labelWidth:180,
 | 
	
		
			
				|  |  |      componentProps:{
 | 
	
		
			
				|  |  |        AutoComplete:'off'
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -212,7 +230,6 @@ export const formSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |      component: 'DatePicker',
 | 
	
		
			
				|  |  |      componentProps: {
 | 
	
		
			
				|  |  |        valueFormat: 'YYYY-MM-DD',
 | 
	
		
			
				|  |  | -      defaultValue:moment(new Date()).format('YYYY-MM-DD')
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      labelWidth:220,
 | 
	
		
			
				|  |  |      dynamicRules: ({model,schema}) => {
 | 
	
	
		
			
				|  | @@ -223,20 +240,9 @@ export const formSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |      label: '系统项目(project)',
 | 
	
		
			
				|  |  | -    field: 'projectId',
 | 
	
		
			
				|  |  | +    field: 'projectName',
 | 
	
		
			
				|  |  |      component: 'Select',
 | 
	
		
			
				|  |  | -    componentProps: ({ formModel, formActionType }) => {
 | 
	
		
			
				|  |  | -      return {
 | 
	
		
			
				|  |  | -        options:projectOption,
 | 
	
		
			
				|  |  | -        onChange: (e: any) => {
 | 
	
		
			
				|  |  | -          projectOption.value.map(item=>{
 | 
	
		
			
				|  |  | -            if(item.value==e){
 | 
	
		
			
				|  |  | -              formActionType.setFieldsValue({customerId:item.customerId})
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +    slot: 'project',
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |      label: '采购方式(procurement method)',
 | 
	
	
		
			
				|  | @@ -254,11 +260,8 @@ export const formSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |      label: '客户(customer)',
 | 
	
		
			
				|  |  | -    field: 'customerId',
 | 
	
		
			
				|  |  | -    component: 'JSelectInput',
 | 
	
		
			
				|  |  | -    componentProps:{
 | 
	
		
			
				|  |  | -      options:customerOption
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    field: 'customerName',
 | 
	
		
			
				|  |  | +    component: 'Input',
 | 
	
		
			
				|  |  |      labelWidth:150,
 | 
	
		
			
				|  |  |      dynamicDisabled:true,
 | 
	
		
			
				|  |  |      dynamicRules: ({model,schema}) => {
 | 
	
	
		
			
				|  | @@ -372,30 +375,20 @@ export const formSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |  	  component: 'Input',
 | 
	
		
			
				|  |  |  	  show: false
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +	  label: '',
 | 
	
		
			
				|  |  | +	  field: 'projectId',
 | 
	
		
			
				|  |  | +	  component: 'Input',
 | 
	
		
			
				|  |  | +	  show: false
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +  {
 | 
	
		
			
				|  |  | +	  label: '',
 | 
	
		
			
				|  |  | +	  field: 'customerId',
 | 
	
		
			
				|  |  | +	  component: 'Input',
 | 
	
		
			
				|  |  | +	  show: false
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  |  ];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -// 高级查询数据
 | 
	
		
			
				|  |  | -export const superQuerySchema = {
 | 
	
		
			
				|  |  | -  status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -  billDate: {title: '单据日期',order: 2,view: 'date', type: 'string',},
 | 
	
		
			
				|  |  | -  billCode: {title: '单据编码',order: 3,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  projectId: {title: '项目',order: 4,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  customerId: {title: '客户',order: 5,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  procurementMethod: {title: '采购方式',order: 6,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -  tenderCode: {title: '招标项目号',order: 7,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  tenderName: {title: '招标项目名称',order: 8,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  packetNumber: {title: '包号',order: 9,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  bidTime: {title: '投标时间',order: 10,view: 'datetime', type: 'string',},
 | 
	
		
			
				|  |  | -  openingTime: {title: '开标时间',order: 11,view: 'datetime', type: 'string',},
 | 
	
		
			
				|  |  | -  totalMoney: {title: '项目总价',order: 12,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -  tenderResult: {title: '投标结果',order: 13,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -  winningBidder: {title: '中标方',order: 14,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  bidPrice: {title: '中标价',order: 15,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -  households: {title: '参与家数',order: 16,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  notes: {title: '备注',order: 17,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  attachs: {title: '附件',order: 18,view: 'text', type: 'string',},
 | 
	
		
			
				|  |  | -  submit: {title: '提交(0未提交,1已提交)',order: 19,view: 'number', type: 'number',},
 | 
	
		
			
				|  |  | -};
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |  * 流程表单调用这个方法获取formSchema
 | 
	
	
		
			
				|  | @@ -405,32 +398,3 @@ export function getBpmFormSchema(_formData): FormSchema[]{
 | 
	
		
			
				|  |  |    // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
 | 
	
		
			
				|  |  |    return formSchema;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -export function getCustomerOptions(){
 | 
	
		
			
				|  |  | -  let params = {pageSize:'-1',status:1}
 | 
	
		
			
				|  |  | -  defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
 | 
	
		
			
				|  |  | -    if(res){
 | 
	
		
			
				|  |  | -        customerOption.value.splice(0,customerOption.value.length);
 | 
	
		
			
				|  |  | -        res.result.records.forEach(item=>{
 | 
	
		
			
				|  |  | -          customerOption.value.push({
 | 
	
		
			
				|  |  | -            label: item.abbreviation,
 | 
	
		
			
				|  |  | -            value: item.id
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -        })      
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -  })
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -export function getProjectOptions(){
 | 
	
		
			
				|  |  | -  let params = {pageSize:'-1'}
 | 
	
		
			
				|  |  | -  defHttp.get({url:'/baseCode/baseProjectArchive/list',params}, { isTransformResponse: false }).then(res=>{
 | 
	
		
			
				|  |  | -    if(res){
 | 
	
		
			
				|  |  | -      projectOption.value.splice(0,projectOption.value.length);
 | 
	
		
			
				|  |  | -      res.result.records.forEach(item=>{
 | 
	
		
			
				|  |  | -        projectOption.value.push({
 | 
	
		
			
				|  |  | -          label: item.name,
 | 
	
		
			
				|  |  | -          value: item.id,
 | 
	
		
			
				|  |  | -          customerId:item.customerId
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -  })
 | 
	
		
			
				|  |  | -}
 |