diff --git a/src/api/processManagement/processManagement.js b/src/api/processManagement/processManagement.js index 3a0d090..9c2180d 100644 --- a/src/api/processManagement/processManagement.js +++ b/src/api/processManagement/processManagement.js @@ -84,5 +84,12 @@ export const getAuthorityFieldList = data => createAPI(`/plm/request/getAuthorit */ export const saveAuthorityList = data => createAPI(`/plm/request/saveAuthorityList`,'post',data) +/** + * 修改节点 + * @param data + * @returns {*} + */ +export const editNodeInfo = data => createAPI(`/plm/request/editNodeInfo`,'post',data) + diff --git a/src/api/quotation/quotationInformation.js b/src/api/quotation/quotationInformation.js index 7ca3c83..b8a38c1 100644 --- a/src/api/quotation/quotationInformation.js +++ b/src/api/quotation/quotationInformation.js @@ -121,3 +121,9 @@ export const closeModalDeleteFile = data => createAPI(`/plm/quotationInformation * @returns {*} */ export const searchQuotationByQuotationNo = data => createAPI(`/plm/quotationInformation/searchQuotationByQuotationNo`,'post',data) +/** + * 提交 + * @param data + * @returns {*} + */ +export const submitChange = data => createAPI(`/plm/quotationInformation/submitChange`,'post',data) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 3792112..5bb87ab 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -269,7 +269,9 @@ 保存 关闭 - 提交 + 同意 + 驳回 + @@ -364,7 +366,8 @@ 保存 关闭 - 提交 + 同意 + 驳回 @@ -512,7 +515,8 @@ 保存 关闭 - 提交 + 同意 + 驳回 @@ -564,7 +568,8 @@ 保存 关闭 - 提交 + 同意 + 驳回 @@ -1001,6 +1006,7 @@ searchData: { site: this.$store.state.user.site, changeNo: '', + menuId: this.$route.meta.menuId, page: 1, limit: 10 }, @@ -1055,7 +1061,8 @@ nodeConclusion: '', stepId: '', rejectFlag: '', - rejectStepId: '' + rejectStepId: '', + isReject: '' }, costImpactData: { site: this.$store.state.user.site, @@ -2353,7 +2360,8 @@ nodeConclusion: '', stepId: row.stepId, rejectFlag: row.rejectFlag, - rejectStepId: row.rejectStepId + rejectStepId: row.rejectStepId, + isReject: row.isReject } this.changeTitle = '变更申请-' + this.modalData.changeNo // 查选择的ECN种类 @@ -2403,17 +2411,41 @@ this.submitModalFlag = true }, - // 提交 - submitData () { - if (this.modalData.nodeConclusion == null || this.modalData.nodeConclusion === '') { - this.$message.warning('请选择节点结论!') - return - } + // 同意提交 + agreeSubmit () { this.$confirm(`是否确认提交?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { + this.modalData.nodeConclusion = 'Y' + this.submitData() + }) + }, + + // 驳回提交 + rejectSubmit () { + this.$confirm(`是否确认驳回?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.modalData.nodeConclusion = 'N' + this.submitData() + }) + }, + + // 提交 + submitData () { + // if (this.modalData.nodeConclusion == null || this.modalData.nodeConclusion === '') { + // this.$message.warning('请选择节点结论!') + // return + // } + // this.$confirm(`是否确认提交?`, '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { let tempData = { site: this.modalData.site, userName: this.$store.state.user.name, @@ -2433,7 +2465,7 @@ }) } }) - }) + // }) }, // 获取选择的ECN种类 diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue index e3adaf7..59c3ac0 100644 --- a/src/views/modules/processManagement/processBindingInfo.vue +++ b/src/views/modules/processManagement/processBindingInfo.vue @@ -171,9 +171,10 @@ fixed="right" header-align="center" align="center" - width="130" + width="160" label="操作"> @@ -279,11 +280,6 @@ :value = "i.tableId"> - - - - - + + +
@@ -321,6 +326,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + +
@@ -340,6 +383,7 @@ getFieldList, // 获取表字段 getAuthorityFieldList, // 获取权限字段集合 saveAuthorityList, // 保存节点权限 + editNodeInfo, // 修改节点 } from '@/api/processManagement/processManagement.js' import Chooselist from '@/views/modules/common/Chooselist' import DictDataSelect from '../sys/dict-data-select.vue' @@ -413,6 +457,22 @@ fieldList: [], createBy: '', }, + queryTableParam: { + tableType: '', + passTable: [], + addTable: [] + }, + nodeInfo: { + site: '', + bu: '', + classificationNo: '', + workflowId: '', + workflowname: '', + nodeId: '', + nodeName: '', + seqNo: '', + isReject: '' + }, // ======== 数据列表 ======== dataList: [], checkedDetail: [], @@ -693,7 +753,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 90, + columnWidth: 60, }, { userId: this.$store.state.user.name, @@ -729,7 +789,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 90, + columnWidth: 60, }, { userId: this.$store.state.user.name, @@ -765,7 +825,25 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 60, + }, + { + userId: this.$store.state.user.name, + functionId: 109001, + serialNumber: '109001Table2IsReject', + tableId: "109001Table2", + tableName: "节点信息表", + columnProp: 'isRejectDesc', + headerAlign: "center", + align: "center", + columnLabel: '是否可驳回', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 60, }, /*{ userId: this.$store.state.user.name, @@ -787,6 +865,7 @@ },*/ ], + // ======== 必填规则 ======== rules: { classificationName: [ @@ -827,7 +906,9 @@ subDetailFlag: false, maintenanceFlag: false, modalFlag: false, - authorityFlag: false + authorityFlag: false, + nodeModalFlag: false, + nodeModalDisableFlag: false } }, @@ -845,10 +926,59 @@ }, methods: { + // rowStyle2 ({row}) { + // if (!this.authoritySelections.includes(row)) { + // row.required = 'N' + // return{ 'background-color': '#FFF', cursor: 'pointer' } + // } + // return{ 'background-color': '#FFF', cursor: 'pointer' } + // }, + + // 编辑模态框 + editNodeModal (row) { + this.nodeInfo = { + site: row.site, + bu: row.bu, + classificationNo: row.classificationNo, + workflowId: row.workflowId, + workflowname: row.workflowname, + nodeId: row.nodeId, + nodeName: row.nodeName, + seqNo: row.seqNo, + isReject: row.isReject + } + this.nodeModalFlag = true + this.nodeModalDisableFlag = true + }, + + // 修改节点信息 + editNodeInfo () { + if (this.nodeInfo.isReject === '' || this.nodeInfo.isReject == null) { + this.$message.warning('请选择节点是否可驳回!') + return false + } + editNodeInfo(this.nodeInfo).then(({data}) => { + if (data && data.code === 0) { + this.getNodeInfoByWorkFlowSearch() + this.nodeModalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, // 点击行选中复选框 authorityClickRow (row) { - this.$refs.authorityTable.toggleRowSelection(row) + //this.$refs.authorityTable.toggleRowSelection(row) }, // 多选 @@ -956,15 +1086,8 @@ }, // 获取Table列表 - getTableList (type) { - let tempData = { - tableType: type, - passTable: [ - 'plm_change_ecn_type_detail', - 'plm_change_ecn_type_header' - ] - } - getTableList(tempData).then(({data}) => { + getTableList () { + getTableList(this.queryTableParam).then(({data}) => { if (data && data.code === 0) { this.tableList = data.rows } else { @@ -1033,11 +1156,25 @@ this.requestCurrentRow = JSON.parse(JSON.stringify(row)) // 刷新当前页表 this.refreshCurrentTabTable() - this.tableList = [] this.fieldList = [] - if (row.menuId === '108002') { - this.getTableList('plm_change') + if (row.menuId === '108002') { // 变更 + this.queryTableParam = { + tableType: 'plm_change', + passTable: [ + 'plm_change_ecn_type_detail', + 'plm_change_ecn_type_header' + ], + addTable: [] + } + this.getTableList() + } else if (row.menuId === '102001') { // 询价 + this.queryTableParam = { + tableType: 'plm_quotation', + passTable: [], + addTable: [] + } + this.getTableList() } } }, diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index bca3fe0..6bbf40a 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -361,6 +361,8 @@ 保存 关闭 + 同意 + 驳回 @@ -1002,10 +1004,14 @@ import { getProjectInformation, // 获取项目信息 getCustomerInformation, // 获取客户信息 searchProjectInfoList,// 查询项目信息 + submitChange, // 提交 } from '@/api/quotation/quotationInformation.js' import { customerContactSearch, // 客户联系人列表查询 } from '@/api/customer/customerContact.js' +import { + getNodeAuthority, // 获取节点权限 +} from '@/api/changeManagement/changeManagement.js' import Chooselist from '@/views/modules/common/Chooselist' import quotationUploadFile from "./quotation_upload_file" import DictDataSelect from "../sys/dict-data-select.vue"; @@ -1020,7 +1026,16 @@ export default { computed: { priceCheckProperties() { return priceCheckProperties - } + }, + quotationInformationFlag () { + return (value) => { + let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value) + if (arr.length > 0) { + return arr[0].updateFlag + } + return 'N' + } + }, }, components: { PriceCheckDetail, @@ -1139,7 +1154,8 @@ export default { quoterName: '', priorityLevel: '', page: 1, - limit: 10 + limit: 10, + menuId: this.$route.meta.menuId, }, // 其它 dataListLoading: false, @@ -1196,7 +1212,12 @@ export default { createDate: '', createBy: '', updateDate: '', - updateBy: '' + updateBy: '', + nodeConclusion: '', + stepId: '', + rejectFlag: '', + rejectStepId: '', + isReject: '' }, quotationDetailData: { technicalConsiderations: '', @@ -2025,8 +2046,8 @@ export default { customerResponseModalFlag: false, projectPartModelFlag: false, contactModelFlag: false, - priceCheckDetailList:[], + plmQuotationInformationArr: [] } }, mounted() { @@ -2259,7 +2280,8 @@ export default { * 询价信息编辑模态框 * @param row */ - updateModal(row) { + async updateModal(row) { + await this.getNodeAuthority(row) this.modalData = { flag: '2', title: '询价编辑-' + row.quotationNo, @@ -2299,7 +2321,13 @@ export default { confirmInformation: row.confirmInformation, quotationResultStatus: row.quotationResultStatus, updateBy: this.$store.state.user.name, - quotationAmount:row.quotationAmount + quotationAmount:row.quotationAmount, + + nodeConclusion: '', + stepId: row.stepId, + rejectFlag: row.rejectFlag, + rejectStepId: row.rejectStepId, + isReject: row.isReject } this.priceCheckDetail = row.priceCheckDetail this.modalDisableFlag = true @@ -3220,18 +3248,26 @@ export default { } }, updateModalStatus(row, status) { - let params = JSON.parse(JSON.stringify(row)) - params.quotationResultStatus = status; - params.quotationStatus = '下达'; - quotationInformationEdit(params).then(({data}) => { - if (data && data.code === 0) { - this.$message.success('询价单已下达') - this.getDataList() - } else { - this.$message.warning(data.msg) - } - }).catch((error) => { - this.$message.error(error) + this.$confirm(`是否确认下达?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let params = JSON.parse(JSON.stringify(row)) + params.quotationResultStatus = status; + params.quotationStatus = '下达'; + params.userName = this.$store.state.user.name + params.menuId = this.$route.meta.menuId + quotationInformationEdit(params).then(({data}) => { + if (data && data.code === 0) { + this.$message.success('询价单已下达') + this.getDataList() + } else { + this.$message.warning(data.msg) + } + }).catch((error) => { + this.$message.error(error) + }) }) }, getPriceCheckDetailList(){ @@ -3248,7 +3284,70 @@ export default { }).catch((error)=>{ this.$message.error(error) }) - } + }, + + // 同意提交 + agreeSubmit () { + this.$confirm(`是否确认提交?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.modalData.nodeConclusion = 'Y' + this.submitData() + }) + }, + + // 驳回提交 + rejectSubmit () { + this.$confirm(`是否确认驳回?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.modalData.nodeConclusion = 'N' + this.submitData() + }) + }, + + // 提交 + submitData () { + let tempData = { + site: this.modalData.site, + userName: this.$store.state.user.name, + quotationNo: this.modalData.quotationNo, + menuId: this.$route.meta.menuId, + nodeConclusion: this.modalData.nodeConclusion + } + submitChange(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({message: '操作成功', type: 'success'}) + this.submitModalFlag = false + this.modalFlag = false + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取流程的配置权限 + async getNodeAuthority (row) { + let tempData = { + site: row.site, + stepId: row.stepId, + menuId: this.$route.meta.menuId + } + await getNodeAuthority(tempData).then(({data}) => { + if (data && data.code === 0) { + this.plmQuotationInformationArr = data.rows.plmQuotationInformation + } + }) + }, + + } }