Commit c9d2741c by crushh

Merge branch 'bugfix/卡券复制' into master

parents 742e9d8b f1b2ef03
...@@ -122,14 +122,14 @@ ...@@ -122,14 +122,14 @@
<span slot="suffix">{{ proNameLen }}/30</span> <span slot="suffix">{{ proNameLen }}/30</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="数据对话"> <!-- <el-form-item label="数据对话">
<dm-activity-select <dm-activity-select
:repProjectName="projectName" :repProjectName="projectName"
width="300" width="300"
:actId.sync="couponForm.dataDialogueId" :actId.sync="couponForm.dataDialogueId"
:showAdd="false" :showAdd="false"
/> />
</el-form-item> </el-form-item> -->
</div> </div>
<div class="section-content"> <div class="section-content">
<h3>图文信息</h3> <h3>图文信息</h3>
...@@ -609,7 +609,6 @@ export default { ...@@ -609,7 +609,6 @@ export default {
exchangeDateWeekArr: [], exchangeDateWeekArr: [],
timeRangeList: [{ timeRange: '' }], // 部分时段数组 timeRangeList: [{ timeRange: '' }], // 部分时段数组
timeZones: ['', ''], timeZones: ['', ''],
dataDialogueId: '', // 数据对话id
ladder: [], ladder: [],
}, },
uploadAction: getInputVal.uploadAction(), uploadAction: getInputVal.uploadAction(),
...@@ -997,8 +996,6 @@ export default { ...@@ -997,8 +996,6 @@ export default {
} }
this.couponForm.timeRangeList = timeRangeList; this.couponForm.timeRangeList = timeRangeList;
} }
// 数据对话id
this.couponForm.dataDialogueId = res.data.result.dataDialogueId;
} else { } else {
this.submitLoading = false; this.submitLoading = false;
this.$message.error(res.data.message); this.$message.error(res.data.message);
...@@ -1105,6 +1102,8 @@ export default { ...@@ -1105,6 +1102,8 @@ export default {
// 子组件触发方法 // 子组件触发方法
selectCard (arr) { selectCard (arr) {
console.log(arr); console.log(arr);
console.log(this.cardList);
if (arr.length + this.cardList.length > 15) { if (arr.length + this.cardList.length > 15) {
this.$message.error(`最多支持添加15张卡券,目前一共选择${arr.length + this.cardList.length}张卡券`); this.$message.error(`最多支持添加15张卡券,目前一共选择${arr.length + this.cardList.length}张卡券`);
return; return;
...@@ -1127,6 +1126,7 @@ export default { ...@@ -1127,6 +1126,7 @@ export default {
}); });
this.limitTimesNumArr.push(val.cardLimit); this.limitTimesNumArr.push(val.cardLimit);
this.couponCardStockArr.push(val.couponStock); this.couponCardStockArr.push(val.couponStock);
console.log(this.couponCardStockArr);
this.limitTimes = Math.min.apply(null, this.limitTimesNumArr); this.limitTimes = Math.min.apply(null, this.limitTimesNumArr);
this.limitTimesNum = Math.min.apply(null, this.limitTimesNumArr); this.limitTimesNum = Math.min.apply(null, this.limitTimesNumArr);
this.couponCardStock = Math.min.apply(null, this.couponCardStockArr); this.couponCardStock = Math.min.apply(null, this.couponCardStockArr);
...@@ -1139,6 +1139,7 @@ export default { ...@@ -1139,6 +1139,7 @@ export default {
}; };
this.getCardCost(params); this.getCardCost(params);
} }
console.log(this.limitTimesNumArr);
}, },
async getCardCost (params) { async getCardCost (params) {
const res = await request.post('/api-integral-mall/get-integral-mall-CashCost', qs.stringify(params)); const res = await request.post('/api-integral-mall/get-integral-mall-CashCost', qs.stringify(params));
...@@ -1162,6 +1163,8 @@ export default { ...@@ -1162,6 +1163,8 @@ export default {
this.cardList.splice(index, 1); this.cardList.splice(index, 1);
this.cardCouponList.splice(index, 1); this.cardCouponList.splice(index, 1);
this.costValueArr.splice(index, 1); this.costValueArr.splice(index, 1);
this.couponCardStockArr.splice(index, 1);// 删除对应 卡券库存数组中的值
this.limitTimesNumArr.splice(index, 1);// 删除对应 卡券领取限制数组中的值
if (this.costValueArr.length) { if (this.costValueArr.length) {
const sum = this.costValueArr.reduce(function (prev, cur, index, array) { const sum = this.costValueArr.reduce(function (prev, cur, index, array) {
return prev + cur; return prev + cur;
...@@ -1186,6 +1189,8 @@ export default { ...@@ -1186,6 +1189,8 @@ export default {
this.couponCardStock = ''; this.couponCardStock = '';
this.couponForm.limitTimesStatus = false; this.couponForm.limitTimesStatus = false;
} }
console.log(this.limitTimesNumArr);
console.log(this.cardList);
}, },
// 券包积分计算 // 券包积分计算
handleIntegralCostTotal () { handleIntegralCostTotal () {
...@@ -1376,7 +1381,6 @@ export default { ...@@ -1376,7 +1381,6 @@ export default {
integralMallProId: this.isCopy ? '' : (this.mallProId === '-1' ? '' : this.mallProId), // 礼品id integralMallProId: this.isCopy ? '' : (this.mallProId === '-1' ? '' : this.mallProId), // 礼品id
proType: 1, // 优惠券 proType: 1, // 优惠券
proReferId: proReferIdArr.join(','), // 卡券id proReferId: proReferIdArr.join(','), // 卡券id
dataDialogueId: this.couponForm.dataDialogueId, // 数据对话id
cardCostList: this.cardCouponList.length > 1 ? this.cardCouponList : null, cardCostList: this.cardCouponList.length > 1 ? this.cardCouponList : null,
detailDescription: this.couponForm.detailDescription, // 图文详情 detailDescription: this.couponForm.detailDescription, // 图文详情
giftImageUrls: giftImageUrls.join(','), // 礼品主图 giftImageUrls: giftImageUrls.join(','), // 礼品主图
......
...@@ -99,14 +99,14 @@ ...@@ -99,14 +99,14 @@
新建分类 新建分类
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label="数据对话"> <!-- <el-form-item label="数据对话">
<dm-activity-select <dm-activity-select
:repProjectName="projectName" :repProjectName="projectName"
width="300" width="300"
:actId.sync="giftForm.dataDialogueId" :actId.sync="giftForm.dataDialogueId"
:showAdd="false" :showAdd="false"
/> />
</el-form-item> </el-form-item> -->
</div> </div>
<div class="section-content"> <div class="section-content">
<h3>销售信息</h3> <h3>销售信息</h3>
...@@ -764,7 +764,6 @@ export default { ...@@ -764,7 +764,6 @@ export default {
proReferId: '', // 礼品关联id proReferId: '', // 礼品关联id
proName: '', proName: '',
proCategoryId: '', // 分类id proCategoryId: '', // 分类id
dataDialogueId: '', // 数据对话id
images: [], images: [],
gradeType: 1, gradeType: 1,
memberGrade: [], // 适用会员 memberGrade: [], // 适用会员
...@@ -1260,7 +1259,6 @@ export default { ...@@ -1260,7 +1259,6 @@ export default {
this.giftForm.proName = data.proName; // 名称 this.giftForm.proName = data.proName; // 名称
this.proNameLen = getInputVal.getZhLen(this.giftForm.proName); this.proNameLen = getInputVal.getZhLen(this.giftForm.proName);
this.giftForm.proCategoryId = data.proCategoryId; // 分类 this.giftForm.proCategoryId = data.proCategoryId; // 分类
this.giftForm.dataDialogueId = data.dataDialogueId; // 数据对话id
this.giftForm.proCode = data.proCode; // 编码 this.giftForm.proCode = data.proCode; // 编码
this.giftForm.integralCost = data.integralCost; // 积分 this.giftForm.integralCost = data.integralCost; // 积分
this.giftForm.cashCost = data.cashCost; // 现金 this.giftForm.cashCost = data.cashCost; // 现金
...@@ -2265,7 +2263,6 @@ export default { ...@@ -2265,7 +2263,6 @@ export default {
proReferId: this.giftForm.proReferId, //关联id proReferId: this.giftForm.proReferId, //关联id
cardType: this.giftForm.changeType === 1 ? this.giftForm.cardType : '', //卡券类型 cardType: this.giftForm.changeType === 1 ? this.giftForm.cardType : '', //卡券类型
proCategoryId: this.giftForm.proCategoryId, //礼品分类 proCategoryId: this.giftForm.proCategoryId, //礼品分类
dataDialogueId: this.giftForm.dataDialogueId, // 数据对话id
detailDescription: this.giftForm.detailDescription, //图文详情 detailDescription: this.giftForm.detailDescription, //图文详情
gradeType: this.giftForm.gradeType, gradeType: this.giftForm.gradeType,
memberGrade: this.giftForm.memberGrade.join(','), //适用会员 memberGrade: this.giftForm.memberGrade.join(','), //适用会员
......
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