Commit 0b5887c3 authored by 吴卿华's avatar 吴卿华

借支申请修改

parent 1089c7cb
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.stream.Collectors;
import com.zehong.framework.systemsetting.SystemSetting;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
......@@ -212,6 +213,18 @@ public class SysUserController extends BaseController
}
/**
* 查询当前部门名下人员
* @return
*/
@GetMapping("/selectPersonnel")
public TableDataInfo selectPersonnel(){
SysUser usern = tokenService.getLoginUser(ServletUtils.getRequest()).getUser();
SysUser user=new SysUser();
user.setDeptId(usern.getDeptId());
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
}
......@@ -90,6 +90,7 @@ public class TBorrowingApplyForController extends BaseController
if (StringUtils.isNotNull(user)) {
tBorrowingApplyFor.setHandledByUserId(user.getUserId());
}
tBorrowingApplyFor.setRegistrationDate(new Date());
return toAjax(tBorrowingApplyForService.insertTBorrowingApplyFor(tBorrowingApplyFor));
}
......
......@@ -16,7 +16,7 @@ import java.util.List;
/**
* 交易项目Controller
*
*
* @author zehong
* @date 2023-06-08
*/
......
......@@ -10,6 +10,15 @@ export function listUser(query) {
})
}
// 查询用户列表 (下拉)
export function listpersonnel() {
return request({
url: '/system/user/selectPersonnel',
method: 'get',
})
}
// 查询用户详细
export function getUser(userId) {
return request({
......
......@@ -133,57 +133,55 @@
<el-input v-model="form.feeName" placeholder="请输入费用名称" />
</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 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="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="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-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-col :span="24">
<el-form-item label="小写合计" prop="totalFigures">
<el-input v-model="form.totalFigures" placeholder="请输入小写合计" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="大写合计" prop="totalWords">-->
<!-- <el-input v-model="form.totalWords" placeholder="请输入大写合计" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item label="小写合计" prop="totalFigures">
<el-input v-model="form.totalFigures" placeholder="请输入小写合计" />
</el-form-item>
</el-col>
</el-row>
<!-- </el-row>-->
......@@ -257,7 +255,7 @@
<script>
import { listFor, getFor, delFor, addFor, updateFor, exportFor } from "@/api/system/for";
import { selectTransactorByDeptId,listUser } from "@/api/system/user";
import { selectTransactorByDeptId,listUser,listpersonnel } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import { treeselect } from "@/api/system/dept";
import FileUpload from "@/components/FileUpload";
......@@ -373,14 +371,14 @@ export default {
},
getTransactor() {
this.form.tradeTransactor = null;
if (this.form.borrowingDeptId && this.form.borrowingDeptId != null) {
this.form.deptId=this.form.borrowingDeptId;
listUser(this.form).then(
// if (this.form.borrowingDeptId && this.form.borrowingDeptId != null) {
// this.form.deptId=this.form.borrowingDeptId;
listpersonnel().then(
(res) => {
this.transactorList = res.rows;
}
);
}
// }
},
/** 查询借支申请列表 */
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