Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
e7ba37fc
Commit
e7ba37fc
authored
Oct 08, 2020
by
李硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出中奖信息中奖表中name字段
parent
fb224db1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
40 deletions
+36
-40
prize-dialog.axml
client/components/dialog/prize-dialog/prize-dialog.axml
+1
-1
prize-dialog.js
client/components/dialog/prize-dialog/prize-dialog.js
+26
-30
rank-dialog.js
client/components/dialog/rank-dialog/rank-dialog.js
+1
-1
awards.controller.js
server/duiba/controller/awards.controller.js
+2
-2
endingNodify.controller.js
server/duiba/controller/endingNodify.controller.js
+1
-1
activitytop.service.js
server/duiba/service/activitytop.service.js
+1
-1
awards.controller.js
server/duibats/dist/controller/awards.controller.js
+2
-2
awards.controller.ts
server/duibats/src/controller/awards.controller.ts
+2
-2
No files found.
client/components/dialog/prize-dialog/prize-dialog.axml
View file @
e7ba37fc
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
size="large"
size="large"
class="probability-prize-content-formItem"
class="probability-prize-content-formItem"
label="奖品名称"
label="奖品名称"
validateState="{{
prizeNameTips.status}}" help="{{prizeN
ameTips.content}}"
validateState="{{
nameTips.status}}" help="{{n
ameTips.content}}"
required>
required>
<input class="probability-prize-content-input" data-name="name" onChange="onChangePrizeValue" maxLength="10" value="{{prizeInitData.name}}" hasLimitHint="true" name="奖品名称" defaultValue="{{prizeDialogEdit ? prizeDialogData.record.name : prizeInitData.name}}" placeholder="请输入奖品名称"/>
<input class="probability-prize-content-input" data-name="name" onChange="onChangePrizeValue" maxLength="10" value="{{prizeInitData.name}}" hasLimitHint="true" name="奖品名称" defaultValue="{{prizeDialogEdit ? prizeDialogData.record.name : prizeInitData.name}}" placeholder="请输入奖品名称"/>
</form-item>
</form-item>
...
...
client/components/dialog/prize-dialog/prize-dialog.js
View file @
e7ba37fc
...
@@ -49,7 +49,7 @@ Component({
...
@@ -49,7 +49,7 @@ Component({
status
:
"success"
,
status
:
"success"
,
content
:
""
,
content
:
""
,
},
},
prizeN
ameTips
:
{
n
ameTips
:
{
status
:
"success"
,
status
:
"success"
,
content
:
""
,
content
:
""
,
},
},
...
@@ -107,8 +107,8 @@ Component({
...
@@ -107,8 +107,8 @@ Component({
visible
:
false
,
visible
:
false
,
hasEditPrize
:
false
,
hasEditPrize
:
false
,
datasource
:
[],
datasource
:
[],
onCloseDialog
:
function
()
{},
onCloseDialog
:
function
()
{
},
onUpdate
:
function
()
{},
onUpdate
:
function
()
{
},
},
},
didMount
()
{
didMount
()
{
this
.
initPosition
();
this
.
initPosition
();
...
@@ -198,6 +198,7 @@ Component({
...
@@ -198,6 +198,7 @@ Component({
prizeInitData
:
{
prizeInitData
:
{
...
INIT_DATA
,
...
INIT_DATA
,
type
,
type
,
_id
:
null
,
rank
,
rank
,
},
},
});
});
...
@@ -410,39 +411,33 @@ Component({
...
@@ -410,39 +411,33 @@ Component({
this
.
showItemTips
(
"prizeDescTips"
,
"success"
,
""
);
this
.
showItemTips
(
"prizeDescTips"
,
"success"
,
""
);
}
}
if
(
!
name
)
{
if
(
!
name
)
{
this
.
showItemTips
(
"
prizeN
ameTips"
,
"error"
,
"请输入奖品名称"
);
this
.
showItemTips
(
"
n
ameTips"
,
"error"
,
"请输入奖品名称"
);
}
else
{
}
else
{
this
.
showItemTips
(
"
prizeN
ameTips"
,
"success"
,
""
);
this
.
showItemTips
(
"
n
ameTips"
,
"success"
,
""
);
}
}
if
(
!
image
)
{
if
(
!
image
)
{
this
.
showItemTips
(
"imageTips"
,
"error"
,
"请配置奖品图片"
);
this
.
showItemTips
(
"imageTips"
,
"error"
,
"请配置奖品图片"
);
}
}
}
}
//库存奖品的库存值判断
//库存奖品的库存值判断
let
usePass
=
switchStock
==
1
?
+
stock
>=
(
+
useStock
||
0
)
:
true
;
let
usePass
=
switchStock
==
1
?
+
stock
>=
(
useStock
||
0
)
:
true
;
console
.
log
(
"stock=="
,
stock
,
"useStock=="
,
useStock
);
console
.
log
(
"stock=="
,
stock
,
"useStock=="
,
useStock
,
'type==='
,
type
);
if
(
let
intNum
=
/^
[
1-9
]
+
[
0-9
]
*$/
;
(
type
==
OBJECT_TYPE
||
type
==
EQUITY_TYPE
)
&&
console
.
log
(
intNum
.
test
(
+
stock
),
+
stock
<=
0
,
+
stock
>
99999
,
usePass
);
switchStock
===
STOCK_LIMIT
&&
if
(
!
intNum
.
test
(
+
stock
)
||
+
stock
<=
0
||
+
stock
>
99999
||
!
usePass
)
{
(
!
validateRangeNumber
(
stock
,
[
0
,
99999
])
||
!
usePass
)
)
{
if
(
!
validateRangeNumber
(
stock
,
[
0
,
99999
]))
{
this
.
showItemTips
(
this
.
showItemTips
(
"prizeNumberTips"
,
"prizeNumberTips"
,
"error"
,
"error"
,
"奖品库存为0-99999之间的整数且大于发放库存"
"奖品库存为0-99999之间的整数且大于发放库存"
);
);
}
}
if
(
!
usePass
)
{
else
{
this
.
showItemTips
(
this
.
showItemTips
(
"prizeNumberTips"
,
"prizeNumberTips"
,
"error
"
,
"success
"
,
"奖品库存必须大于发放库存
"
"
"
);
);
}
}
}
else
{
this
.
showItemTips
(
"prizeNumberTips"
,
"success"
,
""
);
}
if
(
type
==
CREDITS_TYPE
&&
!
validateRangeNumber
(
credits
,
[
0
,
999
]))
{
if
(
type
==
CREDITS_TYPE
&&
!
validateRangeNumber
(
credits
,
[
0
,
999
]))
{
this
.
showItemTips
(
this
.
showItemTips
(
...
@@ -530,6 +525,7 @@ Component({
...
@@ -530,6 +525,7 @@ Component({
probability
,
probability
,
stock
,
stock
,
credits
,
credits
,
useStock
,
rank
,
rank
,
switchStock
,
switchStock
,
...
rest
,
...
rest
,
...
...
client/components/dialog/rank-dialog/rank-dialog.js
View file @
e7ba37fc
...
@@ -53,7 +53,7 @@ Component({
...
@@ -53,7 +53,7 @@ Component({
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'发奖来源'
,
prop
:
'prizeDataType'
},
{
title
:
'发奖来源'
,
prop
:
'prizeDataType'
},
{
title
:
'奖品类型'
,
prop
:
'type'
},
{
title
:
'奖品类型'
,
prop
:
'type'
},
{
title
:
'奖品名'
,
prop
:
'
prizeN
ame'
},
{
title
:
'奖品名'
,
prop
:
'
n
ame'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
/* 注:需要在接口里将 省+市+区+详细 拼写起来*/
/* 注:需要在接口里将 省+市+区+详细 拼写起来*/
...
...
server/duiba/controller/awards.controller.js
View file @
e7ba37fc
...
@@ -133,7 +133,7 @@ const exportAwardsList = async (context) => {
...
@@ -133,7 +133,7 @@ const exportAwardsList = async (context) => {
v
.
userNick
||
"/"
,
v
.
userNick
||
"/"
,
prizePoolType
[
v
.
prizeDataType
],
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
""
,
v
.
n
ame
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
v
.
type
==
1
?
"/"
:
(
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressDetail
:
"未填"
),
v
.
type
==
1
?
"/"
:
(
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressDetail
:
"未填"
),
...
@@ -265,7 +265,7 @@ const exportAwardsInfoBySearch = async (context) => {
...
@@ -265,7 +265,7 @@ const exportAwardsInfoBySearch = async (context) => {
v
.
userNick
||
"/"
,
v
.
userNick
||
"/"
,
prizePoolType
[
v
.
prizeDataType
],
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
""
,
v
.
n
ame
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
v
.
type
==
1
?
"/"
:
(
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressDetail
:
"未填"
),
v
.
type
==
1
?
"/"
:
(
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressDetail
:
"未填"
),
...
...
server/duiba/controller/endingNodify.controller.js
View file @
e7ba37fc
...
@@ -80,7 +80,7 @@ const getWaitAwardsList = (prizeList, topscoreList, totalAwards, shopId) => {
...
@@ -80,7 +80,7 @@ const getWaitAwardsList = (prizeList, topscoreList, totalAwards, shopId) => {
startTime
:
prizeItem
.
startTime
,
startTime
:
prizeItem
.
startTime
,
endTime
:
prizeItem
.
endTime
,
endTime
:
prizeItem
.
endTime
,
prizeId
:
prizeItem
.
_id
,
prizeId
:
prizeItem
.
_id
,
prizeN
ame
:
prizeItem
.
name
,
n
ame
:
prizeItem
.
name
,
image
:
prizeItem
.
image
,
image
:
prizeItem
.
image
,
type
:
prizeItem
.
type
||
""
,
type
:
prizeItem
.
type
||
""
,
amount
:
prizeItem
.
amount
||
""
,
amount
:
prizeItem
.
amount
||
""
,
...
...
server/duiba/service/activitytop.service.js
View file @
e7ba37fc
...
@@ -239,7 +239,7 @@ class ActivityTopService {
...
@@ -239,7 +239,7 @@ class ActivityTopService {
let
data
=
{
let
data
=
{
fields
:
GOODSINFO
,
fields
:
GOODSINFO
,
pageNo
,
pageNo
,
q
:
title
,
title
,
pageSize
,
pageSize
,
...
sellerConfig
,
...
sellerConfig
,
};
};
...
...
server/duibats/dist/controller/awards.controller.js
View file @
e7ba37fc
...
@@ -148,7 +148,7 @@ var BaseController = /** @class */ (function () {
...
@@ -148,7 +148,7 @@ var BaseController = /** @class */ (function () {
console
.
log
(
"awardslist: "
+
JSON
.
stringify
(
awardslist
));
console
.
log
(
"awardslist: "
+
JSON
.
stringify
(
awardslist
));
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]];
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]];
awardslist
.
forEach
(
function
(
v
,
index
,
arr
)
{
awardslist
.
forEach
(
function
(
v
,
index
,
arr
)
{
xlsxData
.
push
([
index
+
1
,
v
.
rank
,
v
.
userNick
,
v
.
prizeN
ame
]);
xlsxData
.
push
([
index
+
1
,
v
.
rank
,
v
.
userNick
,
v
.
n
ame
]);
});
});
buffer
=
xlsx
.
build
([
buffer
=
xlsx
.
build
([
{
{
...
@@ -255,7 +255,7 @@ var BaseController = /** @class */ (function () {
...
@@ -255,7 +255,7 @@ var BaseController = /** @class */ (function () {
v
.
userNick
||
'/'
,
v
.
userNick
||
'/'
,
prizePoolType
[
v
.
prizeDataType
],
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
''
,
v
.
n
ame
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressdetail
:
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressdetail
:
'未填'
,
...
...
server/duibats/src/controller/awards.controller.ts
View file @
e7ba37fc
...
@@ -86,7 +86,7 @@ export default class BaseController {
...
@@ -86,7 +86,7 @@ export default class BaseController {
let
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]]
let
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]]
awardslist
.
forEach
((
v
,
index
,
arr
)
=>
{
awardslist
.
forEach
((
v
,
index
,
arr
)
=>
{
xlsxData
.
push
([
index
+
1
,
v
.
rank
,
v
.
userNick
,
v
.
prizeN
ame
])
xlsxData
.
push
([
index
+
1
,
v
.
rank
,
v
.
userNick
,
v
.
n
ame
])
})
})
let
buffer
=
xlsx
.
build
([
let
buffer
=
xlsx
.
build
([
{
{
...
@@ -211,7 +211,7 @@ export default class BaseController {
...
@@ -211,7 +211,7 @@ export default class BaseController {
v
.
userNick
||
'/'
,
v
.
userNick
||
'/'
,
prizePoolType
[
v
.
prizeDataType
],
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
''
,
v
.
n
ame
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressdetail
:
'未填'
,
v
.
type
==
1
?
'/'
:
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressdetail
:
'未填'
,
...
...
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