Commit 056a3b79 by 前端

2月份需求代码提交

1 parent 69b37f1e
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询规则审核记录
export function ruleAuditPage(data) {
data.method = `${path}ruleAudit.page`
return request(data, RequestMethods.POST)
}
// 规则审核-查看详情
export function ruleAuditDetail(data) {
data.method = `${path}ruleAudit.detail`
return request(data, RequestMethods.POST)
}
// 规则审核-审核通过
export function ruleAuditPass(data) {
data.method = `${path}ruleAudit.pass`
return request(data, RequestMethods.POST)
}
// 规则审核-驳回
export function ruleAuditReject(data) {
data.method = `${path}ruleAudit.reject`
return request(data, RequestMethods.POST)
}
// 规则审核-撤销
export function ruleAuditCancel(data) {
data.method = `${path}ruleAudit.cancel`
return request(data, RequestMethods.POST)
}
......@@ -758,3 +758,24 @@ export const stockManagementModeList = [
{ confId: 2, confName: "不使用膜卷号" },
{ confId: 1, confName: "使用膜卷号" }
]
// 转账管理-预警状态
export const warningStatus = [
{ confId: 1, confValue: "正常" },
{ confId: 2, confValue: "异常" }
]
// 规则审核-类型
export const ruleReview_type = [
{ confId: 1, confValue: "清分" },
{ confId: 2, confValue: "对账" }
]
// 规则审核-状态
export const ruleReview_status = [
{ confId: 1, confValue: "待审核" },
{ confId: 2, confValue: "已审核" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "逾期未审" },
{ confId: 5, confValue: "已撤销" }
]
......@@ -762,5 +762,56 @@ export const routerName = {
cache: false
},
component: _import("system/codeTest/index")
},
90624: {
path: "/ruleReview",
name: "ruleReview",
meta: {
title: "规则审核",
authId: "90624",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062401",
parentId: "90624",
label: "审核",
handle: "handleReview",
addRoutePath: [
{
authId: "9062404",
name: "审核",
parentId: "90624"
}
]
},
{
authId: "9062402",
parentId: "90624",
label: "驳回",
handle: "handleReject"
},
{
authId: "9062403",
parentId: "90624",
label: "撤销",
handle: "handleRevoke"
}
],
component: _import("systemConfig/ruleReview/index")
},
9062404: {
path: "/examineDetail",
name: "examineDetail",
meta: {
title: "审核",
authId: "9062404",
parentId: "90624",
cache: false,
sideHidden: false,
activePath: "/ruleReview"
},
component: _import("systemConfig/ruleReview/examineDetail")
}
}
......@@ -105,7 +105,7 @@
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { transferAccountsStatusList, transferTypeList, sceneCodeList } from '@/common/constants.js'
import { transferAccountsStatusList, transferTypeList, sceneCodeList, warningStatus } from '@/common/constants.js'
import { transferAccountsRecordPage, transferAccountsRecordUpdateStatus, reTransfer } from '@api/transferAccountsManage'
import { rewithdraw } from '@api/withdrawalManage'
import examineDialog from './components/examineDialog'
......@@ -203,6 +203,15 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'transferTypeList'
}, {
label: '预警状态',
name: 'warningStatus',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'warningStatusList'
}],
getListApi: transferAccountsRecordPage,
tableParams: {
......@@ -335,6 +344,22 @@ export default {
}
},
{
label: '预警状态',
prop: 'status',
width: '100px',
formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
}
},
{
label: '预警原因',
prop: 'status',
width: '100px',
formatter: (cellValue) => {
return cellValue.transferTime ? Util.dateFormate(cellValue.transferTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '转账时间',
prop: 'transferTime',
width: '150px',
......@@ -371,7 +396,8 @@ export default {
baseData: {
statusList: deepClone(transferAccountsStatusList),
sceneTypeList: deepClone(sceneCodeList),
transferTypeList: deepClone(transferTypeList)
transferTypeList: deepClone(transferTypeList),
warningStatusList: deepClone(warningStatus)
},
examineVisible: false,
......
......@@ -102,6 +102,29 @@
</el-select>
<span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span>
</el-form-item>
<el-form-item label="1.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选广联销售</span>
</el-form-item>
<el-form-item label="2.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
</el-select>
</el-form-item>
<el-form-item>
<div class="month-set-div">
<div class="month-choose">
......@@ -178,6 +201,20 @@
placeholder="请输入" />&nbsp;%
</span>
</el-form-item>
<el-form-item label="阳光激励费:"
prop="sunlightIncentiveCost">
<el-input class="rateInput_t"
v-model="form.sunlightIncentiveCost"
@input="sunlightIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
</el-form-item>
<el-form-item label="市场激励费:"
prop="marketIncentiveCost">
<el-input class="rateInput_t"
v-model="form.marketIncentiveCost"
@input="marketIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
</el-form-item>
<el-form-item>
<div class="btnCon">
<el-button type="primary"
......@@ -227,7 +264,9 @@ export default {
residentManager: {},
currentMonthOutputValue: '',
nextMonthOutputValue: '',
serviceMerchantServiceChargeConfig: {}
serviceMerchantServiceChargeConfig: {},
sunlightIncentiveCost: '',
marketIncentiveCost: ''
},
outputValueListByYear: [],
year: '',
......@@ -260,7 +299,9 @@ export default {
// gasCardServiceCharge_isDisabled: false,
oldVal: {
passageServiceChargeFlag: '',
gasCardServiceChargeFlag: ''
gasCardServiceChargeFlag: '',
sunlightIncentiveCost: '',
marketIncentiveCost: ''
},
}
},
......@@ -549,6 +590,14 @@ export default {
gasCardServiceCharge_handleInput(newVal) {
this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge = limitPrice(newVal, this.oldVal.gasCardServiceCharge, 3, 2, 0, 100)
this.oldVal.gasCardServiceCharge = this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge
},
sunlightIncentiveCost_handleInput(newVal) {
this.form.sunlightIncentiveCost = limitPrice(newVal, this.oldVal.sunlightIncentiveCost, 3, 2, 0, 100)
this.oldVal.sunlightIncentiveCost = this.form.sunlightIncentiveCost
},
marketIncentiveCost_handleInput(newVal) {
this.form.marketIncentiveCost = limitPrice(newVal, this.oldVal.marketIncentiveCost, 3, 2, 0, 100)
this.oldVal.marketIncentiveCost = this.form.marketIncentiveCost
}
}
}
......@@ -803,4 +852,7 @@ export default {
.rateInput {
width: 100px;
}
.rateInput_t {
width: 150px;
}
</style>
<template>
<d2-Container>
<div class="merchant-checkdetail">
<div class="merchant-title">
<span>商户名称:我是4S点名称</span>
<span>业务场景:精品升级</span>
<span>类型:清分</span>
<span>生效时间:2024-01-01</span>
</div>
<ledgerAccount :items="checkDetailItem" />
<div class="btns">
<el-button @click="handleConfirm"
size="small"
type="primary">
审核
</el-button>
</div>
</div>
</d2-Container>
</template>
<script>
import ledgerAccount from '../merchant/merchantStep/components/ledgerAccount.vue'
import {
getDistributeRuleApi,
// getEffectRuleApi
} from "@api/merchant"
export default {
name: "ExamineDetail",
props: {},
data() {
return {
activeName: "first",
merchantRow: {},
// 分账数据
checkDetailItem: {},
// 对账数据
// checkRecordList: {}
}
},
created() {
this.getRowItem()
},
mounted() {
// 分账
this.getDistributeRule()
},
methods: {
async init() {
// if (this.activeName == "first") {
// 分账
this.getDistributeRule()
// } else {
// 对账
// this.getEffectRule()
// }
},
// 分账
async getDistributeRule() {
const params = {
merchantId: this.merchantRow.merchantId,
sceneType: this.merchantRow.scene,
expenseCategroyRulsBuildType: 2
}
const res = await getDistributeRuleApi(params)
console.log('res: ', res)
this.checkDetailItem = res
},
// 对账
// async getEffectRule() {
// const params = {
// merchantId: this.merchantRow.merchantId,
// sceneType: this.merchantRow.scene
// }
// const res = await getEffectRuleApi(params)
// console.log(res)
// this.checkRecordList = res
// // this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// // console.log('res: ', res)
// },
getRowItem() {
const params = this.$route.query?.params
if (params) {
this.merchantRow = JSON.parse(params)
// console.log("is.merchantRow", this.merchantRow)
}
},
// handleClick(tab) {
// // console.log(tab.name)
// this.activeName = tab.name
// this.init()
// },
// handleType(num) {
// this.activeType = num
// },
// 保存
handleConfirm() {
this.$confirm('审核通过后,当前规则会自动应用并生效,可在商户管理-历史记录中查询。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
// rewithdraw({ orderCode: row.orderCode }).then(res => {
this.$router.go(-1)
// })
}).catch(err => {
console.log(err)
})
},
},
components: {
ledgerAccount,
// reconciliation
},
computed: {}
}
</script>
<style lang="scss">
$color: #2a58ad;
.merchant-checkdetail {
// height: 100%;
padding-left: 20px;
padding-right: 16px;
padding-bottom: 20px;
// overflow-y: auto;
.title {
}
.merchant-title {
font-weight: 500;
font-size: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.type {
margin-top: 6px;
display: flex;
.btn {
width: 96px;
height: 40px;
background: #f8f8f8;
border-radius: 4px 4px 0 0;
line-height: 40px;
text-align: center;
cursor: pointer;
}
.act {
font-weight: 500;
color: $color;
background: #fff;
}
}
.content {
background: #ffffff;
.part1 {
.tit {
display: flex;
align-items: center;
height: 48px;
background: #ffffff;
font-weight: 500;
font-size: 18px;
color: #333333;
box-sizing: border-box;
border-bottom: 1px solid #ebebeb;
.line {
margin-left: 16px;
margin-right: 8px;
width: 4px;
height: 16px;
background: $color;
border-radius: 2px;
}
}
.cont {
display: flex;
flex-flow: column;
&.cont-table {
display: block;
}
&.cont-table1 {
padding: 16px 20px 20px;
}
display: flex;
flex-wrap: wrap;
flex-flow: column;
padding: 16px 20px 32px;
.mt16 {
margin-top: 16px;
}
.msg {
padding-bottom: 12px;
flex: 1 0 auto;
// width: 50%;
display: flex;
align-items: flex-start;
line-height: 24px;
.msg-title {
width: 138px;
// height: 20px;
font-size: 14px;
color: #666666;
text-align: right;
}
.msg-val {
// height: 20px;
font-size: 14px;
color: #1d1d1d;
text-align: left;
}
}
.msg-name-val {
margin-left: 138px;
font-size: 14px;
}
.compute {
margin-bottom: 10px;
display: flex;
font-size: 14px;
color: #666666;
.manner {
}
.online {
& + .online {
margin-left: 44px;
}
color: $color;
}
}
.white-table {
margin-bottom: 16px;
display: flex;
flex-wrap: wrap;
font-size: 14px;
color: #666666;
border-top: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5;
.type1 {
// &:first-child {
// border-top: 1px solid #E5E5E5;
// border-left: 1px solid #E5E5E5;
// }
display: flex;
width: 33.33%;
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
box-sizing: border-box;
.type-name {
text-align: right;
width: 90px;
}
.type-val {
flex: 1;
display: flex;
color: #1d1d1d;
}
.type-color {
color: $color;
}
.date {
margin-right: 10px;
color: #1d1d1d;
}
}
.type2 {
width: 66.66%;
}
}
.title-table {
font-size: 14px;
color: #333333;
border: 1px solid #e8e8ea;
.head {
display: flex;
height: 40px;
line-height: 40px;
text-align: center;
background: #f2f4f7;
.cost {
& + .cost {
border-left: 1px solid #e8e8ea;
}
flex: 1;
}
}
.detail {
display: flex;
min-height: 40px;
color: #666666;
border-top: 1px solid #e8e8ea;
.detail-i {
display: flex;
justify-content: center;
align-items: center;
& + .detail-i {
border-left: 1px solid #e8e8ea;
}
flex: 1;
}
}
}
}
}
// .part2 {
// }
// .part3 {
// }
// .part4 {
// }
// .part5 {
// }
}
.btns {
margin-top: 16px;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>
<!-- 规则审核 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<!-- 审核 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope"
:show-btn-ids="['9062401']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { sceneCodeList, ruleReview_status, ruleReview_type, withdrawalManageStatusList } from '@/common/constants.js'
import { withdrawOrderRecordPage, rewithdraw } from '@api/withdrawalManage'
// import addDialog from './components/addDialog'
export default {
name: 'TransferAccountsList',
components: {
// addDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
searchForm: {
withdrawTradeNo: '',
merchantName: '',
merchantIdFuzzy: '',
// merchantIds: [],
status: '',
statuses: [],
withdrawalDate: ''
},
searchFormSearch: {},
showFormData: [{
label: '商户名称',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '商户号',
name: 'merchantIdFuzzy',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}, {
label: '场景名',
name: 'sceneType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '类型',
name: 'type',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'typeList'
}, {
label: '状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}],
getListApi: withdrawOrderRecordPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [{
label: '商户名称',
prop: 'merchantName',
width: '160px'
}, {
label: '商户号',
prop: 'merchantId',
width: '160px'
}, {
label: '业务场景',
prop: 'scene',
width: '100px',
formatter: (cellValue) => {
return this.baseData.sceneTypeList.find(item => item.confId === cellValue.scene)?.confValue
}
},
{
label: '类型',
prop: 'type',
width: '100px',
formatter: (cellValue) => {
return this.baseData.typeList.find(item => item.confId === cellValue.type)?.confValue
}
},
{
label: '生效开始时间',
prop: 'withdrawTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.withdrawTime ? Util.dateFormate(cellValue.withdrawTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '状态',
prop: 'status',
width: '100px',
formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
}
},
{
label: '创建人',
prop: 'createdBy'
},
{
label: '创建时间',
prop: 'withdrawTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.withdrawTime ? Util.dateFormate(cellValue.withdrawTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '审核人',
prop: 'createdBy'
},
{
label: '审核时间',
prop: 'withdrawTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.withdrawTime ? Util.dateFormate(cellValue.withdrawTime, 'YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
},
baseData: {
sceneTypeList: deepClone(sceneCodeList),
statusList: deepClone(ruleReview_status),
typeList: deepClone(ruleReview_type),
},
infos: [],
recordInfo: null,
addVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.withdrawalDate) {
this.searchFormSearch.withdrawStartTimeStr = Util.dateFormate(this.searchFormSearch.withdrawalDate[0], 'YYYY-MM-DD HH:mm:ss')
this.searchFormSearch.withdrawEndTimeStr = Util.dateFormate(this.searchFormSearch.withdrawalDate[1], 'YYYY-MM-DD') + ' 23:59:59'
delete this.searchFormSearch.withdrawalDate
}
// if (this.searchFormSearch.merchantId) {
// this.searchFormSearch.merchantIds[0] = this.searchFormSearch.merchantId
// delete this.searchFormSearch.merchantId
// }
if (this.searchFormSearch.status) {
this.searchFormSearch.statuses[0] = this.searchFormSearch.status
delete this.searchFormSearch.status
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
console.log('this.baseData[item.optionsName]', item.optionsName)
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
withdrawTradeNo: '',
merchantName: '',
merchantIdFuzzy: '',
// merchantIds: [],
status: '',
statuses: [],
withdrawalDate: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
//审核
handleReview(row) {
row.merchantId = 44211847
row.scene = 1
this.$router.push({
name: "examineDetail",
query: {
params: JSON.stringify(row)
}
})
},
//驳回
handleReject(row) {
this.$confirm('进行驳回后,自动作废该申请,且无法撤回。是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
rewithdraw({ orderCode: row.orderCode }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
//撤销
handleRevoke(row) {
this.$confirm('进行撤销后,自动作废该规则记录,且无法撤回。是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
rewithdraw({ orderCode: row.orderCode }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
},
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!