Commit 3525ae4d authored by 王晓倩's avatar 王晓倩

借支申请修改、审批功能bug修复

parent 6417f417
...@@ -149,11 +149,11 @@ public class TBorrowingApplyForController extends BaseController ...@@ -149,11 +149,11 @@ public class TBorrowingApplyForController extends BaseController
/** /**
* 修改借支申请 * 审批借支申请
*/ */
@Log(title = "借支申请", businessType = BusinessType.UPDATE) @Log(title = "审批借支申请", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public int edit(@RequestBody TBorrowingApplyFor tBorrowingApplyFor) public int update(@RequestBody TBorrowingApplyFor tBorrowingApplyFor)
{ {
tBorrowingApplyFor.setApprovalTime(new Date()); tBorrowingApplyFor.setApprovalTime(new Date());
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser(); SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
...@@ -174,10 +174,11 @@ public class TBorrowingApplyForController extends BaseController ...@@ -174,10 +174,11 @@ public class TBorrowingApplyForController extends BaseController
tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor); tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor);
TCashOperate tCashOperate=new TCashOperate(); TCashOperate tCashOperate=new TCashOperate();
tCashOperate.setOperateDeptId(tBorrowingApplyFor.getBorrowingDeptId()); tCashOperate.setOperateDeptId(tBorrowingApplyFor.getBorrowingDeptId());
tCashOperate.setOperateType("2"); tCashOperate.setOperatePersonId(tBorrowingApplyFor.getHandledByUserId()); //借支经办人记作操作人
tCashOperate.setOperateType("9"); //操作类型
tCashOperate.setOperateAmount(tBorrowingApplyFor.getTotalFigures()); tCashOperate.setOperateAmount(tBorrowingApplyFor.getTotalFigures());
tCashOperate.setIsDel("0"); tCashOperate.setIsDel("0");
tCashOperate.setDocumentType("9"); tCashOperate.setDocumentType("2"); //单据类型
tCashOperate.setRelationDoc(String.valueOf(tBorrowingApplyFor.getBorrowing())); tCashOperate.setRelationDoc(String.valueOf(tBorrowingApplyFor.getBorrowing()));
tCashOperate.setOperateTime(new Date()); tCashOperate.setOperateTime(new Date());
//增加资金操作记录 //增加资金操作记录
...@@ -192,6 +193,16 @@ public class TBorrowingApplyForController extends BaseController ...@@ -192,6 +193,16 @@ public class TBorrowingApplyForController extends BaseController
} }
/**
* 修改借支申请
*/
@Log(title = "修改借支申请")
@PutMapping("/edit")
public AjaxResult edit(@RequestBody TBorrowingApplyFor tBorrowingApplyFor)
{
return toAjax(tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor));
}
/** /**
* 删除借支申请 * 删除借支申请
*/ */
......
...@@ -43,7 +43,7 @@ export function addFor(data) { ...@@ -43,7 +43,7 @@ export function addFor(data) {
}) })
} }
// 修改借支申请 // 审批借支申请
export function updateFor(data) { export function updateFor(data) {
return request({ return request({
url: '/system/for', url: '/system/for',
...@@ -52,6 +52,15 @@ export function updateFor(data) { ...@@ -52,6 +52,15 @@ export function updateFor(data) {
}) })
} }
// 修改借支申请
export function editFor(data) {
return request({
url: '/system/for/edit',
method: 'put',
data: data
})
}
// 删除借支申请 // 删除借支申请
export function delFor(borrowing) { export function delFor(borrowing) {
return request({ return request({
......
...@@ -593,7 +593,7 @@ ...@@ -593,7 +593,7 @@
</template> </template>
<script> <script>
import { listFor, getFor, delFor, addFor, updateFor, exportFor ,getDepartmentBalance } from "@/api/system/for"; import { listFor, getFor, delFor, addFor, updateFor, editFor, exportFor ,getDepartmentBalance } from "@/api/system/for";
import { selectTransactorByDeptId,listUser,listpersonnel } from "@/api/system/user"; import { selectTransactorByDeptId,listUser,listpersonnel } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import { treeselect } from "@/api/system/dept"; import { treeselect } from "@/api/system/dept";
...@@ -898,7 +898,7 @@ export default { ...@@ -898,7 +898,7 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮(新增、审批) */
submitForm(row) { submitForm(row) {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
...@@ -937,10 +937,11 @@ export default { ...@@ -937,10 +937,11 @@ export default {
} }
}); });
}, },
/** 修改借支申请 */
editSubmitForm() { editSubmitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
updateFor(this.form).then(response => { editFor(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.editOpen = false; this.editOpen = false;
this.getList(); this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment