Commit 8fa47f65 authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent ca780ffc
......@@ -55,16 +55,21 @@ const AuditPr1: React.FC<{}> = () => {
vals.forEach(val => {
const { pcode, ccode } = val;
const province = source.find(item => item.code === pcode);
if (province) {
let str = province.name;
// 存在 市级
if (ccode && province && province.children) {
const city = province.children.find(item => item.code === ccode);
if (city) {
str += `/${city.name}`;
}
}
ret.push(str);
}
});
return ret;
};
......
......@@ -55,16 +55,21 @@ const AuditPr2: React.FC<{}> = () => {
vals.forEach(val => {
const { pcode, ccode } = val;
const province = source.find(item => item.code === pcode);
if (province) {
let str = province.name;
// 存在 市级
if (ccode && province && province.children) {
const city = province.children.find(item => item.code === ccode);
if (city) {
str += `/${city.name}`;
}
}
ret.push(str);
}
});
return ret;
};
......
......@@ -55,16 +55,21 @@ const AuditPrComfirm: React.FC<{}> = () => {
vals.forEach(val => {
const { pcode, ccode } = val;
const province = source.find(item => item.code === pcode);
if (province) {
let str = province.name;
// 存在 市级
if (ccode && province && province.children) {
const city = province.children.find(item => item.code === ccode);
if (city) {
str += `/${city.name}`;
}
}
ret.push(str);
}
});
return ret;
};
......
......@@ -58,16 +58,21 @@ const AuditPrSubmit: React.FC<{}> = () => {
vals.forEach(val => {
const { pcode, ccode } = val;
const province = source.find(item => item.code === pcode);
if (province) {
let str = province.name;
// 存在 市级
if (ccode && province && province.children) {
const city = province.children.find(item => item.code === ccode);
if (city) {
str += `/${city.name}`;
}
}
ret.push(str);
}
});
return ret;
};
......
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