Commit c24c2a90 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !30
2 parents 3d85d07c 31a3431c
...@@ -176,3 +176,15 @@ export function addOrUpdateSceneMerchantRef(data) { ...@@ -176,3 +176,15 @@ export function addOrUpdateSceneMerchantRef(data) {
data.method = `${path2}shopMerchant.addOrUpdateSceneMerchantRef` data.method = `${path2}shopMerchant.addOrUpdateSceneMerchantRef`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 获取商户基础信息
export function getBaseInfo(data) {
data.method = `${path2}serviceMerchant.getBaseInfo`
return request(data)
}
// 修改4s店质保卡二维码展示标志位
export function updateCardCodeFlag(data) {
data.method = `${path2}serviceMerchant.updateCardCodeFlag`
return request(data, RequestMethods.POST)
}
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
v.listShowShopPrice = v.upgradePrice v.listShowShopPrice = v.upgradePrice
v.listShowStock = v.stock v.listShowStock = v.stock
v.listShowSpecificationData = v.specificationData v.listShowSpecificationData = v.specificationData
v.goodsInfo.goodsName = val.baseGoodsName v.goodsInfo.goodsName = val.baseGoodsName || v.goodsInfo.goodsName // 新数据显示商品名称,历史商品数据显示素材名称
stockTotal += v.stock stockTotal += v.stock
}) })
let minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0 let minPrice = shopPriceArr.length ? Math.min(...shopPriceArr) : 0
......
...@@ -815,6 +815,12 @@ export const resources = { ...@@ -815,6 +815,12 @@ export const resources = {
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleMerchantRelate" handle: "handleMerchantRelate"
},
{
authId: "9060309",
parentId: "90603",
label: "质保卡配置",
handle: "setWarrantyCard"
} }
], ],
component: _import("systemConfig/merchant/merchantManage") component: _import("systemConfig/merchant/merchantManage")
......
...@@ -455,6 +455,10 @@ export default { ...@@ -455,6 +455,10 @@ export default {
// goodsType: '', // goodsType: '',
// goodsTypeName: '全部' // goodsTypeName: '全部'
// }) // })
this.baseData.productTypeList.unshift({
categoryType: '',
categoryName: '全部'
})
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName]) this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
...@@ -696,17 +700,14 @@ export default { ...@@ -696,17 +700,14 @@ export default {
}, },
// 根据所选场景获取类目 // 根据所选场景获取类目
handleChangeSelect(value) { handleChangeSelect(value) {
if (!value) { this.searchForm.goodsType = ''
this.baseData.productTypeList = [] this.baseData.productTypeList = []
this.getBaseData()
return
}
getProductTypeBySceneId({ sceneType: value }).then(res => { getProductTypeBySceneId({ sceneType: value }).then(res => {
this.searchForm.goodsType = ''
this.baseData.productTypeList = res this.baseData.productTypeList = res
console.log(res)
this.getBaseData() this.getBaseData()
}) })
}, }
} }
} }
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
linkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }], linkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }],
speciLinkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }], speciLinkMerchants: [{ required: true, message: '请选择关联门店', trigger: 'change' }],
specificationDetailList: [{ required: true, message: '请添加规格并保存', trigger: 'change' }], specificationDetailList: [{ required: true, message: '请添加规格并保存', trigger: 'change' }],
baseGoodsName: [{ required: true, message: '请输入商品名称', trigger: ['blur', 'change'] }] // baseGoodsName: [{ required: true, message: '请输入商品名称', trigger: ['blur', 'change'] }]
}, },
comFormRef: 'com', comFormRef: 'com',
editForm: [{ editForm: [{
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
this.editForm[0].formBlock[0].optionList = res this.editForm[0].formBlock[0].optionList = res
}) })
}, },
getGoodsInfo(id, flag, coloseDialog) { getGoodsInfo(id, flag) {
getGoodsInfoById({ id: id }).then(res => { getGoodsInfoById({ id: id }).then(res => {
// this.userInfo.beSuper && this.getGoodsList() // this.userInfo.beSuper && this.getGoodsList()
this.editForm[0].formBlock[0].optionList = [{ this.editForm[0].formBlock[0].optionList = [{
...@@ -315,8 +315,6 @@ export default { ...@@ -315,8 +315,6 @@ export default {
this.markOldVal.retailPrice = res.retailPrice this.markOldVal.retailPrice = res.retailPrice
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
if (coloseDialog) return
if (!flag) this.$refs.d2Form.showMerchantsDialog(this.radioType || '0')
}) })
}) })
}, },
...@@ -342,7 +340,6 @@ export default { ...@@ -342,7 +340,6 @@ export default {
this.editForm[linkMerchantIndex].formBlock[0].name = data == '0' ? 'linkMerchants' : 'speciLinkMerchants' this.editForm[linkMerchantIndex].formBlock[0].name = data == '0' ? 'linkMerchants' : 'speciLinkMerchants'
}, },
handleAddConfirm(e, flag = false) { handleAddConfirm(e, flag = false) {
if (flag) this.$refs.d2Form.confirmEvent()
let data = deepClone(e) let data = deepClone(e)
let [goodsSpecificationNameList, goodsSpecificationList] = [[], []] let [goodsSpecificationNameList, goodsSpecificationList] = [[], []]
data.specificationDetailList.length && data.specificationDetailList.map(val => { data.specificationDetailList.length && data.specificationDetailList.map(val => {
...@@ -388,9 +385,14 @@ export default { ...@@ -388,9 +385,14 @@ export default {
goodsSpecificationNameList: goodsSpecificationNameList, goodsSpecificationNameList: goodsSpecificationNameList,
goodsSpecificationList: goodsSpecificationList goodsSpecificationList: goodsSpecificationList
} }
console.log(params)
addOrEditBaseGoods(params).then(res => { addOrEditBaseGoods(params).then(res => {
// 获取商品详情 获取到规格数据 // flag true提交
this.getGoodsInfo(res.id, flag) if (flag) {
this.$refs.d2Form.confirmEvent()
} else {
this.$refs.d2Form.showMerchantsDialog(this.radioType || '0', res)
}
}) })
// // 执行分配门店默认执行保存 // // 执行分配门店默认执行保存
// if (typeof flag == 'boolean') { // if (typeof flag == 'boolean') {
......
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
}] }]
this.editData.goodsVideoList = [] this.editData.goodsVideoList = []
// 获取场景下类目 // 获取场景下类目
if (this.editData.sceneType) { if ((this.editData.sceneType??'') !== '') {
this.handleChangeSelect(this.editData.sceneType) this.handleChangeSelect(this.editData.sceneType)
} }
if (this.editData.videoUrl) this.editData.goodsVideoList = [{ content: this.editData.videoUrl }] if (this.editData.videoUrl) this.editData.goodsVideoList = [{ content: this.editData.videoUrl }]
...@@ -286,14 +286,14 @@ export default { ...@@ -286,14 +286,14 @@ export default {
}, },
// 根据所选场景获取类目 // 根据所选场景获取类目
handleChangeSelect(value) { handleChangeSelect(value) {
if (!value.toString()) { if ((this.editData.sceneType??'') === '') {
this.editForm[0].formBlock[2].optionList = [] this.editForm[0].formBlock[2].optionList = []
this.getBaseData() this.getBaseData()
return return
} }
getProductTypeBySceneId({ sceneType: value }).then(res => { getProductTypeBySceneId({ sceneType: value }).then(res => {
this.editForm[0].formBlock[2].optionList = res this.editForm[0].formBlock[2].optionList = res
if (!res.find(v => v.id === this.editData.goodsType)) { if (!res.find(v => v.categoryType === this.editData.goodsType)) {
this.editData.goodsType = '' this.editData.goodsType = ''
} }
console.log(this.editData) console.log(this.editData)
......
...@@ -217,7 +217,6 @@ export default { ...@@ -217,7 +217,6 @@ export default {
this.baseData.scenCodeList.unshift(allOpt) this.baseData.scenCodeList.unshift(allOpt)
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => { getProductTypeBySceneId({ sceneType: '' }).then(res => {
this.searchForm.goodsType = ''
this.baseData.productTypeList = res this.baseData.productTypeList = res
this.getBaseData() this.getBaseData()
}) })
...@@ -230,9 +229,8 @@ export default { ...@@ -230,9 +229,8 @@ export default {
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
async getBaseData() { async getBaseData() {
// this.baseData.productTypeList = deepClone(await this.get(BaseData.productType))
this.baseData.productTypeList.unshift({ this.baseData.productTypeList.unshift({
id: '', categoryType: '',
categoryName: '全部' categoryName: '全部'
}) })
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
...@@ -247,6 +245,8 @@ export default { ...@@ -247,6 +245,8 @@ export default {
// 根据所选场景获取类目 // 根据所选场景获取类目
handleChangeSelect(value) { handleChangeSelect(value) {
this.searchForm.goodsType = ''
this.baseData.productTypeList = []
getProductTypeBySceneId({ sceneType: value }).then(res => { getProductTypeBySceneId({ sceneType: value }).then(res => {
this.baseData.productTypeList = res this.baseData.productTypeList = res
this.getBaseData() this.getBaseData()
......
<!-- 质保卡 -->
<template>
<d2-dialog title="质保卡配置"
:is-visible="warrantyCardVisible"
class="accountDailog"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="container">
<h4>控制小程序订单是否显示二维码</h4>
<div>
<img src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/showpng.png"
class="img"
alt="">
</div>
<el-radio-group v-model="infoForm.cardCodeFlag">
<el-radio :label="0">订单显示</el-radio>
<el-radio :label="1">订单不显示</el-radio>
</el-radio-group>
</div>
</d2-dialog>
</template>
<script>
import { getBaseInfo, 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
}
// formRules: {
// cardCodeFlag: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
// }
}
},
props: {
warrantyCardVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
components: {},
mounted() {
if (this.recordInfo) {
this.getInfo(this.recordInfo.merchantId)
}
},
methods: {
getInfo(merchantId) {
getBaseInfo({ merchantId: merchantId }).then(res => {
this.infoForm.cardCodeFlag = res.cardCodeFlag || 0
})
},
handleAddConfirm() {
var params = deepClone(this.infoForm)
params.merchantId = this.recordInfo.merchantId
updateCardCodeFlag(params).then(res => {
this.notice.okTips('操作成功')
this.handleClose(true)
})
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style scoped>
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.img {
display: inline-block;
width: 250px;
height: 350px;
/* object-fit: cover; */
}
.dateItem {
display: flex;
}
.dateItem .el-form-item__content {
display: flex;
margin-left: 0 !important;
}
.accountDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
</style>
...@@ -25,20 +25,20 @@ ...@@ -25,20 +25,20 @@
</d2-table-header> </d2-table-header>
<!-- :get-list-api="getListApi" --> <!-- :get-list-api="getListApi" -->
<d2-table ref="merchantTable" <d2-table ref="merchantTable"
:tableData="restructureList" :table-data="restructureList"
:search-form="searchForm" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:hasNum="false" :has-num="false"
:tableTotal="total" :table-total="total"
:arraySpanMethod="arraySpanMethod" :array-span-method="arraySpanMethod"
@refreshTable="jumpPage"> @refreshTable="jumpPage">
<el-button type="text" />
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope" slot-scope="scope"
v-if="scope.scope.scene"> v-if="scope.scope.scene">
<auth-button slot="auth-button" <auth-button slot="auth-button"
:data="scope.scope" /> :data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
<relate-store-mer-dialog v-if="relateStoreVisible" <relate-store-mer-dialog v-if="relateStoreVisible"
...@@ -219,6 +219,10 @@ ...@@ -219,6 +219,10 @@
:store-selected="storeSelected" :store-selected="storeSelected"
@handleRelateConfirm="handleRelateConfirm" @handleRelateConfirm="handleRelateConfirm"
@handleRelateClose="handleRelateClose" /> @handleRelateClose="handleRelateClose" />
<warranty-card-dialog v-if="warrantyCardVisible"
:warranty-card-visible="warrantyCardVisible"
:record-info="recordInfo"
@dialogClose="closeWarrantyCard" />
</d2-container> </d2-container>
</template> </template>
...@@ -247,6 +251,7 @@ import { ...@@ -247,6 +251,7 @@ import {
} from "@/common/constants.js" } from "@/common/constants.js"
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"
export default { export default {
name: "MerchantManage", name: "MerchantManage",
...@@ -255,7 +260,8 @@ export default { ...@@ -255,7 +260,8 @@ export default {
relateStoreMerDialog, relateStoreMerDialog,
financialRulesDetail, financialRulesDetail,
// QRcodeDialog // QRcodeDialog
relateMerDialog relateMerDialog,
warrantyCardDialog
}, },
data() { data() {
return { return {
...@@ -340,7 +346,7 @@ export default { ...@@ -340,7 +346,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'sceneTypeList' optionsName: 'sceneTypeList'
}, }
], ],
getListApi: getList, getListApi: getList,
showData: {}, showData: {},
...@@ -574,7 +580,7 @@ export default { ...@@ -574,7 +580,7 @@ export default {
confId: 3, confId: 3,
confLabel: '1.3售后直播众筹活动' confLabel: '1.3售后直播众筹活动'
} }
], ]
}, },
defaultProps: { defaultProps: {
children: "childs", children: "childs",
...@@ -591,17 +597,19 @@ export default { ...@@ -591,17 +597,19 @@ export default {
rowData: {}, rowData: {},
/** 合并参数start */ /** 合并参数start */
spanArr1: [], //合并序列 spanArr1: [], // 合并序列
spanIndex1: 0, //合并序列索引 spanIndex1: 0, // 合并序列索引
spanArr2: [], //合并流量方名称 spanArr2: [], // 合并流量方名称
spanIndex2: 0, //合并流量方名称索引 spanIndex2: 0, // 合并流量方名称索引
spanArr3: [], //合并流量方商户号 spanArr3: [], // 合并流量方商户号
spanIndex3: 0, //合并流量方商户号索引 spanIndex3: 0, // 合并流量方商户号索引
spanArr4: [], //合并渠道 spanArr4: [], // 合并渠道
spanIndex4: 0, //合并渠道索引 spanIndex4: 0, // 合并渠道索引
/** 合并参数end */ /** 合并参数end */
relateVisible: false relateVisible: false,
warrantyCardVisible: false, // 质保卡弹窗
recordInfo: {}
} }
}, },
watch: { watch: {
...@@ -654,6 +662,7 @@ export default { ...@@ -654,6 +662,7 @@ export default {
}, },
// 财务 // 财务
handleDetail(row) { handleDetail(row) {
console.log(row, 'row')
this.close({ tagName: "/merchantDetail" }) this.close({ tagName: "/merchantDetail" })
this.$router.push({ this.$router.push({
name: "merchantDetail", name: "merchantDetail",
...@@ -1013,7 +1022,7 @@ export default { ...@@ -1013,7 +1022,7 @@ export default {
...params ...params
} }
getList(params).then(res => { getList(params).then(res => {
console.log(res); console.log(res)
this.page.currentPage = res.pageNum this.page.currentPage = res.pageNum
this.page.pageSize = res.pageSize this.page.pageSize = res.pageSize
this.total = res.total this.total = res.total
...@@ -1035,55 +1044,54 @@ export default { ...@@ -1035,55 +1044,54 @@ export default {
return item return item
}) })
this.restructureList = dataList.reduce((prev, cur, index, arr) => { this.restructureList = dataList.reduce((prev, cur, index, arr) => {
let sceneList = cur.sceneList const sceneList = cur.sceneList
delete cur.sceneList delete cur.sceneList
if (sceneList && sceneList.length > 0) { if (sceneList && sceneList.length > 0) {
sceneList.map((item) => { sceneList.map((item) => {
prev.push({ prev.push({
...item, ...item,
...cur, ...cur
}) })
}) })
} else { } else {
prev.push(cur) prev.push(cur)
} }
return prev return prev
}, []) }, [])
console.log(this.restructureList); console.log(this.restructureList)
this.merge(this.restructureList) this.merge(this.restructureList)
} }
}, },
// 初始化合并行数组 // 初始化合并行数组
mergeInit() { mergeInit() {
this.spanArr1 = []; //合并序列 this.spanArr1 = [] // 合并序列
this.spanIndex1 = 0; //合并序列索引 this.spanIndex1 = 0 // 合并序列索引
this.spanArr2 = []; //合并流量方名称 this.spanArr2 = [] // 合并流量方名称
this.spanIndex2 = 0; //合并流量方名称索引 this.spanIndex2 = 0 // 合并流量方名称索引
this.spanArr3 = []; //合并流量方商户号 this.spanArr3 = [] // 合并流量方商户号
this.spanIndex3 = 0; //合并流量方商户号索引 this.spanIndex3 = 0 // 合并流量方商户号索引
this.spanArr4 = []; //合并渠道 this.spanArr4 = [] // 合并渠道
this.spanIndex4 = 0; //合并渠道索引 this.spanIndex4 = 0 // 合并渠道索引
}, },
// 合并表格 // 合并表格
merge(data) { merge(data) {
this.mergeInit(); this.mergeInit()
if (data.length > 0) { if (data.length > 0) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (i === 0) { if (i === 0) {
//第一行必须存在,以第一行为基准 // 第一行必须存在,以第一行为基准
this.spanArr1.push(1); //合并序列 this.spanArr1.push(1) // 合并序列
this.spanIndex1 = 0; this.spanIndex1 = 0
this.spanArr2.push(1); //合并流量方名称 this.spanArr2.push(1) // 合并流量方名称
this.spanIndex2 = 0; this.spanIndex2 = 0
this.spanArr3.push(1); //合并流量方商户号 this.spanArr3.push(1) // 合并流量方商户号
this.spanIndex3 = 0; this.spanIndex3 = 0
this.spanArr4.push(1); //合并渠道 this.spanArr4.push(1) // 合并渠道
this.spanIndex4 = 0; this.spanIndex4 = 0
} else { } else {
// 判断当前元素与上一元素是否相同 // 判断当前元素与上一元素是否相同
// // 合并序列 // // 合并序列
...@@ -1108,25 +1116,24 @@ export default { ...@@ -1108,25 +1116,24 @@ export default {
// 根据id判断固定合并前面4列 // 根据id判断固定合并前面4列
if (data[i].merchantId == data[i - 1].merchantId) { if (data[i].merchantId == data[i - 1].merchantId) {
this.spanArr1[this.spanIndex1] += 1; this.spanArr1[this.spanIndex1] += 1
this.spanArr1.push(0); this.spanArr1.push(0)
this.spanArr2[this.spanIndex2] += 1; this.spanArr2[this.spanIndex2] += 1
this.spanArr2.push(0); this.spanArr2.push(0)
this.spanArr3[this.spanIndex3] += 1; this.spanArr3[this.spanIndex3] += 1
this.spanArr3.push(0); this.spanArr3.push(0)
this.spanArr4[this.spanIndex4] += 1; this.spanArr4[this.spanIndex4] += 1
this.spanArr4.push(0); this.spanArr4.push(0)
} else { } else {
this.spanArr1.push(1); this.spanArr1.push(1)
this.spanIndex1 = i; this.spanIndex1 = i
this.spanArr2.push(1); this.spanArr2.push(1)
this.spanIndex2 = i; this.spanIndex2 = i
this.spanArr3.push(1); this.spanArr3.push(1)
this.spanIndex3 = i; this.spanIndex3 = i
this.spanArr4.push(1); this.spanArr4.push(1)
this.spanIndex4 = i; this.spanIndex4 = i
} }
} }
} }
} }
...@@ -1134,48 +1141,48 @@ export default { ...@@ -1134,48 +1141,48 @@ export default {
// 合并单元格 // 合并单元格
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
const len = this.restructureList.length; const len = this.restructureList.length
// const t = this.columns.length // const t = this.columns.length
const t = 12 const t = 12
if (columnIndex === 0) { if (columnIndex === 0) {
//第一列 序号 // 第一列 序号
const _row_1 = this.spanArr1[rowIndex]; const _row_1 = this.spanArr1[rowIndex]
const _col_1 = _row_1 > 0 ? 1 : 0; const _col_1 = _row_1 > 0 ? 1 : 0
return { return {
rowspan: _row_1, rowspan: _row_1,
colspan: _col_1, colspan: _col_1
}; }
} else if (columnIndex === 1) { } else if (columnIndex === 1) {
// 第二列 流量方名称 // 第二列 流量方名称
const _row_2 = this.spanArr2[rowIndex]; const _row_2 = this.spanArr2[rowIndex]
const _col_2 = _row_2 > 0 ? 1 : 0; const _col_2 = _row_2 > 0 ? 1 : 0
return { return {
rowspan: _row_2, rowspan: _row_2,
colspan: _col_2, colspan: _col_2
}; }
// 第三列 流量方商户号 // 第三列 流量方商户号
} else if (columnIndex === 2) { } else if (columnIndex === 2) {
const _row_3 = this.spanArr3[rowIndex]; const _row_3 = this.spanArr3[rowIndex]
const _col_3 = _row_3 > 0 ? 1 : 0; const _col_3 = _row_3 > 0 ? 1 : 0
return { return {
rowspan: _row_3, rowspan: _row_3,
colspan: _col_3, colspan: _col_3
}; }
// 第四列 渠道 // 第四列 渠道
} else if (columnIndex === 3) { } else if (columnIndex === 3) {
const _row_4 = this.spanArr4[rowIndex]; const _row_4 = this.spanArr4[rowIndex]
const _col_4 = _row_4 > 0 ? 1 : 0; const _col_4 = _row_4 > 0 ? 1 : 0
return { return {
rowspan: _row_4, rowspan: _row_4,
colspan: _col_4, colspan: _col_4
}; }
} else if (columnIndex === t) { } else if (columnIndex === t) {
const _row_6 = len; const _row_6 = len
const _col_6 = 1; const _col_6 = 1
return { return {
rowspan: _row_6, rowspan: _row_6,
colspan: _col_6, colspan: _col_6
}; }
} else if (rowIndex === len) { } else if (rowIndex === len) {
return { return {
rowspan: 1, rowspan: 1,
...@@ -1184,7 +1191,7 @@ export default { ...@@ -1184,7 +1191,7 @@ export default {
} }
}, },
//商户关联 // 商户关联
handleMerchantRelate() { handleMerchantRelate() {
this.relateVisible = true this.relateVisible = true
}, },
...@@ -1199,6 +1206,19 @@ export default { ...@@ -1199,6 +1206,19 @@ export default {
this.queryList() this.queryList()
} }
}, },
// 打开质保卡弹窗
setWarrantyCard(row) {
this.warrantyCardVisible = !this.warrantyCardVisible
this.recordInfo = row
console.log('this.recordInfo', this.recordInfo)
},
// 关闭质保卡弹窗
closeWarrantyCard(flag) {
this.warrantyCardVisible = !this.warrantyCardVisible
flag && this.queryList()
}
} }
} }
</script> </script>
......
...@@ -184,6 +184,7 @@ export default { ...@@ -184,6 +184,7 @@ export default {
getAdminInfo({}).then(res => { getAdminInfo({}).then(res => {
this.adminInfo = res this.adminInfo = res
}) })
console.log(this.$route.params.merchantId)
if (this.$route.params.merchantId) { if (this.$route.params.merchantId) {
// console.log(this.$route.params) // console.log(this.$route.params)
// this.merchantItem = { // this.merchantItem = {
...@@ -194,8 +195,24 @@ export default { ...@@ -194,8 +195,24 @@ export default {
// parentMerchantName: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantName : '', // parentMerchantName: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantName : '',
// parentMerchantId: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantId : '' // parentMerchantId: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantId : ''
// } // }
const { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName } = this.$route.params console.log(this.$route.params, 'this.$route.params')
const merchantItem = { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName } // 兼容修复v3.2 版本数据结构问题
// debugger
const { merchantId, merchantName, channelType, userType, serviceList, yqMerchant } = this.$route.params
const merchantItem = { merchantId, merchantName, channelType, userType }
if (yqMerchant) {
merchantItem.yqMerchantId = yqMerchant.merchantId
merchantItem.yqMerchantName = yqMerchant.merchantName
}
if (serviceList) {
if (serviceList.length == 1) {
merchantItem.parentMerchantId = serviceList[0].merchantId
merchantItem.parentMerchantName = serviceList[0].merchantName
} else {
merchantItem.partnerMerchants = serviceList
}
}
// const { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName } = this.$route.params
Object.assign(this.form, merchantItem) Object.assign(this.form, merchantItem)
sessionStorage.setItem(this.sessionName, JSON.stringify(merchantItem)) sessionStorage.setItem(this.sessionName, JSON.stringify(merchantItem))
this.getRuleProgress(this.$route.params.merchantId) this.getRuleProgress(this.$route.params.merchantId)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!