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

借支申请修改

parent 1089c7cb
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.zehong.framework.systemsetting.SystemSetting; import com.zehong.framework.systemsetting.SystemSetting;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -212,6 +213,18 @@ public class SysUserController extends BaseController ...@@ -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 ...@@ -90,6 +90,7 @@ public class TBorrowingApplyForController extends BaseController
if (StringUtils.isNotNull(user)) { if (StringUtils.isNotNull(user)) {
tBorrowingApplyFor.setHandledByUserId(user.getUserId()); tBorrowingApplyFor.setHandledByUserId(user.getUserId());
} }
tBorrowingApplyFor.setRegistrationDate(new Date());
return toAjax(tBorrowingApplyForService.insertTBorrowingApplyFor(tBorrowingApplyFor)); return toAjax(tBorrowingApplyForService.insertTBorrowingApplyFor(tBorrowingApplyFor));
} }
......
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
/** /**
* 交易项目Controller * 交易项目Controller
* *
* @author zehong * @author zehong
* @date 2023-06-08 * @date 2023-06-08
*/ */
......
...@@ -10,6 +10,15 @@ export function listUser(query) { ...@@ -10,6 +10,15 @@ export function listUser(query) {
}) })
} }
// 查询用户列表 (下拉)
export function listpersonnel() {
return request({
url: '/system/user/selectPersonnel',
method: 'get',
})
}
// 查询用户详细 // 查询用户详细
export function getUser(userId) { export function getUser(userId) {
return request({ return request({
......
...@@ -133,57 +133,55 @@ ...@@ -133,57 +133,55 @@
<el-input v-model="form.feeName" placeholder="请输入费用名称" /> <el-input v-model="form.feeName" placeholder="请输入费用名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="借支部门" prop="borrowingDeptId"> <el-form-item label="使用人" prop="userId">
<treeselect <el-select v-model="form.userId" placeholder="请选择使用人" style="width: 100%">
v-model="form.borrowingDeptId" <el-option v-for="item in transactorList"
:options="formDeptOptions" :key="item.userId"
:show-count="true" :label="item.nickName"
placeholder="请选择部门" :value="item.userId"/>
/> </el-select>
</el-form-item> </el-form-item>
</el-col> </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-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="使用人" prop="userId"> <!-- <el-form-item label="登记日期" prop="registrationDate" >-->
<el-select v-model="form.userId" placeholder="请选择使用人" style="width: 100%"> <!-- <el-date-picker clearable-->
<el-option v-for="item in transactorList" <!-- v-model="form.registrationDate"-->
:key="item.userId" <!-- type="date"-->
:label="item.nickName" <!-- value-format="yyyy-MM-dd"-->
:value="item.userId"/> <!-- placeholder="选择登记日期"-->
</el-select> <!-- style="width: 100%;">-->
</el-form-item> <!-- </el-date-picker>-->
</el-col> <!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12"> <el-col :span="24">
<el-form-item label="登记日期" prop="registrationDate" > <el-form-item label="小写合计" prop="totalFigures">
<el-date-picker clearable <el-input v-model="form.totalFigures" placeholder="请输入小写合计" />
v-model="form.registrationDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择登记日期"
style="width: 100%;">
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<!-- <el-col :span="12">--> <!-- <el-col :span="12">-->
<!-- <el-form-item label="大写合计" prop="totalWords">--> <!-- <el-form-item label="大写合计" prop="totalWords">-->
<!-- <el-input v-model="form.totalWords" placeholder="请输入大写合计" />--> <!-- <el-input v-model="form.totalWords" placeholder="请输入大写合计" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>-->
<el-col :span="24">
<el-form-item label="小写合计" prop="totalFigures">
<el-input v-model="form.totalFigures" placeholder="请输入小写合计" />
</el-form-item>
</el-col>
</el-row>
...@@ -257,7 +255,7 @@ ...@@ -257,7 +255,7 @@
<script> <script>
import { listFor, getFor, delFor, addFor, updateFor, exportFor } from "@/api/system/for"; 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 "@riophae/vue-treeselect";
import { treeselect } from "@/api/system/dept"; import { treeselect } from "@/api/system/dept";
import FileUpload from "@/components/FileUpload"; import FileUpload from "@/components/FileUpload";
...@@ -373,14 +371,14 @@ export default { ...@@ -373,14 +371,14 @@ export default {
}, },
getTransactor() { getTransactor() {
this.form.tradeTransactor = null; this.form.tradeTransactor = null;
if (this.form.borrowingDeptId && this.form.borrowingDeptId != null) { // if (this.form.borrowingDeptId && this.form.borrowingDeptId != null) {
this.form.deptId=this.form.borrowingDeptId; // this.form.deptId=this.form.borrowingDeptId;
listUser(this.form).then( listpersonnel().then(
(res) => { (res) => {
this.transactorList = res.rows; this.transactorList = res.rows;
} }
); );
} // }
}, },
/** 查询借支申请列表 */ /** 查询借支申请列表 */
getList() { 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