From 68798abdc75bbb6a6f762e6fc836bc7308dbf34a Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 19 Feb 2024 14:06:34 +0800 Subject: [PATCH] =?UTF-8?q?2024-02-19=20=E7=89=A9=E6=96=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/part/bomSearch3.js | 26 + src/api/part/masterPartInformation.js | 81 + src/api/part/partInformation.js | 70 +- src/api/part/routingManagement.js | 36 + .../part/routingOperationWorkGuidelines.js | 55 + .../base/propertiesItem/propertiesItem.vue | 6 +- .../base/propertiesItem/propertiesModel.vue | 6 +- .../customerInformationManagement.vue | 6 +- src/views/modules/part/bomManagement.vue | 32 +- src/views/modules/part/bomSearch3.vue | 894 +++++++++ .../modules/part/partCatalogInformation.vue | 1701 ++++++++++++++++ src/views/modules/part/partInformation.vue | 1768 ++++++++++++++--- src/views/modules/part/routingManagement.vue | 641 ++++-- .../part/routingOperationWorkGuidelines.vue | 1350 +++++++++++++ .../modules/part/routingWorkGuidelines.vue | 617 ++++++ 15 files changed, 6819 insertions(+), 470 deletions(-) create mode 100644 src/api/part/bomSearch3.js create mode 100644 src/api/part/masterPartInformation.js create mode 100644 src/api/part/routingOperationWorkGuidelines.js create mode 100644 src/views/modules/part/bomSearch3.vue create mode 100644 src/views/modules/part/partCatalogInformation.vue create mode 100644 src/views/modules/part/routingOperationWorkGuidelines.vue create mode 100644 src/views/modules/part/routingWorkGuidelines.vue diff --git a/src/api/part/bomSearch3.js b/src/api/part/bomSearch3.js new file mode 100644 index 0000000..c857942 --- /dev/null +++ b/src/api/part/bomSearch3.js @@ -0,0 +1,26 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +/** + * bom列表查询 + * @param data + * @returns {*} + */ +export const bomSearchHeader = data => createAPI(`/plm/bomSearch3/bomSearchHeader`,'post',data) + +/** + * 查询bom替代树形 + * @param data + * @returns {*} + */ +export const getAlternativeTree = data => createAPI(`/plm/bomSearch3/getAlternativeTree`,'post',data) + +/** + * 查询子物料 + * @param data + * @returns {*} + */ +export const getComponentPartList = data => createAPI(`/plm/bomSearch3/getComponentPartList`,'post',data) + + + + diff --git a/src/api/part/masterPartInformation.js b/src/api/part/masterPartInformation.js new file mode 100644 index 0000000..b5d5553 --- /dev/null +++ b/src/api/part/masterPartInformation.js @@ -0,0 +1,81 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +/** + * master part 物料信息列表查询 + * @param data + * @returns {*} + */ +export const masterPartSearch = data => createAPI(`/plm/masterPartInformation/masterPartSearch`,'post',data) + +/** + * master part 物料信息新增 + * @param data + * @returns {*} + */ +export const masterPartInformationSave = data => createAPI(`/plm/masterPartInformation/masterPartInformationSave`,'post',data) + +/** + * master part 物料信息编辑 + * @param data + * @returns {*} + */ +export const masterPartInformationEdit = data => createAPI(`/plm/masterPartInformation/masterPartInformationEdit`,'post',data) + +/** + * master part 物料信息删除 + * @param data + * @returns {*} + */ +export const masterPartInformationDelete = data => createAPI(`/plm/masterPartInformation/masterPartInformationDelete`,'post',data) + +/** + * master part 查询物料属性 + * @param data + * @returns {*} + */ +export const getMasterPartItem = data => createAPI(`/plm/masterPartInformation/getMasterPartItem`,'post',data) + +/** + * master part 获取模板属性 + * @param data + * @returns {*} + */ +export const getItemLists = data => createAPI(`/plm/masterPartInformation/getItemLists`,'post',data) + +/** + * master part 新增物料属性 + * @param data + * @returns {*} + */ +export const addMasterPartItem = data => createAPI(`/plm/masterPartInformation/addMasterPartItem`,'post',data) + +/** + * master part 删除物料属性 + * @param data + * @returns {*} + */ +export const deleteMasterPartItem = data => createAPI(`/plm/masterPartInformation/deleteMasterPartItem`,'post',data) + +/** + * master part 修改物料属性值 + * @param data + * @returns {*} + */ +export const commitItemValue = data => createAPI(`/plm/masterPartInformation/commitItemValue`,'post',data) + +/** + * master part 查询未选择的物料属性 + * @param data + * @returns {*} + */ +export const queryMasterPartItem = data => createAPI(`/plm/masterPartInformation/queryMasterPartItem`,'post',data) + + + + + + + + + + diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js index 4562a6d..771d135 100644 --- a/src/api/part/partInformation.js +++ b/src/api/part/partInformation.js @@ -6,18 +6,21 @@ import { createAPI } from "@/utils/httpRequest.js"; * @returns {*} */ export const partInformationSearch = data => createAPI(`/plm/partInformation/partInformationSearch`,'post',data) + /** * 材料信息新增 * @param data * @returns {*} */ export const partInformationSave = data => createAPI(`/plm/partInformation/partInformationSave`,'post',data) + /** * 材料信息编辑 * @param data * @returns {*} */ export const partInformationEdit = data => createAPI(`/plm/partInformation/partInformationEdit`,'post',data) + /** * 材料信息删除 * @param data @@ -86,42 +89,107 @@ export const getAgentListBy = data => createAPI(`/plm/partInformation/getAgentLi */ export const deleteAgent = data => createAPI(`/plm/partInformation/deleteAgent`,'post',data) - /** * 查询材料信息 * @param data * @returns {*} */ export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList`,'get',data); + export const searchPart = (data) => createAPI(`/plm/partInformation/searchPart`,'get',data); + /** * 获取制造商列表 */ export const getManufacturerList = data => createAPI(`/plm/partInformation/getManufacturerList`,'post',data) + /** * 获取材料制造商 */ export const getPartManufacturer = data => createAPI(`/plm/partInformation/getPartManufacturer`,'post',data) + /** * 根据条件查询可选制造商 */ export const getManufacturerListBy = data => createAPI(`/plm/partInformation/getManufacturerListBy`,'post',data) + /** * 新增物料制造商 * @param data */ export const addPartManufacturer = data => createAPI(`/plm/partInformation/addPartManufacturer`,'post',data) + /** * 删除物料制造商 */ export const deletePartManufacturer = data => createAPI(`/plm/partInformation/deletePartManufacturer`,'post',data) + /** * 删除物料制造商(单删) */ export const deleteManufacturer = data => createAPI(`/plm/partInformation/deleteManufacturer`,'post',data) + +/** + * 获取库位列表 + */ +export const getLocationList = data => createAPI(`/plm/partInformation/getLocationList`,'post',data) + +/** + * 获取材料库位 + */ +export const getDefaultLocation = data => createAPI(`/plm/partInformation/getDefaultLocation`,'post',data) + +/** + * 根据条件查询可选库位 + */ +export const getLocationListBy = data => createAPI(`/plm/partInformation/getLocationListBy`,'post',data) + +/** + * 新增物料库位 + * @param data + */ +export const addDefaultLocation = data => createAPI(`/plm/partInformation/addDefaultLocation`,'post',data) + +/** + * 删除物料库位 + */ +export const deleteDefaultLocation = data => createAPI(`/plm/partInformation/deleteDefaultLocation`,'post',data) + +/** + * 删除物料库位(单删) + */ +export const deleteLocation = data => createAPI(`/plm/partInformation/deleteLocation`,'post',data) + + + /** * 修改物料属性值 */ export const commitItemValue = data => createAPI(`/plm/partInformation/commitItemValue`,'post',data) +/** + * 删除模板属性 + */ +export const deleteItem = data => createAPI(`/plm/partInformation/deleteItem`,'post',data) + +/** + * 获取模板属性 + */ +export const getItemLists = data => createAPI(`/plm/partInformation/getItemLists`,'post',data) + +/** + * 新增物料属性 + */ +export const addPartItem = data => createAPI(`/plm/partInformation/addPartItem`,'post',data) + +/** + * 删除物料属性 + */ +export const deletePartItem = data => createAPI(`/plm/partInformation/deletePartItem`,'post',data) + +/** + * 查询未选择的物料属性 + */ +export const queryPartItem = data => createAPI(`/plm/partInformation/queryPartItem`,'post',data) + diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js index b60b84e..641797e 100644 --- a/src/api/part/routingManagement.js +++ b/src/api/part/routingManagement.js @@ -124,6 +124,42 @@ export const queryOperationList = data => createAPI(`/plm/routingManagement/quer * @returns {*} */ export const getRottingRevision = data => createAPI(`/plm/routingManagement/getRottingRevision`,'post',data) +/** + * 获取 routingTools + * @param data + * @returns {*} + */ +export const searchRoutingTools = data => createAPI(`/plm/routingManagement/searchRoutingTools`,'post',data) +/** + * 新增 routingTools + * @param data + * @returns {*} + */ +export const routingToolSave = data => createAPI(`/plm/routingManagement/routingToolSave`,'post',data) +/** + * 根据替代查询工序列表 + * @param data + * @returns {*} + */ +export const queryOperationListByAlternative = data => createAPI(`/plm/routingManagement/queryOperationListByAlternative`,'post',data) +/** + * 根据物料查询替代 + * @param data + * @returns {*} + */ +export const queryAlternativeListByPartNo = data => createAPI(`/plm/routingManagement/queryAlternativeListByPartNo`,'post',data) +/** + * 编辑 routingTools + * @param data + * @returns {*} + */ +export const routingToolEdit = data => createAPI(`/plm/routingManagement/routingToolEdit`,'post',data) +/** + * 删除 routingTools + * @param data + * @returns {*} + */ +export const deleteRoutingTool = data => createAPI(`/plm/routingManagement/deleteRoutingTool`,'post',data) diff --git a/src/api/part/routingOperationWorkGuidelines.js b/src/api/part/routingOperationWorkGuidelines.js new file mode 100644 index 0000000..9e219a7 --- /dev/null +++ b/src/api/part/routingOperationWorkGuidelines.js @@ -0,0 +1,55 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +/** + * routing 替代列表查询 + * @param data + * @returns {*} + */ +export const routingSearchAlternative = data => createAPI(`/plm/workGuidelines/routingSearchAlternative`,'post',data) + +/** + * 获取 workGuideline + * @param data + * @returns {*} + */ +export const getRoutingWorkGuideline = data => createAPI(`/plm/workGuidelines/getRoutingWorkGuideline`,'post',data) + +/** + * 获取 workGuideline + * @param data + * @returns {*} + */ +export const getGuidelineSeq = data => createAPI(`/plm/workGuidelines/getGuidelineSeq`,'post',data) + +/** + * 新增 workGuideline + * @param data + * @returns {*} + */ +export const workGuidelineSave = data => createAPI(`/plm/workGuidelines/workGuidelineSave`,'post',data) + +/** + * 编辑 workGuideline + * @param data + * @returns {*} + */ +export const workGuidelineEdit = data => createAPI(`/plm/workGuidelines/workGuidelineEdit`,'post',data) + +/** + * 删除 workGuideline + * @param data + * @returns {*} + */ +export const deleteWorkGuideline = data => createAPI(`/plm/workGuidelines/deleteWorkGuideline`,'post',data) + +/** + * workGuidelines 列表查询 + * @param data + * @returns {*} + */ +export const workGuidelinesSearch = data => createAPI(`/plm/workGuidelines/workGuidelinesSearch`,'post',data) + + + + + diff --git a/src/views/modules/base/propertiesItem/propertiesItem.vue b/src/views/modules/base/propertiesItem/propertiesItem.vue index 171c132..920d712 100644 --- a/src/views/modules/base/propertiesItem/propertiesItem.vue +++ b/src/views/modules/base/propertiesItem/propertiesItem.vue @@ -11,7 +11,8 @@ - + + @@ -111,7 +112,8 @@ - + + diff --git a/src/views/modules/base/propertiesItem/propertiesModel.vue b/src/views/modules/base/propertiesItem/propertiesModel.vue index c1b946b..8e32d60 100644 --- a/src/views/modules/base/propertiesItem/propertiesModel.vue +++ b/src/views/modules/base/propertiesItem/propertiesModel.vue @@ -11,7 +11,8 @@ - + + @@ -123,7 +124,8 @@ - + + diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue index 939feb7..8850373 100644 --- a/src/views/modules/customer/customerInformationManagement.vue +++ b/src/views/modules/customer/customerInformationManagement.vue @@ -104,10 +104,10 @@ - + - - + + diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 1b36108..f7fe0cb 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -107,14 +107,8 @@ - - - - - - - + @@ -188,7 +182,7 @@ - + @@ -266,7 +260,7 @@ - + @@ -366,7 +360,7 @@ - + 子物料编码 @@ -382,13 +376,13 @@ - + - + - + 工序 @@ -1477,7 +1471,6 @@ export default { printUnit: row.printUnit, printUnitName: row.printUnitName, } - console.log(row) // 查bom明细 queryBomDetail(this.modalData).then(({data}) => { if (data && data.code === 0) { @@ -2456,7 +2449,7 @@ export default { */ queryOperationList () { this.operationData.partNo = this.modalData.partNo - // 查询所有检验模板 + // 查询所有 queryOperationList(this.operationData).then(({data}) => { if (data && data.code === 0) { this.operationList = data.rows @@ -2548,6 +2541,15 @@ export default { .numInput /deep/ .el-input__inner{ text-align: right; } +/deep/ .inlineNumber input::-webkit-outer-spin-button, +/deep/ .inlineNumber input::-webkit-inner-spin-button { + -webkit-appearance: none; + +} +/deep/ .inlineNumber input[type="number"]{ + -moz-appearance: textfield; + padding-right: 5px !important; +} diff --git a/src/views/modules/part/bomSearch3.vue b/src/views/modules/part/bomSearch3.vue new file mode 100644 index 0000000..667de08 --- /dev/null +++ b/src/views/modules/part/bomSearch3.vue @@ -0,0 +1,894 @@ + + + + + + + + + + + + + + + diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue new file mode 100644 index 0000000..9c20b96 --- /dev/null +++ b/src/views/modules/part/partCatalogInformation.vue @@ -0,0 +1,1701 @@ + + + + + + diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 0f23216..d5bb0d1 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -115,137 +115,455 @@ - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 属性模板 - - - - - 计量单位 - - - - - - - 物料分类 - - - - - 物料分组 - - - - - - - 商品组1 - - - - - 商品组2 - - - - - - - 会计组 - - - - - 计划员 - - - - + + + + + + + + + + + + + 安全编码 / Safety Code + + + + + + + 计划员 / Planner + + + + + 会计组 / Accounting Group + + + + + + + 计量单位 / Inventory UoM + + + + + 物料分组 / Product Code + + + + + + + 商品组1 / Comm Group 1 + + + + + 物料分类 / Product Family + + + + + + + 商品组2 / Comm Group 2 + + + + + + + + + + 资产类别 / Asset Class + + + + + + + + + + 物料状态 / Part Status + + + + + + + + + + + + + ABC类别 / ABC Class + + + + + + + + + + + + + 属性模板 + + + + + + + + + + + + + + + + + + + + 原产地 / Country of Origin + + + + + + + + + + + 地区编码 / Region Code + + + + + + + + + + 海关统计编号 / Customs Star No + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 物料成本组 / Part Cost Group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 规划方法 / Planning Method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 将副产品用作供应 / Use By-Product as Supply in + + + + + + + + + + + + + + + + MRP控制 / MRP Control + + + + + + + + + + + + + + + 使用理论 / Use Theoretical + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 保存 关闭 - + - - - 编辑 - + + 新增/删除 + 编辑 @@ -271,21 +589,19 @@ - + - - - 新增 - + + 新增 - - - 新增 - + + 新增 + + + + 新增 + + + + + + + + + + - - - 上传文件 - + + 上传文件 @@ -456,34 +805,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - 关闭 - + + +
+ + + + + + + + + 查询 + + +
+ + + 可选属性: + + + + + + + + + + +
+ 添加>> +
+
+ 删除<< +
+
+ + 已有属性: + + + + + + + + + +
+ + 关闭 +
@@ -682,6 +1099,104 @@
+ + +
+ + + + + + + + + 查询 + + +
+ + + 可选库位: + + + + + + + + + + +
+ 添加>> +
+
+ 删除<< +
+
+ + 已有库位: + + + + + + + + + +
+ + 关闭 + +
+ @@ -703,14 +1218,27 @@ getAgentListBy, // 根据条件查询可选代理商 addPartAgent, // 新增物料代理商 deletePartAgent, // 删除物料代理商 - deleteAgent, // 删除物料制造商(单删) + deleteAgent, // 删除物料代理商(单删) getManufacturerList, // 获取制造商列表 getPartManufacturer, // 获取物料制造商 getManufacturerListBy, // 根据条件查询可选制造商 addPartManufacturer, // 新增物料制造商 deletePartManufacturer, // 删除物料制造商 deleteManufacturer, // 删除物料制造商(单删) + + getLocationList, // 获取库位列表 + getDefaultLocation, // 获取物料库位 + getLocationListBy, // 根据条件查询可选库位 + addDefaultLocation, // 新增物料库位 + deleteDefaultLocation, // 删除物料库位 + deleteLocation, // 删除物料库位(单删) + commitItemValue, // 修改物料属性值 + deleteItem, // 删除模板属性, + getItemLists, // 获取模板属性 + addPartItem, // 新增物料属性 + deletePartItem, // 删除物料属性 + queryPartItem, } from '@/api/part/partInformation.js' import { getFileContentList, // 获取物料单附件列表 @@ -731,14 +1259,12 @@ deep: true, handler: function (newV, oldV) { this.searchData.partNo = this.searchData.partNo.toUpperCase() - this.searchData.erpPartNo = this.searchData.erpPartNo.toUpperCase() } }, modalData: { deep: true, handler: function (newV, oldV) { this.modalData.partNo = this.modalData.partNo.toUpperCase() - this.modalData.erpPartNo = this.modalData.erpPartNo.toUpperCase() } } }, @@ -818,16 +1344,73 @@ updateDate: '', updateBy: '', agentId: '', - agentName: '' + agentName: '', + typeDesignation: '', + hazardCode: '', + hazardDesc: '', + assetClass: '', + assetClassDesc: '', + dimQuality: '', + abcClass: '', + abcClassDesc: '', + frequencyClass: '', + lifecycleStage: '', + isoCountry: '', + isoCountryDesc: '', + manufacturingLeadTime: '', + expectedLeadTime: '', + regionOfOrigin: '', + regionOfOriginDesc: '', + durabilityWeek: '', + customsStarNo: '', + customsStarDesc: '', + durabilityDay: '', + intrastatConvFactor: '', + umDesc: '', + status: '', + partStatus: '', + partStatusDesc: '', + configurationID: '', + estimatedMaterialCost: '', + inventoryValuationMethod: '', + partCostGroupID: '', + partCostGroupDesc: '', + inventoryPartCostLevel: '', + invoiceConsideration: '', + zeroCostFlag: '', + planningMethod: '', + planningMethodDesc: '', + safetyStock: '', + minOrderQty: '', + maxOrderQty: '', + mulOrderQty: '', + safetyLeadTime: '', + shrinkageFac: '', + stdOrderQty: '', + cumLeadTime: '', + backFlushPart: '', + byProdAsSupplyInMrpDb: '', + unprotectedLeadTime: '', + issueType: '', + mrpControlFlagDb: '', + fixedLeadTimeDay: '', + overReporting: '', + useTheoreticalDensityDb: '', + variableLeadTimeDay: '', + overReportTolerance: '', + fixedLeadTimeHour: '', + density: '', + variableLeadTimeHour: '' }, - itemData:{ - site: '', + itemData: { + site: this.$store.state.user.site, partNo: '', propertiesItemNo: '', + codeNo: '', itemDesc: '', textValue: '', numValue: '', - recordType: 'B' + recordType: 'IP' }, agentData: { site: this.$store.state.user.site, @@ -839,12 +1422,18 @@ manufacturerId: '', manufacturerName: '', }, + locationData: { + site: this.$store.state.user.site, + locationId: '', + locationName: '', + }, // ======== 数据列表 ======== dataList: [], partItemList: [], updatePartItemList: [], partAgentList: [], partManufacturerList: [], + defaultLocationList: [], fileContentList: [], availableValueList:[], agentList: [], @@ -859,6 +1448,16 @@ manufacturerSelections2: [], manufacturerList1: [], manufacturerList2: [], + locationList: [], + locationSelections: [], + locationSelections1: [], + locationSelections2: [], + locationList1: [], + locationList2: [], + itemSelections1: [], + itemSelections2: [], + itemList1:[], + itemList2:[], // ======== 列表表头 ======== columnList: [ { @@ -869,7 +1468,7 @@ tableName: '物料信息表', columnProp: 'partNo', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '物料编码', columnHidden: false, columnImage: false, @@ -879,24 +1478,6 @@ fixed: '', columnWidth: 120 }, - // { - // userId: this.$store.state.user.name, - // functionId: 104001, - // serialNumber: '104001Table1ERPPartNo', - // tableId: '104001Table1', - // tableName: '物料信息表', - // columnProp: 'erpPartNo', - // headerAlign: 'center', - // align: 'left', - // columnLabel: 'ERP物料编码', - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // columnWidth: 120 - // }, { userId: this.$store.state.user.name, functionId: 104001, @@ -941,7 +1522,7 @@ tableName: '物料信息表', columnProp: 'umName', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '计量单位', columnHidden: false, columnImage: false, @@ -977,7 +1558,7 @@ tableName: '物料信息表', columnProp: 'uomForWeightNet', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '净重单位', columnHidden: false, columnImage: false, @@ -1013,7 +1594,7 @@ tableName: '物料信息表', columnProp: 'uomForVolumeNet', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '体积单位', columnHidden: false, columnImage: false, @@ -1049,7 +1630,7 @@ tableName: '物料信息表', columnProp: 'partType', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '物料类别', columnHidden: false, columnImage: false, @@ -1067,7 +1648,7 @@ tableName: '物料信息表', columnProp: 'familyName', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '物料分类', columnHidden: false, columnImage: false, @@ -1085,7 +1666,7 @@ tableName: '物料信息表', columnProp: 'groupName', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '物料分组', columnHidden: false, columnImage: false, @@ -1103,7 +1684,7 @@ tableName: '物料信息表', columnProp: 'productGroupName1', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '商品组1', columnHidden: false, columnImage: false, @@ -1121,7 +1702,7 @@ tableName: '物料信息表', columnProp: 'productGroupName2', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '商品组2', columnHidden: false, columnImage: false, @@ -1139,7 +1720,7 @@ tableName: '物料信息表', columnProp: 'productGroupName3', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '会计组', columnHidden: false, columnImage: false, @@ -1157,7 +1738,7 @@ tableName: '物料信息表', columnProp: 'productGroupName4', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '计划员', columnHidden: false, columnImage: false, @@ -1175,7 +1756,7 @@ tableName: '物料信息表', columnProp: 'codeDesc', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '属性模板', columnHidden: false, columnImage: false, @@ -1469,7 +2050,128 @@ columnProp: 'agentName', headerAlign: "center", align: "center", - columnLabel: '代理商名称', + columnLabel: '代理商名称', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table3Active', + tableId: '104001Table3', + tableName: '物料代理商表', + columnProp: 'active', + headerAlign: 'center', + align: 'center', + columnLabel: '是否在用', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table3CreateDate', + tableId: '104001Table3', + tableName: '物料代理商表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '创建时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table3CreateBy', + tableId: '104001Table3', + tableName: '物料代理商表', + columnProp: 'createBy', + headerAlign: 'center', + align: 'center', + columnLabel: '创建人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table3UpdateDate', + tableId: '104001Table3', + tableName: '物料代理商表', + columnProp: 'updateDate', + headerAlign: 'center', + align: 'center', + columnLabel: '更新时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table3UpdateBy', + tableId: '104001Table3', + tableName: '物料代理商表', + columnProp: 'updateBy', + headerAlign: 'center', + align: 'center', + columnLabel: '更新人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + } + ], + columnManufacturerList: [ + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table5ManufacturerId', + tableId: "104001Table5", + tableName: "物料制造商表", + columnProp: 'manufacturerId', + headerAlign: "center", + align: "center", + columnLabel: '制造商编码', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table5ManufacturerName', + tableId: "104001Table5", + tableName: "物料制造商表", + columnProp: 'manufacturerName', + headerAlign: "center", + align: "center", + columnLabel: '制造商名称', columnHidden: false, columnImage: false, columnSortable: true, @@ -1480,9 +2182,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table3Active', - tableId: '104001Table3', - tableName: '物料代理商表', + serialNumber: '104001Table5Active', + tableId: '104001Table5', + tableName: '物料制造商表', columnProp: 'active', headerAlign: 'center', align: 'center', @@ -1497,9 +2199,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table3CreateDate', - tableId: '104001Table3', - tableName: '物料代理商表', + serialNumber: '104001Table5CreateDate', + tableId: '104001Table5', + tableName: '物料制造商表', columnProp: 'createDate', headerAlign: 'center', align: 'center', @@ -1514,9 +2216,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table3CreateBy', - tableId: '104001Table3', - tableName: '物料代理商表', + serialNumber: '104001Table5CreateBy', + tableId: '104001Table5', + tableName: '物料制造商表', columnProp: 'createBy', headerAlign: 'center', align: 'center', @@ -1531,9 +2233,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table3UpdateDate', - tableId: '104001Table3', - tableName: '物料代理商表', + serialNumber: '104001Table5UpdateDate', + tableId: '104001Table5', + tableName: '物料制造商表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', @@ -1548,9 +2250,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table3UpdateBy', - tableId: '104001Table3', - tableName: '物料代理商表', + serialNumber: '104001Table5UpdateBy', + tableId: '104001Table5', + tableName: '物料制造商表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', @@ -1563,17 +2265,17 @@ fixed: '', } ], - columnManufacturerList: [ + columnLocationList: [ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5ManufacturerId', - tableId: "104001Table5", - tableName: "物料制造商表", - columnProp: 'manufacturerId', + serialNumber: '104001Table7LocationId', + tableId: "104001Table7", + tableName: "物料库位表", + columnProp: 'locationId', headerAlign: "center", align: "center", - columnLabel: '制造商编码', + columnLabel: '库位编码', columnHidden: false, columnImage: false, columnSortable: true, @@ -1584,13 +2286,13 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5ManufacturerName', - tableId: "104001Table5", - tableName: "物料制造商表", - columnProp: 'manufacturerName', + serialNumber: '104001Table7LocationName', + tableId: "104001Table7", + tableName: "物料库位表", + columnProp: 'locationName', headerAlign: "center", align: "center", - columnLabel: '制造商名称', + columnLabel: '库位名称', columnHidden: false, columnImage: false, columnSortable: true, @@ -1601,9 +2303,26 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5Active', - tableId: '104001Table5', - tableName: '物料制造商表', + serialNumber: '104001Table7warehouseId', + tableId: "104001Table7", + tableName: "物料库位表", + columnProp: 'warehouseId', + headerAlign: "center", + align: "center", + columnLabel: '仓库编码', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table7Active', + tableId: '104001Table7', + tableName: '物料库位表', columnProp: 'active', headerAlign: 'center', align: 'center', @@ -1618,9 +2337,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5CreateDate', - tableId: '104001Table5', - tableName: '物料制造商表', + serialNumber: '104001Table7CreateDate', + tableId: '104001Table7', + tableName: '物料库位表', columnProp: 'createDate', headerAlign: 'center', align: 'center', @@ -1635,9 +2354,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5CreateBy', - tableId: '104001Table5', - tableName: '物料制造商表', + serialNumber: '104001Table7CreateBy', + tableId: '104001Table7', + tableName: '物料库位表', columnProp: 'createBy', headerAlign: 'center', align: 'center', @@ -1652,9 +2371,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5UpdateDate', - tableId: '104001Table5', - tableName: '物料制造商表', + serialNumber: '104001Table7UpdateDate', + tableId: '104001Table7', + tableName: '物料库位表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', @@ -1669,9 +2388,9 @@ { userId: this.$store.state.user.name, functionId: 104001, - serialNumber: '104001Table5UpdateBy', - tableId: '104001Table5', - tableName: '物料制造商表', + serialNumber: '104001Table7UpdateBy', + tableId: '104001Table7', + tableName: '物料库位表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', @@ -1916,7 +2635,9 @@ itemModalFlag: false, agentModelFlag: false, manufacturerModelFlag: false, - updateItemModelFlag: false + updateItemModelFlag: false, + fastAddFlag: false, + locationModelFlag: false } }, @@ -1924,7 +2645,7 @@ this.$nextTick(() => { this.height = window.innerHeight / 2 - 30 /*第二个表格高度的动态调整*/ - this.secondHeight = window.innerHeight / 2 - 206 + this.secondHeight = window.innerHeight - this.height - 180 }) }, @@ -1934,6 +2655,16 @@ methods: { + // 制造提前期内容改变事件 + changeExpectedLeadTime () { + this.modalData.expectedLeadTime = this.modalData.manufacturingLeadTime + }, + + // 天数内容改变事件 + changeDurabilityWeek () { + this.modalData.durabilityWeek = this.modalData.durabilityDay / 7 + }, + focusNextInput (index, type) { let aaa = '' if (this.updatePartItemList.length - 1 === index) { @@ -1946,13 +2677,15 @@ }) }, - // 编辑物料属性 + /** + * 编辑物料属性 + */ updateItemValue () { let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, - recordType: 'B' + recordType: 'IP' } getPartItem(tempData).then(({data}) => { if (data && data.code === 0) { @@ -1964,6 +2697,114 @@ }) }, + /** + * 新增/删除物料属性 + */ + addOrDelItem () { + this.itemSelections1 = null + this.itemSelections2 = null + this.itemData.propertiesItemNo = '' + this.itemData.itemDesc = '' + let tempData = { + site: this.partCurrentRow.site, + partNo: this.partCurrentRow.partNo, + codeNo: this.partCurrentRow.codeNo, + recordType: 'IP' + } + getItemLists(tempData).then(({data}) => { + this.itemList1 = data.row1 + this.itemList2 = data.row2 + }) + this.fastAddFlag = true + }, + // 可选属性 + itemClickRow1 (row) { + this.$refs.itemTable1.toggleRowSelection(row) + }, + // 已有属性 + itemClickRow2 (row) { + this.$refs.itemTable2.toggleRowSelection(row) + }, + selectionItem1 (val) { + this.itemSelections1 = val + }, + selectionItem2 (val) { + this.itemSelections2 = val + }, + // 物料项目新增 + addItem () { + if (this.itemSelections1 == null || this.itemSelections1.length === 0) { + this.$message.warning('请选择可选属性!') + return + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + codeNo: this.partCurrentRow.codeNo, + codeDesc: this.partCurrentRow.codeDesc, + recordType: 'IP', + itemList: this.itemSelections1 + } + addPartItem(inData).then(({data}) => { + if (data && data.code === 0) { + getItemLists(inData).then(({data}) => { + this.itemList1 = data.row1 + this.itemList2 = data.row2 + }) + this.getPartItem() + this.itemSelections1 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 物料项目删除 + deleteItem () { + if (this.itemSelections2 == null || this.itemSelections2.length === 0) { + this.$alert("请选择已有属性!", '提示', { + confirmButtonText: '确定' + }) + return false + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + codeNo: this.partCurrentRow.codeNo, + codeDesc: this.partCurrentRow.codeDesc, + recordType: 'IP', + itemList: this.itemSelections2 + } + deletePartItem(inData).then(({data}) => { + if (data && data.code === 0) { + getItemLists(inData).then(({data}) => { + this.itemList1 = data.row1 + this.itemList2 = data.row2 + }) + this.getPartItem() + this.itemSelections2 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 查询物料项目 + queryPartItem () { + this.itemData.partNo = this.partCurrentRow.partNo + this.itemData.codeNo = this.partCurrentRow.codeNo + this.itemData.partNo = this.partCurrentRow.partNo + queryPartItem(this.itemData).then(({data}) => { + if (data && data.code === 0) { + this.itemList1 = data.rows + } else { + this.itemList1 = [] + } + }) + }, + // 确认修改物料属性 commitItemValue () { let tempData = { @@ -1991,9 +2832,9 @@ handleInput (value, type) { // 大于等于0,且只能输入4位小数 let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1') - if (val === null || val === undefined || val === '') { - val = 0 - } + // if (val === null || val === undefined || val === '') { + // val = 0 + // } if (type === 1) { this.modalData.weightNet = val } else if (type === 2) { @@ -2026,7 +2867,7 @@ * @returns {boolean} */ selectFlag () { - return true; + return true }, /** * 列表表格选择替换 @@ -2062,6 +2903,8 @@ this.getFileContentData() } else if (this.activeTable === 'part_manufacturer') { this.getPartManufacturer() + } else if (this.activeTable === 'default_locations') { + this.getDefaultLocation() } }, @@ -2074,7 +2917,7 @@ site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, - recordType: 'B' + recordType: 'IP' } getPartItem(tempData).then(({data}) => { if (data && data.code === 0) { @@ -2118,6 +2961,22 @@ } }) }, + /** + * 查询物料库位 + */ + getDefaultLocation () { + let tempData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + } + getDefaultLocation(tempData).then(({data}) => { + if (data && data.code === 0) { + this.defaultLocationList = data.rows + } else { + this.defaultLocationList = [] + } + }) + }, // ======== 列表数据刷新方法 ======== /** * 获取数据列表 @@ -2133,7 +2992,7 @@ this.totalPage = data.page.totalCount this.$refs.selectDiv.setLengthAll( this.dataList.length) // 判断是否全部存在数据 - if(this.totalPage > 0){ + if (this.totalPage > 0) { // 设置选中行 this.$refs.partTable.setCurrentRow(this.dataList[0]) // 加载当前的页签的table @@ -2189,7 +3048,63 @@ manufacturerName: '', agentId: '', agentName: '', - createBy: this.$store.state.user.name + createBy: this.$store.state.user.name, + typeDesignation: '', + hazardCode: '', + hazardDesc: '', + assetClass: '', + assetClassDesc: '', + dimQuality: '', + abcClass: '', + abcClassDesc: '', + frequencyClass: '', + lifecycleStage: '', + isoCountry: '', + isoCountryDesc: '', + manufacturingLeadTime: '', + expectedLeadTime: '', + regionOfOrigin: '', + regionOfOriginDesc: '', + durabilityWeek: '', + customsStarNo: '', + customsStarDesc: '', + durabilityDay: '', + intrastatConvFactor: '', + umDesc: '', + status: '', + partStatus: '', + partStatusDesc: '', + configurationID: '*', + estimatedMaterialCost: '', + inventoryValuationMethod: '', + partCostGroupID: '', + partCostGroupDesc: '', + inventoryPartCostLevel: '', + invoiceConsideration: '', + zeroCostFlag: '', + planningMethod: '', + planningMethodDesc: '', + safetyStock: '', + minOrderQty: '', + maxOrderQty: '', + mulOrderQty: '', + safetyLeadTime: '', + shrinkageFac: '', + stdOrderQty: '', + cumLeadTime: '', + backFlushPart: '', + byProdAsSupplyInMrpDb: '', + unprotectedLeadTime: '', + issueType: '', + mrpControlFlagDb: '', + fixedLeadTimeDay: '', + overReporting: '', + useTheoreticalDensityDb: '', + variableLeadTimeDay: '', + overReportTolerance: '', + fixedLeadTimeHour: '', + density: '', + variableLeadTimeHour: '' } this.modalDisableFlag = false this.modalFlag = true @@ -2238,7 +3153,63 @@ manufacturerName: row.manufacturerName, agentId: row.agentId, agentName: row.agentName, - updateBy: this.$store.state.user.name + updateBy: this.$store.state.user.name, + typeDesignation: row.typeDesignation, + hazardCode: row.hazardCode, + hazardDesc: row.hazardDesc, + assetClass: row.assetClass, + assetClassDesc: row.assetClassDesc, + dimQuality: row.dimQuality, + abcClass: row.abcClass, + abcClassDesc: row.abcClassDesc, + frequencyClass: row.frequencyClass, + lifecycleStage: row.lifecycleStage, + isoCountry: row.isoCountry, + isoCountryDesc: row.isoCountryDesc, + manufacturingLeadTime: row.manufacturingLeadTime, + expectedLeadTime: row.expectedLeadTime, + regionOfOrigin: row.regionOfOrigin, + regionOfOriginDesc: row.regionOfOriginDesc, + durabilityWeek: '', + customsStarNo: row.customsStarNo, + customsStarDesc: row.customsStarDesc, + durabilityDay: row.durabilityDay, + intrastatConvFactor: row.intrastatConvFactor, + umDesc: row.umDesc, + status: row.status, + partStatus: row.partStatus, + partStatusDesc: row.partStatusDesc, + configurationID: row.configurationID, + estimatedMaterialCost: row.estimatedMaterialCost, + inventoryValuationMethod: row.inventoryValuationMethod, + partCostGroupID: row.partCostGroupID, + partCostGroupDesc: row.partCostGroupDesc, + inventoryPartCostLevel: row.inventoryPartCostLevel, + invoiceConsideration: row.invoiceConsideration, + zeroCostFlag: row.zeroCostFlag, + planningMethod: row.planningMethod, + planningMethodDesc: row.planningMethodDesc, + safetyStock: row.safetyStock, + minOrderQty: row.minOrderQty, + maxOrderQty: row.maxOrderQty, + mulOrderQty: row.mulOrderQty, + safetyLeadTime: row.safetyLeadTime, + shrinkageFac: row.shrinkageFac, + stdOrderQty: row.stdOrderQty, + cumLeadTime: row.cumLeadTime, + backFlushPart: row.backFlushPart, + byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb, + unprotectedLeadTime: row.unprotectedLeadTime, + issueType: row.issueType, + mrpControlFlagDb: row.mrpControlFlagDb, + fixedLeadTimeDay: row.fixedLeadTimeDay, + overReporting: row.overReporting, + useTheoreticalDensityDb: row.useTheoreticalDensityDb, + variableLeadTimeDay: row.variableLeadTimeDay, + overReportTolerance: row.overReportTolerance, + fixedLeadTimeHour: row.fixedLeadTimeHour, + density: row.density, + variableLeadTimeHour: row.variableLeadTimeHour } this.modalDisableFlag = true this.modalFlag = true @@ -2325,11 +3296,11 @@ }, // 可选代理商 agentClickRow1 (row) { - this.$refs.agentTable1.toggleRowSelection(row); + this.$refs.agentTable1.toggleRowSelection(row) }, // 已有代理商 agentClickRow2 (row) { - this.$refs.agentTable2.toggleRowSelection(row); + this.$refs.agentTable2.toggleRowSelection(row) }, selectionAgent1 (val) { this.agentSelections1 = val @@ -2339,7 +3310,7 @@ }, // 添加代理商 addAgent () { - if(this.agentSelections1 == null || this.agentSelections1.length === 0){ + if (this.agentSelections1 == null || this.agentSelections1.length === 0) { this.$message.warning('请选择可选代理商!') return } @@ -2438,6 +3409,21 @@ } }) }, + /** + * 选择默认库位 + */ + getLocationList () { + // 查询所有库位 + getLocationListBy(this.locationData).then(({data}) => { + if (data && data.code === 0) { + this.locationList1 = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, /** * 制造商多选 * @param row @@ -2493,11 +3479,11 @@ }, // 可选制造商 manufacturerClickRow1 (row) { - this.$refs.manufacturerTable1.toggleRowSelection(row); + this.$refs.manufacturerTable1.toggleRowSelection(row) }, // 已有制造商 manufacturerClickRow2 (row) { - this.$refs.manufacturerTable2.toggleRowSelection(row); + this.$refs.manufacturerTable2.toggleRowSelection(row) }, selectionManufacturer1 (val) { this.manufacturerSelections1 = val @@ -2507,7 +3493,7 @@ }, // 添加制造商 addManufacturer () { - if(this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0){ + if (this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0) { this.$message.warning('请选择可选制造商!') return } @@ -2532,7 +3518,7 @@ }, // 删除物料制造商 deleteManufacturer () { - if(this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0){ + if (this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0) { this.$message.warning('请选择已有制造商!') return } @@ -2580,8 +3566,115 @@ }).catch(() => { }) }, + + + saveDefaultLocation () { + this.locationSelections1 = null + this.locationSelections2 = null + getLocationList(this.partCurrentRow).then(({data}) => { + this.locationList1 = data.row1 + this.locationList2 = data.row2 + }) + this.locationData = { + site: this.$store.state.user.site, + locationId: '', + locationName: '', + } + this.locationModelFlag = true + }, + // 可选库位 + locationClickRow1 (row) { + this.$refs.locationTable1.toggleRowSelection(row) + }, + // 已有库位 + locationClickRow2 (row) { + this.$refs.locationTable2.toggleRowSelection(row) + }, + selectionLocation1 (val) { + this.locationSelections1 = val + }, + selectionLocation2 (val) { + this.locationSelections2 = val + }, + // 添加库位 + addLocation () { + if (this.locationSelections1 == null || this.locationSelections1.length === 0) { + this.$message.warning('请选择可选库位!') + return + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + locationList: this.locationSelections1 + } + addDefaultLocation(inData).then(({data}) => { + if (data && data.code === 0) { + getLocationList(this.partCurrentRow).then(({data}) => { + this.locationList1 = data.row1 + this.locationList2 = data.row2 + }) + this.locationSelections1 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 删除库位 + deleteLocation () { + if (this.locationSelections2 == null || this.locationSelections2.length === 0) { + this.$message.warning('请选择已有库位!') + return + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + locationList: this.locationSelections2 + } + deleteDefaultLocation(inData).then(({data}) => { + if (data && data.code === 0) { + getLocationList(this.partCurrentRow).then(({data}) => { + this.locationList1 = data.row1 + this.locationList2 = data.row2 + }) + this.locationSelections2 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 单删 + deleteLocation2 (row) { + this.$confirm(`是否删除该库位?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteLocation(row).then(({data}) => { + if (data && data.code === 0) { + this.getDefaultLocation() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + + // 关闭后刷新列表 - refreshDetailList(){ + refreshDetailList () { this.getPartAgent() this.getPartManufacturer() }, @@ -2691,7 +3784,7 @@ * 物料信息删除 */ delModal () { - if(this.partSelections.length === 0){ + if (this.partSelections.length === 0) { this.$message.warning('请勾选要删除的物料信息!') return } @@ -2742,65 +3835,37 @@ }, // ======== 属性页签相关方法 ======== - /** - * 编辑属性值模态框 - */ - updateItemModal (row) { - this.itemData = { - site: row.site, - partNo: row.partNo, - propertiesItemNo: row.propertiesItemNo, - itemDesc: row.itemDesc, - textValue: row.textValue, - numValue: row.numValue, - recordType: 'B' - } - this.availableValueList = row.availableValueList - if (row.valueChooseFlag === 'Y') { - this.itemChooseFlag = true - } else { - this.itemChooseFlag = false - } - this.itemTextDisableFlag = true - this.itemNumberDisableFlag = true - if (row.valueTypeDb !== 'T') { - this.itemNumberDisableFlag = false - } else { - this.itemTextDisableFlag = false - } - this.itemModalDisableFlag = true - this.itemModalFlag = true - }, - /** - * 编辑属性值方法 - * @returns {boolean} - */ - itemSaveData () { - if(this.itemData.partNo === '' || this.itemData.partNo == null){ - this.$message.warning('未选择物料!') - return false - } - if(this.itemData.propertiesItemNo === ''|| this.itemData.propertiesItemNo == null){ - this.$message.warning('未选择属性!') - return false - } - savePartItemValue(this.itemData).then(({data}) => { - if (data && data.code === 0) { - this.itemModalFlag = false - this.getPartItem() - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - }, + + // /** + // * 编辑属性值方法 + // * @returns {boolean} + // */ + // itemSaveData () { + // if(this.itemData.partNo === '' || this.itemData.partNo == null){ + // this.$message.warning('未选择物料!') + // return false + // } + // if(this.itemData.propertiesItemNo === ''|| this.itemData.propertiesItemNo == null){ + // this.$message.warning('未选择属性!') + // return false + // } + // savePartItemValue(this.itemData).then(({data}) => { + // if (data && data.code === 0) { + // this.itemModalFlag = false + // this.getPartItem() + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => {} + // }) + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + // }, // ======== 附件的相关方法 ======== /** @@ -2913,6 +3978,24 @@ strVal = this.modalData.manufacturerId } else if (val === 20) { strVal = this.modalData.codeNo + } else if (val === 123) { + strVal = this.modalData.hazardCode + } else if (val === 124) { + strVal = this.modalData.assetClass + } else if (val === 125) { + strVal = this.modalData.partStatus + } else if (val === 126) { + strVal = this.modalData.abcClass + } else if (val === 127) { + strVal = this.modalData.isoCountry + } else if (val === 128) { + strVal = this.modalData.regionOfOrigin + } else if (val === 129) { + strVal = this.modalData.customsStarNo + } else if (val === 131) { + strVal = this.modalData.partCostGroupID + } else if (val === 132) { + strVal = this.modalData.planningMethod } this.$refs.baseList.init(val, strVal) }) @@ -2947,17 +4030,49 @@ this.modalData.manufacturerId = val.manufacturer_id this.modalData.manufacturerName = val.manufacturer_name } else if (this.tagNo === 20) { - if (val.Code_no != this.tempCodeNo) { - this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.modalData.codeNo = val.Code_no - this.$set(this.modalData, 'codeDesc', val.Code_desc) - }).catch(() => { - }) + if (this.modalData.flag === '2') { + if (val.Code_no != this.tempCodeNo) { + this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.modalData.codeNo = val.Code_no + this.$set(this.modalData, 'codeDesc', val.Code_desc) + }).catch(() => { + }) + } + } else { + this.modalData.codeNo = val.Code_no + this.$set(this.modalData, 'codeDesc', val.Code_desc) } + } else if (this.tagNo === 123) { + this.modalData.hazardCode = val.hazard_code + this.modalData.hazardDesc = val.hazard_desc + } else if (this.tagNo === 124) { + this.modalData.assetClass = val.asset_class + this.modalData.assetClassDesc = val.asset_class_desc + } else if (this.tagNo === 125) { + this.modalData.partStatus = val.part_status + this.modalData.partStatusDesc = val.part_status_desc + } else if (this.tagNo === 126) { + this.modalData.abcClass = val.abc_class + this.modalData.abcClassDesc = val.abc_class_desc + } else if (this.tagNo === 127) { + this.modalData.isoCountry = val.iso_country + this.modalData.isoCountryDesc = val.iso_country_desc + } else if (this.tagNo === 128) { + this.modalData.regionOfOrigin = val.region_of_origin + this.modalData.regionOfOriginDesc = val.region_of_origin_desc + } else if (this.tagNo === 129) { + this.modalData.customsStarNo = val.customs_star_no + this.modalData.customsStarDesc = val.customs_star_desc + } else if (this.tagNo === 131) { + this.modalData.partCostGroupID = val.part_cost_group_id + this.modalData.partCostGroupDesc = val.part_cost_group_desc + } else if (this.tagNo === 132) { + this.modalData.planningMethod = val.planning_method + this.modalData.planningMethodDesc = val.planning_method_desc } }, @@ -3006,5 +4121,14 @@ .numInput /deep/ .el-input__inner{ text-align: right; } +/deep/ .inlineNumber input::-webkit-outer-spin-button, +/deep/ .inlineNumber input::-webkit-inner-spin-button { + -webkit-appearance: none; + +} +/deep/ .inlineNumber input[type="number"]{ + -moz-appearance: textfield; + padding-right: 5px !important; +} diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index 5ce07f8..37ef3fe 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -140,7 +140,7 @@
- + @@ -167,11 +167,6 @@ - - - - - @@ -181,8 +176,52 @@
+ + + + + 新增 + 删除 + + + + + + + + + + + + - + @@ -309,8 +348,8 @@ - - + + @@ -369,15 +408,15 @@ - + - + - + @@ -389,18 +428,18 @@ - + - + - + - + @@ -432,6 +471,52 @@ + + + + + + + {{ i.alternativeNo }} + {{ i.alternativeDescription }} + + + + + + + + + + 工序 + 工序 + + + + + + + 工具 + 工具 + + + + + + + + + + + 保存 + 关闭 + + + @@ -439,24 +524,30 @@ + + + + + + + + + + + + diff --git a/src/views/modules/part/routingWorkGuidelines.vue b/src/views/modules/part/routingWorkGuidelines.vue new file mode 100644 index 0000000..033a642 --- /dev/null +++ b/src/views/modules/part/routingWorkGuidelines.vue @@ -0,0 +1,617 @@ + + + + + + + + + + + + + + +