diff --git a/src/pages/applet/basicconfiguration/index.jsx b/src/pages/applet/basicconfiguration/index.jsx index 2a75413..46666a2 100644 --- a/src/pages/applet/basicconfiguration/index.jsx +++ b/src/pages/applet/basicconfiguration/index.jsx @@ -364,6 +364,7 @@ const Material = () => { pageSize: 10, }} request={async (params) => { + debugger if (!selectedStore) return; const jsonData = { "current": params.current, diff --git a/src/pages/applet/paytemplate/index.jsx b/src/pages/applet/paytemplate/index.jsx index befda33..f7f8842 100644 --- a/src/pages/applet/paytemplate/index.jsx +++ b/src/pages/applet/paytemplate/index.jsx @@ -162,14 +162,23 @@ const pageManage = () => { editable={{ type: 'multiple', }} - request={async () => { + request={async (params) => { if (!selectedStore) return; const jsonData = { - "current": currentPage, - "pageSize": pageSize, + "current": params.current, + "pageSize": params.pageSize, "storeId": selectedStore } const response = await appletAPI.MiniPageList(jsonData); + if(params.current>response.totalPages){ + params.current=response.totalPages; + jsonData = { + "current": params.current, + "pageSize": params.pageSize, + "storeId": selectedStore + } + response = await appletAPI.MiniPageList(jsonData); + } return { data: response.data.items, success: true, @@ -207,11 +216,11 @@ const pageManage = () => { rules={[ { required: true, - message: '请选择门店!', + message: '请选择归属场景!', }, ]} > - { storeList.map(item => { return diff --git a/src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx b/src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx index 72b783e..e13515c 100644 --- a/src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx +++ b/src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx @@ -120,7 +120,7 @@ const PrinterFormModal = (props) => { { props.storeFoodMenuAll.map(item => { - return + return { } //删除文件 function deleteFiles(data) { - var res = request(`/kitchen/api/Upload/DeleteFile?fileUrl=${data}`, { - method: 'post', - }); + // var res = request(`/kitchen/api/Upload/DeleteFile?fileUrl=${data}`, { + // method: 'post', + // }); } //上传成功后返回的图片相对路径数组 @@ -138,12 +138,22 @@ const CreateForm = (props) => { deleteFiles(info.response.data[0]);//删除刚上传的文件 deleteName = info.response.data[0] } + //删除图片变量集合对应的文件 for (let [key, value] of Object.entries(imageList)) { if (value.name == deleteName) { delete imageList[key] } } + var fileList= props.form.getFieldValue("imageUrl"); + var files=[]; + for (let index = 0; index < fileList.length; index++) { + if (fileList[index].name != deleteName) { + files.push(fileList[index]); + } + } + props.form.setFieldValue('imageUrl', files); + }, onPreview(info) { @@ -157,7 +167,7 @@ const CreateForm = (props) => { { //props.form.setFieldsValue({}); @@ -173,7 +183,7 @@ const CreateForm = (props) => { form={props.form} layout="Horizontal" preserve={false} - initialValues={props.values} + //initialValues={props.values} onFinish={props.onFinish} >