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
09cc533c
Commit
09cc533c
authored
Jun 13, 2023
by
lizhichao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/precision-effect
parents
ccb25a52
982bc748
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
534 additions
and
67 deletions
+534
-67
TTradeProject.java
...src/main/java/com/zehong/system/domain/TTradeProject.java
+12
-0
TTradeProjectMapper.xml
...rc/main/resources/mapper/business/TTradeProjectMapper.xml
+3
-1
account.js
precision-effect-web/src/api/account/account.js
+17
-0
zehong.scss
precision-effect-web/src/assets/styles/zehong.scss
+3
-0
MoneyTable.vue
...ion-effect-web/src/views/account/component/MoneyTable.vue
+97
-0
index.vue
precision-effect-web/src/views/account/index.vue
+208
-57
Approval.vue
precision-effect-web/src/views/trade/components/Approval.vue
+1
-1
CommonInfo.vue
...sion-effect-web/src/views/trade/components/CommonInfo.vue
+41
-1
OperatorButton.vue
...-effect-web/src/views/trade/components/OperatorButton.vue
+7
-3
TableList.vue
...ision-effect-web/src/views/trade/components/TableList.vue
+6
-1
TradeDetail.vue
...ion-effect-web/src/views/trade/components/TradeDetail.vue
+123
-0
index.vue
precision-effect-web/src/views/trade/index.vue
+16
-1
index.vue
precision-effect-web/src/views/transaction/index.vue
+0
-2
No files found.
precision-effect-system/src/main/java/com/zehong/system/domain/TTradeProject.java
View file @
09cc533c
...
...
@@ -107,7 +107,11 @@ public class TTradeProject extends BaseEntity
private
String
queryType
;
private
String
tradeDeptManagerName
;
private
String
dealRemark
;
private
String
applyDeptManagerName
;
public
String
getDealRemark
()
{
return
dealRemark
;
}
...
...
@@ -350,6 +354,14 @@ public class TTradeProject extends BaseEntity
this
.
tradeDeptManagerName
=
tradeDeptManagerName
;
}
public
String
getApplyDeptManagerName
()
{
return
applyDeptManagerName
;
}
public
void
setApplyDeptManagerName
(
String
applyDeptManagerName
)
{
this
.
applyDeptManagerName
=
applyDeptManagerName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
precision-effect-system/src/main/resources/mapper/business/TTradeProjectMapper.xml
View file @
09cc533c
...
...
@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"applyDeptName"
column=
"apply_dept_name"
/>
<result
property=
"tradeDeptName"
column=
"trade_dept_name"
/>
<result
property=
"tradeDeptManagerName"
column=
"trade_dept_manager_name"
/>
<result
property=
"applyDeptManagerName"
column=
"apply_dept_manager_name"
/>
</resultMap>
<sql
id=
"selectTTradeProjectVo"
>
...
...
@@ -65,7 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT nick_name FROM sys_user WHERE user_id = apply_id) AS apply_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = apply_dept_id) AS apply_dept_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name,
(SELECT nick_name FROM sys_user WHERE user_id = trade_dept_manager_id) AS trade_dept_manager_name
(SELECT nick_name FROM sys_user WHERE user_id = trade_dept_manager_id) AS trade_dept_manager_name,
(SELECT nick_name FROM sys_user WHERE user_id = apply_dept_manager_id)AS apply_dept_manager_name
FROM
t_trade_project
</sql>
...
...
precision-effect-web/src/api/account/account.js
View file @
09cc533c
/*
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2023-06-12 10:49:16
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-06-13 16:19:48
* @FilePath: /precision-effect-web/src/api/account/account.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
request
from
'@/utils/request'
// 查询账户列表
...
...
@@ -9,6 +17,15 @@ export function listAccount(query) {
})
}
// 应收应付金额列表
export
function
getIncomeOrPayableList
(
query
)
{
return
request
({
url
:
'/trade/project/getIncomeOrPayableList'
,
method
:
'get'
,
params
:
query
})
}
// 查询账户详细
export
function
getAccount
(
accountId
)
{
return
request
({
...
...
precision-effect-web/src/assets/styles/zehong.scss
View file @
09cc533c
...
...
@@ -324,3 +324,6 @@
.flex
{
display
:
flex
;
}
.cup
{
cursor
:
pointer
;
}
\ No newline at end of file
precision-effect-web/src/views/account/component/MoneyTable.vue
0 → 100644
View file @
09cc533c
<!--
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2023-06-13 15:40:04
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-06-13 17:37:46
* @FilePath: /precision-effect-web/src/views/account/component/table.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div>
<!-- 交易项目、卖方、申请人、买方、买方经办人、应付/应收金额 -->
<el-table
:data=
"tableData"
v-loading=
"moneyLoading"
>
<el-table-column
label=
"交易项目"
align=
"center"
prop=
"a"
:formatter=
"formatter"
/>
<el-table-column
label=
"卖方"
align=
"center"
prop=
"tradeTransactorName"
/>
<el-table-column
label=
"申请人"
align=
"center"
prop=
"applyName"
/>
<el-table-column
label=
"买方"
align=
"center"
prop=
"applyDeptName"
/>
<el-table-column
label=
"买方经办人"
align=
"center"
prop=
"tradeDeptName"
/>
<template
v-if=
"or === 'income'"
>
<el-table-column
label=
"应收金额"
align=
"center"
prop=
"pendingPayment"
/>
</
template
>
<
template
v-else
>
<el-table-column
label=
"应付金额"
align=
"center"
prop=
"pendingPayment"
/>
</
template
>
</el-table>
<pagination
v-show=
"tableData.length > 0"
:total=
"total"
:page
.
sync=
"queryAccountDetailParams.pageNum"
:limit
.
sync=
"queryAccountDetailParams.pageSize"
@
pagination=
"getOperateList"
/>
</div>
</template>
<
script
>
export
default
{
name
:
""
,
props
:
{
moneyLoading
:
{
type
:
Boolean
,
},
tableData
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
},
},
or
:
{
type
:
String
,
default
:
"tableOr"
,
},
total
:
{
tyle
:
Number
,
},
deptId
:
{
tyle
:
Number
,
},
},
data
()
{
return
{
queryAccountDetailParams
:
{
pageNum
:
1
,
pageSize
:
10
,
},
};
},
methods
:
{
getOperateList
()
{
this
.
$parent
.
$parent
.
getIncomeOrPayableList
(
{
...
this
.
queryAccountDetailParams
,
deptId
:
this
.
deptId
,
},
this
.
or
);
},
formatter
(
row
,
column
,
cellValue
,
index
)
{
return
cellValue
?
cellValue
:
"-"
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
precision-effect-web/src/views/account/index.vue
View file @
09cc533c
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"部门"
prop=
"deptId"
>
<div
style=
"width: 200px"
>
<treeselect
v-model=
"queryParams.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
:disabled=
"disabled"
/>
<treeselect
v-model=
"queryParams.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
:disabled=
"disabled"
/>
</div>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
...
...
@@ -60,12 +80,49 @@
</el-row>
-->
<el-table
v-loading=
"loading"
:data=
"accountList"
>
<el-table-column
label=
"部门"
align=
"center"
prop=
"deptName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"账户总额"
align=
"center"
prop=
"totalAmount"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"deptName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"账户总额"
align=
"center"
prop=
"totalAmount"
/>
<el-table-column
label=
"可用金额"
align=
"center"
prop=
"ableAmount"
/>
<el-table-column
label=
"应收总额"
align=
"center"
prop=
"incomeAbleTotalAmount"
/>
<el-table-column
label=
"应付总额"
align=
"center"
prop=
"payableTotalAmount"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"应收总额"
align=
"center"
prop=
"incomeAbleTotalAmount"
>
<template
v-slot=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"moneyDialog(scope.row, 'income')"
>
{{
scope
.
row
.
incomeAbleTotalAmount
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"应付总额"
align=
"center"
prop=
"payableTotalAmount"
>
<
template
v-slot=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"moneyDialog(scope.row, 'pay')"
>
{{
scope
.
row
.
payableTotalAmount
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
...
...
@@ -81,13 +138,15 @@
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:account:remove']"
>
删除
</el-button>
-->
<el-button
size=
"mini"
type=
"text"
@
click=
"accountDetail(scope.row)"
>
账户详情
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"accountDetail(scope.row)"
>
账户详情
</el-button
>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -110,27 +169,50 @@
</div>
</el-dialog>
<!-- 应收应付弹框 -->
<el-dialog
:title=
"tableOr === 'pay' ? '应付金额' : '应收金额'"
:visible
.
sync=
"moneyOpen"
append-to-body
destroy-on-close
>
<MoneyTable
:tableData=
"ableTotalAmountData"
:or=
"tableOr"
:deptId=
"deptId"
:total=
"ableTotalAmounTotal"
:moneyLoading=
"moneyLoading"
/>
</el-dialog>
<!-- 账户详情 -->
<el-dialog
title=
"账户详情"
:visible
.
sync=
"operateOpen"
width=
"800px"
append-to-body
>
<el-dialog
title=
"账户详情"
:visible
.
sync=
"operateOpen"
width=
"800px"
append-to-body
>
<el-table
:data=
"cashOperateList"
>
<el-table-column
label=
"序号"
width=
"50px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作部门"
align=
"center"
prop=
"operateDeptName"
/>
<el-table-column
label=
"操作部门"
align=
"center"
prop=
"operateDeptName"
/>
<el-table-column
label=
"操作类型"
align=
"center"
prop=
"operateType"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.operateType == '1'"
>
借贷
</span>
<span
v-if=
"scope.row.operateType == '2'"
>
借支
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"金额"
align=
"center"
prop=
"operateAmount"
/>
<el-table-column
label=
"操作时间"
align=
"center"
prop=
"operateTime"
/>
<el-table-column
label=
"金额"
align=
"center"
prop=
"operateAmount"
/>
<el-table-column
label=
"操作时间"
align=
"center"
prop=
"operateTime"
/>
</el-table>
<pagination
v-show=
"operateListTotal
>
0"
v-show=
"operateListTotal
>
0"
:total=
"operateListTotal"
:page
.
sync=
"queryAccountDetailParams.pageNum"
:limit
.
sync=
"queryAccountDetailParams.pageSize"
...
...
@@ -141,15 +223,26 @@
</template>
<
script
>
import
{
listAccount
,
getAccount
,
delAccount
,
addAccount
,
updateAccount
,
exportAccount
}
from
"@/api/account/account"
;
import
{
listAccount
,
getIncomeOrPayableList
,
getAccount
,
delAccount
,
addAccount
,
updateAccount
,
exportAccount
,
}
from
"@/api/account/account"
;
import
{
treeselect
}
from
"@/api/system/dept"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
listOperate
}
from
"@/api/account/operate"
;
import
MoneyTable
from
"./component/MoneyTable"
;
export
default
{
name
:
"Account"
,
components
:
{
Treeselect
Treeselect
,
MoneyTable
,
},
data
()
{
return
{
...
...
@@ -171,14 +264,24 @@ export default {
accountList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 总额弹框
moneyOpen
:
false
,
moneyLoading
:
true
,
// 应收还是应付 income / pay
tableOr
:
"income"
,
ableTotalAmountData
:
[],
ableTotalAmounTotal
:
0
,
deptId
:
null
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deptId
:
null
,
ableAmount
:
null
ableAmount
:
null
,
},
queryAccountDetailParams
:
{
pageNum
:
1
,
...
...
@@ -188,20 +291,19 @@ export default {
// 表单参数
form
:
{},
// 表单校验
rules
:
{
},
rules
:
{},
// 部门树选项
deptOptions
:
[],
disabled
:
false
,
operateOpen
:
false
,
cashOperateList
:
[],
operateListTotal
:
0
operateListTotal
:
0
,
};
},
created
()
{
console
.
log
(
"userId==="
,
this
.
$store
.
state
.
user
.
userId
);
console
.
log
(
"deptId==="
,
this
.
$store
.
state
.
user
.
deptId
);
if
(
this
.
$store
.
state
.
user
.
userId
!=
1
)
{
console
.
log
(
"userId==="
,
this
.
$store
.
state
.
user
.
userId
);
console
.
log
(
"deptId==="
,
this
.
$store
.
state
.
user
.
deptId
);
if
(
this
.
$store
.
state
.
user
.
userId
!=
1
)
{
this
.
queryParams
.
deptId
=
this
.
$store
.
state
.
user
.
deptId
;
this
.
disabled
=
true
;
}
...
...
@@ -212,12 +314,26 @@ export default {
/** 查询账户列表 */
getList
()
{
this
.
loading
=
true
;
listAccount
(
this
.
queryParams
).
then
(
response
=>
{
listAccount
(
this
.
queryParams
).
then
((
response
)
=>
{
console
.
log
(
response
);
this
.
accountList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
getIncomeOrPayableList
(
queryParams
,
or
)
{
if
(
or
===
"pay"
)
{
return
getIncomeOrPayableList
({
...
queryParams
,
tradeDeptId
:
queryParams
.
deptId
,
});
}
else
{
return
getIncomeOrPayableList
({
...
queryParams
,
applyDeptId
:
queryParams
.
deptId
,
});
}
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
@@ -228,7 +344,7 @@ export default {
this
.
form
=
{
accountId
:
null
,
deptId
:
null
,
ableAmount
:
null
ableAmount
:
null
,
};
this
.
resetForm
(
"form"
);
},
...
...
@@ -244,9 +360,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
accountId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
accountId
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 新增按钮操作 */
handleAdd
()
{
...
...
@@ -257,8 +373,8 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
accountId
=
row
.
accountId
||
this
.
ids
getAccount
(
accountId
).
then
(
response
=>
{
const
accountId
=
row
.
accountId
||
this
.
ids
;
getAccount
(
accountId
).
then
(
(
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改账户"
;
...
...
@@ -266,16 +382,16 @@ export default {
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
accountId
!=
null
)
{
updateAccount
(
this
.
form
).
then
(
response
=>
{
updateAccount
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addAccount
(
this
.
form
).
then
(
response
=>
{
addAccount
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
...
...
@@ -287,53 +403,88 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
accountIds
=
row
.
accountId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除账户编号为"'
+
accountIds
+
'"的数据项?'
,
"警告"
,
{
this
.
$confirm
(
'是否确认删除账户编号为"'
+
accountIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
type
:
"warning"
,
}
)
.
then
(
function
()
{
return
delAccount
(
accountIds
);
}).
then
(()
=>
{
})
.
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有账户数据项?'
,
"警告"
,
{
this
.
$confirm
(
"是否确认导出所有账户数据项?"
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportAccount
(
queryParams
);
}).
then
(
response
=>
{
})
.
then
((
response
)
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
})
.
catch
(()
=>
{});
},
/** 查询部门下拉树结构 */
getTreeselect
()
{
treeselect
().
then
(
response
=>
{
treeselect
().
then
(
(
response
)
=>
{
this
.
deptOptions
=
response
.
data
;
});
},
// 应收音符金额点击弹框 data是table传进来的数据,or是印绶还是应付
moneyDialog
(
data
,
or
,
pageNum
,
pageSize
)
{
this
.
tableOr
=
or
;
this
.
moneyOpen
=
true
;
this
.
ableTotalAmountData
=
[];
this
.
moneyLoading
=
true
;
// 储存一下,好传参,点击进来的要
this
.
deptId
=
data
.
deptId
;
const
queryParams
=
{
pageNum
:
pageNum
?
pageNum
:
1
,
pageSize
:
pageSize
?
pageSize
:
10
,
deptId
:
this
.
deptId
,
};
this
.
getIncomeOrPayableList
(
queryParams
,
or
).
then
((
res
)
=>
{
// console.log(res)
this
.
ableTotalAmountData
=
res
.
rows
;
this
.
ableTotalAmounTotal
=
res
.
total
;
this
.
moneyLoading
=
false
;
});
// // 应收还是应付
// this.tableOr = or;
// this.moneyOpen = true;
// this.ableTotalAmountData = [];
},
//账户详情
accountDetail
(
row
){
accountDetail
(
row
)
{
this
.
operateOpen
=
true
;
this
.
queryAccountDetailParams
.
operateDeptId
=
row
.
deptId
;
this
.
getOperateList
();
},
//账户操作记录查询
getOperateList
(){
listOperate
(
this
.
queryAccountDetailParams
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
getOperateList
()
{
listOperate
(
this
.
queryAccountDetailParams
).
then
(
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
cashOperateList
=
res
.
rows
;
this
.
operateListTotal
=
res
.
total
;
}
})
}
}
})
;
}
,
}
,
};
</
script
>
precision-effect-web/src/views/trade/components/Approval.vue
View file @
09cc533c
...
...
@@ -79,7 +79,7 @@
return
false
;
},
submitSuggestion
(){
return
{
tradeId
:
this
.
tradeData
.
tradeId
,
tradeStatus
:
this
.
tradeStatus
,
dealPrice
:
this
.
tradeData
.
dealPrice
};
return
{
tradeId
:
this
.
tradeData
.
tradeId
,
tradeStatus
:
this
.
tradeStatus
,
dealPrice
:
this
.
tradeData
.
dealPrice
,
applyDeptManagerId
:
this
.
$store
.
state
.
user
.
userId
};
}
}
}
...
...
precision-effect-web/src/views/trade/components/CommonInfo.vue
View file @
09cc533c
...
...
@@ -25,7 +25,7 @@
<span
style=
"padding-top: 10px;"
class=
"dbtn"
@
click=
"
checkFile
(tradeData.attachmentUrl)"
@
click=
"
download
(tradeData.attachmentUrl)"
v-if=
"tradeData.attachmentUrl != null && tradeData.attachmentUrl!=''"
>
<i
class=
"el-icon el-icon-view"
></i>
查看/下载
...
...
@@ -99,6 +99,46 @@
checkFile
(
url
)
{
window
.
open
(
url
,
'_blank'
);
},
//附件下载
download
(
url
)
{
// url = url.replace(/\\/g, "/");
const
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
"GET"
,
url
,
true
);
xhr
.
responseType
=
"blob"
;
//xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA==');
xhr
.
onload
=
function
()
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
let
blob
=
this
.
response
;
console
.
log
(
blob
);
// 转换一个blob链接
// 注: URL.createObjectURL() 静态方法会创建一个 DOMString(DOMString 是一个UTF-16字符串),
// 其中包含一个表示参数中给出的对象的URL。这个URL的生命周期和创建它的窗口中的document绑定
let
downLoadUrl
=
window
.
URL
.
createObjectURL
(
new
Blob
([
blob
],
{
type
:
blob
.
type
,
})
);
// 视频的type是video/mp4,图片是image/jpeg
// 01.创建a标签
let
a
=
document
.
createElement
(
"a"
);
// 02.给a标签的属性download设定名称
a
.
download
=
name
;
// 03.设置下载的文件名
a
.
href
=
downLoadUrl
;
// 04.对a标签做一个隐藏处理
a
.
style
.
display
=
"none"
;
// 05.向文档中添加a标签
document
.
body
.
appendChild
(
a
);
// 06.启动点击事件
a
.
click
();
// 07.下载完毕删除此标签
a
.
remove
();
}
};
xhr
.
send
();
},
}
}
</
script
>
...
...
precision-effect-web/src/views/trade/components/OperatorButton.vue
View file @
09cc533c
...
...
@@ -2,8 +2,8 @@
<div>
<el-button
type=
"text"
@
click=
"open=true"
size=
"mini"
>
{{
getOperatorName
()
}}
</el-button>
<el-dialog
:title=
"getOperatorName()"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<component
:is=
"currentTabComponent"
:tradeData=
"tradeData"
ref=
"currentCom"
></component>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<component
:is=
"currentTabComponent"
:tradeData=
"tradeData"
ref=
"currentCom"
v-if=
"open"
></component>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
v-if=
"operatorName != 'tradeDetail'"
>
<el-button
style=
"width: 150px;border-color: #1890ff;color: #1890ff;"
@
click=
"resetSuggestion"
>
重置意见
</el-button>
<el-button
type=
"primary"
style=
"width: 150px"
@
click=
"submitSuggestion"
>
提交
</el-button>
</div>
...
...
@@ -13,6 +13,7 @@
<
script
>
import
{
getProject
,
updateProject
}
from
"@/api/transaction/tradeProject.js"
;
import
tradeDetail
from
"./TradeDetail"
;
import
evaluate
from
"./Evaluate"
;
import
confirm
from
"./Confirm"
;
import
approval
from
"./Approval"
;
...
...
@@ -21,7 +22,8 @@
components
:{
evaluate
,
confirm
,
approval
approval
,
tradeDetail
},
props
:{
operatorName
:
{
...
...
@@ -45,6 +47,8 @@
methods
:{
getOperatorName
(){
switch
(
this
.
operatorName
){
case
"tradeDetail"
:
return
"详情"
;
case
"evaluate"
:
return
"经办人评价"
;
case
"confirm"
:
...
...
precision-effect-web/src/views/trade/components/TableList.vue
View file @
09cc533c
...
...
@@ -53,8 +53,13 @@
<!-- v-hasPermi="['system:project:edit']"-->
<!-- >修改
</el-button-->
<!-- >-->
<OperatorButton
operatorName=
"tradeDetail"
:tradeInfo=
"scope.row"
@
getList=
"getList"
/>
<el-button
v-if=
"
scope.row.tradeStatus == '0' || scope.row.tradeStatus == '4'
"
v-if=
"
(scope.row.tradeStatus == '0' || scope.row.tradeStatus == '4') && scope.row.applyId == $store.state.user.userId
"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
...
...
precision-effect-web/src/views/trade/components/TradeDetail.vue
0 → 100644
View file @
09cc533c
<
template
>
<div
class=
"detail"
>
<CommonInfo
:tradeData=
"tradeData"
/>
<!-- 买方审核 -->
<div
v-if=
"tradeData.tradeStatus > 0"
>
<div
style=
"margin: 11px 30px;color: #1890ff;"
>
买方审核
</div>
<el-form
label-width=
"100px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"议价"
v-if=
"!tradeData.socre"
>
{{
tradeData
.
dealPrice
}}
</el-form-item>
<el-form-item
label=
"评价"
v-else
>
{{
tradeData
.
tradeScore
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"成交价"
>
{{
tradeData
.
dealPrice
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"审核人"
>
{{
tradeData
.
tradeTransactorName
}}
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"说明"
>
{{
tradeData
.
dealRemark
}}
</el-form-item>
</el-form>
<el-divider></el-divider>
</div>
<!-- 买方部长确认 -->
<div
v-if=
"tradeData.tradeStatus > 1"
>
<div
style=
"margin: 11px 30px;color: #1890ff;"
>
买方部门长审核
</div>
<el-form
label-width=
"100px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"买方经办人"
>
{{
tradeData
.
tradeTransactorName
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"评分"
>
{{
tradeData
.
tradeScore
?
tradeData
.
tradeScore
:
"-"
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"交易成交价"
>
{{
tradeData
.
dealPrice
}}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"审核人"
>
{{
tradeData
.
tradeDeptManagerName
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
></el-col>
</el-row>
</el-form>
<el-divider></el-divider>
</div>
<!-- 卖方部长审核 -->
<div
v-if=
"tradeData.tradeStatus > 2"
>
<div
style=
"margin: 11px 30px;color: #1890ff;"
>
部门复核
</div>
<el-form
label-width=
"100px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item>
<el-radio
v-model=
"this.tradeData.tradeStatus =='3'?radio ='1':radio='2'"
label=
"1"
disabled
>
通过
</el-radio>
<el-radio
v-model=
"radio"
label=
"2"
disabled
>
不通过
</el-radio>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"审核人"
>
{{
tradeData
.
applyDeptManagerName
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
></el-col>
</el-row>
</el-form>
<el-divider></el-divider>
</div>
</div>
</
template
>
<
script
>
import
CommonInfo
from
"./CommonInfo"
;
import
Evaluate
from
"./Evaluate"
;
import
Confirm
from
"./Confirm"
;
import
Approval
from
"./Approval"
;
export
default
{
name
:
"trade-detail"
,
props
:{
tradeData
:
{
type
:
Object
}
},
components
:{
CommonInfo
,
Evaluate
,
Confirm
,
Approval
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.detail
{
height
:
460px
;
overflow-y
:
auto
;
&
:
:-
webkit-scrollbar
{
/* 设置滚动条宽度 */
width
:
4px
;
/* 设置滚动条背景色 */
//background: black;
}
//滚动条轨道
&
:
:-
webkit-scrollbar-track
{
background-color
:transparent
;
-webkit-border-radius
:
2em
;
-moz-border-radius
:
2em
;
border-radius
:
2em
;
}
//滚动条滑块
&
:
:-
webkit-scrollbar-thumb
{
background-color
:
rgb
(
147
,
147
,
153
,
0
.5
);
-webkit-border-radius
:
2em
;
-moz-border-radius
:
2em
;
border-radius
:
2em
;
}
}
</
style
>
precision-effect-web/src/views/trade/index.vue
View file @
09cc533c
...
...
@@ -201,7 +201,7 @@
<el-form-item
label=
"买方"
prop=
"tradeDeptId"
>
<treeselect
v-model=
"form.tradeDeptId"
:options=
"
d
eptOptions"
:options=
"
formD
eptOptions"
:show-count=
"true"
placeholder=
"请选择部门"
/>
...
...
@@ -396,6 +396,7 @@ export default {
transactionProjects
:
[],
deptOptions
:
[],
formDeptOptions
:
[],
priceType
:
"1"
,
fileList
:
[],
transactionProjectStatus
:
[],
...
...
@@ -574,6 +575,20 @@ export default {
getTreeselect
()
{
treeselect
().
then
((
response
)
=>
{
this
.
deptOptions
=
response
.
data
;
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
;
console
.
log
(
"formDeptOptions==="
,
this
.
formDeptOptions
);
});
},
changeTransactionProject
(
val
)
{
...
...
precision-effect-web/src/views/transaction/index.vue
View file @
09cc533c
...
...
@@ -236,8 +236,6 @@ export default {
};
},
created
()
{
console
.
log
(
"userId==="
,
this
.
$store
.
state
.
user
.
userId
);
console
.
log
(
"deptId==="
,
this
.
$store
.
state
.
user
.
deptId
);
if
(
this
.
$store
.
state
.
user
.
userId
!=
1
){
this
.
queryParams
.
deptId
=
this
.
$store
.
state
.
user
.
deptId
;
this
.
disabled
=
true
;
...
...
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