Commit 07debd55 by 萱草

update: 更改

parent 575454c2
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.ddfae28c4b820801118d191bf85ef74b.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.45.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.js></script><script src=//web-1251519181.file.myqcloud.com/components/activity-select.1.0.2.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.19.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.be8aabf13848b6ca3aa7.js></script><script type=text/javascript src=./static/js/app.a3bc6a7cb39efe3f1679.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.2c36254039b7e7249b02a112ee2614cb.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.45.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.41.js></script><script src=//web-1251519181.file.myqcloud.com/components/activity-select.1.0.2.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.19.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.be8aabf13848b6ca3aa7.js></script><script type=text/javascript src=./static/js/app.e63e4e23012d4945f429.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -133,7 +133,7 @@
<div>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 1" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" @click="ladderList(scope.row)">阶梯价</el-button>
<el-button type="text" @click="ladderList(scope.row)" v-if="scope.row.isDifferentialPricing">阶梯价</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 1" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 0" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.canEdit" @click="deleteList(scope.row, 2)">上架</el-button>
......
......@@ -173,7 +173,7 @@
</el-radio-group>
</el-form-item>
<el-form-item prop="memberGrade" :label="cliqueStatus ? '' : '适用会员'">
<el-select v-model="couponForm.memberGrade" multiple placeholder="请选择" size="small" class="w-600">
<el-select v-model="couponForm.memberGrade" multiple placeholder="请选择" size="small" class="w-600" @change="memberChange">
<el-option v-for="item in memberGradeList" :key="item.gradeId" :label="item.gradeName" :value="item.gradeId"> </el-option>
</el-select>
</el-form-item>
......@@ -196,7 +196,9 @@
</el-form>
</el-tab-pane>
</el-tabs>
<div style="margin-top:10px;text-align:right">
<el-button type="primary" @click="saveLadderDetail">保存</el-button>
</div>
<el-button slot="reference" type="text" v-show="isDifferentialPricing" style="border-bottom:1px solid #1890ff;margin-left:15px;display:inline-block;position:absolute;top:12px" @click="setLadder">点击设置</el-button>
</el-popover>
</el-form-item>
......@@ -352,6 +354,7 @@ export default {
integral: '',
cash: '',
list2: [],
ladderMemberGradeChange: [],
getTimeAll: getInputVal.formatDate,
getTime: getInputVal.getTime,
getTime2: getInputVal.getTime2,
......@@ -398,8 +401,8 @@ export default {
dataDialogueId: '', // 数据对话id
ladder: []
},
uploadAction: window.location.origin + '/api-plug/upload-img?requestProject=integral-mall',
// uploadAction: 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall',
// uploadAction: window.location.origin + '/api-plug/upload-img?requestProject=integral-mall',
uploadAction: 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall',
headersUpload: {
sign: ''
},
......@@ -495,6 +498,19 @@ export default {
}
},
methods: {
memberChange() {
this.ladderMemberGradeChange = [];
let lists = this.memberGradeList.filter(item => {
return this.couponForm.memberGrade.join(',').indexOf(item.gradeId) != -1;
});
lists.forEach(item => {
this.ladderMemberGradeChange.push({
gradeId: item.gradeId,
gradeName: item.gradeName
});
});
// console.log(this.ladderMemberGradeChange);
},
changeladder(value) {
if (value.length) {
this.isDifferentialPricing = 1;
......@@ -503,10 +519,9 @@ export default {
}
},
setLadder() {
if (!this.isEdit) {
this.ladderMemberGrade = [];
let lists = this.memberGradeList.filter(item => {
return this.couponForm.memberGrade.join('').indexOf(item.gradeId) != -1;
return this.couponForm.memberGrade.join(',').indexOf(item.gradeId) != -1;
});
lists.forEach(item => {
this.ladderMemberGrade.push({
......@@ -514,7 +529,6 @@ export default {
gradeName: item.gradeName
});
});
}
this.list2 = copy(this.ladderMemberGrade);
this.ladderSkuList = copy(this.cardCouponList);
this.ladderSkuList.forEach(item => {
......@@ -593,9 +607,11 @@ export default {
}
if (this.isDifferentialPricing && res.data.result.gradeProSkus.length > 0) {
this.list3 = res.data.result.gradeProSkus; // 阶梯价详情
this.submitLadderList = res.data.result.gradeProSkus;
} else {
this.list3 = [];
}
// console.log(this.list3);
// 积分费用包
if (res.data.result.cardCostList) {
this.cardCouponList = res.data.result.cardCostList;
......@@ -1173,53 +1189,41 @@ export default {
}
params.timeZones = timeLink.join('#');
this.submitLoading = true;
// if (this.ladderMemberGrade.length === this.list2.length) {
// if (this.cardCouponList.length === this.ladderSkuList.length) {
// let num2 = 0;
// this.cardCouponList.map(v1 => {
// this.ladderSkuList.forEach(v2 => {
// if (v1.proRefId !== v2.proRefId) {
// num2++;
// }
// });
// });
// let num = 0;
// this.ladderMemberGrade.map(v1 => {
// if (this.ladderMemberGradeChange.length) {
// this.ladderMemberGradeChange.map(v1 => {
// this.list2.forEach(v2 => {
// if (v1.gradeId !== v2.gradeId) {
// num++;
// }
// });
// });
// console.log(num);
// let num2 = 0;
// if (this.combineListPre.length === this.combineList.length && this.combineListPre.length && this.combineList.length) {
// this.combineListPre.map(v1 => {
// this.combineList.forEach(v2 => {
// if (v1.mapId !== v2.mapId) {
// num2++;
// }
// });
// });
// }
// console.log(num2);
// if (!num && !num2) {
// this.saveDeatail(params);
// } else {
// this.confirmDetail(params);
// }
// } else {
this.confirmDetail(params);
// }
// request.post('/api-integral-mall/create-integral-pro', params).then(res => {
// if (res.data.errorCode === 0) {
// this.$router.push({
// name: 'coupon'
// });
// this.submitLoading = false;
// } else {
// this.$message.error(res.data.message);
// this.submitLoading = false;
// this.confirmDetail(params);
// }
// });
this.confirmDetail(params);
} else {
return false;
}
});
},
confirmDetail(params) {
this.$confirm('<div>更改规格或适用会员后未去设置阶梯价,会导致阶梯价未变动,是否继续操作?</div>', '提示', {
this.$confirm('<div>如更改规格或适用会员后,请先去设置阶梯价并保存,否则会使用原阶梯价,是否继续操作?</div>', '提示', {
closeOnClickModal: false,
showClose: false,
type: 'warning',
......@@ -1236,7 +1240,7 @@ export default {
if (res.data.errorCode === 0) {
this.$message.success('保存成功');
this.$router.push({
name: 'gift'
name: 'coupon'
});
this.submitLoading = false;
} else {
......
......@@ -136,7 +136,7 @@
<div>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
<el-button type="text" v-if="scope.row.changeType === '5' && scope.row.canEdit" @click="getCouponList(scope.row.integralMallProId)">券码</el-button>
<el-button type="text" @click="ladderList(scope.row)">阶梯价</el-button>
<el-button type="text" @click="ladderList(scope.row)" v-if="scope.row.isDifferentialPricing">阶梯价</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 1" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 1" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 0" @click="deleteList(scope.row, 1)">下架</el-button>
......
......@@ -139,7 +139,7 @@
<span style="color:#303133;font-size:16px">设置阶梯价</span>
<span>*若未设置阶梯价则以原价进行兑换,请勿随意填入0积分/现金;</span>
</div>
<el-tabs :value="selectTab" type="border-card" @tab-click="handleClick">
<el-tabs :value="selectTab" type="border-card">
<el-tab-pane :name="index" v-for="(item, index) in ladderMemberGrade" :key="index" :label="item.gradeName" :value="item.gradeId">
<div class="fr" style="margin-bottom:20px" v-if="list3.length && isTable">
<el-input class="w-100" placeholder="请输入积分" v-model="integral" size="small"></el-input>
......@@ -171,7 +171,9 @@
</el-form>
</el-tab-pane>
</el-tabs>
<div style="margin-top:10px;text-align:right">
<el-button type="primary" @click="saveLadderDetail">保存</el-button>
</div>
<el-button slot="reference" type="text" v-show="isDifferentialPricing" style="border-bottom:1px solid #1890ff;margin-left:15px;display:inline-block;position:absolute;top:12px" @click="setLadder">点击设置</el-button>
</el-popover>
</el-form-item>
......@@ -434,6 +436,7 @@ export default {
integral: '',
cash: '',
list2: [],
ladderMemberGradeChange: [],
getTimeAll: getInputVal.formatDate,
getTime: getInputVal.getTime,
getTime2: getInputVal.getTime2,
......@@ -668,26 +671,31 @@ export default {
// // this.getGroupList();
// },
methods: {
memberChange(value) {
console.log(value);
memberChange() {
this.ladderMemberGradeChange = [];
let lists = this.memberGradeList.filter(item => {
return this.giftForm.memberGrade.join(',').indexOf(item.gradeId) != -1;
});
lists.forEach(item => {
this.ladderMemberGradeChange.push({
gradeId: item.gradeId,
gradeName: item.gradeName
});
});
},
changeladder(value) {
console.log(this.giftForm.ladder);
if (value.length) {
this.isDifferentialPricing = 1;
} else {
this.isDifferentialPricing = 0;
}
console.log(value);
console.log(this.isDifferentialPricing);
},
setLadder() {
console.log(111);
let submitSkuJsonTwo = []; // 未选sku时使用
if (!this.isEdit) {
// if (!this.isEdit) {
this.ladderMemberGrade = [];
let lists = this.memberGradeList.filter(item => {
return this.giftForm.memberGrade.join('').indexOf(item.gradeId) != -1;
return this.giftForm.memberGrade.join(',').indexOf(item.gradeId) != -1;
});
lists.forEach(item => {
this.ladderMemberGrade.push({
......@@ -695,12 +703,8 @@ export default {
gradeName: item.gradeName
});
});
}
console.log(this.ladderMemberGrade);
// let list = copy(this.submitSkuJson);
// }
this.list2 = copy(this.ladderMemberGrade);
console.log(this.list2);
// this.list3 = copy(this.ladderMemberGrade);
this.ladderHeader = copy(this.skuHeaderList);
if (this.submitSkuJson.length) {
this.ladderSkuList = copy(this.submitSkuJson);
......@@ -731,43 +735,35 @@ export default {
// console.log(list4);
// 目前
this.ladderSkuList.forEach(item => {
// console.log(item);
item.giftProSkuIntegral = '';
item.giftProSkuCash = '';
});
console.log(this.ladderSkuList);
for (let i = 0; i < this.list2.length; i++) {
this.list2[i].skuList = this.ladderSkuList;
}
this.list3 = copy(this.list2);
console.log(this.list3);
},
saveLadderDetail() {
this.submitLadderList = copy(this.list3);
console.log(this.submitLadderList);
// this.differentialPricingJson = JSON.stringify(this.submitLadderList);
if (this.isTable) {
let arr = [];
for (let item of this.ladderSkuList) {
arr.push(item.giftPropValues);
}
let arrCopy = copy(arr);
this.combineList = [];
for (let i = 0; i < arrCopy.length; i++) {
this.combineList.push({
id: [],
mapId: ''
});
for (let j = 0; j < arrCopy[i].length; j++) {
this.combineList[i].id.push(arrCopy[i][j].valueId);
}
this.combineList[i].mapId = this.combineList[i].id.join('_');
}
}
console.log(this.combineList);
},
handleClick(value) {
console.log(value.$attrs.value);
// if (this.isTable) {
// let arr = [];
// for (let item of this.ladderSkuList) {
// arr.push(item.giftPropValues);
// }
// let arrCopy = copy(arr);
// this.combineList = [];
// for (let i = 0; i < arrCopy.length; i++) {
// this.combineList.push({
// id: [],
// mapId: ''
// });
// for (let j = 0; j < arrCopy[i].length; j++) {
// this.combineList[i].id.push(arrCopy[i][j].valueId);
// }
// this.combineList[i].mapId = this.combineList[i].id.join('_');
// }
// }
// console.log(this.combineList);
},
handleLadder(value) {
value.forEach(item => {
......@@ -929,6 +925,7 @@ export default {
}
if (this.isDifferentialPricing && res.data.result.gradeProSkus.length > 0) {
this.list3 = res.data.result.gradeProSkus; // 阶梯价详情
this.submitLadderList = res.data.result.gradeProSkus;
} else {
this.list3 = [];
}
......@@ -973,16 +970,7 @@ export default {
});
});
}
console.log(this.ladderMemberGrade);
});
// this.getMemberGradeList(); // 会员等级列表
// if (res.data.result.memberGrade) {
// this.memberGrade = res.data.result.memberGrade;
// this.giftForm.memberGrade = res.data.result.memberGrade.split(','); //适用会员
// } else {
// this.memberGrade = '';
// this.giftForm.memberGrade = [];
// }
this.giftForm.proReferId = res.data.result.proReferId;
this.creatorId = res.data.result.creatorId;
this.refash = !this.refash;
......@@ -1085,8 +1073,6 @@ export default {
//实物礼品
this.giftForm.changeType = Number(res.data.result.changeType);
this.giftForm.changeTypeList = res.data.result.changeType.split(',');
// this.giftForm.changeTypeList = res.data.result.changeType.split(',').length > 1 ? res.data.result.changeType.split(',') : [res.data.result.changeType];
console.log(this.giftForm.changeTypeList);
// this.giftForm.changeTypeList = res.data.result.changeType;
// if (this.giftForm.changeTypeList.indexOf('4') != -1) {
// this.getPickUpPointList();
......@@ -1220,11 +1206,6 @@ export default {
this.$message.error(res.data.message);
}
});
// .finally(() => {
// this.getMemberGradeList().then(() => {
// this.handleSku();
// }); //会员等级列表
// });
},
getSpuStock(val) {
this.giftForm.virtualStock = val;
......@@ -1727,26 +1708,21 @@ export default {
});
}
}
console.log(this.submitSkuJson);
// if(this.$route.query.proReferId !== '-1'){
let arr = [];
for (let item of this.submitSkuJson) {
arr.push(item.giftPropValues);
}
console.log(arr);
let arrCopy = copy(arr);
this.combineListPre = [];
for (let i = 0; i < arrCopy.length; i++) {
this.combineListPre.push({
id: [],
mapId: ''
});
for (let j = 0; j < arrCopy[i].length; j++) {
this.combineListPre[i].id.push(arrCopy[i][j].valueId);
}
this.combineListPre[i].mapId = this.combineListPre[i].id.join('_');
}
console.log(this.combineListPre);
// let arr = [];
// for (let item of this.submitSkuJson) {
// arr.push(item.giftPropValues);
// }
// let arrCopy = copy(arr);
// this.combineListPre = [];
// for (let i = 0; i < arrCopy.length; i++) {
// this.combineListPre.push({
// id: [],
// mapId: ''
// });
// for (let j = 0; j < arrCopy[i].length; j++) {
// this.combineListPre[i].id.push(arrCopy[i][j].valueId);
// }
// this.combineListPre[i].mapId = this.combineListPre[i].id.join('_');
// }
},
combine(arr) {
......@@ -2079,42 +2055,53 @@ export default {
}
params.timeZones = timeLink.join('#');
this.submitLoading = true;
if(this.ladderMemberGrade.length === this.list2.length){
let num = 0;
this.ladderMemberGrade.map(v1 => {
this.list2.forEach(v2 => {
if(v1.gradeId !== v2.gradeId) {
num++;
}
});
});
console.log(num);
let num2 = 0;
if(this.combineListPre.length === this.combineList.length && this.combineListPre.length && this.combineList.length){
this.combineListPre.map(v1 => {
this.combineList.forEach(v2 => {
if(v1.mapId !== v2.mapId) {
num2++;
}
});
});
}
console.log(num2);
if(!num && !num2){
this.saveDeatail(params);
}else{
this.confirmDetail(params);
}
}else{
// console.log(this.ladderMemberGradeChange);
// console.log(this.list2);
// console.log(this.combineListPre);
// console.log(this.combineList);
// if (this.combineListPre.length === this.combineList.length && this.combineListPre.length && this.combineList.length) {
// let num2 = 0;
// this.combineList.map(v1 => {
// this.combineListPre.forEach(v2 => {
// if (v1.mapId !== v2.mapId) {
// num2++;
// }
// });
// });
// console.log(num2);
// let num = 0;
// if (this.ladderMemberGradeChange.length) {
// if(this.list2.length){
// this.ladderMemberGradeChange.map(v1 => {
// this.list2.forEach(v2 => {
// if (v1.gradeId !== v2.gradeId) {
// num++;
// }
// });
// });
// }else{
// this.confirmDetail(params);
// return;
// }
// }
// console.log(num);
// if (!num && !num2) {
// console.log(21111);
// this.saveDeatail(params);
// } else {
// this.confirmDetail(params);
// }
// } else {
// this.confirmDetail(params);
// }
this.confirmDetail(params);
}
} else {
return false;
}
});
},
confirmDetail(params){
this.$confirm('<div>更改规格或适用会员后未去设置阶梯价,会导致阶梯价未变动,是否继续操作?</div>', '提示', {
this.$confirm('<div>如更改规格或适用会员后,请先去设置阶梯价并保存,否则会使用原阶梯价,是否继续操作?</div>', '提示', {
closeOnClickModal: false,
showClose: false,
type: 'warning',
......
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