|
@@ -48,7 +48,7 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
|
|
|
}
|
|
|
|
|
|
return <Modal
|
|
|
- title={<strong>新增客服组</strong>}
|
|
|
+ title={<strong>{initialValues?.id ? '修改客服组' : '新增客服组'} (<span style={{ color: 'red' }}>{accountId}</span>)</strong>}
|
|
|
open={visible}
|
|
|
onOk={handleOk}
|
|
|
onCancel={onClose}
|
|
@@ -65,7 +65,7 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
|
|
|
labelAlign='left'
|
|
|
initialValues={initialValues || { type: 1 }} // 默认类型为客服组
|
|
|
>
|
|
|
- {!initialValues?.id && <Form.Item label={<strong>类型</strong>} name="type" rules={[{ required: true, message: '请选择类型!' }]}>
|
|
|
+ <Form.Item label={<strong>类型</strong>} name="type" rules={[{ required: true, message: '请选择类型!' }]}>
|
|
|
<Radio.Group
|
|
|
buttonStyle="solid"
|
|
|
optionType='button'
|
|
@@ -73,34 +73,39 @@ const AddCsGroup: React.FC<AddCsGroupProps> = ({ corpWechatList, userRotatePolic
|
|
|
{ value: 1, label: '客服组' },
|
|
|
{ value: 0, label: '客服组集' }
|
|
|
]}
|
|
|
+ disabled={initialValues?.id}
|
|
|
/>
|
|
|
- </Form.Item>}
|
|
|
+ </Form.Item>
|
|
|
<Form.Item label={<strong>客服组{type == 1 ? '' : '集'}名称</strong>} name="csgroupName" rules={[{ required: true, message: `请输入客服组${type == 1 ? '' : '集'}名称!` }]}>
|
|
|
<Input placeholder={`请输入客服组${type == 1 ? '' : '集'}名称`} />
|
|
|
</Form.Item>
|
|
|
- <Form.Item label={<strong>腾讯企业</strong>} name="tencentCorpId" rules={[{ required: true, message: '请选择腾讯企业!' }]}>
|
|
|
- <Select
|
|
|
- showSearch
|
|
|
- placeholder="请选择企业"
|
|
|
- filterOption={(input, option) =>
|
|
|
- ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
|
|
|
- }
|
|
|
- allowClear
|
|
|
- options={corpWechatList}
|
|
|
- />
|
|
|
- </Form.Item>
|
|
|
- {type == 1 && <Form.Item label={<strong>客服组集</strong>} name="parentId">
|
|
|
- <Select
|
|
|
- showSearch
|
|
|
- placeholder="请选择客服组集"
|
|
|
- filterOption={(input, option) =>
|
|
|
- ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
|
|
|
- }
|
|
|
- allowClear
|
|
|
- options={localCorpCsgroupList}
|
|
|
- />
|
|
|
- </Form.Item>}
|
|
|
- {!parentId && <Form.Item label={<strong>切号策略</strong>} name="policyId">
|
|
|
+
|
|
|
+ {type == 1 && <>
|
|
|
+ <Form.Item label={<strong>腾讯企业</strong>} name="tencentCorpId" rules={[{ required: true, message: '请选择腾讯企业!' }]}>
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ placeholder="请选择企业"
|
|
|
+ filterOption={(input, option) =>
|
|
|
+ ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
|
|
|
+ }
|
|
|
+ allowClear
|
|
|
+ disabled={initialValues?.id}
|
|
|
+ options={corpWechatList}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item label={<strong>客服组集</strong>} name="parentId">
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ placeholder="请选择客服组集"
|
|
|
+ filterOption={(input, option) =>
|
|
|
+ ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
|
|
|
+ }
|
|
|
+ allowClear
|
|
|
+ options={localCorpCsgroupList}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+ </>}
|
|
|
+ {(initialValues?.id ? !initialValues?.parentId : !parentId) && <Form.Item label={<strong>切号策略</strong>} name="policyId">
|
|
|
<Select
|
|
|
showSearch
|
|
|
placeholder="请选择切号策略"
|