|
@ -57,7 +57,7 @@ |
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> |
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<DetailMoldLedger |
|
|
<DetailDeviceLedger |
|
|
ref="detailRef" |
|
|
ref="detailRef" |
|
|
:tabs="MoldLedgerTabsList" |
|
|
:tabs="MoldLedgerTabsList" |
|
|
:subTabs="MoldLedgerSubTabsList" |
|
|
:subTabs="MoldLedgerSubTabsList" |
|
@ -70,6 +70,15 @@ |
|
|
:tableObjectExtend="tableObjectExtend" |
|
|
:tableObjectExtend="tableObjectExtend" |
|
|
:getImageApi="uploadApi.getImage" |
|
|
:getImageApi="uploadApi.getImage" |
|
|
:uploadImage="uploadApi.uploadImage" |
|
|
:uploadImage="uploadApi.uploadImage" |
|
|
|
|
|
:defaultParams="defaultParams" |
|
|
|
|
|
:dialogApiPage="dialogApiPage" |
|
|
|
|
|
:dialogAllSchemas="dialogAllSchemas" |
|
|
|
|
|
:dialogAllSchemasRules="dialogAllSchemasRules" |
|
|
|
|
|
:diaLogApiUpdate="MoldMilestoneApi.updateMoldMilestone" |
|
|
|
|
|
:diaLogApiCreate="MoldMilestoneApi.createMoldMilestone" |
|
|
|
|
|
:dialogFormAllSchemasRules="MoldMilestoneRules" |
|
|
|
|
|
:dialogFormAllSchemas="MoldMilestone.allSchemas" |
|
|
|
|
|
:milestoneFuncCode="milestone" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
@ -86,20 +95,36 @@ import download from '@/utils/download' |
|
|
import { |
|
|
import { |
|
|
MoldAccounts, |
|
|
MoldAccounts, |
|
|
MoldAccountsRules, |
|
|
MoldAccountsRules, |
|
|
UpImage |
|
|
MoldMilestone, |
|
|
|
|
|
MoldMilestoneRules |
|
|
} from './moldAccounts.data' |
|
|
} from './moldAccounts.data' |
|
|
import { Item } from '@/views/eam/basic/item/item.data' |
|
|
import { Item } from '@/views/eam/basic/item/item.data' |
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
// import { createMoldItemBatch, getMoldItemPage } from '@/api/eam/basic/rel' |
|
|
import { createDeviceItemBatch, getDeviceItemPage } from '@/api/eam/basic/rel' |
|
|
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' |
|
|
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
// import { MoldLedgerTabsList } from '@/utils/disposition/tabsList' |
|
|
import { MoldLedgerTabsList } from '@/utils/disposition/tabsList' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import DetailMoldLedger from '@/components/Detail/src/DetailDeviceLedger.vue' |
|
|
import DetailDeviceLedger from '@/components/Detail/src/DetailDeviceLedger.vue' |
|
|
import { MoldRepair } from '@/views/eam/mold/moldRepair/moldRepair.data' |
|
|
import { MoldRepair } from '@/views/eam/mold/moldRepair/moldRepair.data' |
|
|
|
|
|
import { DeviceItem } from '@/views/eam/basic/deviceItem/deviceItem.data' |
|
|
import * as moldRepairApi from '@/api/eam/mold/moldRepair' |
|
|
import * as moldRepairApi from '@/api/eam/mold/moldRepair' |
|
|
import * as uploadApi from '@/api/eam/upload' |
|
|
import * as uploadApi from '@/api/eam/upload' |
|
|
|
|
|
import * as MoldMaintainOrderMainApi from '@/api/eam/mold/moldMaintainOrderMain' |
|
|
|
|
|
// import * as MoldMaintainOrderDetailApi from '@/api/eam/mold/moldMaintainOrderDetail' |
|
|
|
|
|
import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain' |
|
|
|
|
|
import * as moldMaintenanceDetailApi from '@/api/eam/mold/moldMaintenanceDetail' |
|
|
|
|
|
import * as MoldMilestoneApi from '@/api/eam/basic/moldMilestone' |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
MoldMaintainOrderMain, |
|
|
|
|
|
MoldMaintainOrderDetail, |
|
|
|
|
|
} from '../moldMaintainOrderMain/moldMaintainOrderMain.data' |
|
|
|
|
|
import { |
|
|
|
|
|
MoldMaintenanceMain, |
|
|
|
|
|
MoldMaintenanceDetail |
|
|
|
|
|
} from '../moldMaintenanceMain/moldMaintenanceMain.data' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'MoldAccounts' }) |
|
|
defineOptions({ name: 'MoldAccounts' }) |
|
@ -109,7 +134,7 @@ const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
const moldNumber = ref() |
|
|
const deviceNumber = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(MoldAccounts.allSchemas.tableColumns) |
|
|
const tableColumns = ref(MoldAccounts.allSchemas.tableColumns) |
|
|
|
|
|
|
|
@ -118,6 +143,12 @@ const detailAllSchemas = ref() |
|
|
const apiPage = ref() |
|
|
const apiPage = ref() |
|
|
const itemCodeRow = ref() |
|
|
const itemCodeRow = ref() |
|
|
const tableObjectExtend = ref() |
|
|
const tableObjectExtend = ref() |
|
|
|
|
|
const defaultParams = ref({}) |
|
|
|
|
|
const dialogApiPage = ref() |
|
|
|
|
|
const dialogAllSchemas = ref() |
|
|
|
|
|
const dialogAllSchemasRules = ref() |
|
|
|
|
|
const milestone = ref("milestone") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
@ -292,7 +323,7 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const MoldLedgerSubTabsList = getStrDictOptions(DICT_TYPE.DEVICE_DOC_TYPE) |
|
|
const MoldLedgerSubTabsList = getStrDictOptions(DICT_TYPE.MOLD_DOC_TYPE) |
|
|
const tabsExtend = ref() |
|
|
const tabsExtend = ref() |
|
|
const funcCode = ref('mold_mould_picture') |
|
|
const funcCode = ref('mold_mould_picture') |
|
|
// tabs 切换事件 |
|
|
// tabs 切换事件 |
|
@ -308,28 +339,48 @@ const changeTabs = (item) => { |
|
|
// apiPage.value = PurchaseDetailApi.getPurchaseDetailPage |
|
|
// apiPage.value = PurchaseDetailApi.getPurchaseDetailPage |
|
|
// detailAllSchemas.value = PurchaseMain.allSchemas |
|
|
// detailAllSchemas.value = PurchaseMain.allSchemas |
|
|
} else if (item.prop == 'Part') { |
|
|
} else if (item.prop == 'Part') { |
|
|
tabsExtend.value = 3 |
|
|
tabsExtend.value = 4 |
|
|
// apiPage.value = moldRepairApi.getMoldRepairPage |
|
|
defaultParams.value = { |
|
|
// detailAllSchemas.value = MoldRepair.allSchemas |
|
|
deviceNumber: itemCodeRow |
|
|
|
|
|
} |
|
|
|
|
|
apiPage.value = getDeviceItemPage |
|
|
|
|
|
detailAllSchemas.value = DeviceItem.allSchemas |
|
|
} else if (item.prop == 'MoldReportRecord') { |
|
|
} else if (item.prop == 'MoldReportRecord') { |
|
|
tabsExtend.value = 3 |
|
|
tabsExtend.value = 4 |
|
|
|
|
|
defaultParams.value = { |
|
|
|
|
|
deviceNumber: itemCodeRow |
|
|
|
|
|
} |
|
|
apiPage.value = moldRepairApi.getMoldRepairPage |
|
|
apiPage.value = moldRepairApi.getMoldRepairPage |
|
|
detailAllSchemas.value = MoldRepair.allSchemas |
|
|
detailAllSchemas.value = MoldRepair.allSchemas |
|
|
} else if (item.prop == 'RepairRecord') { |
|
|
} else if (item.prop == 'RepairRecord') { |
|
|
tabsExtend.value = 3 |
|
|
tabsExtend.value = 3 |
|
|
// apiPage.value = ExpectinApi.getExpectinPage |
|
|
defaultParams.value = { |
|
|
// detailAllSchemas.value = Expectin.allSchemas |
|
|
deviceNumber: itemCodeRow |
|
|
|
|
|
} |
|
|
|
|
|
apiPage.value = MoldMaintenanceMainApi.getMoldMaintenanceMainPage |
|
|
|
|
|
detailAllSchemas.value = MoldMaintenanceMain.allSchemas |
|
|
|
|
|
dialogApiPage.value = moldMaintenanceDetailApi.getMoldMaintenanceDetailPage |
|
|
|
|
|
dialogAllSchemas.value = MoldMaintenanceDetail.allSchemas |
|
|
} else if (item.prop == 'MaintenanceRecord') { |
|
|
} else if (item.prop == 'MaintenanceRecord') { |
|
|
tabsExtend.value = 3 |
|
|
tabsExtend.value = 3 |
|
|
// apiPage.value = ExpectinApi.getExpectinPage |
|
|
defaultParams.value = { |
|
|
// detailAllSchemas.value = Expectin.allSchemas |
|
|
deviceNumber: itemCodeRow |
|
|
|
|
|
} |
|
|
|
|
|
apiPage.value = MoldMaintainOrderMainApi.getMoldMaintainOrderMainPage |
|
|
|
|
|
detailAllSchemas.value = MoldMaintainOrderMain.allSchemas |
|
|
|
|
|
// dialogApiPage.value = MoldMaintainOrderDetailApi.getMoldMaintainOrderDetailPage |
|
|
|
|
|
dialogAllSchemas.value = MoldMaintainOrderDetail.allSchemas |
|
|
|
|
|
} else if (item.prop == 'Milestone') { |
|
|
|
|
|
tabsExtend.value = 5 |
|
|
|
|
|
defaultParams.value = { |
|
|
|
|
|
moldNumber: itemCodeRow |
|
|
|
|
|
} |
|
|
|
|
|
apiPage.value = MoldMilestoneApi.getMoldMilestonePage |
|
|
|
|
|
detailAllSchemas.value = MoldMilestone.allSchemas |
|
|
|
|
|
// dialogFormAllSchemasRules.value = MoldMilestoneRules |
|
|
|
|
|
// dialogFormAllSchemas.value = MoldMilestone.allSchemas |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// detailAllSchemas.value.tableColumns.map((item, index) => { |
|
|
|
|
|
// if (item.field == 'action') { |
|
|
|
|
|
// detailAllSchemas.value.tableColumns.splice(index, 1) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// 当前物料代码作为条件 |
|
|
|
|
|
tableObjectExtend.value = [ |
|
|
tableObjectExtend.value = [ |
|
|
{ |
|
|
{ |
|
|
key: 'itemCode', |
|
|
key: 'itemCode', |
|
@ -369,11 +420,11 @@ const openQrCode = async (number: String) => { |
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
/** 绑定备件操作 */ |
|
|
/** 绑定备件操作 */ |
|
|
const openItem = async (number: String) => { |
|
|
const openItem = async (number: String) => { |
|
|
moldNumber.value = number |
|
|
deviceNumber.value = number |
|
|
searchTableRef.value.open( |
|
|
searchTableRef.value.open( |
|
|
'选择备件', |
|
|
'选择备件', |
|
|
Item.allSchemas, |
|
|
Item.allSchemas, |
|
|
getMoldItemList, |
|
|
getDeviceItemList, |
|
|
null, |
|
|
null, |
|
|
Item.allSchemas.searchSchema, |
|
|
Item.allSchemas.searchSchema, |
|
|
true, |
|
|
true, |
|
@ -385,14 +436,14 @@ const openItem = async (number: String) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { |
|
|
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { |
|
|
const moldItemRelList = selections.map((element) => ({ |
|
|
const deviceItemRelList = selections.map((element) => ({ |
|
|
moldNumber: moldNumber.value, |
|
|
deviceNumber: deviceNumber.value, |
|
|
itemNumber: element.number |
|
|
itemNumber: element.number |
|
|
})) |
|
|
})) |
|
|
createMoldItemBatch(moldItemRelList).then((res) => { |
|
|
createDeviceItemBatch(deviceItemRelList).then((res) => { |
|
|
console.log('res', res) |
|
|
console.log('res', res) |
|
|
}) |
|
|
}) |
|
|
console.log('moldItemRelList', moldItemRelList) |
|
|
console.log('deviceItemRelList', deviceItemRelList) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const getItemWithOutBind = async () => { |
|
|
const getItemWithOutBind = async () => { |
|
@ -401,7 +452,7 @@ const getItemWithOutBind = async () => { |
|
|
...Item.allSchemas.searchSchema |
|
|
...Item.allSchemas.searchSchema |
|
|
}) |
|
|
}) |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
// const response = await getMoldItemPage(MoldAccounts.allSchemas.searchSchema); |
|
|
// const response = await getDeviceItemPage(MoldAccounts.allSchemas.searchSchema); |
|
|
// const filteredList = res.list.filter(item => { |
|
|
// const filteredList = res.list.filter(item => { |
|
|
// return !response.list?.some(element => { |
|
|
// return !response.list?.some(element => { |
|
|
// return item.number === element.itemNumber |
|
|
// return item.number === element.itemNumber |
|
@ -419,7 +470,7 @@ const getItemWithOutBind = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 将 getListApi 替换为 getItemWithOutBind |
|
|
// 将 getListApi 替换为 getItemWithOutBind |
|
|
const getMoldItemList = async () => { |
|
|
const getDeviceItemList = async () => { |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
try { |
|
|
try { |
|
|
const res = await getItemWithOutBind() |
|
|
const res = await getItemWithOutBind() |
|
@ -434,4 +485,6 @@ const getMoldItemList = async () => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|