diff --git a/src/api/changeManagement/changeManagement.js b/src/api/changeManagement/changeManagement.js index 69fb39a..6f6002c 100644 --- a/src/api/changeManagement/changeManagement.js +++ b/src/api/changeManagement/changeManagement.js @@ -89,11 +89,95 @@ export const costImpactSave = data => createAPI(`/plm/changeManagement/costImpac export const executionSave = data => createAPI(`/plm/changeManagement/executionSave`,'post',data) /** - * 新增库存成本影响(变更记录页面) + * 编辑库存成本影响 * @param data * @returns {*} */ -export const costImpactSave2 = data => createAPI(`/plm/changeManagement/costImpactSave2`,'post',data) +export const costImpactUpdate = data => createAPI(`/plm/changeManagement/costImpactUpdate`,'post',data) + +/** + * 查询ECN种类数据 + * @param data + * @returns {*} + */ +export const getEcnTypeData = data => createAPI(`/plm/changeManagement/getEcnTypeData`,'post',data) + +/** + * 查询ECN的模板 + * @param data + * @returns {*} + */ +export const getEcnModel = data => createAPI(`/plm/changeManagement/getEcnModel`,'post',data) + +/** + * 查询模板属性 + * @param data + * @returns {*} + */ +export const getItemList = data => createAPI(`/plm/changeManagement/getItemList`,'post',data) + +/** + * 查询执行信息 + * @param data + * @returns {*} + */ +export const executionInfoSearch = data => createAPI(`/plm/changeManagement/executionInfoSearch`,'post',data) + +/** + * 查询变更明细 + * @param data + * @returns {*} + */ +export const requestDetailSearch = data => createAPI(`/plm/changeManagement/requestDetailSearch`,'post',data) + +/** + * 删除变更明细 + * @param data + * @returns {*} + */ +export const deleteChangeDetail = data => createAPI(`/plm/changeManagement/deleteChangeDetail`,'post',data) + +/** + * 编辑变更单基础信息 + * @param data + * @returns {*} + */ +export const changeRequestUpdate = data => createAPI(`/plm/changeManagement/changeRequestUpdate`,'post',data) + +/** + * 查询所选择的ECN种类 + * @param data + * @returns {*} + */ +export const getChooseEcnType = data => createAPI(`/plm/changeManagement/getChooseEcnType`,'post',data) + +/** + * 修改执行信息 + * @param data + * @returns {*} + */ +export const executionUpdate = data => createAPI(`/plm/changeManagement/executionUpdate`,'post',data) + +/** + * 新增会签信息 + * @param data + * @returns {*} + */ +export const countersignatureSave = data => createAPI(`/plm/changeManagement/countersignatureSave`,'post',data) + +/** + * 查询会签信息 + * @param data + * @returns {*} + */ +export const countersignatureSearch = data => createAPI(`/plm/changeManagement/countersignatureSearch`,'post',data) + +/** + * 编辑会签信息 + * @param data + * @returns {*} + */ +export const countersignatureUpdate = data => createAPI(`/plm/changeManagement/countersignatureUpdate`,'post',data) diff --git a/src/views/modules/base/propertiesItem/propertiesItem.vue b/src/views/modules/base/propertiesItem/propertiesItem.vue index 977b362..96677ee 100644 --- a/src/views/modules/base/propertiesItem/propertiesItem.vue +++ b/src/views/modules/base/propertiesItem/propertiesItem.vue @@ -14,6 +14,7 @@ + @@ -116,6 +117,7 @@ + diff --git a/src/views/modules/base/propertiesItem/propertiesModel.vue b/src/views/modules/base/propertiesItem/propertiesModel.vue index 8e32d60..526de8f 100644 --- a/src/views/modules/base/propertiesItem/propertiesModel.vue +++ b/src/views/modules/base/propertiesItem/propertiesModel.vue @@ -14,6 +14,7 @@ + @@ -127,6 +128,7 @@ + diff --git a/src/views/modules/base/upload_file.vue b/src/views/modules/base/upload_file.vue index 73a326b..678fdba 100644 --- a/src/views/modules/base/upload_file.vue +++ b/src/views/modules/base/upload_file.vue @@ -12,7 +12,7 @@ @@ -32,7 +32,7 @@ - 保存 + 保存 关闭 @@ -54,8 +54,9 @@ export default { createBy: '', dataNo: '', fileRemark: '', - folder: '', + folder: '' }, + } }, methods: { @@ -79,41 +80,46 @@ export default { // 关闭modal closeDialog () { this.fileList = [] - // 刷新报工的页面 - this.$emit('refreshPageTables') + this.$refs.uploadFile.clearFiles() // 关闭当前的页面 this.visible = false }, // 保修当前的数据 saveUploadFile () { - let remark = this.pageData.fileRemark - if (remark == null) { - remark = '' + if (this.pageData.fileRemark == null) { + this.pageData.fileRemark = '' } // 判断文件是否上传 if (this.fileList == null || this.fileList.length === 0) { this.$message.error("请先上传文件!") return false } - const formData = new FormData() - //片接文件 - formData.append("file", this.fileList[0].raw) - formData.append("orderRef1", this.pageData.site) - formData.append("orderRef2", this.pageData.dataNo) - formData.append("fileRemark", remark) - formData.append("folder", this.pageData.folder) - uploadFile(formData).then(({data}) => { - if (data.code === 0) { - this.$message.success(data.msg) - // 清空文件上传记录 - this.$refs.uploadFile.clearFiles() - this.pageData.fileRemark = '' - this.fileList = [] - }else { - this.$message.warning(data.msg) - } - }) + + // const formData = new FormData() + // //片接文件 + // formData.append("file", this.fileList[0].raw) + // formData.append("orderRef1", this.pageData.site) + // formData.append("orderRef2", this.pageData.dataNo) + // formData.append("fileRemark", this.pageData.fileRemark) + // formData.append("folder", this.pageData.folder) + + this.pageData.file = this.fileList[0].raw + this.$emit('refreshPageTables', this.pageData) + this.$message.success('Successful!') + this.closeDialog() + + // uploadFile(formData).then(({data}) => { + // if (data.code === 0) { + // this.$message.success(data.msg) + // // 清空文件上传记录 + // this.$refs.uploadFile.clearFiles() + // this.pageData.fileRemark = '' + // this.fileList = [] + // }else { + // this.$message.warning(data.msg) + // } + // }) } } diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 56af4e1..193c1b8 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -74,24 +74,24 @@ - + -
- - - +
+ + + 申请人 + - + - - + + - - + + - - - - - + + - - - + + + - - + + - - + + TP工程师 + - - + + - - + + - - + + - - + + - - - + + + - - + + + ECN种类 - - - + + + - - + + - - - + + + - - + + + +
+ + + + + + + + + + + + + + + + + +
+
+ 保存 关闭 - -
+ +
在生产品 @@ -189,7 +253,7 @@ - 执行人 + 执行人 @@ -207,7 +271,7 @@ - 执行人 + 执行人 @@ -233,7 +297,7 @@ - 执行人 + 执行人 @@ -253,7 +317,7 @@ -
+
@@ -279,8 +343,108 @@ +
+ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +
+ +
+ + + + + + + + + + + +
- + + 保存 + 关闭 + + + + +
+
+ + + + + + + + + + + +
+
+ + 保存 关闭
@@ -366,10 +530,163 @@ - +
+ + + 在生产品 + + + + + + + + + + + + + + + + + 成品库存 + + + + + + + + + + + + + + + + + 新订单 + + + + + + + + 影响的原材料及其库存量 + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + {{item.value}} + + + +
+ + {{i.value}} + +
+
+
+
+ + 保存 + 关闭 + +
+ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -384,7 +701,18 @@ changeFileSearch, // 变更单文件的列表 deleteChangeFile, // 删除变更单文件 costImpactSearch, // 查询库存成本影响 - costImpactSave2, // 新增库存成本影响(变更记录页面) + costImpactUpdate, // 编辑库存成本影响 + executionInfoSearch, // 查询执行信息 + requestDetailSearch, // 查询变更明细 + deleteChangeDetail, // 删除变更明细 + getDepartmentByUserName, // 根据用户编码获得用户部门 + changeRequestUpdate, // 编辑变更单基础信息 + getEcnModel, // 查询ECN的模板 + getChooseEcnType, // 查询所选择的ECN种类 + getItemList, // 查询模板属性 + executionUpdate, // 修改执行信息 + countersignatureSearch, // 查询会签信息 + countersignatureUpdate, // 编辑会签信息 } from '@/api/changeManagement/changeManagement.js' import ChooseList from '@/views/modules/common/Chooselist' import changeUploadFile from "../base/upload_file.vue"; @@ -449,7 +777,9 @@ ulCertificationRequirements: '', ulContinueToMeetDemand: '', gpCertificationRequirements: '', - gpContinueToMeetDemand: '' + gpContinueToMeetDemand: '', + detailList: [], + ecnTypeData: [] }, costImpactData: { site: this.$store.state.user.site, @@ -490,12 +820,33 @@ newStencilNo: '', executionDate: '', createBy: '', - updateBy: '' + updateBy: '', + chooseItemList: [] + }, + chooseModelData: { + site: this.$store.state.user.site, + functionType: 'ECN', + itemNo: '', + itemDesc: '', + codeNo: '' + }, + countersignatureData: { + site: this.$store.state.user.site, + changeNo: '', + createBy: '', + updateBy: '', + chooseCSItemList: [] }, // ======== 数据列表 ======== dataList: [], detailList: [], fileList: [], + chooseItemList: [], + chooseCSItemList: [], + chooseDataList: [], + form: [], + modelList: [], + itemList: [], // ======== 列表表头 ======== columnList: [ { @@ -823,16 +1174,283 @@ columnWidth: 150 }, ], + columnChooseDataList: [ + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table4PartNo', + tableId: '108002Table4', + tableName: '所选变更列表', + columnProp: 'partNo', + headerAlign: 'center', + align: 'center', + columnLabel: '物料编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table4PartDesc', + tableId: '108002Table4', + tableName: '所选变更列表', + columnProp: 'partDesc', + headerAlign: 'center', + align: 'left', + columnLabel: '物料描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 180 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table4DrawingNo', + tableId: '108002Table4', + tableName: '所选变更列表', + columnProp: 'drawingNo', + headerAlign: 'center', + align: 'center', + columnLabel: '图纸编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table4DraftNo', + tableId: '108002Table4', + tableName: '所选变更列表', + columnProp: 'draftNo', + headerAlign: 'center', + align: 'center', + columnLabel: '图稿编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 90 + }, + ], + columnChooseItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table5ItemNo', + tableId: '108002Table5', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table5ItemDesc', + tableId: '108002Table5', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table5ExecuteFlag', + tableId: '108002Table5', + tableName: '执行属性表', + columnProp: 'executeFlag', + headerAlign: 'center', + align: 'center', + columnLabel: '是否执行', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table5Executor', + tableId: '108002Table5', + tableName: '执行属性表', + columnProp: 'executor', + headerAlign: 'center', + align: 'center', + columnLabel: '执行人', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + },{ + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table5ExecuteDate', + tableId: '108002Table5', + tableName: '执行属性表', + columnProp: 'itemExecutionDate', + headerAlign: 'center', + align: 'center', + columnLabel: '执行时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + + ], + columnItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table6ItemNo', + tableId: '108002Table6', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table6ItemDesc', + tableId: '108002Table6', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + ], + columnCSChooseItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table7ItemNo', + tableId: '108002Table7', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table7ItemDesc', + tableId: '108002Table7', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table7ExecuteFlag', + tableId: '108002Table7', + tableName: '执行属性表', + columnProp: 'executeFlag', + headerAlign: 'center', + align: 'center', + columnLabel: '是否执行', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table7Executor', + tableId: '108002Table7', + tableName: '执行属性表', + columnProp: 'executor', + headerAlign: 'center', + align: 'center', + columnLabel: '执行人', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + },{ + userId: this.$store.state.user.name, + functionId: 108002, + serialNumber: '108002Table7ExecuteDate', + tableId: '108002Table7', + tableName: '执行属性表', + columnProp: 'itemExecutionDate', + headerAlign: 'center', + align: 'center', + columnLabel: '执行时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + + ], // ======== 必填规则 ======== rules: {}, // ======== 复选数据集 ======== fileSelections: [], + itemSelections: [], // ======== 选中的当前行数据 ======== currentRow: {}, + currentCostImpactData: {}, // ======== 模态框开关控制 ======== modalFlag: false, modalDisableFlag: false, - costImpactDisableFlag: false + ecnTypeModalFlag: false, + chooseModelFlag: false } }, @@ -846,10 +1464,31 @@ created () { this.getDataList() + this.getEcnModel() }, methods: { + ecnTypeHeaderChange (val,index) { + if (val === 'Y') { + for (let i = 0; i < this.form[index].list.length; i++) { + this.form[index].list[i].flag = 'Y' + } + } else { + for (let i = 0; i < this.form[index].list.length; i++) { + this.form[index].list[i].flag = 'N' + } + } + }, + + ecnTypeDetailChange (val,index) { + if (this.form[index].list.every(x => x.flag === 'Y')) { + this.form[index].flag = 'Y' + }else { + this.form[index].flag = 'N' + } + }, + // ======== 分页相关方法 ======== // 每页数 @@ -897,7 +1536,7 @@ // 刷新页签的table数据 refreshChangeTab () { - if (this.activeName === 'InventoryCostImpact') { + if (this.activeName === 'inventoryCostImpact') { } else if (this.activeName === 'actionInformation') { @@ -978,10 +1617,10 @@ this.$message.warning('ECN变更总成本不能小于等于0!') return } - costImpactSave2(this.costImpactData).then(({data}) => { + costImpactUpdate(this.costImpactData).then(({data}) => { if (data && data.code === 0) { + this.costImpactData = data.rows.costImpactData this.getDataList() - this.modalFlag = false this.$message({ message: '操作成功', type: 'success', @@ -1003,7 +1642,7 @@ } else if (this.activeTable === 'fileInformation') { this.getChangeFileList() } else if (this.activeTable === 'inventoryCostImpact') { - + this.inventoryCostImpactSearch2() } }, @@ -1161,44 +1800,414 @@ gpCertificationRequirements: row.gpCertificationRequirements, gpContinueToMeetDemand: row.gpContinueToMeetDemand, updateBy: this.$store.state.user.name, + detailList: [], + ecnTypeData: [] } + // 查选择的ECN种类 + this.getChangeChooseEcnType() + // 查变更单明细 + this.changeRequestDetailSearch() + // 查变更单库存成本影响 this.inventoryCostImpactSearch() - this.executionInfoData = { - site: row.site, - changeNo: row.changeNo, - originalFilmNo: row.originalFilmNo, - newFilmNo: row.newFilmNo, - originalDieCuttingRuleNo: row.originalDieCuttingRuleNo, - newDieCuttingRuleNo: row.newDieCuttingRuleNo, - originalStencilNo: row.originalStencilNo, - newStencilNo: row.newStencilNo, - executionDate: row.executionDate, - updateBy: this.$store.state.user.name, - } + // 查变更单TP&执行信息 + this.tpExecutionInfoSearch() + // 查变更单会签信息 + this.countersignatureSearch() + this.activeName = 'basicInformation' this.modalFlag = true this.modalDisableFlag = true }, + // 获取选择的ECN种类 + getChangeChooseEcnType () { + getChooseEcnType(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.form = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 打开ECN种类模态框 + chooseEcnTypeModal () { + this.ecnTypeModalFlag = true + }, + + // 保存ECN种类 + saveEcnTypeData () { + this.ecnTypeModalFlag = false + }, + + // 查询ECN的模板 + getEcnModel () { + let tempData = { + site: this.$store.state.user.site, + functionType: 'ECN' + } + getEcnModel(tempData).then(({data}) => { + if (data.code === 0) { + this.modelList = data.rows + } + }) + }, + + // 查询变更明细表 + changeRequestDetailSearch () { + requestDetailSearch(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.chooseDataList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 查询库存成本影响对象 inventoryCostImpactSearch () { costImpactSearch(this.modalData).then(({data}) => { if (data && data.code === 0) { - this.costImpactData = data.rows.costImpactData - if (data.rows.flag === 'Y') { - this.costImpactDisableFlag = true + this.costImpactData = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询库存成本影响对象 + inventoryCostImpactSearch2 () { + costImpactSearch(this.currentRow).then(({data}) => { + if (data && data.code === 0) { + this.currentCostImpactData = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询执行信息 + tpExecutionInfoSearch () { + executionInfoSearch(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.executionInfoData = data.rows.executionInfoData + this.executionInfoData.createBy = this.$store.state.user.name + this.chooseItemList = data.rows.chooseItemList + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询会签信息 + countersignatureSearch () { + countersignatureSearch(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.chooseCSItemList = data.rows.chooseCSItemList + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 删除所选技术参数卡 + deleteChooseDataModal (row) { + this.$confirm(`是否删除该技术参数卡的变更?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteChangeDetail(row).then(({data}) => { + if (data && data.code === 0) { + this.changeRequestDetailSearch() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) } else { - this.costImpactData.createBy = this.$store.state.user.name + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) } + }) + }) + }, + + // 修改变更申请 + saveData () { + this.modalData.detailList = this.chooseDataList + this.modalData.ecnTypeData = this.form + if (this.modalData.applicantId === '' || this.modalData.applicantId == null) { + this.$message.warning('请选择申请人员!') + return + } + if (this.modalData.applyDate === '' || this.modalData.applyDate == null) { + this.$message.warning('请选择申请日期!') + return + } + if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) { + this.$message.warning('请选择ECN变更影响!') + return + } + if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') { + this.$message.warning('请填写变更影响描述!') + return + } + if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) { + this.$message.warning('请选择ECN阶段!') + return + } + if (this.modalData.changeType === '' || this.modalData.changeType == null) { + this.$message.warning('请选择变更类别!') + return + } + if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) { + this.$message.warning('请选择TP工程师!') + return + } + if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) { + this.$message.warning('请选择变更生效日期!') + return + } + if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) { + this.$message.warning('请选择是否DF是产品!') + return + } + if (this.modalData.printing === '' || this.modalData.printing == null) { + this.$message.warning('请选择印刷方式!') + return + } + if (this.modalData.manufacturingCostIsChange === '' || this.modalData.manufacturingCostIsChange == null) { + this.$message.warning('请选择制造成本是否变更!') + return + } + if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) { + this.$message.warning('请填写变更要求描述!') + return + } + if (this.modalData.isReQuote === '' || this.modalData.isReQuote == null) { + this.$message.warning('请选择是否重新报价!') + return + } + if (this.modalData.ulCertificationRequirements === '' || this.modalData.ulCertificationRequirements == null) { + this.$message.warning('请选择原产品是否UL认证要求!') + return + } + if (this.modalData.ulContinueToMeetDemand === '' || this.modalData.ulContinueToMeetDemand == null) { + this.$message.warning('请选择变更后能否继续满足此需求(UL)!') + return + } + if (this.modalData.gpCertificationRequirements === '' || this.modalData.gpCertificationRequirements == null) { + this.$message.warning('请选择原产品是否GP要求!') + return + } + if (this.modalData.gpContinueToMeetDemand === '' || this.modalData.gpContinueToMeetDemand == null) { + this.$message.warning('请选择变更后能否继续满足此需求(GP)!') + return + } + changeRequestUpdate(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.modalData = data.rows.modalData + this.getDataList() + // 查选择的ECN种类 + this.getChangeChooseEcnType() + // 查变更单明细 + this.changeRequestDetailSearch() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 选择模板属性 + chooseModel () { + this.chooseModelData = { + site: this.$store.state.user.site, + itemNo: '', + itemDesc: '', + functionType: 'ECN', + codeNo: this.chooseItemList.length > 0 ? this.chooseItemList[0].codeNo : this.modelList.length > 0 ? this.modelList[0].codeNo : '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.itemTable.clearSelection()) + // 查询所有属性 + getItemList(this.chooseModelData).then(({data}) => { + if (data && data.code === 0) { + this.itemList = data.rows + this.itemList.forEach(val => { + // 回显选中的部门 + if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) { + this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true)) + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.chooseModelFlag = true + }, + + // 查询属性 + searchItemList () { + getItemList(this.chooseModelData).then(({data}) => { + if (data.code === 0) { + this.itemList = data.rows + } + }) + }, + + // 单机选择 + itemClickRow (row) { + this.$refs.itemTable.toggleRowSelection(row) + }, + + // 复选属性 + selectionItem (val) { + this.itemSelections = val + }, + + // 确认多选属性 + confirmItem () { + if (this.itemSelections.length === 0) { + this.$message.warning("请勾选属性!") + return + } + this.chooseItemList = this.itemSelections + this.chooseModelFlag = false + }, + + // 执行所选属性 + executeModal (row) { + row.executeFlag = 'Y' + row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + row.executor = this.$store.state.user.name + }, + + // 执行所选属性 + executeCSModal (row) { + row.executeFlag = 'Y' + row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + row.executor = this.$store.state.user.name + }, + + // 编辑执行信息 + executionInformationSave () { + this.executionInfoData.chooseItemList = this.chooseItemList + if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') { + this.$message.warning('请填写原啤刀编号!') + return; + } + if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') { + this.$message.warning('请填写新啤刀编号!') + return; + } + if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') { + this.$message.warning('请填写原网板/印版编号!') + return; + } + if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') { + this.$message.warning('请填写新网板/印版编号!') + return; + } + if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') { + this.$message.warning('请选择ECN执行日期!') + return; + } + executionUpdate(this.executionInfoData).then(({data}) => { + if (data && data.code === 0) { + this.executionInfoData = data.rows.executionInfoData + this.executionInfoData.createBy = this.$store.state.user.name + this.chooseItemList = data.rows.chooseItemList + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 编辑会签信息 + countersignatureSave () { + this.countersignatureData.changeNo = this.modalData.changeNo + this.countersignatureData.chooseCSItemList = this.chooseCSItemList + countersignatureUpdate(this.countersignatureData).then(({data}) => { + if (data && data.code === 0) { + this.chooseCSItemList = data.rows.chooseCSItemList + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 回车换行 + focusNextInput (index, type) { + let aaa = '' + if (this.chooseDataList.length - 1 === index) { + aaa = `${type}0` + } else { + aaa = `${type}${index + 1}` + } + this.$nextTick(() => { + this.$refs[aaa].focus() + }) + }, + + // 根据人员编码查人员部门 + getDepartmentByUserName () { + let tempData = { + site: this.$store.state.user.site, + username: this.modalData.applicantId + } + getDepartmentByUserName(tempData).then(({data}) => { + if (data.code === 0) { + this.modalData.applicationDepartmentId = data.rows[0].departmentNo + this.modalData.applicationDepartmentName = data.rows[0].departmentName } }) }, // ======== chooseList相关方法 ======== - /** - * 获取基础数据列表S - * @param val - * @param type - */ + + // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val this.tagNo1 = type @@ -1206,18 +2215,22 @@ let strVal = '' if (val === 103) { if (type === 1) { + strVal = this.modalData.applicantId + } else if (type === 2) { + strVal = this.modalData.tpEngineerId + } else if (type === 3) { if (this.costImpactData.productionProductFlag !== 'Y') { return } else { strVal = this.costImpactData.productionProductExecutor } - } else if (type === 2) { + } else if (type === 4) { if (this.costImpactData.inventoryProductFlag !== 'Y') { return } else { strVal = this.costImpactData.inventoryProductExecutor } - } else if (type === 3) { + } else if (type === 5) { if (this.costImpactData.affectedFlag !== 'Y') { return } else { @@ -1228,21 +2241,29 @@ this.$refs.baseList.init(val, strVal) }) }, - /** - * 列表方法的回调 - * @param val - */ + + // 列表方法的回调 getBaseData (val) { if (this.tagNo === 103) { if (this.tagNo1 === 1) { - this.costImpactData.productionProductExecutor = val.username - this.$set(this.costImpactData,'productionProductExecutorName',val.user_display) + this.modalData.applicantId = val.username + this.modalData.applicantName = val.user_display + this.getDepartmentByUserName() } else if (this.tagNo1 === 2) { - this.costImpactData.inventoryProductExecutor = val.username - this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display) + this.modalData.tpEngineerId = val.username + this.modalData.tpEngineerName = val.user_display } else if (this.tagNo1 === 3) { + this.costImpactData.productionProductExecutor = val.username + this.costImpactData.productionProductExecutorName = val.user_display + //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display) + } else if (this.tagNo1 === 4) { + this.costImpactData.inventoryProductExecutor = val.username + this.costImpactData.inventoryProductExecutorName = val.user_display + //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display) + } else if (this.tagNo1 === 5) { this.costImpactData.affectedExecutor = val.username - this.$set(this.costImpactData,'affectedExecutorName',val.user_display) + this.costImpactData.affectedExecutorName = val.user_display + //this.$set(this.costImpactData,'affectedExecutorName',val.user_display) } } }, diff --git a/src/views/modules/changeManagement/changeRequest.vue b/src/views/modules/changeManagement/changeRequest.vue index 073126d..92fcf1a 100644 --- a/src/views/modules/changeManagement/changeRequest.vue +++ b/src/views/modules/changeManagement/changeRequest.vue @@ -104,14 +104,11 @@ :editable=false> - - - - + - - + + @@ -154,7 +151,8 @@ - 文件上传 + ECN种类 + 文件上传 @@ -240,12 +238,12 @@
- 保存 + 保存 关闭
- +
@@ -319,7 +317,7 @@
- 保存 + 保存 关闭
@@ -351,19 +349,265 @@ +
+ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +
+ 选择执行模板 +
+ + + + + + + + + + + +
+
+ + 保存 + 关闭 + +
+ + +
+ 选择会签模板 +
+ + + + + + + + + + + +
- 保存 + 保存 关闭
+ + + + + + + {{item.value}} + + + +
+ + {{i.value}} + +
+
+
+
+ + 保存 + 关闭 + +
+ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ - +
@@ -376,10 +620,18 @@ deleteChangeFiles, // 根据变更单号删除文件, costImpactSave, // 新增库存成本影响 executionSave, // 新增执行信息 + getEcnTypeData, // 查询ECN种类数据 + getEcnModel, // 查询ECN的模板 + getItemList, // 查询模板属性 + countersignatureSave, // 新增会签信息 } from "@/api/changeManagement/changeManagement.js" import ChooseList from '@/views/modules/common/Chooselist' + import { + uploadFile // 文件上传 + } from '@/api/oss/oss.js' import DictDataSelect from '../sys/dict-data-select.vue' import changeUploadFile from "../base/upload_file.vue" + import dayjs from "dayjs"; export default { components: { changeUploadFile, @@ -388,6 +640,7 @@ }, data() { return { + form: [], // 导出 exportData: [], exportName: '工程变更申请' + this.dayjs().format('YYYYMMDDHHmmss'), @@ -419,7 +672,6 @@ applicationDepartmentId: '', applicationDepartmentName: '', applyDate: '', - ecnType: '', changeImpact: '', changeImpactDesc: '', ecnStage: '', @@ -437,7 +689,8 @@ gpCertificationRequirements: '', gpContinueToMeetDemand: '', createBy: '', - detailList: [] + detailList: [], + ecnTypeData: [] }, costImpactData: { site: this.$store.state.user.site, @@ -478,11 +731,40 @@ newStencilNo: '', executionDate: '', createBy: '', - updateBy: '' + updateBy: '', + chooseItemList: [] + }, + countersignatureData: { + site: this.$store.state.user.site, + changeNo: '', + createBy: '', + updateBy: '', + chooseCSItemList: [] + }, + chooseModelData: { + site: this.$store.state.user.site, + functionType: 'ECN', + itemNo: '', + itemDesc: '', + codeNo: '' + }, + chooseCSModelData: { + site: this.$store.state.user.site, + functionType: 'ECN', + itemNo: '', + itemDesc: '', + codeNo: '' }, // ======== 数据列表 ======== dataList: [], chooseDataList: [], + fileList: [], + modelList: [], + modelCSList: [], + itemList: [], + itemCSList: [], + chooseItemList: [], + chooseCSItemList: [], // ======== 列表表头 ======== columnList: [ { @@ -696,6 +978,238 @@ columnWidth: 90 }, ], + columnChooseItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table3ItemNo', + tableId: '108001Table3', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table3ItemDesc', + tableId: '108001Table3', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table3ExecuteFlag', + tableId: '108001Table3', + tableName: '执行属性表', + columnProp: 'executeFlag', + headerAlign: 'center', + align: 'center', + columnLabel: '是否执行', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table3Executor', + tableId: '108001Table3', + tableName: '执行属性表', + columnProp: 'executor', + headerAlign: 'center', + align: 'center', + columnLabel: '执行人', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + },{ + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table3ExecuteDate', + tableId: '108001Table3', + tableName: '执行属性表', + columnProp: 'itemExecutionDate', + headerAlign: 'center', + align: 'center', + columnLabel: '执行时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + + ], + columnChooseCSItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table6ItemNo', + tableId: '108001Table6', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table6ItemDesc', + tableId: '108001Table6', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table6ExecuteFlag', + tableId: '108001Table6', + tableName: '执行属性表', + columnProp: 'executeFlag', + headerAlign: 'center', + align: 'center', + columnLabel: '是否执行', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table6Executor', + tableId: '108001Table6', + tableName: '执行属性表', + columnProp: 'executor', + headerAlign: 'center', + align: 'center', + columnLabel: '执行人', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + },{ + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table6ExecuteDate', + tableId: '108001Table6', + tableName: '执行属性表', + columnProp: 'itemExecutionDate', + headerAlign: 'center', + align: 'center', + columnLabel: '执行时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + + ], + columnItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table4ItemNo', + tableId: '108001Table4', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table4ItemDesc', + tableId: '108001Table4', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + ], + columnCSItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table5ItemNo', + tableId: '108001Table5', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table5ItemDesc', + tableId: '108001Table5', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + ], // ======== 必填规则 ======== rules: { applicantId: [ @@ -712,13 +1226,6 @@ trigger: ['blur','change'] } ], - ecnType: [ - { - required: true, - message: ' ', - trigger: ['blur','change'] - } - ], changeImpact: [ { required: true, @@ -827,14 +1334,25 @@ }, // ======== 复选数据集 ======== dataSelections: [], + itemSelections: [], + itemCSSelections: [], // ======== 模态框开关控制 ======== modalFlag: false, modalDisableFlag: false, + EcnTypeModalFlag: false, + basicInformationFlag: false, + InventoryCostImpactFlag: false, + actionInformationFlag: false, + chooseModelFlag: false, + chooseCSModelFlag: false, + CountersignatureFlag: false, } }, created () { this.getDataList() + this.getEcnModel() + this.getEcnCSModel() }, mounted() { @@ -842,8 +1360,31 @@ this.height = window.innerHeight - 180 }) }, + computed:{ + }, methods: { + + ecnTypeHeaderChange (val,index) { + if (val === 'Y') { + for (let i = 0; i < this.form[index].list.length; i++) { + this.form[index].list[i].flag = 'Y' + } + } else { + for (let i = 0; i < this.form[index].list.length; i++) { + this.form[index].list[i].flag = 'N' + } + } + }, + + ecnTypeDetailChange (val,index) { + if (this.form[index].list.every(x => x.flag === 'Y')) { + this.form[index].flag = 'Y' + }else { + this.form[index].flag = 'N' + } + }, + selectFlag (row) { if (row.ecnFlag === '变更中') { return false @@ -912,7 +1453,6 @@ applicationDepartmentId: '', applicationDepartmentName: '', applyDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''), - ecnType: '', changeImpact: 'N', changeImpactDesc: '', ecnStage: '', @@ -930,7 +1470,8 @@ gpCertificationRequirements: '', gpContinueToMeetDemand: '', createBy: this.$store.state.user.name, - detailList: [] + detailList: [], + ecnTypeData: [] } this.costImpactData = { site: this.$store.state.user.site, @@ -969,13 +1510,25 @@ originalStencilNo: '', newStencilNo: '', executionDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''), - createBy: this.$store.state.user.name + createBy: this.$store.state.user.name, + chooseItemList: [] + } + this.countersignatureData = { + site: this.$store.state.user.site, + changeNo: data.changeNo, + createBy: this.$store.state.user.name, + chooseCSItemList: [] } this.getDepartmentByUserName() + this.getEcnTypeData() // 获取ECN种类 this.chooseDataList = this.dataSelections - this.activeName === 'basicInformation' + this.activeName = 'basicInformation' this.modalFlag = true this.modalDisableFlag = false + this.basicInformationFlag = true + this.InventoryCostImpactFlag = true + this.actionInformationFlag = true + this.CountersignatureFlag = true } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -986,21 +1539,23 @@ // 删除变更申请模态框 closeModalFlag () { - deleteChangeFiles(this.modalData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.modalFlag = false - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + // deleteChangeFiles(this.modalData).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList() + // this.modalFlag = false + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + this.modalFlag = false }, // 新增变更申请 saveData () { this.modalData.detailList = this.chooseDataList + this.modalData.ecnTypeData = this.form if (this.modalData.applicantId === '' || this.modalData.applicantId == null) { this.$message.warning('请选择申请人员!') return @@ -1009,10 +1564,6 @@ this.$message.warning('请选择申请日期!') return } - if (this.modalData.ecnType === '' || this.modalData.ecnType == null) { - this.$message.warning('请选择ECN种类!') - return - } if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) { this.$message.warning('请选择ECN变更影响!') return @@ -1075,7 +1626,15 @@ } changeRequestSave(this.modalData).then(({data}) => { if (data && data.code === 0) { + for (let i = 0; i { + if (data.code !== 0) { + this.$message.warning(data.msg) + } + }) + } this.getDataList() + this.basicInformationFlag = false this.$message({ message: '操作成功', type: 'success', @@ -1166,6 +1725,7 @@ } costImpactSave(this.costImpactData).then(({data}) => { if (data && data.code === 0) { + this.InventoryCostImpactFlag = false this.getDataList() this.$message({ message: '操作成功', @@ -1181,25 +1741,37 @@ }) }, - // + // 新增执行信息 executionInformationSave () { + if (this.chooseItemList.length === 0) { + this.$message.warning('请选择模板属性!') + return; + } else { + this.executionInfoData.chooseItemList = this.chooseItemList + } if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') { this.$message.warning('请填写原啤刀编号!') + return; } if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') { this.$message.warning('请填写新啤刀编号!') + return; } if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') { this.$message.warning('请填写原网板/印版编号!') + return; } if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') { this.$message.warning('请填写新网板/印版编号!') + return; } if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') { this.$message.warning('请选择ECN执行日期!') + return; } executionSave(this.executionInfoData).then(({data}) => { if (data && data.code === 0) { + this.actionInformationFlag = false this.getDataList() this.$message({ message: '操作成功', @@ -1267,7 +1839,234 @@ } //打开组件 去做新增业务 this.$nextTick(() => { - this.$refs.changeUploadFile.init(currentData); + this.$refs.changeUploadFile.init(currentData) + }) + }, + + // 得到保存的文件对象 + getFileData (fData) { + const formData = new FormData() + // 片接文件 + formData.append("file", fData.file) + formData.append("orderRef1", fData.site) + formData.append("orderRef2", fData.dataNo) + formData.append("fileRemark", fData.fileRemark) + formData.append("folder", fData.folder) + this.fileList.push(formData) + }, + + // 选择ECN种类模态框 + chooseEcnTypeModal () { + this.EcnTypeModalFlag = true + }, + + // 查询ECN种类数据 + getEcnTypeData () { + let tempData = { + site: this.$store.state.user.site + } + getEcnTypeData(tempData).then(({data}) => { + if (data.code === 0) { + this.form = data.rows + } + }) + }, + + // 保存ECN种类 + saveEcnTypeData () { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + this.EcnTypeModalFlag = false + }, + + // 选择模板属性 + chooseModel () { + this.chooseModelData = { + site: this.$store.state.user.site, + itemNo: '', + itemDesc: '', + functionType: 'ECN', + codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.itemTable.clearSelection()) + // 查询所有部门 + getItemList(this.chooseModelData).then(({data}) => { + if (data && data.code === 0) { + this.itemList = data.rows + this.itemList.forEach(val => { + // 回显选中的部门 + if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) { + this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true)) + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.chooseModelFlag = true + }, + + // 查询属性 + searchItemList () { + getItemList(this.chooseModelData).then(({data}) => { + if (data.code === 0) { + this.itemList = data.rows + } + }) + }, + + // 单机选择 + itemClickRow (row) { + this.$refs.itemTable.toggleRowSelection(row) + }, + + // 复选属性 + selectionItem (val) { + this.itemSelections = val + }, + + // 确认多选属性 + confirmItem () { + if (this.itemSelections.length === 0) { + this.$message.warning("请勾选属性!") + return + } + this.chooseItemList = this.itemSelections + this.chooseModelFlag = false + }, + + // 执行所选属性 + executeModal (row) { + row.executeFlag = 'Y' + row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + row.executor = this.$store.state.user.name + }, + + // 查询ECN的模板 + getEcnModel () { + let tempData = { + site: this.$store.state.user.site, + functionType: 'ECN' + } + getEcnModel(tempData).then(({data}) => { + if (data.code === 0) { + this.modelList = data.rows + } + }) + }, + + + // =================================== + + // 查询会签的模板 + getEcnCSModel () { + let tempData = { + site: this.$store.state.user.site, + functionType: 'ECN' + } + getEcnModel(tempData).then(({data}) => { + if (data.code === 0) { + this.modelCSList = data.rows + } + }) + }, + + // 选择会签模板属性 + chooseCSModel () { + this.chooseCSModelData = { + site: this.$store.state.user.site, + itemNo: '', + itemDesc: '', + functionType: 'ECN', + codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.itemCSTable.clearSelection()) + // 查询所有属性 + getItemList(this.chooseCSModelData).then(({data}) => { + if (data && data.code === 0) { + this.itemCSList = data.rows + this.itemCSList.forEach(val => { + // 回显选中的部门 + if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) { + this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true)) + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.chooseCSModelFlag = true + }, + + // 查询CS属性 + searchCSItemList () { + getItemList(this.chooseCSModelData).then(({data}) => { + if (data.code === 0) { + this.itemCSList = data.rows + } + }) + }, + + // 单击选择 + itemCSClickRow (row) { + this.$refs.itemCSTable.toggleRowSelection(row) + }, + + // 复选CS属性 + selectionCSItem (val) { + this.itemCSSelections = val + }, + + // 确认多选CS属性 + confirmCSItem () { + if (this.itemCSSelections.length === 0) { + this.$message.warning("请勾选属性!") + return + } + this.chooseCSItemList = this.itemCSSelections + this.chooseCSModelFlag = false + }, + + // 执行所选属性 + executeCSModal (row) { + row.executeFlag = 'Y' + row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + row.executor = this.$store.state.user.name + }, + + // 新增会签信息 + countersignatureSave () { + if (this.chooseCSItemList.length === 0) { + this.$message.warning('请选择模板属性!') + return; + } else { + this.countersignatureData.chooseCSItemList = this.chooseCSItemList + } + countersignatureSave(this.countersignatureData).then(({data}) => { + if (data && data.code === 0) { + this.CountersignatureFlag = false + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } }) }, diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue index bc3544f..03a9317 100644 --- a/src/views/modules/customer/customerInformationManagement.vue +++ b/src/views/modules/customer/customerInformationManagement.vue @@ -222,12 +222,12 @@ - +
- + @@ -1686,63 +1686,63 @@ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], customerDesc: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], customerIndustry: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], customerCurrency: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], contactName: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], contactPhoneNumber1: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], importantCustomer: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], customerStatus: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], customerType: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], }, @@ -1751,35 +1751,35 @@ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], position: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], primaryContact: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], contactStatus: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], contactPhoneNumber1: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ] }, @@ -1788,28 +1788,28 @@ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], defaultAddress: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], addressStatus: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], addressType: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ] }, @@ -1818,56 +1818,56 @@ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], projectName: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], projectSourceDesc: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], priorityDesc: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], needDate: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], projectManagerName: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], projectOwnerName: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ], userRoleName: [ { required: true, message: ' ', - trigger: 'change' + trigger: ['blur','change'] } ] }, @@ -2097,7 +2097,7 @@ departmentName:'', mailbox: '', primaryContact: 'N', - contactStatus: '', + contactStatus: '启用', remark: '', createDate: '', createBy: this.$store.state.user.name, @@ -2708,14 +2708,14 @@ this.$message.warning('请输入联系人电话(1)!') return } - if (this.contactModalData.position === '' || this.contactModalData.position == null) { - this.$message.warning('请输入公司职务!') - return - } - if(this.contactModalData.departmentName === '' || this.contactModalData.departmentName == null){ - this.$message.warning('请输入部门名称') - return - } + // if (this.contactModalData.position === '' || this.contactModalData.position == null) { + // this.$message.warning('请输入公司职务!') + // return + // } + // if(this.contactModalData.departmentName === '' || this.contactModalData.departmentName == null){ + // this.$message.warning('请输入部门名称') + // return + // } if (this.contactModalData.primaryContact === '' || this.contactModalData.primaryContact == null) { this.$message.warning('请选择是否为默认联系人!') return diff --git a/src/views/modules/sys/dict-data-select.vue b/src/views/modules/sys/dict-data-select.vue index c099735..763a01c 100644 --- a/src/views/modules/sys/dict-data-select.vue +++ b/src/views/modules/sys/dict-data-select.vue @@ -36,7 +36,7 @@ export default { }, disabledOptionsValue:{ type:Array, - default:[], + default:()=>[], } }, data () {