Commit 72b7811b authored by 张子雨's avatar 张子雨

feat: 解决sentry问题

parent 6ff4dc1d
...@@ -30,9 +30,13 @@ class toExamine extends Component { ...@@ -30,9 +30,13 @@ class toExamine extends Component {
if (err) { if (err) {
return; return;
} }
if (!values?.fileList[0]?.url) {
notification.error({ message: '请上传发票错误,请重新上传' });
return;
}
const params = { const params = {
filePath: values?.fileList[0].url, filePath: values?.fileList[0].url,
fileName: values?.fileList[0].name, fileName: values?.fileList[0]?.name || '',
id, id,
}; };
const data = await uploadBill(params); const data = await uploadBill(params);
......
...@@ -10,7 +10,7 @@ const FormItem = Form.Item; ...@@ -10,7 +10,7 @@ const FormItem = Form.Item;
const { Option } = Select; const { Option } = Select;
const LogisticsForm = props => { const LogisticsForm = props => {
const { modalVisible, onCancel, companys = [], skuList, onSubmit } = props; const { modalVisible, onCancel, company = [], skuList, onSubmit } = props;
const { getFieldDecorator } = props.form; const { getFieldDecorator } = props.form;
const [result, setResult] = useState(() => props.value); const [result, setResult] = useState(() => props.value);
const formData = async (formDataList, fieldsValue, suffixes) => { const formData = async (formDataList, fieldsValue, suffixes) => {
...@@ -127,15 +127,14 @@ const LogisticsForm = props => { ...@@ -127,15 +127,14 @@ const LogisticsForm = props => {
], ],
})( })(
<Select showSearch placeholder="请选择物流公司"> <Select showSearch placeholder="请选择物流公司">
{companys?.length && {company?.map(item => (
companys.map(item => (
<Option <Option
value={`${item.expressCompanyCode}-${item.expressCompanyName}`} value={`${item.expressCompanyCode}-${item.expressCompanyName}`}
key={item.expressCompanyCode} key={item.expressCompanyCode}
> >
{item.expressCompanyName} {item.expressCompanyName}
</Option> </Option>
))} )) || []}
</Select>, </Select>,
)} )}
</FormItem> </FormItem>
......
...@@ -591,7 +591,7 @@ const TableList = props => { ...@@ -591,7 +591,7 @@ const TableList = props => {
<LogisticsForm <LogisticsForm
onSubmit={reload} onSubmit={reload}
skuList={skuList} skuList={skuList}
companys={companys} company={companys}
onCancel={() => handleModalVisible(false)} onCancel={() => handleModalVisible(false)}
modalVisible={LogisticsModalVisible} modalVisible={LogisticsModalVisible}
value={LogisticsData} value={LogisticsData}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment