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
16eefd05
Commit
16eefd05
authored
Jun 07, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交易项目维护功能修改
parent
a0631202
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
99 deletions
+33
-99
TTransactionProject.java
...in/java/com/zehong/system/domain/TTransactionProject.java
+2
-44
TTransactionProjectMapper.xml
...n/resources/mapper/business/TTransactionProjectMapper.xml
+1
-16
user.js
precision-effect-web/src/store/modules/user.js
+8
-3
index.vue
precision-effect-web/src/views/transaction/index.vue
+22
-36
No files found.
precision-effect-system/src/main/java/com/zehong/system/domain/TTransactionProject.java
View file @
16eefd05
...
...
@@ -39,18 +39,6 @@ public class TTransactionProject extends BaseEntity
@Excel
(
name
=
"单价"
)
private
BigDecimal
price
;
/** 数量 */
@Excel
(
name
=
"数量"
)
private
Long
count
;
/** 总价 */
@Excel
(
name
=
"总价"
)
private
BigDecimal
total
;
/** 支付经办人 */
@Excel
(
name
=
"支付经办人"
)
private
String
transactor
;
/** 部门 */
@Excel
(
name
=
"部门"
)
private
Long
deptId
;
...
...
@@ -116,33 +104,6 @@ public class TTransactionProject extends BaseEntity
{
return
price
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setTotal
(
BigDecimal
total
)
{
this
.
total
=
total
;
}
public
BigDecimal
getTotal
()
{
return
total
;
}
public
void
setTransactor
(
String
transactor
)
{
this
.
transactor
=
transactor
;
}
public
String
getTransactor
()
{
return
transactor
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
...
...
@@ -179,9 +140,6 @@ public class TTransactionProject extends BaseEntity
.
append
(
"context"
,
getContext
())
.
append
(
"priceType"
,
getPriceType
())
.
append
(
"price"
,
getPrice
())
.
append
(
"count"
,
getCount
())
.
append
(
"total"
,
getTotal
())
.
append
(
"transactor"
,
getTransactor
())
.
append
(
"deptId"
,
getDeptId
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
...
...
precision-effect-system/src/main/resources/mapper/business/TTransactionProjectMapper.xml
View file @
16eefd05
...
...
@@ -11,9 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"context"
column=
"context"
/>
<result
property=
"priceType"
column=
"price_type"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"count"
column=
"count"
/>
<result
property=
"total"
column=
"total"
/>
<result
property=
"transactor"
column=
"transactor"
/>
<result
property=
"deptId"
column=
"deptId"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
...
...
@@ -23,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTTransactionProjectVo"
>
select transaction_project_id, transaction_project_name, transaction_item_name, context, price_type, price,
count, total, transactor,
dept_id AS deptId, create_time, update_time, is_del, remark,(SELECT dept.dept_name FROM sys_dept dept WHERE dept.dept_id = deptId)AS dept_name from t_transaction_project
select transaction_project_id, transaction_project_name, transaction_item_name, context, price_type, price, dept_id AS deptId, create_time, update_time, is_del, remark,(SELECT dept.dept_name FROM sys_dept dept WHERE dept.dept_id = deptId)AS dept_name from t_transaction_project
</sql>
<select
id=
"selectTTransactionProjectList"
parameterType=
"TTransactionProject"
resultMap=
"TTransactionProjectResult"
>
...
...
@@ -34,9 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"context != null and context != ''"
>
and context = #{context}
</if>
<if
test=
"priceType != null and priceType != ''"
>
and price_type = #{priceType}
</if>
<if
test=
"price != null "
>
and price = #{price}
</if>
<if
test=
"count != null "
>
and count = #{count}
</if>
<if
test=
"total != null "
>
and total = #{total}
</if>
<if
test=
"transactor != null and transactor != ''"
>
and transactor = #{transactor}
</if>
<if
test=
"deptId != null "
>
and dept_id = #{deptId}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
...
...
@@ -55,9 +49,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"context != null"
>
context,
</if>
<if
test=
"priceType != null"
>
price_type,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"count != null"
>
count,
</if>
<if
test=
"total != null"
>
total,
</if>
<if
test=
"transactor != null"
>
transactor,
</if>
<if
test=
"deptId != null"
>
dept_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
...
...
@@ -70,9 +61,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"context != null"
>
#{context},
</if>
<if
test=
"priceType != null"
>
#{priceType},
</if>
<if
test=
"price != null"
>
#{price},
</if>
<if
test=
"count != null"
>
#{count},
</if>
<if
test=
"total != null"
>
#{total},
</if>
<if
test=
"transactor != null"
>
#{transactor},
</if>
<if
test=
"deptId != null"
>
#{deptId},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
...
...
@@ -89,9 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"context != null"
>
context = #{context},
</if>
<if
test=
"priceType != null"
>
price_type = #{priceType},
</if>
<if
test=
"price != null"
>
price = #{price},
</if>
<if
test=
"count != null"
>
count = #{count},
</if>
<if
test=
"total != null"
>
total = #{total},
</if>
<if
test=
"transactor != null"
>
transactor = #{transactor},
</if>
<if
test=
"deptId != null"
>
dept_id = #{deptId},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
...
...
precision-effect-web/src/store/modules/user.js
View file @
16eefd05
...
...
@@ -9,6 +9,7 @@ const user = {
roles
:
[],
permissions
:
[],
systemSetting
:{},
deptId
:
''
,
},
mutations
:
{
...
...
@@ -29,7 +30,10 @@ const user = {
},
SET_SYSTEMSETTING
:
(
state
,
systemSetting
)
=>
{
state
.
systemSetting
=
systemSetting
}
},
SET_DEPTID
:
(
state
,
deptId
)
=>
{
state
.
deptId
=
deptId
;
},
},
actions
:
{
...
...
@@ -56,7 +60,7 @@ const user = {
getInfo
().
then
(
res
=>
{
const
user
=
res
.
user
const
avatar
=
user
.
avatar
==
""
?
require
(
"@/assets/images/profile.jpg"
)
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
;
console
.
log
(
"getInfo"
)
console
.
log
(
"getInfo"
,
)
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
commit
(
'SET_ROLES'
,
res
.
roles
)
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
...
...
@@ -67,6 +71,7 @@ const user = {
commit
(
'SET_AVATAR'
,
avatar
)
// 默认配置
commit
(
'SET_SYSTEMSETTING'
,
res
.
systemSetting
)
commit
(
'SET_DEPTID'
,
user
.
deptId
);
console
.
log
(
res
.
systemSetting
)
resolve
(
res
)
}).
catch
(
error
=>
{
...
...
precision-effect-web/src/views/transaction/index.vue
View file @
16eefd05
...
...
@@ -74,10 +74,18 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"交易项目名称"
align=
"center"
prop=
"transactionProjectName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"交易细项名称"
align=
"center"
prop=
"transactionItemName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"数量"
align=
"center"
prop=
"count"
/>
<el-table-column
label=
"总价"
align=
"center"
prop=
"total"
/>
<el-table-column
label=
"支付经办人"
align=
"center"
prop=
"transactor"
/>
<el-table-column
label=
"交易类型"
align=
"center"
prop=
"priceType"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.priceType == '1'"
>
定价
</span>
<span
v-if=
"scope.row.priceType == '2'"
>
仪价
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"单价"
align=
"center"
prop=
"price"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.price"
>
{{
scope
.
row
.
price
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"部门"
align=
"center"
prop=
"deptName"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -108,7 +116,7 @@
/>
<!-- 添加或修改交易项目对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-row>
<el-col
:span=
"12"
>
...
...
@@ -129,39 +137,14 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"定价类型"
prop=
"priceType"
>
<el-select
v-model=
"form.priceType"
placeholder=
"请选择定价类型"
@
change=
"changePriceType($event)"
>
<el-option
label=
"
单
价"
value=
"1"
/>
<el-option
label=
"
定
价"
value=
"1"
/>
<el-option
label=
"议价"
value=
"2"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"部门"
prop=
"deptId"
>
<treeselect
v-model=
"form.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
/>
<!--<el-input v-model="form.deptId" placeholder="请输入部门" />-->
</el-form-item>
</el-col>
</el-row>
<el-row
v-if=
"priceShow"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
v-if=
"priceShow"
>
<el-form-item
label=
"单价"
prop=
"price"
>
<el-input
v-model=
"form.price"
placeholder=
"请输入单价"
@
blur=
"sumAmount"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"数量"
prop=
"count"
>
<el-input
v-model=
"form.count"
placeholder=
"请输入数量"
@
blur=
"sumAmount"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"总价"
prop=
"total"
>
<el-input
v-model=
"form.total"
placeholder=
"请输入总价"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"支付经办人"
prop=
"transactor"
>
<el-input
v-model=
"form.transactor"
placeholder=
"请输入支付经办人"
/>
<el-input
v-model=
"form.price"
placeholder=
"请输入单价"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -306,6 +289,7 @@ export default {
handleAdd
()
{
this
.
reset
();
this
.
form
.
priceType
=
"1"
;
this
.
changePriceType
(
this
.
form
.
priceType
);
this
.
open
=
true
;
this
.
title
=
"添加交易项目"
;
},
...
...
@@ -315,12 +299,14 @@ export default {
const
transactionProjectId
=
row
.
transactionProjectId
||
this
.
ids
getProject
(
transactionProjectId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
changePriceType
(
this
.
form
.
priceType
);
this
.
open
=
true
;
this
.
title
=
"修改交易项目"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
form
.
deptId
=
this
.
$store
.
state
.
user
.
deptId
;
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
transactionProjectId
!=
null
)
{
...
...
@@ -342,7 +328,7 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
transactionProjectIds
=
row
.
transactionProjectId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除交易项目编号为"'
+
transactionProjectIds
+
'"的数据项?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认删除交易项目编号为"'
+
row
.
transactionProjectName
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
...
...
@@ -379,12 +365,12 @@ export default {
if
(
val
==
"1"
){
this
.
priceShow
=
true
;
this
.
rules
.
price
=
[{
required
:
true
,
message
:
"单价不能为空"
,
trigger
:
"blur"
}];
this
.
rules
.
count
=
[{
required
:
true
,
message
:
"数量不能为空"
,
trigger
:
"blur"
}];
//
this.rules.count = [{ required: true, message: "数量不能为空", trigger: "blur" }];
}
if
(
val
==
"2"
){
this
.
priceShow
=
false
;
this
.
$delete
(
this
.
rules
,
"price"
);
this
.
$delete
(
this
.
rules
,
"count"
)
//
this.$delete(this.rules,"count")
}
},
//计算总价
...
...
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