Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
ae368147
Commit
ae368147
authored
Nov 15, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看价格增加状态
parent
e6023de0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
edit.vue
src/views/ecw/productPrice/edit.vue
+6
-1
index.vue
src/views/ecw/productPrice/index.vue
+2
-17
util.js
src/views/ecw/productPrice/util.js
+19
-0
No files found.
src/views/ecw/productPrice/edit.vue
View file @
ae368147
...
...
@@ -276,7 +276,8 @@
<
el
-
card
class
=
"
mt-10
"
v
-
if
=
"
readonly
"
>
<
el
-
descriptions
:
column
=
"
1
"
>
<
el
-
descriptions
-
item
:
label
=
"
$t('创建时间')
"
>
{{
form
.
createTime
|
parseTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('状态')
"
>
{{
statusName
(
form
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('创建时间')
"
>
{{
form
.
createTime
|
parseTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('创建人')
"
>
{{
form
.
creatorName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('最新修改时间')
"
>
{{
form
.
updateTime
|
parseTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('最新修改人')
"
>
{{
form
.
updaterName
}}
<
/el-descriptions-item
>
...
...
@@ -383,6 +384,7 @@ import {openedRouterList} from '@/api/ecw/warehouse'
import
Decimal
from
"
decimal.js
"
;
import
{
getChannel
}
from
"
@/api/ecw/channel
"
;
import
PackagingType
from
"
@/views/ecw/channel/componrnts/packaging-type.vue
"
;
import
{
getStatusName
}
from
'
./util
'
export
default
{
components
:
{
PackagingType
,
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
}
,
filters
:
{
parseTime
}
,
...
...
@@ -425,6 +427,9 @@ export default {
}
}
,
computed
:
{
statusName
(){
return
getStatusName
}
,
routerOption
(){
return
this
.
$route
.
query
}
,
...
...
src/views/ecw/productPrice/index.vue
View file @
ae368147
...
...
@@ -333,6 +333,7 @@ import {arrryToKeyedObjectBy} from '@/utils/index'
import
{
getProduct
}
from
'
@/api/ecw/product
'
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
Template
from
"
@/views/cms/template
"
;
import
{
getStatusName
}
from
"
./util
"
;
export
default
{
name
:
"
EcwProductpriceIndex
"
,
filters
:
{
parseTime
}
,
...
...
@@ -470,23 +471,7 @@ export default {
}
,
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName
()
{
return
row
=>
{
//判断价格是否过期
let
validateStartDate
=
row
.
validateStartDate
;
let
validateEndDate
=
row
.
validateEndDate
;
let
notSetPrice
=
false
;
let
nowDate
=
new
Date
().
getTime
();
if
(
validateStartDate
&&
validateStartDate
>
nowDate
)
{
notSetPrice
=
true
;
}
if
(
validateEndDate
&&
validateEndDate
<
nowDate
)
{
notSetPrice
=
true
;
}
let
setPriceText
=
notSetPrice
?
'
(
'
+
this
.
$t
(
'
已过期
'
)
+
'
)
'
:
''
;
if
(
row
.
blacklist
)
return
this
.
$t
(
'
黑名单
'
)
// + setPriceText;
if
(
row
.
auditStatus
===
AuditStatusEnum
.
PASS
)
return
this
.
$t
(
'
已上架
'
)
// + setPriceText;
return
this
.
$t
(
'
已下架
'
)
+
setPriceText
;
}
return
getStatusName
}
,
// 根据运输方式获取名称
...
...
src/views/ecw/productPrice/util.js
0 → 100644
View file @
ae368147
import
{
AuditStatusEnum
}
from
"
@/utils/constants
"
;
import
i18n
from
'
@/i18n
'
export
const
getStatusName
=
(
row
)
=>
{
//判断价格是否过期
let
validateStartDate
=
row
.
validateStartDate
;
let
validateEndDate
=
row
.
validateEndDate
;
let
notSetPrice
=
false
;
let
nowDate
=
new
Date
().
getTime
();
if
(
validateStartDate
&&
validateStartDate
>
nowDate
)
{
notSetPrice
=
true
;
}
if
(
validateEndDate
&&
validateEndDate
<
nowDate
)
{
notSetPrice
=
true
;
}
let
setPriceText
=
notSetPrice
?
'
(
'
+
i18n
.
t
(
'
已过期
'
)
+
'
)
'
:
''
;
if
(
row
.
blacklist
)
return
i18n
.
t
(
'
黑名单
'
)
// + setPriceText;
if
(
row
.
auditStatus
===
AuditStatusEnum
.
PASS
)
return
i18n
.
t
(
'
已上架
'
)
// + setPriceText;
return
i18n
.
t
(
'
已下架
'
)
+
setPriceText
;
}
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