Commit 4f7ac27a by 张立顺

feat:v4.9.0 需求开发

1 parent 38219f37
...@@ -67,3 +67,9 @@ export function getAreaInfoByOpenAccBankTypeApi(data) { ...@@ -67,3 +67,9 @@ export function getAreaInfoByOpenAccBankTypeApi(data) {
data.method = `${djPath}yseMerchantOffline.getAreaInfoByOpenAccBankType` data.method = `${djPath}yseMerchantOffline.getAreaInfoByOpenAccBankType`
return request(data, 'post') return request(data, 'post')
} }
// 分账规则历史记录
export function getHistoryRecord(data) {
data.method = `${djPath}smartcarlife.divisionRuleEffectRecord.getHistoryRecord`
return request(data, 'post')
}
...@@ -45,8 +45,8 @@ const request = ( ...@@ -45,8 +45,8 @@ const request = (
reqData = reqData = Object.assign(reqData, options, {}) reqData = reqData = Object.assign(reqData, options, {})
// console.log(method === RequestMethods.POST) // console.log(method === RequestMethods.POST)
// console.log(url) // console.log(url)
console.log(options) // console.log(options)
console.log(reqData) // console.log(reqData)
return axios({ return axios({
url, url,
method, method,
......
...@@ -715,12 +715,12 @@ export const resources = { ...@@ -715,12 +715,12 @@ export const resources = {
} }
] ]
}, },
// { {
// authId: '9060304', authId: '9060304',
// parentId: '90603', parentId: '90603',
// label: '分账', label: '历史记录',
// handle: 'handleAccount' handle: 'handleRecord'
// }, },
{ {
authId: '9060305', authId: '9060305',
parentId: '90603', parentId: '90603',
......
...@@ -111,11 +111,15 @@ ...@@ -111,11 +111,15 @@
:disabled="true">配置管理</el-tab-pane> :disabled="true">配置管理</el-tab-pane>
</el-tabs> </el-tabs>
</d2-dialog> </d2-dialog>
<!-- <division-rule <baseDialog :isShow.sync="financialRulesDetailVisible"
:divisionRuleVisible="divisionRuleVisible" :config="dialogConfig.setting"
:merchantInfo="merchantInfo" :dialogConfig="dialogConfig.config"
@handleRuleClose="handleRuleClose" @closeDialog="handleDetailClose">
></division-rule> --> <financialRulesDetail v-if="financialRulesDetailVisible"
:merchantId="merchantInfo.merchantId"
:accountDetailVisible="financialRulesDetailVisible">
</financialRulesDetail>
</baseDialog>
</d2-container> </d2-container>
</template> </template>
...@@ -123,7 +127,8 @@ ...@@ -123,7 +127,8 @@
import { Util } from '@/common/util' import { Util } from '@/common/util'
import _ from 'lodash' import _ from 'lodash'
import viewDetail from './viewDetail' import viewDetail from './viewDetail'
// import divisionRule from './divisionRule' import financialRulesDetail from './financialRulesDetail'
import baseDialog from '@/components/baseDialog/baseDialog'
import { getList, deleteMerchant, serviceGetMerchantList, addServiceMerchant, getPartnerByYq } from '@api/merchant' import { getList, deleteMerchant, serviceGetMerchantList, addServiceMerchant, getPartnerByYq } from '@api/merchant'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
...@@ -131,9 +136,31 @@ import { BaseData, userTypeList, ghUserTypeList, merchantClassifyList } from '@/ ...@@ -131,9 +136,31 @@ import { BaseData, userTypeList, ghUserTypeList, merchantClassifyList } from '@/
import relateStoreMerDialog from './components/relateStoreMerDialog' import relateStoreMerDialog from './components/relateStoreMerDialog'
export default { export default {
name: 'merchantManage', name: 'merchantManage',
components: {
viewDetail,
relateStoreMerDialog,
financialRulesDetail,
baseDialog
// divisionRule
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
financialRulesDetailVisible: false,
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
// width: '900px',
btnList: [
]
},
config: {
title: '查看详情',
width: '900px'
}
},
searchForm: { searchForm: {
merchantType: '', merchantType: '',
channelType: '', channelType: '',
...@@ -185,7 +212,9 @@ export default { ...@@ -185,7 +212,9 @@ export default {
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width: '200px'
},
tableColumns: [{ tableColumns: [{
label: '导流方编号', label: '导流方编号',
prop: 'merchantId', prop: 'merchantId',
...@@ -268,7 +297,8 @@ export default { ...@@ -268,7 +297,8 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') return Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss')
} }
}] }
]
}, },
// 关联门店 // 关联门店
storeSearchForm: { storeSearchForm: {
...@@ -287,9 +317,7 @@ export default { ...@@ -287,9 +317,7 @@ export default {
storeApi: serviceGetMerchantList, storeApi: serviceGetMerchantList,
sourcePage: 'serviceStore', sourcePage: 'serviceStore',
storeSelected: [], storeSelected: [],
// 分账
// divisionRuleVisible: false,
// merchantInfo: {},
// 查看详情 // 查看详情
detailActiveName: 'first', detailActiveName: 'first',
viewDetailVisible: false, viewDetailVisible: false,
...@@ -309,12 +337,6 @@ export default { ...@@ -309,12 +337,6 @@ export default {
} }
}, },
components: {
viewDetail,
relateStoreMerDialog
// divisionRule
},
mounted() { mounted() {
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => { res.forEach(item => {
...@@ -334,6 +356,9 @@ export default { ...@@ -334,6 +356,9 @@ export default {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
}, },
handleDetailClose() {
this.financialRulesDetailVisible = false
},
keyDowmGetList() { keyDowmGetList() {
this.$refs.merchantTable.refreshTable() this.$refs.merchantTable.refreshTable()
}, },
...@@ -440,14 +465,14 @@ export default { ...@@ -440,14 +465,14 @@ export default {
this.viewDetailData = _.cloneDeep(row) this.viewDetailData = _.cloneDeep(row)
this.handleViewClose() this.handleViewClose()
}, },
// 分账 // 历史记录
// handleAccount(row) { handleRecord(row) {
// this.merchantInfo = row this.merchantInfo = row
// this.handleRuleClose() this.handleRuleClose()
// }, },
// handleRuleClose() { handleRuleClose() {
// this.divisionRuleVisible = !this.divisionRuleVisible this.financialRulesDetailVisible = !this.financialRulesDetailVisible
// }, },
// 删除 // 删除
handleDelete(row) { handleDelete(row) {
this.$confirm('是否要进行删除操作?', '提示', { this.$confirm('是否要进行删除操作?', '提示', {
......
...@@ -138,9 +138,8 @@ ...@@ -138,9 +138,8 @@
<td>创建时间:{{needTransformObj.yqCreatedDate}}</td> <td>创建时间:{{needTransformObj.yqCreatedDate}}</td>
</tr> </tr>
</table> </table>
<div v-show="merchantInfo.partnerMerchants"> <!-- <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' cellspacing='0'
style="border-width: 0px 0px 1px 1px;"> style="border-width: 0px 0px 1px 1px;">
...@@ -244,7 +243,7 @@ ...@@ -244,7 +243,7 @@
</table> </table>
</div> </div>
</div> </div>
</div> <!-- </div> -->
</template> </template>
<script> <script>
...@@ -262,6 +261,10 @@ export default { ...@@ -262,6 +261,10 @@ export default {
merchantInfo: { merchantInfo: {
type: Object, type: Object,
default: () => { } default: () => { }
},
isGetDetail: {
type: Boolean,
default: true
} }
}, },
data() { data() {
...@@ -378,12 +381,31 @@ export default { ...@@ -378,12 +381,31 @@ export default {
}, },
mounted() { mounted() {
console.log(this.isGetDetail)
this.setNeedTransformObj()
if (this.isGetDetail) {
this.getDetail() this.getDetail()
} else {
this.setDivisionRule(this.merchantInfo.divisionRule)
this.setAccountRule(this.merchantInfo.settleRule)
}
}, },
methods: { methods: {
getDetail() { getDetail() {
// console.log(this.merchantInfo) console.log(this.merchantInfo)
// console.log(Util.dateFormate(this.merchantInfo.merchant.entryDate, 'YYYY-MM-DD'))
getDivisionRuleApi({ merchantId: this.merchantInfo.merchantId }).then(res => {
// console.log(res)
// this.hasDivision = !!res
this.setDivisionRule(res)
})
getAccountRule({ 'merchantId': this.merchantInfo.merchantId }).then(res => {
this.setAccountRule(res)
})
},
setNeedTransformObj() {
this.needTransformObj = { this.needTransformObj = {
addr: this.merchantInfo.merchant ? ((this.merchantInfo.merchant.provinceName || '') + (this.merchantInfo.merchant.cityName || '') + (this.merchantInfo.merchant.areaName || '') + (this.merchantInfo.merchant.address || '')) : '', addr: this.merchantInfo.merchant ? ((this.merchantInfo.merchant.provinceName || '') + (this.merchantInfo.merchant.cityName || '') + (this.merchantInfo.merchant.areaName || '') + (this.merchantInfo.merchant.address || '')) : '',
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') : '') : '',
...@@ -393,10 +415,9 @@ export default { ...@@ -393,10 +415,9 @@ export default {
parentCreatedDate: this.merchantInfo.singlePartnerMerchant ? (this.merchantInfo.singlePartnerMerchant.createdDate ? Util.dateFormate(this.merchantInfo.singlePartnerMerchant.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 => { setDivisionRule(res) {
// console.log(res) this.hasDivision = res ?? ''
this.hasDivision = !!res
this.divisionForm = res || {} this.divisionForm = res || {}
Object.assign(this.form, res) Object.assign(this.form, res)
var flagList = Object.keys(this.flagTodivisionObj) var flagList = Object.keys(this.flagTodivisionObj)
...@@ -415,8 +436,8 @@ export default { ...@@ -415,8 +436,8 @@ export default {
// console.log(numToDivisionList[res[item]]) // console.log(numToDivisionList[res[item]])
numToDivisionList[res[item]] && this.divisionList[numToDivisionList[res[item]]].push(this.flagTodivisionObj[item]) numToDivisionList[res[item]] && this.divisionList[numToDivisionList[res[item]]].push(this.flagTodivisionObj[item])
}) })
}) },
getAccountRule({ 'merchantId': this.merchantInfo.merchantId }).then(res => { setAccountRule(res) {
Object.assign(this.merchantInfo, res) Object.assign(this.merchantInfo, res)
// console.log(res) // console.log(res)
if (res) { if (res) {
...@@ -429,9 +450,7 @@ export default { ...@@ -429,9 +450,7 @@ export default {
partnerProfitPer: res.partnerProfitPer partnerProfitPer: res.partnerProfitPer
}) })
} }
})
}, },
chooseDate() { chooseDate() {
this.$refs.datePicker.focus() this.$refs.datePicker.focus()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!