Commit 90189ed7 by wangql

Merge branch 'dev_v4.7.1' of http://192.168.3.233:8090/glsx-business/dj-car-life…

…-system into dev_v4.7.1
2 parents 1589b835 38d4bf3a
module.exports = {
presets: [
'@vue/app'
],
// 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
sourceType: 'unambiguous'
}
module.exports = {
presets: ['@vue/app'],
// 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
sourceType: 'unambiguous'
}
......@@ -13,6 +13,7 @@
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"dayjs": "^1.8.12",
......@@ -37,6 +38,7 @@
"vue-i18n": "^8.14.0",
"vue-qr": "^2.5.0",
"vue-router": "3.0.5",
"vue2-org-tree": "^1.3.6",
"vuex": "^3.0.1",
"xlsx": "^0.16.9"
},
......
......@@ -62,6 +62,7 @@ export function getAdminInfo(data) {
return request(data, 'post')
}
/** 根据商户号获取商户的财务结算规则 */
export function getAccountRule(data) {
data.method = `${path2}merchantSettleAccountRule.get.byMerchantId`
return request(data, 'post')
......
// import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui'
import moment from 'moment'
// import moment from 'moment'
import dayjs from 'dayjs'
let loadingInstance = ''
export const Util = {
/**
......@@ -192,7 +193,7 @@ export const Util = {
if (type) {
txt = type
}
const m = moment(str).format(txt)
const m = dayjs(str).format(txt)
return m
},
......
<!-- 表格+分页 -->
<template>
<div class="d2-table">
<el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
border
:highlight-current-row="true"
@sort-change="sortChange"
@selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}"
>
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
width="55"
:reserve-selection="true"
>
<el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
border
:highlight-current-row="true"
@sort-change="sortChange"
@selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
width="55"
:reserve-selection="true">
</el-table-column>
<el-table-column
v-if="hasNum"
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align||'center'"
:sortable="item.sortable"
>
<el-table-column v-if="hasNum"
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1">
</el-table-column>
<el-table-column v-for="(item, index) in tableParams.tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align||'center'"
:sortable="item.sortable">
<template slot="header">
<span>{{item.label}}</span>
<table-head-search
v-if="item.optionConfig"
:searchForm="headSearchForm"
:optionConfig="item.optionConfig"
:baseData="baseData"
@handleTableHeadChange="handleTableHeadChange"
></table-head-search>
<table-head-search v-if="item.optionConfig"
:searchForm="headSearchForm"
:optionConfig="item.optionConfig"
:baseData="baseData"
@handleTableHeadChange="handleTableHeadChange"></table-head-search>
</template>
<template slot-scope="scope">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"
></slot>
<slot v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"></slot>
<template v-else-if="item.tagLabel">
<el-tag
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]"
>
<el-tag v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]">
</el-tag>
<el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
></el-tag>
<el-tag v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"></el-tag>
</template>
<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 v-else-if="getListApi">
<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>
</template>
<template v-else>
......@@ -84,32 +73,26 @@
</template>
</template>
</el-table-column>
<el-table-column
v-if="tableParams.tableOption"
label="操作"
fixed="right"
:align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'auto'"
>
<el-table-column v-if="tableParams.tableOption"
label="操作"
fixed="right"
:align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'auto'">
<template slot-scope="scope">
<slot
name="auth-button"
:scope="scope.row"
></slot>
<slot name="auth-button"
:scope="scope.row"></slot>
</template>
</el-table-column>
</el-table>
<el-pagination
v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="getListApi ? total : tableTotal"
:layout="layout"
>
<el-pagination v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="getListApi ? total : tableTotal"
:layout="layout">
</el-pagination>
</div>
</template>
......@@ -155,7 +138,7 @@ export default {
// 选项列表Obj
baseData: {
type: Object,
default: () => {}
default: () => { }
},
// 表格头部搜索条件 - end
// 表格数据-外部传入
......
......@@ -15,11 +15,13 @@ import 'default-passive-events'
import notice from '@/common/notice'
import 'element-ui/lib/theme-chalk/index.css'
import ElementUI from 'element-ui'
Vue.use(ElementUI)
// import menuHeader from '@/menu/header'
// import menuAside from '@/menu/aside'
// import { frameInRoutes } from '@/router/routes'
import Vue2OrgTree from 'vue2-org-tree'
Vue.use(Vue2OrgTree)
Vue.use(ElementUI)
// import VRM from 'vue-role-manager'
// Vue.use(VRM, {
// router,
......
<!-- 下载对账单 -->
<template>
<div>
<d2-dialog title="下载对账单"
:isVisible="accountVisible"
width="40%"
btnOkLabel="确定下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<el-form ref="accountForm"
:model="infoForm"
:rules="formRules"
label-width="120px">
<el-form-item label="商户类型:"
prop="merchantType">
<el-radio-group v-model="infoForm.merchantType"
@change="changeType">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="2">4S店</el-radio-button>
<el-radio-button label="7">服务商</el-radio-button>
<el-radio-button label="6">园区店</el-radio-button>
<!-- <el-radio-button label="2" @click.native.prevent="clickMerchantType('2')">4S店</el-radio-button>
<d2-dialog title="下载对账单"
:isVisible="accountVisible"
class="accountDailog"
width="40%"
btnOkLabel="确定下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<el-form ref="accountForm"
:model="infoForm"
:rules="formRules"
label-width="120px">
<el-form-item label="商户类型:"
prop="merchantType">
<el-radio-group v-model="infoForm.merchantType"
@change="changeType">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="2">4S店</el-radio-button>
<el-radio-button label="7">服务商</el-radio-button>
<el-radio-button label="6">园区店</el-radio-button>
<!-- <el-radio-button label="2" @click.native.prevent="clickMerchantType('2')">4S店</el-radio-button>
<el-radio-button label="7" @click.native.prevent="clickMerchantType('7')">服务商</el-radio-button>
<el-radio-button label="6" @click.native.prevent="clickMerchantType('6')">园区店</el-radio-button> -->
</el-radio-group>
</el-form-item>
<el-form-item label="选择商户:"
prop="merchant">
<!-- <el-select v-model="infoForm.merchant"
</el-radio-group>
</el-form-item>
<el-form-item label="选择商户:"
prop="merchant">
<!-- <el-select v-model="infoForm.merchant"
multiple
multiple-limit="10"
filterable
......@@ -35,39 +35,39 @@
:remote-method="remoteMethod"
:loading="selectLoading"
style="width:350px"> -->
<el-select v-model="infoForm.merchant"
multiple
multiple-limit="10"
filterable
style="width:400px">
<el-option v-for="item in baseData.merchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单支付时间:"
class="dateItem"
prop="payStartDate">
<el-date-picker type="date"
placeholder="选择开始日期"
value-format="yyyy-MM-dd"
clearables
:picker-options="startDateOptions"
v-model="infoForm.payStartDate"
@change="changeStartDate"
style="width:185px"></el-date-picker>
<!-- :picker-options="startDateOptions" -->
<div style="margin:0 15px;">-</div>
<!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" -->
<el-date-picker type="date"
placeholder="选择结束日期"
value-format="yyyy-MM-dd"
clearable
v-model="infoForm.payEndDate"
:picker-options="pickerOptions0"
style="width:185px"></el-date-picker>
<!-- <el-date-picker v-model="infoForm.time"
<el-select v-model="infoForm.merchant"
multiple
multiple-limit="10"
filterable
style="width:400px">
<el-option v-for="item in baseData.merchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单支付时间:"
class="dateItem"
prop="payStartDate">
<el-date-picker type="date"
placeholder="选择开始日期"
value-format="yyyy-MM-dd"
clearables
:picker-options="startDateOptions"
v-model="infoForm.payStartDate"
@change="changeStartDate"
style="width:185px"></el-date-picker>
<!-- :picker-options="startDateOptions" -->
<div style="margin:0 15px;">-</div>
<!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" -->
<el-date-picker type="date"
placeholder="选择结束日期"
value-format="yyyy-MM-dd"
clearable
v-model="infoForm.payEndDate"
:picker-options="pickerOptions0"
style="width:185px"></el-date-picker>
<!-- <el-date-picker v-model="infoForm.time"
type="daterange"
value-format="yyyy-MM-dd"
clearable
......@@ -76,16 +76,16 @@
end-placeholder="结束日期"
:picker-options="pickerOption['rangePickerOptions']">
</el-date-picker> -->
</el-form-item>
</el-form>
</d2-dialog>
</div>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import {
// BaseData,
rangePickerOptions} from '@/common/constants.js'
rangePickerOptions
} from '@/common/constants.js'
import dayjs from 'dayjs'
import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount'
......@@ -352,7 +352,7 @@ export default {
}
/*下拉选择框-多选-内容过长-用...代替 end */
.el-select-dropdown__item {
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
</style>
......@@ -415,7 +415,8 @@
</template>
<script>
import moment from 'moment'
// import moment from 'moment'
import dayjs from 'dayjs'
import * as api from '@api/finance'
// import { getSummary, exportFile, getListTotal } from '@api/finance'
import { getTransferData } from '@api/index'
......@@ -716,10 +717,10 @@ export default {
api
.getSummary({
beginDateStr: this.summaryDate
? moment(this.summaryDate).startOf('month').format('YYYY-MM-DD')
? dayjs(this.summaryDate).startOf('month').format('YYYY-MM-DD')
: '',
endDateStr: this.summaryDate
? moment(this.summaryDate).endOf('month').format('YYYY-MM-DD')
? dayjs(this.summaryDate).endOf('month').format('YYYY-MM-DD')
: ''
})
.then((res) => {
......
......@@ -509,7 +509,8 @@
</template>
<script>
import moment from 'moment'
// import moment from 'moment'
import dayjs from 'dayjs'
import * as api from '@api/finance'
// import { getSummary, exportFile, getListTotal } from '@api/finance'
import { getTransferData, getPlatformMerchantList } from '@api/index'
......@@ -807,12 +808,12 @@ export default {
api
.getSummary({
beginDateStr: this.summaryDate
? moment(this.summaryDate)
? dayjs(this.summaryDate)
.startOf('month')
.format('YYYY-MM-DD')
: '',
endDateStr: this.summaryDate
? moment(this.summaryDate)
? dayjs(this.summaryDate)
.endOf('month')
.format('YYYY-MM-DD')
: ''
......
<!-- 服务商 - 财务列表 - 查看详情 -->
<template>
<d2-dialog
title="查看详情"
:isVisible.sync="isVisible"
btnOkLabel="关闭"
width="700px"
:noCancel="noCancel"
@confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose"
>
<el-form
:inline="true"
label-width="0"
>
<el-form-item>
<span class="picker-placeholder">
<el-date-picker
v-model="summaryDate"
type="month"
placeholder="全部"
:clear="false"
:picker-options="{
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '全部',
onClick(picker) {
picker.$emit('pick', '');
}
}]
}"
>
</el-date-picker>
</span>
<el-button
@click="getList"
type="primary"
>查询</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
style="width: 100%"
border
>
<el-table-column
label="序号"
type="index"
:align="align"
>
</el-table-column>
<el-table-column
prop="yqMerchantName"
label="园区店名称"
:align="align"
>
</el-table-column>
<el-table-column
prop="subNums"
label="订单笔数"
:align="align"
>
</el-table-column>
<el-table-column
prop="totalFranchiseeProfitMoney"
label="总收入(元)"
:align="align"
>
</el-table-column>
</el-table>
</d2-dialog>
</template>
<script>
import moment from 'moment'
import { getServiceSummaryApi } from '@api/finance'
export default {
name: 'serviceDetailDialog',
data() {
return {
noCancel: true,
align: 'center',
summaryDate: '',
tableData: []
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
date: {
type: String,
default: ''
}
},
watch: {
isVisible(val) {
this.summaryDate = val ? this.date : ''
val && this.getList()
}
},
mounted() { },
methods: {
getList() {
getServiceSummaryApi({
payStartDateStr: this.summaryDate ? moment(this.summaryDate).startOf('month').format('YYYY-MM-DD') : '',
payEndDateStr: this.summaryDate ? moment(this.summaryDate).endOf('month').format('YYYY-MM-DD') : ''
}).then((res) => {
this.tableData = res.countList
})
},
handleDetailClose() {
this.$emit('handleStoreClose')
}
}
}
</script>
<style lang="scss">
.picker-placeholder {
.el-input__inner::-webkit-input-placeholder {
color: #606266;
}
}
</style>
<!-- 服务商 - 财务列表 - 查看详情 -->
<template>
<d2-dialog title="查看详情"
:isVisible.sync="isVisible"
btnOkLabel="关闭"
width="700px"
:noCancel="noCancel"
@confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose">
<el-form :inline="true"
label-width="0">
<el-form-item>
<span class="picker-placeholder">
<el-date-picker v-model="summaryDate"
type="month"
placeholder="全部"
:clear="false"
:picker-options="{
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '全部',
onClick(picker) {
picker.$emit('pick', '');
}
}]
}">
</el-date-picker>
</span>
<el-button @click="getList"
type="primary">查询</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData"
style="width: 100%"
border>
<el-table-column label="序号"
type="index"
:align="align">
</el-table-column>
<el-table-column prop="yqMerchantName"
label="园区店名称"
:align="align">
</el-table-column>
<el-table-column prop="subNums"
label="订单笔数"
:align="align">
</el-table-column>
<el-table-column prop="totalFranchiseeProfitMoney"
label="总收入(元)"
:align="align">
</el-table-column>
</el-table>
</d2-dialog>
</template>
<script>
// import moment from 'moment'
import dayjs from 'dayjs'
import { getServiceSummaryApi } from '@api/finance'
export default {
name: 'serviceDetailDialog',
data() {
return {
noCancel: true,
align: 'center',
summaryDate: '',
tableData: []
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
date: {
type: String,
default: ''
}
},
watch: {
isVisible(val) {
this.summaryDate = val ? this.date : ''
val && this.getList()
}
},
mounted() { },
methods: {
getList() {
getServiceSummaryApi({
payStartDateStr: this.summaryDate ? dayjs(this.summaryDate).startOf('month').format('YYYY-MM-DD') : '',
payEndDateStr: this.summaryDate ? dayjs(this.summaryDate).endOf('month').format('YYYY-MM-DD') : ''
}).then((res) => {
this.tableData = res.countList
})
},
handleDetailClose() {
this.$emit('handleStoreClose')
}
}
}
</script>
<style lang="scss">
.picker-placeholder {
.el-input__inner::-webkit-input-placeholder {
color: #606266;
}
}
</style>
......@@ -418,7 +418,8 @@
</template>
<script>
import moment from 'moment'
// import moment from 'moment'
import dayjs from 'dayjs'
import serviceDetailDialog from './serviceDetailDialog'
import { getServiceListApi, exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance'
import { getPartnerYqListApi } from '@/api/account'
......@@ -694,8 +695,8 @@ export default {
},
getServiceSummary() {
getServiceSummaryApi({
payStartDateStr: this.summaryDate ? moment(this.summaryDate).startOf('month').format('YYYY-MM-DD') : '',
payEndDateStr: this.summaryDate ? moment(this.summaryDate).endOf('month').format('YYYY-MM-DD') : ''
payStartDateStr: this.summaryDate ? dayjs(this.summaryDate).startOf('month').format('YYYY-MM-DD') : '',
payEndDateStr: this.summaryDate ? dayjs(this.summaryDate).endOf('month').format('YYYY-MM-DD') : ''
}).then((res) => {
this.summayData = res
this.showEmpty = !res.countList.length
......
......@@ -303,7 +303,8 @@ import {
getIncomeProductList
} from '@api/index'
// import notice from '@/common/notice'
import moment from 'moment'
// import moment from 'moment'
import dayjs from 'dayjs'
import customTransOption from './customTransOption'
import storeFlowOption from './storeFlowOption'
import orderOption from './orderOption'
......@@ -480,8 +481,8 @@ export default {
getCustomerTransList({
yqMerchantId: this.isBeSuper ? this.id : '',
beginDateStr: moment().startOf('month').format('YYYY-MM-DD'),
endDateStr: moment().endOf('month').format('YYYY-MM-DD')
beginDateStr: dayjs().startOf('month').format('YYYY-MM-DD'),
endDateStr: dayjs().endOf('month').format('YYYY-MM-DD')
}).then((res) => {
const data = res
......@@ -553,7 +554,7 @@ export default {
const colors = ['rgba(0,110,214,0.4)', 'rgba(0,110,214,0.6)', 'rgba(0,110,214,1)']
var idObj = {}
for (var key in data) {
var index = moment(key).format('E') - 1
var index = dayjs(key).format('E') - 1
var list = data[key]
list.sort((a, b) => {
......@@ -607,7 +608,7 @@ export default {
this.showChartLoading(this.incomeFlowChart)
getIncomeFlowList({
yqMerchantId: this.isBeSuper ? this.id : '',
year: moment().format('YYYY')
year: dayjs().format('YYYY')
}).then((res) => {
const data = res
......@@ -662,25 +663,25 @@ export default {
switch (type) {
case 'today':
beginDateStr = moment().startOf('day').format('YYYY-MM-DD')
endDateStr = moment().endOf('day').format('YYYY-MM-DD')
beginDateStr = dayjs().startOf('day').format('YYYY-MM-DD')
endDateStr = dayjs().endOf('day').format('YYYY-MM-DD')
break
case 'yesterday':
beginDateStr = moment().subtract(1, 'day').startOf('day').format('YYYY-MM-DD')
endDateStr = moment().subtract(1, 'day').endOf('day').format('YYYY-MM-DD')
beginDateStr = dayjs().subtract(1, 'day').startOf('day').format('YYYY-MM-DD')
endDateStr = dayjs().subtract(1, 'day').endOf('day').format('YYYY-MM-DD')
break
case 'thisWeek':
// 0 - 周日,特殊处理
beginDateStr = moment().day() ? moment().day(1).startOf('day').format('YYYY-MM-DD') : moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD')
endDateStr = moment().day() ? moment().day(1).add(6, 'days').endOf('day').format('YYYY-MM-DD') : moment().endOf('day').format('YYYY-MM-DD')
beginDateStr = dayjs().day() ? dayjs().day(1).startOf('day').format('YYYY-MM-DD') : dayjs().subtract(6, 'days').startOf('day').format('YYYY-MM-DD')
endDateStr = dayjs().day() ? dayjs().day(1).add(6, 'days').endOf('day').format('YYYY-MM-DD') : dayjs().endOf('day').format('YYYY-MM-DD')
break
case 'thisMonth':
beginDateStr = moment().startOf('month').format('YYYY-MM-DD')
endDateStr = moment().endOf('month').format('YYYY-MM-DD')
beginDateStr = dayjs().startOf('month').format('YYYY-MM-DD')
endDateStr = dayjs().endOf('month').format('YYYY-MM-DD')
break
case 'thisYear':
beginDateStr = moment().startOf('year').format('YYYY-MM-DD')
endDateStr = moment().endOf('year').format('YYYY-MM-DD')
beginDateStr = dayjs().startOf('year').format('YYYY-MM-DD')
endDateStr = dayjs().endOf('year').format('YYYY-MM-DD')
break
}
......@@ -705,7 +706,7 @@ export default {
yqMerchantId: this.isBeSuper ? this.id : ''
}
if (this.customerType === 'today') {
params.needCompareDateStr = moment().startOf('day').format('YYYY-MM-DD')
params.needCompareDateStr = dayjs().startOf('day').format('YYYY-MM-DD')
}
getCustomerData(params).then((res) => {
console.log(res)
......
......@@ -95,7 +95,7 @@
:isVisible.sync="viewDetailVisible"
width="900px"
btnOkLabel="确定"
noCancel="true"
:noCancel="true"
@confirmDialog="handleViewClose"
@closeDialog="handleViewClose">
<el-tabs v-model="detailActiveName"
......@@ -108,7 +108,7 @@
</el-tab-pane>
<el-tab-pane label="C端零售业务"
name="second"
disabled="true">配置管理</el-tab-pane>
:disabled="true">配置管理</el-tab-pane>
</el-tabs>
</d2-dialog>
<!-- <division-rule
......@@ -178,7 +178,7 @@ export default {
inputType: 'number',
placeholder: '请输入园区店/导流方/服务商商户号',
isClear: true,
maxlength: '9',
maxlength: '9'
// keyFn: this.keyDowmGetList
}],
getListApi: getList,
......@@ -219,15 +219,37 @@ export default {
width: '120px'
}, {
label: '关联服务商名称',
prop: 'merchantName',
prop: 'partnerMerchants',
html: true,
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: '关联服务商号',
prop: 'merchantId',
html: true,
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: '分账类型',
......
......@@ -6,108 +6,78 @@
<p class="flex">
<span>门店名称:{{form.merchantName}}</span>
<span>业务类型:
<el-select
:size="size"
v-model="form.bizType"
>
<el-option
v-for="(item, index) in bizTypeList"
:key="index"
:value="item.confId"
:label="item.confLabel"
:disabled="item.confId === '2'"
></el-option>
<el-select :size="size"
v-model="form.bizType">
<el-option v-for="(item, index) in bizTypeList"
:key="index"
:value="item.confId"
:label="item.confLabel"
:disabled="item.confId === '2'"></el-option>
</el-select>
</span>
</p>
</div>
<div class="flex step-bar">
<p
@click="handleStep(1)"
:class="{'active': stepStat === 1}"
>财务设置</p>
<p
@click="handleStep(2)"
:class="{'active': stepStat === 2}"
>分账金额设置</p>
<p
@click="handleStep(3)"
:class="{'active': stepStat === 3}"
>分账测试</p>
<p
@click="handleStep(4)"
:class="{'active': stepStat === 4}"
>开启分账</p>
<p @click="handleStep(1)"
:class="{'active': stepStat === 1}">财务设置</p>
<p @click="handleStep(2)"
:class="{'active': stepStat === 2}">分账金额设置</p>
<p @click="handleStep(3)"
:class="{'active': stepStat === 3}">分账测试</p>
<p @click="handleStep(4)"
:class="{'active': stepStat === 4}">开启分账</p>
</div>
<block>
<step-one
ref="step1"
v-show="stepStat === 1"
:form="form"
@handleNextStep="handleNextStep"
></step-one>
<step-two
ref="step2"
v-if="stepStat === 2"
:smsForm="form"
:merchantInfo="ruleForm"
@handleNextStep="handleNextStep"
></step-two>
<step-three
ref="step3"
v-show="stepStat === 3"
:stepStat="stepStat"
:smsForm="form"
:merchantInfo="ruleForm"
@getRuleProgress="getInfo"
@changeParentVal="changeParentVal"
@handleSave="handleConfirm"
@handleNextStep="handleNextStep"
></step-three>
<step-four
ref="step4"
v-show="stepStat === 4"
:stepStat="stepStat"
:smsForm="form"
:merchantInfo="ruleForm"
@handleNextStep="handleNextStep"
></step-four>
</block>
<div>
<step-one ref="step1"
v-show="stepStat === 1"
:form="form"
@handleNextStep="handleNextStep"></step-one>
<step-two ref="step2"
v-if="stepStat === 2"
:smsForm="form"
:merchantInfo="ruleForm"
@handleNextStep="handleNextStep"></step-two>
<step-three ref="step3"
v-show="stepStat === 3"
:stepStat="stepStat"
:smsForm="form"
:merchantInfo="ruleForm"
@getRuleProgress="getInfo"
@changeParentVal="changeParentVal"
@handleSave="handleConfirm"
@handleNextStep="handleNextStep"></step-three>
<step-four ref="step4"
v-show="stepStat === 4"
:stepStat="stepStat"
:smsForm="form"
:merchantInfo="ruleForm"
@handleNextStep="handleNextStep"></step-four>
</div>
</div>
<!-- 短信模块 -->
<div
class="d2-container-content"
v-show="[1,2,4].includes(stepStat)"
>
<div class="d2-container-content"
v-show="[1,2,4].includes(stepStat)">
<p class="edit-sub-title">安全验证<span class="title-tips">提交信息后第二天生效!</span></p>
<el-form
ref="form"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px"
>
<el-form ref="form"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px">
<el-form-item label="管理员手机号验证">
{{adminInfo.name}} {{adminInfo.phone}}
<el-button
:size="size"
@click="handleSend"
:disabled="isSend"
>{{isSend ? sendMsg + '秒后,重试' : '发送验证短信'}}</el-button>
<el-button :size="size"
@click="handleSend"
:disabled="isSend">{{isSend ? sendMsg + '秒后,重试' : '发送验证短信'}}</el-button>
</el-form-item>
<el-form-item
label="验证码"
prop="smsCode"
>
<el-input
placeholder="请填写验证码"
v-model="form.smsCode"
:size="size"
style="width: 220px;"
>
<el-form-item label="验证码"
prop="smsCode">
<el-input placeholder="请填写验证码"
v-model="form.smsCode"
:size="size"
style="width: 220px;">
</el-input>
</el-form-item>
</el-form>
......@@ -115,22 +85,16 @@
<!-- 按钮模块 -->
<div class="d2-container-content box-btn">
<el-button
v-show="[2,3,4].includes(stepStat)"
:size="size"
@click="handleLastStep"
>上一步</el-button>
<el-button
type="primary"
v-show="isShowOkbtn"
:size="size"
@click="handleConfirm"
:disabled="isFirstSetEdit || isSecondSetEdit"
>确认</el-button>
<el-button
:size="size"
@click="handleCancel"
>取消</el-button>
<el-button v-show="[2,3,4].includes(stepStat)"
:size="size"
@click="handleLastStep">上一步</el-button>
<el-button type="primary"
v-show="isShowOkbtn"
:size="size"
@click="handleConfirm">确认</el-button>
<!-- :disabled="isFirstSetEdit || isSecondSetEdit" -->
<el-button :size="size"
@click="handleCancel">取消</el-button>
</div>
</d2-container>
</template>
......@@ -142,6 +106,7 @@ import stepTwo from './stepTwo'
import stepThree from './stepThree'
import stepFour from './stepFour'
import { mapActions } from 'vuex'
// getPartnerByYq
import { getRuleProgressApi, sendSms, getAdminInfo } from '@api/merchant'
import { BaseData, userType, ghUserType } from '@/common/constants.js'
export default {
......@@ -203,21 +168,24 @@ export default {
})
if (this.$route.params.merchantId) {
// console.log(this.$route.params)
this.merchantItem = {
merchantId: this.$route.params.merchantId,
merchantName: this.$route.params.merchantName,
channelType: this.$route.params.channelType,
userType: this.$route.params.userType,
parentMerchantName: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantName : '',
parentMerchantId: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantId : ''
}
Object.assign(this.form, this.merchantItem)
sessionStorage.setItem(this.sessionName, JSON.stringify(this.merchantItem))
// this.merchantItem = {
// merchantId: this.$route.params.merchantId,
// merchantName: this.$route.params.merchantName,
// channelType: this.$route.params.channelType,
// userType: this.$route.params.userType,
// parentMerchantName: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantName : '',
// parentMerchantId: this.$route.params.partnerMerchant ? this.$route.params.partnerMerchant.merchantId : ''
// }
const { merchantId, merchantName, channelType, userType, parentMerchantName, parentMerchantId, partnerMerchants, yqMerchantId, yqMerchantName } = this.$route.params
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)
} else {
Object.assign(this.form, JSON.parse(sessionStorage.getItem(this.sessionName)))
this.getRuleProgress(this.form.merchantId)
}
this.getBaseData()
},
......@@ -236,13 +204,16 @@ export default {
// this.getRuleProgress(this.form.merchantId, true, 3, (this.num % 2) ? 11 : 35)
this.getRuleProgress(this.form.merchantId, true, 3)
},
// 财务-步骤
getRuleProgress(merchantId, isJump = true, nextPage) {
getRuleProgressApi({ merchantId: merchantId }).then(res => {
// console.log(res)
console.log(res)
// console.log(isJump)
this.ruleForm = res
isJump ? (this.stepStat = res.progress) : this.handleStep(nextPage)
// 先写死调试
// this.stepStat = 1
isJump ? (this.stepStat = res ? 3 : 1) : this.handleStep(nextPage)
// isJump ? (this.stepStat = res ? res.progress : 1) : this.handleStep(nextPage)
})
},
......@@ -253,6 +224,7 @@ export default {
if ([35, 36].includes(this.ruleForm.subProgress)) {
return true
}
this.stepStat = val
},
......
.org-tree-container {
display: inline-block;
padding: 15px;
background-color: #fff;
}
.org-tree {
// display: inline-block;
display: table;
text-align: center;
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
.org-tree-node,
.org-tree-node-children {
position: relative;
margin: 0;
padding: 0;
list-style-type: none;
&:before,
&:after {
transition: all .35s;
}
}
.org-tree-node-label {
position: relative;
display: inline-block;
.org-tree-node-label-inner {
padding: 10px 15px;
text-align: center;
border-radius: 3px;
box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
}
}
.org-tree-node-btn {
position: absolute;
top: 100%;
left: 50%;
width: 20px;
height: 20px;
z-index: 10;
margin-left: -11px;
margin-top: 9px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0, 0, 0, .15);
cursor: pointer;
transition: all .35s ease;
&:hover {
background-color: #e7e8e9;
transform: scale(1.15);
}
&:before,
&:after {
content: '';
position: absolute;
}
&:before {
top: 50%;
left: 4px;
right: 4px;
height: 0;
border-top: 1px solid #ccc;
}
&:after {
top: 4px;
left: 50%;
bottom: 4px;
width: 0;
border-left: 1px solid #ccc;
}
&.expanded:after {
border: none;
}
}
.org-tree-node {
padding-top: 20px;
display: table-cell;
vertical-align: top;
&.is-leaf,
&.collapsed {
padding-left: 10px;
padding-right: 10px;
}
&:before,
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 19px;
}
&:after {
left: 50%;
border-left: 1px solid #ddd;
}
&:not(:first-child):before,
&:not(:last-child):after {
border-top: 1px solid #ddd;
}
}
.collapsable .org-tree-node.collapsed {
padding-bottom: 30px;
.org-tree-node-label:after {
content: '';
position: absolute;
top: 100%;
left: 0;
width: 50%;
height: 20px;
border-right: 1px solid #ddd;
}
}
.org-tree>.org-tree-node {
padding-top: 0;
&:after {
border-left: 0;
}
}
.org-tree-node-children {
padding-top: 20px;
display: table;
&:before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 20px;
border-left: 1px solid #ddd;
}
&:after {
content: '';
display: table;
clear: both;
}
}
.horizontal {
.org-tree-node {
// display: flex;
// flex-direction: row;
// justify-content: flex-start;
// align-items: center;
display: table-cell;
float: none;
padding-top: 0;
padding-left: 20px;
&.is-leaf,
&.collapsed {
padding-top: 10px;
padding-bottom: 10px;
}
&:before,
&:after {
width: 19px;
height: 50%;
}
&:after {
top: 50%;
left: 0;
border-left: 0;
}
&:only-child:before {
top: 1px;
border-bottom: 1px solid #ddd;
}
&:not(:first-child):before,
&:not(:last-child):after {
border-top: 0;
border-left: 1px solid #ddd;
}
&:not(:only-child):after {
border-top: 1px solid #ddd;
}
.org-tree-node-inner {
display: table;
}
}
.org-tree-node-label {
display: table-cell;
vertical-align: middle;
}
&.collapsable .org-tree-node.collapsed {
padding-right: 30px;
.org-tree-node-label:after {
top: 0;
left: 100%;
width: 20px;
height: 50%;
border-right: 0;
border-bottom: 1px solid #ddd;
}
}
.org-tree-node-btn {
top: 50%;
left: 100%;
margin-top: -11px;
margin-left: 9px;
}
&>.org-tree-node:only-child:before {
border-bottom: 0;
}
.org-tree-node-children {
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: flex-start;
display: table-cell;
padding-top: 0;
padding-left: 20px;
&:before {
top: 50%;
left: 0;
width: 20px;
height: 0;
border-left: 0;
border-top: 1px solid #ddd;
}
&:after {
display: none;
}
&>.org-tree-node {
display: block;
}
}
}
\ No newline at end of file
......@@ -24,7 +24,6 @@ const cdn = {
js: [
`${CDN_DOMAIN}/vue.min.js`,
`${CDN_DOMAIN}/vue-router.min.js`,
// `${CDN_DOMAIN}/element-ui/2.15.0/index.js`,
`${CDN_DOMAIN}/vuex.min.js`,
`${CDN_DOMAIN}/axios.min.js`,
`${CDN_DOMAIN}/js.cookie.min.js`,
......@@ -32,9 +31,10 @@ const cdn = {
`${CDN_DOMAIN}/echarts.min.js`,
`${CDN_DOMAIN}/lodash.min.js`,
`${CDN_DOMAIN}/qs.min.js`,
`${CDN_DOMAIN}/ua-parser.min.js`
// `${CDN_DOMAIN}/element-ui/2.15.0/index.js`,
// `${CDN_DOMAIN}/core-js/2.6.9/core.min.js`,
// `${CDN_DOMAIN}/vue-i18n/8.14.0/vue-i18n.esm.js`,
`${CDN_DOMAIN}/ua-parser.min.js`
// 'https://unpkg.com/better-scroll@1.15.2/dist/bscroll.min.js'
]
}
......@@ -73,7 +73,6 @@ module.exports = {
if (isDev) {
config.externals = {
vue: 'Vue',
// 'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
......@@ -81,10 +80,11 @@ module.exports = {
nprogress: 'NProgress',
echarts: 'echarts',
lodash: '_',
// 'vue-i18n':'vue-i18n',
'ua-parser-js': 'UAParser',
// 'better-scroll': 'BScroll',
qs: 'Qs'
// 'element-ui': 'ELEMENT',
// 'vue-i18n':'vue-i18n',
// 'better-scroll': 'BScroll',
// 'core-js': 'core-js'
}
}
......
......@@ -154,6 +154,11 @@
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz"
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
"@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0":
version "7.17.12"
resolved "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96"
integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz"
......@@ -190,6 +195,13 @@
"@babel/template" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/helper-skip-transparent-expression-wrappers@^7.16.0":
version "7.16.0"
resolved "https://registry.npmmirror.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09"
integrity sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==
dependencies:
"@babel/types" "^7.16.0"
"@babel/helper-split-export-declaration@^7.4.4":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz"
......@@ -197,6 +209,11 @@
dependencies:
"@babel/types" "^7.4.4"
"@babel/helper-validator-identifier@^7.16.7":
version "7.16.7"
resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
"@babel/helper-wrap-function@^7.1.0":
version "7.2.0"
resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz"
......@@ -280,6 +297,15 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
"@babel/plugin-proposal-optional-chaining@^7.17.12":
version "7.17.12"
resolved "https://registry.npmmirror.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174"
integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ==
dependencies:
"@babel/helper-plugin-utils" "^7.17.12"
"@babel/helper-skip-transparent-expression-wrappers" "^7.16.0"
"@babel/plugin-syntax-optional-chaining" "^7.8.3"
"@babel/plugin-proposal-unicode-property-regex@^7.2.0":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz"
......@@ -338,6 +364,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-chaining@^7.8.3":
version "7.8.3"
resolved "https://registry.npmmirror.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a"
integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-transform-arrow-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz"
......@@ -670,6 +703,14 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@babel/types@^7.16.0":
version "7.18.4"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354"
integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==
dependencies:
"@babel/helper-validator-identifier" "^7.16.7"
to-fast-properties "^2.0.0"
"@hapi/address@2.x.x":
version "2.0.0"
resolved "https://registry.npmjs.org/@hapi/address/-/address-2.0.0.tgz"
......@@ -9998,6 +10039,11 @@ vue-template-es2015-compiler@^1.6.0, vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue2-org-tree@^1.3.6:
version "1.3.6"
resolved "https://registry.npmmirror.com/vue2-org-tree/-/vue2-org-tree-1.3.6.tgz#03e9c369c4f02b1bc77e541d45b04c7f021b3907"
integrity sha512-ExkQWmHcS3s1tjPDdaruE2p4JnfwOTc4MBqqMY7rsSM9pgzD53t6hbjyNOq9csnyugzREdCnX5V/ZHQMREDYZQ==
vue@^2.6.10:
version "2.6.10"
resolved "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!