优化
This commit is contained in:
@ -27,6 +27,16 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
const codeFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{ field: 'title', label: '标题/编号', component: 'Input'},
|
||||
];
|
||||
|
||||
@ -70,6 +80,7 @@
|
||||
formConfig: {
|
||||
labelCol:{span: 9, offSet:10},
|
||||
schemas: codeFormSchema,
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD'],],
|
||||
showResetButton: true,
|
||||
},
|
||||
immediate: false, // 设置为不立即调用
|
||||
@ -136,3 +147,12 @@
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
:deep( .ant-col-8:nth-child(1)) {
|
||||
width: 360px !important;
|
||||
max-width: 360px !important;;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -88,7 +88,9 @@ const curIdx = ref()
|
||||
const rules = {
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
cpBankCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }, {type: 'email', message: '邮箱格式错误\n'} ],
|
||||
sort: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
// contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }, {type: 'email', message: '邮箱格式错误\n'} ],
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
@ -100,12 +102,12 @@ const onSearchUser = (val)=> {
|
||||
}
|
||||
const handleSuccess = (val) => {
|
||||
formState.cpTableName = val[0].cpTableName
|
||||
formState.cpCode = val[0].cpTableName == '客户' ? val[0].cuCode : val[0].suCode
|
||||
formState.cpName = val[0].cpTableName == '客户' ? val[0].cuName : val[0].suName
|
||||
formState.cpCode = val[0].cpTableName == 'lng_customer' ? val[0].cuCode : val[0].suCode
|
||||
formState.cpName = val[0].cpTableName == 'lng_customer' ? val[0].cuName : val[0].suName
|
||||
getBankInfo(formState.cpCode, val[0].cpTableName)
|
||||
}
|
||||
const getBankInfo = async (code, type) => {
|
||||
const res = await getBankBList(code, type=='客户'? 'C' : 'S')
|
||||
const res = await getBankBList(code, type=='lng_customer'? 'C' : 'S')
|
||||
optionList.value = res|| []
|
||||
formState.cpBankCode = (optionList.value.find(v => v.defaultSign == 'Y') || {}).bankCode
|
||||
formState.cpBankName = (optionList.value.find(v => v.defaultSign == 'Y') || {}).bankName
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
};
|
||||
function onSelectChange(rowKeys: string[], e) {
|
||||
selectedKeys.value = rowKeys;
|
||||
selectedValues.value = [{...e[0], cpTableName: activeKey.value=='1' ? '客户': '供应商'}]
|
||||
selectedValues.value = [{...e[0], cpTableName: activeKey.value=='1' ? 'lng_customer': 'lng_supplier'}]
|
||||
}
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? t('客户列表') : t('')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user