Commit e7ba37fc authored by 李硕's avatar 李硕

导出中奖信息中奖表中name字段

parent fb224db1
......@@ -29,7 +29,7 @@
size="large"
class="probability-prize-content-formItem"
label="奖品名称"
validateState="{{prizeNameTips.status}}" help="{{prizeNameTips.content}}"
validateState="{{nameTips.status}}" help="{{nameTips.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>
......
......@@ -49,7 +49,7 @@ Component({
status: "success",
content: "",
},
prizeNameTips: {
nameTips: {
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("prizeNameTips", "error", "请输入奖品名称");
this.showItemTips("nameTips", "error", "请输入奖品名称");
} else {
this.showItemTips("prizeNameTips", "success", "");
this.showItemTips("nameTips", "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,
......
......@@ -53,7 +53,7 @@ Component({
{ title: '用户昵称', prop: 'userNick' },
{ title: '发奖来源', prop: 'prizeDataType' },
{ title: '奖品类型', prop: 'type' },
{ title: '奖品名', prop: 'prizeName' },
{ title: '奖品名', prop: 'name' },
{ title: '收货人', prop: 'receiveName' },
{ title: '联系方式', prop: 'phone' },
/* 注:需要在接口里将 省+市+区+详细 拼写起来*/
......
......@@ -133,7 +133,7 @@ const exportAwardsList = async (context) => {
v.userNick || "/",
prizePoolType[v.prizeDataType],
prizeKind[v.type],
v.prizeName || "",
v.name || "",
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.prizeName || "",
v.name || "",
v.type == 1 ? "/" : v.receiveName || "",
v.type == 1 ? "/" : v.phone || "未填",
v.type == 1 ? "/" : (v.province ? v.province + v.city + v.area + v.addressDetail : "未填"),
......
......@@ -80,7 +80,7 @@ const getWaitAwardsList = (prizeList, topscoreList, totalAwards, shopId) => {
startTime: prizeItem.startTime,
endTime: prizeItem.endTime,
prizeId: prizeItem._id,
prizeName: prizeItem.name,
name: prizeItem.name,
image: prizeItem.image,
type: prizeItem.type || "",
amount: prizeItem.amount || "",
......
......@@ -239,7 +239,7 @@ class ActivityTopService {
let data = {
fields: GOODSINFO,
pageNo,
q: title,
title,
pageSize,
...sellerConfig,
};
......
......@@ -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.prizeName]);
xlsxData.push([index + 1, v.rank, v.userNick, v.name]);
});
buffer = xlsx.build([
{
......@@ -255,7 +255,7 @@ var BaseController = /** @class */ (function () {
v.userNick || '/',
prizePoolType[v.prizeDataType],
prizeKind[v.type],
v.prizeName || '',
v.name || '',
v.type == 1 ? '/' : v.receiveName || '',
v.type == 1 ? '/' : v.phone || '未填',
v.type == 1 ? '/' : v.province ? v.province + v.city + v.area + v.addressdetail : '未填',
......
......@@ -86,7 +86,7 @@ export default class BaseController {
let xlsxData = [['序列', '名次', '昵称', '中奖名称']]
awardslist.forEach((v, index, arr) => {
xlsxData.push([index + 1, v.rank, v.userNick, v.prizeName])
xlsxData.push([index + 1, v.rank, v.userNick, v.name])
})
let buffer = xlsx.build([
{
......@@ -211,7 +211,7 @@ export default class BaseController {
v.userNick || '/',
prizePoolType[v.prizeDataType],
prizeKind[v.type],
v.prizeName || '',
v.name || '',
v.type == 1 ? '/' : v.receiveName || '',
v.type == 1 ? '/' : v.phone || '未填',
v.type == 1 ? '/' : v.province ? v.province + v.city + v.area + v.addressdetail : '未填',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment