Commit 4baef55c by zhaochengxiang

盘点

parent bd2b9fc0
...@@ -63,7 +63,8 @@ const FC = (props) => { ...@@ -63,7 +63,8 @@ const FC = (props) => {
data: { data: {
...task, ...task,
dataAssetExcel: { dataAssetExcel: {
fileId fileId,
fileName: fileList[0].name
} }
} }
}, },
......
...@@ -50,7 +50,7 @@ const UsersSelect = ({value = {}, data, onChange}) => { ...@@ -50,7 +50,7 @@ const UsersSelect = ({value = {}, data, onChange}) => {
return ( return (
<Select <Select
value={value?.id} value={value?.userId}
onChange={handleChange} onChange={handleChange}
allowClear allowClear
> >
...@@ -85,7 +85,10 @@ const FC = (props) => { ...@@ -85,7 +85,10 @@ const FC = (props) => {
if (visible) { if (visible) {
getGroups(); getGroups();
if (action !== 'add') { if (action !== 'add') {
// form.setFieldsValue({ name: item?.name||'', cnName: item?.cnName||'', partitionMethod: item?.partitionMethod||'', definition: item?.definition||'', remark: item?.remark||'' }); form.setFieldsValue(task);
if (task.department?.groupId) {
getUsers(task.department?.groupId);
}
} }
} }
...@@ -157,6 +160,8 @@ const FC = (props) => { ...@@ -157,6 +160,8 @@ const FC = (props) => {
const reset = () => { const reset = () => {
setConfirmLoading(false); setConfirmLoading(false);
form.resetFields(); form.resetFields();
setGroups();
setUsers();
} }
return ( return (
......
...@@ -15,13 +15,6 @@ export const status = { ...@@ -15,13 +15,6 @@ export const status = {
'-1': '未通过', '-1': '未通过',
} }
export const actions = {
'tobeDistributed': ['详情', '修改', '分发'],
'checking': ['详情', '盘点', '提交'],
'tobeReviewed': ['详情', '审核'],
'finished': ['详情'],
}
const FC = (props) => { const FC = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [tasks, setTasks] = useState(); const [tasks, setTasks] = useState();
...@@ -44,7 +37,7 @@ const FC = (props) => { ...@@ -44,7 +37,7 @@ const FC = (props) => {
if (action === '详情') { if (action === '详情') {
} else if (action === '修改') { } else if (action === '修改') {
setUpdateTaskParams({...updateTaskParams, task, visible: true, action: 'edit'});
} else if (action === '盘点') { } else if (action === '盘点') {
setCheckTaskParams({...checkTaskParams, task, visible: true}); setCheckTaskParams({...checkTaskParams, task, visible: true});
} else { } else {
...@@ -107,7 +100,7 @@ const FC = (props) => { ...@@ -107,7 +100,7 @@ const FC = (props) => {
render: (_,record) => ( render: (_,record) => (
<Space size='small'> <Space size='small'>
{ {
actions[record.status]?.map((action, index) => <a key={index} onClick={() => {onActionClick(record, action)}}>{action}</a>) record.actionList?.map((action, index) => <a key={index} onClick={() => {onActionClick(record, action.title)}}>{action.title}</a>)
} }
</Space> </Space>
) )
......
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