Commit c7ab9608 authored by 耿迪迪's avatar 耿迪迪
parents 96f52008 45742500
...@@ -51,6 +51,10 @@ public class TBorrowingApplyForController extends BaseController ...@@ -51,6 +51,10 @@ public class TBorrowingApplyForController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TBorrowingApplyFor tBorrowingApplyFor) public TableDataInfo list(TBorrowingApplyFor tBorrowingApplyFor)
{ {
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
if (!"核算部".equals(user.getDept().getDeptName())){
tBorrowingApplyFor.setBorrowingDeptId(user.getDeptId());
}
startPage(); startPage();
List<TBorrowingApplyFor> list = tBorrowingApplyForService.selectTBorrowingApplyForList(tBorrowingApplyFor); List<TBorrowingApplyFor> list = tBorrowingApplyForService.selectTBorrowingApplyForList(tBorrowingApplyFor);
return getDataTable(list); return getDataTable(list);
...@@ -89,6 +93,10 @@ public class TBorrowingApplyForController extends BaseController ...@@ -89,6 +93,10 @@ public class TBorrowingApplyForController extends BaseController
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser(); SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
if (StringUtils.isNotNull(user)) { if (StringUtils.isNotNull(user)) {
tBorrowingApplyFor.setHandledByUserId(user.getUserId()); tBorrowingApplyFor.setHandledByUserId(user.getUserId());
//设置经办人部门
tBorrowingApplyFor.setBorrowingDeptId(user.getDeptId());
//设置审批状态
tBorrowingApplyFor.setApprovalStatus(1);
} }
tBorrowingApplyFor.setRegistrationDate(new Date()); tBorrowingApplyFor.setRegistrationDate(new Date());
return toAjax(tBorrowingApplyForService.insertTBorrowingApplyFor(tBorrowingApplyFor)); return toAjax(tBorrowingApplyForService.insertTBorrowingApplyFor(tBorrowingApplyFor));
...@@ -102,29 +110,36 @@ public class TBorrowingApplyForController extends BaseController ...@@ -102,29 +110,36 @@ public class TBorrowingApplyForController extends BaseController
@PutMapping @PutMapping
public int edit(@RequestBody TBorrowingApplyFor tBorrowingApplyFor) public int edit(@RequestBody TBorrowingApplyFor tBorrowingApplyFor)
{ {
if (tBorrowingApplyFor.getApprovalStatus()==3){
//修改借支申请表状态
tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor);
return 3;
}
/**查询部门余额是否足够*/ /**查询部门余额是否足够*/
int isSufficient = tBorrowingApplyForService.selectTacc(tBorrowingApplyFor); int isSufficient = tBorrowingApplyForService.selectTacc(tBorrowingApplyFor);
SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser(); SysUser user = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
tBorrowingApplyFor.setApprovedUserId(user.getUserId()); tBorrowingApplyFor.setApprovedUserId(user.getUserId());
//0部门余额不足 1余额足够 //0部门余额不足 1余额足够
if (isSufficient!=0){ if (isSufficient!=0){
tBorrowingApplyFor.setApprovalTime(new Date());
//修改部门余额 //修改部门余额
tBorrowingApplyForService.deletebBalance(tBorrowingApplyFor); tBorrowingApplyForService.deletebBalance(tBorrowingApplyFor);
//修改借支申请表状态 //修改借支申请表状态
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.setOperateType("2");
tCashOperate.setOperateAmount(tBorrowingApplyFor.getTotalFigures()); tCashOperate.setOperateAmount(tBorrowingApplyFor.getTotalFigures());
tCashOperate.setIsDel("0"); tCashOperate.setIsDel("0");
tCashOperate.setOperateType("2");
tCashOperate.setOperateTime(new Date()); tCashOperate.setOperateTime(new Date());
//增加资金操作记录 //增加资金操作记录
tCashOperateService.insertTCashOperate(tCashOperate); tCashOperateService.insertTCashOperate(tCashOperate);
return 1; return 1;
}else { }else {
tBorrowingApplyFor.setApprovalStatus(3); // tBorrowingApplyFor.setApprovalStatus(3);
//修改借支申请表状态 //修改借支申请表状态
tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor); // tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor);
return 2; return 2;
} }
......
...@@ -54,7 +54,7 @@ public class TBorrowingApplyFor extends BaseEntity ...@@ -54,7 +54,7 @@ public class TBorrowingApplyFor extends BaseEntity
private Long approvedUserId; private Long approvedUserId;
/** 登记日期 */ /** 登记日期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "登记日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "登记日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date registrationDate; private Date registrationDate;
...@@ -66,9 +66,35 @@ public class TBorrowingApplyFor extends BaseEntity ...@@ -66,9 +66,35 @@ public class TBorrowingApplyFor extends BaseEntity
@Excel(name = "是否删除 0未删除 1删除") @Excel(name = "是否删除 0未删除 1删除")
private String isDel; private String isDel;
/**审批状态 1未审批 2审批通过 3审批拒绝 */ /**审批状态 1未审批 2通过 3驳回 */
private Integer approvalStatus; private Integer approvalStatus;
private String deptName;
/**
* 审批时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "登记日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date approvalTime;
public Date getApprovalTime() {
return approvalTime;
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
private String handledByUserIdName; private String handledByUserIdName;
private String userIdName; private String userIdName;
...@@ -236,6 +262,8 @@ public class TBorrowingApplyFor extends BaseEntity ...@@ -236,6 +262,8 @@ public class TBorrowingApplyFor extends BaseEntity
", attachmentUrl='" + attachmentUrl + '\'' + ", attachmentUrl='" + attachmentUrl + '\'' +
", isDel='" + isDel + '\'' + ", isDel='" + isDel + '\'' +
", approvalStatus=" + approvalStatus + ", approvalStatus=" + approvalStatus +
", deptName='" + deptName + '\'' +
", approvalTime=" + approvalTime +
", handledByUserIdName='" + handledByUserIdName + '\'' + ", handledByUserIdName='" + handledByUserIdName + '\'' +
", userIdName='" + userIdName + '\'' + ", userIdName='" + userIdName + '\'' +
", ApprovedUserIdName='" + ApprovedUserIdName + '\'' + ", ApprovedUserIdName='" + ApprovedUserIdName + '\'' +
......
...@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="approvalStatus" column="approval_status" /> <result property="approvalStatus" column="approval_status" />
<result property="approvalTime" column="approval_time" />
</resultMap> </resultMap>
...@@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user c on a.user_id=c.user_id left join sys_user c on a.user_id=c.user_id
left join sys_user d on a.approved_user_id=d.user_id left join sys_user d on a.approved_user_id=d.user_id
<where> <where>
a.is_del='0'
<if test="feeName != null and feeName != ''"> and a.fee_name like concat('%', #{feeName}, '%')</if> <if test="feeName != null and feeName != ''"> and a.fee_name like concat('%', #{feeName}, '%')</if>
<if test="borrowingDeptId != null "> and a.borrowing_dept_id = #{borrowingDeptId}</if> <if test="borrowingDeptId != null "> and a.borrowing_dept_id = #{borrowingDeptId}</if>
<if test="handledByUserId != null "> and a.handled_by_user_id = #{handledByUserId}</if> <if test="handledByUserId != null "> and a.handled_by_user_id = #{handledByUserId}</if>
...@@ -50,8 +52,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,8 +52,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectTBorrowingApplyForById" parameterType="Long" resultMap="TBorrowingApplyForResult"> <select id="selectTBorrowingApplyForById" parameterType="Long" resultMap="TBorrowingApplyForResult">
<include refid="selectTBorrowingApplyForVo"/> SELECT a.*,b.nick_name handledByUserIdName,c.nick_name userIdName,d.nick_name ApprovedUserIdName,e.dept_name deptName FROM t_borrowing_apply_for a
where borrowing = #{borrowing} left join sys_user b on a.handled_by_user_id=b.user_id
left join sys_user c on a.user_id=c.user_id
left join sys_user d on a.approved_user_id=d.user_id
left join sys_dept e on a.borrowing_dept_id=e.dept_id
where a.borrowing = #{borrowing}
</select> </select>
...@@ -73,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -73,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="approvalTime != null">approval_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="borrowing != null">#{borrowing},</if> <if test="borrowing != null">#{borrowing},</if>
...@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="approvalTime != null">#{approvalTime},</if>
</trim> </trim>
</insert> </insert>
...@@ -112,13 +120,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -112,13 +120,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="approvalStatus != null">approval_status = #{approvalStatus},</if> <if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
<if test="approvalTime != null">approval_time = #{approvalTime},</if>
</trim> </trim>
where borrowing = #{borrowing} where borrowing = #{borrowing}
</update> </update>
<delete id="deleteTBorrowingApplyForById" parameterType="Long"> <!-- <delete id="deleteTBorrowingApplyForById" parameterType="Long">-->
delete from t_borrowing_apply_for where borrowing = #{borrowing} <!-- delete from t_borrowing_apply_for where borrowing = #{borrowing}-->
</delete> <!-- </delete>-->
<update id="deleteTBorrowingApplyForById" parameterType="Long">
update t_borrowing_apply_for set is_del='1' where borrowing = #{borrowing}
</update>
<delete id="deleteTBorrowingApplyForByIds" parameterType="String"> <delete id="deleteTBorrowingApplyForByIds" parameterType="String">
delete from t_borrowing_apply_for where borrowing in delete from t_borrowing_apply_for where borrowing in
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8" >
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
...@@ -37,17 +38,17 @@ ...@@ -37,17 +38,17 @@
<!-- v-hasPermi="['system:for:edit']"--> <!-- v-hasPermi="['system:for:edit']"-->
<!-- >修改</el-button>--> <!-- >修改</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
plain <!-- plain-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handleDelete" <!-- @click="handleDelete"-->
v-hasPermi="['system:for:remove']" <!-- v-hasPermi="['system:for:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -75,10 +76,10 @@ ...@@ -75,10 +76,10 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="大写合计" align="center" prop="totalWords" />--> <!-- <el-table-column label="大写合计" align="center" prop="totalWords" />-->
<el-table-column label="小写合计" align="center" prop="totalFigures" /> <el-table-column label="小写合计" align="center" prop="totalFigures" />
<el-table-column label="登记日期" align="center" prop="registrationDate" width="180"> <el-table-column label="申请时间" align="center" prop="registrationDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.registrationDate == null">-</span> <span v-if="scope.row.registrationDate == null">-</span>
<span>{{ parseTime(scope.row.registrationDate, '{y}-{m}-{d}') }}</span> <span>{{scope.row.registrationDate}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" > <el-table-column label="备注" align="center" prop="remark" >
...@@ -90,9 +91,9 @@ ...@@ -90,9 +91,9 @@
<el-table-column label="状态" align="center" prop="eventLevel"> <el-table-column label="状态" align="center" prop="eventLevel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.approvalStatus == null">-</span> <span v-if="scope.row.approvalStatus == null">-</span>
<span v-if="scope.row.approvalStatus == 1"style="color: #1ab394">未审批</span> <span v-if="scope.row.approvalStatus == 1">待核算部核算</span>
<span v-if="scope.row.approvalStatus == 2"style="color: #2338b3">审批通过</span> <span v-if="scope.row.approvalStatus == 2">通过</span>
<span v-if="scope.row.approvalStatus == 3"style="color: #960602 ">审批拒绝</span> <span v-if="scope.row.approvalStatus == 3">驳回</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
...@@ -101,6 +102,13 @@ ...@@ -101,6 +102,13 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="details(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.approvalStatus == 1"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:for:approved']" v-hasPermi="['system:for:approved']"
>审批</el-button> >审批</el-button>
...@@ -108,6 +116,7 @@ ...@@ -108,6 +116,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
v-if="(scope.row.approvalStatus == 1||scope.row.approvalStatus == 3)&&scope.row.handledByUserId==$store.state.user.userId"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
</template> </template>
...@@ -122,134 +131,359 @@ ...@@ -122,134 +131,359 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改借支申请对话框 --> <el-dialog :title="title" :visible.sync="inser" width="800px" destroy-on-close>
<el-dialog :title="title" :visible.sync="open" width="800px" destroy-on-close> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-row>
<el-col :span="12">
<el-form-item label="费用名称" prop="feeName">
<el-input v-model="form.feeName" placeholder="请输入费用名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用人" prop="userId">
<el-select v-model="form.userId" placeholder="请选择使用人" style="width: 100%">
<el-option v-for="item in transactorList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="借支部门" prop="borrowingDeptId">-->
<!-- <treeselect-->
<!-- v-model="form.borrowingDeptId"-->
<!-- :options="formDeptOptions"-->
<!-- :show-count="true"-->
<!-- placeholder="请选择部门"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="登记日期" prop="registrationDate" >-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.registrationDate"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择登记日期"-->
<!-- style="width: 100%;">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-row> <el-col :span="24">
<el-col :span="12"> <el-form-item label="小写合计" prop="totalFigures">
<el-form-item label="费用名称" prop="feeName"> <el-input v-model="form.totalFigures" placeholder="请输入小写合计" />
<el-input v-model="form.feeName" placeholder="请输入费用名称" /> </el-form-item>
</el-form-item> </el-col>
</el-col> </el-row>
<el-col :span="12">
<el-form-item label="使用人" prop="userId"> <!-- <el-row>-->
<el-select v-model="form.userId" placeholder="请选择使用人" style="width: 100%"> <!-- <el-col :span="12">-->
<el-option v-for="item in transactorList" <!-- <el-form-item label="大写合计" prop="totalWords">-->
:key="item.userId" <!-- <el-input v-model="form.totalWords" placeholder="请输入大写合计" />-->
:label="item.nickName" <!-- </el-form-item>-->
:value="item.userId"/> <!-- </el-col>-->
</el-select> <!-- </el-row>-->
</el-form-item>
</el-col>
<el-form-item label="用途说明" prop="applicationDescription">
<el-input v-model="form.applicationDescription" type="textarea" placeholder="请输入用途说明" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<el-form-item v-if="form.attachmentUrl !=null" label="附件" prop="attachmentUrl">
<div style="height: 60px;width: 100px;margin-top: 5px">
<img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
<img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
</div>
</el-form-item>
<el-form-item v-if="form.borrowing ==null" label="附件" prop="attachmentUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
:fileSize="500"
:fileType="[
'png',
'jpg',
'jpeg',
'mp4',
'doc',
'xls',
'ppt',
'txt',
'pdf',
]"
/>
<el-input
v-show="false"
disabled
v-model="form.attachmentUrl"
></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center" >
<el-button v-if="this.form.borrowing ==null" type="primary" style="width: 150px" @click="submitForm"
>提交申请</el-button
>
<el-button style="width: 150px; border-color: #1890ff; color: #1890ff" @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 添加或修改借支申请对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" destroy-on-close>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="100px">-->
<!-- <el-row>-->
<!-- <el-col :span="12">--> <!-- <el-col :span="12">-->
<!-- <el-form-item label="借支部门" prop="borrowingDeptId">--> <!-- <el-form-item label="费用名称" prop="feeName">-->
<!-- <treeselect--> <!-- <el-input v-model="form.feeName" placeholder="请输入费用名称" />-->
<!-- v-model="form.borrowingDeptId"--> <!-- </el-form-item>-->
<!-- :options="formDeptOptions"-->
<!-- :show-count="true"-->
<!-- placeholder="请选择部门"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
</el-row>
<el-row>
<!-- <el-col :span="12">--> <!-- <el-col :span="12">-->
<!-- <el-form-item label="登记日期" prop="registrationDate" >--> <!-- <el-form-item label="使用人" prop="userId">-->
<!-- <el-date-picker clearable--> <!-- <el-select v-model="form.userId" placeholder="请选择使用人" style="width: 100%">-->
<!-- v-model="form.registrationDate"--> <!-- <el-option v-for="item in transactorList"-->
<!-- type="date"--> <!-- :key="item.userId"-->
<!-- value-format="yyyy-MM-dd"--> <!-- :label="item.nickName"-->
<!-- placeholder="选择登记日期"--> <!-- :value="item.userId"/>-->
<!-- style="width: 100%;">--> <!-- </el-select>-->
<!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!--&lt;!&ndash; <el-col :span="12">&ndash;&gt;-->
<el-col :span="24"> <!--&lt;!&ndash; <el-form-item label="借支部门" prop="borrowingDeptId">&ndash;&gt;-->
<el-form-item label="小写合计" prop="totalFigures"> <!--&lt;!&ndash; <treeselect&ndash;&gt;-->
<el-input v-model="form.totalFigures" placeholder="请输入小写合计" /> <!--&lt;!&ndash; v-model="form.borrowingDeptId"&ndash;&gt;-->
</el-form-item> <!--&lt;!&ndash; :options="formDeptOptions"&ndash;&gt;-->
</el-col> <!--&lt;!&ndash; :show-count="true"&ndash;&gt;-->
</el-row> <!--&lt;!&ndash; placeholder="请选择部门"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!--&lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </el-row>-->
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="12">--> <!--&lt;!&ndash; <el-col :span="12">&ndash;&gt;-->
<!-- <el-form-item label="大写合计" prop="totalWords">--> <!--&lt;!&ndash; <el-form-item label="登记日期" prop="registrationDate" >&ndash;&gt;-->
<!-- <el-input v-model="form.totalWords" placeholder="请输入大写合计" />--> <!--&lt;!&ndash; <el-date-picker clearable&ndash;&gt;-->
<!-- </el-form-item>--> <!--&lt;!&ndash; v-model="form.registrationDate"&ndash;&gt;-->
<!--&lt;!&ndash; type="date"&ndash;&gt;-->
<!--&lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="选择登记日期"&ndash;&gt;-->
<!--&lt;!&ndash; style="width: 100%;">&ndash;&gt;-->
<!--&lt;!&ndash; </el-date-picker>&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!--&lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="小写合计" prop="totalFigures">-->
<!-- <el-input v-model="form.totalFigures" placeholder="请输入小写合计" />-->
<!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<!--&lt;!&ndash; <el-row>&ndash;&gt;-->
<!--&lt;!&ndash; <el-col :span="12">&ndash;&gt;-->
<!--&lt;!&ndash; <el-form-item label="大写合计" prop="totalWords">&ndash;&gt;-->
<!--&lt;!&ndash; <el-input v-model="form.totalWords" placeholder="请输入大写合计" />&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!--&lt;!&ndash; </el-col>&ndash;&gt;-->
<!--&lt;!&ndash; </el-row>&ndash;&gt;-->
<el-form-item label="用途说明" prop="applicationDescription">
<el-input v-model="form.applicationDescription" type="textarea" placeholder="请输入用途说明" />
</el-form-item>
<!-- <el-form-item label="用途说明" prop="applicationDescription">-->
<!-- <el-input v-model="form.applicationDescription" type="textarea" placeholder="请输入用途说明" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="form.borrowing !=null" label="附件" prop="attachmentUrl">-->
<!-- <div style="height: 60px;width: 100px;margin-top: 5px">-->
<!-- <img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>-->
<!-- <img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="form.borrowing ==null" label="附件" prop="attachmentUrl">-->
<!-- <FileUpload-->
<!-- listType="picture"-->
<!-- @resFun="getFileInfo"-->
<!-- @remove="listRemove"-->
<!-- :fileArr="fileList"-->
<!-- :fileSize="500"-->
<!-- :fileType="[-->
<!-- 'png',-->
<!-- 'jpg',-->
<!-- 'jpeg',-->
<!-- 'mp4',-->
<!-- 'doc',-->
<!-- 'xls',-->
<!-- 'ppt',-->
<!-- 'txt',-->
<!-- 'pdf',-->
<!-- ]"-->
<!-- />-->
<!-- <el-input-->
<!-- v-show="false"-->
<!-- disabled-->
<!-- v-model="form.attachmentUrl"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-form label-width="100px" ref="form" :model="form">
<el-row>
<el-col :span="7">
<el-form-item label="费用名称">{{form.feeName}}</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="使用人">{{form.userIdName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人">{{form.handledByUserIdName}}</el-form-item>
</el-col>
<!-- <el-col :span="5">-->
<!-- <el-form-item label="审批人">{{form.approvedUserIdName}}</el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="7">
<el-form-item label="借支部门">{{form.deptName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请时间">{{form.registrationDate}}</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="小写合计">{{form.totalFigures}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="用途说明">{{form.applicationDescription}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="备注">{{form.remark}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-form-item label="备注" prop="remark"> <el-row>
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" /> <el-col :span="24">
</el-form-item> <el-form-item label="审批人">{{form.approvedUserIdName}}</el-form-item>
</el-col>
</el-row>
<el-form-item v-if="form.borrowing !=null" label="附件" prop="attachmentUrl">
<div style="height: 60px;width: 100px;margin-top: 5px">
<img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
<img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
</div>
</el-form-item>
<el-form-item v-if="form.borrowing ==null" label="附件" prop="attachmentUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
:fileSize="500"
:fileType="[
'png',
'jpg',
'jpeg',
'mp4',
'doc',
'xls',
'ppt',
'txt',
'pdf',
]"
/>
<el-input
v-show="false"
disabled
v-model="form.attachmentUrl"
></el-input>
</el-form-item>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item v-if="form.attachmentUrl !=null" label="附件" prop="attachmentUrl">
<div style="height: 60px;width: 100px;margin-top: 5px">
<img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
<img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-divider v-if="form.attachmentUrl !=null"></el-divider>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center" > <div slot="footer" class="dialog-footer" style="text-align: center" >
<!-- <el-button-->
<!-- style="width: 150px; border-color: #1890ff; color: #1890ff"-->
<!-- @click="reset"-->
<!-- >内容重置</el-button-->
<!-- >-->
<el-button v-if="this.form.borrowing ==null" type="primary" style="width: 150px" @click="submitForm"
>提交申请</el-button
>
<el-button v-if="this.form.borrowing !=null" v-hasPermi="['system:for:approved']" type="primary" style="width: 150px" @click="submitForm(2)" <el-button v-if="this.form.borrowing !=null" v-hasPermi="['system:for:approved']" type="primary" style="width: 150px" @click="submitForm(2)"
>审批通过</el-button >通过</el-button
> >
<el-button v-if="this.form.borrowing !=null" v-hasPermi="['system:for:approved']" type="primary" style="width: 150px" @click="submitForm(3)" <el-button v-if="this.form.borrowing !=null" v-hasPermi="['system:for:approved']" type="primary" style="width: 150px" @click="submitForm(3)"
>审批拒绝</el-button >驳回</el-button
> >
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<el-button style="width: 150px; border-color: #1890ff; color: #1890ff" @click="cancel">取 消</el-button> <el-button style="width: 150px; border-color: #1890ff; color: #1890ff" @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 详情对话框 -->
<el-dialog :title="title" :visible.sync="detail" width="800px" destroy-on-close>
<el-form label-width="100px" ref="form" :model="form">
<el-row>
<el-col :span="7">
<el-form-item label="费用名称">{{form.feeName}}</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="使用人">{{form.userIdName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人">{{form.handledByUserIdName}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="7">
<el-form-item label="借支部门">{{form.deptName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请时间">{{form.registrationDate}}</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="小写合计">{{form.totalFigures}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="用途说明">{{form.applicationDescription}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="备注">{{form.remark}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="审批人">{{form.approvedUserIdName}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item v-if="form.attachmentUrl !=null" label="附件" prop="attachmentUrl">
<div style="height: 60px;width: 100px;margin-top: 5px">
<img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
<img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-divider v-if="form.attachmentUrl !=null"></el-divider>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
...@@ -288,6 +522,10 @@ export default { ...@@ -288,6 +522,10 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
//添加弹出层
inser:false,
//详情弹出层
detail:false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -392,6 +630,7 @@ export default { ...@@ -392,6 +630,7 @@ export default {
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
this.inser=false;
this.reset(); this.reset();
}, },
// 表单重置 // 表单重置
...@@ -436,8 +675,43 @@ export default { ...@@ -436,8 +675,43 @@ export default {
handleAdd() { handleAdd() {
this.transactorList=[]; this.transactorList=[];
this.reset(); this.reset();
this.open = true; this.inser = true;
this.title = "添加借支申请"; this.title = "借支申请";
},
/**详情*/
details(row){
this.reset();
const borrowing = row.borrowing || this.ids
getFor(borrowing).then(response => {
this.form = response.data;
this.detail = true;
this.title = "详情信息";
});
this.form.attachmentUrl = this.form.attachmentUrl;
this.fileList = [
{
name: res.fileName,
url: uploadfile,
},
];
treeselect().then((response) => {
this.formDeptOptions = response.data;
// 申请服务时买方不能选自己部门
var items = this.formDeptOptions[0].children;
var result = [];
var j=0;
for(var i=0; i<items.length; i++){
if(items[i].id != this.$store.state.user.deptId){
result[j] = items[i];
j++;
}
}
this.formDeptOptions[0].children = result;
});
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -446,7 +720,7 @@ export default { ...@@ -446,7 +720,7 @@ export default {
getFor(borrowing).then(response => { getFor(borrowing).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改借支申请"; this.title = "审批借支申请";
}); });
this.form.attachmentUrl = this.form.attachmentUrl; this.form.attachmentUrl = this.form.attachmentUrl;
this.fileList = [ this.fileList = [
...@@ -481,15 +755,15 @@ export default { ...@@ -481,15 +755,15 @@ export default {
if (this.form.borrowing != null) { if (this.form.borrowing != null) {
this.form.approvalStatus=row; this.form.approvalStatus=row;
updateFor(this.form).then(response => { updateFor(this.form).then(response => {
console.log(response)
if (response==2){ if (response==2){
// alert("部门余额不足,审批拒绝") // alert("部门余额不足,审批拒绝")
// this.msgSuccess("部门余额不足,审批拒绝"); // this.msgSuccess("部门余额不足,审批拒绝");
this.$alert('部门余额不足,审批拒绝', '提示', { // this.$alert('部门余额不足,审批拒绝', '提示', {
confirmButtonText: '确定', // confirmButtonText: '确定',
}) // })
this.msgSuccess("部门余额不足");
}else { }else{
// alert("审批成功") // alert("审批成功")
this.msgSuccess("审批成功"); this.msgSuccess("审批成功");
} }
...@@ -499,8 +773,8 @@ export default { ...@@ -499,8 +773,8 @@ export default {
}); });
} else { } else {
addFor(this.form).then(response => { addFor(this.form).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("申请提交");
this.open = false; this.inser = false;
this.getList(); this.getList();
}); });
} }
...@@ -558,11 +832,11 @@ export default { ...@@ -558,11 +832,11 @@ export default {
//border-bottom: 1px solid #ebebeb; //border-bottom: 1px solid #ebebeb;
//margin-bottom: 24px; //margin-bottom: 24px;
} }
ul li { /*ul li {*/
margin: 0; /* margin: 0;*/
padding: 0; /* padding: 0;*/
list-style: none; /* list-style: none;*/
} /*}*/
.tab-tilte { .tab-tilte {
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
letter-spacing: 0; letter-spacing: 0;
......
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