|
|
@@ -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) { |
|
|
|