Commit 3d9003f7 by 周子尧

Merge branch 'v1.2.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.2.0

2 parents 1d6485d5 c7c123e1
...@@ -19,10 +19,38 @@ ...@@ -19,10 +19,38 @@
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable v-loading="loading" v-show="activeName == 'service'" ref="serviceRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable> <GLTable v-loading="loading" v-show="activeName == 'service'" ref="serviceRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
<GLTable v-loading="loading" v-show="activeName == 'cash'" ref="cashRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable> <span slot="effectiveType" slot-scope="scope">
<GLTable v-loading="loading" v-show="activeName == 'discount'" ref="discountRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable> <span>{{ toLabelText(scope.scope) }}</span>
<GLTable v-loading="loading" v-show="activeName == 'exchange'" ref="exchangeRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable> </span>
<span slot="useType" slot-scope="scope">
<span>{{ toRestrictLabelText(scope.scope) }}</span>
</span>
</GLTable>
<GLTable v-loading="loading" v-show="activeName == 'cash'" ref="cashRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="useType" slot-scope="scope">
<span>{{ toCashRestrictLabelText(scope.scope) }}</span>
</span>
</GLTable>
<GLTable v-loading="loading" v-show="activeName == 'discount'" ref="discountRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="useType">
<span>-</span>
</span>
</GLTable>
<GLTable v-loading="loading" v-show="activeName == 'exchange'" ref="exchangeRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="useType">
<span>-</span>
</span>
</GLTable>
</div> </div>
</div> </div>
<div class="selected-list"> <div class="selected-list">
...@@ -109,11 +137,13 @@ export default { ...@@ -109,11 +137,13 @@ export default {
}, },
{ {
label: '有效期', label: '有效期',
prop: 'followerTypeName' prop: 'effectiveType',
addHtml: 'effectiveType'
}, },
{ {
label: '使用原则', label: '使用原则',
prop: 'followerTypeName' prop: 'useType',
addHtml: 'useType'
}, },
{ {
label: '剩余库存', label: '剩余库存',
...@@ -206,6 +236,36 @@ export default { ...@@ -206,6 +236,36 @@ export default {
this.getList(true) this.getList(true)
}, },
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
return row.effectiveDays + '天'
}
},
toRestrictLabelText(row) {
switch (row.useType) {
case 0:
return '无限制'
case 1:
return '有效期内可使用' + row.useAmount + '次'
case 2:
return '每' + row.useLimitDays + '天可以使用' + row.useAmount + '次'
}
},
toCashRestrictLabelText(row) {
switch (row.useType) {
case 1:
return '无限制'
case 2:
return '订单满' + row.useAmount + '元可用'
}
},
recoverySelected() { recoverySelected() {
if (this.selectedGiftList[this.activeName].list && this.selectedGiftList[this.activeName].list.length) { if (this.selectedGiftList[this.activeName].list && this.selectedGiftList[this.activeName].list.length) {
this.selectedGiftList[this.activeName].list.forEach(row => { this.selectedGiftList[this.activeName].list.forEach(row => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!