From 30b14df45bbf7a1df2395fc9ee6f65376acdf2d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Fri, 22 Dec 2023 09:30:19 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=E5=9F=BA=E7=A1=80=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E6=89=A9=E5=B1=95=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Detail/src/Detail.vue | 37 +++++++-
src/components/Tabs/src/Tabs.vue | 1 -
.../itemManage/itembasic/index.vue | 85 ++++++++++++++++++-
3 files changed, 119 insertions(+), 4 deletions(-)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index 2019e4db9..e9e337867 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -39,12 +39,30 @@
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
+
+
+
{
return []
}
+ },
+ // 针对基础数据tabs扩展 显示table列表 默认false
+ tabsExtend: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
+ // tableObject 数据过滤条件 针对 详情扩展标签页 传入不同条件
+ tableObjectExtend: {
+ type: Array,
+ required: false,
+ default: null
}
})
const isShowDrawer = ref(false)
@@ -569,6 +599,11 @@ watch(
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
+ if (props.tableObjectExtend) {
+ props.tableObjectExtend.forEach(item => {
+ tableObject.params[item.key] = item.value
+ })
+ }
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
diff --git a/src/components/Tabs/src/Tabs.vue b/src/components/Tabs/src/Tabs.vue
index aa646613e..8c66168a9 100644
--- a/src/components/Tabs/src/Tabs.vue
+++ b/src/components/Tabs/src/Tabs.vue
@@ -29,7 +29,6 @@ const props = defineProps({
const current = ref(props.current);
const change = (item, index) => {
current.value = index
- console.log(index);
emit('change',item,index)
}
const emit = defineEmits(['change'])
diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue
index 8f1c56258..aa9d89bcd 100644
--- a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue
+++ b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue
@@ -47,7 +47,17 @@
/>
-
+
@@ -61,7 +71,32 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import { Itembasic, rules } from './itembasic.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { ItemBasicTabsList } from '@/utils/disposition/tabsList'
+import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
+import * as SupplieritemApi from '@/api/wms/supplieritem'
+import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
+import * as CustomeritemApi from '@/api/wms/customeritem'
+import { PurchaseMain } from '@/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data'
+import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
+import { PurchasePlanMain } from '@/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data'
+import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
+import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
+import * as BalanceApi from '@/api/wms/balance'
+import { Expectout } from '@/views/wms/inventoryManage/expectout/expectout.data'
+import * as ExpectoutApi from '@/api/wms/expectout'
+import { Expectin } from '@/views/wms/inventoryManage/expectin/expectin.data'
+import * as ExpectinApi from '@/api/wms/expectin'
+
+
+//物品基础信息
defineOptions({ name: 'Itembasic' })
+
+const tabsExtend = ref(false)
+const allSchemas = ref(Itembasic.allSchemas)
+const detailAllSchemas = ref()
+const apiPage = ref()
+const itemCodeRow = ref()
+const tableObjectExtend = ref()
+
const { tableObject, tableMethods } = useTable({
getListApi: ItembasicApi.getItembasicPage // 分页接口
})
@@ -181,6 +216,7 @@ const formsSuccess = async (formType,data) => {
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
+ itemCodeRow.value = row.code
detailRef.value.openDetail(row, titleName, titleValue, 'basicItembasic')
}
@@ -188,7 +224,6 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
const handleDelete = async (id: number) => {
try {
// 删除的二次确认
- console.log(tableObject.params)
await message.delConfirm()
// 发起删除
await ItembasicApi.deleteItembasic(id)
@@ -222,6 +257,52 @@ const searchFormClick = (searchData) => {
getList() // 刷新当前列表
}
+// tabs 切换事件
+const changeTabs = (item) => {
+ if(item.prop == 'SupplierItems'){
+ tabsExtend.value = true
+ apiPage.value = SupplieritemApi.getSupplieritemPage
+ detailAllSchemas.value = Supplieritem.allSchemas
+ } else if(item.prop == 'CustomerItems'){
+ tabsExtend.value = true
+ apiPage.value = CustomeritemApi.getCustomeritemPage
+ detailAllSchemas.value = Customeritem.allSchemas
+ } else if(item.prop == 'PurchaseOrder'){
+ tabsExtend.value = true
+ apiPage.value = PurchaseDetailApi.getPurchaseDetailPage
+ detailAllSchemas.value = PurchaseMain.allSchemas
+ } else if(item.prop == 'PurchasingPlan'){
+ tabsExtend.value = true
+ apiPage.value = PurchasePlanDetailApi.getPurchasePlanDetailPage
+ detailAllSchemas.value = PurchasePlanMain.allSchemas
+ } else if(item.prop == 'InventoryBalance'){
+ tabsExtend.value = true
+ apiPage.value = BalanceApi.getBalancePage
+ detailAllSchemas.value = Balance.allSchemas
+ } else if(item.prop == 'ExpectedIn'){
+ tabsExtend.value = true
+ apiPage.value = ExpectinApi.getExpectinPage
+ detailAllSchemas.value = Expectin.allSchemas
+ } else if(item.prop == 'ExpectedOut'){
+ tabsExtend.value = true
+ apiPage.value = ExpectoutApi.getExpectoutPage
+ detailAllSchemas.value = Expectout.allSchemas
+ } else {
+ tabsExtend.value = false
+ allSchemas.value = Itembasic.allSchemas
+ }
+ detailAllSchemas.value.tableColumns.map((item,index) => {
+ if (item.field == 'action') {
+ detailAllSchemas.value.tableColumns.splice(index,1)
+ }
+ })
+ // 当前物品代码作为条件
+ tableObjectExtend.value = [{
+ key: 'itemCode',
+ value: itemCodeRow.value
+ }]
+}
+
/** 初始化 **/
onMounted(() => {