Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
precision-effect
Commits
233786d7
Commit
233786d7
authored
Jun 24, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
采购代码优化
parents
e08800cf
26dff63c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
32 deletions
+78
-32
TBorrowingApplyForController.java
.../controller/transaction/TBorrowingApplyForController.java
+21
-0
TPurchase.java
...tem/src/main/java/com/zehong/system/domain/TPurchase.java
+2
-2
TPurchaseServiceImpl.java
.../com/zehong/system/service/impl/TPurchaseServiceImpl.java
+1
-0
TTradeProjectMapper.xml
...rc/main/resources/mapper/business/TTradeProjectMapper.xml
+1
-1
for.js
precision-effect-web/src/api/system/for.js
+10
-1
index.vue
precision-effect-web/src/views/for/index.vue
+30
-24
Calculate.vue
...on-effect-web/src/views/purchase/components/Calculate.vue
+8
-1
index.vue
precision-effect-web/src/views/purchase/index.vue
+3
-3
Evaluate.vue
precision-effect-web/src/views/trade/components/Evaluate.vue
+1
-0
TableList.vue
...ision-effect-web/src/views/trade/components/TableList.vue
+1
-0
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TBorrowingApplyForController.java
View file @
233786d7
...
...
@@ -94,6 +94,7 @@ public class TBorrowingApplyForController extends BaseController
@PostMapping
public
AjaxResult
add
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
{
// 获取当前用户
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(
StringUtils
.
isNotNull
(
user
))
{
...
...
@@ -107,6 +108,26 @@ public class TBorrowingApplyForController extends BaseController
return
toAjax
(
tBorrowingApplyForService
.
insertTBorrowingApplyFor
(
tBorrowingApplyFor
));
}
/**
* 查询部门余额是否足够
* @param tBorrowingApplyFor
* @return
*/
@GetMapping
(
"/departmentBalance"
)
public
int
departmentBalance
(
TBorrowingApplyFor
tBorrowingApplyFor
){
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
tBorrowingApplyFor
.
setApprovedUserId
(
user
.
getUserId
());
/**查询部门余额是否足够*/
int
isSufficient
=
tBorrowingApplyForService
.
selectTacc
(
tBorrowingApplyFor
);
//0部门余额不足 1余额足够
if
(
isSufficient
!=
0
){
return
1
;
}
else
{
return
2
;
}
}
/**
* 修改借支申请
*/
...
...
precision-effect-system/src/main/java/com/zehong/system/domain/TPurchase.java
View file @
233786d7
...
...
@@ -105,8 +105,8 @@ public class TPurchase extends BaseEntity
private
String
purchaseStatus
;
/** 审核时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"审核时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"审核时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
private
Date
approvedTime
;
/**
...
...
precision-effect-system/src/main/java/com/zehong/system/service/impl/TPurchaseServiceImpl.java
View file @
233786d7
...
...
@@ -162,6 +162,7 @@ public class TPurchaseServiceImpl implements ITPurchaseService
operate
.
setOperateTime
(
new
Date
());
operate
.
setRelationDoc
(
String
.
valueOf
(
tPurchase
.
getPurchaseId
()));
operate
.
setOperateType
(
"4"
);
operate
.
setDocumentType
(
"3"
);
//1.交易单 2.借支单 3.外部采购单 4.借贷单
tCashOperateMapper
.
insertTCashOperate
(
operate
);
}
}
precision-effect-system/src/main/resources/mapper/business/TTradeProjectMapper.xml
View file @
233786d7
...
...
@@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"queryApplyDeptId != null"
>
and apply_dept_id = #{queryApplyDeptId}
</if>
<if
test=
"queryTradeDeptId != null"
>
and trade_dept_id = #{queryTradeDeptId}
</if>
</where>
order by update_time desc
order by update_time
,create_time
desc
</select>
<select
id=
"selectTTradeProjectById"
parameterType=
"Long"
resultMap=
"TTradeProjectResult"
>
...
...
precision-effect-web/src/api/system/for.js
View file @
233786d7
...
...
@@ -9,6 +9,15 @@ export function listFor(query) {
})
}
//查询部门余额是否足够
export
function
getDepartmentBalance
(
data
)
{
return
request
({
url
:
'/system/for/departmentBalance'
,
method
:
'get'
,
data
:
data
})
}
// 查询借支申请详细
export
function
getFor
(
borrowing
)
{
return
request
({
...
...
@@ -50,4 +59,4 @@ export function exportFor(query) {
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
}
precision-effect-web/src/views/for/index.vue
View file @
233786d7
...
...
@@ -380,13 +380,15 @@
<el-divider></el-divider>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"用途说明"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
v-if=
"form.applicationDescription!=null"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
>
-
</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-form-item
label=
"备注"
v-if=
"form.remark!=null"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
...
...
@@ -446,7 +448,8 @@
<el-form-item
label=
"申请时间"
>
{{form.registrationDate}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"审批时间"
>
{{form.approvalTime}}
</el-form-item>
<el-form-item
label=
"审批时间"
v-if=
"form.approvalTime!=null"
>
{{form.approvalTime}}
</el-form-item>
<el-form-item
label=
"审批时间"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
...
...
@@ -454,10 +457,12 @@
<el-row
style=
"height: 15px"
>
<el-col
:span=
"7"
>
<el-form-item
label=
"小写合计"
>
{{form.totalFigures}}
</el-form-item>
<el-form-item
label=
"小写合计"
v-if=
"form.totalFigures!=null"
>
{{form.totalFigures}}
</el-form-item>
<el-form-item
label=
"小写合计"
v-else
>
-
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"用途说明"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
v-if=
"form.applicationDescription!=null"
>
{{form.applicationDescription}}
</el-form-item>
<el-form-item
label=
"用途说明"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
...
...
@@ -466,14 +471,16 @@
<el-divider></el-divider>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
v-if=
"form.remark!=null"
>
{{form.remark}}
</el-form-item>
<el-form-item
label=
"备注"
v-else
>
-
</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-form-item
label=
"审批人"
v-if=
"form.approvedUserIdName!=null"
>
{{form.approvedUserIdName}}
</el-form-item>
<el-form-item
label=
"审批人"
v-else
>
-
</el-form-item>
</el-col>
</el-row>
...
...
@@ -495,7 +502,7 @@
</template>
<
script
>
import
{
listFor
,
getFor
,
delFor
,
addFor
,
updateFor
,
exportFor
}
from
"@/api/system/for"
;
import
{
listFor
,
getFor
,
delFor
,
addFor
,
updateFor
,
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"
;
...
...
@@ -769,17 +776,7 @@ export default {
this
.
form
.
approvalStatus
=
row
;
updateFor
(
this
.
form
).
then
(
response
=>
{
if
(
response
==
2
){
// alert("部门余额不足,审批拒绝")
// this.msgSuccess("部门余额不足,审批拒绝");
// this.$alert('部门余额不足,审批拒绝', '提示', {
// confirmButtonText: '确定',
// })
// this.msgSuccess("部门余额不足");
this
.
$message
({
message
:
'部门余额不足'
,
type
:
'warning'
});
this
.
$message
.
error
(
'部门余额不足'
);
}
else
{
// alert("审批成功")
this
.
msgSuccess
(
"审批成功"
);
...
...
@@ -789,11 +786,20 @@ export default {
});
}
else
{
addFor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"申请提交"
);
this
.
inser
=
false
;
this
.
getList
();
});
getDepartmentBalance
(
this
.
form
).
then
(
response
=>
{
if
(
response
==
2
){
this
.
$message
.
error
(
'部门余额不足'
);
}
else
{
addFor
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"申请提交"
);
this
.
inser
=
false
;
this
.
getList
();
});
}
})
}
}
});
...
...
precision-effect-web/src/views/purchase/components/Calculate.vue
View file @
233786d7
...
...
@@ -68,8 +68,15 @@
let
param
=
{...
this
.
purchaseData
};
param
.
purchaseStatus
=
this
.
purchaseStatus
;
param
.
approvedUserId
=
this
.
$store
.
state
.
user
.
userId
;
param
.
approvedTime
=
new
Dat
e
();
param
.
approvedTime
=
this
.
getNowTim
e
();
return
param
;
},
getNowTime
(){
var
date
=
new
Date
();
var
seperator
=
"-"
;
var
currentdate
=
date
.
getFullYear
()
+
seperator
+
date
.
getMonth
()
+
seperator
+
date
.
getDate
()
+
" "
+
date
.
getHours
()
+
":"
+
date
.
getMinutes
()
+
":"
+
date
.
getSeconds
();
console
.
log
(
currentdate
,
"currentdate"
)
return
currentdate
;
}
}
}
...
...
precision-effect-web/src/views/purchase/index.vue
View file @
233786d7
...
...
@@ -42,15 +42,15 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"使用人"
prop=
"userId
"
>
<el-form-item
label=
"使用人"
prop=
"userName
"
>
<el-input
v-model=
"queryParams.user
Id
"
v-model=
"queryParams.user
Name
"
placeholder=
"请输入使用人"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
-->
</el-form-item>
<el-form-item
label=
"采购状态"
prop=
"purchaseStatus"
>
<el-select
v-model=
"queryParams.purchaseStatus"
placeholder=
"请选择采购状态"
clearable
size=
"small"
>
...
...
precision-effect-web/src/views/trade/components/Evaluate.vue
View file @
233786d7
...
...
@@ -84,6 +84,7 @@
this
.
price
=
""
;
this
.
socre
=
""
;
this
.
dealPrice
=
""
;
this
.
dealRemark
=
""
;
},
checkParam
(){
if
(
!
this
.
dealPrice
){
...
...
precision-effect-web/src/views/trade/components/TableList.vue
View file @
233786d7
...
...
@@ -38,6 +38,7 @@
/>
<el-table-column
label=
"交易评分"
align=
"center"
prop=
"tradeScore"
/>
<el-table-column
label=
"交易成交价"
align=
"center"
prop=
"dealPrice"
/>
<el-table-column
label=
"尾款"
align=
"center"
prop=
"pendingPayment"
width=
"80"
/>
<el-table-column
label=
"操作"
align=
"center"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment