|
|
@ -47,7 +47,17 @@ |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :tabs="ItemBasicTabsList" :isBasic="true" :allSchemas="Itembasic.allSchemas" /> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
:tabs="ItemBasicTabsList" |
|
|
|
:isBasic="true" |
|
|
|
:allSchemas="allSchemas" |
|
|
|
@changeTabs="changeTabs" |
|
|
|
:detailAllSchemas="detailAllSchemas" |
|
|
|
:apiPage="apiPage" |
|
|
|
:tabsExtend="tabsExtend" |
|
|
|
:tableObjectExtend="tableObjectExtend" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" :url="ItembasicApi.importUrl" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
@ -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(() => { |
|
|
|