Commit 03f8e2e5 by zhangquan

优惠券开发

1 parent 41316fd6
......@@ -74,6 +74,15 @@ const couponUserCancelApi = params => {
})
}
const detailExportApi = params => {
params.method = `${defaultPath}equity.exportReceiveRecord`
return other_http({
url,
data: params,
sign: true
})
}
export default {
getCouponsList,
createCoupons,
......@@ -81,5 +90,6 @@ export default {
getListReceiveRecordApi,
getCouponDetailApi,
deleteCouponApi,
couponUserCancelApi
couponUserCancelApi,
detailExportApi
}
.equity-wrap .contain {
background: #FFFFFF;
background: #ffffff;
// margin: 0 0 20px 0;
padding: 20px 15px;
// box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
}
.equity-wrap .contain .el-table__empty-text{
.equity-wrap .contain .el-table__empty-text {
display: inline-block;
width: 64px;
height: 41px;
}
.fr-mr0 {
float: right;
margin-right: 0px!important;
float: right;
margin-right: 0px !important;
}
// 单行省略
.ellipsis-1 {
......@@ -21,7 +21,7 @@
-o-text-overflow: ellipsis;
/* for Opera */
}
.mb10{
.mb10 {
margin-bottom: 10px;
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
......@@ -37,7 +37,7 @@
}
.ellipsis-2-text:after {
content: "...";
content: '...';
position: absolute;
bottom: 0;
right: 15px;
......@@ -48,13 +48,13 @@
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.el-scrollbar__bar.is-horizontal{
height: 10px !important;
left: 10px;
.el-scrollbar__bar.is-horizontal {
height: 10px !important;
left: 10px;
}
.base-container-right .el-main-scroll .el-scrollbar__thumb {
background-color: rgba(144, 147, 153, 0.5) !important;
background-color: rgba(144, 147, 153, 0.5) !important;
}
.equity-wrap .el-table .cell {
......@@ -63,8 +63,8 @@
.equity-wrap .table-btns .el-button {
padding: 0 0 0 5px;
margin-left: 5px;
border-left: 1px solid #DCDFE6;
margin-left: 5px;
border-left: 1px solid #dcdfe6;
border-radius: 0;
}
......@@ -89,7 +89,7 @@
height: 64px;
text-align: center;
line-height: 64px;
background: #FFFFFF;
background: #ffffff;
z-index: 999;
}
......@@ -104,7 +104,7 @@
height: 48px;
line-height: 48px;
// color: #0947C6;
border-bottom: 1px solid #E7EAEC;
border-bottom: 1px solid #e7eaec;
// padding-left: 20px;
margin: 0 0;
}
......@@ -117,7 +117,7 @@
width: 4px;
top: 2px;
left: 0;
background-color: #0947C6;
background-color: #0947c6;
}
.equity-wrap .edit-sub-title {
......@@ -128,7 +128,7 @@
margin: 0 0 30px 0;
padding-left: 8px;
}
.find_wrap{
.find_wrap {
background: #ffffff;
padding: 20px 15px;
// padding: 20px 20px 0px 20px;
......@@ -140,7 +140,7 @@
margin-bottom: 10px;
margin-right: 2px;
}
.pannel{
.pannel {
padding: 0 15px;
}
.table_wrap {
......@@ -153,33 +153,33 @@
width: 100%;
}
}
.flex_sc{
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc{
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb{
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
.table_point{
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.loadingClass{
.el-icon-loading{
.loadingClass {
.el-icon-loading {
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #fff!important;
.el-loading-text {
color: #fff !important;
}
}
// .equity-wrap table {
......@@ -208,4 +208,24 @@
// .equity-wrap table td {
// min-width: 50px;
// }
\ No newline at end of file
// }
.operate_wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table_title {
height: 32px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 32px;
}
.operate_btn {
.export_btn {
margin-left: 8px;
}
}
}
......@@ -8,6 +8,7 @@
<img v-if="scope.scope.appearance == 1" src="@/assets/conpon.png" alt="" />
<img v-else src="@/assets/directCharge.png" alt="" />
{{ scope.scope.appearance == 2 ? scope.scope.productName + (scope.scope.denomination || '') : scope.scope.productName }}
<!-- {{ scope.scope.appearance == 2 ? scope.scope.productName + (scope.scope.rechargeDenomination ? Number((Number(scope.scope.rechargeDenomination) / 100).toFixed(2)) + '元' : '') : scope.scope.productName }} -->
</div>
<div class="conpon_cost" slot="conponCost" slot-scope="scope">
<el-input :class="{ lowerZero: Number(scope.scope.newCost) <= 0 || Number(scope.scope.newCost) >= Number(scope.scope.salesPrice) }" v-model="scope.scope.newCost" @input="formatNum(scope.scope.id, scope.scope.newCost)" />
......@@ -25,7 +26,7 @@
<div class="btn">
<el-button type="primary" @click="commit()">创建优惠券</el-button>
</div>
<GLDialog class="error_ctnr" title="提示" mode="small" :hasFooter="false" :visible.sync="errorVisible" :show-close="true" :before-close="closeErrorDialog" :close-on-click-modal="false">
<GLDialog class="error_ctnr" title="提示" mode="small" :hasFooter="false" :visible.sync="errorVisible" :show-close="true" :before-close="closeErrorDialog" :close-on-click-modal="true">
<div>
<div class="title">
<i class="el-icon-warning icon"></i>
......@@ -187,8 +188,8 @@ export default {
console.log(target)
if (target) return this.$message.error('请填写大于0,小于会员价的券面额')
let equityCouponRequestList = selectedGoodsList.map(item => {
let { brandName, id: goodId, productName: goodsName, appearance, newCost } = item
return { brandName, goodId, goodsName, appearance, denomination: parseInt(Number(newCost) * 100) }
let { brandName, id: goodId, productName: goodsName, appearance, denomination: rechargeDenomination, newCost } = item
return { brandName, goodId, goodsName, appearance, denomination: parseInt(Number(newCost) * 100), rechargeDenomination }
})
const params = {
effectiveDays,
......
......@@ -8,14 +8,15 @@
<span :class="['type', { active_type: curType == '2' }]" @click="changeConponType(2)">直充</span>
</div>
<div class="dialog_table">
<GLTable :pageSizes="pageSizes" ref="tableRef" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" :searchForm="dialogSearchForm" :tableParams="tableParams" :getListApi="getListApi">
<GLTable v-if="showTable" :pageSizes="pageSizes" ref="tableRef" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" :searchForm="dialogSearchForm" :tableParams="tableParams" :getListApi="getListApi">
<div class="good_name" slot="goodName" slot-scope="scope">
<img v-if="scope.scope.appearance == 1" src="@/assets/conpon.png" alt="" />
<img v-else src="@/assets/directCharge.png" alt="" />
{{ scope.scope.appearance == 2 ? scope.scope.productName + (scope.scope.denomination || '') : scope.scope.productName }}
<!-- {{ scope.scope.appearance == 2 ? scope.scope.productName + (scope.scope.denomination || '') : scope.scope.productName }} -->
{{ scope.scope.productName }}
</div>
<div slot="spreadPrice" slot-scope="scope">
<span>{{ Number((scope.scope.lineationPrice - scope.scope.costPrice).toFixed(2)) }}</span>
<span :style="{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice) <= 0 ? '#eb4e4e' : '#666666' }">{{ Number(Number(scope.scope.lineationPrice - scope.scope.costPrice).toFixed(2)) }}</span>
</div>
</GLTable>
</div>
......@@ -124,6 +125,7 @@ export default {
data() {
return {
curType: 1,
showTable: true,
copyList: [],
pageSizes: [5, 10, 20, 30, 40],
dialogSearchForm: {
......@@ -183,9 +185,18 @@ export default {
},
changeConponType(type) {
if (this.curType == type) return
this.showTable = false
this.curType = type
this.$set(this.tableParams, 'tableColumns', type == 2 ? [...dialogColumns1] : [...dialogColumns])
this.handleRest(type)
this.$nextTick()
.then(() => {
this.tableParams['tableColumns'] = type == 2 ? [...dialogColumns1] : [...dialogColumns]
})
.then(() => {
this.showTable = true
this.handleRest(type)
})
// this.$set(this.tableParams, 'tableColumns', type == 2 ? [...dialogColumns1] : [...dialogColumns])
},
onOk() {
let list = this.$refs?.tableRef?.mutiSelectArr?.[this.tableParams?.mutiSelectName] || []
......
......@@ -12,7 +12,7 @@
<div class="good_name" slot="goodsName" slot-scope="scope">
<img class="conpon_type" v-if="scope.scope.appearance == 1" src="@/assets/conpon.png" alt="" />
<img class="conpon_type" v-else src="@/assets/directCharge.png" alt="" />
{{ scope.scope.appearance == 2 ? scope.scope.goodsName + (scope.scope.denomination ? (Number(scope.scope.denomination) / 100).toFixed(2) + '元' : '0元') : scope.scope.goodsName }}
{{ scope.scope.appearance == 2 ? scope.scope.goodsName + (scope.scope.rechargeDenomination || '') : scope.scope.goodsName }}
</div>
<div class="good_status" slot="goodStatus" slot-scope="scope">
<span class="circle" :style="{ 'background-color': scope.scope.status == 2 ? '#5850FF' : '#999999' }"></span>
......@@ -314,24 +314,5 @@ export default {
margin-right: 4px;
}
}
.operate_wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table_title {
height: 32px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 32px;
}
.operate_btn {
.export_btn {
margin-left: 8px;
}
}
}
}
</style>
......@@ -2,20 +2,29 @@
<div class="container">
<div class="info_ctnr">
<glsx-combi-form :isInline="true" ref="couponInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="conponInfoFormObj" :formData="conponInfoFormData" :formRules="conponInfoRule">
<div slot="appearance" slot-scope="scope">
{{ scope.scope.appearance == 1 ? '卡券' : '直充' }}
<div slot="goodsName" class="txt">
{{ conponInfoFormObj.appearance == 2 ? conponInfoFormObj.goodsName + (conponInfoFormObj.goodsName || '') : conponInfoFormObj.goodsName }}
</div>
<div slot="appearance" class="txt">
{{ conponInfoFormObj.appearance == 1 ? '卡券' : '直充' }}
</div>
</glsx-combi-form>
</div>
<div class="table_ctnr">
<GLCombiForm ref="searchRef" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm>
<el-button plain size="small" style="float:right;margin-bottom:10px;" @click="handleExport">导出</el-button>
<div class="operate_wrap">
<span class="table_title">领取详情列表</span>
<div class="operate_btn">
<el-button plain size="small" @click="handleExport">导出</el-button>
</div>
</div>
<GLTable :pageSizes="pageSizes" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="userStatus" slot-scope="scope">
<span class="circle" :style="{ 'background-color': scope.scope.userStatus == 1 ? '#2cca74' : scope.scope.userStatus == 2 ? '#eb4e4e' : '#999999' }"></span>
<span>
{{ statusList.find(item => item.id == scope.scope.userStatus).label }}
</span>
<p v-if="scope.scope.userStatus == 4">{{ scope.scope.cancelReason || '' }}</p>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
......@@ -108,7 +117,7 @@ export default {
{
label: '商品名称',
name: 'goodsName',
type: 'showTxt'
addHtml: 'goodsName'
},
{
label: '商品形态',
......@@ -262,7 +271,7 @@ export default {
// 导出
handleExport() {
let params = this.getParams()
this.$apis.beforeSale.getExportApi(params).then(res => {
this.$apis.goodsConponApi.detailExportApi(params).then(res => {
let tempaa = this.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
......@@ -322,7 +331,8 @@ export default {
padding: 20px;
background-color: #fff;
}
/deep/ .showTxt {
/deep/ .showTxt,
.txt {
width: 200px;
}
.circle {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!