| | |
| | | |
| | | import { z } from '#/adapter/form'; |
| | | import { getAccountSimpleList } from '#/api/erp/finance/account'; |
| | | import { getSupplierSimpleList } from '#/api/erp/purchase/supplier'; |
| | | import { getSupplierSimpleList } from '#/api/srm/supplier'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | |
| | | placeholder: '选择订单时间', |
| | | showTime: true, |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | |
| | | }, |
| | | { |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | componentProps: (values) => ({ |
| | | class: '!w-full', |
| | | placeholder: '请输入支付订金', |
| | | precision: 2, |
| | | min: 0, |
| | | }, |
| | | max: values.totalPrice ?? undefined, |
| | | }), |
| | | fieldName: 'depositPrice', |
| | | label: '支付订金', |
| | | dependencies: { |
| | | triggerFields: ['totalPrice'], |
| | | rules(values) { |
| | | if (values.totalPrice != null) { |
| | | return z |
| | | .number() |
| | | .min(0, '订金不能小于0') |
| | | .max(values.totalPrice, '订金不能大于优惠后金额'); |
| | | } |
| | | return z.number().min(0, '订金不能小于0'); |
| | | }, |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | | { |