diff --git a/src/api/goods.js b/src/api/goods.js
index 403cd00..2ae25bd 100644
--- a/src/api/goods.js
+++ b/src/api/goods.js
@@ -52,10 +52,22 @@ const deleteGoodsInfo = (params) => {
})
}
+/**
+ * 一键配置间接物料相关信息
+ */
+const updateIndirectInfos = (params) => {
+ return request({
+ url: '/goods/updateIndirectInfos',
+ method: 'post',
+ data: params
+ })
+}
+
export {
getGoodsInfoByPage,
deleteGoodsInfo,
getGoodsInfoByGoodsId,
getGoodsInfo,
- updateGoodsInfo
+ updateGoodsInfo,
+ updateIndirectInfos
}
\ No newline at end of file
diff --git a/src/layout/goods.vue b/src/layout/goods.vue
index 0989d15..02bd289 100644
--- a/src/layout/goods.vue
+++ b/src/layout/goods.vue
@@ -7,6 +7,7 @@
:suffix-icon="Search" />
搜索
重置
+ 一键设置间接物料相关信息
import store from '@/store'
-import { getGoodsInfoByPage, deleteGoodsInfo, updateGoodsInfo } from '@/api/goods.js'
+import { getGoodsInfoByPage, deleteGoodsInfo, updateGoodsInfo, updateIndirectInfos } from '@/api/goods.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessageBox, ElMessage } from 'element-plus'
import { ref, reactive } from 'vue'
@@ -229,6 +230,20 @@ export default {
this.search()
},
methods: {
+ setIndirect() {
+ const request = {}
+ updateIndirectInfos(request).then(res => {
+ const response = res.data
+ if (response.code == 0) {
+ ElMessage.success(response.message)
+ } else {
+ errorBox(response.message)
+ }
+ }).catch(err => {
+ console.log(err)
+ errorBox('一键设置错误。')
+ })
+ },
search() {
this.loading = true
const request = {
diff --git a/src/layout/locationsTable.vue b/src/layout/locationsTable.vue
index 1eee159..f2c904d 100644
--- a/src/layout/locationsTable.vue
+++ b/src/layout/locationsTable.vue
@@ -5,6 +5,8 @@
+
搜索
重置
@@ -33,6 +35,8 @@
+
编辑
@@ -115,6 +119,12 @@
+
+
+
+
+
@@ -138,7 +148,7 @@ import { Search } from '@element-plus/icons-vue'
import { errorBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus'
import { ref, reactive } from 'vue'
-import { locationStatusFormatter, locationFormatter } from '@/utils/formatter.js'
+import { locationStatusFormatter, locationFormatter, jsonFormatter } from '@/utils/formatter.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'