Browse Source

下发

tmp
zhaoy 8 months ago
parent
commit
55f0e5d32b
13 changed files with 125 additions and 62 deletions
  1. +12
    -4
      config/proxy.js
  2. +1
    -1
      src/global_data.js
  3. +1
    -0
      src/pages/database/bom/index.jsx
  4. +3
    -3
      src/pages/order/orderflow/service.js
  5. +5
    -5
      src/pages/order/thirdAuthorize/service.js
  6. +6
    -6
      src/pages/order/thirdOrder/service.js
  7. +29
    -17
      src/pages/push/batchingpush/components/PushFrom.jsx
  8. +4
    -4
      src/pages/push/batchingpush/services.js
  9. +28
    -6
      src/pages/push/goodspush/components/PushFrom.jsx
  10. +4
    -4
      src/pages/push/goodspush/services.js
  11. +24
    -4
      src/pages/push/technologypush/components/PushFrom.jsx
  12. +4
    -4
      src/pages/push/technologypush/services.js
  13. +4
    -4
      src/pages/scene/store/services.js

+ 12
- 4
config/proxy.js View File

@@ -8,20 +8,28 @@
*/
export default {
dev: {
'/kitchbase/': {
'/saasbase/': {
target: 'http://localhost:5006/',
changeOrigin: true,
secure: false, //关闭证书验证
pathRewrite: {
'/kitchbase/': '',
'/saasbase/': '',
},
},
'/saasstore/': {
'/kitchbase/': {
target: 'http://192.168.1.19:5008/',
changeOrigin: true,
secure: false, //关闭证书验证
pathRewrite: {
'/saasstore/': '',
'/kitchbase/': '',
},
},
'/kitchorder/': {
target: 'http://localhost:5005',
changeOrigin: true,
secure: false, //关闭证书验证
pathRewrite: {
'/kitchorder/': '',
},
},
// Nginx发布的时候需要配置


+ 1
- 1
src/global_data.js View File

@@ -6,5 +6,5 @@ export function getApiUrl() {
}
}
export function getDataBaseUrl() {
return '/kitchbase';
return '/saasbase';
}

+ 1
- 0
src/pages/database/bom/index.jsx View File

@@ -214,6 +214,7 @@ const GoodsBomsManage = (props) => {
<ProTable
columns={columns}
actionRef={actionRef}
pagination={{ defaultPageSize: 10 }}
rowKey="id"
toolBarRender={() => [
<Button


+ 3
- 3
src/pages/order/orderflow/service.js View File

@@ -7,7 +7,7 @@ export default {
/** 获取订单流水信息*/
orderList(data) {
data.isreport = true;
return request(`/groupmealorder/api/Order/PostDetail`, {
return request(`/kitchorder/api/Order/PostDetail`, {
method: 'Post',
data: data,
// params: { ...params },
@@ -19,13 +19,13 @@ export default {
* 查询店铺信息(设备信息)
*/
srdList(data) {
return request('/groupmeal/api/shop/alllist', {
return request('/kitchbase/api/store/getstorelist', {
method: 'GET'
});
},

GetFlowExport(data) {
return request(`/groupmealorder/api/Order/GetFlowExport`, {
return request(`/kitchorder/api/Order/GetFlowExport`, {
method: 'Post',
data: data


+ 5
- 5
src/pages/order/thirdAuthorize/service.js View File

@@ -7,30 +7,30 @@ export default {

page(data) {
data.isreport = true;
return request(`/groupmealorder/api/ThirdAuthorize/Page`, {
return request(`/kitchorder/api/ThirdAuthorize/Page`, {
method: 'Post',
data: data,
});
},
GetAllStore() {
return request('/groupmeal/api/shop/alllist', {
return request('/kitchbase/api/store/getstorelist', {
method: 'GET'
});
},
Create(data) {
return request('/groupmealorder/api/ThirdAuthorize/Create', {
return request('/kitchorder/api/ThirdAuthorize/Create', {
method: 'Post',
data: data,
});
},
Update(data) {
return request('/groupmealorder/api/ThirdAuthorize/Update', {
return request('/kitchorder/api/ThirdAuthorize/Update', {
method: 'Post',
data: data,
});
},
Del(data) {
return request('/groupmealorder/api/ThirdAuthorize/Del?id='+data, {
return request('/kitchorder/api/ThirdAuthorize/Del?id='+data, {
method: 'Post',
});
},


+ 6
- 6
src/pages/order/thirdOrder/service.js View File

@@ -7,14 +7,14 @@ export default {

page(data) {
data.isreport = true;
return request(`/groupmealorder/api/Order/ThirdOrderPage`, {
return request(`/kitchorder/api/Order/ThirdOrderPage`, {
method: 'Post',
data: data,
});
},

getThirdOrderInfo(data) {
return request(`/groupmealorder/api/Order/GetThirdOrderInfo?thirdOrderId=`+data, {
return request(`/kitchorder/api/Order/GetThirdOrderInfo?thirdOrderId=`+data, {
method: 'get',
});
},
@@ -26,7 +26,7 @@ export default {
/** 获取订单流水信息*/
orderList(data) {
data.isreport = true;
return request(`/groupmealorder/api/Order/PostDetail`, {
return request(`/kitchorder/api/Order/PostDetail`, {
method: 'Post',
data: data,
// params: { ...params },
@@ -37,14 +37,14 @@ export default {
/**
* 查询店铺信息(设备信息)
*/
srdList(data) {
return request('/groupmealorder/api/shop/alllist', {
srdList() {
return request('/kitchbase/api/store/getstorelist', {
method: 'GET'
});
},

GetFlowExport(data) {
return request(`/groupmealorder/api/Order/GetFlowExport`, {
return request(`/kitchorder/api/Order/GetFlowExport`, {
method: 'Post',
data: data


+ 29
- 17
src/pages/push/batchingpush/components/PushFrom.jsx View File

@@ -23,22 +23,11 @@ const PushFrom = (props) => {
})
setdeviceData(data)
})
var params={current:1,pageSize:10}
GetGoodsData(params)
},[props.values])
const GetGoodsData=(params)=>{
GetBatchingPage(params).then((r) => {
setdataSource(r.data.data);
//console.log(goodsData)
//total = r.data.total;
});
}

const handleChange=(value)=>{
setDeviceIds(value)
var params={current:1,pageSize:10,deviceId:value}
GetGoodsData(params)
var de=DeviceInfo.find(x=>x.id==value);
console.log("ddddd",de)
GetProductTopicslist({productId:de?.productId,productVesionId:de?.productVersionId,IsDefault:true}).then((r)=>{
setTopicsData(r.data)
})
@@ -71,9 +60,16 @@ const PushFrom = (props) => {
message.error('请选择设备');
}else{
var de=DeviceInfo.find(x=>x.id==DeviceIds);
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:2,data:selectedRowsState,productVersion:de.vesion,productKey:de.prductKey,topicsData:TopicsData}
props.HandleOk(parm)
console.log(de)
if(selectedRowsState.length==0){
message.error('请选择物料数据');
}else{
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:2,data:selectedRowsState,productVersion:de.vesion,productKey:de.prductKey,topicsData:TopicsData}
props.HandleOk(parm)
console.log(de)
setSelectedRows([])
setDeviceIds()
}
}
}}
onCancel={() => {
@@ -102,12 +98,28 @@ const PushFrom = (props) => {
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
pagination={{ defaultPageSize: 10}}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
// dataSource={dataSource}
columns={columns}
request={async (params) => {
var total = 0;
var data = [];
const res = await GetBatchingPage(params);
if (res.statusCode == 200) {
setdataSource(res.data.data);
data = res.data.data;
total = res.data.total;
}
return {
data: data,
success: true,
total: total,
};
}}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);


+ 4
- 4
src/pages/push/batchingpush/services.js View File

@@ -1,24 +1,24 @@
import { request } from 'umi';
import { getDataBaseUrl } from '@/global_data';
export async function GetDevicePushRecodePage(data) {
return request(`/saasstore/api/devicepushrecode/page`, {
return request(`/kitchbase/api/devicepushrecode/page`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeAdd(data) {
return request(`/saasstore/api/devicepushrecode/add`, {
return request(`/kitchbase/api/devicepushrecode/add`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeUpdate(data) {
return request(`/saasstore/api/devicepushrecode/update?id=`+data, {
return request(`/kitchbase/api/devicepushrecode/update?id=`+data, {
method: 'GET',
});
}
export async function DevicePushRecodeDelete(data) {
return request(`/saasstore/api/devicepushrecode/delete`, {
return request(`/kitchbase/api/devicepushrecode/delete`, {
method: 'POST',
data: data,
});


+ 28
- 6
src/pages/push/goodspush/components/PushFrom.jsx View File

@@ -29,8 +29,8 @@ const PushFrom = (props) => {
GetGoodsTypeTree().then((r) => {
setTreeData(r.data);
});
var params={current:1,pageSize:10}
GetGoodsData(params)
// var params={current:1,pageSize:10}
// GetGoodsData(params)
},[props.values])
const GetGoodsData=(params)=>{
GetGoodsPage(params).then((r) => {
@@ -109,9 +109,15 @@ const PushFrom = (props) => {
// }
// }
})
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:1,data:data,productVersion:de.vesion,productKey:de.prductKey,topicsData:TopicsData}
props.HandleOk(parm)
console.log(de)
if(data.goodsinfo.length==0){
message.error('请先选择商品');
}else{
var parm={deviceId:de.id,deviceName:de.name,deviceAutoKey:de.autoKey,type:1,data:data,productVersion:de.vesion,productKey:de.prductKey,topicsData:TopicsData}
props.HandleOk(parm)
console.log(de)
setSelectedRows([])
setDeviceIds()
}
}
}}
onCancel={() => {
@@ -150,8 +156,24 @@ const PushFrom = (props) => {
search={{
labelWidth: 120,
}}
dataSource={dataSource}
// dataSource={dataSource}
columns={columns}
request={async (params) => {
var total = 0;
var data = [];
const res = await GetGoodsPage(params);
if (res.statusCode == 200) {
setdataSource(res.data.data);
data = res.data.data;
total = res.data.total;
}
return {
data: data,
success: true,
total: total,
};
}}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);


+ 4
- 4
src/pages/push/goodspush/services.js View File

@@ -1,24 +1,24 @@
import { request } from 'umi';
import { getDataBaseUrl } from '@/global_data';
export async function GetDevicePushRecodePage(data) {
return request(`/saasstore/api/devicepushrecode/page`, {
return request(`/kitchbase/api/devicepushrecode/page`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeAdd(data) {
return request(`/saasstore/api/devicepushrecode/add`, {
return request(`/kitchbase/api/devicepushrecode/add`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeUpdate(data) {
return request(`/saasstore/api/devicepushrecode/update?id=`+data, {
return request(`/kitchbase/api/devicepushrecode/update?id=`+data, {
method: 'GET',
});
}
export async function DevicePushRecodeDelete(data) {
return request(`/saasstore/api/devicepushrecode/delete`, {
return request(`/kitchbase/api/devicepushrecode/delete`, {
method: 'POST',
data: data,
});


+ 24
- 4
src/pages/push/technologypush/components/PushFrom.jsx View File

@@ -16,6 +16,7 @@ const PushFrom = (props) => {
const [DeviceInfo, setDeviceInfo] = useState([]);
const [TopicsData, setTopicsData] = useState([]);
const [isGlogy, setisGlogy] = useState(false);
const [total,settotal]=useState(0);
const actionRef = useRef();
useEffect(() => {
console.log(props.values)
@@ -33,14 +34,15 @@ const PushFrom = (props) => {
GetGoodsTypeTree().then((r) => {
setTreeData(r.data);
});
var params={current:1,pageSize:10}
GetGoodsData(params)
// 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;
settotal( r.data.total)
});
}
const handleChange=(value)=>{
@@ -114,6 +116,8 @@ const PushFrom = (props) => {
console.log("parm",parm)
props.HandleOk(parm)
console.log(de)
setSelectedRows([])
setDeviceIds()
}
}
@@ -150,12 +154,28 @@ const PushFrom = (props) => {
headerTitle=""
actionRef={actionRef}
rowKey="id"
pagination={{ defaultPageSize: 10 }}
pagination={{ defaultPageSize: 10}}
search={{
labelWidth: 120,
}}
dataSource={dataSource}
//dataSource={dataSource}
columns={columns}
request={async (params) => {
var total = 0;
var data = [];
const res = await GetGoodsPage(params);
if (res.statusCode == 200) {
setdataSource(res.data.data);
data = res.data.data;
total = res.data.total;
}
return {
data: data,
success: true,
total: total,
};
}}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);


+ 4
- 4
src/pages/push/technologypush/services.js View File

@@ -1,24 +1,24 @@
import { request } from 'umi';
import { getDataBaseUrl } from '@/global_data';
export async function GetDevicePushRecodePage(data) {
return request(`/saasstore/api/devicepushrecode/page`, {
return request(`/kitchbase/api/devicepushrecode/page`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeAdd(data) {
return request(`/saasstore/api/devicepushrecode/add`, {
return request(`/kitchbase/api/devicepushrecode/add`, {
method: 'POST',
data: data,
});
}
export async function DevicePushRecodeUpdate(data) {
return request(`/saasstore/api/devicepushrecode/update?id=`+data, {
return request(`/kitchbase/api/devicepushrecode/update?id=`+data, {
method: 'GET',
});
}
export async function DevicePushRecodeDelete(data) {
return request(`/saasstore/api/devicepushrecode/delete`, {
return request(`/kitchbase/api/devicepushrecode/delete`, {
method: 'POST',
data: data,
});


+ 4
- 4
src/pages/scene/store/services.js View File

@@ -2,25 +2,25 @@ import { request } from 'umi';
import { getDataBaseUrl } from '@/global_data';
/** 获取场景列表 */
export async function GetStorePage(data) {
return request(`/saasstore/api/store/page`, {
return request(`/kitchbase/api/store/page`, {
method: 'POST',
data: data,
});
}
export async function StoreAdd(data) {
return request(`/saasstore/api/store/add`, {
return request(`/kitchbase/api/store/add`, {
method: 'POST',
data: data,
});
}
export async function StoreUpdate(data) {
return request(`/saasstore/api/store/update`, {
return request(`/kitchbase/api/store/update`, {
method: 'POST',
data: data,
});
}
export async function StoreDelete(data) {
return request(`/saasstore/api/store/delete`, {
return request(`/kitchbase/api/store/delete`, {
method: 'POST',
data: data,
});

Loading…
Cancel
Save