@@ -212,7 +212,7 @@ const Material = () => { | |||
setIsModalVisible(false); | |||
actionRef.current.reloadAndRest(); | |||
} else { | |||
message.error(response.errors||'更新失败') | |||
message.error(response.errors || '更新失败') | |||
} | |||
} else { | |||
const response = await appletAPI.AddMinimaterial(jsonData); | |||
@@ -221,7 +221,7 @@ const Material = () => { | |||
setIsModalVisible(false); | |||
actionRef.current.reloadAndRest(); | |||
} else { | |||
message.error(response.errors||'添加失败') | |||
message.error(response.errors || '添加失败') | |||
} | |||
} | |||
} | |||
@@ -307,12 +307,12 @@ const Material = () => { | |||
useEffect(() => { | |||
if (!selectedStore) return; | |||
onFetchMiniPageList(); | |||
if(!selectedPage) return; | |||
if (!selectedPage) return; | |||
actionRef.current.reloadAndRest(); | |||
}, [selectedStore]); | |||
useEffect(() => { | |||
actionRef.current.reloadAndRest(); | |||
actionRef.current.reloadAndRest(); | |||
}, [selectedPage]); | |||
return <PageContainer header={{ | |||
@@ -320,7 +320,7 @@ const Material = () => { | |||
breadcrumb: {}, | |||
}}> | |||
<Card style={{ marginBottom: '10px' }}> | |||
<div className={styles.table_search_item} style={{float:"left"}}> | |||
<div className={styles.table_search_item} style={{ float: "left" }}> | |||
<div> | |||
当前门店: | |||
</div> | |||
@@ -335,8 +335,8 @@ const Material = () => { | |||
} | |||
</Select> | |||
</div> | |||
<div style={{float:"left"}}> </div> | |||
<div className={styles.table_search_item} style={{float:"left"}}> | |||
<div style={{ float: "left" }}> </div> | |||
<div className={styles.table_search_item} style={{ float: "left" }}> | |||
<div> | |||
所属页面: | |||
</div> | |||
@@ -362,14 +362,14 @@ const Material = () => { | |||
}} | |||
pagination={{ | |||
pageSize: 10, | |||
}} | |||
}} | |||
request={async (params) => { | |||
if (!selectedStore) return; | |||
const jsonData = { | |||
"current": params.current, | |||
"pageSize": params.pageSize, | |||
"storeId": selectedStore, | |||
"pageId":selectedPage | |||
"pageId": selectedPage | |||
} | |||
const response = await appletAPI.MinimaterialListByStore(jsonData); | |||
const pageList = []; | |||
@@ -494,10 +494,10 @@ const Material = () => { | |||
})() | |||
} | |||
</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 type="primary" htmlType="submit" style={{ float: 'right' }} onClick={() => onAddPageMaterial()}>保存</Button> | |||
<Button htmlType="button" style={{ float: 'right' }} onClick={() => setIsModalVisible(false)} >取消</Button> | |||
</div> | |||
@@ -34,9 +34,9 @@ const pageManage = () => { | |||
render: (_, record) => { | |||
const find = storeList.find(item => item.id === record.storeId); | |||
if (find) { | |||
return <div>{find.name}</div> | |||
return <div>{find.name}</div> | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
@@ -113,7 +113,7 @@ const pageManage = () => { | |||
*/ | |||
const onFetchStoreList = async () => { | |||
const response = await appletAPI.GetAllStore(); | |||
if (response.statusCode==200) { | |||
if (response.statusCode == 200) { | |||
setStoreList(response.data); | |||
setSelectedStore(response.data[0]?.id); | |||
} else { | |||
@@ -129,10 +129,10 @@ const pageManage = () => { | |||
actionRef.current.reloadAndRest(); | |||
}, [selectedStore]); | |||
return <PageContainer header={{ | |||
return <PageContainer header={{ | |||
title: '', | |||
breadcrumb: {}, | |||
}}> | |||
}}> | |||
<Card style={{ marginBottom: '10px' }}> | |||
<div className={styles.table_search_item}> | |||
<div> | |||
@@ -154,17 +154,17 @@ const pageManage = () => { | |||
actionRef={actionRef} | |||
pagination={{ | |||
pageSize: 10, | |||
}} | |||
scroll={{ | |||
}} | |||
scroll={{ | |||
x: 1300, | |||
}} | |||
}} | |||
cardBordered | |||
editable={{ | |||
type: 'multiple', | |||
}} | |||
request={async (params) => { | |||
if (!selectedStore) return; | |||
const jsonData = { | |||
const jsonData = { | |||
"current": params.current, | |||
"pageSize": params.pageSize, | |||
"storeId": selectedStore | |||
@@ -186,10 +186,10 @@ const pageManage = () => { | |||
</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 | |||
name="basic" | |||
form={pageForm} | |||
@@ -246,13 +246,13 @@ const pageManage = () => { | |||
</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 type="primary" htmlType="submit" style={{float:'right'}} > | |||
保存 | |||
<Button htmlType="button" style={{ float: 'right' }} onClick={() => setIsModalVisible(false)}> | |||
取消 | |||
</Button> | |||
</Form.Item> | |||
</Form> | |||
</Modal> | |||
@@ -24,7 +24,7 @@ const CreateForm = (props) => { | |||
<Form.Item name="id" hidden={true}> | |||
<Input /> | |||
</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="请输入标签名称" /> | |||
</Form.Item> | |||
<Form.Item | |||
@@ -73,11 +73,18 @@ const CreateForm = (props) => { | |||
</Form.Item> */} | |||
<Form.Item> | |||
{/* <Form.Item> | |||
<Button type="primary" htmlType="submit"> | |||
保存 | |||
</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> | |||
</Modal> | |||
); | |||
@@ -270,10 +270,16 @@ const Machine = () => { | |||
</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 | |||
name="basic" | |||
onFinish={onFinish} | |||
@@ -288,21 +294,6 @@ const Machine = () => { | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="刷卡机名称" | |||
name="name" | |||
rules={[ | |||
{ | |||
required: true, | |||
message: '请输入刷卡机名称!', | |||
}, | |||
]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="归属档口" | |||
name="gateId" | |||
@@ -326,6 +317,21 @@ const Machine = () => { | |||
</Select> | |||
</Form.Item> | |||
<Form.Item | |||
label="刷卡机名称" | |||
name="name" | |||
rules={[ | |||
{ | |||
required: true, | |||
message: '请输入刷卡机名称!', | |||
}, | |||
]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
{/* <Form.Item | |||
label="状态" | |||
name="status" | |||
@@ -336,7 +342,7 @@ const Machine = () => { | |||
</Select> | |||
</Form.Item> */} | |||
<Form.Item | |||
label="刷卡机编号" | |||
name="address" | |||
@@ -370,7 +376,7 @@ const Machine = () => { | |||
<Form.Item | |||
label="状态" | |||
name="status"> | |||
<Select defaultValue={0}> | |||
<Select defaultValue={0}> | |||
<Option value={0}>正常</Option> | |||
<Option value={1}>停用</Option> | |||
</Select> | |||
@@ -379,11 +385,11 @@ const Machine = () => { | |||
} | |||
</Form.Item> | |||
<Form.Item> | |||
{/* <Form.Item> | |||
<Button type="primary" htmlType="submit"> | |||
确定 | |||
</Button> | |||
</Form.Item> | |||
</Form.Item> */} | |||
</Form> | |||
</Modal> | |||
</div> | |||
@@ -285,7 +285,10 @@ const storedValueCard = () => { | |||
maskClosable={false} | |||
title={currentOption.id ? '编辑储值卡' : '添加储值卡'} | |||
visible={isModalOpen} | |||
footer={false} | |||
//footer={false} | |||
onOk={()=>{ | |||
modalForm.submit(); | |||
}} | |||
onCancel={() => setIsModalOpen(false)} | |||
> | |||
<Form name="basic" onFinish={onFinish} form={modalForm} labelCol={{ span: 4 }}> | |||
@@ -352,11 +355,11 @@ const storedValueCard = () => { | |||
} | |||
</Form.Item> | |||
<Form.Item> | |||
{/* <Form.Item> | |||
<Button type="primary" htmlType="submit"> | |||
确定 | |||
</Button> | |||
</Form.Item> | |||
</Form.Item> */} | |||
</Form> | |||
</Modal> | |||
<Drawer | |||