diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts
index 7a29c6bd..b2fbf6e5 100644
--- a/src/api/erp/product/product/index.ts
+++ b/src/api/erp/product/product/index.ts
@@ -41,6 +41,10 @@ export const ProductApi = {
getMesProductSimpleList: async () => {
return await request.get({ url: `/erp/product/simple-list-product` })
},
+ // 查询备件精简列表
+ getComponentSimpleList: async () => {
+ return await request.get({ url: `/erp/product/simple-list-component` })
+ },
// 查询产品详情
getProduct: async (id: number) => {
diff --git a/src/views/erp/component/in/StockInForm.vue b/src/views/erp/component/in/StockInForm.vue
index 8bb35a0f..207bb34b 100644
--- a/src/views/erp/component/in/StockInForm.vue
+++ b/src/views/erp/component/in/StockInForm.vue
@@ -17,6 +17,7 @@
{
formLoading.value = false
}
}
+ formData.value.inType = "备件入库"
// 加载供应商列表
supplierList.value = await SupplierApi.getSupplierSimpleList()
}
diff --git a/src/views/erp/component/in/components/StockInItemForm.vue b/src/views/erp/component/in/components/StockInItemForm.vue
index 53a2fd2d..1dbac30c 100644
--- a/src/views/erp/component/in/components/StockInItemForm.vue
+++ b/src/views/erp/component/in/components/StockInItemForm.vue
@@ -34,7 +34,7 @@
-
+
-
+
@@ -88,7 +88,7 @@
-
+
-
+
@@ -117,13 +117,15 @@
- —
+
+
+
- + 添加入库产品
+ + 添加入库备件
diff --git a/src/views/erp/component/out/StockOutForm.vue b/src/views/erp/component/out/StockOutForm.vue
index ddea4f43..c1e66d1a 100644
--- a/src/views/erp/component/out/StockOutForm.vue
+++ b/src/views/erp/component/out/StockOutForm.vue
@@ -14,24 +14,7 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
@@ -129,7 +107,6 @@ const formRules = reactive({
})
const disabled = computed(() => formType.value === 'detail')
const formRef = ref() // 表单 Ref
-const customerList = ref([]) // 客户列表
const options = [
{
value: '其他出库',
@@ -174,8 +151,7 @@ const open = async (type: string, id?: number) => {
formLoading.value = false
}
}
- // 加载客户列表
- customerList.value = await CustomerApi.getCustomerSimpleList()
+ formData.value.outType = "备件出库"
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
diff --git a/src/views/erp/component/out/components/StockOutItemForm.vue b/src/views/erp/component/out/components/StockOutItemForm.vue
index b09a5695..c43289e0 100644
--- a/src/views/erp/component/out/components/StockOutItemForm.vue
+++ b/src/views/erp/component/out/components/StockOutItemForm.vue
@@ -34,7 +34,7 @@
-
+
-
+
@@ -88,7 +88,7 @@
-
+
-
+
@@ -117,13 +117,15 @@
- —
+
+
+
- + 添加出库产品
+ + 添加出库备件
diff --git a/src/views/erp/component/product/ProductForm.vue b/src/views/erp/component/product/ProductForm.vue
index e013f828..610d5876 100644
--- a/src/views/erp/component/product/ProductForm.vue
+++ b/src/views/erp/component/product/ProductForm.vue
@@ -10,28 +10,16 @@
>
-
+
-
-
-
-
-
-
-
+
+
+
@@ -73,16 +61,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/views/erp/component/record/index.vue b/src/views/erp/component/record/index.vue
index 7814859c..d52ac691 100644
--- a/src/views/erp/component/record/index.vue
+++ b/src/views/erp/component/record/index.vue
@@ -10,12 +10,12 @@
:inline="true"
label-width="68px"
>
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -203,6 +180,7 @@ const warehouseList = ref([]) // 仓库列表
const getList = async () => {
loading.value = true
try {
+ queryParams.categoryId = 5
const data = await StockRecordApi.getStockRecordPage(queryParams)
list.value = data.list
total.value = data.total
@@ -223,24 +201,6 @@ const resetQuery = () => {
handleQuery()
}
-/** 添加/修改操作 */
-const formRef = ref()
-const openForm = (type: string, id?: number) => {
- formRef.value.open(type, id)
-}
-
-/** 删除按钮操作 */
-const handleDelete = async (id: number) => {
- try {
- // 删除的二次确认
- await message.delConfirm()
- // 发起删除
- await StockRecordApi.deleteStockRecord(id)
- message.success(t('common.delSuccess'))
- // 刷新列表
- await getList()
- } catch {}
-}
/** 导出按钮操作 */
const handleExport = async () => {
@@ -250,7 +210,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const data = await StockRecordApi.exportStockRecord(queryParams)
- download.excel(data, '产品库存明细.xls')
+ download.excel(data, '备件库存明细.xls')
} catch {
} finally {
exportLoading.value = false
@@ -265,14 +225,7 @@ onActivated(() => {
onMounted(async () => {
await getList()
// 加载产品、仓库列表
- productList.value = await ProductApi.getProductSimpleList()
+ productList.value = await ProductApi.getComponentSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
})
-
-/** tab 切换 */
-let activeName = '2'
-const handleTabClick = (tab: TabsPaneContext) => {
- queryParams.categoryId = tab.paneName
- handleQuery()
-}
diff --git a/src/views/erp/component/stock/index.vue b/src/views/erp/component/stock/index.vue
index 81f164f8..409cb60d 100644
--- a/src/views/erp/component/stock/index.vue
+++ b/src/views/erp/component/stock/index.vue
@@ -10,12 +10,12 @@
:inline="true"
label-width="68px"
>
-
+
-
-
-
-
-
-
-
-
-
-
+
([]) // 产品列表
const warehouseList = ref([]) // 仓库列表
-const categoryList = ref([]) // 仓库列表
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
+ queryParams.categoryId = 5
const data = await StockApi.getStockPage(queryParams)
list.value = data.list
total.value = data.total
@@ -155,24 +146,6 @@ const resetQuery = () => {
handleQuery()
}
-/** 添加/修改操作 */
-const formRef = ref()
-const openForm = (type: string, id?: number) => {
- formRef.value.open(type, id)
-}
-
-/** 删除按钮操作 */
-const handleDelete = async (id: number) => {
- try {
- // 删除的二次确认
- await message.delConfirm()
- // 发起删除
- await StockApi.deleteStock(id)
- message.success(t('common.delSuccess'))
- // 刷新列表
- await getList()
- } catch {}
-}
/** 导出按钮操作 */
const handleExport = async () => {
@@ -194,15 +167,8 @@ onMounted(async () => {
queryParams.categoryId = 2
await getList()
// 加载产品、仓库列表
- productList.value = await ProductApi.getProductSimpleList()
+ productList.value = await ProductApi.getComponentSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
- categoryList.value = await ProductCategoryApi.getProductCategorySimpleList()
})
-/** tab 切换 */
-let activeName = '2'
-const handleTabClick = (tab: TabsPaneContext) => {
- queryParams.categoryId = tab.paneName
- handleQuery()
-}
diff --git a/src/views/erp/product/product/ProductForm.vue b/src/views/erp/product/product/ProductForm.vue
index e013f828..4b2b569d 100644
--- a/src/views/erp/product/product/ProductForm.vue
+++ b/src/views/erp/product/product/ProductForm.vue
@@ -160,7 +160,8 @@ const formData = ref({
weight: undefined,
purchasePrice: undefined,
salePrice: undefined,
- minPrice: undefined
+ minPrice: undefined,
+ safetyNumber: undefined
})
const formRules = reactive({
name: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }],
diff --git a/src/views/erp/stock/in/components/StockInItemForm.vue b/src/views/erp/stock/in/components/StockInItemForm.vue
index 53a2fd2d..b7543dc3 100644
--- a/src/views/erp/stock/in/components/StockInItemForm.vue
+++ b/src/views/erp/stock/in/components/StockInItemForm.vue
@@ -108,7 +108,7 @@
-
+
@@ -117,7 +117,9 @@
- —
+
+
+
diff --git a/src/views/erp/stock/out/components/StockOutItemForm.vue b/src/views/erp/stock/out/components/StockOutItemForm.vue
index b09a5695..eb6e1c57 100644
--- a/src/views/erp/stock/out/components/StockOutItemForm.vue
+++ b/src/views/erp/stock/out/components/StockOutItemForm.vue
@@ -108,7 +108,7 @@
-
+
@@ -117,7 +117,9 @@
- —
+
+
+
diff --git a/src/views/mes/bom/components/BomDetailForm.vue b/src/views/mes/bom/components/BomDetailForm.vue
index 0d54824c..26b7c57a 100644
--- a/src/views/mes/bom/components/BomDetailForm.vue
+++ b/src/views/mes/bom/components/BomDetailForm.vue
@@ -72,9 +72,11 @@
-
-
-
+
+
+
+
+