Commit eaa0f9a7 by cwq0219

商户管理;财务

1 parent 69b93ca6
......@@ -5,7 +5,8 @@ const path = 'dj.api.'
const path2 = 'dj.api.smartcarlife.'
export function getList(data) {
data.method = `${path2}merchantSettleAccountRule.page.byMerchant`
// data.method = `${path2}merchantSettleAccountRule.page.byMerchant`
data.method = `${path}servicemerchantref.shop.page`
return request(data)
}
......@@ -47,3 +48,9 @@ export function getAccountRule(data) {
data.method = `${path2}merchantSettleAccountRule.get.byMerchantId`
return request(data, 'post')
}
// 财务 - 获取服务4s店(包含园区店、服务商信息)详情
export function getShopDetail(data) {
data.method = `${path}servicemerchantref.shop.detail`
return request(data, 'post')
}
\ No newline at end of file
import request from './request'
const path = 'fims.order.'
function getListApi(data) {
data.method = `${path}search`
return request(data)
}
function editApi(data) {
data.method = `${path}edit`
return request(data)
}
function removeApi(data) {
data.method = `${path}delete`
return request(data)
}
export {
getListApi,
editApi,
removeApi
}
import request from './request'
const path = 'fims.material.'
function getListApi(data) {
data.method = `${path}list`
return request(data)
}
export {
getListApi
}
......@@ -83,7 +83,7 @@ $prefix: d2;
line-height: 48px;
color: #0947C6;
border-bottom: 1px solid #E7EAEC;
padding-left: 20px;
// padding-left: 20px;
margin: 0 0;
}
.edit-sub-title::before {
......
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Last Modified by: chenwq
* @Last Modified time: 2021-04-10 11:49:28
* @Last Modified time: 2021-04-15 10:17:12
*/
export const TYPE_NAME = 'confType'
......@@ -95,6 +95,9 @@ export const merchantClassifyList = [{
}, {
confId: 6,
confLabel: '园区店'
}, {
confId: 7,
confLabel: '服务商'
}]
// 品牌商
......
......@@ -54,10 +54,14 @@
v-model="form.autoFlag"
active-value="Y"
inactive-value="N"
:disabled="isConfigAccount"
>
</el-switch>
</el-radio-group>
<span>关联的4S店和服务商有生效的虚拟对公账户才能开启线上自动分账<a href="#/accountList" target="_blank">申请虚拟账户 ></a></span>
<span v-show="isConfigAccount">关联的4S店和服务商有生效的虚拟对公账户才能开启线上自动分账<a
href="#/accountList"
target="_blank"
>申请虚拟账户 ></a></span>
</el-form-item>
<el-form-item
label="结算时间方式"
......@@ -84,26 +88,24 @@
<div class="block_item">
<el-radio :label="1">结算周期 T+
<el-input-number
v-model="form.settleTime"
v-model="settleTimeObj.first"
controls-position="right"
@change="handleChange"
size="small"
:min="1"
:max="30"
:disabled="form.settleTimeType === 2"
:disabled="form.settleTimeType === 2 || form.autoFlag === 'N'"
></el-input-number>
日</el-radio>
日</el-radio>
</div>
<div class="block_item">
<el-radio :label="2">固定日期结算:每月
<el-input-number
v-model="form.settleTime"
v-model="settleTimeObj.second"
controls-position="right"
@change="handleChange"
size="small"
:min="1"
:max="31"
:disabled="form.settleTimeType === 1"
:disabled="form.settleTimeType === 1 || form.autoFlag === 'N'"
></el-input-number>
日</el-radio>
</div>
......@@ -470,15 +472,22 @@
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import { updateRule, sendSms, getAdminInfo, getAccountRule } from '@api/merchant'
import { updateRule, sendSms, getAdminInfo, getAccountRule, getShopDetail } from '@api/merchant'
import { BaseData, userType, ghUserType, limitPrice } from '@/common/constants.js'
export default {
name: 'merchantDetail',
data() {
return {
sessionName: 'merchatItem',
isConfigAccount: false,
// 结算周期
settleTimeObj: {
first: '1',
second: '1'
},
form: {
merchantName: '',
autoFlag: 'Y',
autoFlag: 'N',
settleTimeType: 1,
settleTime: '1',
bizType: '1',
......@@ -533,11 +542,6 @@ export default {
partnerProfitPer: ''
}]
},
merchantId: '',
channelType: '',
contactName: '',
phone: '',
settleAccountRule: '',
merchantSettleTypeList: [{
confId: '1',
confLabel: '毛利分润'
......@@ -578,11 +582,30 @@ export default {
getAdminInfo({}).then(res => {
this.adminInfo = res
})
getAccountRule({ 'merchantId': this.$route.params.merchantId }).then(res => {
if (this.$route.params.merchantId) {
Object.assign(this.form, this.$route.params)
this.merchantItem = {
merchantId: this.$route.params.merchantId,
merchantName: this.$route.params.merchantName,
channelType: this.$route.params.channelType
}
sessionStorage.setItem(this.sessionName, JSON.stringify(this.merchantItem))
} else {
Object.assign(this.form, JSON.parse(sessionStorage.getItem(this.sessionName)))
}
getAccountRule({ 'merchantId': this.form.merchantId }).then(res => {
if (!res || (res.autoFlag === 'N')) {
getShopDetail({ 'merchantId': this.form.merchantId }).then(res => {
var parentStatus = res.partnerMerchant ? (res.partnerMerchant.accountStatus !== 3) : true
var merchantStatus = res.merchant ? (res.merchant.accountStatus !== 3) : true
this.isConfigAccount = parentStatus || merchantStatus
})
}
if (res) {
this.form.autoFlag = res.autoFlag
this.form.settleTimeType = res.settleTimeType
this.form.settleTime = res.settleTime
this.settleTimeObj[res.settleTimeType === 1 ? 'first' : 'second'] = res.settleTime
this.accountSetForm.list[0].merchantSettleType = res.merchantSettleType + ''
this.accountSetForm.list[0].merchantProfitValue = res.merchantProfitValue + ''
this.accountSetForm.incentiveType = res.incentiveType + ''
......@@ -603,22 +626,7 @@ export default {
})
}
})
Object.assign(this.form, this.$route.params)
this.merchantId = this.$route.params.merchantId
this.merchantName = this.$route.params.merchantName
this.channelType = this.$route.params.channelType
this.contactName = this.$route.params.contactName
this.phone = this.$route.params.phone
this.settleAccountRule = this.$route.params.settleAccountRule
this.getBaseData()
if (this.settleAccountRule) {
for (var key in this.form) {
if (key in this.settleAccountRule) {
this.form[key] = this.settleAccountRule[key]
}
}
}
},
methods: {
......@@ -626,6 +634,10 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
// 删除session
deleteSession() {
sessionStorage.removeItem(this.sessionName)
},
handleSend() {
sendSms({}).then((res) => {
this.notice.okTips('已发送,30分钟内有效')
......@@ -722,7 +734,7 @@ export default {
bizType: this.form.bizType,
autoFlag: this.form.autoFlag,
settleTimeType: this.form.settleTimeType,
settleTime: this.form.settleTime,
settleTime: this.settleTimeObj[this.form.settleTimeType === 1 ? 'first' : 'second'],
settleAmountType: this.form.settleAmountType,
// 全部-分账设置
merchantSettleType: this.accountSetForm.list[0].merchantSettleType,
......@@ -750,6 +762,7 @@ export default {
message: '修改成功',
type: 'success'
})
this.deleteSession()
this.close({ tagName: '/merchantManage' })
this.$router.push({
name: 'merchantManage'
......@@ -770,6 +783,7 @@ export default {
})
},
onCancel() {
this.deleteSession()
this.$router.push({
name: 'merchantManage'
})
......
......@@ -142,11 +142,9 @@ export default {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
userType: '',
merchantType: '',
channelType: '',
merchantName: '',
yqMerchantName: ''
keyWord: ''
},
showFormData: [{
label: '渠道',
......@@ -155,14 +153,7 @@ export default {
optionList: [],
optionId: 'value',
optionLabel: 'name',
optionsName: 'channelTypeList',
changeAttr: (value, targetItem) => {
if (value) {
this.baseData.userTypeList = value === 2 ? this.ghUserTypeList : this.userTypeList
}
this.searchForm.userType = ''
this.getOptionsList()
}
optionsName: 'channelTypeList'
}, {
label: '商户分类',
name: 'merchantType',
......@@ -173,7 +164,7 @@ export default {
optionsName: 'merchantClassifyList'
}, {
label: '商户名称',
name: 'merchantName',
name: 'keyWord',
type: 'input',
placeholder: '请输入园区店/4S店/服务商商户名称',
isClear: true,
......@@ -186,16 +177,21 @@ export default {
tableOption: true,
tableColumns: [{
label: '4S店编号',
prop: ''
prop: 'merchantId',
width: '100px'
}, {
label: '商户名称(4S店)',
prop: 'merchantName'
}, {
label: '登录账户',
prop: 'accountName'
prop: 'accountName',
formatter: (cellValue) => {
return cellValue.merchant ? cellValue.merchant.accountName : ''
}
}, {
label: '渠道',
prop: 'channelType',
width: '80px',
formatter: (cellValue) => {
return {
1: '嘀加',
......@@ -208,21 +204,25 @@ export default {
width: '170px'
}, {
label: '关联园区店号',
prop: 'yqMerchantId'
prop: 'yqMerchantId',
width: '120px'
}, {
label: '关联服务商名称',
prop: ''
prop: 'merchantName',
formatter: (cellValue) => {
return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantName : ''
}
}, {
label: '关联服务商号',
prop: ''
prop: 'merchantId',
formatter: (cellValue) => {
return cellValue.partnerMerchant ? cellValue.partnerMerchant.merchantId : ''
}
}, {
label: '最近更新时间',
width: '150px',
formatter: (cellValue) => {
if (cellValue && cellValue.settleAccountRule) {
return cellValue.settleAccountRule.updateDateStr
}
return ''
return new Date(cellValue.updatedDate).toLocaleString()
}
}]
},
......@@ -288,13 +288,10 @@ export default {
handleReset() {
this.searchForm = {
userType: '',
merchantType: '',
channelType: '',
merchantName: '',
yqMerchantName: ''
keyWord: ''
}
this.baseData.userTypeList = []
this.getOptionsList()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!