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
Hide 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 @@
size="large"
class="probability-prize-content-formItem"
label="奖品名称"
validateState="{{
prizeNameTips.status}}" help="{{prizeN
ameTips.content}}"
validateState="{{
nameTips.status}}" help="{{n
ameTips.content}}"
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="请输入奖品名称"/>
</form-item>
...
...
client/components/dialog/prize-dialog/prize-dialog.js
View file @
e7ba37fc
...
...
@@ -49,7 +49,7 @@ Component({
status
:
"success"
,
content
:
""
,
},
prizeN
ameTips
:
{
n
ameTips
:
{
status
:
"success"
,
content
:
""
,
},
...
...
@@ -107,8 +107,8 @@ Component({
visible
:
false
,
hasEditPrize
:
false
,
datasource
:
[],
onCloseDialog
:
function
()
{},
onUpdate
:
function
()
{},
onCloseDialog
:
function
()
{
},
onUpdate
:
function
()
{
},
},
didMount
()
{
this
.
initPosition
();
...
...
@@ -198,6 +198,7 @@ Component({
prizeInitData
:
{
...
INIT_DATA
,
type
,
_id
:
null
,
rank
,
},
});
...
...
@@ -410,38 +411,32 @@ Component({
this
.
showItemTips
(
"prizeDescTips"
,
"success"
,
""
);
}
if
(
!
name
)
{
this
.
showItemTips
(
"
prizeN
ameTips"
,
"error"
,
"请输入奖品名称"
);
this
.
showItemTips
(
"
n
ameTips"
,
"error"
,
"请输入奖品名称"
);
}
else
{
this
.
showItemTips
(
"
prizeN
ameTips"
,
"success"
,
""
);
this
.
showItemTips
(
"
n
ameTips"
,
"success"
,
""
);
}
if
(
!
image
)
{
this
.
showItemTips
(
"imageTips"
,
"error"
,
"请配置奖品图片"
);
}
}
//库存奖品的库存值判断
let
usePass
=
switchStock
==
1
?
+
stock
>=
(
+
useStock
||
0
)
:
true
;
console
.
log
(
"stock=="
,
stock
,
"useStock=="
,
useStock
);
if
(
(
type
==
OBJECT_TYPE
||
type
==
EQUITY_TYPE
)
&&
switchStock
===
STOCK_LIMIT
&&
(
!
validateRangeNumber
(
stock
,
[
0
,
99999
])
||
!
usePass
)
)
{
if
(
!
validateRangeNumber
(
stock
,
[
0
,
99999
]))
{
this
.
showItemTips
(
"prizeNumberTips"
,
"error"
,
"奖品库存为0-99999之间的整数且大于发放库存"
);
}
if
(
!
usePass
)
{
this
.
showItemTips
(
"prizeNumberTips"
,
"error"
,
"奖品库存必须大于发放库存"
);
}
}
else
{
this
.
showItemTips
(
"prizeNumberTips"
,
"success"
,
""
);
let
usePass
=
switchStock
==
1
?
+
stock
>=
(
useStock
||
0
)
:
true
;
console
.
log
(
"stock=="
,
stock
,
"useStock=="
,
useStock
,
'type==='
,
type
);
let
intNum
=
/^
[
1-9
]
+
[
0-9
]
*$/
;
console
.
log
(
intNum
.
test
(
+
stock
),
+
stock
<=
0
,
+
stock
>
99999
,
usePass
);
if
(
!
intNum
.
test
(
+
stock
)
||
+
stock
<=
0
||
+
stock
>
99999
||
!
usePass
)
{
this
.
showItemTips
(
"prizeNumberTips"
,
"error"
,
"奖品库存为0-99999之间的整数且大于发放库存"
);
}
else
{
this
.
showItemTips
(
"prizeNumberTips"
,
"success"
,
""
);
}
if
(
type
==
CREDITS_TYPE
&&
!
validateRangeNumber
(
credits
,
[
0
,
999
]))
{
...
...
@@ -460,8 +455,8 @@ Component({
dialogType
==
"rank"
?
rankArr
.
length
==
2
?
+
rankArr
[
0
]
<=
+
rankArr
[
1
]
&&
/^
[
1-9
]
+
[
0-9
]
*$/
.
test
(
+
rankArr
[
0
])
&&
/^
[
1-9
]
+
[
0-9
]
*$/
.
test
(
+
rankArr
[
1
])
/^
[
1-9
]
+
[
0-9
]
*$/
.
test
(
+
rankArr
[
0
])
&&
/^
[
1-9
]
+
[
0-9
]
*$/
.
test
(
+
rankArr
[
1
])
:
false
:
true
;
if
(
dialogType
===
"rank"
)
{
...
...
@@ -530,6 +525,7 @@ Component({
probability
,
stock
,
credits
,
useStock
,
rank
,
switchStock
,
...
rest
,
...
...
client/components/dialog/rank-dialog/rank-dialog.js
View file @
e7ba37fc
...
...
@@ -53,7 +53,7 @@ Component({
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'发奖来源'
,
prop
:
'prizeDataType'
},
{
title
:
'奖品类型'
,
prop
:
'type'
},
{
title
:
'奖品名'
,
prop
:
'
prizeN
ame'
},
{
title
:
'奖品名'
,
prop
:
'
n
ame'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
/* 注:需要在接口里将 省+市+区+详细 拼写起来*/
...
...
server/duiba/controller/awards.controller.js
View file @
e7ba37fc
...
...
@@ -133,7 +133,7 @@ const exportAwardsList = async (context) => {
v
.
userNick
||
"/"
,
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
""
,
v
.
n
ame
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
v
.
type
==
1
?
"/"
:
(
v
.
province
?
v
.
province
+
v
.
city
+
v
.
area
+
v
.
addressDetail
:
"未填"
),
...
...
@@ -265,7 +265,7 @@ const exportAwardsInfoBySearch = async (context) => {
v
.
userNick
||
"/"
,
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
""
,
v
.
n
ame
||
""
,
v
.
type
==
1
?
"/"
:
v
.
receiveName
||
""
,
v
.
type
==
1
?
"/"
:
v
.
phone
||
"未填"
,
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) => {
startTime
:
prizeItem
.
startTime
,
endTime
:
prizeItem
.
endTime
,
prizeId
:
prizeItem
.
_id
,
prizeN
ame
:
prizeItem
.
name
,
n
ame
:
prizeItem
.
name
,
image
:
prizeItem
.
image
,
type
:
prizeItem
.
type
||
""
,
amount
:
prizeItem
.
amount
||
""
,
...
...
server/duiba/service/activitytop.service.js
View file @
e7ba37fc
...
...
@@ -239,7 +239,7 @@ class ActivityTopService {
let
data
=
{
fields
:
GOODSINFO
,
pageNo
,
q
:
title
,
title
,
pageSize
,
...
sellerConfig
,
};
...
...
server/duibats/dist/controller/awards.controller.js
View file @
e7ba37fc
...
...
@@ -148,7 +148,7 @@ var BaseController = /** @class */ (function () {
console
.
log
(
"awardslist: "
+
JSON
.
stringify
(
awardslist
));
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]];
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
([
{
...
...
@@ -255,7 +255,7 @@ var BaseController = /** @class */ (function () {
v
.
userNick
||
'/'
,
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
''
,
v
.
n
ame
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
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 {
let
xlsxData
=
[[
'序列'
,
'名次'
,
'昵称'
,
'中奖名称'
]]
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
([
{
...
...
@@ -211,7 +211,7 @@ export default class BaseController {
v
.
userNick
||
'/'
,
prizePoolType
[
v
.
prizeDataType
],
prizeKind
[
v
.
type
],
v
.
prizeN
ame
||
''
,
v
.
n
ame
||
''
,
v
.
type
==
1
?
'/'
:
v
.
receiveName
||
''
,
v
.
type
==
1
?
'/'
:
v
.
phone
||
'未填'
,
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