Commit 0c82cb8d by zhangquan

修改单词

1 parent f4d03d85
...@@ -101,23 +101,23 @@ const staticRoutes = Object.freeze([ ...@@ -101,23 +101,23 @@ const staticRoutes = Object.freeze([
}, },
{ {
//商品优惠券 //商品优惠券
name: 'goodsConpon', name: 'goodsCoupon',
path: '/goodsConpon/index', path: '/goodsCoupon/index',
component: resolve => require([`@/views/goodsConpon/index.vue`], resolve), component: resolve => require([`@/views/goodsCoupon/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
//增加商品优惠券 //增加商品优惠券
name: 'addConpon', name: 'addCoupon',
path: '/goodsConpon/addConpon', path: '/goodsCoupon/addCoupon',
component: resolve => require([`@/views/goodsConpon/addConpon.vue`], resolve), component: resolve => require([`@/views/goodsCoupon/addCoupon.vue`], resolve),
meta: {} meta: {}
}, },
{ {
//商品优惠券领取详情页 //商品优惠券领取详情页
name: 'receivedDetail', name: 'receivedDetail',
path: '/goodsConpon/receivedDetail', path: '/goodsCoupon/receivedDetail',
component: resolve => require([`@/views/goodsConpon/receivedDetail.vue`], resolve), component: resolve => require([`@/views/goodsCoupon/receivedDetail.vue`], resolve),
meta: {} meta: {}
} }
]) ])
......
<template> <template>
<div class="container"> <div class="container">
<glsx-combi-form :isInline="false" ref="couponRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="conponFormObj" :formData="conponFormData" :formRules="conponRule"> <glsx-combi-form :isInline="false" ref="couponRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="couponFormObj" :formData="couponFormData" :formRules="couponRule">
<div slot="selectGoods"> <div slot="selectGoods">
<el-button icon="el-icon-plus" size="small" @click="openConponDialog">选择商品</el-button> <el-button icon="el-icon-plus" size="small" @click="openCouponDialog">选择商品</el-button>
<GLTable v-if="conponFormObj.selectedGoodsList.length" class="selected_table" :hasPage="false" ref="selectedRef" :tableParams="selectedtableParams" :tableData="conponFormObj.selectedGoodsList"> <GLTable v-if="couponFormObj.selectedGoodsList.length" class="selected_table" :hasPage="false" ref="selectedRef" :tableParams="selectedtableParams" :tableData="couponFormObj.selectedGoodsList">
<div class="good_name" slot="goodName" slot-scope="scope"> <div class="good_name" slot="goodName" slot-scope="scope">
<img v-if="scope.scope.appearance == 1" src="@/assets/conpon.png" alt="" /> <img v-if="scope.scope.appearance == 1" src="@/assets/coupon.png" alt="" />
<img v-else src="@/assets/directCharge.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 }}
</div> </div>
<div class="conpon_cost" slot="conponCost" slot-scope="scope"> <div class="coupon_cost" slot="couponCost" 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)" /> <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)" />
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
</GLTable> </GLTable>
</div> </div>
<div slot="validityDate"> <div slot="validityDate">
<el-input class="date_input" v-model.number="conponFormObj.effectiveDays" oninput="value=value.replace(/^0/g,'').replace(/[^\d]/g,'')" type="text" /> <el-input class="date_input" v-model.number="couponFormObj.effectiveDays" oninput="value=value.replace(/^0/g,'').replace(/[^\d]/g,'')" type="text" />
</div> </div>
</glsx-combi-form> </glsx-combi-form>
<gooods-dialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedGoodsList="conponFormObj.selectedGoodsList" v-if="isVisible" :isVisible="isVisible"></gooods-dialog> <gooods-dialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedGoodsList="couponFormObj.selectedGoodsList" v-if="isVisible" :isVisible="isVisible"></gooods-dialog>
<div class="btn"> <div class="btn">
<el-button type="primary" @click="commit()">创建优惠券</el-button> <el-button type="primary" @click="commit()">创建优惠券</el-button>
</div> </div>
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<i class="el-icon-warning icon"></i> <i class="el-icon-warning icon"></i>
<div class="tip">以下品牌商品优惠券面额已存在,请修改面额或删除</div> <div class="tip">以下品牌商品优惠券面额已存在,请修改面额或删除</div>
</div> </div>
<div class="error_conpon"> <div class="error_coupon">
<div class="conpon_item" v-for="(item, index) in errorConponList" :key="index"> <div class="coupon_item" v-for="(item, index) in errorCouponList" :key="index">
<img v-if="item.appearance == 1" src="@/assets/conpon.png" alt="" /> <img v-if="item.appearance == 1" src="@/assets/coupon.png" alt="" />
<img v-else src="@/assets/directCharge.png" alt="" /> <img v-else src="@/assets/directCharge.png" alt="" />
<span class="info">【{{ item.brandName }}{{ item.productName }}{{ item.appearance == 2 ? item.denomination : '' }}】{{ item.newCost }}元</span> <span class="info">【{{ item.brandName }}{{ item.productName }}{{ item.appearance == 2 ? item.denomination : '' }}】{{ item.newCost }}元</span>
</div> </div>
...@@ -54,8 +54,8 @@ export default { ...@@ -54,8 +54,8 @@ export default {
return { return {
isVisible: false, isVisible: false,
errorVisible: false, errorVisible: false,
errorConponList: [], errorCouponList: [],
conponFormData: [ couponFormData: [
{ {
label: '选择产品', label: '选择产品',
name: 'selectedGoodsList', name: 'selectedGoodsList',
...@@ -67,11 +67,11 @@ export default { ...@@ -67,11 +67,11 @@ export default {
addHtml: 'validityDate' addHtml: 'validityDate'
} }
], ],
conponFormObj: { couponFormObj: {
selectedGoodsList: [], selectedGoodsList: [],
effectiveDays: '' effectiveDays: ''
}, },
conponRule: { couponRule: {
selectedGoodsList: [{ required: true, message: '请选择商品', trigger: 'change' }], selectedGoodsList: [{ required: true, message: '请选择商品', trigger: 'change' }],
effectiveDays: [{ required: true, message: '请输入有效期', trigger: 'change' }] effectiveDays: [{ required: true, message: '请输入有效期', trigger: 'change' }]
}, },
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
}, },
{ {
label: '券面额', label: '券面额',
addHtml: 'conponCost', addHtml: 'couponCost',
width: 110 width: 110
}, },
{ {
...@@ -154,13 +154,13 @@ export default { ...@@ -154,13 +154,13 @@ export default {
.replace('$#$', '.') .replace('$#$', '.')
temp = temp.replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //只能输入两个小数 temp = temp.replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //只能输入两个小数
this.$nextTick(() => { this.$nextTick(() => {
const target = this.conponFormObj.selectedGoodsList.find(item => item.id == id) const target = this.couponFormObj.selectedGoodsList.find(item => item.id == id)
target.newCost = temp target.newCost = temp
}) })
}, },
delSelectedGoods(row) { delSelectedGoods(row) {
const idx = this.conponFormObj.selectedGoodsList.findIndex(item => item.id == row.id) const idx = this.couponFormObj.selectedGoodsList.findIndex(item => item.id == row.id)
this.conponFormObj.selectedGoodsList.splice(idx, 1) this.couponFormObj.selectedGoodsList.splice(idx, 1)
this.validateGoods() this.validateGoods()
}, },
validateGoods() { validateGoods() {
...@@ -170,10 +170,10 @@ export default { ...@@ -170,10 +170,10 @@ export default {
this.isVisible = false this.isVisible = false
}, },
confirmDialog(e) { confirmDialog(e) {
this.conponFormObj.selectedGoodsList = e || [] this.couponFormObj.selectedGoodsList = e || []
this.validateGoods() this.validateGoods()
}, },
openConponDialog() { openCouponDialog() {
this.isVisible = true this.isVisible = true
}, },
closeErrorDialog() { closeErrorDialog() {
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
commit() { commit() {
this.$refs.couponRef.$refs.formRef.validate(valid => { this.$refs.couponRef.$refs.formRef.validate(valid => {
if (!valid) return if (!valid) return
let { selectedGoodsList, effectiveDays } = this.conponFormObj let { selectedGoodsList, effectiveDays } = this.couponFormObj
const target = selectedGoodsList.find(item => Number(item.newCost) <= 0 || Number(item.newCost) >= Number(item.salesPrice)) const target = selectedGoodsList.find(item => Number(item.newCost) <= 0 || Number(item.newCost) >= Number(item.salesPrice))
console.log(target) console.log(target)
if (target) return this.$message.error('请填写大于0,小于会员价的券面额') if (target) return this.$message.error('请填写大于0,小于会员价的券面额')
...@@ -194,12 +194,12 @@ export default { ...@@ -194,12 +194,12 @@ export default {
effectiveDays, effectiveDays,
equityCouponRequestList equityCouponRequestList
} }
this.$apis.goodsConponApi.createCoupons(params).then(res => { this.$apis.goodsCouponApi.createCoupons(params).then(res => {
if (res && res.length === 0) { if (res && res.length === 0) {
this.$message.success('创建成功') this.$message.success('创建成功')
this.$router.push({ path: '/goodsConpon/index' }) this.$router.push({ path: '/goodsCoupon/index' })
} else if (res && res.length > 0) { } else if (res && res.length > 0) {
this.errorConponList = selectedGoodsList.filter(item => res.indexOf(item.id) > -1) this.errorCouponList = selectedGoodsList.filter(item => res.indexOf(item.id) > -1)
this.errorVisible = true this.errorVisible = true
} }
}) })
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
max-width: 1100px; max-width: 1100px;
.conpon_cost { .coupon_cost {
/deep/ .el-input__inner { /deep/ .el-input__inner {
width: 80px; width: 80px;
color: #2cca74; color: #2cca74;
...@@ -274,11 +274,11 @@ export default { ...@@ -274,11 +274,11 @@ export default {
color: #333333; color: #333333;
} }
} }
.error_conpon { .error_coupon {
margin: 20px 0 0 74px; margin: 20px 0 0 74px;
height: 124px; height: 124px;
overflow-y: auto; overflow-y: auto;
.conpon_item { .coupon_item {
margin-bottom: 8px; margin-bottom: 8px;
img { img {
width: 40px; width: 40px;
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<GLDialog bigTitle="选择商品优惠券" mode="big" :visible.sync="isVisible" :show-close="true" :before-close="handleClose" :close-on-click-modal="false" @onOk="onOk" @onCancel="onCancel"> <GLDialog bigTitle="选择商品优惠券" mode="big" :visible.sync="isVisible" :show-close="true" :before-close="handleClose" :close-on-click-modal="false" @onOk="onOk" @onCancel="onCancel">
<div class="dialog_body"> <div class="dialog_body">
<GLCombiForm :rowNumber="1" class="dialog_search" ref="searchRef" :formObj="dialogSearchForm" :formData="dialogFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm> <GLCombiForm :rowNumber="1" class="dialog_search" ref="searchRef" :formObj="dialogSearchForm" :formData="dialogFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm>
<div class="conpon_type"> <div class="coupon_type">
<span :class="['type', { active_type: curType == '1' }]" @click="changeConponType(1)">卡券</span> <span :class="['type', { active_type: curType == '1' }]" @click="changeCouponType(1)">卡券</span>
<span :class="['type', { active_type: curType == '2' }]" @click="changeConponType(2)">直充</span> <span :class="['type', { active_type: curType == '2' }]" @click="changeCouponType(2)">直充</span>
</div> </div>
<div class="dialog_table"> <div class="dialog_table">
<GLTable v-if="showTable" :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"> <div class="good_name" slot="goodName" slot-scope="scope">
<img v-if="scope.scope.appearance == 1" src="@/assets/conpon.png" alt="" /> <img v-if="scope.scope.appearance == 1" src="@/assets/coupon.png" alt="" />
<img v-else src="@/assets/directCharge.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 }} {{ scope.scope.productName }}
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
curType: 1, curType: 1,
showTable: true, showTable: true,
copyList: [], copyList: [],
conponList: [], couponList: [],
directChargeList: [], directChargeList: [],
pageSizes: [5, 10, 20, 30, 40], pageSizes: [5, 10, 20, 30, 40],
dialogSearchForm: { dialogSearchForm: {
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
this.resetParam(type) this.resetParam(type)
this.handleOk() this.handleOk()
}, },
changeConponType(type) { changeCouponType(type) {
if (this.curType == type) return if (this.curType == type) return
this.getBeforeChangeList(type) this.getBeforeChangeList(type)
this.showTable = false this.showTable = false
...@@ -202,10 +202,10 @@ export default { ...@@ -202,10 +202,10 @@ export default {
}, },
getBeforeChangeList(type = 1) { getBeforeChangeList(type = 1) {
let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || [] let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || []
this[type == 2 ? 'conponList' : 'directChargeList'] = [...list] this[type == 2 ? 'couponList' : 'directChargeList'] = [...list]
}, },
onOk() { onOk() {
let selectedList = this.curType == 2 ? this.conponList : this.directChargeList let selectedList = this.curType == 2 ? this.couponList : this.directChargeList
let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || [] let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || []
list = [...selectedList, ...list] list = [...selectedList, ...list]
for (let i = 0; i < this.selectedGoodsList.length; i++) { for (let i = 0; i < this.selectedGoodsList.length; i++) {
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
this.$emit('closeDialog') this.$emit('closeDialog')
}, },
setTableFinishFun() { setTableFinishFun() {
this.copyList = [...this.selectedGoodsList, ...this[this.curType == 1 ? 'conponList' : 'directChargeList']] this.copyList = [...this.selectedGoodsList, ...this[this.curType == 1 ? 'couponList' : 'directChargeList']]
this.copyList.forEach(row => { this.copyList.forEach(row => {
this.$nextTick(() => { this.$nextTick(() => {
let idx = this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item.id == row.id) let idx = this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item.id == row.id)
...@@ -270,7 +270,7 @@ export default { ...@@ -270,7 +270,7 @@ export default {
width: 312px; width: 312px;
} }
} }
.conpon_type { .coupon_type {
width: 100%; width: 100%;
display: inline-block; display: inline-block;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<div class="operate_wrap"> <div class="operate_wrap">
<span class="table_title">商品优惠券列表</span> <span class="table_title">商品优惠券列表</span>
<div class="operate_btn"> <div class="operate_btn">
<GLButton fn="新增商品优惠券" plain size="small" @click="addConpon">创建优惠券</GLButton> <GLButton fn="新增商品优惠券" plain size="small" @click="addCoupon">创建优惠券</GLButton>
<el-button class="export_btn" size="small" @click="handleExport">导出</el-button> <el-button class="export_btn" size="small" @click="handleExport">导出</el-button>
</div> </div>
</div> </div>
<GLTable ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi"> <GLTable ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<div class="good_name" slot="goodsName" slot-scope="scope"> <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="coupon_type" v-if="scope.scope.appearance == 1" src="@/assets/coupon.png" alt="" />
<img class="conpon_type" v-else src="@/assets/directCharge.png" alt="" /> <img class="coupon_type" v-else src="@/assets/directCharge.png" alt="" />
{{ scope.scope.appearance == 2 ? scope.scope.goodsName + (scope.scope.rechargeDenomination || '') : scope.scope.goodsName }} {{ scope.scope.appearance == 2 ? scope.scope.goodsName + (scope.scope.rechargeDenomination || '') : scope.scope.goodsName }}
</div> </div>
<div class="good_status" slot="goodStatus" slot-scope="scope"> <div class="good_status" slot="goodStatus" slot-scope="scope">
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
name: 'index', name: 'index',
data() { data() {
return { return {
getListApi: this.$apis.goodsConponApi.getCouponsList, getListApi: this.$apis.goodsCouponApi.getCouponsList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: { searchForm: {
brandName: '', brandName: '',
...@@ -235,7 +235,7 @@ export default { ...@@ -235,7 +235,7 @@ export default {
const params = { const params = {
couponId: row.id couponId: row.id
} }
this.secondConfirm('删除', '确定删除此优惠券?', 'goodsConponApi', 'deleteCouponApi', params) this.secondConfirm('删除', '确定删除此优惠券?', 'goodsCouponApi', 'deleteCouponApi', params)
}, },
takeEffect(row, key) { takeEffect(row, key) {
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
status: key status: key
} }
const title = key == 2 ? '生效' : '失效' const title = key == 2 ? '生效' : '失效'
this.secondConfirm(title, `确定要${title}该优惠券?`, 'goodsConponApi', 'effectiveCouponApi', params) this.secondConfirm(title, `确定要${title}该优惠券?`, 'goodsCouponApi', 'effectiveCouponApi', params)
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
// 导出 // 导出
handleExport() { handleExport() {
var params = { ...this.searchForm } var params = { ...this.searchForm }
this.$apis.goodsConponApi.getExportApi(params).then(res => { this.$apis.goodsCouponApi.getExportApi(params).then(res => {
let tempaa = this.getExplorer() let tempaa = this.getExplorer()
if (tempaa == 'QQ') { if (tempaa == 'QQ') {
window.open(res) window.open(res)
...@@ -294,11 +294,11 @@ export default { ...@@ -294,11 +294,11 @@ export default {
}) })
}, },
goDetailPage(row) { goDetailPage(row) {
this.$router.push({ path: '/goodsConpon/receivedDetail', query: { id: row.scope.id } }) this.$router.push({ path: '/goodsCoupon/receivedDetail', query: { id: row.scope.id } })
}, },
changeStatus() {}, changeStatus() {},
addConpon() { addCoupon() {
this.$router.push('/goodsConpon/addConpon') this.$router.push('/goodsCoupon/addCoupon')
} }
} }
} }
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
.good_name { .good_name {
.conpon_type { .coupon_type {
width: 40px; width: 40px;
height: 20px; height: 20px;
vertical-align: text-bottom; vertical-align: text-bottom;
......
<template> <template>
<div class="container"> <div class="container">
<div class="info_ctnr"> <div class="info_ctnr">
<glsx-combi-form :isInline="true" ref="couponInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="conponInfoFormObj" :formData="conponInfoFormData" :formRules="conponInfoRule"> <glsx-combi-form :isInline="true" ref="couponInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="couponInfoFormObj" :formData="couponInfoFormData" :formRules="couponInfoRule">
<div slot="goodsName" class="txt"> <div slot="goodsName" class="txt">
{{ conponInfoFormObj.appearance == 2 ? conponInfoFormObj.goodsName + (conponInfoFormObj.goodsName || '') : conponInfoFormObj.goodsName }} {{ couponInfoFormObj.appearance == 2 ? couponInfoFormObj.goodsName + (couponInfoFormObj.goodsName || '') : couponInfoFormObj.goodsName }}
</div> </div>
<div slot="appearance" class="txt"> <div slot="appearance" class="txt">
{{ conponInfoFormObj.appearance == 1 ? '卡券' : '直充' }} {{ couponInfoFormObj.appearance == 1 ? '卡券' : '直充' }}
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
cancelRules: { cancelRules: {
cancelReason: [{ required: true, message: '请输入作废原因', trigger: 'change' }] cancelReason: [{ required: true, message: '请输入作废原因', trigger: 'change' }]
}, },
conponInfoFormObj: { couponInfoFormObj: {
brandName: '', brandName: '',
goodsName: '', goodsName: '',
appearance: '', appearance: '',
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
} }
} }
], ],
conponInfoFormData: [ couponInfoFormData: [
{ {
label: '品牌', label: '品牌',
name: 'brandName', name: 'brandName',
...@@ -145,8 +145,8 @@ export default { ...@@ -145,8 +145,8 @@ export default {
type: 'showTxt' type: 'showTxt'
} }
], ],
conponInfoRule: {}, couponInfoRule: {},
getListApi: this.$apis.goodsConponApi.getListReceiveRecordApi, getListApi: this.$apis.goodsCouponApi.getListReceiveRecordApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -253,25 +253,25 @@ export default { ...@@ -253,25 +253,25 @@ export default {
getInfo(couponId) { getInfo(couponId) {
var params = {} var params = {}
params.couponId = couponId params.couponId = couponId
this.$apis.goodsConponApi.getCouponDetailApi(params).then(res => { this.$apis.goodsCouponApi.getCouponDetailApi(params).then(res => {
this.conponInfoFormObj = res this.couponInfoFormObj = res
//有效期 //有效期
if (res.effectiveType == 1) { if (res.effectiveType == 1) {
this.conponInfoFormObj.effectiveTxt = res.effectiveDays + '天' this.couponInfoFormObj.effectiveTxt = res.effectiveDays + '天'
} else if (res.effectiveType == 2) { } else if (res.effectiveType == 2) {
//时间段 //时间段
this.conponInfoFormObj.effectiveTxt = res.effectiveStartTime + ' - ' + res.effectiveEndTime this.couponInfoFormObj.effectiveTxt = res.effectiveStartTime + ' - ' + res.effectiveEndTime
} else if (res.effectiveType == 3) { } else if (res.effectiveType == 3) {
//永久有效 //永久有效
this.conponInfoFormObj.effectiveTxt = '永久有效' this.couponInfoFormObj.effectiveTxt = '永久有效'
} }
}) })
}, },
// 导出 // 导出
handleExport() { handleExport() {
let params = this.getParams() let params = this.getParams()
this.$apis.goodsConponApi.detailExportApi(params).then(res => { this.$apis.goodsCouponApi.detailExportApi(params).then(res => {
let tempaa = this.getExplorer() let tempaa = this.getExplorer()
if (tempaa == 'QQ') { if (tempaa == 'QQ') {
window.open(res) window.open(res)
...@@ -304,7 +304,7 @@ export default { ...@@ -304,7 +304,7 @@ export default {
handleCancelConfirm() { handleCancelConfirm() {
this.$refs.cancelRef.validate(valid => { this.$refs.cancelRef.validate(valid => {
if (valid) { if (valid) {
this.$apis.goodsConponApi.couponUserCancelApi(this.cancelForm).then(res => { this.$apis.goodsCouponApi.couponUserCancelApi(this.cancelForm).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!