Commit ea639db010559446131c94b9e22ca1913627fe61

Authored by 曾国涛
1 parent 576a38ce

feat(Order): 部分字段进行非空判断

src/pages/Order/OrderList/OrderDrawer.tsx
@@ -1235,7 +1235,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { @@ -1235,7 +1235,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => {
1235 value, 1235 value,
1236 })); 1236 }));
1237 }} 1237 }}
1238 - width="md" 1238 + width="xl"
1239 onChange={() => { 1239 onChange={() => {
1240 form.setFieldValue('platformType', ''); 1240 form.setFieldValue('platformType', '');
1241 }} 1241 }}
@@ -1246,10 +1246,10 @@ export default ({ onClose, data, subOrders, orderOptType }) => { @@ -1246,10 +1246,10 @@ export default ({ onClose, data, subOrders, orderOptType }) => {
1246 <ProFormDependency name={['companyType']}> 1246 <ProFormDependency name={['companyType']}>
1247 {({ companyType }) => { 1247 {({ companyType }) => {
1248 const renderInstitutionContactName = () => ( 1248 const renderInstitutionContactName = () => (
1249 - <> 1249 + <Group>
1250 <ProFormSelect 1250 <ProFormSelect
1251 key="institutionContactName" 1251 key="institutionContactName"
1252 - width="md" 1252 + width="xl"
1253 showSearch 1253 showSearch
1254 name="institutionContactName" 1254 name="institutionContactName"
1255 rules={[{ required: true, message: '请输入课题组名称!' }]} 1255 rules={[{ required: true, message: '请输入课题组名称!' }]}
@@ -1279,12 +1279,16 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -1279,12 +1279,16 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
1279 label="课题组名称" 1279 label="课题组名称"
1280 placeholder="请输入名称" 1280 placeholder="请输入名称"
1281 /> 1281 />
1282 - <ProFormText  
1283 - hidden={true} 1282 + <ProFormDigit
  1283 + readonly
1284 key="researchGroupId" 1284 key="researchGroupId"
  1285 + width="md"
1285 name="researchGroupId" 1286 name="researchGroupId"
1286 - ></ProFormText>  
1287 - </> 1287 + label="课题组Id"
  1288 + fieldProps={{ precision: 0 }} // 只允许整数
  1289 + rules={[{ required: true, message: '请重新选择课题组!' }]}
  1290 + />
  1291 + </Group>
1288 ); 1292 );
1289 const renderPlatformType = (fieldKey) => ( 1293 const renderPlatformType = (fieldKey) => (
1290 <ProFormSelect 1294 <ProFormSelect
@@ -2163,6 +2167,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -2163,6 +2167,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
2163 value: false, 2167 value: false,
2164 }, 2168 },
2165 ]} 2169 ]}
  2170 + rules={[{ required: true, message: '是否代买代购必填' }]}
2166 />, 2171 />,
2167 <ProFormRadio.Group 2172 <ProFormRadio.Group
2168 key="discount" 2173 key="discount"
@@ -2180,6 +2185,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -2180,6 +2185,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
2180 value: false, 2185 value: false,
2181 }, 2186 },
2182 ]} 2187 ]}
  2188 + rules={[{ required: true, message: '是否竞标/打折必填' }]}
2183 />, 2189 />,
2184 2190
2185 <ProFormSelect 2191 <ProFormSelect