Browse Source

提交

storemanagementweb
gwbvipvip 11 months ago
parent
commit
ec4b320833
5 changed files with 46 additions and 19 deletions
  1. +1
    -0
      src/pages/applet/basicconfiguration/index.jsx
  2. +14
    -5
      src/pages/applet/paytemplate/index.jsx
  3. +1
    -1
      src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx
  4. +15
    -5
      src/pages/shopmanage/storeAdvertisement/components/CreateForm.jsx
  5. +15
    -8
      src/pages/shopmanage/storeAdvertisement/index.jsx

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

@@ -364,6 +364,7 @@ const Material = () => {
pageSize: 10,
}}
request={async (params) => {
debugger
if (!selectedStore) return;
const jsonData = {
"current": params.current,


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

@@ -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: '请选择归属场景!',
},
]}
>
<Select allowClear placeholder="请选择门店" style={{ width: '100%' }}>
<Select allowClear placeholder="请选择归属场景" style={{ width: '100%' }}>
{
storeList.map(item => {
return <Option value={item.id} key={item.id}>{item.name}</Option>


+ 1
- 1
src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx View File

@@ -120,7 +120,7 @@ const PrinterFormModal = (props) => {
<Row>
{
props.storeFoodMenuAll.map(item => {
return <Col span={8} key={item.foodId}>
return <Col key={item.foodId}>
<Checkbox
value={item.foodId}
style={{


+ 15
- 5
src/pages/shopmanage/storeAdvertisement/components/CreateForm.jsx View File

@@ -37,9 +37,9 @@ const CreateForm = (props) => {
}
//删除文件
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) => {
<Modal
title={props.values.id ? '编辑' : '新建'}
width={700}
visible={props.createModalVisible}
open={props.createModalVisible}
bodyStyle={{ padding: '32px 40px 48px' }}
onCancel={() => {
//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}
>
<Form.Item name="id" hidden={true}>


+ 15
- 8
src/pages/shopmanage/storeAdvertisement/index.jsx View File

@@ -206,14 +206,18 @@ const PlanManage = () => {
<a
key="config"
onClick={() => {
form.resetFields();
if (record.startTime != null) {
record.planDate=[];
record.planDate[0]=moment(record.startTime);
record.planDate[1]=moment(record.endTime);
record.startTime = moment(record.startTime);
record.endTime = moment(record.endTime);
}
setCurrentRow(() => {
if (record.startTime != null) {
record.startTime = moment(record.startTime);
record.endTime = moment(record.endTime);
}
return record;
});
form.setFieldsValue(record);
handleModalVisible(true);
}}
>
@@ -345,14 +349,17 @@ const PlanManage = () => {
form={form}
storeArray={storeList}
onFinish={async (value) => {
if(value?.imageUrl?.length<=0){
if(value?.imageUrl?.length<=0&&value?.uploadType==0){
message.error("请选择图片");
return;
}
var success = false;
value.startTime = moment(value.planDate[0]).format('YYYY-MM-DD HH:mm:ss');
value.endTime = moment(value.planDate[1]).format('YYYY-MM-DD HH:mm:ss');
if(value.startTime!=null){

value.startTime = moment(value.planDate[0]).format('YYYY-MM-DD HH:mm:ss');
value.endTime = moment(value.planDate[1]).format('YYYY-MM-DD HH:mm:ss');
}
if (value.id) {
success = await handleUpdate(value);
} else {


Loading…
Cancel
Save