Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-front
Overview
Overview
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
platform
hg-front
Commits
a8ea6fea
Commit
a8ea6fea
authored
Aug 02, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
ed9fb6a1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
219 additions
and
57 deletions
+219
-57
debit-note.js
api/debit-note.js
+6
-0
payment-order.js
api/payment-order.js
+35
-0
settlement-doc.js
api/settlement-doc.js
+18
-1
add.vue
pages/debit-note/add.vue
+2
-2
edit.vue
pages/debit-note/edit.vue
+36
-16
index.vue
pages/debit-note/index.vue
+1
-1
add.vue
pages/payment-order/add.vue
+6
-1
edit.vue
pages/payment-order/edit.vue
+95
-12
index.vue
pages/payment-order/index.vue
+2
-4
list.vue
pages/product-order/list.vue
+4
-4
add.vue
pages/settlement-doc/add.vue
+4
-14
edit.vue
pages/settlement-doc/edit.vue
+0
-0
HGAPP71.png
static/HGAPP71.png
+0
-0
tools.js
utils/tools.js
+10
-2
No files found.
api/debit-note.js
View file @
a8ea6fea
...
...
@@ -113,3 +113,9 @@ export const getProList = (params,pageData) => {
}
export
const
del
=
(
data
)
=>
{
let
url
=
`/service/S_XS_KK_04`
let
d
=
setResultData
(
data
);
return
http
.
post
(
url
,
d
)
}
api/payment-order.js
View file @
a8ea6fea
...
...
@@ -88,6 +88,34 @@ const setResultData = (data={}) => {
return
paramsData
}
const
setResultDataForList
=
(
list
=
[])
=>
{
let
paramsData
=
{
"__version__"
:
"2.0"
,
"__sys__"
:
{},
"__blocks__"
:
{
"result"
:
{
"attr"
:
{},
"meta"
:
{
"columns"
:
[]
},
"rows"
:
[]
}
}
}
let
keyList
=
Object
.
keys
(
list
[
0
]);
keyList
.
forEach
((
item
,
index
)
=>
{
paramsData
.
__blocks__
.
result
.
meta
.
columns
.
push
({
pos
:
index
,
name
:
item
})
})
list
.
forEach
(
item
=>
{
paramsData
.
__blocks__
.
result
.
rows
.
push
(
Object
.
values
(
item
));
})
return
paramsData
}
const
setResultDataAndDetail
=
(
data
=
{},
detail
=
{})
=>
{
let
obj
=
{}
for
(
let
i
in
data
)
{
...
...
@@ -220,6 +248,13 @@ export const save = (data) => {
}
export
const
updateList
=
(
data
)
=>
{
let
url
=
`/service/S_CW_FK_06`
let
d
=
setResultDataForList
(
data
);
return
http
.
post
(
url
,
d
)
}
// 审核
export
const
updateSubmitStatus
=
(
data
)
=>
{
let
url
=
`/service/S_CW_FK_02`
...
...
api/settlement-doc.js
View file @
a8ea6fea
...
...
@@ -21,7 +21,7 @@ const setParamsData = (data = {},pageData) => {
"result"
:
{
"attr"
:
{
count
:
0
,
limit
:
pageData
&&
pageData
.
limit
?
pageData
.
limit
:
10
,
limit
:
pageData
&&
pageData
.
limit
?
pageData
.
limit
:
10
0
,
offset
:
pageData
&&
pageData
.
offset
?
pageData
.
offset
*
pageData
.
limit
:
0
,
orderBy
:
""
,
showCount
:
pageData
&&
pageData
.
showCount
?
pageData
.
showCount
:
"true"
...
...
@@ -146,6 +146,17 @@ export const getList = (params,pageData) => {
return
http
.
post
(
url
,
d
)
}
export
const
getSubList
=
(
data
)
=>
{
let
url
=
`/service/S_XS_JS_03`
return
http
.
post
(
url
,
data
)
}
export
const
saveSubList
=
(
data
)
=>
{
let
url
=
`/service/S_XS_JS_04`
let
d
=
setResultDataAndDetail
({},
data
)
return
http
.
post
(
url
,
d
)
}
export
const
save
=
(
data
,
Detail
)
=>
{
let
url
=
`/service/S_XS_JS_02`
let
d
=
setResultDataAndDetail
(
data
,
Detail
);
...
...
@@ -164,6 +175,12 @@ export const getProList = (params,pageData) => {
return
http
.
post
(
url
,
d
)
}
export
const
getProList2
=
(
params
,
pageData
)
=>
{
let
url
=
`/service/S_CW_HT_02`
let
d
=
setParamsData
(
params
,
pageData
)
return
http
.
post
(
url
,
d
)
}
export
const
getList1
=
(
params
,
pageData
)
=>
{
let
url
=
`/service/S_CW_QZ_01`
let
d
=
setParamsData
(
params
,
pageData
)
...
...
pages/debit-note/add.vue
View file @
a8ea6fea
...
...
@@ -95,7 +95,7 @@
</view>
<view
class=
"text-blue"
>
<u-input
v-model=
"orderInfo.totalContractPriceIncluding"
color=
"#0081ff"
inputAlign=
"right"
type=
"
text
"
:border=
"border"
placeholder=
"请输入扣款金额"
/>
type=
"
number
"
:border=
"border"
placeholder=
"请输入扣款金额"
/>
</view>
</view>
<view
class=
"cu-form-group"
>
...
...
@@ -142,7 +142,7 @@
content
:
"请确认是否进行新增扣款单?"
,
statusBarHeight
:
uni
.
getStorageSync
(
"statusHeight"
)
||
0
,
orderInfo
:
{
reviewStatus
:
'
3
'
,
reviewStatus
:
'
0
'
,
signingDate
:
moment
().
format
(
"YYYY-MM-DD"
)
},
};
...
...
pages/debit-note/edit.vue
View file @
a8ea6fea
...
...
@@ -120,6 +120,7 @@
<view
v-if=
"orderInfo.reviewStatus && orderInfo.reviewStatus!=3"
class=
"footer-box"
>
<button
class=
"cu-btn block bg-blue"
@
tap=
"onSubmit(1)"
>
提交
</button>
<button
class=
"cu-btn block bg-red"
@
tap=
"onSubmit(2)"
>
删除
</button>
</view>
<u-calendar
:show=
"show2"
mode=
"single"
:defaultDate=
"orderInfo.signingDate"
:minDate=
"minDate"
:monthNum=
'4'
@
confirm=
"onConfirm"
@
close=
"onCancel"
></u-calendar>
...
...
@@ -138,7 +139,8 @@
}
from
"@/api/product-warehousing.js"
;
import
{
getList
,
updateSubmitStatus
updateSubmitStatus
,
del
}
from
"@/api/debit-note.js"
;
export
default
{
...
...
@@ -171,6 +173,8 @@
},
methods
:
{
onSubmit
(
t
)
{
this
.
submitType
=
t
;
this
.
content
=
t
==
1
?
'请确认是否进行审核操作?'
:
'请确认是否进行删除操作?'
this
.
show
=
true
},
onOpenCalendar
()
{
...
...
@@ -189,21 +193,37 @@
uni
.
showLoading
({
title
:
"加载中..."
})
updateSubmitStatus
({
...
this
.
orderInfo
,
reviewStatus
:
3
}).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
})
setTimeout
(()
=>
{
this
.
onBack
();
},
1500
)
}
})
if
(
this
.
submitType
==
1
){
updateSubmitStatus
({
...
this
.
orderInfo
,
reviewStatus
:
3
}).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
})
setTimeout
(()
=>
{
this
.
onGetList
();
},
1500
)
}
})
}
else
{
del
(
this
.
orderInfo
).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
})
setTimeout
(()
=>
{
this
.
onBack
();
},
1500
)
}
})
}
},
onBack
()
{
uni
.
redirectTo
({
...
...
pages/debit-note/index.vue
View file @
a8ea6fea
...
...
@@ -10,7 +10,7 @@
<text
class=
"text-white"
>
选择项目
</text>
</block>
<block
slot=
"right"
>
<text
class=
"text-
green
text-bold text-lg margin-right"
@
tap=
"onCheck"
>
确 定
</text>
<text
class=
"text-
white
text-bold text-lg margin-right"
@
tap=
"onCheck"
>
确 定
</text>
</block>
</cu-custom>
<view
v-if=
"statusBarHeight>0"
class=
"content-black"
:style=
"
{height:statusBarHeight+45+'px'}">
...
...
pages/payment-order/add.vue
View file @
a8ea6fea
...
...
@@ -323,7 +323,12 @@
url
:
`/pages/payment-order/index?checkedId=
${
checkedId
}
`
,
events
:
{
acceptDataFromOpenedPage
:
(
data
)
=>
{
this
.
selectList
=
data
.
data
;
this
.
selectList
=
data
.
data
.
map
(
item
=>
{
return
{
...
item
,
thisAmount
:
Number
(
item
.
remainingAmount
)
}
});
this
.
$forceUpdate
();
}
}
...
...
pages/payment-order/edit.vue
View file @
a8ea6fea
...
...
@@ -7,10 +7,10 @@
</view>
</block>
<block
slot=
"content"
>
<text
class=
"text-white"
>
结算
单详情
</text>
<text
class=
"text-white"
>
付款
单详情
</text>
</block>
<block
slot=
"right"
>
<view
v-if=
"subList && subList.length"
class=
"right-btn"
@
tap=
"onEditOrSave"
>
<view
v-if=
"
orderInfo.reviewStatus == '0' &&
subList && subList.length"
class=
"right-btn"
@
tap=
"onEditOrSave"
>
<text
class=
"text-white"
>
{{
isEdit
?
'保存'
:
'编辑'
}}
</text>
</view>
</block>
...
...
@@ -92,7 +92,7 @@
<view
class=
"flex-col content-part-1 content-part-2"
>
<view
class=
"flex-row header"
>
<text
class=
"text-lg text-bold text-black"
>
清单明细
</text>
<text
class=
"text-lg text-bold text-black"
>
付款清单
</text>
</view>
<view
class=
"form-content-box margin-bottom"
>
<view
v-for=
"(item,i) in subList"
:key=
"i"
class=
"sub-item-box"
>
...
...
@@ -121,9 +121,19 @@
<text>
{{
item
.
contractNumber
}}
</text>
</view>
</view>
<view
v-if=
"item.remainingAmount"
class=
"cu-form-group"
>
<view
class=
"title"
>
<text>
剩余金额:
</text>
</view>
<view
class=
""
>
<text>
{{
Number
(
item
.
remainingAmount
)
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text>
收款
总
额:
</text>
<text>
收款
金
额:
</text>
</view>
<view
v-if=
"isEdit && item.isEdit"
class=
""
>
<u-input
v-model=
"item.totalContractPriceIncluding"
...
...
@@ -134,6 +144,15 @@
<text>
{{
item
.
totalContractPriceIncluding
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text>
创建时间:
</text>
</view>
<view
class=
""
>
<text>
{{
item
.
createdDate
}}
</text>
</view>
</view>
</form>
...
...
@@ -163,13 +182,14 @@
<
script
>
import
{
getDict
}
from
'@/api/index.js'
;
import
{
toJsonData
toJsonData
,
formatForLen14
}
from
"@/utils/tools.js"
;
import
moment
from
"@/common/moment.js"
;
import
{
getParamsData
}
from
"@/api/product-warehousing.js"
;
import
{
getList
,
getSubList
,
updateSubmitStatus
,
updateWriteoffStatus
}
from
"@/api/payment-order.js"
;
import
{
getList
,
getSubList
,
updateSubmitStatus
,
updateWriteoffStatus
,
updateList
,
saveBySelect
}
from
"@/api/payment-order.js"
;
export
default
{
data
()
{
...
...
@@ -200,7 +220,6 @@
},
methods
:
{
onEditOrSave
(){
if
(
this
.
isEdit
){
this
.
submitType
=
3
;
this
.
content
=
'请确认是否进行数据保存操作?'
...
...
@@ -216,21 +235,45 @@
}
},
onNavToSelect
()
{
if
(
this
.
isEdit
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请将数据保存后操作"
})
return
}
let
checkedId
=
''
;
if
(
this
.
s
elect
List
.
length
){
checkedId
=
this
.
s
electList
.
map
(
item
=>
item
.
id
).
join
();
if
(
this
.
s
ub
List
.
length
){
checkedId
=
this
.
s
ubList
.
filter
(
item
=>
item
.
isEdit
)?
.
map
(
item
=>
item
.
id
).
join
();
}
this
.
mainId
=
this
.
id
;
uni
.
navigateTo
({
url
:
`/pages/payment-order/index?checkedId=
${
checkedId
}
`
,
url
:
`/pages/payment-order/index?
mainId=
${
this
.
id
}
&
checkedId=
${
checkedId
}
`
,
events
:
{
acceptDataFromOpenedPage
:
(
data
)
=>
{
this
.
selectList
=
data
.
data
;
this
.
isEdit
=
true
;
let
list
=
data
.
data
.
map
(
item
=>
{
return
{
...
item
,
totalContractPriceIncluding
:
Number
(
item
.
remainingAmount
),
isEdit
:
true
}
});
this
.
subList
=
[...
list
,...
this
.
subList
];
console
.
log
(
this
.
subList
,
99999
)
this
.
$forceUpdate
();
}
}
})
},
onSubmit
(
t
)
{
if
(
this
.
isEdit
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请将数据保存后提交"
})
return
}
this
.
submitType
=
t
;
this
.
content
=
this
.
submitType
==
1
?
'请确认是否进行审核通过操作?'
:
"请确认是否进行核销通过操作?"
this
.
show
=
true
...
...
@@ -279,6 +322,44 @@
})
}
else
if
(
this
.
submitType
==
3
){
this
.
isEdit
=
false
;
if
(
this
.
mainId
){
let
list
=
this
.
subList
.
filter
(
item
=>
item
.
isEdit
).
map
(
item
=>
{
return
{
...
item
,
thisAmount
:
item
.
totalContractPriceIncluding
}
})
saveBySelect
(
list
,{
hiddenConditions
:
'1'
,
billState
:
'1'
,
mainId
:
this
.
mainId
}).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"新增成功"
})
this
.
mainId
=
""
setTimeout
(()
=>
{
this
.
onGetList
();
},
1500
)
}
})
}
else
{
updateList
(
this
.
subList
).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"操作成功"
})
}
setTimeout
(()
=>
{
this
.
onGetList
();
},
1500
)
})
}
}
},
onBack
()
{
...
...
@@ -344,9 +425,11 @@
.
columns
);
if
(
list
&&
list
.
length
)
{
this
.
subList
=
list
.
map
(
item
=>
{
return
{
...
item
,
totalContractPriceIncluding
:
Number
(
item
.
totalContractPriceIncluding
)
totalContractPriceIncluding
:
Number
(
item
.
totalContractPriceIncluding
),
createdDate
:
formatForLen14
(
item
.
createdTime
)
}
})
}
...
...
pages/payment-order/index.vue
View file @
a8ea6fea
...
...
@@ -149,15 +149,13 @@
return
{
...
this
.
projectDataList
[
val
],
billId
:
this
.
projectDataList
[
val
].
id
,
mainId
:
this
.
mainId
mainId
:
this
.
mainId
,
contractNumber
:
this
.
projectDataList
[
val
].
billNumber
}
})
this
.
eventChannel
.
emit
(
'acceptDataFromOpenedPage'
,
{
data
:
list
});
}
this
.
onBack
();
},
onSelect
(
k
){
...
...
pages/product-order/list.vue
View file @
a8ea6fea
...
...
@@ -109,11 +109,11 @@
<text
class=
"text-gray part-2"
>
:
</text>
<text
class=
"text-title"
>
{{
item
.
finishQuantity
}}
</text>
</view>
<view
class=
"flex-row"
>
<
!--
<
view
class=
"flex-row"
>
<text
class=
"text-gray part-1"
>
完成状态
</text>
<text
class=
"text-gray part-2"
>
:
</text>
<text
class=
"text-title"
>
{{
Number
(
item
.
finishQuantity
)
>=
Number
(
item
.
quantity
)?
'已完工'
:
'未完工'
}}
</text>
</view>
</view>
-->
</view>
...
...
@@ -184,11 +184,11 @@
},
{
name
:
'未完工'
,
value
:
0
value
:
'0'
},
{
name
:
'已完工'
,
value
:
1
value
:
'1'
}
],
value
:
0
,
...
...
pages/settlement-doc/add.vue
View file @
a8ea6fea
...
...
@@ -250,15 +250,14 @@
placeholder=
"请输入工程量"
/>
</view>
</view>
<!--
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text>
累计结算工程量:
</text>
</view>
<view
class=
""
>
<u-input
v-model=
"item.cumulativeEngineeringQuantity"
:disabled=
"true"
color=
"#0081ff"
inputAlign=
"right"
type=
"number"
:border=
"border"
placeholder=
"请输入工程量"
/>
<text>
{{
item
.
cumulativeEngineeringQuantity
}}
</text>
</view>
</view>
-->
</view>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text>
单位:
</text>
...
...
@@ -285,7 +284,7 @@
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text
class=
"text-xl text-red"
>
*
</text>
<text>
合
价
:
</text>
<text>
合
计
:
</text>
</view>
<view
class=
"text-blue"
>
<text>
{{
item
.
totalPrice
||
0
}}
</text>
...
...
@@ -346,15 +345,6 @@
contractDate
:
moment
().
format
(
"YYYY-MM-DD"
)
},
formList
:
[],
settlementCategoryList
:
[{
value
:
1
,
label
:
'过程结算'
},
{
value
:
1
,
label
:
'最终结算'
}
],
settlementCategoryIndex
:
-
1
,
priceTaxSeparationList
:[],
priceTaxSeparationIndex
:
-
1
,
...
...
pages/settlement-doc/edit.vue
View file @
a8ea6fea
This diff is collapsed.
Click to expand it.
static/HGAPP71.png
0 → 100644
View file @
a8ea6fea
7.71 KB
utils/tools.js
View file @
a8ea6fea
...
...
@@ -172,4 +172,13 @@ export function getDictItem(dicts, dictType) {
obj
=
''
}
return
obj
}
\ No newline at end of file
}
// 将14位数的时间字符串转化为时间格式
export
function
formatForLen14
(
dateStr
)
{
if
(
dateStr
&&
dateStr
.
length
===
14
){
let
strList
=
dateStr
.
split
(
''
);
dateStr
=
`
${
strList
[
0
]}${
strList
[
1
]}${
strList
[
2
]}${
strList
[
3
]}
/
${
strList
[
4
]}${
strList
[
5
]}
/
${
strList
[
6
]}${
strList
[
7
]}
${
strList
[
8
]}${
strList
[
9
]}
:
${
strList
[
10
]}${
strList
[
11
]}
:
${
strList
[
12
]}${
strList
[
13
]}
`
}
return
dateStr
}
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