@@ -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发布的时候需要配置 | |||
@@ -6,5 +6,5 @@ export function getApiUrl() { | |||
} | |||
} | |||
export function getDataBaseUrl() { | |||
return '/kitchbase'; | |||
return '/saasbase'; | |||
} |
@@ -214,6 +214,7 @@ const GoodsBomsManage = (props) => { | |||
<ProTable | |||
columns={columns} | |||
actionRef={actionRef} | |||
pagination={{ defaultPageSize: 10 }} | |||
rowKey="id" | |||
toolBarRender={() => [ | |||
<Button | |||
@@ -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 | |||
@@ -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', | |||
}); | |||
}, | |||
@@ -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 | |||
@@ -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); | |||
@@ -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, | |||
}); | |||
@@ -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); | |||
@@ -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, | |||
}); | |||
@@ -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); | |||
@@ -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, | |||
}); | |||
@@ -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, | |||
}); |