Commit 4c8df3bd by cwq0219

素材编辑;发券宝;表头搜索

1 parent 46f1c49e
...@@ -38,3 +38,8 @@ export function exportDetailListApi(data) { ...@@ -38,3 +38,8 @@ export function exportDetailListApi(data) {
data.method = `${pathCustomer}coupon.exportExcel` data.method = `${pathCustomer}coupon.exportExcel`
return request(data) return request(data)
} }
export function getDistinctColum(data) {
data.method = `${pathCustomer}coupon.distinctColum`
return request(data)
}
...@@ -107,172 +107,26 @@ ...@@ -107,172 +107,26 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<!-- <div class="w-50">
<el-form-item
label="额外成本"
prop="extraCost">
<el-input
v-model="proInfo.extraCost"
placeholder="请输入额外成本"
class="dis-in-block"
@input="handleExtraCost"
>
<i
slot="suffix"
class="suffix"
>元</i>
</el-input>
</el-form-item>
</div> -->
<!-- <div class="w-50">
<el-form-item label="零售折扣">
<el-input
v-model="proInfo.maxUpgradeDiscount"
placeholder="仅支持输入1.0~9.9的数值"
clearable
class="dis-in-block"
@input="handleMaxUpgradeDiscount"
>
<i
slot="suffix"
class="suffix"
>折</i>
</el-input>
</el-form-item>
</div> -->
<!-- <div class="w-50">
<el-form-item label="零售价格">
<el-input
v-model="proInfo.retailPrice"
placeholder="请输入零售价格"
clearable
class="dis-in-block"
@input="handleRetailPrice"
>
<i
slot="suffix"
class="suffix"
>元</i>
</el-input>
</el-form-item>
</div> -->
</el-form>
</div>
<!-- <div class="relateProDialog flex">
<span class="sub-title">分配给导流方 (4S门店)</span>
<el-form
:model="proInfo"
:rules="rules"
label-width="110px"
ref="proRuleForm2"
style="width: calc(100% - 185px)"
>
<div class="w-50"> <div class="w-50">
<el-form-item <el-form-item
label="分润规则" label="商品最低价"
prop="profitType" prop="shopMinPrice"
>
<el-select
style="width: 98%;"
v-model="proInfo.profitType"
placeholder="请选择分润规则"
>
<el-option
v-for="x in separateOpt"
:key="x.confId"
:value="x.confId"
:label="x.confLabel"
></el-option>
</el-select>
</el-form-item>
</div>
<div class="w-50">
<el-form-item
label="分润比例"
title="每笔订单分配给4s店的金额结算比例。"
prop="profitValue"
> >
<el-input <el-input
v-model="proInfo.profitValue" v-model="proInfo.shopMinPrice"
@input="handleProfitInput" placeholder="请输入商品最低价"
placeholder="请输入0~100整数"
class="dis-in-block" class="dis-in-block"
@input="handleShopMinPrice"
> >
<i <i
slot="suffix" slot="suffix"
class="suffix" class="suffix"
>%</i> >元</i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</div> -->
<!-- <div class="relateProDialog flex">
<span class="sub-title" style="margin-right: 42px;">分配给合伙人 (合作商)</span>
<el-form
:model="proInfo"
:rules="rules"
label-width="110px"
ref="proRuleForm3"
style="width: calc(100% - 185px)"
>
<div class="w-50">
<el-form-item
label="阳光激励费"
title="每笔订单分配给合作商的金额结算比例。"
prop="incentiveCost"
>
<el-input
v-model="proInfo.incentiveCost"
@input="handleIncentiveCost"
placeholder="请输入阳光激励费"
class="input-with-select"
>
<el-select
slot="prepend"
style="width: 75px;"
v-model="proInfo.incentiveType"
@change="handleChangeType"
>
<el-option
v-for="(item, index) in incentiveTypeList"
:key="index"
:value="item.confId"
:label="item.confLabel"
></el-option>
</el-select>
<i
slot="suffix"
class="suffix"
>{{proInfo.incentiveType === 1 ? '%' : '元'}}</i>
</el-input>
</el-form-item>
</div>
<div class="w-50">
<el-form-item
label="分润比例"
title="每笔订单分配给合作商的金额结算比例。"
prop="partnerProfitPer"
>
<el-input
v-model="proInfo.partnerProfitPer"
@input="handlePartnerProfitPer"
placeholder="请输入0~100整数"
class="dis-in-block"
>
<i
slot="suffix"
class="suffix"
>%</i>
</el-input>
</el-form-item>
</div> </div>
</el-form>
</div> -->
<!-- <span
class="btn-txt"
slot="btn-start"
>提示:配置的分润规则和比例将优先根据门店打款方式结算。</span> -->
</d2-dialog> </d2-dialog>
</template> </template>
...@@ -285,7 +139,6 @@ export default { ...@@ -285,7 +139,6 @@ export default {
return { return {
goodVal: {}, goodVal: {},
proInfo: { proInfo: {
// thumbUrl: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1244233290,1050095100&fm=26&gp=0.jpg',
thumbUrl: '', thumbUrl: '',
goodsCode: '', goodsCode: '',
goodsName: '', goodsName: '',
...@@ -293,13 +146,8 @@ export default { ...@@ -293,13 +146,8 @@ export default {
type: '', type: '',
upgradePrice: '', upgradePrice: '',
shopPrice: '', shopPrice: '',
// profitType: '', incentiveType: 1,
// profitValue: '', shopMinPrice: ''
// extraCost: '',
// partnerProfitPer: '',
// maxUpgradeDiscount: '',
incentiveType: 1
// incentiveCost: ''
}, },
rules: { rules: {
goodsCode: [{ required: true, message: '请选择关联升级商品', trigger: 'change' }], goodsCode: [{ required: true, message: '请选择关联升级商品', trigger: 'change' }],
...@@ -311,16 +159,13 @@ export default { ...@@ -311,16 +159,13 @@ export default {
(+value < +this.proInfo.shopPrice) ? callback(new Error('建议升级价需要大于或等于产品成本')) : callback() (+value < +this.proInfo.shopPrice) ? callback(new Error('建议升级价需要大于或等于产品成本')) : callback()
} }
}], }],
shopPrice: [{ required: true, message: '请输入产品成本', trigger: 'blur' }] shopPrice: [{ required: true, message: '请输入产品成本', trigger: 'blur' }],
// profitType: [{ required: true, message: '请输入分润规则', trigger: 'change' }], shopMinPrice: [{ required: true, message: '请输入商品最低价', trigger: 'blur' }]
// profitValue: [{ required: true, message: '请输入分润比例', trigger: 'blur' }],
// incentiveCost: [{ required: true, message: '请输入阳光激励费', trigger: 'change' }],
// partnerProfitPer: [{ required: true, message: '请输入分润比例', trigger: 'blur' }]
}, },
oldVal: { oldVal: {
upgradePrice: '', upgradePrice: '',
shopPrice: '' shopPrice: '',
// maxUpgradeDiscount: '' shopMinPrice: ''
}, },
separateOpt: [{ separateOpt: [{
confId: 1, confId: 1,
...@@ -369,13 +214,9 @@ export default { ...@@ -369,13 +214,9 @@ export default {
}, },
handleRelateProConfirm() { handleRelateProConfirm() {
this.$refs.proRuleForm1.validate(valid1 => { this.$refs.proRuleForm1.validate(valid1 => {
// this.$refs.proRuleForm2.validate(valid2 => {
// this.$refs.proRuleForm3.validate(valid3 => {
if (valid1) { if (valid1) {
this.$emit('handleRelateProConfirm', this.proInfo) this.$emit('handleRelateProConfirm', this.proInfo)
} }
// })
// })
}) })
}, },
handleRelateProClose() { handleRelateProClose() {
...@@ -389,40 +230,16 @@ export default { ...@@ -389,40 +230,16 @@ export default {
this.proInfo.shopPrice = limitPrice(newVal, this.oldVal.shopPrice, 6, 2) this.proInfo.shopPrice = limitPrice(newVal, this.oldVal.shopPrice, 6, 2)
this.oldVal.shopPrice = this.proInfo.shopPrice this.oldVal.shopPrice = this.proInfo.shopPrice
}, },
handleShopMinPrice(newVal) {
this.proInfo.shopMinPrice = limitPrice(newVal, this.oldVal.shopMinPrice, 6, 2)
this.oldVal.shopMinPrice = this.proInfo.shopMinPrice
},
handleShopPriceBlur() { handleShopPriceBlur() {
if (this.proInfo.upgradePrice) { if (this.proInfo.upgradePrice) {
var validateObj = (this.proInfo.shopPrice <= this.proInfo.upgradePrice) ? 'clearValidate' : 'validateField' var validateObj = (this.proInfo.shopPrice <= this.proInfo.upgradePrice) ? 'clearValidate' : 'validateField'
this.$refs.proRuleForm1[validateObj]('upgradePrice') this.$refs.proRuleForm1[validateObj]('upgradePrice')
} }
} }
// handleMaxUpgradeDiscount(newVal) {
// this.proInfo.maxUpgradeDiscount = limitPrice(newVal, this.oldVal.maxUpgradeDiscount, 1, 1, 1)
// this.oldVal.maxUpgradeDiscount = this.proInfo.maxUpgradeDiscount
// },
// handleProfitInput(newVal) {
// this.proInfo.profitValue = limitPrice(newVal, this.oldVal.profitValue, 3, 0, 0, 100)
// this.oldVal.profitValue = this.proInfo.profitValue
// },
// handlePartnerProfitPer(newVal) {
// this.proInfo.partnerProfitPer = limitPrice(newVal, this.oldVal.partnerProfitPer, 3, 0, 0, 100)
// this.oldVal.partnerProfitPer = this.proInfo.partnerProfitPer
// },
// handleExtraCost(newVal) {
// this.proInfo.extraCost = limitPrice(newVal, this.oldVal.extraCost, 8, 2)
// this.oldVal.extraCost = this.proInfo.extraCost
// },
// handleRetailPrice(newVal) {
// this.proInfo.retailPrice = limitPrice(newVal, this.oldVal.retailPrice, 6, 2)
// this.oldVal.retailPrice = this.proInfo.retailPrice
// }
// handleIncentiveCost(newVal) {
// this.proInfo.incentiveCost = this.proInfo.incentiveType === 1 ? limitPrice(newVal, this.oldVal.incentiveCost, 3, 0, 0, 100) : limitPrice(newVal, this.oldVal.incentiveCost, 6, 2)
// this.oldVal.incentiveCost = this.proInfo.incentiveCost
// },
// handleChangeType() {
// this.proInfo.incentiveCost = ''
// this.oldVal.incentiveCost = ''
// }
} }
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
@change="handleCheckedChange" @change="handleCheckedChange"
> >
<el-checkbox <el-checkbox
v-for="item in mutiCheckOption" v-for="item in optionList"
:label="item[optionConfig.optionId]" :label="item[optionConfig.optionId]"
:key="item[optionConfig.optionId]" :key="item[optionConfig.optionId]"
@change="handleCheckedChange" @change="handleCheckedChange"
...@@ -57,14 +57,14 @@ export default { ...@@ -57,14 +57,14 @@ export default {
// 原来的model值 // 原来的model值
searchForm: { searchForm: {
type: Array, type: Array,
default: () => {} default: () => { }
}, },
optionConfig: { optionConfig: {
type: Object, type: Object,
default: () => { } default: () => { }
}, },
// 多选列表 // 多选列表
mutiCheckOption: { optionList: {
type: Array, type: Array,
default: () => [] default: () => []
} }
...@@ -79,12 +79,12 @@ export default { ...@@ -79,12 +79,12 @@ export default {
handleCheckedChange(value) { handleCheckedChange(value) {
const checkedCount = value.length const checkedCount = value.length
this.checkAll = checkedCount === this.mutiCheckOption.length this.checkAll = checkedCount === this.optionList.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.mutiCheckOption.length this.isIndeterminate = checkedCount > 0 && checkedCount < this.optionList.length
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.checkedList = val ? this.mutiCheckOption.map(item => item[this.optionConfig.optionId]) : [] this.checkedList = val ? this.optionList.map(item => item[this.optionConfig.optionId]) : []
this.isIndeterminate = false this.isIndeterminate = false
}, },
......
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
<template slot="header"> <template slot="header">
<span>{{item.label}}</span> <span>{{item.label}}</span>
<table-head-search <table-head-search
v-if="item.mutiCheckOption" v-if="item.optionList"
:searchForm="searchForm" :searchForm="searchForm"
:optionConfig="item.optionConfig" :optionConfig="item.optionConfig"
:mutiCheckOption="item.mutiCheckOption" :optionList="item.optionList"
@handleTableHeadChange="handleTableHeadChange" @handleTableHeadChange="handleTableHeadChange"
></table-head-search> ></table-head-search>
</template> </template>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
v-if="customerStatusObj[1].includes(scope.row.status)" v-if="customerStatusObj[1].includes(scope.row.status)"
>未完成</span> >未完成</span>
<span v-else>已完成</span> --> <span v-else>已完成</span> -->
<span>{{baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel}}</span> <span :class="{ 'red': scope.row.status === 1 }">{{baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel}}</span>
<!-- <span>{{scope.row.status}}</span> --> <!-- <span>{{scope.row.status}}</span> -->
</template> </template>
</el-table-column> </el-table-column>
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
// 1: [1, 3], // 1: [1, 3],
// 2: [2, 4, 6] // 2: [2, 4, 6]
// }, // },
// 客户状态;1-系统录入;2-现场升级;5-核销抵扣 // 创建方式;1-系统录入;2-现场升级;5-核销抵扣
sourceStatusObj: { sourceStatusObj: {
1: [1, 2], 1: [1, 2],
2: [3], 2: [3],
......
...@@ -5,23 +5,27 @@ ...@@ -5,23 +5,27 @@
ref="couponsDetailTable" ref="couponsDetailTable"
:hasNum="false" :hasNum="false"
:sortObj="sortObj" :sortObj="sortObj"
:searchForm="searchFormSearch" :searchForm="searchForm"
:tableParams="tableParams" :tableParams="tableParams"
:getListApi="getListApi" :getListApi="getListApi"
:beforeSearchFn="beforeSearchFn" :beforeSearchFn="beforeSearchFn"
@handleTableHeadChange="(value) => handleTableHeadChange('searchForm', value)" @handleTableHeadChange="handleTableHeadChange"
></d2-table> ></d2-table>
</div> </div>
</template> </template>
<script> <script>
import { getDetailList } from '@api/coupons' import { getDetailList, getDistinctColum } from '@api/coupons'
import { Util } from '@/common/util' import { Util } from '@/common/util'
export default { export default {
name: 'couponsDetail', name: 'couponsDetail',
data() { data() {
return { return {
searchForm: {}, searchForm: {
usedFlagList: [],
employeeNameList: [],
sellerNameList: []
},
searchFormSearch: {}, searchFormSearch: {},
getListApi: getDetailList, getListApi: getDetailList,
sortObj: { sortObj: {
...@@ -61,12 +65,11 @@ export default { ...@@ -61,12 +65,11 @@ export default {
label: '发券人', label: '发券人',
prop: 'employeeName', prop: 'employeeName',
optionConfig: { optionConfig: {
searchItemName: '', searchItemName: 'employeeNameList',
optionId: '', optionId: 'confId',
optionLabel: '' optionLabel: 'confValue'
}, },
mutiCheckOption: [] optionList: []
// mutiCheckList: [{ confLabel: '启用', confId: '1' }, { confLabel: '停用', confId: '2' }]
}, { }, {
label: '核销状态', label: '核销状态',
prop: 'usedFlag', prop: 'usedFlag',
...@@ -82,17 +85,16 @@ export default { ...@@ -82,17 +85,16 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue' optionLabel: 'confValue'
}, },
mutiCheckOption: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }] optionList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }]
}, { }, {
label: '核销人', label: '核销人',
prop: 'sellerName', prop: 'sellerName',
optionConfig: { optionConfig: {
searchItemName: '', searchItemName: 'sellerNameList',
optionId: '', optionId: 'confId',
optionLabel: '' optionLabel: 'confValue'
}, },
mutiCheckOption: [] optionList: []
// mutiCheckList: [{ confLabel: '启用', confId: '1' }, { confLabel: '停用', confId: '2' }]
}, { }, {
label: '核销时间', label: '核销时间',
prop: 'usedTime', prop: 'usedTime',
...@@ -113,11 +115,34 @@ export default { ...@@ -113,11 +115,34 @@ export default {
} }
}, },
mounted() { }, mounted() {
this.getDistinctColumList(1, 'employeeName')
this.getDistinctColumList(2, 'sellerName')
},
methods: { methods: {
// columType属性类型(1:发券人;2:转化人)
getDistinctColumList(columType, tableColumnsProp) {
getDistinctColum({ columType: columType, currentPage: 1, pageSize: 100 }).then(res => {
var tempArr = []
res.forEach(item => {
tempArr.push({
confId: item,
confValue: item
})
})
this.tableParams.tableColumns[this.findFormIdx(tableColumnsProp)].optionList = tempArr
})
},
// 找到在formList的位置,通过name来匹配
findFormIdx(prop) {
return this.tableParams.tableColumns.findIndex(item => item.prop === prop)
},
// 表格头部搜索-改变
handleTableHeadChange({ searchItemName, checkedList }) {
this.searchForm[searchItemName] = _.cloneDeep(checkedList)
},
beforeSearchFn() { beforeSearchFn() {
console.log(this.parentSearchForm)
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = { this.searchFormSearch = {
condition: { condition: {
......
...@@ -29,7 +29,10 @@ ...@@ -29,7 +29,10 @@
label="类型" label="类型"
prop="couponType" prop="couponType"
> >
<el-select :disabled="couponInfo" v-model="couponsForm.couponType"> <el-select
:disabled="couponInfo"
v-model="couponsForm.couponType"
>
<el-option <el-option
v-for="(item, index) in baseData.productTypeList" v-for="(item, index) in baseData.productTypeList"
:key="index" :key="index"
...@@ -39,7 +42,10 @@ ...@@ -39,7 +42,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否收费"> <el-form-item label="是否收费">
<el-radio-group :disabled="couponInfo" v-model="couponsForm.chargeFlag"> <el-radio-group
:disabled="couponInfo"
v-model="couponsForm.chargeFlag"
>
<el-radio label="N">免费</el-radio> <el-radio label="N">免费</el-radio>
<el-radio <el-radio
label="Y" label="Y"
...@@ -59,9 +65,31 @@ ...@@ -59,9 +65,31 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<template v-if="couponInfo">
<el-form-item label="门店名称:">
<span>{{couponInfo.merchantName}}</span>
</el-form-item>
<el-form-item
label="券码数量:"
prop="amount"
:rules="[
{ required: true, message: '请输入券码数量', trigger: 'blur'},
{ validator: validateAccount, trigger: 'blur' }
]"
>
<el-input-number
v-model="couponsForm.amount"
:min="1"
:max="999"
size="mini"
></el-input-number>
</el-form-item>
</template>
<el-form-item <el-form-item
v-if="!couponInfo"
label="批量发放门店:" label="批量发放门店:"
prop="merchantCouponDTOList" prop="merchantCouponDTOList"
:rules="[{ required: true, message: '请选择门店', trigger: 'change' }]"
> >
<el-button @click="handleAddStore">添加</el-button> <el-button @click="handleAddStore">添加</el-button>
<selected-show-table <selected-show-table
...@@ -134,7 +162,7 @@ ...@@ -134,7 +162,7 @@
</template> </template>
<script> <script>
import { addCouponApi, updateCouponApi } from '@api/coupons' import * as api from '@api/coupons'
import selectedShowTable from './selectedShowTable' import selectedShowTable from './selectedShowTable'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData } from '@/common/constants.js' import { BaseData } from '@/common/constants.js'
...@@ -157,8 +185,8 @@ export default { ...@@ -157,8 +185,8 @@ export default {
formRules: { formRules: {
couponName: [{ required: true, message: '请输入精品礼券名称', trigger: 'change' }], couponName: [{ required: true, message: '请输入精品礼券名称', trigger: 'change' }],
couponType: [{ required: true, message: '请选择类型', trigger: 'change' }], couponType: [{ required: true, message: '请选择类型', trigger: 'change' }],
remark: [{ required: true, message: '请输入礼券说明', trigger: 'change' }], remark: [{ required: true, message: '请输入礼券说明', trigger: 'change' }]
merchantCouponDTOList: [{ required: true, message: '请选择门店', trigger: 'change' }] // merchantCouponDTOList: [{ required: true, message: '请选择门店', trigger: 'change' }]
}, },
// 关联门店 // 关联门店
relateStoreVisible: false, relateStoreVisible: false,
...@@ -220,6 +248,11 @@ export default { ...@@ -220,6 +248,11 @@ export default {
async getBaseData() { async getBaseData() {
this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType)) this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType))
}, },
validateAccount(rule, value, callback) {
value < this.couponInfo.amount
? callback(new Error(`数量不能小于${this.couponInfo.amount}张`))
: callback()
},
handleAdd() { handleAdd() {
// this.couponsVisible = !this.couponsVisible // this.couponsVisible = !this.couponsVisible
this.$emit('couponClose', false) this.$emit('couponClose', false)
...@@ -277,12 +310,17 @@ export default { ...@@ -277,12 +310,17 @@ export default {
// console.log(this.couponsForm.remark) // console.log(this.couponsForm.remark)
this.$refs.couponAddForm.validate(valid => { this.$refs.couponAddForm.validate(valid => {
if (valid) { if (valid) {
if (!this.couponsForm.merchantCouponDTOList.every(item => item.amount)) {
return true
}
var params = _.cloneDeep(this.couponsForm) var params = _.cloneDeep(this.couponsForm)
params.couponTypeName = this.baseData.productTypeList.find(item => item.goodsType === this.couponsForm.couponType).goodsTypeName params.couponTypeName = this.baseData.productTypeList.find(item => item.goodsType === this.couponsForm.couponType).goodsTypeName
params.createdBy = this.userInfo.detail[this.userInfo.userType === 1 ? 'name' : 'merchantName'] params.createdBy = this.userInfo.detail[this.userInfo.userType === 1 ? 'name' : 'merchantName']
if (this.couponInfo) {
// 编辑
} else {
// 新增
if (!this.couponsForm.merchantCouponDTOList.every(item => item.amount)) {
return true
}
params.merchantCouponDTOList = [] params.merchantCouponDTOList = []
this.couponsForm.merchantCouponDTOList.forEach((item, idx) => { this.couponsForm.merchantCouponDTOList.forEach((item, idx) => {
params.merchantCouponDTOList.push({ params.merchantCouponDTOList.push({
...@@ -294,8 +332,10 @@ export default { ...@@ -294,8 +332,10 @@ export default {
amount: item.amount amount: item.amount
}) })
}) })
}
// console.log(params) // console.log(params)
addCouponApi(params).then(res => { var apiName = this.couponInfo ? 'updateCouponApi' : 'addCouponApi'
api[apiName](params).then(res => {
this.notice.okTips() this.notice.okTips()
this.$emit('couponClose', true) this.$emit('couponClose', true)
this.$refs.couponAddForm && this.$refs.couponAddForm.resetFields() this.$refs.couponAddForm && this.$refs.couponAddForm.resetFields()
......
...@@ -34,23 +34,21 @@ ...@@ -34,23 +34,21 @@
<el-tabs <el-tabs
v-model="activeName" v-model="activeName"
type="card" type="card"
@tab-click="handleClick" @tab-click="handleSearch"
> >
<el-tab-pane <el-tab-pane
label="" label="店面列表"
name="storeList" name="storeList"
> >
<span slot="label">店面列表</span>
<store-list <store-list
ref="storeList" ref="storeList"
:parentSearchForm="parentSearchForm" :parentSearchForm="parentSearchForm"
></store-list> ></store-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
label="" label="领用明细"
name="couponsDetail" name="couponsDetail"
> >
<span slot="label">领用明细</span>
<coupons-detail <coupons-detail
ref="couponsDetail" ref="couponsDetail"
:parentSearchForm="parentSearchForm" :parentSearchForm="parentSearchForm"
......
...@@ -38,7 +38,8 @@ export default { ...@@ -38,7 +38,8 @@ export default {
return { return {
searchForm: { searchForm: {
couponTypeList: [], couponTypeList: [],
regionList: [] regionList: [],
enabledFlagList: []
}, },
searchFormSearch: {}, searchFormSearch: {},
// 编辑 // 编辑
...@@ -85,7 +86,7 @@ export default { ...@@ -85,7 +86,7 @@ export default {
optionId: 'goodsType', optionId: 'goodsType',
optionLabel: 'goodsTypeName' optionLabel: 'goodsTypeName'
}, },
mutiCheckOption: [] optionList: []
}, { }, {
label: '区域', label: '区域',
parentProp: 'yqMerchantInfo', parentProp: 'yqMerchantInfo',
...@@ -95,7 +96,7 @@ export default { ...@@ -95,7 +96,7 @@ export default {
optionId: 'confKey', optionId: 'confKey',
optionLabel: 'confValue' optionLabel: 'confValue'
}, },
mutiCheckOption: [] optionList: []
}, { }, {
label: '门店名称', label: '门店名称',
prop: 'merchantName' prop: 'merchantName'
...@@ -126,7 +127,7 @@ export default { ...@@ -126,7 +127,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel' optionLabel: 'confLabel'
}, },
mutiCheckOption: [{ confLabel: '启用', confId: 'Y' }, { confLabel: '停用', confId: 'N' }], optionList: [{ confLabel: '启用', confId: 'Y' }, { confLabel: '停用', confId: 'N' }],
formatter: cellValue => { formatter: cellValue => {
return { return {
'Y': '启用', 'Y': '启用',
...@@ -163,12 +164,12 @@ export default { ...@@ -163,12 +164,12 @@ export default {
get: 'd2admin/base/get' get: 'd2admin/base/get'
}), }),
async getBaseData() { async getBaseData() {
this.tableParams.tableColumns[this.findFormIdx('couponTypeName')].mutiCheckOption = _.cloneDeep(await this.get(BaseData.productType)) this.tableParams.tableColumns[this.findFormIdx('couponTypeName')].optionList = _.cloneDeep(await this.get(BaseData.productType))
this.$nextTick() this.$nextTick()
}, },
getCommonConfig() { getCommonConfig() {
commonConfigApi({ confGroup: 'MERCHANT_REGION' }).then(res => { commonConfigApi({ confGroup: 'MERCHANT_REGION' }).then(res => {
this.tableParams.tableColumns[this.findFormIdx('region')].mutiCheckOption = res this.tableParams.tableColumns[this.findFormIdx('region')].optionList = res
this.$nextTick() this.$nextTick()
}) })
}, },
...@@ -205,7 +206,7 @@ export default { ...@@ -205,7 +206,7 @@ export default {
couponClose(isRefresh) { couponClose(isRefresh) {
this.couponsVisible = !this.couponsVisible this.couponsVisible = !this.couponsVisible
isRefresh && this.handleSearch() isRefresh && this.keyDowmGetList()
// this.$refs.couponAddForm && this.$refs.couponAddForm.resetFields() // this.$refs.couponAddForm && this.$refs.couponAddForm.resetFields()
}, },
......
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
}) })
return true return true
} }
var upgradeGoodsAttr = ['goodsCode', 'shopPrice', 'upgradePrice', 'incentiveType'] var upgradeGoodsAttr = ['goodsCode', 'shopPrice', 'upgradePrice', 'incentiveType', 'shopMinPrice']
var params = { var params = {
// yqMerchantId: this.userInfo.beSuper ? data.yqMerchantId : this.userInfo.detail.merchantId, // yqMerchantId: this.userInfo.beSuper ? data.yqMerchantId : this.userInfo.detail.merchantId,
merchantId: this.userInfo.detail.merchantId, merchantId: this.userInfo.detail.merchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!