From 01fce620fa4215b8f65ab97d2e59d90a95665551 Mon Sep 17 00:00:00 2001
From: FCD <2453864257@qq.com>
Date: Thu, 5 Feb 2026 11:12:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=90=8C=E6=AD=A5=E7=89=A9?=
=?UTF-8?q?=E6=96=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/product.js | 8 ++++
src/views/wms/product/index.vue | 72 ++++++++++++++++++++++++++++++++-
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/src/api/wms/product.js b/src/api/wms/product.js
index fb3c99b..94d6582 100644
--- a/src/api/wms/product.js
+++ b/src/api/wms/product.js
@@ -73,3 +73,11 @@ export function addProductAttached(data) {
data: data
});
}
+// 手动同步物料
+export function syncProduct(data) {
+ return request({
+ url: '/wms/product/sync',
+ method: 'post',
+ data: data
+ });
+}
diff --git a/src/views/wms/product/index.vue b/src/views/wms/product/index.vue
index 4037478..568b31e 100644
--- a/src/views/wms/product/index.vue
+++ b/src/views/wms/product/index.vue
@@ -130,6 +130,28 @@
>同步物料工艺
+
+ 同步单个物料信息
+
+
+
+ 同步所有物料信息
+
+
{
+ let inputValue = result.value;
+ if (inputValue.length < 18){
+ inputValue = "0000000"+inputValue
+ }
+ syncProduct({
+ matnr:inputValue,
+ werks:localStorage.getItem('USER_POOL_NAME_CURRENT').replace("ds_","")
+ }).then(res=>{
+ if (res.code === 200){
+ this.$message.success(`操作成功!`);
+ }else {
+ this.$message.error(`操作失败!`+res.msg);
+ }
+ })
+
+ }).catch(() => {
+
+ });
+ },
+ handleSyncMultipleProduct(){
+ this.$modal
+ .confirm(
+ '是否同步所有物料?'
+ )
+ .then((res) => {
+ console.log(res)
+ if (res === "confirm"){
+ syncProduct({
+ werks:localStorage.getItem('USER_POOL_NAME_CURRENT').replace("ds_","")
+ }).then(()=>{
+ this.$message.success(`操作成功!`);
+ })
+ }
+ })
+ .catch(() => {});
+ }
},
};