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
cc8f6f40
Commit
cc8f6f40
authored
May 12, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
49173101
49bfbc44
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
37 deletions
+147
-37
XhFiles.vue
src/components/createCom/XhFiles.vue
+17
-24
XhLabel.vue
src/components/createCom/XhLabel.vue
+72
-0
index.vue
src/components/take/index.vue
+23
-2
complete.vue
src/pages/order/complete.vue
+31
-7
material.vue
src/pages/order/material.vue
+4
-4
No files found.
src/components/createCom/XhFiles.vue
View file @
cc8f6f40
...
...
@@ -41,7 +41,15 @@
},
partnerCompanyId
:
{
type
:
String
,
default
:
'{}'
default
:
''
},
categoryId
:
{
type
:
String
,
default
:
''
},
brandId
:
{
type
:
String
,
default
:
''
},
},
filters
:{},
...
...
@@ -117,14 +125,16 @@
setValue
()
{
const
dataValue
=
[]
this
.
imgList
.
map
(
item
=>
{
dataValue
.
push
(
item
.
path
)
dataValue
.
push
(
item
.
src
)
})
console
.
log
(
"dataValue"
,
dataValue
)
this
.
valueChange
(
dataValue
)
},
closeTake
(
val
)
{
if
(
val
&&
val
.
length
>
0
){
val
.
forEach
((
item
,
index
,
array
)
=>
{
item
.
path
=
item
.
key
item
.
src
=
item
.
key
this
.
imgList
.
push
(
item
)
})
this
.
setValue
()
...
...
@@ -143,34 +153,17 @@
},
getPhotoStander
(){
// 获取拍照规范接口
let
self
=
this
this
.
$u
.
api
.
orderStandardItem
({}).
then
((
res
)
=>
{
let
param
=
{
"partnerCompanyId"
:
self
.
partnerCompanyId
,
"categoryId"
:
self
.
categoryId
,
"brandId"
:
self
.
brandId
,
"fieldName"
:
self
.
item
.
fieldsName
}
this
.
$u
.
api
.
orderStandardItem
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
&&
res
.
data
.
length
>
0
)
{
self
.
currentItemDate
=
res
.
data
[
0
]
}
else
{
console
.
log
(
"获取完工项的拍照标准异常"
,
res
.
data
.
message
)
}
})
// self.currentItemDate = {
// "id": 154,
// "partnerCompanyId": 10115000001,
// "categoryId": 1100000216,
// "brandId": null,
// "type": "勘测部分",
// "name": "勘测单",
// "fieldName": "06",
// "images": [
// "https://cloud-bak.banshouhui.com/2-勘测单.jpg"
// ],
// "mainPoint": [
// "表格清晰,文字可辨",
// "表格居中,不倾斜",
// "全部填写完整,不能填写的部分划横杠。",
// "涉及到用户签字部分,不允许我方人员代签,由用户或用户指定人进行签字确认。",
// "涉及到物业的由现场物业人员签字确认。"
// ],
// "note": "正面拍摄,完整看到单据 4 条边",
// "orderImages": null
// }
},
getWatermark
(){
if
(
getApp
().
globalData
.
photo
.
waterSetting
){
...
...
src/components/createCom/XhLabel.vue
0 → 100644
View file @
cc8f6f40
<!-- ******************* 输入框 ******************* -->
<
template
>
<view>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
>
{{
valueTxt
}}
</view>
</view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
export
default
{
name
:
'XhInput'
,
// 新建 input
components
:
{},
mixins
:
[
stringMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请输入'
},
},
data
()
{
return
{
maxlength
:
140
,
}
},
computed
:
{
valueTxt
()
{
let
str
=
'元'
const
dataValue
=
this
.
dataValue
if
(
dataValue
>
0
){
str
=
dataValue
+
str
}
return
str
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
},
watch
:
{},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
.required
{
padding-right
:
10
rpx
;
font-size
:
28
rpx
;
line-height
:
40
rpx
;
color
:
#fa3534
;
}
.item-image
{
width
:
24
rpx
;
height
:
24
rpx
;
margin-right
:
10
rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F7
;
padding
:
10
rpx
20
rpx
;
border-radius
:
12
rpx
;
}
</
style
>
src/components/take/index.vue
View file @
cc8f6f40
...
...
@@ -113,12 +113,22 @@
photo
.
currentItemLength
=
0
// this.ctx = uni.createCameraContext();
this
.
updateTime
()
this
.
getLocation
()
const
locationData
=
uni
.
getStorageSync
(
'locationData'
)
const
validityTime
=
60000
if
(
Date
.
now
()
-
locationData
.
locationTime
<
validityTime
)
{
// 1分钟内不重复请求位置信息
this
.
waterInfo
.
latitude
=
locationData
.
waterInfo
.
latitude
this
.
waterInfo
.
longitude
=
locationData
.
waterInfo
.
longitude
this
.
baiduLocation
()
}
else
{
this
.
getLocation
()
}
this
.
getMarkPath
()
this
.
initData
()
photo
.
currentItem
=
this
.
currentItem
if
(
this
.
currentItem
.
images
.
length
>
0
)
{
if
(
this
.
currentItem
.
images
&&
this
.
currentItem
.
images
.
length
>
0
)
{
this
.
shadowInitShow
=
true
this
.
standardShow
=
true
this
.
standardStatus
=
true
...
...
@@ -266,6 +276,17 @@
success
:
function
(
res
)
{
waterInfo
.
longitude
=
parseFloat
(
res
.
longitude
).
toFixed
(
4
)
waterInfo
.
latitude
=
parseFloat
(
res
.
latitude
).
toFixed
(
3
)
const
data
=
{
waterInfo
:
{
latitude
:
waterInfo
.
latitude
,
longitude
:
waterInfo
.
longitude
},
locationTime
:
Date
.
now
()
}
uni
.
setStorage
({
key
:
'locationData'
,
data
:
data
,
})
that
.
baiduLocation
()
},
fail
(
err
)
{
...
...
src/pages/order/complete.vue
View file @
cc8f6f40
...
...
@@ -24,7 +24,7 @@
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsId != 200 || show200"
>
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'
&&
typeToComponentType(item.fieldsType)!=='form'">
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'
&&
typeToComponentType(item.fieldsType)!=='form'
&&
typeToComponentType(item.fieldsType)!=='label'
">
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
...
...
@@ -49,7 +49,7 @@
@
value-change=
"fieldValueChange"
>
</xh-select>
<xh-files
v-else-if=
"typeToComponentType(item.fieldsType)==='file'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:partnerCompanyId=
"partnerCompanyId"
:value=
'form[item.fieldsName] || []'
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:partnerCompanyId=
"partnerCompanyId"
:
categoryId=
"categoryId"
:
value=
'form[item.fieldsName] || []'
@
value-change=
"fieldValueChange"
>
</xh-files>
<xh-location
v-else-if=
"typeToComponentType(item.fieldsType)==='location'"
...
...
@@ -77,6 +77,9 @@
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:order-id=
"orderId"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
</xh-service-more>
<xh-label
v-else-if=
"typeToComponentType(item.fieldsType)==='label'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
>
</xh-label>
</
template
>
</u-form-item>
</view>
...
...
@@ -119,6 +122,7 @@
import
XhTime
from
'@/components/createCom/XhTime.vue'
import
XhServiceMeasure
from
'@/components/createCom/XhServiceMeasure.vue'
import
XhServiceMore
from
"../../components/createCom/XhServiceMore"
;
import
XhLabel
from
"../../components/createCom/XhLabel"
;
// import XhRadio from '@/components/createCom/XhRadio.vue'
export
default
{
data
()
{
...
...
@@ -191,13 +195,13 @@
XhPicker
,
XhTime
,
XhServiceMeasure
,
XhServiceMore
XhServiceMore
,
XhLabel
},
created
()
{
// console.log(allComponents,'allComponents')
},
onLoad
(
option
)
{
console
.
log
(
option
)
if
(
option
)
{
this
.
orderId
=
option
.
orderId
this
.
categoryId
=
option
.
categoryId
...
...
@@ -415,10 +419,29 @@
this
.
getMenuItemTop
()
})
},
calMaterialCraftListAmount
(
arr
){
let
amount
=
0
if
(
arr
){
arr
.
forEach
(
item
=>
{
if
(
Number
(
item
.
useLength
)
&&
Number
(
item
.
freeLength
)
&&
Number
(
item
.
unitAmt
))
{
amount
+=
Math
.
max
(
Number
(
item
.
useLength
)
-
Number
(
item
.
freeLength
),
0
)
*
Number
(
item
.
unitAmt
)
}
if
(
Number
(
item
.
extraAmt
)){
amount
+=
Number
(
item
.
extraAmt
)
}
})
}
return
amount
},
setData
(
data
){
// 通过页面设置数据
Object
.
keys
(
data
).
forEach
(
key
=>
{
this
.
$set
(
this
.
form
,
key
,
data
[
key
])
})
// 更新预计超出金额
let
amount
=
this
.
calMaterialCraftListAmount
(
this
.
form
.
materialList
)
amount
+=
this
.
calMaterialCraftListAmount
(
this
.
form
.
craftList
)
this
.
$set
(
this
.
form
,
'overAmount'
,
amount
)
},
// 字段的值更新
fieldValueChange
(
data
)
{
...
...
@@ -444,8 +467,6 @@
}
}
}
console
.
log
(
this
.
form
)
},
nextStep
()
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
...
...
@@ -469,7 +490,7 @@
case
'number'
:
case
'decimal'
:
case
'double'
:
case
'integer'
:
case
'integer'
:
formType
=
'input'
break
case
'multiinput'
:
...
...
@@ -510,6 +531,9 @@
case
'form'
:
formType
=
'form'
break
case
'label'
:
formType
=
'label'
break
}
return
formType
},
...
...
src/pages/order/material.vue
View file @
cc8f6f40
...
...
@@ -120,8 +120,8 @@
}
}
for
(
var
item
of
this
.
other
)
{
if
(
item
.
freeMount
&&
Number
(
item
.
freeMoun
t
))
{
amount
+=
Number
(
item
.
freeMoun
t
)
if
(
item
.
extraAmt
&&
Number
(
item
.
extraAm
t
))
{
amount
+=
Number
(
item
.
extraAm
t
)
}
}
return
amount
...
...
@@ -156,9 +156,9 @@
methods
:
{
getMaterialData
(){
let
self
=
this
self
.
$u
.
api
.
get
CompleteConfigAndData
(
self
.
orderId
).
then
((
res
)
=>
{
self
.
$u
.
api
.
get
OrderMaterial
(
self
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
!==
200
)
{
console
.
log
(
res
ult
.
data
.
message
)
console
.
log
(
res
.
data
.
message
)
return
}
self
.
formatServiceMoreList
(
res
.
data
)
...
...
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