Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
2023fc1c
Commit
2023fc1c
authored
Jul 08, 2021
by
高铭波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf(order):勘查材料金额计算修改
parent
08090899
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
203 additions
and
188 deletions
+203
-188
index.vue
src/components/order/index.vue
+170
-172
material.vue
src/pages/order/material.vue
+33
-16
No files found.
src/components/order/index.vue
View file @
2023fc1c
This diff is collapsed.
Click to expand it.
src/pages/order/material.vue
View file @
2023fc1c
...
...
@@ -25,7 +25,12 @@
</u-tr>
<view
class=
"line-view"
></view>
<u-tr
class=
"u-tr"
v-for=
"(item, index) in list"
:key=
"index"
>
<u-td
class=
"u-td"
v-for=
"(value, key) in titles"
:key=
"key"
>
<u-td
class=
"u-td"
v-for=
"(value, key) in titles"
:key=
"key"
width=
"200"
>
<view
v-if=
"key == 'useLength'"
class=
"uselen-input"
>
<u-input
@
blur=
"handleBlur(item)"
...
...
@@ -143,6 +148,15 @@ export default {
useLength
:
"用量"
,
};
},
widths
()
{
return
{
matName
:
200
,
matUnit
:
"auto"
,
freeLength
:
"auto"
,
unitAmt
:
"auto"
,
useLength
:
"auto"
,
};
},
thStyle
()
{
return
{
"font-weight"
:
"bold"
,
...
...
@@ -162,9 +176,9 @@ export default {
var
amount
=
0
;
for
(
var
item
of
this
.
list
)
{
if
(
N
umber
(
item
.
useLength
)
&&
N
umber
(
item
.
freeLength
)
&&
N
umber
(
item
.
unitAmt
)
this
.
$u
.
test
.
n
umber
(
item
.
useLength
)
&&
this
.
$u
.
test
.
n
umber
(
item
.
freeLength
)
&&
this
.
$u
.
test
.
n
umber
(
item
.
unitAmt
)
)
{
amount
+=
Math
.
max
(
Number
(
item
.
useLength
)
-
Number
(
item
.
freeLength
),
0
)
*
...
...
@@ -197,6 +211,9 @@ export default {
eventChannel
.
on
(
"showMaterialData"
,
function
(
data
)
{
if
(
!
data
||
data
.
length
===
0
)
{
self
.
getMaterialData
();
if
(
self
.
$u
.
test
.
isEmpty
(
self
.
other
))
{
self
.
handleAdd
();
}
}
else
{
self
.
formatServiceMoreList
(
data
);
}
...
...
@@ -208,7 +225,7 @@ export default {
matName
:
"开孔厚40cm以上,直径11cm以下"
,
matUnit
:
"个"
,
freeLength
:
0
,
unitAmt
:
0
,
unitAmt
:
1
0
,
useLength
:
0
,
},
{
...
...
@@ -217,7 +234,7 @@ export default {
matName
:
"验收完成后移动安装地点"
,
matUnit
:
"次"
,
freeLength
:
0
,
unitAmt
:
0
,
unitAmt
:
2
0
,
useLength
:
0
,
},
{
...
...
@@ -226,7 +243,7 @@ export default {
matName
:
"北京地区报装"
,
matUnit
:
"次"
,
freeLength
:
0
,
unitAmt
:
0
,
unitAmt
:
3
0
,
useLength
:
0
,
},
{
...
...
@@ -235,7 +252,7 @@ export default {
matName
:
"墙面开墙及恢复"
,
matUnit
:
"米"
,
freeLength
:
0
,
unitAmt
:
0
,
unitAmt
:
4
0
,
useLength
:
0
,
},
{
...
...
@@ -244,7 +261,7 @@ export default {
matName
:
"安装位置单次往返经销商距离"
,
matUnit
:
"千米"
,
freeLength
:
0
,
unitAmt
:
0
,
unitAmt
:
5
0
,
useLength
:
0
,
},
{
...
...
@@ -252,8 +269,8 @@ export default {
priceType
:
"01"
,
matName
:
"开孔厚40cm以上,直径11cm以下"
,
matUnit
:
"个"
,
freeLength
:
0
,
unitAmt
:
0
,
freeLength
:
1
,
unitAmt
:
6
0
,
useLength
:
0
,
},
{
...
...
@@ -261,8 +278,8 @@ export default {
priceType
:
"01"
,
matName
:
"桥架50mm*50mm"
,
matUnit
:
"米"
,
freeLength
:
0
,
unitAmt
:
0
,
freeLength
:
2
,
unitAmt
:
7
0
,
useLength
:
0
,
},
{
...
...
@@ -270,7 +287,7 @@ export default {
priceType
:
"01"
,
matName
:
"铺装庭院开挖(复合材料)"
,
matUnit
:
"米"
,
freeLength
:
0
,
freeLength
:
3
,
unitAmt
:
220
,
useLength
:
0
,
},
...
...
@@ -334,7 +351,7 @@ export default {
let
row
=
this
.
list
.
find
((
item
,
index
)
=>
{
return
item
.
useLength
!=
0
;
});
if
(
!
this
.
$u
.
test
.
isEmpty
(
this
.
list
)
&&
this
.
$u
.
test
.
isEmpty
(
row
))
{
if
(
this
.
$u
.
test
.
isEmpty
(
row
))
{
this
.
$refs
.
uToast
.
show
({
title
:
"请填写电缆、漏保、空开等用量"
,
type
:
"error"
,
...
...
@@ -351,7 +368,7 @@ export default {
return
false
;
}
for
(
let
item
of
this
.
other
)
{
if
(
!
item
.
otherExplain
)
{
if
(
this
.
other
.
length
>
1
&&
!
item
.
otherExplain
)
{
this
.
$refs
.
uToast
.
show
({
title
:
"请输入其他项说明"
,
type
:
"warning"
,
...
...
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