Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
1c12a9fa
Commit
1c12a9fa
authored
Mar 07, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
7a145e5f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
39 deletions
+177
-39
AddActualCost.vue
...etail/components/FeedSummary/components/AddActualCost.vue
+143
-5
index.vue
...projectCostLedger/detail/components/FeedSummary/index.vue
+32
-32
index.vue
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
+2
-2
No files found.
dsk-operate-ui/src/views/projectCostLedger/detail/components/FeedSummary/components/AddActualCost.vue
View file @
1c12a9fa
<
template
>
<el-dialog
title=
"填写实际成本"
:visible=
"comDialogStatus"
class=
"add-actual-cost-container"
>
<el-dialog
title=
"填写实际成本"
:visible=
"comDialogStatus"
class=
"add-actual-cost-container"
@
close=
"dialogClose"
>
<div
class=
"dialog-content-inner"
>
<!-- 成本年份 -->
<div
class=
"cost-year-container"
>
<span>
成本年份
</span>
<el-date-picker
v-model=
"time"
type=
"month"
placeholder=
"请选择所需要添加的成本月份"
format=
"yyyy年MM月"
value-format=
"yyyy-MM"
class=
"project-record-date"
@
change=
"timeChange"
:picker-options=
"pickerOptions"
></el-date-picker>
</div>
</div>
<!-- 底部按钮 -->
<div
class=
"dialog-content-footer"
>
<div
class=
"cancel-or-ok"
>
<el-button
size=
"medium"
@
click=
"cancel"
class=
"cancel-select-year"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"ok"
class=
"ok-select-year"
>
确定
</el-button>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
import
dayjs
from
"dayjs"
;
export
default
{
name
:
"AddActualCost"
,
props
:
{
dialogStatus
:
{
type
:
Boolean
,
default
:
false
},
projectCreateTime
:
{
type
:
String
,
default
:
""
}
},
model
:
{
...
...
@@ -23,7 +44,11 @@ export default {
},
data
()
{
return
{
comDialogStatus
:
this
.
dialogStatus
comDialogStatus
:
this
.
dialogStatus
,
time
:
""
,
pickerOptions
:
{
disabledDate
:
this
.
disabledDateHandler
}
};
},
//可访问data属性
...
...
@@ -36,7 +61,44 @@ export default {
},
//方法集
methods
:
{
// 时间选择变化
timeChange
(
time
)
{
// console.log(time);
},
cancel
()
{
this
.
comDialogStatus
=
false
;
},
ok
()
{
if
(
!
this
.
time
)
{
return
this
.
$message
.
error
(
"请选择成本年份"
);
}
// 发布事件
this
.
$emit
(
"timeSelect"
,
dayjs
(
this
.
time
).
format
(
"YYYYMM"
));
this
.
comDialogStatus
=
false
;
},
reset
()
{
this
.
time
=
""
;
},
dialogClose
()
{
this
.
$emit
(
"dialogStatusChange"
,
false
);
this
.
reset
();
},
disabledDateHandler
(
optionTime
)
{
// 选项年月
const
_optionTime
=
dayjs
(
optionTime
).
format
(
"YYYYMM"
);
// 当前项目年月
const
_thresholdTime
=
dayjs
(
this
.
projectCreateTime
).
format
(
"YYYYMM"
);
// 当前项目年
const
_thresholdYear
=
_thresholdTime
.
slice
(
0
,
4
);
// 当前项目月份 补0
const
_thresholdMonth
=
_thresholdTime
.
slice
(
4
);
// 是否小于当前项目年月 或 大于 当前项目年月 往后推五年
const
lastYearMonth
=
parseInt
(
`
${
parseInt
(
_thresholdYear
)
+
5
}${
_thresholdMonth
}
`
);;
if
(
parseInt
(
_optionTime
)
<
parseInt
(
_thresholdTime
)
||
parseInt
(
_optionTime
)
>
lastYearMonth
)
{
return
true
;
}
return
false
;
}
},
}
</
script
>
...
...
@@ -58,6 +120,7 @@ export default {
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
#eeeeee
;
box-sizing
:
border-box
;
.el-dialog__title
{
font-size
:
16px
;
...
...
@@ -78,9 +141,84 @@ export default {
.el-dialog__body
{
padding
:
0px
;
box-sizing
:
border-box
;
.dialog-content-inner
{
min-height
:
120px
;
padding
:
24px
20px
;
}
.cost-year-container
{
display
:
flex
;
align-items
:
center
;
&
>
span
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-size
:
14px
;
margin-right
:
16px
;
white-space
:
nowrap
;
}
.project-record-date
{
width
:
100%
;
.el-input__inner
{
height
:
30px
;
line-height
:
30px
;
padding
:
0px
12px
;
border-radius
:
2px
;
border-color
:
#dcdfe6
;
font-size
:
14px
;
color
:
#232323
;
font-weight
:
350
;
}
.el-input__suffix
{
right
:
12px
;
.el-input__icon
{
line-height
:
30px
;
width
:
auto
;
}
}
.el-input__prefix
{
display
:
none
;
}
}
}
.dialog-content-footer
{
height
:
64px
;
padding
:
0px
20px
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
border-top
:
1px
solid
#eeeeee
;
box-sizing
:
border-box
;
.cancel-or-ok
{
display
:
flex
;
height
:
100%
;
align-items
:
center
;
.el-button
{
padding
:
0px
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
32px
;
font-size
:
14px
;
&
.cancel-select-year
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
border
:
1px
solid
#dcdfe6
;
background
:
#fff
;
}
&
.ok-select-year
{
background
:
#0081ff
;
border-color
:
#0081ff
;
}
}
}
}
}
}
}
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/components/FeedSummary/index.vue
View file @
1c12a9fa
...
...
@@ -17,8 +17,6 @@
<div
class=
"right-table-list-container"
>
<div
class=
"project-table-list-header"
>
<div
class=
"project-table-list-haeder-left"
>
<!-- <el-date-picker v-model="recordDate" type="month" placeholder="选择月" format="yyyy年MM月" value-format="yyyy-MM"
class="project-record-date" @change="timeChange"></el-date-picker> -->
<el-select
v-model=
"recordDate"
placeholder=
"请选择年月"
class=
"project-month-select-options"
clearable
@
change=
"monthChange"
>
<el-option
v-for=
"item in monthList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
...
...
@@ -28,7 +26,8 @@
<!-- 实体工程材料单位换算 -->
<el-button
type=
"primary"
size=
"medium"
class=
"unit-conversion-btn"
v-if=
"currentParentName.indexOf('实体工程材料') != -1"
>
单位换算
</el-button>
<!-- 填写实际成本 -->
<el-button
type=
"primary"
size=
"medium"
class=
"actual-cost-btn"
v-else
@
click=
"fillActualCost"
>
填写实际成本
</el-button>
<el-button
type=
"primary"
size=
"medium"
class=
"actual-cost-btn"
v-else
@
click=
"fillActualCost"
>
{{addActualCostEditStatus ? '保存成本' : '填写实际成本'}}
</el-button>
<!-- 表头设置组件 -->
<dsk-table-header-setting
:settingList=
"formColum"
@
settingChange=
"settingChange"
></dsk-table-header-setting>
</div>
...
...
@@ -50,7 +49,7 @@
</div>
<!-- 填写实际成本触发 -->
<add-actual-cost
v-model=
"showAddActualCost"
></add-actual-cost>
<add-actual-cost
v-model=
"showAddActualCost"
:project-create-time=
"projectDetailInfo.createTime"
@
timeSelect=
"timeSelect"
></add-actual-cost>
</div>
</template>
...
...
@@ -178,7 +177,11 @@ export default {
tableDataList
:
[],
statisticsParentName
:
[
"劳务分包工程"
,
"专业分包工程"
],
// 填写实际成本弹窗
showAddActualCost
:
false
showAddActualCost
:
false
,
// 填写实际成本 编辑状态
addActualCostEditStatus
:
false
,
// 当前选择的成本年份
selectActualCostTime
:
""
};
},
//可访问data属性
...
...
@@ -345,6 +348,7 @@ export default {
}
},
monthChange
(
month
)
{
this
.
resetEditStatus
();
// 当前月
const
_now
=
dayjs
(
new
Date
().
valueOf
()).
format
(
"YYYYMM"
);
// 请求列表参数
...
...
@@ -364,6 +368,7 @@ export default {
this
.
getFeedSummaryList
(
params
);
},
menuSelect
(
currentId
,
currentTemp
)
{
this
.
resetEditStatus
();
this
.
currentNodeName
=
currentId
;
const
parentName
=
currentTemp
.
parent
?
this
.
getCurrentType
(
currentTemp
.
parent
)
:
currentId
;
if
(
parentName
)
this
.
currentParentName
=
parentName
;
...
...
@@ -379,10 +384,6 @@ export default {
return
this
.
getCurrentType
(
parent
.
parent
);
}
},
// 时间选择变化
timeChange
(
time
)
{
console
.
log
(
time
);
},
// 表头设置变化
async
settingChange
(
use
)
{
try
{
...
...
@@ -394,6 +395,28 @@ export default {
// 填写或修改新的 成本月份
fillActualCost
()
{
this
.
showAddActualCost
=
true
;
},
resetEditStatus
()
{
this
.
addActualCostEditStatus
=
false
;
this
.
selectActualCostTime
=
""
;
},
async
timeSelect
(
selectTime
)
{
// 编辑状态
this
.
addActualCostEditStatus
=
true
;
this
.
selectActualCostTime
=
selectTime
;
// 判断是否包含 选择的年月 包含则修改 未包含则新增
const
findReslut
=
this
.
originMonthList
.
includes
(
selectTime
);
// 包含所选月
if
(
findReslut
)
{
this
.
recordDate
=
selectTime
;
const
params
=
this
.
createRequestConditions
();
params
[
"recordDate"
]
=
selectTime
;
// 获取选中月数据
await
this
.
getFeedSummaryList
(
params
);
}
else
{
// 不包含当前所选月 新增数据
}
}
},
}
...
...
@@ -430,29 +453,6 @@ export default {
.project-table-list-haeder-left
{
display
:
flex
;
align-items
:
center
;
.project-record-date
{
width
:
140px
;
.el-input__inner
{
height
:
32px
;
line-height
:
32px
;
padding
:
0px
12px
;
border-radius
:
2px
;
border-color
:
#dcdfe6
;
font-size
:
14px
;
color
:
#232323
;
font-weight
:
350
;
}
.el-input__suffix
{
right
:
12px
;
.el-input__icon
{
line-height
:
32px
;
width
:
auto
;
}
}
.el-input__prefix
{
display
:
none
;
}
}
.project-month-select-options
{
width
:
140px
;
.el-input__inner
{
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
View file @
1c12a9fa
...
...
@@ -193,8 +193,8 @@ export default {
const
detail
=
await
getProjectDetailApi
(
projectId
);
if
(
detail
.
code
==
200
&&
detail
.
data
)
{
if
(
detail
.
data
.
id
)
detail
.
data
[
"projectId"
]
=
detail
.
data
.
id
;
//
detail.data["projectId"] = "1754425038355890177";
//
detail.data["cbStage"] = 0;
detail
.
data
[
"projectId"
]
=
"1754425038355890177"
;
detail
.
data
[
"cbStage"
]
=
0
;
this
.
detailInfo
=
detail
.
data
;
}
}
catch
(
error
)
{
...
...
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