Commit 0ea1fe14 by 杨明

fixed

1 parent cd6322e0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54 * @Date: 2022-12-13 16:38:54
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-09 10:41:15 * @LastEditTime: 2023-03-14 14:08:40
* @FilePath: \scrm-micro-link\src\api\modules\giftBag.js * @FilePath: \scrm-micro-link\src\api\modules\giftBag.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -26,5 +26,14 @@ const getEquityListApi = params => { ...@@ -26,5 +26,14 @@ const getEquityListApi = params => {
sign: true sign: true
}) })
} }
const brandList = params => {
params.method = 'scrm.api.equity.goods.brand.list.all'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getghDirectionalGiftListApi, getEquityListApi } export default { getghDirectionalGiftListApi, getEquityListApi, brandList }
...@@ -59,6 +59,11 @@ html { ...@@ -59,6 +59,11 @@ html {
.message-Z-zinde { .message-Z-zinde {
z-index: 9999 !important; z-index: 9999 !important;
} }
.ellipsis-1 {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.flex { .flex {
display: flex; display: flex;
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer"> <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable v-loading="loading" v-show="activeName == 'card'" ref="cardRef" :tableData="GoodsList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"> <GLTable v-loading="loading" v-show="activeName == 'card'" ref="cardRef" :tableData="GoodsList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
<span>{{ toRestrictLabelText(scope.scope) }}</span> <span>{{ toRestrictLabelText(scope.scope) }}</span>
</span> </span>
</GLTable> </GLTable>
<GLTable v-loading="loading" v-show="activeName == 'recharge'" ref="rechargeRef" :tableData="GoodsList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"> <GLTable v-loading="loading" v-show="activeName == 'recharge'" ref="rechargeRef" :tableData="GoodsList" :noDataImg="url" :tableParams="tableParamsL" @refreshTable="getList" @selectionTable="handleSelectionTable">
<span slot="effectiveType" slot-scope="scope"> <span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span> <span>{{ toLabelText(scope.scope) }}</span>
</span> </span>
...@@ -49,9 +50,9 @@ ...@@ -49,9 +50,9 @@
<template v-for="(subItem, subIndex) in selectedList[item].list"> <template v-for="(subItem, subIndex) in selectedList[item].list">
<div class="gift-item" :key="subIndex"> <div class="gift-item" :key="subIndex">
<img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" /> <img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" />
<el-tooltip effect="dark" placement="top" :disabled="subItem.brandName.length <= 8"> <el-tooltip effect="dark" placement="top" :disabled="couponString(subItem).length <= 8">
<p :class="['gift-coupon-name', 'ellipsis-1']">{{ subItem.brandName.length > 8 ? subItem.brandName.slice(0, 8) + '...' : subItem.brandName }}</p> <p :class="['gift-coupon-name', 'ellipsis-1']">{{ couponString(subItem) > 8 ? couponString(subItem).slice(0, 8) + '...' : couponString(subItem) }}</p>
<div slot="content">{{ subItem.brandName }}</div> <div slot="content">{{ couponString(subItem) }}</div>
</el-tooltip> </el-tooltip>
<div class="gift-sum"> <div class="gift-sum">
<el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number> <el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number>
...@@ -116,10 +117,14 @@ export default { ...@@ -116,10 +117,14 @@ export default {
{ {
label: '商品', label: '商品',
name: 'brandName', name: 'brandName',
type: 'input', type: 'select',
maxlength: 30, maxlength: 30,
width: '215px', width: '185px',
placeholder: '请输入券/服务名称进行搜索', placeholder: '请选择商品品牌',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
optionsName: 'brandName',
isClear: true isClear: true
}, },
{ {
...@@ -127,8 +132,8 @@ export default { ...@@ -127,8 +132,8 @@ export default {
name: 'goodsName', name: 'goodsName',
type: 'input', type: 'input',
maxlength: 30, maxlength: 30,
width: '215px', width: '185px',
placeholder: '请输入券/服务名称进行搜索', placeholder: '请输入商品名称',
isClear: true isClear: true
} }
], ],
...@@ -144,7 +149,7 @@ export default { ...@@ -144,7 +149,7 @@ export default {
{ {
label: '品牌', label: '品牌',
prop: 'brandName', prop: 'brandName',
width: 180 width: 120
}, },
{ {
label: '商品名称', label: '商品名称',
...@@ -152,10 +157,10 @@ export default { ...@@ -152,10 +157,10 @@ export default {
width: 180 width: 180
}, },
{ {
label: '劵名额', label: '劵面额',
prop: 'denomination', prop: 'denomination',
formatter: cellValue => { formatter: cellValue => {
return (cellValue.denomination / 100).toFixed(2) + '元' return isNaN(cellValue.denomination) ? cellValue.denomination : (cellValue.denomination / 100).toFixed(2) + '元'
} }
}, },
{ {
...@@ -166,7 +171,8 @@ export default { ...@@ -166,7 +171,8 @@ export default {
} }
} }
] ]
} },
tableParamsL: {}
} }
}, },
props: { props: {
...@@ -190,9 +196,35 @@ export default { ...@@ -190,9 +196,35 @@ export default {
}) })
} }
this.getList({}, true) this.getList({}, true)
this.brandList('brandName')
}, },
methods: { methods: {
couponString(val) {
return `${isNaN(val.denomination) ? val.denomination : (val.denomination / 100).toFixed(2) + '元'}${val.brandName}${val.goodsName}${this.activeName == 'recharge' ? val.rechargeDenomination : ''}`
},
filterDenomination(val) {
return isNaN(val) ? val : (val / 100).toFixed(2) + '元'
},
brandList(name) {
this.$apis.giftBag
.brandList({
pageNum: 1,
pageSize: 10000,
supplier: 'HW'
})
.then(res => {
const i = this.searchFormData.findIndex(item => item.optionsName == name)
this.searchFormData[i].optionList = res
console.log(this.searchFormData[i].optionList)
})
},
getList(page, isResetPage = false, isMount = false) { getList(page, isResetPage = false, isMount = false) {
this.tableParamsL = this.$common.utils.deepClone(this.tableParams)
this.tableParamsL.tableColumns.splice(3, 0, {
label: '直充面额',
prop: 'rechargeDenomination',
width: 100
})
var params = { var params = {
...this.searchForm, ...this.searchForm,
appearance: this.activeName == 'card' ? 1 : 2, appearance: this.activeName == 'card' ? 1 : 2,
...@@ -228,6 +260,10 @@ export default { ...@@ -228,6 +260,10 @@ export default {
this.getList({}, true) this.getList({}, true)
this.recoverySelected() this.recoverySelected()
}, },
handleReset() {
this.searchForm = {}
this.handleSearch()
},
// 恢复选择 // 恢复选择
addSelected() { addSelected() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -308,6 +344,7 @@ export default { ...@@ -308,6 +344,7 @@ export default {
goodsName: item.goodsName, goodsName: item.goodsName,
denomination: item.denomination, denomination: item.denomination,
effectiveDays: item.effectiveDays, effectiveDays: item.effectiveDays,
rechargeDenomination: item.rechargeDenomination,
provideWay: 1 provideWay: 1
}) })
} }
...@@ -331,7 +368,11 @@ export default { ...@@ -331,7 +368,11 @@ export default {
for (let i in this.selectedList) { for (let i in this.selectedList) {
selectedData.push(...this.selectedList[i].list) selectedData.push(...this.selectedList[i].list)
} }
console.log(selectedData)
if (selectedData.length == 0) {
this.$message.error('请选择商品优惠券')
return
}
this.$emit('handleGoodsConfirm', selectedData) this.$emit('handleGoodsConfirm', selectedData)
}, },
handleGoodsClose() { handleGoodsClose() {
...@@ -341,6 +382,9 @@ export default { ...@@ -341,6 +382,9 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.el-message {
z-index: 9999 !important;
}
.muti-gift .el-tabs__active-bar { .muti-gift .el-tabs__active-bar {
display: block; display: block;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!