diff --git a/src/api/contract/contract.js b/src/api/contract/contract.js index 8dea8d6..8a093ed 100644 --- a/src/api/contract/contract.js +++ b/src/api/contract/contract.js @@ -32,10 +32,10 @@ export function delContract(params){ }) } -export function editorContract(post){ +export function editorContract(data){ return request({ method:'post', url:'/api/admin/contract/save', - post + data }) } diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue index ce70c66..13124c3 100644 --- a/src/views/budget/budgetList.vue +++ b/src/views/budget/budgetList.vue @@ -45,12 +45,13 @@ + @@ -112,7 +113,8 @@ - + + @@ -344,21 +346,28 @@ export default { //修改 editorTable(){ - editorBudget({ - id:this.editorForm.id, - type:this.editorForm.type, - year:this.editorForm.year, - content:this.editorForm.content, - money:this.editorForm.money, - remark:this.editorForm.remark, - plan_department_id:this.editorForm.department - }).then(res=>{ - this.isShowEditor = false - Message({ - message:'操作成功', - type:'success' + this.$refs['editorDialog'].$refs['elForm'].validate().then(res=>{ + editorBudget({ + id:this.editorForm.id, + type:this.editorForm.type, + year:this.editorForm.year, + content:this.editorForm.content, + money:this.editorForm.money, + remark:this.editorForm.remark, + plan_department_id:this.editorForm.department + }).then(res=>{ + this.isShowEditor = false + Message({ + message:'操作成功', + type:'success' + }) + this.getBudgets() + }) + }).catch(err=>{ + this.$message({ + message:'请填写完整信息', + type:'error' }) - this.getBudgets() }) }, showEditor(row){ @@ -376,6 +385,7 @@ export default { remark:res.remark } this.isShowEditor = true + console.log(this.editorForm) }) }, }, diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue new file mode 100644 index 0000000..13268bf --- /dev/null +++ b/src/views/contract/components/editorContract.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 8ef1c3f..7f74a83 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -82,7 +82,17 @@ - + + +
@@ -244,7 +254,7 @@