Commit 524b4d2d by wangql

提交v4.10.0功能代码

1 parent 744c16a3
...@@ -56,3 +56,9 @@ export function downloadTemplate(data) { ...@@ -56,3 +56,9 @@ export function downloadTemplate(data) {
data.method = `${path2}order.downloadTemplate` data.method = `${path2}order.downloadTemplate`
return request(data, 'post') return request(data, 'post')
} }
// 订单退款
export function markAsRefunded(data) {
data.method = `${path2}goodsOrder.markAsRefunded`
return request(data, 'post')
}
...@@ -63,6 +63,7 @@ export function commonConfigApi(data) { ...@@ -63,6 +63,7 @@ export function commonConfigApi(data) {
// Excel异步导出 // Excel异步导出
export function asyncExportEecel(data) { export function asyncExportEecel(data) {
data.method = `${path}common.async.exportExcel` data.method = `${path}common.async.exportExcel`
return request(data, RequestMethods.POST)
} }
// 获取Excel异步导出查询导出结果 // 获取Excel异步导出查询导出结果
......
<!-- 客户列表 --> <!-- 客户列表 -->
<template> <template>
<d2-container class="customer-list"> <d2-container class="customer-list">
<div <div class="header"
class="header" slot="header">
slot="header" <d2-search ref="showSearch"
> class="show-search"
<d2-search :searchForm="searchForm"
ref="showSearch" :formData="showFormData">
class="show-search"
:searchForm="searchForm"
:formData="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button size="small"
size="small" type="primary"
type="primary" @click="handleSearch">查询</el-button>
@click="handleSearch" <el-button size="small"
>查询</el-button> @click="handleReset">重置</el-button>
<el-button
size="small"
@click="handleReset"
>重置</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -30,127 +22,98 @@ ...@@ -30,127 +22,98 @@
<auth-button category="Button"></auth-button> <auth-button category="Button"></auth-button>
</d2-table-header> </d2-table-header>
<el-table :data="tableData"> <el-table :data="tableData">
<el-table-column <el-table-column label="序号"
label="序号" width="60px"
width="60px" type='index'
type='index' align="center"></el-table-column>
align="center"
></el-table-column>
<el-table-column label="客户信息"> <el-table-column label="客户信息">
<el-table-column <el-table-column label="客户姓名"
label="客户姓名" prop="customerName"
prop="customerName" align="center"></el-table-column>
align="center" <el-table-column label="性别"
></el-table-column> align="center">
<el-table-column
label="性别"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.customerSex === 1 ? '男' : '女'}}</span> <span>{{scope.row.customerSex === 1 ? '男' : '女'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="品牌车型"
label="品牌车型" align="center"
align="center" width="150px">
width="150px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.carBrand || ''}}{{scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : ''}}{{scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : ''}}</span> <span>{{scope.row.carBrand || ''}}{{scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : ''}}{{scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : ''}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="车架号"
label="车架号" align="center"
align="center" prop="standNo"></el-table-column>
prop="standNo" <el-table-column label="客户状态"
></el-table-column> align="center">
<el-table-column
label="客户状态"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span <!-- <span
class="red" class="red"
v-if="customerStatusObj[1].includes(scope.row.status)" v-if="customerStatusObj[1].includes(scope.row.status)"
>未完成</span> >未完成</span>
<span v-else>已完成</span> --> <span v-else>已完成</span> -->
<span :class="{ 'red': scope.row.status === 1 }">{{baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel}}</span> <span
:class="{ 'red': scope.row.status === 1 }">{{baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel}}</span>
<!-- <span>{{scope.row.status}}</span> --> <!-- <span>{{scope.row.status}}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="服务时间"
label="服务时间" align="center">
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : ''}}</span> <span>{{scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : ''}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="备注信息"
label="备注信息" align="center"
align="center" prop="order.remark">
prop="order.remark"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ? (scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无'}}</span> <span>{{scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ? (scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无'}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="关联信息"> <el-table-column label="关联信息">
<el-table-column <el-table-column label="流量来源"
label="流量来源" align="center"
align="center" prop="merchantName"
prop="merchantName" width="170"></el-table-column>
width="170" <el-table-column label="推荐人"
></el-table-column> align="center"
<el-table-column prop="employeeName">
label="推荐人"
align="center"
prop="employeeName"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? scope.row.order.employeeName : ''}}</span> <span>{{scope.row.order ? scope.row.order.employeeName : ''}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="园区店"
label="园区店" align="center"
align="center" prop="yqMerchantName"
prop="yqMerchantName" width="170px"></el-table-column>
width="170px" <el-table-column label="转化专员"
></el-table-column> align="center"
<el-table-column prop="order.sellerName"></el-table-column>
label="转化专员"
align="center"
prop="order.sellerName"
></el-table-column>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="创建时间"
label="创建时间" align="center">
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{new Date(scope.row.createdDate).toLocaleDateString()}}</span> <span>{{new Date(scope.row.createdDate).toLocaleDateString()}}</span>
</template></el-table-column> </template></el-table-column>
<el-table-column <el-table-column label="创建方式"
label="创建方式" align="center"
align="center" prop="source">
prop="source"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' : '系统录入')): (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入'))}}</span> <span>{{scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' : '系统录入')): (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入'))}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination background
background @size-change="handleSizeChange"
@size-change="handleSizeChange" @current-change="handleCurrentChange"
@current-change="handleCurrentChange" :current-page="page.pageNum"
:current-page="page.pageNum" :page-sizes="[10,20,30,40]"
:page-sizes="[10,20,30,40]" :page-size="page.pageSize"
:page-size="page.pageSize" :total="total"
:total="total" layout="sizes,total,->,prev,pager,next,jumper">
layout="sizes,total,->,prev,pager,next,jumper"
>
</el-pagination> </el-pagination>
</div> </div>
</d2-container> </d2-container>
...@@ -159,6 +122,8 @@ ...@@ -159,6 +122,8 @@
<script> <script>
import { getList, exportFile, orderCount } from '@api/customerList' import { getList, exportFile, orderCount } from '@api/customerList'
import { getServiceStore, getParkStore } from '@api/editCustomer' import { getServiceStore, getParkStore } from '@api/editCustomer'
import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'index', name: 'index',
data() { data() {
...@@ -294,6 +259,12 @@ export default { ...@@ -294,6 +259,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
if (this.userInfo.beSuper) { if (this.userInfo.beSuper) {
getParkStore({}).then(res => { getParkStore({}).then(res => {
...@@ -312,6 +283,7 @@ export default { ...@@ -312,6 +283,7 @@ export default {
}, },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
getParams() { getParams() {
var params = { var params = {
merchantId: this.searchForm.merchantId, merchantId: this.searchForm.merchantId,
...@@ -410,8 +382,20 @@ export default { ...@@ -410,8 +382,20 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
params.pageNum = 1 params.pageNum = 1
exportFile(params).then(res => { params.method = 'dj.api.customer.exportExcel'
this.$open(res) // exportFile(params).then(res => {
// this.$open(res)
// })
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '客户列表',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
} }
} }
......
...@@ -159,11 +159,12 @@ ...@@ -159,11 +159,12 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { Util } from '@/common/util' import { Util } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { getListApi, getCountApi, exportApi } from '@/api/account' import { getListApi, getCountApi, exportApi } from '@/api/account'
import { getPlatformMerchantList } from '@api/index' import { getPlatformMerchantList } from '@api/index'
import { orderTypeList } from '@/common/constants.js' import { orderTypeList } from '@/common/constants.js'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'offlineAccountList', name: 'offlineAccountList',
data() { data() {
...@@ -246,6 +247,12 @@ export default { ...@@ -246,6 +247,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
// this.searchForm.successDate = getCurrentSixMonth() // this.searchForm.successDate = getCurrentSixMonth()
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
...@@ -271,6 +278,7 @@ export default { ...@@ -271,6 +278,7 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
...@@ -380,8 +388,21 @@ export default { ...@@ -380,8 +388,21 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
exportApi(params).then(res => { // exportApi(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.orderDivision.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '分账列表-线下分账(超管/园区店)',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
}) })
} }
} }
......
...@@ -177,11 +177,12 @@ ...@@ -177,11 +177,12 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { Util } from '@/common/util' import { Util } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { divisionStatusList, orderTypeList } from '@/common/constants.js' import { divisionStatusList, orderTypeList } from '@/common/constants.js'
import { getListApi, getCountApi, exportApi } from '@/api/account' import { getListApi, getCountApi, exportApi } from '@/api/account'
import { getPlatformMerchantList } from '@api/index' import { getPlatformMerchantList } from '@api/index'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'onlineAccountList', name: 'onlineAccountList',
data() { data() {
...@@ -295,6 +296,12 @@ export default { ...@@ -295,6 +296,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
// this.searchForm.divisionDate = getCurrentSixMonth() // this.searchForm.divisionDate = getCurrentSixMonth()
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
...@@ -321,6 +328,7 @@ export default { ...@@ -321,6 +328,7 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
...@@ -440,8 +448,22 @@ export default { ...@@ -440,8 +448,22 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
exportApi(params).then(res => { // exportApi(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.orderDivision.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '分账列表-线上分账(超管/园区店)',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
}) })
} }
} }
......
...@@ -36,11 +36,12 @@ ...@@ -36,11 +36,12 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { Util } from '@/common/util' import { Util } from '@/common/util'
// import { divisionTypeList } from '@/common/constants.js' // import { divisionTypeList } from '@/common/constants.js'
// getSeviceCountApi, getSeviceListApi, exportSeviceApi, // getSeviceCountApi, getSeviceListApi, exportSeviceApi,
import { getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account' import { getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'serviceOfflineList', name: 'serviceOfflineList',
data() { data() {
...@@ -165,6 +166,12 @@ export default { ...@@ -165,6 +166,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.getCount() this.getCount()
getPartnerYqListApi({}).then(res => { getPartnerYqListApi({}).then(res => {
...@@ -177,6 +184,7 @@ export default { ...@@ -177,6 +184,7 @@ export default {
...mapActions({ ...mapActions({
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleAccTypeChange(value) { handleAccTypeChange(value) {
(value !== '2') && (this.searchForm.divisionStatus = '') (value !== '2') && (this.searchForm.divisionStatus = '')
...@@ -262,8 +270,22 @@ export default { ...@@ -262,8 +270,22 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
// exportSeviceApi(params).then(res => { // exportSeviceApi(params).then(res => {
getSeviceExport(params).then(res => { // getSeviceExport(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.sevicerOrderDivision.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '分账列表-线下分账(服务商)',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
}) })
} }
} }
......
...@@ -78,13 +78,12 @@ ...@@ -78,13 +78,12 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { Util } from '@/common/util' import { Util } from '@/common/util'
import cashDialog from './cashDialog' import cashDialog from './cashDialog'
import { divisionStatusList } from '@/common/constants.js' import { divisionStatusList } from '@/common/constants.js'
// import { getPartnerYqListApi } from '@api/editCustomer'
// exportSeviceApi getSeviceListApi, getSeviceCountApi,
import { getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account' import { getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'serviceOnlineList', name: 'serviceOnlineList',
data() { data() {
...@@ -255,6 +254,12 @@ export default { ...@@ -255,6 +254,12 @@ export default {
cashDialog cashDialog
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.getCount() this.getCount()
// this.getBankBalance() // this.getBankBalance()
...@@ -268,6 +273,7 @@ export default { ...@@ -268,6 +273,7 @@ export default {
...mapActions({ ...mapActions({
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleAccTypeChange(value) { handleAccTypeChange(value) {
(value !== '2') && (this.searchForm.divisionStatus = '') (value !== '2') && (this.searchForm.divisionStatus = '')
...@@ -382,8 +388,22 @@ export default { ...@@ -382,8 +388,22 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
// exportSeviceApi(params).then(res => { // exportSeviceApi(params).then(res => {
getSeviceExport(params).then(res => { // getSeviceExport(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.sevicerOrderDivision.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '分账列表-线上分账(服务商)',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose()
}) })
} }
} }
......
...@@ -89,7 +89,9 @@ import { ...@@ -89,7 +89,9 @@ import {
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'
// import { getMerchantList } from '@api/serviceManage' import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
import qs from 'qs'
export default { export default {
name: 'downloadAccountDialog', name: 'downloadAccountDialog',
data() { data() {
...@@ -181,11 +183,18 @@ export default { ...@@ -181,11 +183,18 @@ export default {
}, },
components: {}, components: {},
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.selectMerchant() this.selectMerchant()
}, },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
selectMerchant() { selectMerchant() {
var params = {} var params = {}
params.currentPage = 1 params.currentPage = 1
...@@ -272,10 +281,35 @@ export default { ...@@ -272,10 +281,35 @@ export default {
if (infoForm.merchantType == '7') { if (infoForm.merchantType == '7') {
params.reportType = infoForm.reportType params.reportType = infoForm.reportType
} }
console.log(params)
api.exportAccountStatement(params).then(res => { // api.exportAccountStatement(params).then(res => {
window.location.href = res // window.location.href = res
// this.handleClose()
// })
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement'
// params.merchantList = qs.stringify({ merchantList: params.merchantList }, {
// arrayFormat: 'indices',
// allowDots: true,
// encodeValuesOnly: true
// })
console.log(params);
var objStr = qs.stringify(params, {
arrayFormat: 'indices',
allowDots: true,
encodeValuesOnly: true
})
asyncExportEecel({ exportParam: objStr }).then(res => {
const list = [
...this.dowloadList,
{
name: '对账单',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose() this.handleClose()
}) })
} }
......
...@@ -555,7 +555,7 @@ import * as api from '@api/finance' ...@@ -555,7 +555,7 @@ import * as api from '@api/finance'
import { getTransferData, getPlatformMerchantList } from '@api/index' import { getTransferData, getPlatformMerchantList } from '@api/index'
import funnelOption from '../index/funnelOption' import funnelOption from '../index/funnelOption'
import { getServiceStore, getParkStore } from '@api/editCustomer' import { getServiceStore, getParkStore } from '@api/editCustomer'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { import {
divisionTypeList, divisionTypeList,
payTypeList, payTypeList,
...@@ -565,6 +565,7 @@ import { ...@@ -565,6 +565,7 @@ import {
import downloadAccountDialog from './downloadAccountDialog' import downloadAccountDialog from './downloadAccountDialog'
import warehouseDetail from './warehouseDetail' import warehouseDetail from './warehouseDetail'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'financeList', name: 'financeList',
components: { components: {
...@@ -755,6 +756,12 @@ export default { ...@@ -755,6 +756,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
// console.log(document.getElementById('financeChart')) // console.log(document.getElementById('financeChart'))
if (this.userInfo.beSuper) { if (this.userInfo.beSuper) {
...@@ -798,6 +805,7 @@ export default { ...@@ -798,6 +805,7 @@ export default {
}, },
methods: { methods: {
...mapActions({ close: 'd2admin/page/close' }), ...mapActions({ close: 'd2admin/page/close' }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleAddClose(isRefresh = false) { }, handleAddClose(isRefresh = false) { },
drawFunnelChart() { drawFunnelChart() {
// console.log(funnelOption) // console.log(funnelOption)
...@@ -838,9 +846,22 @@ export default { ...@@ -838,9 +846,22 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
params.currentPage = 1 params.currentPage = 1
api.exportFile(params).then(res => { // api.exportFile(params).then(res => {
// window.open(res, '_blank') // // window.open(res, '_blank')
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '合并导出',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
}, },
// 下载对账单 // 下载对账单
......
...@@ -443,9 +443,10 @@ import warehouseDetail from './warehouseDetail' ...@@ -443,9 +443,10 @@ import warehouseDetail from './warehouseDetail'
import { exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance' import { exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance'
import { getPartnerYqListApi } from '@/api/account' import { getPartnerYqListApi } from '@/api/account'
import { getServiceStore } from '@api/editCustomer' import { getServiceStore } from '@api/editCustomer'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { divisionTypeList, payTypeList } from '@/common/constants.js' import { divisionTypeList, payTypeList } from '@/common/constants.js'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'serviceFinanceList', name: 'serviceFinanceList',
data() { data() {
...@@ -630,6 +631,12 @@ export default { ...@@ -630,6 +631,12 @@ export default {
// captchaInput // captchaInput
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.getList() this.getList()
...@@ -654,6 +661,7 @@ export default { ...@@ -654,6 +661,7 @@ export default {
}, },
methods: { methods: {
...mapActions({ close: 'd2admin/page/close' }), ...mapActions({ close: 'd2admin/page/close' }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleAddClose(isRefresh = false) { handleAddClose(isRefresh = false) {
}, },
...@@ -699,9 +707,22 @@ export default { ...@@ -699,9 +707,22 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
params.pageNum = 1 params.pageNum = 1
exportFile(params).then(res => { // exportFile(params).then(res => {
// window.open(res, '_blank') // // window.open(res, '_blank')
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '合并导出',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
}, },
// 查看明细 // 查看明细
......
...@@ -97,10 +97,11 @@ import { getList, exportBaseList, baseGoodsUpOrDown, baseGoodsDelete, baseGoodsU ...@@ -97,10 +97,11 @@ import { getList, exportBaseList, baseGoodsUpOrDown, baseGoodsDelete, baseGoodsU
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { BaseData, brandMerchantList } from '@/common/constants.js' import { BaseData, brandMerchantList } from '@/common/constants.js'
import { exportJsonToExcel } from '@/common/Export2Excel.js' import { exportJsonToExcel } from '@/common/Export2Excel.js'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import _ from 'lodash' import _ from 'lodash'
import storeDetail from './storeDetail' import storeDetail from './storeDetail'
import drawerDetail from './drawerDetail' import drawerDetail from './drawerDetail'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'commodity', name: 'commodity',
data() { data() {
...@@ -308,6 +309,12 @@ export default { ...@@ -308,6 +309,12 @@ export default {
drawerDetail drawerDetail
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
const $store = this.$store.getters['d2admin/auth/curBtns'] const $store = this.$store.getters['d2admin/auth/curBtns']
console.log($store) console.log($store)
...@@ -333,6 +340,7 @@ export default { ...@@ -333,6 +340,7 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType)) this.baseData.productTypeList = _.cloneDeep(await this.get(BaseData.productType))
this.baseData.productTypeList.unshift({ this.baseData.productTypeList.unshift({
...@@ -393,13 +401,27 @@ export default { ...@@ -393,13 +401,27 @@ export default {
}) })
}, },
handleExport() { handleExport() {
const tHeader = ['序号', '商品ID', '商品名称', '分类', '绑定商品数(件)', '分配门店数(家)', '园区店名称', '创建时间', '审核时间', '审核状态', '状态'] // const tHeader = ['序号', '商品ID', '商品名称', '分类', '绑定商品数(件)', '分配门店数(家)', '园区店名称', '创建时间', '审核时间', '审核状态', '状态']
const fieldVal = ['index', 'goodsCode', 'goodsName', 'goodsTypeName', 'upgradeGoodsNum', 'merchantNum', 'yqMerchantNames', 'createdDate', 'reviewDate', 'reviewStatus', 'status'] // const fieldVal = ['index', 'goodsCode', 'goodsName', 'goodsTypeName', 'upgradeGoodsNum', 'merchantNum', 'yqMerchantNames', 'createdDate', 'reviewDate', 'reviewStatus', 'status']
exportBaseList(this.searchForm).then(res => { // exportBaseList(this.searchForm).then(res => {
require.ensure([], () => { // require.ensure([], () => {
const data = this.formatJson(fieldVal, res) // const data = this.formatJson(fieldVal, res)
exportJsonToExcel(tHeader, data, '基础商品列表') // exportJsonToExcel(tHeader, data, '基础商品列表')
}) // })
// })
var params = this.searchForm
params.method = 'dj.api.basegoods.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '基础商品列表',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
}, },
formatJson(filterVal, jsonData) { formatJson(filterVal, jsonData) {
......
...@@ -47,6 +47,8 @@ import storeList from './storeList' ...@@ -47,6 +47,8 @@ import storeList from './storeList'
import couponsDetail from './couponsDetail' import couponsDetail from './couponsDetail'
import editCouponsDialog from './editCouponsDialog' import editCouponsDialog from './editCouponsDialog'
import { exportListApi, exportDetailListApi } from '@api/coupons' import { exportListApi, exportDetailListApi } from '@api/coupons'
import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'coupons', name: 'coupons',
data() { data() {
...@@ -80,9 +82,16 @@ export default { ...@@ -80,9 +82,16 @@ export default {
editCouponsDialog editCouponsDialog
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { }, mounted() { },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleSearch() { handleSearch() {
// console.log(this.activeName) // console.log(this.activeName)
this.$refs[this.activeName].keyDowmGetList() this.$refs[this.activeName].keyDowmGetList()
...@@ -95,19 +104,46 @@ export default { ...@@ -95,19 +104,46 @@ export default {
} }
}, },
handleExport() { handleExport() {
this.activeName === 'storeList' // this.activeName === 'storeList'
? exportListApi({ // ? exportListApi({
...this.parentSearchForm, // ...this.parentSearchForm,
currentPage: 1 // currentPage: 1
}).then(res => { // }).then(res => {
this.$open(res) // this.$open(res)
}) // })
: exportDetailListApi({ // : exportDetailListApi({
...this.parentSearchForm, // ...this.parentSearchForm,
currentPage: 1 // currentPage: 1
}).then(res => { // }).then(res => {
this.$open(res) // this.$open(res)
}) // })
var method = this.activeName === 'storeList'
? 'dj.api.life.merchant.coupon.exportExcel'
: 'dj.api.life.customer.coupon.exportExcel'
var params = {
...this.parentSearchForm,
currentPage: 1,
method: method
}
console.log(params);
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: this.activeName === 'storeList'
? '店面列表'
: '领用明细',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
})
}, },
handleAdd() { handleAdd() {
this.couponsVisible = !this.couponsVisible this.couponsVisible = !this.couponsVisible
......
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
import _ from 'lodash' import _ from 'lodash'
import { getList, deleteGoods, checkDeleteGoods, exportGoodsList } from '@api/product' import { getList, deleteGoods, checkDeleteGoods, exportGoodsList } from '@api/product'
import { BaseData, brandMerchantList } from '@/common/constants.js' import { BaseData, brandMerchantList } from '@/common/constants.js'
import { mapActions } from 'vuex' import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
// import { exportJsonToExcel } from '@/common/Export2Excel.js' // import { exportJsonToExcel } from '@/common/Export2Excel.js'
export default { export default {
name: 'product', name: 'product',
...@@ -165,6 +166,12 @@ export default { ...@@ -165,6 +166,12 @@ export default {
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.baseData.brandList = _.cloneDeep(brandMerchantList) this.baseData.brandList = _.cloneDeep(brandMerchantList)
var allOpt = { confId: '', confValue: '全部' } var allOpt = { confId: '', confValue: '全部' }
...@@ -174,6 +181,7 @@ export default { ...@@ -174,6 +181,7 @@ export default {
}, },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapActions({ ...mapActions({
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
...@@ -227,8 +235,21 @@ export default { ...@@ -227,8 +235,21 @@ export default {
// const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态'] // const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态']
// const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr'] // const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr']
// 改为调用后端下载 // 改为调用后端下载
exportGoodsList(this.searchForm).then(res => { // exportGoodsList(this.searchForm).then(res => {
this.$open(res) // this.$open(res)
// })
var params = this.searchForm
params.method = 'dj.api.goodsinfo.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '素材列表',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
// exportGoodsList(this.searchForm).then(res => { // exportGoodsList(this.searchForm).then(res => {
// require.ensure([], () => { // require.ensure([], () => {
......
...@@ -45,6 +45,8 @@ import outputValueDialog from './outputValueDialog' ...@@ -45,6 +45,8 @@ import outputValueDialog from './outputValueDialog'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getExportDailyReport } from '@api/index' import { getExportDailyReport } from '@api/index'
import { downLoadFile } from '@/common/util' import { downLoadFile } from '@/common/util'
import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'reportDownloadsCom', name: 'reportDownloadsCom',
components: { components: {
...@@ -66,20 +68,41 @@ export default { ...@@ -66,20 +68,41 @@ export default {
exportDailyReportBtn: false exportDailyReportBtn: false
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
}, },
methods: { methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
exportDailyReport() { exportDailyReport() {
if (!this.dateValue) return this.$message.warning('请选择日期') if (!this.dateValue) return this.$message.warning('请选择日期')
this.exportDailyReportBtn = true this.exportDailyReportBtn = true
// console.log(downLoadFile) // console.log(downLoadFile)
// return // return
getExportDailyReport({ endDateStr: this.dateValue }).then((result) => { var params = {}
params.method = 'dj.api.smartcarlife.workbench.exportDailyReport'
params.endDateStr = this.dateValue
asyncExportEecel({ exportParam: JSON.stringify(params) }).then((result) => {
// getExportDailyReport({ endDateStr: this.dateValue }).then((result) => {
// if (result.code == 0) { // if (result.code == 0) {
// console.log(downLoadFile) // console.log(downLoadFile)
// console.log(result) // console.log(result)
downLoadFile(result) // downLoadFile(result)
// } // }
console.log(JSON.parse(result));
const list = [
...this.dowloadList,
{
name: '日报表',
uuid: JSON.parse(result).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}).finally((result) => { }).finally((result) => {
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<template> <template>
<d2-container class="order-detail"> <d2-container class="order-detail">
<div class="d2-container-content"> <div class="d2-container-content">
<p class="edit-title">订单详情<el-button v-if="signRefundFlag" <p class="edit-title">订单详情&nbsp;&nbsp;&nbsp;<el-button size="mini"
icon="signRefundIcon" v-if="signRefundFlag && [4, 6].includes(detail.status)"
@click="refund">标记为退款</el-button> class="signRefundIcon"
@click="refund"><img src="./images/sign.png" /> 标记为退款</el-button>
</p> </p>
<div class="form_gp"> <div class="form_gp">
<p class="edit-sub-title">订单详情</p> <p class="edit-sub-title">订单详情</p>
...@@ -31,6 +32,11 @@ ...@@ -31,6 +32,11 @@
@click="handleEnlargeImg" /> @click="handleEnlargeImg" />
<span v-else>无</span> <span v-else>无</span>
</el-form-item> </el-form-item>
<el-form-item label="退款订单:"
v-if="detail.status == 12">{{detail.refundRemark}}</el-form-item>
<!-- <el-form-item label="退款订单:"
v-if="detail.status == 12">
啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊</el-form-item> -->
</el-form> </el-form>
</div> </div>
<div class="form_gp"> <div class="form_gp">
...@@ -156,6 +162,7 @@ ...@@ -156,6 +162,7 @@
</el-dialog> </el-dialog>
<sign-refund-dialog :signRefundVisible="signRefundVisible" <sign-refund-dialog :signRefundVisible="signRefundVisible"
:detail="detail"
v-if="signRefundVisible" v-if="signRefundVisible"
@dialogClose="dialogClose"></sign-refund-dialog> @dialogClose="dialogClose"></sign-refund-dialog>
</d2-container> </d2-container>
...@@ -164,8 +171,8 @@ ...@@ -164,8 +171,8 @@
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import signRefundDialog from './signRefundDialog' import signRefundDialog from './signRefundDialog'
// import { getOrderDetail } from '@api/order'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getList } from '@api/order'
export default { export default {
name: 'orderDetail', name: 'orderDetail',
components: { components: {
...@@ -184,7 +191,7 @@ export default { ...@@ -184,7 +191,7 @@ export default {
3: '待支付', 3: '待支付',
4: '已支付', 4: '已支付',
// 5: '已退款', // 5: '已退款',
6: '已完成', 6: '已评价',
9: '已撤销', 9: '已撤销',
10: '已关闭', 10: '已关闭',
11: '错误订单', 11: '错误订单',
...@@ -218,13 +225,17 @@ export default { ...@@ -218,13 +225,17 @@ export default {
progressList: [], progressList: [],
signRefundVisible: false, signRefundVisible: false,
signRefundFlag: false, signRefundFlag: false,
page: {
pageNum: 1,
pageSize: 20
}
} }
}, },
mounted() { mounted() {
this.detail = this.$route.params.detail this.detail = this.$route.params.detail
this.signRefundFlag = this.$route.params.signRefundFlag this.signRefundFlag = this.$route.params.signRefundFlag
console.log(this.signRefundFlag); console.log(this.signRefundFlag)
if (this.detail.source == 7) { if (this.detail.source == 7) {
this.detail.createdDate = dayjs(this.detail.createdDate).format('YYYY-MM-DD HH:mm:ss') this.detail.createdDate = dayjs(this.detail.createdDate).format('YYYY-MM-DD HH:mm:ss')
...@@ -288,9 +299,22 @@ export default { ...@@ -288,9 +299,22 @@ export default {
this.signRefundVisible = !this.signRefundVisible this.signRefundVisible = !this.signRefundVisible
}, },
dialogClose() { dialogClose(flag) {
this.signRefundVisible = !this.signRefundVisible this.signRefundVisible = !this.signRefundVisible
if (flag) {
this.getList()
}
}, },
getList() {
var params = {
...this.page,
orderCode: this.detail.orderCode
}
getList(params).then(res => {
this.detail = res.list[0]
})
}
} }
} }
...@@ -337,8 +361,6 @@ export default { ...@@ -337,8 +361,6 @@ export default {
} }
} }
.signRefundIcon { .signRefundIcon {
background: url('images/sign.png') no-repeat; margin-left: 10px;
font-size: 16px;
background-size: cover;
} }
</style> </style>
...@@ -257,8 +257,8 @@ ...@@ -257,8 +257,8 @@
import { Util } from '@/common/util' import { Util } from '@/common/util'
import { getList, exportFile, getOrderCount, waitinputorderCount, orderImport, downloadTemplate } from '@api/order' import { getList, exportFile, getOrderCount, waitinputorderCount, orderImport, downloadTemplate } from '@api/order'
import { mapActions, mapState, mapMutations } from 'vuex' import { mapActions, mapState, mapMutations } from 'vuex'
// import { mapActions, mapState } from 'vuex'
import { getServiceStore, getParkStore } from '@api/editCustomer' import { getServiceStore, getParkStore } from '@api/editCustomer'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'orderList', name: 'orderList',
data() { data() {
...@@ -722,8 +722,20 @@ export default { ...@@ -722,8 +722,20 @@ export default {
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
params.pageNum = 1 params.pageNum = 1
exportFile(params).then(res => { // exportFile(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.ordermanage.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '订单列表',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
}, },
// 查看详情 // 查看详情
......
...@@ -57,9 +57,10 @@ ...@@ -57,9 +57,10 @@
<script> <script>
import { Util } from '@/common/util' import { Util } from '@/common/util'
import _ from 'lodash' import _ from 'lodash'
import { mapActions } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
import { waitinputorderCount, waitinputorderPage, waitinputorderExport, getList } from '@api/order' import { waitinputorderCount, waitinputorderPage, waitinputorderExport, getList } from '@api/order'
import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'orderSupplement', name: 'orderSupplement',
data() { data() {
...@@ -244,8 +245,13 @@ export default { ...@@ -244,8 +245,13 @@ export default {
} }
} }
}, },
computed: {
...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
this.userInfo.beSuper && getParkStore({}).then(res => { this.userInfo.beSuper && getParkStore({}).then(res => {
res.forEach(item => { res.forEach(item => {
item.merchantId = item.merchantNo item.merchantId = item.merchantNo
...@@ -261,6 +267,7 @@ export default { ...@@ -261,6 +267,7 @@ export default {
get: 'd2admin/base/get', get: 'd2admin/base/get',
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -338,8 +345,20 @@ export default { ...@@ -338,8 +345,20 @@ export default {
handleExport() { handleExport() {
var params = this.searchFormSearch var params = this.searchFormSearch
waitinputorderExport(params).then(res => { // waitinputorderExport(params).then(res => {
this.$open(res) // this.$open(res)
// })
params.method = 'dj.api.smartcarlife.waitinputorder.export'
asyncExportEecel({ exportParam: JSON.stringify(params) }).then(res => {
const list = [
...this.dowloadList,
{
name: '订单补录列表',
uuid: JSON.parse(res).data,
ifSuccess: false,
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}) })
}, },
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<el-input type="textarea" <el-input type="textarea"
:rows="5" :rows="5"
placeholder="不超过100个字。" placeholder="不超过100个字。"
maxlength="100"
show-word-limit
v-model="infoForm.remark"> v-model="infoForm.remark">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -21,17 +23,14 @@ ...@@ -21,17 +23,14 @@
<script> <script>
import { getMerchantPageSearch } from '@api/publicAccount' import { getMerchantPageSearch } from '@api/publicAccount'
import { markAsRefunded } from '@api/order'
export default { export default {
name: 'signRefundDialog', name: 'signRefundDialog',
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
merchantType: '', remark: '',
merchant: [],
payStartDate: '',
payEndDate: '',
reportType: '1'
}, },
formRules: { formRules: {
...@@ -44,6 +43,10 @@ export default { ...@@ -44,6 +43,10 @@ export default {
signRefundVisible: { signRefundVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
detail: {
type: Object,
default: null
} }
}, },
...@@ -55,7 +58,7 @@ export default { ...@@ -55,7 +58,7 @@ export default {
components: {}, components: {},
mounted() { mounted() {
console.log(this.detail);
}, },
methods: { methods: {
...@@ -64,37 +67,19 @@ export default { ...@@ -64,37 +67,19 @@ export default {
this.$refs.refundForm.validate(valid => { this.$refs.refundForm.validate(valid => {
if (valid) { if (valid) {
var infoForm = _.cloneDeep(this.infoForm) var infoForm = _.cloneDeep(this.infoForm)
console.log(infoForm)
var params = {} var params = {}
var merchantList = [] params.refundRemark = infoForm.remark
var obj params.orderCode = this.detail.orderCode
infoForm.merchant.forEach(item => { markAsRefunded(params).then(res => {
obj = {} this.notice.okTips('操作成功')
obj.merchantId = item this.handleClose(true)
obj.merchantName = this.baseData.merchantList.find(
mer => mer.merchantId === item
).merchantName
merchantList.push(obj)
})
params.payStartDate = infoForm.payStartDate + ' 00:00:00'
params.payEndDate = infoForm.payEndDate + ' 23:59:59'
params.merchantList = merchantList
params.merchantType = infoForm.merchantType
if (infoForm.merchantType == '7') {
params.reportType = infoForm.reportType
}
console.log(params)
api.exportAccountStatement(params).then(res => {
window.location.href = res
this.handleClose()
}) })
} }
}) })
}, },
handleClose() { handleClose(flag) {
this.$emit('dialogClose', true) this.$emit('dialogClose', flag)
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!