Browse Source

TMC 奶茶哦

tags/小炒逻辑变更前
gwbvipvip 2 years ago
parent
commit
4b0a4ffaf7
2 changed files with 26 additions and 2 deletions
  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 View File

@@ -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 View File

@@ -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}`, {


Loading…
Cancel
Save