Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
0e6b9197
Commit
0e6b9197
authored
Jun 15, 2022
by
何毅恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
溯源需求
parent
a2a76c59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
2 deletions
+47
-2
subPages/originSafe/index.vue
subPages/originSafe/index.vue
+47
-2
No files found.
subPages/originSafe/index.vue
View file @
0e6b9197
...
...
@@ -54,6 +54,7 @@
>批次
{{
pidx
+
1
}}
</view>
</scroll-view>
</
template
>
</template>
<!-- 字段都是不一样的 -->
...
...
@@ -88,7 +89,16 @@
v-if=
"detail.list[cur_index].dynamic_data.goods_report_file_url && detail.list[cur_index].dynamic_data.goods_report_file_url !== '无'"
:list=
"detail.list[cur_index].report_imgs"
/>
</view>
<!-- 溯源 -->
<view
class=
"traceability"
v-if=
"detail.list[cur_index].dynamic_data.material_log.length>0"
>
<view
class=
"traceability_title"
>
产品加工信息
</view>
<view
class=
"traceability_box"
v-for=
"(item,index) in detail.list[cur_index].dynamic_data.material_log"
:key=
"index"
>
<view
class=
"traceability_time"
>
{{ timestampToTime(item.operator_time) }}
</view>
<view
class=
"traceability_msg"
>
{{ item.msg }}
</view>
</view>
</view>
</view>
>
</template>
<
script
>
...
...
@@ -128,6 +138,7 @@
i
.
jxs_imgs
=
[...
i
.
dynamic_data
.
jxs_zhizhao
,
...
i
.
dynamic_data
.
jxs_food_production_license
,
...
i
.
dynamic_data
.
jxs_other_qualifications
]
i
.
production_data
=
i
.
production_data
?
dayjs
(
i
.
production_data
*
1000
).
format
(
'
YYYY-MM-DD
'
)
:
'
--
'
i
.
report_imgs
=
[
i
.
dynamic_data
.
goods_report_file_url
]
i
.
material_log
=
[
i
.
dynamic_data
.
material_log
]
})
this
.
detail
=
{
goodsInfo
:
{
...
...
@@ -135,8 +146,10 @@
},
list
:
[...
data
.
finList
]
}
console
.
log
(
this
.
detail
);
}
})
},
handleTab
(
e
)
{
...
...
@@ -144,7 +157,17 @@
console
.
log
(
curidx
)
if
(
curidx
===
this
.
cur_index
)
return
this
.
cur_index
=
curidx
}
},
timestampToTime
(
timestamp
)
{
let
date
=
new
Date
(
timestamp
*
1000
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
(
date
.
getDate
()
<
10
?
'
0
'
+
date
.
getDate
()
:
date
.
getDate
())
+
'
'
;
let
h
=
(
date
.
getHours
()
<
10
?
'
0
'
+
date
.
getHours
()
:
date
.
getHours
())
+
'
:
'
;
let
m
=
(
date
.
getMinutes
()
<
10
?
'
0
'
+
date
.
getMinutes
()
:
date
.
getMinutes
())
+
'
:
'
;
let
s
=
date
.
getSeconds
()
<
10
?
'
0
'
+
date
.
getSeconds
()
:
date
.
getSeconds
();
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
}
}
</
script
>
...
...
@@ -242,4 +265,26 @@
@include
borderBox
(
40rpx
,
30rpx
);
background-color
:
#fff
;
}
.traceability
{
background-color
:
#fff
;
padding
:
20rpx
30rpx
;
.traceability_title
{
margin-bottom
:
20rpx
;
font-size
:
28rpx
;
}
.traceability_box
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20rpx
;
.traceability_time
{
margin-right
:
50rpx
;
color
:
#7F7F7F
;
}
.traceability_msg
{
color
:
#7F7F7F
;
}
}
}
</
style
>
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