Commit b25e7a1d by 前端

Merge branch 'chenwq_dev_v2.3.0' into 'v2.3.0'

v2.3.0优惠券需求开发和联调。

See merge request !132
2 parents 6ea771a9 6703d00d
......@@ -3,7 +3,7 @@ import { http } from '@/main'
const defaultPath = 'scrm.api.coupon.'
//优惠券列表
const getMerchantListApi = params => {
const getCouponListApi = params => {
// params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant'
return http({
......@@ -25,6 +25,28 @@ const couponExportApi = params => {
})
}
//优惠券列表-集团-导出
const couponGroupExportApi = params => {
params.method = 'scrm.api.coupon.gh.group.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//优惠券列表-门店-导出
const couponStoreExportApi = params => {
params.method = 'scrm.api.coupon.gh.store.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//生效/失效
const effectiveCouponApi = params => {
params.method = `${defaultPath}effective`
......@@ -49,6 +71,17 @@ const deleteCouponApi = params => {
})
}
// 核销记录-券来源
const getPackageListApi = params => {
params.method = 'scrm.api.equity.package.gh.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
//核销记录列表
const getVerificationListApi = params => {
params.method = `${defaultPath}verification.code.verification.list`
......@@ -151,4 +184,4 @@ const getAllGoodsApi = params => {
})
}
export default { getMerchantListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getPackageListApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
......@@ -98,4 +98,4 @@ const verificationExportApi = params => {
// })
// }
export { getRecordListApi, getVerificationCode, verificationExportApi }
export default { getRecordListApi, getVerificationCode, verificationExportApi }
......@@ -179,6 +179,14 @@ html {
background-color: #999999;
}
.marketing .back-green {
background-color: #2CCA74;
}
.marketing .back-red {
background-color: #EB4E4E;
}
.marketing .el-table .cell {
line-height: 16px;
}
......
......@@ -83,6 +83,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'recordList',
path: '/couponManage/recordList',
component: resolve => require([`@/views/couponManage/recordList.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
......@@ -23,7 +23,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.merchantModel == 1 && globalState.session.accountLevel != 4
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
......
<!-- 编辑代金券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative">
<div class="container edit-container" style="position: relative" v-loading="loading">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -169,6 +169,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
......@@ -198,7 +199,8 @@ export default {
full: '',
goods: '1',
goodsRefList: [],
directionalFlag: '1'
directionalFlag: '1',
scopeApplication: ''
},
//商品列表
tableParams: {
......@@ -319,15 +321,16 @@ export default {
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
......@@ -361,6 +364,7 @@ export default {
this.title = '查看'
let idx = this.editFormData.findIndex(item => item.name == 'editHtml')
this.editFormData[idx].isHide = false
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -474,6 +478,11 @@ export default {
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
......@@ -512,21 +521,29 @@ export default {
if (goodsName) {
params.goodsName = goodsName
}
this.$apis.couponManage.getAllGoodsApi(params).then(res => {
const goods = this.$common.utils.deepClone(res.list)
this.selectedAllProList = goods
if (goods && goods.length > 0) {
this.minPirceForAll = goods[0].retailPrice
goods.forEach((item, index) => {
if (item.retailPrice < this.minPirceForAll) {
this.minPirceForAll = item.retailPrice
}
})
} else {
this.priceFlag = true
}
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
})
this.loading = true
this.$apis.couponManage
.getAllGoodsApi(params)
.then(res => {
const goods = this.$common.utils.deepClone(res.list)
this.selectedAllProList = goods
if (goods && goods.length > 0) {
this.minPirceForAll = goods[0].retailPrice
goods.forEach((item, index) => {
if (item.retailPrice < this.minPirceForAll) {
this.minPirceForAll = item.retailPrice
}
})
} else {
this.priceFlag = true
}
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
})
.finally(() => {
if (this.routeInfo.addOrEdit == 1) {
this.loading = false
}
})
},
//选择商品
......@@ -591,32 +608,41 @@ export default {
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveTime = []
this.editForm.useChannel = this.editForm.useChannel + ''
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.editForm.goodsRefList = []
if (this.editForm.goodsIds && this.editForm.goodsIds.length > 0) {
this.editForm.goodsIds.forEach((goodsId, index) => {
var good = this.selectedAllProList.find(item => item.id == goodsId)
good.retailPrice = (good.retailPrice / 100).toFixed(2)
this.editForm.goodsRefList.push(good)
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveTime = []
this.editForm.useChannel = this.editForm.useChannel + ''
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.editForm.goodsRefList = []
if (this.editForm.goodsIds && this.editForm.goodsIds.length > 0) {
this.editForm.goodsIds.forEach((goodsId, index) => {
var good = this.selectedAllProList.find(item => item.id == goodsId)
good.retailPrice = (good.retailPrice / 100).toFixed(2)
this.editForm.goodsRefList.push(good)
})
}
this.tableParams.tableOption = false //去掉操作栏
this.$nextTick(() => {
this.editStatus = false
})
}
this.tableParams.tableOption = false //去掉操作栏
this.$nextTick(() => {
this.editStatus = false
})
})
.finally(() => {
this.loading = false
})
},
validateRules() {
......@@ -689,7 +715,12 @@ export default {
//面值
obj.denomination = form.denomination
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj.useType = 1
//有效期或者间隔天数使用次数
......@@ -742,6 +773,7 @@ export default {
} else {
method = 'createCouponApi' //后台创建优惠券
}
console.log(params)
this.$apis.couponManage[method](params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
......
<!-- 编辑折扣券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative">
<div class="container edit-container" style="position: relative" v-loading="loading">
<!-- <div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
......@@ -165,6 +165,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000;
......@@ -200,7 +201,8 @@ export default {
effectiveDays: '',
anticipatedCost: '',
discountIntensity: '',
directionalFlag: '1'
directionalFlag: '1',
scopeApplication: ''
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -273,15 +275,16 @@ export default {
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
......@@ -316,6 +319,7 @@ export default {
this.title = '查看'
const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -375,6 +379,11 @@ export default {
}
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
......@@ -407,27 +416,36 @@ export default {
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
console.log(res)
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
this.editForm.discountIntensity = (this.editForm.discountIntensity / 100).toFixed(2)
//使用限制,满多少元可用
if (this.editForm.useBarriers == 2) {
this.editForm.full = this.editForm.full
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
console.log(res)
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
this.editForm.discountIntensity = (this.editForm.discountIntensity / 100).toFixed(2)
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//使用限制,满多少元可用
if (this.editForm.useBarriers == 2) {
this.editForm.full = this.editForm.full
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
})
})
.finally(() => {
this.loading = false
})
})
},
validateRules() {
......@@ -488,7 +506,12 @@ export default {
obj.full = form.full
}
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
//折扣
obj.discountIntensity = (form.discountIntensity * 100).toFixed(0)
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative">
<div class="container edit-container" style="position: relative" v-loading="loading">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -128,6 +128,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
editStatus: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
......@@ -160,7 +161,8 @@ export default {
effectiveTime: [],
effectiveDays: '',
anticipatedCost: '',
directionalFlag: '1'
directionalFlag: '1',
scopeApplication: ''
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -219,15 +221,16 @@ export default {
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
......@@ -262,6 +265,7 @@ export default {
this.editFormData[editHtmlIndex].isHide = false
this.showSubmit = false
this.title = '查看'
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -309,6 +313,11 @@ export default {
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
......@@ -333,20 +342,28 @@ export default {
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
this.$nextTick(() => {
this.editStatus = false
})
}).finally(() => {
this.loading = false
})
})
},
validateRules() {
......@@ -394,7 +411,12 @@ export default {
}
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj.useType = 1
//有效期或者间隔天数使用次数
......
<!-- 编辑会员服务 -->
<!-- 编辑服务券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">{{ title }}会员服务</p>
<div class="container edit-container" v-loading="loading">
<p class="edit-title">{{ title }}服务券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
......@@ -97,6 +97,7 @@ export default {
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
loading: false,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000;
......@@ -118,7 +119,8 @@ export default {
effectiveType: '3',
useType: '0',
usageTimes: 1,
usageTimes2: 1
usageTimes2: 1,
scopeApplication: ''
},
editRule: {
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
......@@ -179,15 +181,16 @@ export default {
],
// 适用门店
merchantRule: {
merchantRadio: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
},
merchantEditFormData: [
{
label: '适用范围',
name: 'merchantRadio',
name: 'scopeApplication',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
......@@ -219,6 +222,7 @@ export default {
if (addOrEdit == 3) {
this.apear = 'couponSee'
this.title = '查看'
this.setAllDisabled('merchantEditFormData')
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
......@@ -267,29 +271,42 @@ export default {
},
methods: {
setAllDisabled(editName) {
this[editName].forEach(item => {
item.isDisabled = true
})
},
setDateString(objField, special) {
var value = typeof objField == 'string' ? objField.split(' ')[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useType = this.editForm.useType + ''
this.loading = true
this.$apis.couponManage
.getCouponDetailApi({ couponId: this.routeInfo.id })
.then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useType = this.editForm.useType + ''
if (this.$isGroupUp) {
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
if (this.editForm.useType == 1) {
this.editForm.usageTimes = this.editForm.useAmount
} else if (this.editForm.useType == 2) {
this.editForm.usageTimes2 = this.editForm.useAmount
}
})
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) {
this.editForm.effectiveTime = [this.editForm.effectiveStartTime, this.editForm.effectiveEndTime]
}
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
if (this.editForm.useType == 1) {
this.editForm.usageTimes = this.editForm.useAmount
} else if (this.editForm.useType == 2) {
this.editForm.usageTimes2 = this.editForm.useAmount
}
}).finally(() => {
this.loading = false
})
},
validateRules() {
......@@ -332,7 +349,7 @@ export default {
//编辑时只允许编辑使用说明
//优惠券名称
obj.couponName = form.couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:服务券
obj.discountType = '7'
//有效期
......@@ -364,7 +381,12 @@ export default {
//门店价
obj.shopPrice = form.shopPrice
//库存
obj.stock = form.stock
obj.limitStockFlag = this.$isGroupUp ? 2 : 1
if (!this.$isGroupUp) {
obj.stock = form.stock
} else {
obj.scopeApplication = form.scopeApplication
}
}
//使用描述
obj.useDescription = form.useDescription
......
......@@ -64,7 +64,7 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record'
// import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record'
import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index.js'
import { exportFn } from '@/common/constant'
......@@ -105,7 +105,7 @@ export default {
// 44187877
searchFormTable: {},
// 表格组件
getListApi: getRecordListApi,
getListApi: this.$apis.record.getRecordListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -233,7 +233,7 @@ export default {
let params = {}
params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7]
getVerificationCode(params).then(res => {
this.$apis.record.getVerificationCode(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
......@@ -262,7 +262,7 @@ export default {
handleExport(row) {
var params = this.getParams()
verificationExportApi(params).then(res => {
this.$apis.record.verificationExportApi(params).then(res => {
exportFn(res)
})
},
......
......@@ -5,7 +5,7 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" class="container edit-container">
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" v-loading="loading" class="container edit-container">
<div class="flex">
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
......@@ -323,6 +323,7 @@ export default {
name: 'editProduct',
data() {
return {
loading: false,
dialogTableVisible: false,
associationRadio: '',
templateSelection: [],
......@@ -1564,15 +1565,21 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
.finally(() => {
this.loading = false
})
if (res.code == '0') {
this.cancelJump()
}
})
},
cancelJump() {
this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!