| | |
| | | private String name; |
| | | private String contactPhone; |
| | | private String address; |
| | | private String provinceCode; |
| | | private String cityCode; |
| | | private String districtCode; |
| | | private String businessLicenseUrl; |
| | | private Integer userCount; |
| | | private String bankName; |
| | |
| | | vo.setStatus(row.getStatus()); |
| | | vo.setPhone(defaultText(row.getContactPhone())); |
| | | vo.setAddress(defaultText(row.getAddress())); |
| | | vo.setProvinceCode(row.getProvinceCode()); |
| | | vo.setCityCode(row.getCityCode()); |
| | | vo.setDistrictCode(row.getDistrictCode()); |
| | | vo.setBusinessLicenseUrl(trimToNull(row.getBusinessLicenseUrl())); |
| | | vo.setUserCount(row.getUserCount() == null ? 0 : row.getUserCount()); |
| | | vo.setBankName(defaultText(row.getBankName())); |
| | |
| | | private String name; |
| | | private String phone; |
| | | private String address; |
| | | private String provinceCode; |
| | | private String cityCode; |
| | | private String districtCode; |
| | | private String businessLicenseUrl; |
| | | private Integer userCount; |
| | | private String bankName; |
| | |
| | | </select> |
| | | |
| | | <select id="selectClinicDetail" resultType="com.tcm.training.admin.member.row.ClinicDetailRow"> |
| | | SELECT c.id, c.name, c.contact_phone AS contactPhone, c.address, |
| | | SELECT c.id, c.name, c.contact_phone AS contactPhone, c.address, c.province_code AS provinceCode, c.city_code AS cityCode, c.district_code AS districtCode, |
| | | c.business_license_url AS businessLicenseUrl, |
| | | c.bank_name AS bankName, c.account_holder AS accountHolder, |
| | | c.account_number AS accountNumber, c.branch_name AS branchName, |
| | |
| | | FROM tcm_clinic c |
| | | LEFT JOIN tcm_app_user u ON u.clinic_id = c.id AND u.deleted = 0 and u.type = 1 |
| | | WHERE c.deleted = 0 AND c.id = #{id} |
| | | GROUP BY c.id, c.name, c.contact_phone, c.address, c.business_license_url,c.status, |
| | | GROUP BY c.id, c.name, c.contact_phone, c.address, c.province_code, c.city_code, c.district_code, c.business_license_url,c.status, |
| | | c.bank_name, c.account_holder, c.account_number, c.branch_name, u.avatar, u.phone |
| | | </select> |
| | | |
| | |
| | | useEffect(() => { |
| | | if (!access['member:clinic:edit']) { history.replace('/Welcome'); return; } |
| | | getProvincialAgentOptions().then((response) => setAgentOptions((response.data?.list || []).map((item: any) => ({ label: item.agentName, value: item.id })))); |
| | | if (params.id) getClinicDetail(params.id).then((response) => { const data = response.data || {}; form.setFieldsValue(data); setAvatar(data.avatar || ''); setBusinessLicenseUrl(data.businessLicenseUrl || ''); }); |
| | | if (params.id) getClinicDetail(params.id).then((response) => { const data = response.data || {}; const regionCodes = [data.provinceCode, data.cityCode, data.districtCode].filter(Boolean); form.setFieldsValue({ ...data, regionCodes }); setAvatar(data.avatar || ''); setBusinessLicenseUrl(data.businessLicenseUrl || ''); }); |
| | | }, [params.id]); |
| | | const submit = async () => { |
| | | const values = await form.validateFields(); if (!params.id) return; setLoading(true); |