Browse Source

Merge branch 'storemanagementweb' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Web into storemanagementweb

storemanagementweb
zhaoy 10 months ago
parent
commit
d6fcfc7890
44 changed files with 640 additions and 503 deletions
  1. +3
    -3
      src/pages/applet/appidmanager/appid/index.jsx
  2. +3
    -3
      src/pages/applet/appidmanager/payment/index.jsx
  3. +7
    -6
      src/pages/applet/basicconfiguration/index.jsx
  4. +4
    -4
      src/pages/applet/materialmanager/index.jsx
  5. +4
    -4
      src/pages/applet/pagemanager/index.jsx
  6. +18
    -9
      src/pages/applet/paytemplate/index.jsx
  7. +3
    -3
      src/pages/company/account/index.jsx
  8. +3
    -3
      src/pages/database/basic/batching/index.jsx
  9. +6
    -6
      src/pages/database/goods/goodsInfo/index.jsx
  10. +6
    -6
      src/pages/database/goods/goodsattribute/index.jsx
  11. +6
    -6
      src/pages/database/goods/goodstypemanage/components/CreateAttribute.jsx
  12. +1
    -1
      src/pages/database/goods/goodstypemanage/components/CreateAttributeValue.jsx
  13. +3
    -3
      src/pages/database/goods/goodstypemanage/index.jsx
  14. +3
    -3
      src/pages/database/goods/newgoods/index.jsx
  15. +4
    -4
      src/pages/device/deviceInfo/index.jsx
  16. +3
    -3
      src/pages/device/deviceVesion/index.jsx
  17. +5
    -5
      src/pages/device/product/index.jsx
  18. +2
    -2
      src/pages/device/productmanage/components/ActionForm.jsx
  19. +2
    -2
      src/pages/device/productmanage/index.jsx
  20. +4
    -4
      src/pages/order/thirdAuthorize/index.jsx
  21. +3
    -3
      src/pages/org/orgamange/index.jsx
  22. +5
    -5
      src/pages/org/roles/index.jsx
  23. +4
    -4
      src/pages/org/users/index.jsx
  24. +0
    -1
      src/pages/push/batchingpush/components/PushFrom.jsx
  25. +104
    -67
      src/pages/push/batchingpush/index.jsx
  26. +94
    -95
      src/pages/push/goodspush/components/PushFrom.jsx
  27. +77
    -41
      src/pages/push/goodspush/index.jsx
  28. +102
    -100
      src/pages/push/technologypush/components/PushFrom.jsx
  29. +77
    -40
      src/pages/push/technologypush/index.jsx
  30. +1
    -1
      src/pages/shopmanage/Printer/components/PrinterFormModal/index.jsx
  31. +4
    -4
      src/pages/shopmanage/Printer/index copy.jsx
  32. +5
    -5
      src/pages/shopmanage/Printer/index delete.jsx
  33. +3
    -3
      src/pages/shopmanage/shop/index.jsx
  34. +4
    -4
      src/pages/shopmanage/storeAddGoodsInfo/index.jsx
  35. +15
    -5
      src/pages/shopmanage/storeAdvertisement/components/CreateForm.jsx
  36. +20
    -13
      src/pages/shopmanage/storeAdvertisement/index.jsx
  37. +4
    -4
      src/pages/shopmanage/storeDesktopNumber/index.jsx
  38. +5
    -5
      src/pages/shopmanage/storeGoodsInfo/components/MenuGoods.jsx
  39. +7
    -7
      src/pages/shopmanage/storeGoodsInfo/index copy.jsx
  40. +2
    -2
      src/pages/shopmanage/storeGoodsInfo/index.jsx
  41. +4
    -4
      src/pages/shopmanage/storeStaff/index.jsx
  42. +3
    -3
      src/pages/sys/dictionary/dictdata/index.jsx
  43. +3
    -3
      src/pages/sys/dictionary/dicttype/index.jsx
  44. +4
    -4
      src/pages/sys/menus/index.jsx

+ 3
- 3
src/pages/applet/appidmanager/appid/index.jsx View File

@@ -47,7 +47,7 @@ const PayTemplate = () => {
del(input).then((re) => {
if (re.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('删除失败');
}
@@ -116,7 +116,7 @@ const PayTemplate = () => {
if (re.data) {
message.success('修改成功');
setDrawerVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors||'修改失败');
}
@@ -126,7 +126,7 @@ const PayTemplate = () => {
if (re.data) {
message.success('添加成功');
setDrawerVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors||'添加失败');
}


+ 3
- 3
src/pages/applet/appidmanager/payment/index.jsx View File

@@ -82,7 +82,7 @@ const PayTemplate = () => {
deletepaytemplate(input).then((re) => {
if (re.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors||'删除失败');
}
@@ -167,7 +167,7 @@ const PayTemplate = () => {
if (re.data) {
message.success('修改成功');
setDrawerVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors||'修改失败');
}
@@ -177,7 +177,7 @@ const PayTemplate = () => {
if (re.data) {
message.success('添加成功');
setDrawerVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors||'添加失败');
}


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

@@ -210,7 +210,7 @@ const Material = () => {
if (response.statusCode === 200) {
message.success('更新成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors||'更新失败')
}
@@ -219,7 +219,7 @@ const Material = () => {
if (response.statusCode === 200) {
message.success('添加成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors||'添加失败')
}
@@ -265,7 +265,7 @@ const Material = () => {
const onDeleteMaterial = async (record) => {
const response = await appletAPI.DeleteMiniMaterial(record.id);
if (response.statusCode === 200) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('删除成功');
} else {
message.error(response.errors || '删除失败');
@@ -308,11 +308,11 @@ const Material = () => {
if (!selectedStore) return;
onFetchMiniPageList();
if(!selectedPage) return;
actionRef.current.reload();
actionRef.current.reloadAndRest();
}, [selectedStore]);

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

return <PageContainer header={{
@@ -342,7 +342,7 @@ const Material = () => {
</div>
<Select style={{ width: 300 }} value={selectedPage} onChange={(value) => {
setSelectedPage(value);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}>
{
miniPageList.map(item => {
@@ -364,6 +364,7 @@ const Material = () => {
pageSize: 10,
}}
request={async (params) => {
debugger
if (!selectedStore) return;
const jsonData = {
"current": params.current,


+ 4
- 4
src/pages/applet/materialmanager/index.jsx View File

@@ -208,7 +208,7 @@ const Material = () => {
if (response.statusCode === 200) {
message.success('更新成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('更新失败')
}
@@ -217,7 +217,7 @@ const Material = () => {
if (response.statusCode === 200) {
message.success('添加成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('添加失败')
}
@@ -263,7 +263,7 @@ const Material = () => {
const onDeleteMaterial = async (record) => {
const response = await appletAPI.DeleteMiniMaterial(record.id);
if (response.statusCode === 200) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('删除成功');
} else {
message.error(response.errors || '删除失败');
@@ -304,7 +304,7 @@ const Material = () => {
useEffect(() => {
if (!selectedStore) return;
onFetchMiniPageList();
actionRef.current.reload();
actionRef.current.reloadAndRest();
}, [selectedStore]);

return <PageContainer>


+ 4
- 4
src/pages/applet/pagemanager/index.jsx View File

@@ -69,7 +69,7 @@ const pageManage = () => {
if (response.statusCode === 200) {
message.success('修改成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -78,7 +78,7 @@ const pageManage = () => {
if (response.statusCode === 200) {
message.success('添加成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -93,7 +93,7 @@ const pageManage = () => {
const response = await appletAPI.MiniPageDelete(record.id);
if (response.statusCode === 200) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -117,7 +117,7 @@ const pageManage = () => {
}, []);

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

return <PageContainer>


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

@@ -78,7 +78,7 @@ const pageManage = () => {
if (response.statusCode === 200) {
message.success('修改成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -87,7 +87,7 @@ const pageManage = () => {
if (response.statusCode === 200) {
message.success('添加成功');
setIsModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -102,7 +102,7 @@ const pageManage = () => {
const response = await appletAPI.MiniPageDelete(record.id);
if (response.statusCode === 200) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors);
}
@@ -126,7 +126,7 @@ const pageManage = () => {
}, []);

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

return <PageContainer header={{
@@ -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>


+ 3
- 3
src/pages/company/account/index.jsx View File

@@ -221,7 +221,7 @@ const companyManage = () => {
api.removeCompany([record.id]).then((r) => {

message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
});
}}
onCancel={() => { }}
@@ -345,7 +345,7 @@ const companyManage = () => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
actionRef.current?.reload();
@@ -371,7 +371,7 @@ const companyManage = () => {
handleUpdateMenuModalVisible(false);
setStepFormValues({});
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 3
- 3
src/pages/database/basic/batching/index.jsx View File

@@ -228,7 +228,7 @@ const ProductManage = () => {
api.removeProduct([record.id]).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(e.error);
}
@@ -335,11 +335,11 @@ const ProductManage = () => {
handleModalVisible(false);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}

actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 6
- 6
src/pages/database/goods/goodsInfo/index.jsx View File

@@ -253,7 +253,7 @@ const Advanced = (props) => {
if(r.succeeded){
message.success('修改成功');
setUpdateBomVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
setBomId('')
}else{
message.error(r.errors);
@@ -268,7 +268,7 @@ const Advanced = (props) => {
if(r.succeeded){
message.success('修改成功');
setBomBatchingVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
setBomId('')
}else{
message.error(r.errors);
@@ -343,12 +343,12 @@ const Advanced = (props) => {
DelGoodsBom(record.id);
hide();
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} catch (error) {
hide();
message.error('删除失败,请重试');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return false;
}
}}
@@ -564,7 +564,7 @@ const Advanced = (props) => {
if (success) {
handleGoodsBomModalVisible(false);
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleGoodsBomModalVisible(false);
@@ -585,7 +585,7 @@ const Advanced = (props) => {
}else{
message.error("添加失败")
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
})
}}
goodsid={props.location.query.values?.id}


+ 6
- 6
src/pages/database/goods/goodsattribute/index.jsx View File

@@ -53,7 +53,7 @@ const goodsattribute = (props) => {
await deletegoodsattribute(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -72,7 +72,7 @@ const handleAdd = async (fields) => {
await addgoodsattribute(JSON.stringify(fields)).then((r) => {
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -102,7 +102,7 @@ const handleUpdate = async (fields) => {
}).then((r) => {
if (r.succeeded) {
message.success('修改成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -192,7 +192,7 @@ const handleUpdate = async (fields) => {
await deletegoodsattribute([record.id]).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -305,7 +305,7 @@ const handleUpdate = async (fields) => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}
@@ -330,7 +330,7 @@ const handleUpdate = async (fields) => {
if(r.data){
message.success('保存成功');
handleMattrodalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error("保存失败");
}


+ 6
- 6
src/pages/database/goods/goodstypemanage/components/CreateAttribute.jsx View File

@@ -51,7 +51,7 @@ const goodsattribute = (props) => {
await deletegoodsattribute(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -70,7 +70,7 @@ const handleAdd = async (fields) => {
await addgoodsattribute(JSON.stringify(fields)).then((r) => {
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -95,7 +95,7 @@ const handleUpdate = async (fields) => {
await addgoodsattribute(fields).then((r) => {
if (r.succeeded) {
message.success('修改成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -185,7 +185,7 @@ const handleUpdate = async (fields) => {
await deletegoodsattribute([record.id]).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -297,7 +297,7 @@ const handleUpdate = async (fields) => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}
@@ -310,7 +310,7 @@ const handleUpdate = async (fields) => {
deletegoodsattributevalue(id).then((r)=>{
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}


+ 1
- 1
src/pages/database/goods/goodstypemanage/components/CreateAttributeValue.jsx View File

@@ -43,7 +43,7 @@ const CreateForm = (props) => {
// await deletegoodsattribute([record.id]).then((r) => {
// if (r.succeeded) {
// message.success('删除成功');
// actionRef.current.reload();
// actionRef.current.reloadAndRest();
// } else {
// message.error(r.errors);
// }


+ 3
- 3
src/pages/database/goods/goodstypemanage/index.jsx View File

@@ -111,7 +111,7 @@ const handleAdd = async (fields) => {
await DeleteGoodsTypes(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
intDicData()
} else {
message.error(r.errors);
@@ -198,7 +198,7 @@ const handleAdd = async (fields) => {
await DeleteGoodsType(record.id).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -323,7 +323,7 @@ const handleAdd = async (fields) => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 3
- 3
src/pages/database/goods/newgoods/index.jsx View File

@@ -259,7 +259,7 @@ const GoodsManage = () => {
removeGoods(record.id).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -465,10 +465,10 @@ const GoodsManage = () => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 4
- 4
src/pages/device/deviceInfo/index.jsx View File

@@ -202,7 +202,7 @@ const GoodsTypeManage = () => {
await DelDeviceInfo([record.id]).then((r) => {
if(r.data){
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error('删除失败');
}
@@ -218,7 +218,7 @@ const GoodsTypeManage = () => {
// onClick={() => {
// CopyDevice({ id: record.id }).then((r) => {
// if (r.data) {
// actionRef.current.reload();
// actionRef.current.reloadAndRest();
// }
// });
// }}
@@ -277,7 +277,7 @@ const handleAdd = async (fields) => {
if (r.succeeded) {
message.success('添加成功');
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors)
return false;
@@ -291,7 +291,7 @@ const handleUpdate = async (fields) => {
if (r.succeeded) {
message.success('添加成功');
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors)
return false;


+ 3
- 3
src/pages/device/deviceVesion/index.jsx View File

@@ -111,7 +111,7 @@ const GoodsTypeManage = () => {
setIsAddGoodsTemplate(false);
if (info.file.status === 'done') {
setIsModalOpen(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success(`${info.file.name} 文件上传成功.`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上载失败.`);
@@ -172,7 +172,7 @@ const GoodsTypeManage = () => {

if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -320,7 +320,7 @@ const GoodsTypeManage = () => {
handleModalVisible(false);
setCurrentRow(undefined);
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 5
- 5
src/pages/device/product/index.jsx View File

@@ -68,7 +68,7 @@ const GoodsTypeManage = () => {
DelProduct([record.id]).then((r) => {
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
});
}}
onCancel={() => { }}
@@ -87,7 +87,7 @@ const GoodsTypeManage = () => {
message.destroy(key);
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error(r.errors);
@@ -110,7 +110,7 @@ const GoodsTypeManage = () => {
message.destroy(key);
if (r.succeeded) {
message.success('修改成功',);
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error(r.errors);
@@ -135,7 +135,7 @@ const GoodsTypeManage = () => {
await DelProduct(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error(r.errors);
@@ -229,7 +229,7 @@ const GoodsTypeManage = () => {
handleModalVisible(false);
setCurrentRow(undefined);
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 2
- 2
src/pages/device/productmanage/components/ActionForm.jsx View File

@@ -149,7 +149,7 @@ const ActionForm = (props) => {
deletetechnologyaction(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -220,7 +220,7 @@ const ActionForm = (props) => {
if (success) {
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 2
- 2
src/pages/device/productmanage/index.jsx View File

@@ -407,7 +407,7 @@ const handleAdd = async (fields) => {
LoadfunData(params)
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
} else {
message.error(r.errors);
@@ -458,7 +458,7 @@ const handleRemove = async (ids) => {
LoadfunData(params)
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
} else {
message.error(r.errors);


+ 4
- 4
src/pages/order/thirdAuthorize/index.jsx View File

@@ -69,7 +69,7 @@ const Manage = () => {
if (re.data) {
message.success('修改成功');
setIsModalOpen(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('修改失败');
}
@@ -92,7 +92,7 @@ const Manage = () => {
if (re.data) {
message.success('删除成功');
setIsModalOpen(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('删除成功');
}
@@ -159,7 +159,7 @@ const Manage = () => {
if (re.data) {
message.success('修改成功');
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('修改失败');
}
@@ -169,7 +169,7 @@ const Manage = () => {
if (re.data) {
setIsModalOpen(false);
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(re.errors || '添加失败');
}


+ 3
- 3
src/pages/org/orgamange/index.jsx View File

@@ -164,7 +164,7 @@ const TableList = () => {
if (r.data) {
message.success('删除成功');
initfranchiseeType();
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -197,7 +197,7 @@ const TableList = () => {
// console.log(r)
// if(r.succeeded){
// setauthcode(r.data)
// actionRef.current.reload();
// actionRef.current.reloadAndRest();
// message.success('生成成功');
// }else{
// message.error('生成失败');
@@ -342,7 +342,7 @@ const TableList = () => {
gettree().then((r) => {
setTreeData(r.data);
});
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 5
- 5
src/pages/org/roles/index.jsx View File

@@ -117,7 +117,7 @@ const roleManager = () => {
await removeRole([record.id]).then(r => {
if(r.succeeded){
message.success("删除成功");
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error(r.data);
}
@@ -157,7 +157,7 @@ const roleManager = () => {
// handleRemove(record);
// // removeRole([record.id]).then(r => {
// // message.success(r);
// // actionRef.current.reload();
// // actionRef.current.reloadAndRest();
// // })
// }}
>
@@ -317,7 +317,7 @@ const roleManager = () => {
if (success) {
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}
@@ -341,7 +341,7 @@ const roleManager = () => {
handleUpdateMenuModalVisible(false);
setStepFormValues({});
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}
@@ -368,7 +368,7 @@ const roleManager = () => {
handleUpdateOrgModalVisible(false);
setStepFormValues({});
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 4
- 4
src/pages/org/users/index.jsx View File

@@ -107,7 +107,7 @@ const userManager = () => {
await api.RemoveUser(selectedRows.map((row) => row.id)).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('删除失败,请重试');
}
@@ -305,10 +305,10 @@ const userManager = () => {
setStepFormValues({});

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);
@@ -367,7 +367,7 @@ const userManager = () => {
handleUpdateOrgModalVisible(false);
setStepFormValues({});
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 0
- 1
src/pages/push/batchingpush/components/PushFrom.jsx View File

@@ -53,7 +53,6 @@ const PushFrom = (props) => {
]
return (
<Modal
maskClosable={false}
title={'下发数据'}
width={1040}
visible={props.createModalVisible}


+ 104
- 67
src/pages/push/batchingpush/index.jsx View File

@@ -1,15 +1,16 @@
import { PlusOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm, Typography } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PlusOutlined,CopyOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm,Typography } from 'antd';
import React, { useState, useRef, useEffect} from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import PushFrom from './components/PushFrom';
import Field from '@ant-design/pro-field';
import {
GetDevicePushRecodePage,
DevicePushRecodeAdd,
DevicePushRecodeDelete
GetDevicePushRecodePage,
DevicePushRecodeAdd,
DevicePushRecodeDelete,
DevicePushRecodeUpdate
} from './services';


@@ -22,12 +23,11 @@ const goodspush = () => {
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const { Paragraph } = Typography;

const { Paragraph, Text } = Typography;
/** 国际化修改 */
useEffect(() => {
}, []);

/**
@@ -35,14 +35,14 @@ const goodspush = () => {
*
* @param selectedRows
*/
const handleRemove = async (selectedRows) => {
const hide = message.loading('正在删除');
if (!selectedRows) return true;
await DevicePushRecodeDelete(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -77,17 +77,21 @@ const goodspush = () => {
ellipsis: true,
},

// {
// title: '下发数据',
// dataIndex: 'type',
// ellipsis: true,
// valueEnum: {
// 2: {
// text: '物料',
// },

// },
// },
{
title: '下发状态',
dataIndex: 'status',
ellipsis: true,
valueEnum: {
0: {
text: '成功',
status: 'Success',
},
1: {
text: '失败',
status: 'Processing',
},
},
},
{
title: '下发时间',
dataIndex: 'createAt',
@@ -107,40 +111,56 @@ const goodspush = () => {
>
下发详情
</a>,
// <Popconfirm
// type="primary"
// key="primary"
// title="确认删除吗?"
// okText="是"
// cancelText="否"
// onConfirm={async () => {
// await DeleteGoodsType(record.id).then((r) => {
// if (r.succeeded) {
// message.success('删除成功');
// actionRef.current.reload();
// } else {
// message.error(r.errors);
// }
// });
// }}
// onCancel={() => { }}
// >
// <a href="#">删除</a>
// </Popconfirm>,
<a
key="config"
onClick={() => {
DevicePushRecodeUpdate(record.id).then((r)=>{
if(r.data){
message.success('操作成功');
actionRef.current.reloadAndRest();
}else{
message.error('操作失败');
}
})
}}
>
重发
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={async () => {
await DeleteGoodsType(record.id).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
});
}}
onCancel={() => {}}
>
<a href="#">删除</a>
</Popconfirm>,
],
},
];
const HandleOk = async (values) => {
await DevicePushRecodeAdd(values).then((res) => {
if (res.data) {
message.success('操作成功');
handleModalVisible(false);
actionRef.current.reload();
} else {
message.error(res.errors);
}
})
}
const HandleOk= async(values)=>{
await DevicePushRecodeAdd(values).then((res)=>{
if(res.data){
message.success('操作成功');
handleModalVisible(false);
actionRef.current.reloadAndRest();
}else{
message.error(res.errors);
}
})
}

return (
<PageContainer host header={{
title: '',
@@ -168,7 +188,7 @@ const goodspush = () => {
request={async (params) => {
var goodsData = [];
var total = 0;
params.type = 2
params.type=2
await GetDevicePushRecodePage(params).then((r) => {
goodsData = r.data.data;
total = r.data.total;
@@ -220,7 +240,7 @@ const goodspush = () => {

<PushFrom
onFinish={async (value) => {
}}
onCancel={() => {
handleModalVisible(false);
@@ -244,18 +264,35 @@ const goodspush = () => {
<ProDescriptions
column={1}
title="下发详情"
>
<ProDescriptions.Item label="下发设备" valueType="text">
<ProDescriptions.Item label="下发设备" valueType="text">
{currentRow?.deviceName}
</ProDescriptions.Item>
<ProDescriptions.Item label="topic" valueType="text" >
<Paragraph copyable>{currentRow?.topic}</Paragraph>
</ProDescriptions.Item>
<ProDescriptions.Item contentStyle={{ maxWidth: '85%' }} label="下发数据" valueType="jsonCode" >
{currentRow?.dataResore}
</ProDescriptions.Item>
</ProDescriptions>
</ProDescriptions.Item>
<ProDescriptions.Item label="topic" copyable valueType="text">
{currentRow?.topic}
</ProDescriptions.Item>
<ProDescriptions.Item contentStyle={{ maxWidth: '85%'}} label="下发数据">
<a
onClick={() => {
let oInput = document.createElement('input');
oInput.value = currentRow.dataResore;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand('Copy'); // 执行浏览器复制命令
message.success('复制成功');
oInput.remove();
}}
>
<CopyOutlined />
<div style={{ overflow: 'scroll', overflowX: 'auto' }}>
<Field text={currentRow?.dataResore} valueType="jsonCode" />
</div>
</a>
</ProDescriptions.Item>
</ProDescriptions>
)}
</Drawer>
</PageContainer>


+ 94
- 95
src/pages/push/goodspush/components/PushFrom.jsx View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from 'react';
import { Modal, Row, Col, Checkbox, Select, message, Switch } from 'antd';
import React, { useState, useEffect,useRef } from 'react';
import { Modal, Row, Col, Checkbox, Select,message,Switch} from 'antd';
import ProTable from '@ant-design/pro-table';
import {
GetDeviceList,
@@ -9,7 +9,7 @@ import {
const PushFrom = (props) => {
const [deviceData, setdeviceData] = useState([]);
const [selectedRowsState, setSelectedRows] = useState([]);
const [dataSource, setdataSource] = useState([]);
const [dataSource,setdataSource]= useState([]);
const [treeData, setTreeData] = useState();
const [DeviceIds, setDeviceIds] = useState();
const [DeviceInfo, setDeviceInfo] = useState([]);
@@ -17,67 +17,66 @@ const PushFrom = (props) => {
const actionRef = useRef();
useEffect(() => {
console.log(props.values)
GetDeviceList().then((r) => {
GetDeviceList().then((r)=>{
setDeviceInfo(r.data)
var data = r.data.map(x => {
return { value: x.id, label: x.name }
})
setdeviceData(data)
var data=r.data.map(x=>{
return {value:x.id,label:x.name}
})
setdeviceData(data)
})
GetGoodsTypeTree().then((r) => {
setTreeData(r.data);
});
var params = { current: 1, pageSize: 10 }
GetGoodsData(params)
}, [props.values])
const GetGoodsData = (params) => {
setTreeData(r.data);
});
var params={current:1,pageSize:10}
GetGoodsData(params)
},[props.values])
const GetGoodsData=(params)=>{
GetGoodsPage(params).then((r) => {
setdataSource(r.data.data);
//console.log(goodsData)
//total = r.data.total;
});
setdataSource(r.data.data);
//console.log(goodsData)
//total = r.data.total;
});
}
const handleChange = (value) => {
const handleChange=(value)=>{
setDeviceIds(value)
var params = { current: 1, pageSize: 10, deviceId: value }
var params={current:1,pageSize:10,deviceId:value}
GetGoodsData(params)
}
const onChange=(checked)=>{
if(!DeviceIds){
message.error('请先选择设备');
}else{
setisGlogy(checked)
}
const onChange = (checked) => {
if (!DeviceIds) {
message.error('请先选择设备');
} else {
setisGlogy(checked)

}

}
const columns = [
{
title: '编码',
dataIndex: 'code',
valueType: 'textarea',
hideInTable: true,
hideInSearch: true,
},
}
const columns=[
{
title: '名称',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '商品类型',
dataIndex: 'goodsTypeName',
valueType: 'treeSelect',
fieldProps: {
showSearch: true,
allowClear: true,
options: treeData
title: '编码',
dataIndex: 'code',
valueType: 'textarea',
hideInTable: true,
hideInSearch: true,
},
{
title: '名称',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '商品类型',
dataIndex: 'goodsTypeName',
valueType: 'treeSelect',
fieldProps: {
showSearch:true,
allowClear:true,
options: treeData
},
},
},
]
]
return (
<Modal
maskClosable={false}
title={'下发数据'}
width={1040}
visible={props.createModalVisible}
@@ -85,16 +84,16 @@ const PushFrom = (props) => {
okText="确定"
cancelText="取消"
onOk={() => {
if (!DeviceIds) {
if(!DeviceIds){
message.error('请选择设备');
} else {
var de = DeviceInfo.find(x => x.id == DeviceIds);
var data = { goodsinfo: [] };
}else{
var de=DeviceInfo.find(x=>x.id==DeviceIds);
var data={goodsinfo:[]};
// if(isGlogy){
// data.goodstechnology=[]
// }
selectedRowsState.map(x => {
var pa = { id: x.id, code: x.code, goodsTypeId: x.goodsTypeId, goodsTypeName: x.goodsTypeName, goodsUintId: x.goodsUintId, imgUrl: x.imgUrl, isAttrubute: x.isAttrubute, name: x.name, price: x.price, design: x.design, remark: x.remark }
selectedRowsState.map(x=>{
var pa={id:x.id,code:x.code,goodsTypeId:x.goodsTypeId,goodsTypeName:x.goodsTypeName,goodsUintId:x.goodsUintId,imgUrl:x.imgUrl,isAttrubute:x.isAttrubute,name:x.name,price:x.price,design:x.design,remark:x.remark}
data.goodsinfo.push(pa);
// if(isGlogy){
// //data.goodstechnology=[]
@@ -103,7 +102,7 @@ const PushFrom = (props) => {
// }
// }
})
var parm = { deviceId: de.id, deviceName: de.name, deviceAutoKey: de.autoKey, type: 1, data: data }
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:1,data:data}
props.HandleOk(parm)
console.log(de)
}
@@ -113,48 +112,48 @@ const PushFrom = (props) => {
}}
destroyOnClose
>
<Row gutter={26} style={{ marginBottom: 20 }}>
<Col lg={24} md={24} sm={24}>
选择设备:
<Select
allowClear
style={{ width: '60%' }}
placeholder="请选择要下发设备"
onChange={handleChange}
options={deviceData}
/>
</Col>
</Row>
{/* <Row style={{marginBottom:20}}>
<Row gutter={26} style={{marginBottom:20}}>
<Col lg={24} md={24} sm={24}>
选择设备:
<Select
allowClear
style={{width: '60%'}}
placeholder="请选择要下发设备"
onChange={handleChange}
options={deviceData}
/>
</Col>
</Row>
{/* <Row style={{marginBottom:20}}>
<Col lg={24} md={24} sm={24}>
是否包含工艺:
<Switch checkedChildren="是" unCheckedChildren="否" checked={isGlogy} value={isGlogy} onChange={onChange} />
</Col>
</Row> */}
<Row gutter={26}>
<Col span={24}>
选择数据:
<ProTable
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
>
<Row gutter={26}>
<Col span={24}>
选择数据:
<ProTable
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
>
</ProTable>
</Col>
</Row>
</Col>
</Row>
</Modal>
);
};


+ 77
- 41
src/pages/push/goodspush/index.jsx View File

@@ -1,15 +1,16 @@
import { PlusOutlined } from '@ant-design/icons';
import { PlusOutlined,CopyOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm,Typography } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import PushFrom from './components/PushFrom';
import Field from '@ant-design/pro-field';
import {
GetDevicePushRecodePage,
DevicePushRecodeAdd,
DevicePushRecodeDelete
DevicePushRecodeDelete,
DevicePushRecodeUpdate
} from './services';


@@ -22,7 +23,7 @@ const goodspush = () => {
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const { Paragraph } = Typography;
const { Paragraph, Text } = Typography;
/** 国际化修改 */
useEffect(() => {
@@ -41,7 +42,7 @@ const goodspush = () => {
await DevicePushRecodeDelete(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -76,17 +77,21 @@ const goodspush = () => {
ellipsis: true,
},

// {
// title: '下发数据',
// dataIndex: 'type',
// ellipsis: true,
// valueEnum: {
// 1: {
// text: '商品',
// },
// },
// },
{
title: '下发状态',
dataIndex: 'status',
ellipsis: true,
valueEnum: {
0: {
text: '成功',
status: 'Success',
},
1: {
text: '失败',
status: 'Processing',
},
},
},
{
title: '下发时间',
dataIndex: 'createAt',
@@ -106,26 +111,41 @@ const goodspush = () => {
>
下发详情
</a>,
// <Popconfirm
// type="primary"
// key="primary"
// title="确认删除吗?"
// okText="是"
// cancelText="否"
// onConfirm={async () => {
// await DeleteGoodsType(record.id).then((r) => {
// if (r.succeeded) {
// message.success('删除成功');
// actionRef.current.reload();
// } else {
// message.error(r.errors);
// }
// });
// }}
// onCancel={() => {}}
// >
// <a href="#">删除</a>
// </Popconfirm>,
<a
key="config"
onClick={() => {
DevicePushRecodeUpdate(record.id).then((r)=>{
if(r.data){
message.success('操作成功');
actionRef.current.reloadAndRest();
}else{
message.error('操作失败');
}
})
}}
>
重发
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={async () => {
await DeleteGoodsType(record.id).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
});
}}
onCancel={() => {}}
>
<a href="#">删除</a>
</Popconfirm>,
],
},
];
@@ -134,7 +154,7 @@ const HandleOk= async(values)=>{
if(res.data){
message.success('操作成功');
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error('操作失败');
}
@@ -248,11 +268,27 @@ const HandleOk= async(values)=>{
<ProDescriptions.Item label="下发设备" valueType="text">
{currentRow?.deviceName}
</ProDescriptions.Item>
<ProDescriptions.Item label="topic" valueType="text">
<Paragraph copyable>{currentRow?.topic}</Paragraph>
<ProDescriptions.Item label="topic" copyable valueType="text">
{currentRow?.topic}
</ProDescriptions.Item>
<ProDescriptions.Item contentStyle={{ maxWidth: '85%'}} label="下发数据" valueType="jsonCode" >
{currentRow?.dataResore}
<ProDescriptions.Item contentStyle={{ maxWidth: '85%'}} label="下发数据">
<a
onClick={() => {
let oInput = document.createElement('input');
oInput.value = currentRow.dataResore;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand('Copy'); // 执行浏览器复制命令
message.success('复制成功');
oInput.remove();
}}
>
<CopyOutlined />
<div style={{ width: '500px', overflow: 'scroll', overflowX: 'auto' }}>
<Field text={currentRow?.dataResore} valueType="jsonCode" />
</div>
</a>
</ProDescriptions.Item>
</ProDescriptions>
)}


+ 102
- 100
src/pages/push/technologypush/components/PushFrom.jsx View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from 'react';
import { Modal, Row, Col, Checkbox, Select, message, Switch } from 'antd';
import React, { useState, useEffect,useRef } from 'react';
import { Modal, Row, Col, Checkbox, Select,message,Switch} from 'antd';
import ProTable from '@ant-design/pro-table';
import {
GetDeviceList,
@@ -9,7 +9,7 @@ import {
const PushFrom = (props) => {
const [deviceData, setdeviceData] = useState([]);
const [selectedRowsState, setSelectedRows] = useState([]);
const [dataSource, setdataSource] = useState([]);
const [dataSource,setdataSource]= useState([]);
const [treeData, setTreeData] = useState();
const [DeviceIds, setDeviceIds] = useState();
const [DeviceInfo, setDeviceInfo] = useState([]);
@@ -17,67 +17,69 @@ const PushFrom = (props) => {
const actionRef = useRef();
useEffect(() => {
console.log(props.values)
GetDeviceList().then((r) => {
GetDeviceList().then((r)=>{
setDeviceInfo(r.data)
var data = r.data.map(x => {
return { value: x.id, label: x.name }
})
setdeviceData(data)
if(r.data.length>0){
var data=r.data.map(x=>{
return {value:x.id,label:x.name}
})
setdeviceData(data)
}
})
GetGoodsTypeTree().then((r) => {
setTreeData(r.data);
});
var params = { current: 1, pageSize: 10 }
GetGoodsData(params)
}, [props.values])
const GetGoodsData = (params) => {
setTreeData(r.data);
});
var params={current:1,pageSize:10}
GetGoodsData(params)
},[props.values])
const GetGoodsData=(params)=>{
GetGoodsPage(params).then((r) => {
setdataSource(r.data.data);
//console.log(goodsData)
//total = r.data.total;
});
setdataSource(r.data.data);
//console.log(goodsData)
//total = r.data.total;
});
}
const handleChange = (value) => {
const handleChange=(value)=>{
setDeviceIds(value)
var params = { current: 1, pageSize: 10, deviceId: value }
var params={current:1,pageSize:10,deviceId:value}
GetGoodsData(params)
}
const onChange=(checked)=>{
if(!DeviceIds){
message.error('请先选择设备');
}else{
setisGlogy(checked)
}
const onChange = (checked) => {
if (!DeviceIds) {
message.error('请先选择设备');
} else {
setisGlogy(checked)

}

}
const columns = [
{
title: '编码',
dataIndex: 'code',
valueType: 'textarea',
hideInTable: true,
hideInSearch: true,
},
{
title: '名称',
dataIndex: 'name',
valueType: 'textarea',
},
}
const columns=[
{
title: '商品类型',
dataIndex: 'goodsTypeName',
valueType: 'treeSelect',
fieldProps: {
showSearch: true,
allowClear: true,
options: treeData
title: '编码',
dataIndex: 'code',
valueType: 'textarea',
hideInTable: true,
hideInSearch: true,
},
},
]
{
title: '名称',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '商品类型',
dataIndex: 'goodsTypeName',
valueType: 'treeSelect',
fieldProps: {
showSearch:true,
allowClear:true,
options: treeData
},
},
]
return (
<Modal
maskClosable={false}
title={'下发数据'}
width={1040}
visible={props.createModalVisible}
@@ -85,32 +87,32 @@ const PushFrom = (props) => {
okText="确定"
cancelText="取消"
onOk={() => {
if (!DeviceIds) {
if(!DeviceIds){
message.error('请选择设备');
} else {
var de = DeviceInfo.find(x => x.id == DeviceIds);
var data = { goodstechnology: [] };
}else{
var de=DeviceInfo.find(x=>x.id==DeviceIds);
var data={goodstechnology:[]};
// if(isGlogy){
// data.goodstechnology=[]
// }
selectedRowsState.map(x => {
selectedRowsState.map(x=>{
// var pa={id:x.id,code:x.code,goodsTypeId:x.goodsTypeId,goodsTypeName:x.goodsTypeName,goodsUintId:x.goodsUintId,imgUrl:x.imgUrl,isAttrubute:x.isAttrubute,name:x.name,price:x.price,design:x.design,remark:x.remark}
// data.goodsinfo.push(pa);
// if(isGlogy){
// //data.goodstechnology=[]
if (x.goodstechnology.length > 0) {
data.goodstechnology.push(x.goodstechnology)
}
if(x.goodstechnology.length>0){
data.goodstechnology.push(x.goodstechnology)
}
// }
})
if (data.goodstechnology.length == 0) {
if(data.goodstechnology.length==0){
message.error('选择的商品还没有工艺');
} else {
var parm = { deviceId: de.id, deviceName: de.name, deviceAutoKey: de.autoKey, type: 4, data: data }
}else{
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:4,data:data}
props.HandleOk(parm)
console.log(de)
}
}
}}
onCancel={() => {
@@ -118,48 +120,48 @@ const PushFrom = (props) => {
}}
destroyOnClose
>
<Row gutter={26} style={{ marginBottom: 20 }}>
<Col lg={24} md={24} sm={24}>
选择设备:
<Select
allowClear
style={{ width: '60%' }}
placeholder="请选择要下发设备"
onChange={handleChange}
options={deviceData}
/>
</Col>
</Row>
{/* <Row style={{marginBottom:20}}>
<Row gutter={26} style={{marginBottom:20}}>
<Col lg={24} md={24} sm={24}>
选择设备:
<Select
allowClear
style={{width: '60%'}}
placeholder="请选择要下发设备"
onChange={handleChange}
options={deviceData}
/>
</Col>
</Row>
{/* <Row style={{marginBottom:20}}>
<Col lg={24} md={24} sm={24}>
是否包含工艺:
<Switch checkedChildren="是" unCheckedChildren="否" checked={isGlogy} value={isGlogy} onChange={onChange} />
</Col>
</Row> */}
<Row gutter={26}>
<Col span={24}>
选择数据:
<ProTable
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
>
<Row gutter={26}>
<Col span={24}>
选择数据:
<ProTable
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
>
</ProTable>
</Col>
</Row>
</Col>
</Row>
</Modal>
);
};


+ 77
- 40
src/pages/push/technologypush/index.jsx View File

@@ -1,15 +1,16 @@
import { PlusOutlined } from '@ant-design/icons';
import { PlusOutlined,CopyOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm,Typography } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import PushFrom from './components/PushFrom';
import Field from '@ant-design/pro-field';
import {
GetDevicePushRecodePage,
DevicePushRecodeAdd,
DevicePushRecodeDelete
DevicePushRecodeDelete,
DevicePushRecodeUpdate
} from './services';


@@ -22,7 +23,7 @@ const goodspush = () => {
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const { Paragraph } = Typography;
const { Paragraph, Text } = Typography;
/** 国际化修改 */
useEffect(() => {
@@ -41,7 +42,7 @@ const goodspush = () => {
await DevicePushRecodeDelete(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
@@ -76,16 +77,21 @@ const goodspush = () => {
ellipsis: true,
},

// {
// title: '下发数据',
// dataIndex: 'type',
// ellipsis: true,
// valueEnum: {
// 4: {
// text: '工艺',
// },
// },
// },
{
title: '下发状态',
dataIndex: 'status',
ellipsis: true,
valueEnum: {
0: {
text: '成功',
status: 'Success',
},
1: {
text: '失败',
status: 'Processing',
},
},
},
{
title: '下发时间',
dataIndex: 'createAt',
@@ -105,26 +111,41 @@ const goodspush = () => {
>
下发详情
</a>,
// <Popconfirm
// type="primary"
// key="primary"
// title="确认删除吗?"
// okText="是"
// cancelText="否"
// onConfirm={async () => {
// await DeleteGoodsType(record.id).then((r) => {
// if (r.succeeded) {
// message.success('删除成功');
// actionRef.current.reload();
// } else {
// message.error(r.errors);
// }
// });
// }}
// onCancel={() => {}}
// >
// <a href="#">删除</a>
// </Popconfirm>,
<a
key="config"
onClick={() => {
DevicePushRecodeUpdate(record.id).then((r)=>{
if(r.data){
message.success('操作成功');
actionRef.current.reloadAndRest();
}else{
message.error('操作失败');
}
})
}}
>
重发
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={async () => {
await DeleteGoodsType(record.id).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reloadAndRest();
} else {
message.error(r.errors);
}
});
}}
onCancel={() => {}}
>
<a href="#">删除</a>
</Popconfirm>,
],
},
];
@@ -133,7 +154,7 @@ const HandleOk= async(values)=>{
if(res.data){
message.success('操作成功');
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error('操作失败');
}
@@ -247,11 +268,27 @@ const HandleOk= async(values)=>{
<ProDescriptions.Item label="下发设备" valueType="text">
{currentRow?.deviceName}
</ProDescriptions.Item>
<ProDescriptions.Item label="topic" valueType="text">
<Paragraph copyable>{currentRow?.topic}</Paragraph>
<ProDescriptions.Item label="topic" copyable valueType="text">
{currentRow?.topic}
</ProDescriptions.Item>
<ProDescriptions.Item contentStyle={{ maxWidth: '85%'}} label="下发数据" valueType="jsonCode" >
{currentRow?.dataResore}
<ProDescriptions.Item contentStyle={{ maxWidth: '85%'}} label="下发数据">
<a
onClick={() => {
let oInput = document.createElement('input');
oInput.value = currentRow.dataResore;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand('Copy'); // 执行浏览器复制命令
message.success('复制成功');
oInput.remove();
}}
>
<CopyOutlined />
<div style={{ overflow: 'scroll', overflowX: 'auto' }}>
<Field text={currentRow?.dataResore} valueType="jsonCode" />
</div>
</a>
</ProDescriptions.Item>
</ProDescriptions>
)}


+ 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={{


+ 4
- 4
src/pages/shopmanage/Printer/index copy.jsx View File

@@ -81,7 +81,7 @@ const PrinterInfo = () => {
await SetPrinterHost(val.storeId, item.id).then((re) => {
if (re.data) {
setCurrentRow({});
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('设置成功');
} else {
message.success('设置失败');
@@ -98,7 +98,7 @@ const PrinterInfo = () => {
await DelPrinter([item.id]).then((re) => {
if (re.data) {
setCurrentRow({});
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('删除成功');
} else {
message.success('删除失败');
@@ -111,7 +111,7 @@ const PrinterInfo = () => {
</Popconfirm>,
<a key="delete"
onClick={async () => {
actionRef.current.reload();
actionRef.current.reloadAndRest();
if (item.state == "edit") {
formRef.current.submit();
}
@@ -310,7 +310,7 @@ const PrinterInfo = () => {
values.storeId = currentTabRow.storeId;
var result = await AddPrinter(values);
if (result.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
setModalVisit(false)
message.success('添加成功');
} else {


+ 5
- 5
src/pages/shopmanage/Printer/index delete.jsx View File

@@ -89,7 +89,7 @@ const PrinterInfo = () => {
<a key="run" onClick={async () => {
await SetPrinterHost(key, item.id).then((re) => {
if (re.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('设置成功');
} else {
message.success('设置失败');
@@ -105,7 +105,7 @@ const PrinterInfo = () => {
onConfirm={async () => {
await DelPrinter([item.id]).then((re) => {
if (re.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('删除成功');
} else {
message.success('删除失败');
@@ -118,7 +118,7 @@ const PrinterInfo = () => {
<a key="delete"
onClick={async () => {
console.log('sssssss', currentPrinter);
actionRef.current.reload();
actionRef.current.reloadAndRest();
console.log('formRef', formRef.current.getFieldValue());

// formRef?.current.setFieldsValue(currentPrinter);
@@ -138,7 +138,7 @@ const PrinterInfo = () => {
console.log('接口', values, currentPrinter);
var result = await UpdatePrinter(values);
if (result.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('编辑成功');
} else {
message.success('编辑失败');
@@ -283,7 +283,7 @@ const PrinterInfo = () => {
values.storeId = currentStoreid;
var result = await AddPrinter(values);
if (result.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
setModalVisit(false)
message.success('添加成功');
} else {


+ 3
- 3
src/pages/shopmanage/shop/index.jsx View File

@@ -96,7 +96,7 @@ const app = () => {
var res = await api.Del(record.id);
if (res.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(response.errors ||'删除失败');
}
@@ -132,7 +132,7 @@ const app = () => {
var res = await api.Update(form.getFieldsValue());
if (res.data) {
message.success('修改成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
setIsModalOpen(false);
form.resetFields();
} else {
@@ -143,7 +143,7 @@ const app = () => {
var res = await api.Add(form.getFieldsValue());
if (res.data) {
message.success('新增成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
setIsModalOpen(false);
form.resetFields();
} else {


+ 4
- 4
src/pages/shopmanage/storeAddGoodsInfo/index.jsx View File

@@ -28,7 +28,7 @@ const handleAdd = async (fields) => {
message.success('添加成功');
handleModalVisible(false);
setCurrentRow(undefined);
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error('添加失败');
@@ -51,7 +51,7 @@ const handleRemove = async (ids) => {
await DelAsync(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error('删除失败');
@@ -101,7 +101,7 @@ const handleRemove = async (ids) => {
// record.status = record.status == 0 ? 1 : 0;
// UpdateAsync(record).then((r) => {
// if (r.data) {
// actionRef.current.reload();
// actionRef.current.reloadAndRest();
// }
// });
// }}
@@ -210,7 +210,7 @@ const handleRemove = async (ids) => {
value.GoodsId = props.location.query.values.goodsId;
value.StoreId = props.location.query.storeId;
success = handleAdd(value);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 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}>


+ 20
- 13
src/pages/shopmanage/storeAdvertisement/index.jsx View File

@@ -50,7 +50,7 @@ const PlanManage = () => {
addAdvertisement(JSON.stringify(fields));
message.success('添加成功');
//刷新数据
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} catch (error) {
message.error('添加失败请重试!');
@@ -68,7 +68,7 @@ const PlanManage = () => {
updateAdvertisement(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('修改成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('修改失败请重试!');
}
@@ -95,7 +95,7 @@ const PlanManage = () => {
}
});
//刷新数据
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} catch (error) {
message.error('删除失败,请重试');
@@ -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);
}}
>
@@ -227,7 +231,7 @@ const PlanManage = () => {
record.status = record.status == 0 ? 1 : 0;
updateAdvertisementStatus({id:record.id,status:record.status}).then((r) => {
if (r.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
});
}}
@@ -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 {
@@ -361,7 +368,7 @@ const PlanManage = () => {
if (success) {
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
}}


+ 4
- 4
src/pages/shopmanage/storeDesktopNumber/index.jsx View File

@@ -142,11 +142,11 @@ const storeDesktopNumber = () => {
DeleteDesktopNumber([record.id]).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error('删除失败');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return false;
}
});
@@ -220,7 +220,7 @@ const storeDesktopNumber = () => {

if (success.data) {
handleModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}}
onCancel={() => {
@@ -237,7 +237,7 @@ const storeDesktopNumber = () => {
}
if (success) {
editModalVisible(false);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}}
onCancel={() => {


+ 5
- 5
src/pages/shopmanage/storeGoodsInfo/components/MenuGoods.jsx View File

@@ -39,7 +39,7 @@ const MenuGoods = (props) => {
console.log(response)
if (response.statusCode === 200) {
message.success("修改成功!");
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(JSON.stringify(response.errors) || '修改失败');
}
@@ -127,7 +127,7 @@ const MenuGoods = (props) => {
const response = await stopgoods(goodss);
if (response.statusCode === 200 && response.data) {
message.success('操作成功!')
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error(JSON.stringify(response.errors) || '操作失败');
}
@@ -149,7 +149,7 @@ const MenuGoods = (props) => {
record.status = record.status == 0 ? 1 : 0;
const response = await UpdateStoreGoodsStatusAsync(record);
if (response.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('操作成功!');
} else {
message.error(JSON.stringify(response.errors) || '操作失败');
@@ -242,7 +242,7 @@ const MenuGoods = (props) => {
goods={currGoods}
onCancel={() => setShowGoodsModal(false)}
onOk={() => {
actionRef.current.reload();
actionRef.current.reloadAndRest();
setShowGoodsModal(false);
}}
>
@@ -259,7 +259,7 @@ const MenuGoods = (props) => {
isDevice={itemselect}
onCancel={() => setDeviceModal(false)}
onOk={() => {
actionRef.current.reload();
actionRef.current.reloadAndRest();
setDeviceModal(false);
}}
>


+ 7
- 7
src/pages/shopmanage/storeGoodsInfo/index copy.jsx View File

@@ -194,7 +194,7 @@ const storeGoodsInfo = (props) => {
var goodss = [{ goodsId: record.foodId, storeId: storeId, StopSales: stopSales }];
stopgoods(goodss).then((r) => {
if (r.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
});
}}
@@ -208,7 +208,7 @@ const storeGoodsInfo = (props) => {
record.status = record.status == 0 ? 1 : 0;
UpdateStoreGoodsStatusAsync(record).then((r) => {
if (r.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
});
}}
@@ -222,7 +222,7 @@ const storeGoodsInfo = (props) => {
record.isDevice = record.isDevice == 0 ? 1 : 0;
UpdateStoreGoodsStatusAsync(record).then((r) => {
if (r.data) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
});
}}
@@ -275,7 +275,7 @@ const storeGoodsInfo = (props) => {
cancelText="否"
onConfirm={() => {
StoreGoodsAllUpdate({ StoreId: item.id, UpdateType: 0 })
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => { }}
>
@@ -289,7 +289,7 @@ const storeGoodsInfo = (props) => {
cancelText="否"
onConfirm={() => {
StoreGoodsAllUpdate({ StoreId: item.id, UpdateType: 1 })
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => { }}
>
@@ -303,7 +303,7 @@ const storeGoodsInfo = (props) => {
cancelText="否"
onConfirm={() => {
StoreGoodsAllUpdate({ StoreId: item.id, UpdateType: 2 })
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => { }}
>
@@ -358,7 +358,7 @@ const storeGoodsInfo = (props) => {
if (success) {
handleModalVisible(false);
setCurrentRow(undefined);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}}
onCancel={() => {


+ 2
- 2
src/pages/shopmanage/storeGoodsInfo/index.jsx View File

@@ -111,7 +111,7 @@ const storeGoodsInfo = (props) => {
onConfirm={ () => {
DelShopFoodMenu(record.id).then((re) => {
if(re.statusCode==200){
actionRef.current.reload();
actionRef.current.reloadAndRest();
message.success('删除成功');
}else{
message.error(re.errors || '删除失败');
@@ -136,7 +136,7 @@ const storeGoodsInfo = (props) => {

useEffect(() => {
if (currStore && actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}, [currStore]);



+ 4
- 4
src/pages/shopmanage/storeStaff/index.jsx View File

@@ -48,7 +48,7 @@ const GoodsTypeManage = () => {
message.destroy(key);
if (r.data) {
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error(r.errors||'添加失败');
@@ -71,7 +71,7 @@ const GoodsTypeManage = () => {
message.destroy(key);
if (r.data) {
message.success('修改成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error(r.errors||'修改失败');
@@ -92,7 +92,7 @@ const GoodsTypeManage = () => {
await Delstorestaff(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
return true;
} else {
message.error('删除失败');
@@ -294,7 +294,7 @@ const GoodsTypeManage = () => {
if (success) {
handleModalVisible(false);
setCurrentRow(undefined);
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}}
onCancel={() => {


+ 3
- 3
src/pages/sys/dictionary/dictdata/index.jsx View File

@@ -187,7 +187,7 @@ const DictDataManage = (props) => {
api.removeDictData([record.id]).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('删除失败,请重试');
}
@@ -292,10 +292,10 @@ const DictDataManage = (props) => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 3
- 3
src/pages/sys/dictionary/dicttype/index.jsx View File

@@ -162,7 +162,7 @@ const DictTypeManage = () => {
api.removeDictType([record.id]).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
actionRef.current.reload();
actionRef.current.reloadAndRest();
} else {
message.error('删除失败,请重试');
}
@@ -273,10 +273,10 @@ const DictTypeManage = () => {
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
actionRef.current.reloadAndRest();
}
}
actionRef.current.reload();
actionRef.current.reloadAndRest();
}}
onCancel={() => {
handleModalVisible(false);


+ 4
- 4
src/pages/sys/menus/index.jsx View File

@@ -32,7 +32,7 @@ const menuManager = () => {
await api.add({ ...fields }).then((r) => {
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
handleModalVisible(false);
}else{
message.error(r.errors);
@@ -50,7 +50,7 @@ const handleUpdate = async (fields) => {
api.update(fields).then((r) => {
if (r.succeeded) {
message.success('更新成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
handleModalVisible(false);
}else{
message.error(r.errors);
@@ -85,7 +85,7 @@ const handleUpdate = async (fields) => {
// <a
// onClick={() => {
// api.remove([record.id]).then((r) => {
// actionRef.current.reload();
// actionRef.current.reloadAndRest();
// });
// }}
// >
@@ -101,7 +101,7 @@ const handleUpdate = async (fields) => {
api.remove([record.id]).then((r) => {
if (r.succeeded) {
message.success('操作成功');
actionRef.current.reload();
actionRef.current.reloadAndRest();
}else{
message.error(r.errors);
}


Loading…
Cancel
Save