Commit 9534ecc0 by zhangquan

提交代码

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