国际采购
This commit is contained in:
@ -6,29 +6,40 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '有效期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'kName',
|
||||
label: '合同号/名称',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'relTypeCode',
|
||||
label: '关联类别',
|
||||
component: 'XjrSelect',
|
||||
field: 'comId',
|
||||
label: '合同主体',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '2003815292742479874' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
showSearch: true,
|
||||
optionFilterProp: 'label',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
options: [
|
||||
// { label: '全部', value: '' },
|
||||
],
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'comId',
|
||||
label: '合同主体',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
label: '审批状态',
|
||||
@ -62,7 +73,7 @@ export const columns: BasicColumn[] = [
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
{
|
||||
dataIndex: 'relTypeName',
|
||||
title: '关联类别',
|
||||
componentType: 'input',
|
||||
|
||||
@ -52,12 +52,12 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="有效期开始" name="dateFrom">
|
||||
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
||||
<a-date-picker v-model:value="formState.dateFrom" style="width: 100%" @change="dateChange(formState.dateFrom, 'dateFrom')" :disabled="isDisable" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="有效期结束" name="dateTo">
|
||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -452,6 +452,12 @@
|
||||
if (!val) return
|
||||
formState.amountCn = amountToChinese(Number(val)*10000)
|
||||
}
|
||||
const dateChange = (val, k) => {
|
||||
if (!val) {
|
||||
k=='dateFrom' && (formState.dateFrom = null)
|
||||
k=='dateTo' && (formState.dateTo = null)
|
||||
}
|
||||
}
|
||||
const disabledDateStart = (startValue) => {
|
||||
const endValue = formState?.dateTo;
|
||||
if (!startValue || !endValue) {
|
||||
|
||||
Reference in New Issue
Block a user