Browse Source

提交

groupmealweb
gwbvipvip 10 months ago
parent
commit
445ec742e0
5 changed files with 75 additions and 59 deletions
  1. +12
    -12
      src/pages/applet/basicconfiguration/index.jsx
  2. +18
    -18
      src/pages/applet/paytemplate/index.jsx
  3. +10
    -3
      src/pages/groupMeal/member/membertag/components/CreateForm.jsx
  4. +29
    -23
      src/pages/groupMeal/oneCard/machine/index.jsx
  5. +6
    -3
      src/pages/groupMeal/oneCard/storedValueCard/index.jsx

+ 12
- 12
src/pages/applet/basicconfiguration/index.jsx View File

@@ -212,7 +212,7 @@ const Material = () => {
setIsModalVisible(false); setIsModalVisible(false);
actionRef.current.reloadAndRest(); actionRef.current.reloadAndRest();
} else { } else {
message.error(response.errors||'更新失败')
message.error(response.errors || '更新失败')
} }
} else { } else {
const response = await appletAPI.AddMinimaterial(jsonData); const response = await appletAPI.AddMinimaterial(jsonData);
@@ -221,7 +221,7 @@ const Material = () => {
setIsModalVisible(false); setIsModalVisible(false);
actionRef.current.reloadAndRest(); actionRef.current.reloadAndRest();
} else { } else {
message.error(response.errors||'添加失败')
message.error(response.errors || '添加失败')
} }
} }
} }
@@ -307,12 +307,12 @@ const Material = () => {
useEffect(() => { useEffect(() => {
if (!selectedStore) return; if (!selectedStore) return;
onFetchMiniPageList(); onFetchMiniPageList();
if(!selectedPage) return;
if (!selectedPage) return;
actionRef.current.reloadAndRest(); actionRef.current.reloadAndRest();
}, [selectedStore]); }, [selectedStore]);


useEffect(() => { useEffect(() => {
actionRef.current.reloadAndRest();
actionRef.current.reloadAndRest();
}, [selectedPage]); }, [selectedPage]);


return <PageContainer header={{ return <PageContainer header={{
@@ -320,7 +320,7 @@ const Material = () => {
breadcrumb: {}, breadcrumb: {},
}}> }}>
<Card style={{ marginBottom: '10px' }}> <Card style={{ marginBottom: '10px' }}>
<div className={styles.table_search_item} style={{float:"left"}}>
<div className={styles.table_search_item} style={{ float: "left" }}>
<div> <div>
当前门店: 当前门店:
</div> </div>
@@ -335,8 +335,8 @@ const Material = () => {
} }
</Select> </Select>
</div> </div>
<div style={{float:"left"}}>&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div className={styles.table_search_item} style={{float:"left"}}>
<div style={{ float: "left" }}>&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div className={styles.table_search_item} style={{ float: "left" }}>
<div> <div>
所属页面: 所属页面:
</div> </div>
@@ -362,14 +362,14 @@ const Material = () => {
}} }}
pagination={{ pagination={{
pageSize: 10, pageSize: 10,
}}
}}
request={async (params) => { request={async (params) => {
if (!selectedStore) return; if (!selectedStore) return;
const jsonData = { const jsonData = {
"current": params.current, "current": params.current,
"pageSize": params.pageSize, "pageSize": params.pageSize,
"storeId": selectedStore, "storeId": selectedStore,
"pageId":selectedPage
"pageId": selectedPage
} }
const response = await appletAPI.MinimaterialListByStore(jsonData); const response = await appletAPI.MinimaterialListByStore(jsonData);
const pageList = []; const pageList = [];
@@ -494,10 +494,10 @@ const Material = () => {
})() })()
} }
</Upload> </Upload>
<Button htmlType="button" style={{ float: 'right', left: 10 }} onClick={() => setIsModalVisible(false)}>
取消
<Button type="primary" htmlType="submit" style={{ float: 'right', left: 10 }} onClick={() => onAddPageMaterial()}>
确认
</Button> </Button>
<Button type="primary" htmlType="submit" style={{ float: 'right' }} onClick={() => onAddPageMaterial()}>保存</Button>
<Button htmlType="button" style={{ float: 'right' }} onClick={() => setIsModalVisible(false)} >取消</Button>


</div> </div>




+ 18
- 18
src/pages/applet/paytemplate/index.jsx View File

@@ -34,9 +34,9 @@ const pageManage = () => {
render: (_, record) => { render: (_, record) => {
const find = storeList.find(item => item.id === record.storeId); const find = storeList.find(item => item.id === record.storeId);
if (find) { if (find) {
return <div>{find.name}</div>
return <div>{find.name}</div>
} }
}
}


}, },
{ {
@@ -113,7 +113,7 @@ const pageManage = () => {
*/ */
const onFetchStoreList = async () => { const onFetchStoreList = async () => {
const response = await appletAPI.GetAllStore(); const response = await appletAPI.GetAllStore();
if (response.statusCode==200) {
if (response.statusCode == 200) {
setStoreList(response.data); setStoreList(response.data);
setSelectedStore(response.data[0]?.id); setSelectedStore(response.data[0]?.id);
} else { } else {
@@ -129,10 +129,10 @@ const pageManage = () => {
actionRef.current.reloadAndRest(); actionRef.current.reloadAndRest();
}, [selectedStore]); }, [selectedStore]);


return <PageContainer header={{
return <PageContainer header={{
title: '', title: '',
breadcrumb: {}, breadcrumb: {},
}}>
}}>
<Card style={{ marginBottom: '10px' }}> <Card style={{ marginBottom: '10px' }}>
<div className={styles.table_search_item}> <div className={styles.table_search_item}>
<div> <div>
@@ -154,17 +154,17 @@ const pageManage = () => {
actionRef={actionRef} actionRef={actionRef}
pagination={{ pagination={{
pageSize: 10, pageSize: 10,
}}
scroll={{
}}
scroll={{
x: 1300, x: 1300,
}}
}}
cardBordered cardBordered
editable={{ editable={{
type: 'multiple', type: 'multiple',
}} }}
request={async (params) => { request={async (params) => {
if (!selectedStore) return; if (!selectedStore) return;
const jsonData = {
const jsonData = {
"current": params.current, "current": params.current,
"pageSize": params.pageSize, "pageSize": params.pageSize,
"storeId": selectedStore "storeId": selectedStore
@@ -186,10 +186,10 @@ const pageManage = () => {
</Button> </Button>
]} ]}
/> />
<Modal
title="编辑页面"
maskClosable={false}
footer={false} visible={isModalVisible} onOk={() => setIsModalVisible(false)} onCancel={() => setIsModalVisible(false)} bodyStyle={{ padding: '32px 40px 1px 48px' }}>
<Modal
title="编辑页面"
maskClosable={false}
footer={false} visible={isModalVisible} onOk={() => setIsModalVisible(false)} onCancel={() => setIsModalVisible(false)} bodyStyle={{ padding: '32px 40px 1px 48px' }}>
<Form <Form
name="basic" name="basic"
form={pageForm} form={pageForm}
@@ -246,13 +246,13 @@ const pageManage = () => {
</Form.Item> </Form.Item>


<Form.Item> <Form.Item>
<Button htmlType="button" style={{float:'right',left:10}} onClick={() => setIsModalVisible(false)}>
取消
<Button type="primary" htmlType="submit" style={{ float: 'right', left: 10 }} >
确认
</Button> </Button>
<Button type="primary" htmlType="submit" style={{float:'right'}} >
保存
<Button htmlType="button" style={{ float: 'right' }} onClick={() => setIsModalVisible(false)}>
取消
</Button> </Button>
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal>


+ 10
- 3
src/pages/groupMeal/member/membertag/components/CreateForm.jsx View File

@@ -24,7 +24,7 @@ const CreateForm = (props) => {
<Form.Item name="id" hidden={true}> <Form.Item name="id" hidden={true}>
<Input /> <Input />
</Form.Item> </Form.Item>
<Form.Item name="name" label="标签名称" rules={[{ required: true, max: 65,whitespace:true }]}>
<Form.Item name="name" label="标签名称" rules={[{ required: true, max: 65, whitespace: true }]}>
<Input placeholder="请输入标签名称" /> <Input placeholder="请输入标签名称" />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@@ -73,11 +73,18 @@ const CreateForm = (props) => {
</Form.Item> */} </Form.Item> */}




<Form.Item>
{/* <Form.Item>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
保存 保存
</Button> </Button>
</Form.Item>
</Form.Item> */}

<Button type="primary" htmlType="submit" style={{ float: 'right', left: 10 }} >
确认
</Button>
<Button htmlType="button" style={{ float: 'right' }} onClick={props.onCancel} >
取消
</Button>
</Form> </Form>
</Modal> </Modal>
); );


+ 29
- 23
src/pages/groupMeal/oneCard/machine/index.jsx View File

@@ -270,10 +270,16 @@ const Machine = () => {
</Button> </Button>
]} ]}
/> />
<Modal
width={600}
maskClosable={false}
title={currentOption.id ? '更新' : '新增'} visible={isModalOpen} footer={false} onCancel={() => { setCurrentOption({}); setIsModalOpen(false) }}>
<Modal
width={600}
maskClosable={false}
title={currentOption.id ? '更新' : '新增'}
visible={isModalOpen}
// footer={false}
onOk={()=>{
modalForm.submit();
}}
onCancel={() => { setCurrentOption({}); setIsModalOpen(false) }}>
<Form <Form
name="basic" name="basic"
onFinish={onFinish} onFinish={onFinish}
@@ -288,21 +294,6 @@ const Machine = () => {
> >
<Input /> <Input />
</Form.Item> </Form.Item>


<Form.Item
label="刷卡机名称"
name="name"
rules={[
{
required: true,
message: '请输入刷卡机名称!',
},
]}
>
<Input />
</Form.Item>

<Form.Item <Form.Item
label="归属档口" label="归属档口"
name="gateId" name="gateId"
@@ -326,6 +317,21 @@ const Machine = () => {
</Select> </Select>
</Form.Item> </Form.Item>


<Form.Item
label="刷卡机名称"
name="name"
rules={[
{
required: true,
message: '请输入刷卡机名称!',
},
]}
>
<Input />
</Form.Item>


{/* <Form.Item {/* <Form.Item
label="状态" label="状态"
name="status" name="status"
@@ -336,7 +342,7 @@ const Machine = () => {
</Select> </Select>
</Form.Item> */} </Form.Item> */}


<Form.Item <Form.Item
label="刷卡机编号" label="刷卡机编号"
name="address" name="address"
@@ -370,7 +376,7 @@ const Machine = () => {
<Form.Item <Form.Item
label="状态" label="状态"
name="status"> name="status">
<Select defaultValue={0}>
<Select defaultValue={0}>
<Option value={0}>正常</Option> <Option value={0}>正常</Option>
<Option value={1}>停用</Option> <Option value={1}>停用</Option>
</Select> </Select>
@@ -379,11 +385,11 @@ const Machine = () => {
} }
</Form.Item> </Form.Item>


<Form.Item>
{/* <Form.Item>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
确定 确定
</Button> </Button>
</Form.Item>
</Form.Item> */}
</Form> </Form>
</Modal> </Modal>
</div> </div>


+ 6
- 3
src/pages/groupMeal/oneCard/storedValueCard/index.jsx View File

@@ -285,7 +285,10 @@ const storedValueCard = () => {
maskClosable={false} maskClosable={false}
title={currentOption.id ? '编辑储值卡' : '添加储值卡'} title={currentOption.id ? '编辑储值卡' : '添加储值卡'}
visible={isModalOpen} visible={isModalOpen}
footer={false}
//footer={false}
onOk={()=>{
modalForm.submit();
}}
onCancel={() => setIsModalOpen(false)} onCancel={() => setIsModalOpen(false)}
> >
<Form name="basic" onFinish={onFinish} form={modalForm} labelCol={{ span: 4 }}> <Form name="basic" onFinish={onFinish} form={modalForm} labelCol={{ span: 4 }}>
@@ -352,11 +355,11 @@ const storedValueCard = () => {
} }
</Form.Item> </Form.Item>


<Form.Item>
{/* <Form.Item>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
确定 确定
</Button> </Button>
</Form.Item>
</Form.Item> */}
</Form> </Form>
</Modal> </Modal>
<Drawer <Drawer


Loading…
Cancel
Save