Commit 575454c2 by 萱草

update: 卡券阶梯价

parent 1383335b
<!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.3f904992fc29fd886887532f0caa9222.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.2dbb2a63e4b35531da8b.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.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
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.
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.
<template>
<el-dialog :visible.sync="dialogVisible" width="600px" @close="cancelSubmit()">
<div slot="title" style="margin-top:10px;margin-bottom:10px">
<span style="color:#303133;font-size:16px">设置阶梯价</span>
<span style="color:#606266;font-size:12px">*若未设置阶梯价则以原价进行兑换,请勿随意填入0积分/现金;</span>
</div>
<div v-loading="loading">
<el-tabs :value="selectTab" type="border-card">
<el-tab-pane :name="index" v-for="(item, index) in list3" :key="index" :label="item.gradeName" :value="item.gradeId">
<el-form>
<el-form-item label="积分">
<el-input size="small" v-model.trim="list3[index].skuList[0].giftProSkuIntegral" style="width:180px"></el-input>
</el-form-item>
<el-form-item label="现金"> <el-input size="small" v-model.trim="list3[index].skuList[0].giftProSkuCash" style="width:180px"></el-input>&nbsp;&nbsp;</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
<div style="margin-top: 20px;text-align:right">
<el-button type="primary" @click="saveLadderDetail">保存</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import qs from 'qs';
import request from '../service/request.js';
export default {
props: {
ladderPriceData: {
type: Object,
default() {
return {};
}
}
},
data() {
return {
selectTab: 0,
loading: false,
dialogVisible: false,
id: '',
list3: [],
integral: '',
cash: '',
cardCouponList: [],
ladder: []
};
},
created() {
this.dialogVisible = true;
this.id = this.ladderPriceData.id;
this.getInfo();
},
methods: {
async getInfo() {
console.log(111);
let params = {
integralMallProId: this.id
};
this.loading = true;
request
.get('/api-integral-mall/get-integral-mall-pro', { params })
.then(res => {
if (res.data.errorCode === 0) {
this.ladder = res.data.result.isDifferentialPricing ? ['1'] : []; // 是否设置阶梯价
if (this.ladder.length) {
this.isDifferentialPricing = this.ladder[0];
}
if (this.isDifferentialPricing && res.data.result.gradeProSkus.length > 0) {
this.list3 = res.data.result.gradeProSkus; // 阶梯价详情
} else {
this.list3 = [];
}
if (res.data.result.cardCostList) {
this.cardCouponList = res.data.result.cardCostList;
}
} else {
this.$message.error(res.data.message);
}
})
.finally(() => (this.loading = false));
},
handleLadder(value) {
value.forEach(item => {
item.giftProSkuIntegral = this.integral ? this.integral : item.giftProSkuIntegral;
item.giftProSkuCash = this.cash ? this.cash : item.giftProSkuCash;
});
this.integral = '';
this.cash = '';
},
saveLadderDetail() {
let params = {
integralMallProId: this.id,
differentialPricingJson: JSON.stringify(this.list3)
};
request.post('/api-integral-mall/set-differential-pricing', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
console.log(res.data.result);
this.dialogVisible = false;
setInterval(() => {
this.$emit('closeUpdateLadder');
}, 10);
}
});
},
cancelSubmit() {
this.dialogVisible = false;
setInterval(() => {
this.$emit('closeUpdateLadder');
}, 10);
}
}
};
</script>
<style scoped>
.w-100 {
width: 100px;
}
</style>
......@@ -133,6 +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" 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>
......@@ -195,6 +196,8 @@
<editInfo :editInfoModal="editInfoModal" @getList="getList"></editInfo>
<!-- <stockModal :intergralModal="intergralModal" @getList="getList"></stockModal> -->
<updateCash v-if="packageDialog" :packageData="packageData" @getList="getList" @closePackage="closePackage"></updateCash>
<!-- 阶梯价 -->
<coupon-ladder-price :ladderPriceData="ladderPriceData" @closeUpdateLadder="closeUpdateLadder" v-if="ladderDialogVisible" @getList="getList"></coupon-ladder-price>
</div>
</template>
......@@ -207,6 +210,7 @@ import eqCode from '../../../components/eqCode';
import selectType from '../../../components/selectGoodsType';
import editInfo from '../../../components/editCouponInfo';
import updateCash from '../../../components/updataCash';
import couponLadderPrice from '../../../components/couponLadderPrice';
// import stockModal from '../../../components/getSkuList';
export default {
data() {
......@@ -254,7 +258,13 @@ export default {
errorMessage: '',
errorList: '',
outerVisible: false,
innerVisible: false
innerVisible: false,
ladderPriceData: {
data: [],
id: ''
// show: false
},
ladderDialogVisible: false
};
},
created() {
......@@ -347,6 +357,17 @@ export default {
}
this.getList();
},
ladderList(item) {
// this.ladderPriceData.show = true;
this.ladderPriceData.id = item.integralMallProId;
this.ladderDialogVisible = true;
console.log(this.ladderPriceData);
},
closeUpdateLadder() {
console.log(111);
this.ladderDialogVisible = false;
this.getList();
},
// 商品链接
getLink(item) {
this.modalData.loading = true;
......@@ -568,7 +589,8 @@ export default {
eqCode,
selectType,
editInfo,
updateCash
updateCash,
couponLadderPrice
// stockModal
}
};
......
......@@ -184,7 +184,7 @@
<!-- 卡券列表 -->
<couponList :couponListModal="couponListModal" v-if="couponListModal.dialogVisible" @getChildSearch="getChildSearch" @getList="getList" @getClose="getClose"></couponList>
<!-- 阶梯价 -->
<ladder-price :ladderPriceData="ladderPriceData" @closeUpdateLadder="closeUpdateLadder" v-if="ladderDialogVisible" @getList="getList"></ladder-price>
<gift-ladder-price :ladderPriceData="ladderPriceData" @closeUpdateLadder="closeUpdateLadder" v-if="ladderDialogVisible" @getList="getList"></gift-ladder-price>
</div>
</template>
......@@ -196,7 +196,7 @@ import editName from '../../../components/editName';
import eqCode from '../../../components/eqCode';
import selectType from '../../../components/selectGoodsType';
import stockModal from '../../../components/getSkuList';
import ladderPrice from '../../../components/ladderPrice';
import giftLadderPrice from '../../../components/giftLadderPrice';
import copy from '../../../utils/clone.js';
import couponList from './couponList';
export default {
......@@ -727,7 +727,7 @@ export default {
selectType,
stockModal,
couponList,
ladderPrice
giftLadderPrice
}
};
</script>
......
......@@ -147,7 +147,7 @@
<el-button type="primary" size="small" @click="handleLadder(list3[index].skuList)">批量填充</el-button>
</div>
<!-- <el-table v-if="list3.length && isTable" :data="list3.length && isTable ? list3[index].skuList : []"> -->
<el-table v-if="isTable" :data="isTable ? list3[index].skuList : []">
<el-table v-if="isTable" :data="isTable && list3.length ? list3[index].skuList : []">
<el-table-column v-for="(it, i) in ladderHeader" :key="i" :label="it.proName">
<template slot-scope="{ row }">{{ row.giftPropValues[i].valueName }}</template>
</el-table-column>
......@@ -923,16 +923,20 @@ export default {
this.giftForm.marketPrice = res.data.result.marketPrice; //市场价
this.giftForm.detailDescription = res.data.result.detailDescription; //图文详情
this.giftForm.isNewGuestVisible = res.data.result.isNewGuestVisible || 0; //新客是否可见
this.list3 = res.data.result.gradeProSkus.length ? res.data.result.gradeProSkus : []; // 阶梯价详情
this.giftForm.ladder = res.data.result.isDifferentialPricing ? ['1'] : []; // 是否设置阶梯价
if (this.giftForm.ladder.length) {
this.isDifferentialPricing = this.giftForm.ladder[0];
}
if (this.isDifferentialPricing && res.data.result.gradeProSkus.length > 0) {
this.list3 = res.data.result.gradeProSkus; // 阶梯价详情
} else {
this.list3 = [];
}
this.list3.forEach(item => {
item.skuList.forEach(it => {
it.giftPropValues = JSON.parse(it.giftPropValuesJson);
});
});
this.giftForm.ladder = res.data.result.isDifferentialPricing ? ['1'] : []; // 是否设置阶梯价
if (this.giftForm.ladder.length) {
this.isDifferentialPricing = this.giftForm.ladder[0];
}
// if (res.data.result.searchParams) {
// this.searchParams = res.data.result.searchParams; //会员筛选
// } else {
......@@ -1081,6 +1085,9 @@ 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();
// if (res.data.result.pickUpPoint === '-1') {
......
......@@ -16,9 +16,9 @@
</div>
<div class="section">
<div style="margin-bottom:22px">
<div>
<div style="display:flex;justify-content: flex-start;align-items:center">
<el-input v-model="query.search" placeholder="请输入礼品名称/编码进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @change="getSearchList('1')" @clear="getSearchList('1')"></el-input>
<div style="display:inline-block;font-size:14px;color:#606266">
<div style="display:inline-block;font-size:14px;color:#909399;margin-left:10px">
<p>1.使用该功能请在常规设置中关闭“无库存自动下架”的设置项;</p>
<p>2.若礼品增加库存后将清空之前的统计数;</p>
</div>
......
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