Commit b703e691 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 招标报名/资格审核筛选状态回退,处理地址切换省级没有清空市级的问题

parent 5fdba405
......@@ -61,7 +61,6 @@ const MultAddress = (props) => {
const [province, setprovince] = useState<any>([]); // 省列表
const [city, setcity] = useState<any>([]); // 市列表
const flag = useRef<boolean>(true)
const cityAfterRef = useRef<boolean>(true)
useEffect(() => {
PublicApi.getManageAreaAll().then(res => {
......@@ -106,6 +105,10 @@ const MultAddress = (props) => {
})
setcode([...cityCode]);
if (num === 1) {
// @ 省份切换 清空之前选的市
result[idx]['city'] = null
result[idx]['cityCode'] = null
result[idx]['cityName'] = null
renderProvice(result, val, idx)
} else if(num === 2) {
renderCity(result, val, idx)
......@@ -115,22 +118,13 @@ const MultAddress = (props) => {
// 渲染省份option
const renderProvice = async (result, val, idx) => {
console.log(result, val, idx, result[idx])
// console.log(result, val, idx, result[idx])
await province.forEach(item => {
if (item.code === val) {
PublicApi.getManageAreaByPcodeAll({ pcode: val }).then((res: any) => {
if (res.code === 1000) {
result[idx].provinceCode = val;
result[idx].province = item.name;
// @todo 编辑情况下 result[idx]存在id ?第一次渲染回填值的时候不清空
// if(result[idx]?.id&& ) {
// console.log(cityAfterRef.current, 1, item)
// result[idx].cityCode = null;
// result[idx].city = null;
// } else {
// console.log(cityAfterRef.current, 2, item)
// cityAfterRef.current = false;
// }
city[idx] = { citydata: res.data }
setcity([...city])
}
......
......@@ -276,7 +276,7 @@ const AddAtttribute: React.FC<{}> = () => {
</Tooltip>
</Col>
{/* 日期 地区属性 */}
<Col span={24}>
{/* <Col span={24}>
<Form.Item name="isDate" valuePropName="checked" initialValue={false} noStyle>
<Checkbox onChange={(e) => onChangeSpecial(e, 'isDate')} disabled={isSee}>日期属性</Checkbox>
</Form.Item>
......@@ -291,7 +291,7 @@ const AddAtttribute: React.FC<{}> = () => {
<Tooltip title="勾选后此属性作为地区属性,地区属性的属性值无需手工在属性值管理中设置,系统自动取地区数据作为属性值">
<InfoCircleOutlined />
</Tooltip>
</Col>
</Col> */}
</Row>
</Form.Item>
</Col>
......
......@@ -19,7 +19,7 @@ export interface ReadyCheckedRegisterProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.postPurchaseInviteTenderGetSubmitTenderList({
...params,
inviteTenderOutStatusList: [BidOuterWorkState.Not_Check_Register_Check]
submitTenderOutStatusList: [TenderOutWorkState.Not_Check_Register_Check]
}, { ctlType: "none" })
return data
}
......
......@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -19,7 +19,7 @@ export interface ReadyQualifityCheckedProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.postPurchaseInviteTenderGetSubmitTenderList({
...params,
inviteTenderOutStatusList: [BidOuterWorkState.Not_Qualifications_Check],
submitTenderOutStatusList: [TenderOutWorkState.Not_Qualifications_Check],
}, { ctlType: "none" })
return data
}
......
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