Commit 9534ecc0 by zhangquan

提交代码

1 parent bf81eb3c
...@@ -44,7 +44,7 @@ const addCaseApi = params => { ...@@ -44,7 +44,7 @@ const addCaseApi = params => {
const getCarSeriesApi= params => { const getCarSeriesApi= params => {
params.method = 'scrm.api.carlife.common.getCarBrandList' params.method = 'scrm.api.carlife.common.getOnlyCarBrandList'
return http({ return http({
url: 'rop-scrm-carlife/router', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'GET',
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</GLFooter> </GLFooter>
<selectCarDialog v-if="carDialogVisible" @handleClose="handleCarSeriesClose" @handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog> <selectCarDialog v-if="carDialogVisible" @handleClose="handleCarSeriesClose" @handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog>
<selectGoods v-if="goodsVisible" :dialogVisible="goodsVisible" :goodsInfo="formObj" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></selectGoods> <selectGoods v-if="goodsVisible" :dialogVisible="goodsVisible" :goodsInfo="formObj" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></selectGoods>
<selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedGoodsList="{}" v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog> <selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog" :selectedList="merchantRequestList" v-if="merchantDialogVisible" :isVisible="merchantDialogVisible"></selectMerchantDialog>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -72,6 +72,8 @@ export default { ...@@ -72,6 +72,8 @@ export default {
} }
}, },
created() { created() {
this.copyList = JSON.parse(JSON.stringify(this.selectedList))
console.log(this.copyList)
}, },
methods: { methods: {
handleOk() { handleOk() {
...@@ -86,20 +88,19 @@ export default { ...@@ -86,20 +88,19 @@ export default {
}, },
onOk() { onOk() {
let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || [] let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || []
for (let i = 0; i < this.selectedList.length; i++) { // for (let i = 0; i < this.selectedList.length; i++) {
let idx = list.findIndex(item => item.id == this.selectedList[i].id) // let idx = list.findIndex(item => item.id == this.selectedList[i].id)
if (idx > -1) { // if (idx > -1) {
list.splice(idx, 1) // list.splice(idx, 1)
} // }
} // }
list.map(item => this.$set(item, 'activityPrice', '')) list.map(item => this.$set(item, 'activityPrice', ''))
this.$emit('confirmDialog', [...list, ...this.selectedList]) this.$emit('confirmDialog', [...list, ...this.copyList])
}, },
handleClose() { handleClose() {
this.$emit('closeDialog') this.$emit('closeDialog')
}, },
setTableFinishFun() { setTableFinishFun() {
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)
...@@ -108,6 +109,7 @@ export default { ...@@ -108,6 +109,7 @@ export default {
this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true) this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true)
let id = this.copyList.findIndex(item => item.id == row.id) let id = this.copyList.findIndex(item => item.id == row.id)
if (id > -1) this.copyList.splice(id, 1) if (id > -1) this.copyList.splice(id, 1)
console.log(this.copyList)
} catch (err) { } catch (err) {
console.log(err) console.log(err)
} }
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
}, },
// 获取数据源 // 获取数据源
getCarSeriesData() { getCarSeriesData() {
this.$apis.case.getCarSeriesApi({needCarSeries:true}).then(res => { this.$apis.case.getCarSeriesApi({}).then(res => {
console.log(res) console.log(res)
if(res?.length){ if(res?.length){
this.carSeriesData = res this.carSeriesData = res
......
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
</div> </div>
</GLDialog> </GLDialog>
<!-- 分享 --> <!-- 分享 -->
<GLDialog :mode="mode" title="分享" :visible.sync="shareVisible" :hasFooter="hasFooter"> <GLDialog class="share-dialog" :mode="mode" title="分享" :visible.sync="shareVisible" :hasFooter="hasFooter">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<div class="preview-wrap"> <div class="preview-wrap">
<div class="share-content"> <div class="share-content">
<div> <div>
...@@ -113,6 +114,9 @@ export default { ...@@ -113,6 +114,9 @@ export default {
merchantName: '', merchantName: '',
createDate: [] createDate: []
}, },
shareMerchantId: '',
tabPaneList: [],
activeName: '',
searchForm: {}, searchForm: {},
url: url, url: url,
mode: 'mid', mode: 'mid',
...@@ -192,7 +196,8 @@ export default { ...@@ -192,7 +196,8 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
} }
}, },
created() {}, created() {
},
mounted() {}, mounted() {},
methods: { methods: {
...mapMutations({ ...mapMutations({
...@@ -223,12 +228,38 @@ export default { ...@@ -223,12 +228,38 @@ export default {
alink.click() alink.click()
alink.remove() alink.remove()
}, },
getChannelList() {
this.$apis.store
.getconfigMerchant({
pageSize: 100,
pageNum: 1,
merchantId: this.shareMerchantId
})
.then(res => {
if(res?.length){
let tabPaneList = []
res.forEach(item => {
tabPaneList.push({label: item.channelName,name: item.channelType,merchantChannelId: item.id})
})
this.tabPaneList = tabPaneList
this.activeName = tabPaneList[0].name
this.getShareData()
}
})
},
handleClick(){
this.getShareData()
},
//分享 //分享
handleShare(val) { handleShare(val) {
this.$apis.store.getMerchantShare({ merchantId: val.merchantId }).then(res => { this.shareMerchantId = val.merchantId
this.getChannelList()
this.shareVisible = true
},
getShareData(){
this.$apis.store.getMerchantShare({ merchantId: this.shareMerchantId, channelType: this.activeName }).then(res => {
this.shareData = res this.shareData = res
}) })
this.shareVisible = true
}, },
//预览 //预览
handlePreview() { handlePreview() {
...@@ -411,6 +442,15 @@ export default { ...@@ -411,6 +442,15 @@ export default {
} }
} }
} }
.share-dialog{
.preview-wrap{
margin-top: 10px;
}
/deep/ .el-dialog__body{
padding-top: 0;
}
}
.share-content { .share-content {
width: 335px; width: 335px;
height: 328px; height: 328px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!