Commit a0488d68 by 张立顺

feta: 接口对接

1 parent 1962defe
...@@ -62,6 +62,7 @@ export function getAdminInfo(data) { ...@@ -62,6 +62,7 @@ export function getAdminInfo(data) {
return request(data, 'post') return request(data, 'post')
} }
/** 根据商户号获取商户的财务结算规则 */
export function getAccountRule(data) { export function getAccountRule(data) {
data.method = `${path2}merchantSettleAccountRule.get.byMerchantId` data.method = `${path2}merchantSettleAccountRule.get.byMerchantId`
return request(data, 'post') return request(data, 'post')
......
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table <el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData" :data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading" v-loading="loading"
...@@ -10,70 +9,60 @@ ...@@ -10,70 +9,60 @@
:highlight-current-row="true" :highlight-current-row="true"
@sort-change="sortChange" @sort-change="sortChange"
@selection-change="handleSelect" @selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}" :tree-props="{children: 'upgradeGoodsList'}">
> <el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
width="55" width="55"
:reserve-selection="true" :reserve-selection="true">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="hasNum"
v-if="hasNum"
align="center" align="center"
width="60px" width="60px"
label="序号" label="序号"
type='index' type='index'
:index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1" :index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1">
></el-table-column> </el-table-column>
<el-table-column <el-table-column v-for="(item, index) in tableParams.tableColumns"
v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
:width="item.width" :width="item.width"
:min-width="item.minWidth" :min-width="item.minWidth"
:align="item.align||'center'" :align="item.align||'center'"
:sortable="item.sortable" :sortable="item.sortable">
>
<template slot="header"> <template slot="header">
<span>{{item.label}}</span> <span>{{item.label}}</span>
<table-head-search <table-head-search v-if="item.optionConfig"
v-if="item.optionConfig"
:searchForm="headSearchForm" :searchForm="headSearchForm"
:optionConfig="item.optionConfig" :optionConfig="item.optionConfig"
:baseData="baseData" :baseData="baseData"
@handleTableHeadChange="handleTableHeadChange" @handleTableHeadChange="handleTableHeadChange"></table-head-search>
></table-head-search>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot v-if="item.addHtml"
v-if="item.addHtml"
:name="item.addHtml" :name="item.addHtml"
:scope="scope.row" :scope="scope.row"
:prop="item.prop" :prop="item.prop"
:width="item.width" :width="item.width"></slot>
></slot>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag <el-tag v-if="!item.tagName"
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" v-text="tableParams.tag.label[scope.row[item.prop]]">
>
</el-tag> </el-tag>
<el-tag <el-tag v-else
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" v-text="tableParams[item.tagName].label[scope.row[item.prop]]"></el-tag>
></el-tag>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-text="item.formatter(scope.row)"></span> <span v-if="item.html"
v-html="item.formatter(scope.row)"></span>
<span v-else
v-text="item.formatter(scope.row)"></span>
</template> </template>
<template v-else-if="getListApi"> <template v-else-if="getListApi">
<span v-if="item.prefix">{{item.prefix}}</span> <span v-if="item.prefix">{{item.prefix}}</span>
<span v-if="item.parentProp">{{scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : ''}}</span> <span
v-if="item.parentProp">{{scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : ''}}</span>
<span v-else>{{scope.row[item.prop]}}</span> <span v-else>{{scope.row[item.prop]}}</span>
</template> </template>
<template v-else> <template v-else>
...@@ -84,23 +73,18 @@ ...@@ -84,23 +73,18 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="tableParams.tableOption"
v-if="tableParams.tableOption"
label="操作" label="操作"
fixed="right" fixed="right"
:align="tableParams.tableOption.align||'center'" :align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'auto'" :width="tableParams.tableOption.width||'auto'">
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot name="auth-button"
name="auth-button" :scope="scope.row"></slot>
:scope="scope.row"
></slot>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination v-if="hasPage"
v-if="hasPage"
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -108,8 +92,7 @@ ...@@ -108,8 +92,7 @@
:page-sizes="[10,20,30,40]" :page-sizes="[10,20,30,40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" :layout="layout">
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
...@@ -155,7 +138,7 @@ export default { ...@@ -155,7 +138,7 @@ export default {
// 选项列表Obj // 选项列表Obj
baseData: { baseData: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 表格头部搜索条件 - end // 表格头部搜索条件 - end
// 表格数据-外部传入 // 表格数据-外部传入
......
<!-- 下载对账单 --> <!-- 下载对账单 -->
<template> <template>
<div>
<d2-dialog title="下载对账单" <d2-dialog title="下载对账单"
:isVisible="accountVisible" :isVisible="accountVisible"
class="accountDailog"
width="40%" width="40%"
btnOkLabel="确定下载" btnOkLabel="确定下载"
@closeDialog="handleClose" @closeDialog="handleClose"
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
</div>
</template> </template>
<script> <script>
import { import {
// BaseData, // BaseData,
rangePickerOptions} from '@/common/constants.js' rangePickerOptions
} from '@/common/constants.js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import * as api from '@api/finance' import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount' import { getMerchantPageSearch } from '@api/publicAccount'
...@@ -352,7 +352,7 @@ export default { ...@@ -352,7 +352,7 @@ export default {
} }
/*下拉选择框-多选-内容过长-用...代替 end */ /*下拉选择框-多选-内容过长-用...代替 end */
.el-select-dropdown__item { .accountDailog .el-select-dropdown__item {
width: 395px !important; width: 395px !important;
} }
</style> </style>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="C端零售业务" <el-tab-pane label="C端零售业务"
name="second" name="second"
disabled="true">配置管理</el-tab-pane> :disabled="true">配置管理</el-tab-pane>
</el-tabs> </el-tabs>
</d2-dialog> </d2-dialog>
<!-- <division-rule <!-- <division-rule
...@@ -219,15 +219,37 @@ export default { ...@@ -219,15 +219,37 @@ export default {
width: '120px' width: '120px'
}, { }, {
label: '关联服务商名称', label: '关联服务商名称',
prop: 'merchantName', prop: 'partnerMerchants',
html: true,
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantName : '' // return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantName : ''
// return `<p>test</p><p>test</p>`
if (cellValue.partnerMerchants) {
return cellValue.partnerMerchants.reduce((merchString, item) => {
merchString = merchString + `<p>${item.merchantName}</p>`
return merchString
// return item.merchantName
}, '')
} else {
return ''
}
// console.log(cellValue.partnerMerchants&&)
} }
}, { }, {
label: '关联服务商号', label: '关联服务商号',
prop: 'merchantId', prop: 'merchantId',
html: true,
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantId : '' // return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantId : ''
if (cellValue.partnerMerchants) {
return cellValue.partnerMerchants.reduce((merchString, item) => {
merchString = merchString + `<p>${item.merchantId}</p>`
return merchString
// return item.merchantName
}, '')
} else {
return ''
}
} }
}, { }, {
label: '分账类型', label: '分账类型',
......
...@@ -91,8 +91,8 @@ ...@@ -91,8 +91,8 @@
<el-button type="primary" <el-button type="primary"
v-show="isShowOkbtn" v-show="isShowOkbtn"
:size="size" :size="size"
@click="handleConfirm" @click="handleConfirm">确认</el-button>
:disabled="isFirstSetEdit || isSecondSetEdit">确认</el-button> <!-- :disabled="isFirstSetEdit || isSecondSetEdit" -->
<el-button :size="size" <el-button :size="size"
@click="handleCancel">取消</el-button> @click="handleCancel">取消</el-button>
</div> </div>
...@@ -106,14 +106,12 @@ import stepTwo from './stepTwo' ...@@ -106,14 +106,12 @@ import stepTwo from './stepTwo'
import stepThree from './stepThree' import stepThree from './stepThree'
import stepFour from './stepFour' import stepFour from './stepFour'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
// getPartnerByYq
import { getRuleProgressApi, sendSms, getAdminInfo } from '@api/merchant' import { getRuleProgressApi, sendSms, getAdminInfo } from '@api/merchant'
import { BaseData, userType, ghUserType } from '@/common/constants.js' import { BaseData, userType, ghUserType } from '@/common/constants.js'
export default { export default {
data() { data() {
return { return {
// 编辑按钮
isFirstSetEdit: false,
isSecondSetEdit: false,
// 缓存当前merchantId // 缓存当前merchantId
sessionName: 'applyAccMerchant', sessionName: 'applyAccMerchant',
size: 'small', size: 'small',
...@@ -147,10 +145,7 @@ export default { ...@@ -147,10 +145,7 @@ export default {
ghUserType: ghUserType ghUserType: ghUserType
}, },
isShowOkbtn: true, isShowOkbtn: true,
num: 0, num: 0
// 编辑按钮
isFirstSetEdit: false,
isSecondSetEdit: false
} }
}, },
...@@ -173,21 +168,27 @@ export default { ...@@ -173,21 +168,27 @@ export default {
}) })
if (this.$route.params.merchantId) { if (this.$route.params.merchantId) {
// console.log(this.$route.params) // console.log(this.$route.params)
this.merchantItem = { // this.merchantItem = {
merchantId: this.$route.params.merchantId, // merchantId: this.$route.params.merchantId,
merchantName: this.$route.params.merchantName, // merchantName: this.$route.params.merchantName,
channelType: this.$route.params.channelType, // channelType: this.$route.params.channelType,
userType: this.$route.params.userType, // userType: this.$route.params.userType,
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 : ''
} // }
Object.assign(this.form, this.merchantItem) const { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName } = this.$route.params
sessionStorage.setItem(this.sessionName, JSON.stringify(this.merchantItem)) const merchantItem = { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName }
Object.assign(this.form, merchantItem)
sessionStorage.setItem(this.sessionName, JSON.stringify(merchantItem))
this.getRuleProgress(this.$route.params.merchantId) this.getRuleProgress(this.$route.params.merchantId)
} else { } else {
Object.assign(this.form, JSON.parse(sessionStorage.getItem(this.sessionName))) Object.assign(this.form, JSON.parse(sessionStorage.getItem(this.sessionName)))
this.getRuleProgress(this.form.merchantId) this.getRuleProgress(this.form.merchantId)
} }
// 获取园区店对应的多服务商
this.getPartnerByYqList()
this.getBaseData() this.getBaseData()
}, },
...@@ -196,6 +197,9 @@ export default { ...@@ -196,6 +197,9 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
getPartnerByYqList() {
},
async getBaseData() { async getBaseData() {
this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType)) this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType))
...@@ -206,13 +210,13 @@ export default { ...@@ -206,13 +210,13 @@ export default {
// this.getRuleProgress(this.form.merchantId, true, 3, (this.num % 2) ? 11 : 35) // this.getRuleProgress(this.form.merchantId, true, 3, (this.num % 2) ? 11 : 35)
this.getRuleProgress(this.form.merchantId, true, 3) this.getRuleProgress(this.form.merchantId, true, 3)
}, },
// 财务-步骤 // 财务-步骤
getRuleProgress(merchantId, isJump = true, nextPage) { getRuleProgress(merchantId, isJump = true, nextPage) {
getRuleProgressApi({ merchantId: merchantId }).then(res => { getRuleProgressApi({ merchantId: merchantId }).then(res => {
// console.log(res) // console.log(res)
// console.log(isJump)
this.ruleForm = res this.ruleForm = res
isJump ? (this.stepStat = res.progress) : this.handleStep(nextPage) isJump ? (this.stepStat = res ? res.progress : 1) : this.handleStep(nextPage)
}) })
}, },
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
<div style="height: 50%;"> <div style="height: 50%;">
<p style="padding-top: 20px;" <p style="padding-top: 20px;"
class="one-line-ellipsis">平台方:嘀加智慧云</p> class="one-line-ellipsis">平台方:dijiaWisdomCloud</p>
<p class="card-tips"> <p class="card-tips">
占{{merchantInfo.settleAccountRule ? (100 - merchantInfo.settleAccountRule.partnerProfitPer) : '100'}}% 占{{merchantInfo.settleAccountRule ? (100 - merchantInfo.settleAccountRule.partnerProfitPer) : '100'}}%
</p> </p>
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<div class="view-detail"> <div class="view-detail">
<div class="header-block"> <div class="header-block">
<el-row> <el-row>
<el-col :span="12">分账类型:{{form.autoFlag === 'N' ? '线下对账' : '线上分账'}}</el-col> <el-col :span="8">分账类型:{{form.autoFlag === 'N' ? '线下对账' : '线上分账'}}</el-col>
<el-col :span="8">自动打款:{{form.autoFlag === 'N' ? '关闭' : '开启'}}</el-col>
<el-col v-show="form.settleTimeType && form.autoFlag !== 'N'" <el-col v-show="form.settleTimeType && form.autoFlag !== 'N'"
:span="12">分账周期: :span="8">分账周期:
<span v-if="form.settleTimeType === 1">T+{{form.settleTime}}</span> <span v-if="form.settleTimeType === 1">T+{{form.settleTime}}</span>
<span v-else>每月{{form.settleTime}}号</span> <span v-else>每月{{form.settleTime}}号</span>
</el-col> </el-col>
...@@ -123,9 +124,59 @@ ...@@ -123,9 +124,59 @@
<td>创建时间:{{needTransformObj.yqCreatedDate}}</td> <td>创建时间:{{needTransformObj.yqCreatedDate}}</td>
</tr> </tr>
</table> </table>
<div v-show="merchantInfo.partnerMerchant"> <div v-show="merchantInfo.partnerMerchants">
<p class="edit-sub-title m-t-10">关联的服务商基础信息</p> <p class="edit-sub-title m-t-10">关联的服务商基础信息</p>
<table cellpadding='0' <table cellpadding='0'
cellspacing='0'
style="border-width: 0px 0px 1px 1px;">
<tr class="txt-center">
<td>分账品类</td>
<td>分润比例</td>
</tr>
<tr class="txt-center"
v-show="!settleRuleList.length">
<td>无</td>
<td>无</td>
</tr>
<tr v-for="(item, index) in settleRuleList"
:key="index"
class="txt-center">
<td>{{item.goodsTypeName}}</td>
<td>{{item.partnerProfitPer}}%</td>
</tr>
</table>
<!-- 单园区店回显 -->
<table cellpadding='0'
v-if="merchantInfo.partnerSettleAccountModel == 1"
cellspacing='0'>
<tr>
<th>
商户编号:{{merchantInfo.singlePartnerMerchant ? merchantInfo.singlePartnerMerchant.merchantId : ''}}
</th>
<th class="ellipsis w-298"
:title="merchantInfo.singlePartnerMerchant ? merchantInfo.singlePartnerMerchant.merchantName : ''">
商户名称:{{merchantInfo.singlePartnerMerchant ? merchantInfo.singlePartnerMerchant.merchantName : ''}}
</th>
<th class="w-140">
联系人:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.contactName : ''}}
</th>
<th>
联系电话:{{merchantInfo.singlePartnerMerchant ? merchantInfo.singlePartnerMerchant.phone : ''}}
</th>
</tr>
<tr>
<td colspan="3">地址:{{needTransformObj.parentAddr}}</td>
<td>创建时间:{{needTransformObj.parentCreatedDate}}</td>
</tr>
</table>
<!-- 多园区店回显 -->
<div v-if="merchantInfo.partnerSettleAccountModel == 2">
<p>安装费用:按固定金额200元</p>
<table cellpadding='0'
v-if="merchantInfo.partnerSettleAccountModel == 1"
cellspacing='0'> cellspacing='0'>
<tr> <tr>
<th>商户编号:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.merchantId : ''}} <th>商户编号:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.merchantId : ''}}
...@@ -144,27 +195,31 @@ ...@@ -144,27 +195,31 @@
<td>创建时间:{{needTransformObj.parentCreatedDate}}</td> <td>创建时间:{{needTransformObj.parentCreatedDate}}</td>
</tr> </tr>
</table> </table>
<p><span>营销费用:按订单收入30%</span> <span>奖惩费用:服务商总分润-安装费用-营销费用</span></p>
<table cellpadding='0' <table cellpadding='0'
cellspacing='0' v-if="merchantInfo.partnerSettleAccountModel == 1"
style="border-width: 0px 0px 1px 1px;"> cellspacing='0'>
<tr class="txt-center"> <tr>
<td>分账品类</td> <th>商户编号:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.merchantId : ''}}
<td>分润比例</td> </th>
</tr> <th class="ellipsis w-298"
<tr class="txt-center" :title="merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.merchantName : ''">
v-show="!settleRuleList.length"> 商户名称:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.merchantName : ''}}
<td>无</td> </th>
<td>无</td> <th class="w-140">
联系人:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.contactName : ''}}
</th>
<th>联系电话:{{merchantInfo.partnerMerchant ? merchantInfo.partnerMerchant.phone : ''}}</th>
</tr> </tr>
<tr v-for="(item, index) in settleRuleList" <tr>
:key="index" <td colspan="3">地址:{{needTransformObj.parentAddr}}</td>
class="txt-center"> <td>创建时间:{{needTransformObj.parentCreatedDate}}</td>
<td>{{item.goodsTypeName}}</td>
<td>{{item.partnerProfitPer}}%</td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -173,6 +228,16 @@ import { getAccountRule, getDivisionRuleApi, entrydateUpdate } from '@api/mercha ...@@ -173,6 +228,16 @@ import { getAccountRule, getDivisionRuleApi, entrydateUpdate } from '@api/mercha
import { userType, ghUserType, merchantClassifyList, deductChargeFlagObj } from '@/common/constants' import { userType, ghUserType, merchantClassifyList, deductChargeFlagObj } from '@/common/constants'
export default { export default {
name: 'viewDetail', name: 'viewDetail',
props: {
viewDetailVisible: {
type: Boolean,
default: false
},
merchantInfo: {
type: Object,
default: () => { }
}
},
data() { data() {
return { return {
form: { form: {
...@@ -222,17 +287,23 @@ export default { ...@@ -222,17 +287,23 @@ export default {
} }
}, },
props: { computed: {
viewDetailVisible: { severType: {
type: Boolean, get() {
default: false const list = this.merchantInfo.partnerMerchants
const type = this.merchantInfo.partnerSettleAccountModel
// this.merchantInfo.partnerMerchants.length
if (list && list.length && type) {
return type
} else {
return false
}
}, },
merchantInfo: { set(val) {
type: Object, // this.$emit('update:isShow', false)
default: () => { } }
} }
}, },
watch: { watch: {
viewDetailVisible(newVal, val) { viewDetailVisible(newVal, val) {
newVal && this.getDetail() newVal && this.getDetail()
...@@ -240,7 +311,6 @@ export default { ...@@ -240,7 +311,6 @@ export default {
}, },
mounted() { mounted() {
this.getDetail()
}, },
methods: { methods: {
...@@ -251,10 +321,11 @@ export default { ...@@ -251,10 +321,11 @@ export default {
createdDate: this.merchantInfo.merchant ? (this.merchantInfo.merchant.createdDate ? Util.dateFormate(this.merchantInfo.merchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '', createdDate: this.merchantInfo.merchant ? (this.merchantInfo.merchant.createdDate ? Util.dateFormate(this.merchantInfo.merchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '',
yqAddr: this.merchantInfo.yqMerchant ? ((this.merchantInfo.yqMerchant.provinceName || '') + (this.merchantInfo.yqMerchant.cityName || '') + (this.merchantInfo.yqMerchant.areaName || '') + (this.merchantInfo.yqMerchant.address || '')) : '', yqAddr: this.merchantInfo.yqMerchant ? ((this.merchantInfo.yqMerchant.provinceName || '') + (this.merchantInfo.yqMerchant.cityName || '') + (this.merchantInfo.yqMerchant.areaName || '') + (this.merchantInfo.yqMerchant.address || '')) : '',
yqCreatedDate: this.merchantInfo.yqMerchant ? (this.merchantInfo.yqMerchant.createdDate ? Util.dateFormate(this.merchantInfo.yqMerchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '', yqCreatedDate: this.merchantInfo.yqMerchant ? (this.merchantInfo.yqMerchant.createdDate ? Util.dateFormate(this.merchantInfo.yqMerchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '',
parentAddr: this.merchantInfo.partnerMerchant ? ((this.merchantInfo.partnerMerchant.provinceName || '') + (this.merchantInfo.partnerMerchant.cityName || '') + (this.merchantInfo.partnerMerchant.areaName || '') + (this.merchantInfo.partnerMerchant.address || '')) : '', parentAddr: this.merchantInfo.singlePartnerMerchant ? ((this.merchantInfo.singlePartnerMerchant.provinceName || '') + (this.merchantInfo.singlePartnerMerchant.cityName || '') + (this.merchantInfo.singlePartnerMerchant.areaName || '') + (this.merchantInfo.singlePartnerMerchant.address || '')) : '',
parentCreatedDate: this.merchantInfo.partnerMerchant ? (this.merchantInfo.partnerMerchant.createdDate ? Util.dateFormate(this.merchantInfo.partnerMerchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '', parentCreatedDate: this.merchantInfo.singlePartnerMerchant ? (this.merchantInfo.singlePartnerMerchant.createdDate ? Util.dateFormate(this.merchantInfo.singlePartnerMerchant.createdDate, 'YYYY-MM-DD HH:mm:ss') : '') : '',
entryDate: this.merchantInfo.merchant ? (this.merchantInfo.merchant.entryDate ? Util.dateFormate(this.merchantInfo.merchant.entryDate, 'YYYY-MM-DD') : '') : '' entryDate: this.merchantInfo.merchant ? (this.merchantInfo.merchant.entryDate ? Util.dateFormate(this.merchantInfo.merchant.entryDate, 'YYYY-MM-DD') : '') : ''
} }
console.log(Util.dateFormate(this.merchantInfo.merchant.entryDate, 'YYYY-MM-DD'))
getDivisionRuleApi({ merchantId: this.merchantInfo.merchantId }).then(res => { getDivisionRuleApi({ merchantId: this.merchantInfo.merchantId }).then(res => {
this.hasDivision = !!res this.hasDivision = !!res
this.divisionForm = res || {} this.divisionForm = res || {}
...@@ -265,6 +336,7 @@ export default { ...@@ -265,6 +336,7 @@ export default {
2: 'partnerMerchant', 2: 'partnerMerchant',
3: 'merchant' 3: 'merchant'
} }
console.log(res)
res && flagList.forEach(item => { res && flagList.forEach(item => {
this.divisionList[numToDivisionList[res[item]]].push(this.flagTodivisionObj[item]) this.divisionList[numToDivisionList[res[item]]].push(this.flagTodivisionObj[item])
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!