Commit b2515336a8975fd3b877317b40b58351444df107

Authored by weixin_45529955
1 parent b4accbf2

导出数据兼容

... ... @@ -239,7 +239,7 @@ class DioUtil {
return new BaseResp(_status, _code, _msg, _data, _responseData);
} catch (e) {
Loading.hideLoading(context);
// Loading is dismissed once by the outer DioException handler below.
throw new DioException(
requestOptions: response.requestOptions,
response: response,
... ... @@ -248,7 +248,7 @@ class DioUtil {
);
}
}
Loading.hideLoading(context);
// Loading is dismissed once by the outer DioException handler below.
throw new DioException(
requestOptions: response.requestOptions,
response: response,
... ...
... ... @@ -592,6 +592,12 @@ class _ExportBookDataPageState extends State<ExportBookDataPage> {
fields += element.code! + ',';
}
});
// GetExportInfo 服务端会无条件读取 con_amount。若不导出该字段,
// 响应体会带 PHP Notice,Dio 无法解析 JSON,导致导出流程中断。
if (!customerProvider.reportFieldModelData!.any((element) =>
element.select && element.code == 'con_amount')) {
fields += 'con_amount,';
}
if (fields.endsWith(',')) {
fields = fields.substring(0, fields.length - 1);
}
... ...