diff --git a/pm-resource-server/src/graphql/resolvers/markets.ts b/pm-resource-server/src/graphql/resolvers/markets.ts index b4d5aeb8..fc20dbea 100644 --- a/pm-resource-server/src/graphql/resolvers/markets.ts +++ b/pm-resource-server/src/graphql/resolvers/markets.ts @@ -8,13 +8,13 @@ export default { Query: { marketsBySuper: (_: any, __: any, context: AuthContext) => { return Market - .find() + .find({ isDel: false }) .sort({ createDate: -1 }) .map(dbid2id).toArray() }, markets: (_: any, __: any, context: AuthContext) => { return Market - .find({ leader: context.user!.id }) + .find({ leader: context.user!.id, isDel: false }) .sort({ createDate: -1 }) .map(dbid2id).toArray() }, @@ -26,8 +26,10 @@ export default { let repeat = await Market.findOne({ $or: [ { _id: new ObjectId(id) }, { _id: id }] }) if (isNil(repeat)) { market.createDate = moment().utc().utcOffset(8 * 60).format('YYYYMMDD') + market.isDel = false } else { market.createDate = repeat.createDate + market.isDel = repeat.isDel } let isRep = false; let proMap = {}; @@ -40,7 +42,8 @@ export default { return Market.updateOne({ $or: [ {_id: new ObjectId(id) }, { _id: id }] }, { $set: market }, { upsert: true }).then((res) => id || res.upsertedId._id) }, deleteMarket: async (_: any, args: any, context: AuthContext) => { - return Market.deleteOne({ $or: [ {_id: new ObjectId(args.id) }, { _id: args.id }] }).then(() => args.id) + const id = args.id + return Market.updateOne({ $or: [{_id: new ObjectId(id) }, { _id: id }] }, { $set: { isDel: true } }, { upsert: true }).then((res) => args.id || res.upsertedId._id) }, }, } diff --git a/pm-resource-server/src/mongodb/index.ts b/pm-resource-server/src/mongodb/index.ts index 66ea1ee7..09005079 100644 --- a/pm-resource-server/src/mongodb/index.ts +++ b/pm-resource-server/src/mongodb/index.ts @@ -577,6 +577,10 @@ export interface IMarket { * 更新时间 */ updateTime?: Date + /** + * 是否删除 + */ + isDel: Boolean } export const Market = client.db().collection(pluralize('Market')) diff --git a/pm-web-app/config/routes.ts b/pm-web-app/config/routes.ts index 4349d3c2..9241d844 100644 --- a/pm-web-app/config/routes.ts +++ b/pm-web-app/config/routes.ts @@ -86,18 +86,18 @@ component: './Daily/View/ByProj', access: 'canProjDailies' }, - { - path: '/project/projExpense', - name: 'projExpense', - component: './Expense/View/ByProj', - access: 'canProjExpense' - }, { path: '/project/projWeeklies', name: 'projWeeklies', component: './Weekly/View/ByProj', access: 'canProjWeeklies' }, + { + path: '/project/projExpense', + name: 'projExpense', + component: './Expense/View/ByProj', + access: 'canProjExpense' + }, ] }, { diff --git a/pm-web-app/src/pages/InfoManage/Customer/Edit/CustomerForm.tsx b/pm-web-app/src/pages/InfoManage/Customer/Edit/CustomerForm.tsx index 4639c16d..74f1ceeb 100644 --- a/pm-web-app/src/pages/InfoManage/Customer/Edit/CustomerForm.tsx +++ b/pm-web-app/src/pages/InfoManage/Customer/Edit/CustomerForm.tsx @@ -141,6 +141,7 @@ export default (form: FormInstance, data?: CustomerInput) => { key="tags" name={[field.name, 'tags']} rules={[{ required: true }]} + extra="请包括部门和职位信息,例:卡部主管" > - - - - - - - + + + + + + + + + + + + + + + + + remove(i)} diff --git a/pm-web-app/src/pages/Market/Edit/EditCustom/MarketProjectVisitForm.tsx b/pm-web-app/src/pages/Market/Edit/EditCustom/MarketProjectVisitForm.tsx index c5492de5..67e11147 100644 --- a/pm-web-app/src/pages/Market/Edit/EditCustom/MarketProjectVisitForm.tsx +++ b/pm-web-app/src/pages/Market/Edit/EditCustom/MarketProjectVisitForm.tsx @@ -116,16 +116,15 @@ export default (form: FormInstance, data?: MarketProjectInpu
- {[...fields].reverse().map((field, i) => ( - +
拜访记录 {field.name + 1} , data?: MarketProjectInpu , data?: MarketProjectInpu onClick={() => remove(field.name)} />
- +
))} - )} diff --git a/pm-web-app/src/pages/Market/Edit/EditCustom/index.tsx b/pm-web-app/src/pages/Market/Edit/EditCustom/index.tsx index a1dd5847..27ee540d 100644 --- a/pm-web-app/src/pages/Market/Edit/EditCustom/index.tsx +++ b/pm-web-app/src/pages/Market/Edit/EditCustom/index.tsx @@ -1,7 +1,7 @@ import { PageContainer } from '@ant-design/pro-layout'; import React, { useRef, useState } from 'react'; -import { Button, Table, Popconfirm, Tag, Select, Space, DatePicker, Input } from 'antd'; -import type { Market as Mark, MarketInput, MarketProject, MarketProjectInput, MarketProjectVisit } from '@/apollo'; +import { Button, Table, Popconfirm, Tag, Select, Space } from 'antd'; +import type { Market as Mark, MarketInput, MarketProject, MarketProjectInput } from '@/apollo'; import { client } from '@/apollo'; import { ApolloProvider } from '@apollo/client'; import moment from 'moment'; @@ -22,7 +22,6 @@ const Market: React.FC = () => { const { isAdmin, markets, subordinates, groupsUsers, loading, setFilter, deleteMarket, pushMarket } = useProjStatus(); const [editeMarket, setEditeMarket] = useState({}); const [editeIndex, setEditeIndex] = useState(0); - const refMap = useRef([]) const editHandle = (mark: Mark) => { ref.current?.showDialog({ ...mark }); diff --git a/pm-web-app/src/pages/Project/Edit/EditProj/index.tsx b/pm-web-app/src/pages/Project/Edit/EditProj/index.tsx index 7392f543..64cede32 100644 --- a/pm-web-app/src/pages/Project/Edit/EditProj/index.tsx +++ b/pm-web-app/src/pages/Project/Edit/EditProj/index.tsx @@ -1,6 +1,6 @@ import { PageContainer } from '@ant-design/pro-layout'; import React, { useRef, useState } from 'react'; -import { Button, Table, Popconfirm, Tag, Input, Space, Radio } from 'antd'; +import { Button, Table, Popconfirm, Tag, Input, Space, Radio, Badge } from 'antd'; import type { Project as Proj, ProjectInput, ActiveInput } from '@/apollo'; import { client } from '@/apollo'; import { ApolloProvider } from '@apollo/client'; @@ -277,7 +277,11 @@ const Project: React.FC = () => { {isAdmin? 归档项目 : - 待办项目({todoProjs.length}) + + + 待办项目 + + } , diff --git a/pm-web-mobile/src/assets/logo.png b/pm-web-mobile/src/assets/logo.png index f3d2503f..33c6a9cb 100644 Binary files a/pm-web-mobile/src/assets/logo.png and b/pm-web-mobile/src/assets/logo.png differ diff --git a/pm-web-mobile/src/views/project/ProjectView.vue b/pm-web-mobile/src/views/project/ProjectView.vue index 0c596e00..effc280e 100644 --- a/pm-web-mobile/src/views/project/ProjectView.vue +++ b/pm-web-mobile/src/views/project/ProjectView.vue @@ -93,7 +93,7 @@