Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
1、改bug
  • Loading branch information
ZreoDark committed Dec 23, 2024
1 parent 71fae12 commit e966745
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getColumns(
) {
return [
{
title: '季度名称',
title: '审核名称',
dataIndex: 'name',
key: 'name',
render: (text: string, record: RegionType) => (
Expand All @@ -27,7 +27,7 @@ function getColumns(
width: '20%',
},
{
title: '季度编码',
title: '审核编码',
dataIndex: 'code',
key: 'code',
},
Expand Down
2 changes: 2 additions & 0 deletions pm-web-app/src/pages/Project/Edit/ChangeLeader/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ query($name: String, $leaders: [String!], $page: Int, $pageSize: Int) {
id
name
groups
enabled
}
realSubordinates {
id
name
enabled
}
superProjs(name: $name, leaders:$leaders, page: $page, pageSize: $pageSize) {
Expand Down
7 changes: 3 additions & 4 deletions pm-web-app/src/pages/Project/Edit/ChangeLeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ChangePm: React.FC<any> = () => {
const ref = useRef<FormDialogHandle<ChangePmInput>>(null);
const {query,setQuery,projs,users,pushChangePm,total,realSubordinates} = useChangePmState();
// const state = useChangePmState();
const localUsers = users || [];
const localUsers = users.filter(item=>item.enabled == true) || [];
const localSubordinates = realSubordinates || [];
const [localState, setLocalState] = useState<{
isRemovePart: boolean;
Expand Down Expand Up @@ -148,9 +148,7 @@ const ChangePm: React.FC<any> = () => {
// optionArr.push(newOption)
// })
// }
const optionArr = localSubordinates.map((user) => {
return { label: user.name, value: user.id };
})
const optionArr = localSubordinates.filter((user) => user.enabled == true)

const columns = [
{
Expand Down Expand Up @@ -260,6 +258,7 @@ const ChangePm: React.FC<any> = () => {
placeholder="请选择项目经理"
options={optionArr}
onChange={(value:any) => handleChange(value)}
fieldNames={{label:'name',value:'id'}}
>
</Select>
</Col>
Expand Down
9 changes: 6 additions & 3 deletions pm-web-app/src/pages/Project/Edit/EditActive/ProjDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ export default (form: FormInstance<ProjectInput>, data?: ProjectInput) => {

const renderActiveNode = (fields: any) => {
let tempFields = []
for (let i = fields.length - 1; i >= 0; i--) {
fields['index'] = i
tempFields.push(fields[i])
if(fields){
for (let i = fields.length - 1; i >= 0; i--) {
fields['index'] = i
tempFields.push(fields[i])
}
}

return tempFields;
}

Expand Down
2 changes: 1 addition & 1 deletion pm-web-app/src/pages/Project/Edit/EditProj/ProjForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ return true;
</Row>
<Row>
<Col span={24}>
<Form.List name="actives" rules={[{ validator: activeValidator }]}>
<Form.List name="actives" rules={data.proState == 1?[{ validator: activeValidator}]:[]}>
{(fields, { add, remove }, { errors }) => (
<>
<Form.Item>
Expand Down
3 changes: 3 additions & 0 deletions pm-web-app/src/pages/Project/Edit/EditProj/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ export function useProjStatus() {
reqProj.contractState1 == '未签署' ? 0 : reqProj.contractState1 == '已签署' ? 1 : '';
delete reqProj.proState1;
delete reqProj.contractState1;
delete reqProj.contAmount_
delete reqProj.taxAmount_
delete reqProj.serviceCycle_
console.log(reqProj, 'reqProj MMMMMMM');
if (proj.proState == 1) {
await pushCostHandle({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const ProjIdComponent: FC<ProjIdComponentProps> = ({ value, onChange, disabled }
))}
</Select>
<Input
style={{ width: '100px' }}
style={{ width: '250px' }}
key="simpleName"
placeholder="项目缩写:只允许填写拼音或数字"
onCompositionStart={(e) => setIsZh(true)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export default () => {
>
{resData?.groupsUsers.map((u) => (
//本级及下级
<Select.Option key={u.id} value={u.id}>
u.enabled && <Select.Option key={u.id} value={u.id}>
{u.name}
</Select.Option>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const ProjIdComponent: FC<ProjIdComponentProps> = ({
))}
</Select>
<Input
style={{ width: '100px' }}
style={{ width: '250px' }}
key="simpleName"
placeholder="项目缩写:只允许填写拼音或数字"
onCompositionStart={(e) => setIsZh(true)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ return true;

<Row>
<Col span={24}>
<Form.List name="actives" rules={[{ validator: activeValidator }]}>
<Form.List name="actives" >{/**rules={[{ validator: activeValidator }]} */}
{(fields, { add, remove }, { errors }) => (
<>
<Form.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ const Project: React.FC<any> = () => {
...query,
...params,
page,
group: '',
group: params.group.length !== 0
? params.group.reduce((accumulator: string, currentValue: string) => {
return `${accumulator}/${currentValue}`;
}, '')
: '',
});
};
const searchBtn = () => {
Expand Down

0 comments on commit e966745

Please sign in to comment.