|
|
@@ -745,14 +745,11 @@ const setValue = (field, value) => {
|
|
|
|
|
|
if (typeof field == 'string') {
|
|
|
const fieldMapValue = fieldMap.value[field]
|
|
|
- if (!fieldMapValue) {
|
|
|
- console.error("没有找到字段编号:" + field)
|
|
|
- }
|
|
|
- if (value && fieldMapValue.type == "MULTI" && typeof value == 'string') {
|
|
|
+ if (fieldMapValue && value && fieldMapValue.type == "MULTI" && typeof value == 'string') {
|
|
|
formData[field] = JSON.parse(value);
|
|
|
- } else if (value && (fieldMapValue.type == "INTEGER" || fieldMapValue.type == "DECIMAL") && typeof value != 'string') {
|
|
|
+ } else if (fieldMapValue && value && (fieldMapValue.type == "INTEGER" || fieldMapValue.type == "DECIMAL") && typeof value != 'string') {
|
|
|
formData[field] = value.toString();
|
|
|
- } else if (value && fieldMapValue.type == "DATETIME" && typeof value != 'string') {
|
|
|
+ } else if (fieldMapValue && value && fieldMapValue.type == "DATETIME" && typeof value != 'string') {
|
|
|
formData[field] = value.toString();
|
|
|
} else {
|
|
|
formData[field] = value;
|
|
|
@@ -1086,7 +1083,7 @@ const handleSave = () => {
|
|
|
saveService();
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log(err);
|
|
|
+ console.error(err);
|
|
|
}
|
|
|
);
|
|
|
} catch (e) {
|