diff --git a/src/api/PurchasingCenter/ReceiveCheck.js b/src/api/PurchasingCenter/ReceiveCheck.js index 8fe18b05..7491a60d 100644 --- a/src/api/PurchasingCenter/ReceiveCheck.js +++ b/src/api/PurchasingCenter/ReceiveCheck.js @@ -12,15 +12,14 @@ export function initProject() { }) } // 初始化项目金额统计表 -export function searchReceiveCheck(pageCurrent, pageSize, check, num) { +export function searchReceiveCheck(check, num) { return request({ url: '', method: 'post', data: { type: '1', name: '采购管理_领用核算_查询数据', - param: `项目流水号_check=${check}&项目流水号=${num}`, - Pagination: pageCurrent + '&' + pageSize + param: `项目流水号_check=${check}&项目流水号=${num}` } }) } diff --git a/src/views/BasicData/PersonnelManagement/index.vue b/src/views/BasicData/PersonnelManagement/index.vue index 7e38a3db..e8d75235 100644 --- a/src/views/BasicData/PersonnelManagement/index.vue +++ b/src/views/BasicData/PersonnelManagement/index.vue @@ -3,7 +3,7 @@ - 新增 + 新增 编辑 删除 @@ -187,8 +187,8 @@ @@ -353,7 +353,8 @@ export default { Title: [{ required: true, message: '请输入', trigger: 'change' }], PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }], Education: [{ required: true, message: '请输入', trigger: 'change' }], - Post: [{ required: true, message: '请输入', trigger: 'change' }] + Post: [{ required: true, message: '请输入', trigger: 'change' }], + DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }] }, SexData: [{ value: 1, @@ -365,7 +366,9 @@ export default { EducationDate: [], PostData: [], multipleSelection: [], - nodeName1: [] + nodeName1: [], + count1: 0, + count2: 0 } }, created() { @@ -418,10 +421,14 @@ export default { } } }, - handleAdd() { + handleAdd(formName) { this.department_Title = '新增部门' this.department_DFV = true - this.addForm('department_Form') + this.department_Form.DepartmentName = '' + this.count1 = this.count1 + 1 + if (this.count1 !== 1) { + this.$refs[formName].resetFields() + } }, handleEdit() { this.addForm('department_Form') @@ -433,44 +440,75 @@ export default { this.$message.warning(`请选择要修改的部门`) } }, - submitAdd() { - this.department_DFV = false - if (this.id) { - addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => { - console.log(response.data[0].result === '1') - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('添加成功') + submitAdd(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.department_DFV = false + if (this.id) { + addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('添加成功') + } else { + this.$message.error('添加失败') + } + }) } else { - this.$message.error('添加失败') + addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('添加成功') + } else { + this.$message.error('添加失败') + } + }) } - }) - } else { - addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => { - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('添加成功') - } else { - this.$message.error('添加失败') - } - }) - } - }, - submitEdit() { - this.department_DFV = false - editList(this.id, this.department_Form.DepartmentName).then(response => { - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('编辑成功') } else { - this.$message.error('编辑失败') + return false + } + }) + }, + submitEdit(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.department_DFV = false + editList(this.id, this.department_Form.DepartmentName).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('编辑成功') + } else { + this.$message.error('编辑失败') + } + }) + } else { + return false } }) }, deleteTable() { if (this.id) { - this.deleteRow(delList, this.id, function() { this.getTreeData() }) - this.i = 1 + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + delList(this.id).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.i = 1 + this.id = '' + this.$message({ + message: '已被成功删除', + type: 'success' + }) + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) } else { this.$message.warning(`请选择部门`) } @@ -508,6 +546,7 @@ export default { if (this.id) { addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => { if (response.data[0].result === '1') { + this.i = 1 this.handleNodeClick() this.$message.success('添加成功') } else { diff --git a/src/views/ManufacturingCenter/InitialProduction/index.vue b/src/views/ManufacturingCenter/InitialProduction/index.vue index 3c49e2c3..6e8efd13 100644 --- a/src/views/ManufacturingCenter/InitialProduction/index.vue +++ b/src/views/ManufacturingCenter/InitialProduction/index.vue @@ -167,16 +167,16 @@ - + diff --git a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue index 91ad0e0b..8aa96b4f 100644 --- a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue @@ -53,8 +53,8 @@ diff --git a/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue b/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue index d61faca9..75d13874 100644 --- a/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue +++ b/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue @@ -95,7 +95,7 @@ 查看详情 - 取消请款 + 取消请款 diff --git a/src/views/PurchasingCenter/ProjectTotalSearch/index.vue b/src/views/PurchasingCenter/ProjectTotalSearch/index.vue index 7bbf7971..cf7b6e17 100644 --- a/src/views/PurchasingCenter/ProjectTotalSearch/index.vue +++ b/src/views/PurchasingCenter/ProjectTotalSearch/index.vue @@ -18,7 +18,8 @@ - + + - - - + + + @@ -111,20 +102,10 @@ export default { if (!this.projectValue) { this.$message.error('请选择项目') } else { - searchReceiveCheck(this.pageCurrent, this.pageSize, 1, this.projectValue).then(response => { - this.tableData1 = response.data.rows - this.total = response.data.total + searchReceiveCheck(1, this.projectValue).then(response => { + this.tableData1 = response.data }) } - }, - handleSizeChange(val) { - this.pageSize = val - this.pageCurrent = 1 - this.searchProject() - }, - handleCurrentChange(val) { - this.pageCurrent = val - this.searchProject() } } }