浏览代码

TMC 奶茶哦

tags/小炒逻辑变更前
gwbvipvip 2 年前
父节点
当前提交
4b0a4ffaf7
共有 2 个文件被更改,包括 26 次插入2 次删除
  1. +19
    -2
      src/pages/device/deviceStock/index.jsx
  2. +7
    -0
      src/pages/device/deviceStock/services.js

+ 19
- 2
src/pages/device/deviceStock/index.jsx 查看文件

@@ -13,7 +13,8 @@ import {
CheckStockAdjust,
removeSingleStockAdjust,
PushDeviceTMC,
CheckStockTMCAdjust
CheckStockTMCAdjust,
PushDeviceTMC_MT
} from './services';

const key = 'message';
@@ -54,7 +55,23 @@ const DeviceStockManager = (props) => {
const pushStock = async (id) => {
try {
message.loading('正在同步', key);
if (props.isbom) {
if (props.values.deviceTypeKey == "TMC_MT") {
await PushDeviceTMC_MT(id).then((r) => {
message.destroy(key);
if (r.data) {
setSelectedRows([]);
message.success('同步成功');
actionRef.current.reload();
return true;
} else {
message.success('同步失败');
actionRef.current.reload();
return false;
}
}
);
}
else if (props.isbom) {
await PushDeviceTMC(id).then((r) => {
message.destroy(key);
if (r.data) {


+ 7
- 0
src/pages/device/deviceStock/services.js 查看文件

@@ -22,6 +22,13 @@ export async function PushStockAsync(data) {
});
}

/** 同步库存 */
export async function PushDeviceTMC_MT(data) {
return request(`/kitchen/api/Device/PushDeviceTMC_MT?DeviceId=${data}`, {
method: 'post',
});
}

/** 获取实时库存 */
export async function CheckStockAdjust(data) {
return request(`/kitchen/api/Device/CheckStockAdjust?DeviceId=${data}`, {


正在加载...
取消
保存