Commit 4baef55c by zhaochengxiang

盘点

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