zhaoy 9 달 전
부모
커밋
5c760ac55f
9개의 변경된 파일98개의 추가작업 그리고 16개의 파일을 삭제
  1. +16
    -0
      src/pages/company/account/components/CreateForm.jsx
  2. +3
    -1
      src/pages/company/account/components/MenuForm.jsx
  3. +20
    -2
      src/pages/company/account/index.jsx
  4. +2
    -2
      src/pages/company/account/service.js
  5. +1
    -0
      src/pages/device/productmanage/components/CreateForm.jsx
  6. +3
    -0
      src/pages/device/productmanage/index.jsx
  7. +21
    -8
      src/pages/sys/menus/components/CreateForm.jsx
  8. +31
    -2
      src/pages/sys/menus/index.jsx
  9. +1
    -1
      src/pages/sys/menus/service.js

+ 16
- 0
src/pages/company/account/components/CreateForm.jsx 파일 보기

@@ -37,6 +37,22 @@ const CreateForm = (props) => {
message: '邮箱格式不正确', }]}>
<Input placeholder="电子邮件是登录账户" disabled={props.values.id?true:false} />
</Form.Item>
<Form.Item name="type" label="所属平台" rules={[{ required: true }]}>
<Select placeholder='请选择所属平台' allowClear options={[
{
value: 0,
label: '团餐',
},
{
value: 1,
label: '门店',
},
{
value: 2,
label: '后厨',
},
]}/>
</Form.Item>
<Form.Item name="phone" label="电话" rules={[{ max: 20,pattern: /0?(13|14|15|18|17)[0-9]{9}$/,
message: '手机号格式不正确' }]}>
<Input placeholder="请输入电话" />


+ 3
- 1
src/pages/company/account/components/MenuForm.jsx 파일 보기

@@ -16,7 +16,9 @@ const MenuForm = (props) => {

});
setCheckedKeys(arr)
var ret = await api.GetMenu('ALL');
console.log("props.values",props.datas)
var parm={getType:'ALL',type:props.datas.type}
var ret = await api.GetMenu(parm);
var data = Enumerable.from(ret.data).toArray();
setLoad(data);
}, [props.modalVisible])


+ 20
- 2
src/pages/company/account/index.jsx 파일 보기

@@ -120,7 +120,8 @@ const companyManage = () => {
const [row, setRow] = useState();

useEffect(() => {
api.GetMenu().then((r) => {
var parm={getType:'ALL',type:0}
api.GetMenu(parm).then((r) => {
if(r.data){
setTreeData(r.data.data);
}
@@ -164,7 +165,23 @@ const companyManage = () => {
dataIndex: 'email',
ellipsis: true,
},
{
title: '所属平台',
dataIndex: 'type',
valueType: 'select',
ellipsis:true,
valueEnum: {
0: {
text: '团餐',
},
1: {
text: '门店',
},
2: {
text: '后厨',
},
},
},
{
title: '电话',
dataIndex: 'phone',
@@ -423,6 +440,7 @@ const companyManage = () => {
}}
modalVisible={updateMenuModalVisible}
values={row || {}}
datas={stepFormValues || {}}
/>
) : null}
<Drawer


+ 2
- 2
src/pages/company/account/service.js 파일 보기

@@ -18,7 +18,7 @@ export default {
/** 修改企业信息*/
updateCompany(data) {
return request(`/saasbase/api/company/update`, {
method: 'PUT',
method: 'POST',
data: data,
});
},
@@ -50,7 +50,7 @@ export default {
},
/** 查询功能菜单*/
GetMenu(params) {
return request(`​/saasbase/api/menu/menutrees?getType=${params}`,
return request(`​/saasbase/api/menu/menuparmytrees?getType=${params.getType}&&type=${params.type}`,
{
method: 'Get',
});


+ 1
- 0
src/pages/device/productmanage/components/CreateForm.jsx 파일 보기

@@ -40,6 +40,7 @@ const CreateForm = (props) => {
setarttue(props?.values?.type)
if(props?.values?.type==1){
setdisplay("none")
setdisanumbled('none')
}else if(props?.values?.type==0){
setdisplay("block")
}


+ 3
- 0
src/pages/device/productmanage/index.jsx 파일 보기

@@ -368,6 +368,9 @@ const handleAdd = async (fields) => {
fields.enumValue=JSON.stringify(fields.enumvaluelist)
}
}
if(fields.type==1){
fields.dataType="";
}
await addgoodstechnology(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('添加成功');


+ 21
- 8
src/pages/sys/menus/components/CreateForm.jsx 파일 보기

@@ -111,15 +111,28 @@ const CreateForm = (props) => {
</Form.Item>
</Col>
<Col span={12}>
{RadioKey != 0 && props.values.type != 0 ? (
''
) : (
<Form.Item name="permission" label="权限标识">
<Select placeholder='请选择权限标识'>
{props.dictData}
</Select>
<Form.Item name="type" label="所属平台">
<Select placeholder='请选择所属平台' mode="multiple" allowClear options={[
{
value: '0',
label: '团餐',
},
{
value: '1',
label: '门店',
},
{
value: '2',
label: '后厨',
},
{
value: '3',
label: '公共',
},
]}/>
</Form.Item>
)}
</Col>
</Row>
<Form.Item>


+ 31
- 2
src/pages/sys/menus/index.jsx 파일 보기

@@ -28,7 +28,7 @@ const menuManager = () => {
*/

const handleAdd = async (fields) => {
fields.type=2
fields.type=fields.type.join(',');
await api.add({ ...fields }).then((r) => {
if (r.succeeded) {
message.success('添加成功');
@@ -47,6 +47,7 @@ const menuManager = () => {
*/

const handleUpdate = async (fields) => {
fields.type=fields.type.join(',');
api.update(fields).then((r) => {
if (r.succeeded) {
message.success('更新成功');
@@ -72,6 +73,7 @@ const handleUpdate = async (fields) => {
onClick={() => {
InitTree();
handleModalVisible(true);
record.type=record.type.split(',');
setStepFormValues(record);
}}
>
@@ -157,6 +159,32 @@ const handleUpdate = async (fields) => {
dataIndex: 'name',
ellipsis:true,
},
{
title: '所属平台',
dataIndex: 'typeName',
},
{
title: '所属平台',
dataIndex: 'type',
valueType: 'select',
ellipsis:true,
hideInTable: true,
valueEnum: {
0: {
text: '团餐',
},
1: {
text: '门店',
},
2: {
text: '后厨',
},
3: {
text: '公共',
},
},
},
{
title: '菜单编码',
dataIndex: 'code',
@@ -232,7 +260,8 @@ const handleUpdate = async (fields) => {
let UserData = [];
//添加机构组织
await api.menutreepage(value).then((r) => {
UserData = r.data;
UserData=r.data
console.log("UserData",UserData)
});
return {
data: UserData,


+ 1
- 1
src/pages/sys/menus/service.js 파일 보기

@@ -36,7 +36,7 @@ function update(params) {
}

function trees() {
return request(`​/saasbase/api/menu/menutrees?getType=ALL`, {
return request(`​/saasbase/api/menu/menutreesall`, {
method: 'Get',
});
}


불러오는 중...
취소
저장