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

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

parent 6417f417
......@@ -149,11 +149,11 @@ public class TBorrowingApplyForController extends BaseController
/**
* 修改借支申请
* 审批借支申请
*/
@Log(title = "借支申请", businessType = BusinessType.UPDATE)
@Log(title = "审批借支申请", businessType = BusinessType.UPDATE)
@PutMapping
public int edit(@RequestBody TBorrowingApplyFor tBorrowingApplyFor)
public int update(@RequestBody TBorrowingApplyFor tBorrowingApplyFor)
{
tBorrowingApplyFor.setApprovalTime(new Date());
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
......@@ -174,10 +174,11 @@ public class TBorrowingApplyForController extends BaseController
tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor);
TCashOperate tCashOperate=new TCashOperate();
tCashOperate.setOperateDeptId(tBorrowingApplyFor.getBorrowingDeptId());
tCashOperate.setOperateType("2");
tCashOperate.setOperatePersonId(tBorrowingApplyFor.getHandledByUserId()); //借支经办人记作操作人
tCashOperate.setOperateType("9"); //操作类型
tCashOperate.setOperateAmount(tBorrowingApplyFor.getTotalFigures());
tCashOperate.setIsDel("0");
tCashOperate.setDocumentType("9");
tCashOperate.setDocumentType("2"); //单据类型
tCashOperate.setRelationDoc(String.valueOf(tBorrowingApplyFor.getBorrowing()));
tCashOperate.setOperateTime(new Date());
//增加资金操作记录
......@@ -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) {
})
}
// 修改借支申请
// 审批借支申请
export function updateFor(data) {
return request({
url: '/system/for',
......@@ -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) {
return request({
......
......@@ -593,7 +593,7 @@
</template>
<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 Treeselect from "@riophae/vue-treeselect";
import { treeselect } from "@/api/system/dept";
......@@ -898,7 +898,7 @@ export default {
});
},
/** 提交按钮 */
/** 提交按钮(新增、审批) */
submitForm(row) {
this.$refs["form"].validate(valid => {
if (valid) {
......@@ -937,10 +937,11 @@ export default {
}
});
},
/** 修改借支申请 */
editSubmitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
updateFor(this.form).then(response => {
editFor(this.form).then(response => {
this.msgSuccess("修改成功");
this.editOpen = false;
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