diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js index 882b094..177c001 100644 --- a/src/api/part/bomManagement.js +++ b/src/api/part/bomManagement.js @@ -70,6 +70,13 @@ export const bomDetailUpdate = data => createAPI(`/plm/bomManagement/bomDetailUp */ export const bomDetailDelete = data => createAPI(`/plm/bomManagement/bomDetailDelete`,'post',data) +/** + * 修改明细状态 + * @param data + * @returns {*} + */ +export const updateAlternativeStatus = data => createAPI(`/plm/bomManagement/updateAlternativeStatus`,'post',data) + /** * 新增bom主信息 * @param data @@ -105,5 +112,12 @@ export const updateBomComponent = data => createAPI(`/plm/bomManagement/updateBo */ export const deleteBomComponent = data => createAPI(`/plm/bomManagement/deleteBomComponent`,'post',data) +/** + * 根据物料编码查询工序 + * @param data + * @returns {*} + */ +export const queryOperationList = data => createAPI(`/plm/bomManagement/queryOperationList`,'post',data) + diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js index 1dab74b..0efa9b2 100644 --- a/src/api/part/partInformation.js +++ b/src/api/part/partInformation.js @@ -53,6 +53,34 @@ export const getAgentList = data => createAPI(`/plm/partInformation/getAgentList */ export const getPartAgent = data => createAPI(`/plm/partInformation/getPartAgent`,'post',data) +/** + * 新增物料代理商 + * @param data + * @returns {*} + */ +export const addPartAgent = data => createAPI(`/plm/partInformation/addPartAgent`,'post',data) + +/** + * 删除物料代理商 + * @param data + * @returns {*} + */ +export const deletePartAgent = data => createAPI(`/plm/partInformation/deletePartAgent`,'post',data) + +/** + * 根据条件查询可选代理商 + * @param data + * @returns {*} + */ +export const getAgentListBy = data => createAPI(`/plm/partInformation/getAgentListBy`,'post',data) + +/** + * 删除物料代理商 + * @param data + * @returns {*} + */ +export const deleteAgent = data => createAPI(`/plm/partInformation/deleteAgent`,'post',data) + /** * 查询材料信息 diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js index 28fefac..5b0a9bc 100644 --- a/src/api/part/routingManagement.js +++ b/src/api/part/routingManagement.js @@ -63,6 +63,13 @@ export const routingDetailSave = data => createAPI(`/plm/routingManagement/routi */ export const routingDetailUpdate = data => createAPI(`/plm/routingManagement/routingDetailUpdate`,'post',data) +/** + * 修改明细状态 + * @param data + * @returns {*} + */ +export const updateAlternativeStatus = data => createAPI(`/plm/routingManagement/updateAlternativeStatus`,'post',data) + /** * routing明细删除 * @param data diff --git a/src/api/test/testInformation.js b/src/api/test/testInformation.js new file mode 100644 index 0000000..603b65d --- /dev/null +++ b/src/api/test/testInformation.js @@ -0,0 +1,99 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +/** + * 测试信息列表查询 + * @param data + * @returns {*} + */ +export const testInformationSearch = data => createAPI(`/plm/testInformation/testInformationSearch`,'post',data) +/** + * 测试信息新增 + * @param data + * @returns {*} + */ +export const testInformationSave = data => createAPI(`/plm/testInformation/testInformationSave`,'post',data) +/** + * 测试信息编辑 + * @param data + * @returns {*} + */ +export const testInformationEdit = data => createAPI(`/plm/testInformation/testInformationEdit`,'post',data) +/** + * 测试信息删除 + * @param data + * @returns {*} + */ +export const testInformationDelete = data => createAPI(`/plm/testInformation/testInformationDelete`,'post',data) +/** + * 获取产品列表 + * @param data + * @returns {*} + */ +export const getProjectPartList = data => createAPI(`/plm/testInformation/getProjectPartList`,'post',data) +/** + * 获取测试结果对象 + * @param data + * @returns {*} + */ +export const testResultSearch = data => createAPI(`/plm/testInformation/testResultSearch`,'post',data) +/** + * 检查测试进度 + * @param data + * @returns {*} + */ +export const checkTestStatus = data => createAPI(`/plm/testInformation/checkTestStatus`,'post',data) +/** + * 获取测试单附件列表 + * @param data + * @returns {*} + */ +export const getFileContentList = data => createAPI(`/plm/testInformation/getFileContentList`,'post',data) +/** + * 文件删除 + * @param data + * @returns {*} + */ +export const deleteTestFile = data => createAPI(`/plm/testInformation/deleteTestFile`,'post',data) +/** + * 保存测试结果 + * @param data + * @returns {*} + */ +export const saveTestResult = data => createAPI(`/plm/testInformation/saveTestResult`,'post',data) +/** + * 保存送样结果 + * @param data + * @returns {*} + */ +export const saveSubmitResult = data => createAPI(`/plm/testInformation/saveSubmitResult`,'post',data) +/** + * 保存客户回复 + * @param data + * @returns {*} + */ +export const saveCustomerResponse = data => createAPI(`/plm/testInformation/saveCustomerResponse`,'post',data) +/** + * 获取项目信息 + * @param data + * @returns {*} + */ +export const getProjectInformation = data => createAPI(`/plm/testInformation/getProjectInformation`,'post',data) +/** + * 获取客户信息 + * @param data + * @returns {*} + */ +export const getCustomerInformation = data => createAPI(`/plm/testInformation/getCustomerInformation`,'post',data) +/** + * 关闭模态框删除文件 + * @param data + * @returns {*} + */ +export const closeModalDeleteFile = data => createAPI(`/plm/testInformation/closeModalDeleteFile`,'post',data) +/** + * 批量文件删除 + * @param data + * @returns {*} + */ +export const batchDeleteTestFile = data => createAPI(`/plm/testInformation/batchDeleteTestFile`,'post',data) + diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 8eda0b4..efea22f 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -97,7 +97,7 @@ - + @@ -121,7 +121,7 @@ :editable=false> - + - + @@ -154,6 +154,8 @@ 新增 删除 编辑 + Buildable + Obsolete @@ -171,11 +173,12 @@ - - - - - + + + + + + @@ -242,7 +245,7 @@ - + @@ -253,11 +256,7 @@ - - - - - + @@ -378,10 +377,13 @@ - + + + + - + @@ -394,7 +396,7 @@ - 工序 + 工序 @@ -413,6 +415,45 @@ + + +
+ + + + + + 查询 + + + + + + + +
+ + 关闭 + +
+ @@ -430,11 +471,13 @@ import { bomDetailSave, // bom明细新增 bomDetailUpdate, // bom明细编辑 bomDetailDelete, // bom明细删除 + updateAlternativeStatus, // 修改明细状态 queryPartList, // 查询物料清单 queryBomComponent, // 查询bom子明细 saveBomComponent, // 新增bom子明细 updateBomComponent, // 修改bom子明细 deleteBomComponent, // 删除bom子明细 + queryOperationList, // 根据物料编码查询工序 } from '@/api/part/bomManagement.js' import ChooseList from '@/views/modules/common/Chooselist' import dayjs from "dayjs"; @@ -545,7 +588,6 @@ export default { issueType: '', shrinkageFactor: '', lineItemNo: '', - operationNo: '', operationName: '', issueToLoc: '', issueToLocName: '', @@ -553,7 +595,8 @@ export default { createDate: '', createBy: '', updateDate: '', - updateBy: '' + updateBy: '', + lineSequence: '' }, partData: { site: this.$store.state.user.site, @@ -582,6 +625,11 @@ export default { updateDate: '', updateBy: '' }, + operationData: { + site: this.$store.state.user.site, + partNo: '', + operationName: '', + }, // ======== 数据列表 ======== dataList: [], partList: [], @@ -590,6 +638,7 @@ export default { subDetailList: [], detailDataList: [], checkedDetail: [], + operationList: [], // ======== 列表表头 ======== columnList: [ { @@ -862,6 +911,24 @@ export default { } ], columnSubDetailList: [ + { + userId: this.$store.state.user.name, + functionId: 104002, + serialNumber: '104002Table2LineSequence', + tableId: '104002Table2', + tableName: 'BOM子物料表', + columnProp: 'lineSequence', + headerAlign: 'center', + align: 'center', + columnLabel: '排序', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 60 + }, { userId: this.$store.state.user.name, functionId: 104002, @@ -994,9 +1061,9 @@ export default { serialNumber: '104002Table2OperationDesc', tableId: '104002Table2', tableName: 'BOM子物料表', - columnProp: 'operationNo', + columnProp: 'operationName', headerAlign: 'center', - align: 'left', + align: 'center', columnLabel: '工序', columnHidden: false, columnImage: false, @@ -1030,7 +1097,7 @@ export default { serialNumber: '104002Table2NoteText', tableId: '104002Table2', tableName: 'BOM子物料表', - columnProp: 'componentNoteText', + columnProp: 'noteText', headerAlign: 'center', align: 'left', columnLabel: '备注', @@ -1043,6 +1110,20 @@ export default { columnWidth: 150 }, ], + operationDetailList: [ + { + columnProp: 'operationName', + headerAlign: "center", + align: "center", + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + } + ], // ======== 必填规则 ======== rules: { partNo: [ @@ -1073,13 +1154,6 @@ export default { trigger: 'change' } ], - effPhaseOutDate: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], engChgLevel: [ { required: true, @@ -1172,7 +1246,8 @@ export default { saveDetailModalFlag :false, saveDetailModalDisable: false, componentSaveModal: false, - componentDisableFlag: false + componentDisableFlag: false, + operationModelFlag: false, } }, mounted () { @@ -1287,7 +1362,7 @@ export default { partNo: '', partDesc: '', engChgLevel: '', - bomType: 'manufacturing', + bomType: 'Manufacturing', noteText: '', effPhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''), effPhaseOutDate: '', @@ -1306,11 +1381,11 @@ export default { minLotQty: '', defaultFlag: '', detailNoteText: '', - status: 'Tentative', + status: '', createDate: '', - createBy: '', + createBy: this.$store.state.user.name, updateDate: '', - updateBy: '' + updateBy: this.$store.state.user.name } this.subDetailList = [] this.modalDisableFlag = false @@ -1471,12 +1546,12 @@ export default { issueType: '', shrinkageFactor: 0, lineItemNo: '', - operationNo: '', operationName: '', issueToLoc: '', issueToLocName: '', noteText: '', createBy: this.$store.state.user.name, + lineSequence: '' } this.componentDisableFlag = false this.componentSaveModal = true @@ -1505,12 +1580,12 @@ export default { issueType: row.issueType, shrinkageFactor: row.shrinkageFactor, lineItemNo: row.lineItemNo, - operationNo: row.operationNo, operationName: row.operationName, issueToLoc: row.issueToLoc, issueToLocName: row.issueToLocName, noteText: row.noteText, updateBy: this.$store.state.user.name, + lineSequence: row.lineSequence } this.componentDisableFlag = true this.componentSaveModal = true @@ -1538,10 +1613,10 @@ export default { this.$message.warning('请选择开始时间!') return } - if (this.modalData.effPhaseOutDate === '' || this.modalData.effPhaseOutDate == null) { - this.$message.warning('请选择结束时间!') - return - } + // if (this.modalData.effPhaseOutDate === '' || this.modalData.effPhaseOutDate == null) { + // this.$message.warning('请选择结束时间!') + // return + // } if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) { this.$message.warning('请填写BOM版本号!') return @@ -1749,6 +1824,14 @@ export default { this.modalData.partDesc = row.partDesc this.partModelFlag = false }, + /** + * 双击选中工序 + * @param row + */ + getRowOperationData (row) { + this.componentData.operationName = row.operationName + this.operationModelFlag = false + }, getComponentRowData (row) { this.componentData.componentPart = row.partNo this.componentData.componentPartDesc = row.partDesc @@ -1867,22 +1950,30 @@ export default { this.$message.warning('请选择子物料编码!') return } - if (this.componentData.componentPartDesc === '' || this.componentData.componentPartDesc == null) { - this.$message.warning('请选择子物料名称!') - return - } if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) { this.$message.warning('请填写单位用量!') return } + if (this.componentData.qtyPerAssembly === 0) { + this.$message.warning('单位用量不能为0!') + return + } if (this.componentData.componentScrap === '' || this.componentData.componentScrap == null) { this.$message.warning('请填写调机量!') return } + if (this.componentData.componentScrap === 0) { + this.$message.warning('调机量不能为0!') + return + } if (this.componentData.shrinkageFactor === '' || this.componentData.shrinkageFactor == null) { this.$message.warning('请填写损耗率!') return } + if (this.componentData.shrinkageFactor === 0) { + this.$message.warning('损耗率不能为0!') + return + } if (this.componentData.issueType === '' || this.componentData.issueType == null) { this.$message.warning('请选择生产属性!') return @@ -2111,14 +2202,73 @@ export default { }).catch(() => { }) }, + /** + * 修改替代状态为 Buildable + */ + updateStatusToBuildable () { + this.$confirm(`是否修改状态为Buildable?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + updateAlternativeStatus(this.detailData).then(({data}) => { + if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList + this.detailData = data.rows.detailData + this.subDetailList = data.rows.subDetailList + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', {confirmButtonText: '确定'}) + // 刷新替代和子明细 + this.alternativeChange() + } + }) + }).catch(() => { + }) + }, + /** + * 修改替代状态为 Obsolete + */ + updateStatusToObsolete () { + this.$confirm(`是否修改状态为Obsolete?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + updateAlternativeStatus(this.detailData).then(({data}) => { + if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList + this.detailData = data.rows.detailData + this.subDetailList = data.rows.subDetailList + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', {confirmButtonText: '确定'}) + // 刷新替代和子明细 + this.alternativeChange() + } + }) + }).catch(() => { + }) + }, /** * 替代改变事件 */ alternativeChange () { queryBomComponent(this.detailData).then(({data}) => { if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList this.detailData = data.rows.detailData - this.subDetailList = data.rows.componentList + this.subDetailList = data.rows.subDetailList } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -2149,6 +2299,7 @@ export default { } }, handleInputB (value) { + // 0-100 const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/ if (reg.test(value) === true) { this.componentData.shrinkageFactor = value @@ -2158,6 +2309,38 @@ export default { this.componentData.shrinkageFactor = 0 } }, + // handleInputC (value, type) { + // // 正整数 + // // let val = value.replace(/^\+?[1-9][0-9]*$/,'$1') + // // if (val === null || val === undefined || val === '') { + // // val = 1 + // // } + // // if (type === 1) { + // // this.modalData.engChgLevel = val + // // } + // const reg = /^\+?[1-9][0-9]*$/ + // if (reg.test(value) === true) { + // this.modalData.engChgLevel = value + // } + // + // }, + /** + * 根据物料编码查询工序 + */ + queryOperationList () { + this.operationData.partNo = this.modalData.partNo + // 查询所有检验模板 + queryOperationList(this.operationData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + this.operationModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, // ======== chooseList相关方法 ======== /** diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index b11a3cd..317f994 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -117,12 +117,12 @@ + + + - - - @@ -180,25 +180,17 @@ - - 代理商 - - + + + + - - + - + 保存 关闭 @@ -243,11 +235,15 @@ + + + 新增 + + - - - - - - - - - - + + + @@ -349,9 +345,63 @@ - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -363,42 +413,86 @@ 查询 - - - - - - -
+ + + 可选代理商: + + + + + + + + + + +
+ 添加>> +
+
+ 删除<< +
+
+ + 已有代理商: + + + + + + + + + +
- 确认 关闭
@@ -421,6 +515,10 @@ savePartItemValue, // 编辑属性值 getAgentList, // 获取代理商列表 getPartAgent, // 获取材料代理商 + getAgentListBy, // 根据条件查询可选代理商 + addPartAgent, // 新增物料代理商 + deletePartAgent, // 删除物料代理商 + deleteAgent // 删除物料代理商(单删) } from '@/api/part/partInformation.js' import { getFileContentList, // 获取材料单附件列表 @@ -445,7 +543,7 @@ modalData: { deep: true, handler: function (newV, oldV) { - this.modalData.partNo = this.modalData.umId.toUpperCase() + this.modalData.partNo = this.modalData.partNo.toUpperCase() this.modalData.erpPartNo = this.modalData.erpPartNo.toUpperCase() } } @@ -544,6 +642,10 @@ availableValueList:[], agentList: [], agentSelections: [], + agentSelections1: [], + agentSelections2: [], + agentList1: [], + agentList2: [], // ======== 列表表头 ======== columnList: [ { @@ -564,24 +666,24 @@ 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, + // 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, @@ -1218,6 +1320,13 @@ ], // ======== 必填规则 ======== rules: { + partNo: [ + { + required: true, + message: ' ', + trigger: 'change' + } + ], partDesc: [ { required: true, @@ -1396,7 +1505,7 @@ let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, - agentId: this.partCurrentRow.agentId + //agentId: this.partCurrentRow.agentId } getPartAgent(tempData).then(({data}) => { if (data && data.code === 0) { @@ -1527,21 +1636,21 @@ * 选择代理商 */ getAgentList () { - // 先清空缓存选中 - this.$nextTick(() => this.$refs.agentTable.clearSelection()) - // 拿到选中的代理商id - let tempDataList = this.modalData.agentId.split(';') + // // 先清空缓存选中 + // this.$nextTick(() => this.$refs.agentTable.clearSelection()) + // // 拿到选中的代理商id + // let tempDataList = this.modalData.agentId.split(';') // 查询所有代理商 - getAgentList(this.agentData).then(({data}) => { + getAgentListBy(this.agentData).then(({data}) => { if (data && data.code === 0) { - this.agentList = data.rows - this.agentList.forEach(val => { - // 回显选中的代理商 - if (tempDataList.includes(val.agentId)) { - this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true)) - } - }) - this.agentModelFlag = true + this.agentList1 = data.rows + // this.agentList.forEach(val => { + // // 回显选中的代理商 + // if (tempDataList.includes(val.agentId)) { + // this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true)) + // } + // }) + // this.agentModelFlag = true } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1570,7 +1679,7 @@ */ getRowKeys (row) { // 唯一值,一般都为id - return row.agentId; + return row.agentId }, /** * 确认多选代理商 @@ -1588,11 +1697,123 @@ this.agentModelFlag = false }, + savePartAgent () { + this.agentSelections1 = null + this.agentSelections2 = null + getAgentList(this.partCurrentRow).then(({data}) => { + this.agentList1 = data.row1 + this.agentList2 = data.row2 + }) + this.agentData = { + site: this.$store.state.user.site, + agentId: '', + agentName: '', + } + this.agentModelFlag = true + }, + // 可选代理商 + agentClickRow1 (row) { + this.$refs.agentTable1.toggleRowSelection(row); + }, + // 已有代理商 + agentClickRow2 (row) { + this.$refs.agentTable2.toggleRowSelection(row); + }, + selectionAgent1 (val) { + this.agentSelections1 = val + }, + selectionAgent2 (val) { + this.agentSelections2 = val + }, + // 添加代理商 + addAgent () { + if(this.agentSelections1 == null || this.agentSelections1.length === 0){ + this.$message.warning('请选择可选代理商!') + return + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + agentList: this.agentSelections1 + } + addPartAgent(inData).then(({data}) => { + if (data && data.code === 0) { + getAgentList(this.partCurrentRow).then(({data}) => { + this.agentList1 = data.row1 + this.agentList2 = data.row2 + }) + this.agentSelections1 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 删除物料代理商 + deleteAgent () { + if(this.agentSelections2 == null || this.agentSelections2.length === 0){ + this.$message.warning('请选择已有代理商!') + return + } + let inData = { + site: this.$store.state.user.site, + partNo: this.partCurrentRow.partNo, + agentList: this.agentSelections2 + } + deletePartAgent(inData).then(({data}) => { + if (data && data.code === 0) { + getAgentList(this.partCurrentRow).then(({data}) => { + this.agentList1 = data.row1 + this.agentList2 = data.row2 + }) + this.agentSelections2 = [] + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 单删 + deleteAgent2 (row) { + this.$confirm(`是否删除该代理商?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteAgent(row).then(({data}) => { + if (data && data.code === 0) { + this.getPartAgent() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + // 关闭后刷新列表 + refreshDetailList(){ + this.getPartAgent() + }, + // ======== 新增/编辑/删除方法 ======== /** * 材料信息新增/编辑 */ saveData () { + if (this.modalData.partNo === '' || this.modalData.partNo == null) { + this.$message.warning('请填写材料编码!') + return + } if (this.modalData.partDesc === '' || this.modalData.partDesc == null) { this.$message.warning('请填写材料描述!') return @@ -1625,10 +1846,10 @@ this.$message.warning('请选择是否在用!') return } - if (this.modalData.agentId === '' || this.modalData.agentId == null) { - this.$message.warning('请选择代理商!') - return - } + // if (this.modalData.agentId === '' || this.modalData.agentId == null) { + // this.$message.warning('请选择代理商!') + // return + // } if (this.modalData.flag === '1') { partInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index ad13d03..ea625be 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -97,7 +97,7 @@ - + @@ -112,7 +112,7 @@ :editable=false> - + - + 保存 @@ -136,12 +136,14 @@ - + 新增 删除 编辑 + Buildable + Obsolete @@ -159,11 +161,12 @@ - - - - - + + + + + + @@ -175,7 +178,7 @@ - + 新增 @@ -227,7 +230,7 @@ - + @@ -236,16 +239,17 @@ - - - - - + + + + + + - + @@ -358,36 +362,39 @@ - - - + + + - - + + + + + + - - 调机时的人员等级 - + + - - + + - - + + - - + + @@ -395,25 +402,22 @@ 人员等级 - - + + 调机时的人员等级 + - - - - - - - - - + + + + + - + @@ -438,6 +442,7 @@ import { queryRoutingDetail, // 查routing明细 routingDetailSave, // routing明细新增 routingDetailUpdate, // routing明细编辑 + updateAlternativeStatus, // 修改明细状态 routingDetailDelete, // routing明细删除 queryPartList, // 查询物料清单 queryRoutingComponent, // 查询routing子明细 @@ -1092,7 +1097,7 @@ export default { serialNumber: '104003Table2NoteText', tableId: '104003Table2', tableName: 'Routing工序表', - columnProp: 'componentNoteText', + columnProp: 'noteText', headerAlign: 'center', align: 'left', columnLabel: '备注', @@ -1135,13 +1140,6 @@ export default { trigger: 'change' } ], - phaseOutDate: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], routingRevision: [ { required: true, @@ -1321,7 +1319,7 @@ export default { partNo: '', partDesc: '', routingRevision: '', - routingType: '', + routingType: 'Manufacturing', noteText: '', phaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''), phaseOutDate: '', @@ -1344,7 +1342,7 @@ export default { forLotByDay: '', minLotQty: '', detailNoteText: '', - status: 'Tentative', + status: '', createBy: this.$store.state.user.name } this.subDetailList = [] @@ -1520,7 +1518,7 @@ export default { runTimeCode: '', laborRunFactor: 100, laborSetupTime: '', - crewSize: '', + crewSize: 1, setupCrewSize: 1, outsideOpItem: '', machineNo: '', @@ -1601,10 +1599,10 @@ export default { this.$message.warning('请选择开始时间!') return } - if (this.modalData.phaseOutDate === '' || this.modalData.phaseOutDate == null) { - this.$message.warning('请选择结束时间!') - return - } + // if (this.modalData.phaseOutDate === '' || this.modalData.phaseOutDate == null) { + // this.$message.warning('请选择结束时间!') + // return + // } if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { this.$message.warning('请填写Routing版本号!') return @@ -2143,14 +2141,73 @@ export default { }).catch(() => { }) }, + /** + * 修改替代状态为 Buildable + */ + updateStatusToBuildable () { + this.$confirm(`是否修改状态为Buildable?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + updateAlternativeStatus(this.detailData).then(({data}) => { + if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList + this.detailData = data.rows.detailData + this.subDetailList = data.rows.subDetailList + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', {confirmButtonText: '确定'}) + // 刷新替代和子明细 + this.alternativeChange() + } + }) + }).catch(() => { + }) + }, + /** + * 修改替代状态为 Obsolete + */ + updateStatusToObsolete () { + this.$confirm(`是否修改状态为Obsolete?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + updateAlternativeStatus(this.detailData).then(({data}) => { + if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList + this.detailData = data.rows.detailData + this.subDetailList = data.rows.subDetailList + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', {confirmButtonText: '确定'}) + // 刷新替代和子明细 + this.alternativeChange() + } + }) + }).catch(() => { + }) + }, /** * 替代改变事件 */ alternativeChange () { queryRoutingComponent(this.detailData).then(({data}) => { if (data && data.code === 0) { + this.detailDataList = data.rows.detailDataList this.detailData = data.rows.detailData - this.subDetailList = data.rows.componentList + this.subDetailList = data.rows.subDetailList } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue index 05bd093..3113c85 100644 --- a/src/views/modules/proofing/requestForProofing.vue +++ b/src/views/modules/proofing/requestForProofing.vue @@ -148,27 +148,27 @@ 客户 - + 跟单员 - + 项目 - + 工程师 - + 项目物料 - + diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index e3eef80..df4d424 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -148,27 +148,27 @@ 客户 - + 跟单员 - + 项目 - + 报价专员 - + 项目物料 - + diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue new file mode 100644 index 0000000..7ced838 --- /dev/null +++ b/src/views/modules/test/requestForTest.vue @@ -0,0 +1,2481 @@ + + + + + + diff --git a/src/views/modules/test/test_upload_file.vue b/src/views/modules/test/test_upload_file.vue new file mode 100644 index 0000000..ec4f111 --- /dev/null +++ b/src/views/modules/test/test_upload_file.vue @@ -0,0 +1,136 @@ + + + +