Commit f8eddd28 by zhangxw

二级流量方紧急需求

1 parent 2dd0c25a
...@@ -115,6 +115,12 @@ export const routerName = { ...@@ -115,6 +115,12 @@ export const routerName = {
handle: "setWarrantyCard" handle: "setWarrantyCard"
}, },
{ {
authId: "90603010",
parentId: "90603",
label: "下级商户配置",
handle: "setSubordinateMerchant"
},
{
authId: "9060305", authId: "9060305",
parentId: "90603", parentId: "90603",
label: "删除", label: "删除",
......
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
label="流量方" label="流量方"
width="170" width="170"
align="center" /> align="center" />
<el-table-column prop="subShopMerchantName" <!-- <el-table-column prop="subShopMerchantName"
v-if="isShowSubShopMerchantName" v-if="isShowSubShopMerchantName"
label="二级流量方" label="二级流量方"
width="170" width="170"
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.subShopMerchantName || '-' }}</span> <span>{{ scope.row.subShopMerchantName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="shopProfitType" <el-table-column prop="shopProfitType"
label="流量方比例" label="流量方比例"
width="120" width="120"
......
...@@ -100,6 +100,10 @@ ...@@ -100,6 +100,10 @@
<el-form-item label="门店地址:"> <el-form-item label="门店地址:">
{{ detail.sellerMerchantAddress }} {{ detail.sellerMerchantAddress }}
</el-form-item> </el-form-item>
<!-- 审计特殊字段 -->
<el-form-item label="二级流量方:" v-if="detail.sellerMerchantAddress">
{{ detail.sellerMerchantAddress }}
</el-form-item>
</div> </div>
</el-form> </el-form>
</div> </div>
......
...@@ -169,10 +169,22 @@ ...@@ -169,10 +169,22 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="4s店" <!-- <el-table-column label="4s店"
align="center"
width="170"
prop="merchantName" /> -->
<el-table-column label="流量方"
align="center" align="center"
width="170" width="170"
prop="merchantName" /> prop="merchantName" />
<el-table-column label="二级流量方"
align="center"
width="170"
prop="merchantName">
<template slot-scope="scope">
<span>{{ scope.row.subShopMerchantName || '--' }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="园区店" --> <!-- <el-table-column label="园区店" -->
<el-table-column label="服务对接" <el-table-column label="服务对接"
align="center" align="center"
...@@ -353,7 +365,10 @@ export default { ...@@ -353,7 +365,10 @@ export default {
optionsName: 'parkServiceList', optionsName: 'parkServiceList',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
if (value) { if (value) {
// 获取流量方
this.getServiceStore(value) this.getServiceStore(value)
// 获取二级流量方
this.getThirdServiceStore(value)
} else { } else {
this.baseData.storeIdList = [] this.baseData.storeIdList = []
} }
...@@ -660,6 +675,14 @@ export default { ...@@ -660,6 +675,14 @@ export default {
this.getOptionsList() this.getOptionsList()
}) })
}, },
getThirdServiceStore(merchantId) {
let thirdServiceStore = []
if (thirdServiceStore.length) {
this.showFormData.push({
})
}
},
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
......
<!-- 质保卡 -->
<template>
<d2-dialog title="下级商户设置"
:is-visible="subordinateMerchantVisible"
class="accountDailog"
@closeDialog="handleClose"
width="800px"
@confirmDialog="handleAddConfirm">
<div class="container">
<el-table :data="tableData"
border>
<el-table-column type="index"
label="序号"
:index="index => index + 1"
align="center" />
<el-table-column label="商户名称"
align="center"
prop="orderCode">
<template slot-scope="scope">
<el-autocomplete
style="width: 350px;"
v-model="scope.row.merchantName"
:fetch-suggestions="querySearchAsync"
placeholder="请选择二级流量方"
@select="handleSelect"
></el-autocomplete>
</template>
</el-table-column>
<el-table-column label="商户号"
align="center"
prop="merchantId"
width="240"/>
<el-table-column label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button type="text" style="color: red;" @click="handleDelMerchant(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="add-btn">
<el-button type="primary" @click="handleAddMerchant">添加新的一行</el-button>
</div>
</div>
</d2-dialog>
</template>
<script>
import { updateCardCodeFlag } from '@api/merchant'
import { deepClone } from '@/common/util'
export default {
name: 'WarrantyCardDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
cardCodeFlag: 0
},
tableData: []
}
},
props: {
subordinateMerchantVisible: {
type: Boolean,
default: false
},
subShopMerchantInfo: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
components: {},
mounted() {
if (this.subShopMerchantInfo) {
this.getInfo()
}
},
methods: {
getInfo() {
this.tableData = []
},
handleAddConfirm() {
var params = deepClone(this.infoForm)
params.merchantId = this.recordInfo.merchantId
updateCardCodeFlag(params).then(res => {
this.notice.okTips('操作成功')
this.handleClose(true)
})
},
handleAddMerchant() {
this.tableData.push({
merchantName: '123',
merchantId: '789123'
})
},
handleDelMerchant(index) {
this.tableData.splice(index, 1)
},
querySearchAsync(queryString, cb) {
// 请求接口
let result = []
cb(result)
},
handleSelect(item) {
console.log(item)
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style scoped>
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.add-btn{
width: 100%;
display: flex;
margin-top: 15px;
}
.accountDailog .el-dialog {
margin-top: 20vh !important;
min-width: 1000px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
</style>
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
v-if="scope.scope.scene != 3" v-if="scope.scope.scene != 3"
:show-btn-ids="['9060309']" :show-btn-ids="['9060309']"
:data="scope.scope" /> :data="scope.scope" />
<!-- 下级商户配置 -->
<auth-button slot="auth-button"
:show-btn-ids="['90603010']"
:data="scope.scope" />
<!-- 删除 --> <!-- 删除 -->
<auth-button slot="auth-button" <auth-button slot="auth-button"
:show-btn-ids="['9060305']" :show-btn-ids="['9060305']"
...@@ -253,6 +257,10 @@ ...@@ -253,6 +257,10 @@
:warranty-card-visible="warrantyCardVisible" :warranty-card-visible="warrantyCardVisible"
:record-info="recordInfo" :record-info="recordInfo"
@dialogClose="closeWarrantyCard" /> @dialogClose="closeWarrantyCard" />
<subordinateMerchantDialog v-if="subordinateMerchantVisible"
:subordinateMerchantVisible="subordinateMerchantVisible"
:sub-shop-merchant-info="subShopMerchantInfo"
@dialogClose="colseSubordinateMerchant" />
</d2-container> </d2-container>
</template> </template>
...@@ -285,6 +293,7 @@ import { ...@@ -285,6 +293,7 @@ import {
import relateStoreMerDialog from "./components/relateStoreMerDialog" import relateStoreMerDialog from "./components/relateStoreMerDialog"
import relateMerDialog from "./components/relateMerDialog" import relateMerDialog from "./components/relateMerDialog"
import warrantyCardDialog from "./components/warrantyCardDialog" import warrantyCardDialog from "./components/warrantyCardDialog"
import subordinateMerchantDialog from "./components/subordinateMerchantDialog"
export default { export default {
name: "MerchantManage", name: "MerchantManage",
...@@ -294,7 +303,8 @@ export default { ...@@ -294,7 +303,8 @@ export default {
financialRulesDetail, financialRulesDetail,
// QRcodeDialog // QRcodeDialog
relateMerDialog, relateMerDialog,
warrantyCardDialog warrantyCardDialog,
subordinateMerchantDialog
}, },
data() { data() {
return { return {
...@@ -624,7 +634,9 @@ export default { ...@@ -624,7 +634,9 @@ export default {
relateVisible: false, relateVisible: false,
warrantyCardVisible: false, // 质保卡弹窗 warrantyCardVisible: false, // 质保卡弹窗
recordInfo: {} recordInfo: {},
subordinateMerchantVisible: false, // 下级商户弹窗
subShopMerchantInfo: {}
} }
}, },
watch: { watch: {
...@@ -1265,6 +1277,19 @@ export default { ...@@ -1265,6 +1277,19 @@ export default {
closeWarrantyCard(flag) { closeWarrantyCard(flag) {
this.warrantyCardVisible = !this.warrantyCardVisible this.warrantyCardVisible = !this.warrantyCardVisible
flag && this.queryList() flag && this.queryList()
},
// 打开下级商户配置弹窗
setSubordinateMerchant(row) {
console.log('subShopMerchantInfo', row)
this.subordinateMerchantVisible = !this.subordinateMerchantVisible
this.subShopMerchantInfo = row
},
// 关闭下级商户配置弹窗
colseSubordinateMerchant(flag) {
this.subordinateMerchantVisible = !this.subordinateMerchantVisible
flag && this.queryList()
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!