| | |
| | | <ProFormItemV2 |
| | | label="规格:" |
| | | prop="specs" |
| | | :check-rules="[{ message: '请输入服务名' }]" |
| | | :check-rules="[ |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (specProTableProps.tableData?.length) { |
| | | console.log(123); |
| | | specProTableProps.tableData.forEach((item, index) => { |
| | | if (!item?.name) callback(new Error(`请输入第${index + 1}个规格名称`)); |
| | | if (!item?.price) callback(new Error(`请输入第${index + 1}个规格价格`)); |
| | | }); |
| | | } else { |
| | | callback(new Error(`请添加规格`)); |
| | | } |
| | | callback(); |
| | | }, |
| | | }, |
| | | ]" |
| | | class="form-item-specs" |
| | | > |
| | | <ProTableV2 |
| | |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const { proTableProps: enterpriseProTableProps } = useGetEnterprises(); |
| | | const { getList: getSuppliers, proTableProps: enterpriseProTableProps } = useGetEnterprises({ |
| | | type: EnumEnterpriseType.Supplier, |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | id: '', |
| | |
| | | name: 'ServicesManage', |
| | | }); |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | await getSuppliers(); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |