Commit 97bb27f5 authored by 耿迪迪's avatar 耿迪迪

借贷应付金额-交易项目维护删除

parent c01e0b22
...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where> </where>
ORDER BY create_time DESC
</select> </select>
<select id="selectTTransactionProjectById" parameterType="Long" resultMap="TTransactionProjectResult"> <select id="selectTTransactionProjectById" parameterType="Long" resultMap="TTransactionProjectResult">
......
...@@ -219,6 +219,7 @@ ...@@ -219,6 +219,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计息日" prop="sumInterestDate"> <el-form-item label="计息日" prop="sumInterestDate">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
@change="payable()"
v-model="form.sumInterestDate" v-model="form.sumInterestDate"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -230,6 +231,7 @@ ...@@ -230,6 +231,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计还款日" prop="expectedRepaymentDate"> <el-form-item label="预计还款日" prop="expectedRepaymentDate">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
@change="payable()"
v-model="form.expectedRepaymentDate" v-model="form.expectedRepaymentDate"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -240,6 +242,14 @@ ...@@ -240,6 +242,14 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="应还金额">
<el-input v-model="payableAmount" placeholder="请输入应还金额" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="附件" prop="attachmentUrl"> <el-form-item label="附件" prop="attachmentUrl">
<FileUpload <FileUpload
listType="picture" listType="picture"
...@@ -368,7 +378,8 @@ export default { ...@@ -368,7 +378,8 @@ export default {
formDeptOptions: [], formDeptOptions: [],
tab: "0", tab: "0",
debitStatusList: [], debitStatusList: [],
queryDeptOptions: [] queryDeptOptions: [],
payableAmount: null
}; };
}, },
created() { created() {
...@@ -421,6 +432,7 @@ export default { ...@@ -421,6 +432,7 @@ export default {
isDel: null, isDel: null,
remark: null remark: null
}; };
this.payableAmount = null;
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
...@@ -670,8 +682,18 @@ export default { ...@@ -670,8 +682,18 @@ export default {
this.queryParams.beginRegisterTime = value[0]; this.queryParams.beginRegisterTime = value[0];
this.queryParams.endRegisterTime = value[1]; this.queryParams.endRegisterTime = value[1];
} }
} },
//应还金额
payable(){
if(this.form.expectedRepaymentDate && this.form.sumInterestDate && this.form.littleTotal){
let time = new Date(this.form.expectedRepaymentDate).getTime()/ 1000 - new Date(this.form.sumInterestDate).getTime()/ 1000;
let day = Math.round(time / 60 / 60 / 24);
this.payableAmount = (this.form.littleTotal *(1 + 0.08 /360 * day)).toFixed(2);
}else{
this.payableAmount = null;
}
}
} }
}; };
</script> </script>
......
...@@ -258,7 +258,8 @@ export default { ...@@ -258,7 +258,8 @@ export default {
count: null, count: null,
total: null, total: null,
transactor: null, transactor: null,
deptId: null deptId: null,
isDel: '0'
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -423,7 +424,8 @@ export default { ...@@ -423,7 +424,8 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }).then(function() {
return delProject(transactionProjectIds); //return delProject(transactionProjectIds);
return updateProject({transactionProjectId:transactionProjectIds,isDel:"1"});
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
......
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