Commit e7ba37fc authored by 李硕's avatar 李硕

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

parent fb224db1
...@@ -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="{{prizeNameTips.content}}" validateState="{{nameTips.status}}" help="{{nameTips.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>
......
...@@ -49,7 +49,7 @@ Component({ ...@@ -49,7 +49,7 @@ Component({
status: "success", status: "success",
content: "", content: "",
}, },
prizeNameTips: { nameTips: {
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,38 +411,32 @@ Component({ ...@@ -410,38 +411,32 @@ Component({
this.showItemTips("prizeDescTips", "success", ""); this.showItemTips("prizeDescTips", "success", "");
} }
if (!name) { if (!name) {
this.showItemTips("prizeNameTips", "error", "请输入奖品名称"); this.showItemTips("nameTips", "error", "请输入奖品名称");
} else { } else {
this.showItemTips("prizeNameTips", "success", ""); this.showItemTips("nameTips", "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) this.showItemTips(
) { "prizeNumberTips",
if (!validateRangeNumber(stock, [0, 99999])) { "error",
this.showItemTips( "奖品库存为0-99999之间的整数且大于发放库存"
"prizeNumberTips", );
"error", }
"奖品库存为0-99999之间的整数且大于发放库存" else {
); this.showItemTips(
} "prizeNumberTips",
if (!usePass) { "success",
this.showItemTips( ""
"prizeNumberTips", );
"error",
"奖品库存必须大于发放库存"
);
}
} else {
this.showItemTips("prizeNumberTips", "success", "");
} }
if (type == CREDITS_TYPE && !validateRangeNumber(credits, [0, 999])) { if (type == CREDITS_TYPE && !validateRangeNumber(credits, [0, 999])) {
...@@ -460,8 +455,8 @@ Component({ ...@@ -460,8 +455,8 @@ Component({
dialogType == "rank" dialogType == "rank"
? rankArr.length == 2 ? rankArr.length == 2
? +rankArr[0] <= +rankArr[1] && ? +rankArr[0] <= +rankArr[1] &&
/^[1-9]+[0-9]*$/.test(+rankArr[0]) && /^[1-9]+[0-9]*$/.test(+rankArr[0]) &&
/^[1-9]+[0-9]*$/.test(+rankArr[1]) /^[1-9]+[0-9]*$/.test(+rankArr[1])
: false : false
: true; : true;
if (dialogType === "rank") { if (dialogType === "rank") {
...@@ -530,6 +525,7 @@ Component({ ...@@ -530,6 +525,7 @@ Component({
probability, probability,
stock, stock,
credits, credits,
useStock,
rank, rank,
switchStock, switchStock,
...rest, ...rest,
......
...@@ -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: 'prizeName' }, { title: '奖品名', prop: 'name' },
{ title: '收货人', prop: 'receiveName' }, { title: '收货人', prop: 'receiveName' },
{ title: '联系方式', prop: 'phone' }, { title: '联系方式', prop: 'phone' },
/* 注:需要在接口里将 省+市+区+详细 拼写起来*/ /* 注:需要在接口里将 省+市+区+详细 拼写起来*/
......
...@@ -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.prizeName || "", v.name || "",
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.prizeName || "", v.name || "",
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 : "未填"),
......
...@@ -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,
prizeName: prizeItem.name, name: prizeItem.name,
image: prizeItem.image, image: prizeItem.image,
type: prizeItem.type || "", type: prizeItem.type || "",
amount: prizeItem.amount || "", amount: prizeItem.amount || "",
......
...@@ -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,
}; };
......
...@@ -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.prizeName]); xlsxData.push([index + 1, v.rank, v.userNick, v.name]);
}); });
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.prizeName || '', v.name || '',
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 : '未填',
......
...@@ -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.prizeName]) xlsxData.push([index + 1, v.rank, v.userNick, v.name])
}) })
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.prizeName || '', v.name || '',
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 : '未填',
......
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