Commit 48860e00 by 王琦琳

Merge branch 'dev_v4.13.0' into 'develop'

Dev v4.13.0

See merge request !11
2 parents e2e3d6f4 5e770f15
...@@ -27,3 +27,5 @@ dev_v4.8.0 已上线,合并到 develop 以及 master 主干上 ...@@ -27,3 +27,5 @@ dev_v4.8.0 已上线,合并到 develop 以及 master 主干上
dev_4.12.0_0927 版本上线后已往主干 develop 以及 master 上合并 dev_4.12.0_0927 版本上线后已往主干 develop 以及 master 上合并
从 develop 上拉取分支 dev_4.12.1 对应 1010 紧急版本 从 develop 上拉取分支 dev_4.12.1 对应 1010 紧急版本
dev_4.13.0 分支以上线并往 develop 以及 master 上合并
import request from './request' import request from "./request"
// const path = 'dj.api.' // const path = 'dj.api.'
const path2 = 'dj.api.smartcarlife.' const path2 = "dj.api.smartcarlife."
export function getList(data) { export function getList(data) {
data.method = `${path2}ordermanage.page` data.method = `${path2}ordermanage.page`
...@@ -44,14 +44,14 @@ export function waitinputorderPage(data) { ...@@ -44,14 +44,14 @@ export function waitinputorderPage(data) {
// 订单导入 // 订单导入
export function orderImport(data) { export function orderImport(data) {
data.method = `${path2}order.import` data.method = `${path2}order.import`
return request(data, 'post', ['file']) return request(data, "post", ["file"])
} }
// 订单导入结果查询 // 订单导入结果查询
export function getImportResult(data) { export function getImportResult(data) {
// data.method = `${path2}order.getImportResult` // data.method = `${path2}order.getImportResult`
data.method = `dj.api.common.importExcel.async.queryProcess` data.method = `dj.api.common.importExcel.async.queryProcess`
return request(data, 'post') return request(data, "post")
} }
// 订单模板下载 // 订单模板下载
// export function downloadTemplate(data) { // export function downloadTemplate(data) {
...@@ -62,5 +62,17 @@ export function getImportResult(data) { ...@@ -62,5 +62,17 @@ export function getImportResult(data) {
// 订单退款 // 订单退款
export function markAsRefunded(data) { export function markAsRefunded(data) {
data.method = `${path2}goodsOrder.markAsRefunded` data.method = `${path2}goodsOrder.markAsRefunded`
return request(data, 'post') return request(data, "post")
}
// 待补录订单(批量修改流水所属园区店)
export function updateYqMerchant(data) {
data.method = `${path2}waitinputorder.update.yqMerchant`
return request(data, "post")
}
// 待补录订单(批量标记为无需补录)
export function markAsNoUse(data) {
data.method = `${path2}waitinputorder.markAsNoUse`
return request(data, "post")
} }
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table <el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'" :data="getListApi ? data : tableData"
:data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''"
:row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading"
v-loading="loading" border
border :highlight-current-row="true"
:highlight-current-row="true" @sort-change="sortChange"
@sort-change="sortChange" @selection-change="handleSelect"
@selection-change="handleSelect" :tree-props="{children: 'upgradeGoodsList'}">
:tree-props="{children: 'upgradeGoodsList'}" <el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
> type="selection"
<el-table-column :selectable="selectableFn"
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" width="55" />
type="selection" <el-table-column v-if="hasNum"
width="55" align="center"
:reserve-selection="true" width="60px"
/> label="序号"
<el-table-column type="index"
v-if="hasNum" :index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1" />
align="center" <el-table-column v-for="(item, index) in tableParams.tableColumns"
width="60px" :key="index"
label="序号" :label="item.label"
type="index" :prop="item.prop"
:index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1" :width="item.width"
/> :min-width="item.minWidth"
<el-table-column :align="item.align||'center'"
v-for="(item, index) in tableParams.tableColumns" :sortable="item.sortable">
: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"> <template slot="header">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<table-head-search <table-head-search v-if="item.optionConfig"
v-if="item.optionConfig" :search-form="headSearchForm"
:search-form="headSearchForm" :option-config="item.optionConfig"
:option-config="item.optionConfig" :base-data="baseData"
:base-data="baseData" @handleTableHeadChange="handleTableHeadChange" />
@handleTableHeadChange="handleTableHeadChange"
/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot v-if="item.addHtml"
v-if="item.addHtml" :name="item.addHtml"
:name="item.addHtml" :scope="scope.row"
:scope="scope.row" :prop="item.prop"
:prop="item.prop" :width="item.width" />
:width="item.width"
/>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag <el-tag v-if="!item.tagName"
v-if="!item.tagName" :type="tableParams.tag.type[scope.row[item.prop]]"
:type="tableParams.tag.type[scope.row[item.prop]]" v-text="tableParams.tag.label[scope.row[item.prop]]" />
v-text="tableParams.tag.label[scope.row[item.prop]]" <el-tag v-else
/> :type="tableParams[item.tagName].type[scope.row[item.prop]]"
<el-tag v-text="tableParams[item.tagName].label[scope.row[item.prop]]" />
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
/>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span <span v-if="item.html"
v-if="item.html" v-html="item.formatter(scope.row)" />
v-html="item.formatter(scope.row)"
/>
<template v-if="!item.html"> <template v-if="!item.html">
<span :class="item.className?item.className(scope.row):''" /> <span :class="item.className?item.className(scope.row):''" />
<span v-text="item.formatter(scope.row)" /> <span v-text="item.formatter(scope.row)" />
...@@ -79,8 +61,7 @@ ...@@ -79,8 +61,7 @@
<template v-else-if="getListApi"> <template v-else-if="getListApi">
<span v-if="item.prefix">{{ item.prefix }}</span> <span v-if="item.prefix">{{ item.prefix }}</span>
<span <span
v-if="item.parentProp" v-if="item.parentProp">{{ scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : '' }}</span>
>{{ scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : '' }}</span>
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
</template> </template>
<template v-else> <template v-else>
...@@ -91,36 +72,28 @@ ...@@ -91,36 +72,28 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="tableParams.tableOption"
v-if="tableParams.tableOption" label="操作"
label="操作" fixed="right"
fixed="right" :align="tableParams.tableOption.align||'center'"
:align="tableParams.tableOption.align||'center'" :width="tableParams.tableOption.width||'auto'">
:width="tableParams.tableOption.width||'auto'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot name="auth-button"
name="auth-button" :scope="scope.row" />
:scope="scope.row" <slot name="auth-button-other"
/> :scope="scope.row" />
<slot
name="auth-button-other"
:scope="scope.row"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination v-if="hasPage"
v-if="hasPage" background
background @size-change="handleSizeChange"
@size-change="handleSizeChange" @current-change="handleCurrentChange"
@current-change="handleCurrentChange" :current-page="page.currentPage"
:current-page="page.currentPage" :page-sizes="[10,20,30,40]"
:page-sizes="[10,20,30,40]" :page-size="page.pageSize"
:page-size="page.pageSize" :total="getListApi ? total : tableTotal"
:total="getListApi ? total : tableTotal" :layout="layout" />
:layout="layout"
/>
</div> </div>
</template> </template>
...@@ -252,7 +225,12 @@ export default { ...@@ -252,7 +225,12 @@ export default {
} }
} }
} }
} },
// 获取CheckBox是否可以勾选
selectableFn: {
type: Function,
default: null
},
}, },
mounted() { mounted() {
...@@ -348,7 +326,7 @@ export default { ...@@ -348,7 +326,7 @@ export default {
handleCurrentChange(value) { handleCurrentChange(value) {
this.page.currentPage = value this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page) this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
} },
} }
} }
......
<!-- 下载对账单 --> <!-- 设置用户隐私协议 -->
<template> <template>
<d2-dialog title="用户隐私协议" <d2-dialog title="用户隐私协议"
:is-visible="privacyVisible" :is-visible="privacyVisible"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06 * @Last Modified time: 2020-11-15 10:22:06
*/ */
import { getChannelType, getProductType } from '@/api/sys.base' import { getChannelType, getProductType } from "@/api/sys.base"
// import { // import {
// BaseData // BaseData
// } from '@/common/constants' // } from '@/common/constants'
...@@ -28,13 +28,13 @@ export default { ...@@ -28,13 +28,13 @@ export default {
* @param {*} param0 * @param {*} param0
*/ */
init({ state, dispatch, commit }) { init({ state, dispatch, commit }) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
Promise.all([getChannelType({}), getProductType({})]).then( Promise.all([getChannelType({}), getProductType({})]).then(
async ([channelType, productType]) => { async ([channelType, productType]) => {
state.channelType = channelType.slice(0, 2) state.channelType = channelType
state.productType = productType state.productType = productType
await dispatch('save2db', { await dispatch("save2db", {
name: '', name: "",
value: state value: state
}) })
resolve(state) resolve(state)
...@@ -45,11 +45,11 @@ export default { ...@@ -45,11 +45,11 @@ export default {
}, },
// 重置 // 重置
clear({ state, dispatch }) { clear({ state, dispatch }) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
state.channelType = [] state.channelType = []
state.productType = [] state.productType = []
await dispatch('save2db', { await dispatch("save2db", {
name: '', name: "",
value: state value: state
}) })
resolve(state) resolve(state)
...@@ -63,14 +63,14 @@ export default { ...@@ -63,14 +63,14 @@ export default {
* @param {*} name 名称 state 中的任意一个 强烈建议 使用 @/common/constants/BaseData 中的常量 便于灵活修改 * @param {*} name 名称 state 中的任意一个 强烈建议 使用 @/common/constants/BaseData 中的常量 便于灵活修改
*/ */
get({ state, dispatch }, name) { get({ state, dispatch }, name) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
let __data = state[name] let __data = state[name]
if (__data) { if (__data) {
__data = __data =
(await dispatch('getFromdb', `base.${name}`)) || (await dispatch("getFromdb", `base.${name}`)) ||
(await dispatch('getFromAjax', name)) (await dispatch("getFromAjax", name))
state[name] = __data state[name] = __data
await dispatch('save2db', { await dispatch("save2db", {
name, name,
value: __data value: __data
}) })
...@@ -79,9 +79,9 @@ export default { ...@@ -79,9 +79,9 @@ export default {
}) })
}, },
set({ state, dispatch }, { name, value }) { set({ state, dispatch }, { name, value }) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
state[name] = value state[name] = value
await dispatch('save2db', { await dispatch("save2db", {
name, name,
value value
}) })
...@@ -95,10 +95,10 @@ export default { ...@@ -95,10 +95,10 @@ export default {
* @param {*} param0 * @param {*} param0
*/ */
load({ state, dispatch }) { load({ state, dispatch }) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
if (state.channelType.length === 0) { if (state.channelType.length === 0) {
state = state =
(await dispatch('getFromdb', 'base')) || (await dispatch('init')) (await dispatch("getFromdb", "base")) || (await dispatch("init"))
} }
const { channelType, productType } = state const { channelType, productType } = state
resolve({ channelType, productType }) resolve({ channelType, productType })
...@@ -110,11 +110,11 @@ export default { ...@@ -110,11 +110,11 @@ export default {
* @param {*} path 数据 路径 * @param {*} path 数据 路径
*/ */
getFromdb({ dispatch }, path) { getFromdb({ dispatch }, path) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
const value = await dispatch( const value = await dispatch(
'd2admin/db/get', "d2admin/db/get",
{ {
dbName: 'database', dbName: "database",
path, path,
user: false user: false
}, },
...@@ -132,12 +132,12 @@ export default { ...@@ -132,12 +132,12 @@ export default {
* @param {*} param1 value 需要持久化的数据 path 需要持久化的数据路径 * @param {*} param1 value 需要持久化的数据 path 需要持久化的数据路径
*/ */
save2db({ dispatch }, { value, name }) { save2db({ dispatch }, { value, name }) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
await dispatch( await dispatch(
'd2admin/db/set', "d2admin/db/set",
{ {
dbName: 'database', dbName: "database",
path: name ? `base.${name}` : 'base', path: name ? `base.${name}` : "base",
value, value,
user: false user: false
}, },
...@@ -154,13 +154,13 @@ export default { ...@@ -154,13 +154,13 @@ export default {
* @param {*} name @/common/constants/BaseData 中的常量 * @param {*} name @/common/constants/BaseData 中的常量
*/ */
getFromAjax({ state, dispatch, commit }, name) { getFromAjax({ state, dispatch, commit }, name) {
return new Promise(async resolve => { return new Promise(async (resolve) => {
// const value = await map[name]({ [TYPE_NAME]: Object.values(BaseData).find(data => data.KEY === name).TYPE }) // const value = await map[name]({ [TYPE_NAME]: Object.values(BaseData).find(data => data.KEY === name).TYPE })
resolve() resolve()
}) })
}, },
async reset({ dispatch }) { async reset({ dispatch }) {
await dispatch('clear') await dispatch("clear")
} }
} }
} }
...@@ -568,9 +568,10 @@ import { ...@@ -568,9 +568,10 @@ import {
payTypeList, payTypeList,
orderTypeList, orderTypeList,
warehouseStatusList, warehouseStatusList,
sourceChannelTypeList, // sourceChannelTypeList,
manageTypeList, manageTypeList,
payType payType,
BaseData
} from '@/common/constants.js' } from '@/common/constants.js'
import downloadAccountDialog from './downloadAccountDialog' import downloadAccountDialog from './downloadAccountDialog'
import warehouseDetail from './warehouseDetail' import warehouseDetail from './warehouseDetail'
...@@ -724,9 +725,9 @@ export default { ...@@ -724,9 +725,9 @@ export default {
name: 'channelType', name: 'channelType',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'value',
optionLabel: 'confLabel', optionLabel: 'name',
optionsName: 'sourceChannelTypeList' optionsName: 'channelTypeList'
}, { }, {
label: '园区店模式', label: '园区店模式',
name: 'businessModel', name: 'businessModel',
...@@ -744,9 +745,10 @@ export default { ...@@ -744,9 +745,10 @@ export default {
divisionTypeList: _.cloneDeep(divisionTypeList), divisionTypeList: _.cloneDeep(divisionTypeList),
orderTypeList: _.cloneDeep(orderTypeList), orderTypeList: _.cloneDeep(orderTypeList),
warehouseStatusList: _.cloneDeep(warehouseStatusList), warehouseStatusList: _.cloneDeep(warehouseStatusList),
sourceChannelTypeList: _.cloneDeep(sourceChannelTypeList), // sourceChannelTypeList: _.cloneDeep(sourceChannelTypeList),
manageTypeList: _.cloneDeep(manageTypeList), manageTypeList: _.cloneDeep(manageTypeList),
PlatformMerchantList: [] PlatformMerchantList: [],
channelTypeList: [],
}, },
total: 0, total: 0,
page: { page: {
...@@ -821,7 +823,7 @@ export default { ...@@ -821,7 +823,7 @@ export default {
this.baseData.PlatformMerchantList = res this.baseData.PlatformMerchantList = res
this.getOptionsList() this.getOptionsList()
}) })
this.getBaseData()
this.getSummary() this.getSummary()
this.getList() this.getList()
...@@ -838,6 +840,11 @@ export default { ...@@ -838,6 +840,11 @@ export default {
methods: { methods: {
...mapActions({ close: 'd2admin/page/close' }), ...mapActions({ close: 'd2admin/page/close' }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapActions("d2admin/base", ["get"]),
async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList()
},
handleAddClose(isRefresh = false) { }, handleAddClose(isRefresh = false) { },
drawFunnelChart() { drawFunnelChart() {
// console.log(funnelOption) // console.log(funnelOption)
......
...@@ -88,20 +88,35 @@ export default { ...@@ -88,20 +88,35 @@ export default {
...mapActions('d2admin/user', ['actionSetDownloadList']), ...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) => { // 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)
// } // // }
}).catch((err) => { // }).catch((err) => {
console.log(err) // console.log(err)
}).finally((result) => { // }).finally((result) => {
this.exportDailyReportBtn = false // this.exportDailyReportBtn = false
}) // })
var params = {}
params.endDateStr = this.dateValue
params.method = 'dj.api.smartcarlife.workbench.exportDailyReport.async'
const list = [
...this.dowloadList,
{
name: '日报',
// uuid: JSON.parse(res).data,
// ifSuccess: false
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}, },
goCheck(row) { goCheck(row) {
// console.log('goCheck') // console.log('goCheck')
......
...@@ -142,6 +142,11 @@ ...@@ -142,6 +142,11 @@
<span <span
slot-scope="scope">{{ scope.row.upgradeWarrantyPeriod ? (scope.row.upgradeWarrantyPeriod + '年') : '无' }}</span> slot-scope="scope">{{ scope.row.upgradeWarrantyPeriod ? (scope.row.upgradeWarrantyPeriod + '年') : '无' }}</span>
</el-table-column> </el-table-column>
<el-table-column prop="cardCode"
align="center"
label="质保条形码">
<span slot-scope="scope">{{ scope.row.cardCode ? (scope.row.cardCode) : '无' }}</span>
</el-table-column>
<el-table-column prop="nums" <el-table-column prop="nums"
align="center" align="center"
label="数量(件)"> label="数量(件)">
......
...@@ -253,9 +253,8 @@ ...@@ -253,9 +253,8 @@
<script> <script>
import { Util } from '@/common/util' import { Util } from '@/common/util'
// import { getList, getOrderCount, waitinputorderCount, orderImport } from '@api/order'
import { getList, exportFile, getOrderCount, waitinputorderCount, orderImport } from '@api/order' import { getList, exportFile, getOrderCount, waitinputorderCount, orderImport } from '@api/order'
import { sourceChannelTypeList, manageTypeList } from '@/common/constants' import { sourceChannelTypeList, manageTypeList, BaseData } from '@/common/constants'
import { mapActions, mapState, mapMutations } from 'vuex' import { mapActions, mapState, mapMutations } from 'vuex'
import { getServiceStore, getParkStore } from '@api/editCustomer' import { getServiceStore, getParkStore } from '@api/editCustomer'
import { asyncExportExcel } from '@api/sys.base' import { asyncExportExcel } from '@api/sys.base'
...@@ -385,9 +384,10 @@ export default { ...@@ -385,9 +384,10 @@ export default {
name: 'channelType', name: 'channelType',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'value',
optionLabel: 'confLabel', optionLabel: 'name',
optionsName: 'sourceChannelTypeList' // optionsName: 'sourceChannelTypeList'
optionsName: 'channelTypeList'
}, { }, {
label: '园区店模式', label: '园区店模式',
name: 'businessModel', name: 'businessModel',
...@@ -468,7 +468,7 @@ export default { ...@@ -468,7 +468,7 @@ export default {
], ],
parkServiceList: [], parkServiceList: [],
storeIdList: [], storeIdList: [],
sourceChannelTypeList: _.cloneDeep(sourceChannelTypeList), // sourceChannelTypeList: _.cloneDeep(sourceChannelTypeList),
manageTypeList: _.cloneDeep(manageTypeList), manageTypeList: _.cloneDeep(manageTypeList),
sourceList: [ sourceList: [
{ {
...@@ -479,7 +479,8 @@ export default { ...@@ -479,7 +479,8 @@ export default {
confId: '7', confId: '7',
confLabel: '系统导入' confLabel: '系统导入'
} }
] ],
channelTypeList: [],
}, },
tableData: [], tableData: [],
total: 0, total: 0,
...@@ -524,6 +525,7 @@ export default { ...@@ -524,6 +525,7 @@ export default {
if (signRefundItem) { if (signRefundItem) {
this.signRefundFlag = true // 是否有标记退款权限 this.signRefundFlag = true // 是否有标记退款权限
} }
this.getBaseData()
this.getList() this.getList()
this.getOrderCount() this.getOrderCount()
}, },
...@@ -540,6 +542,11 @@ export default { ...@@ -540,6 +542,11 @@ export default {
...mapActions({ close: 'd2admin/page/close' }), ...mapActions({ close: 'd2admin/page/close' }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapMutations('d2admin/user', ['setUpdateRefesh']), ...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions("d2admin/base", ["get"]),
async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList()
},
handleImport() { handleImport() {
this.fileVisible = !this.fileVisible this.fileVisible = !this.fileVisible
......
...@@ -32,9 +32,20 @@ ...@@ -32,9 +32,20 @@
<d2-container> --> <d2-container> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="20"> <d2-table-header :left-span="20">
<span slot="left">共<span class="count-txt">{{ countObj.totalCount }}</span>条交易记录,已补录<span <span slot="left">共<span class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span
class="count-txt">{{ countObj.inputtedCount }}</span>条,未补录<span class="count-txt">{{ countObj.inputtedCount }}</span>条,未补录<span
class="count-txt">{{ countObj.waitInputCount }}</span>条。</span> class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span
class="count-txt">{{ countObj.notAssociatedCount }}</span>条,无需补录<span
class="count-txt">{{ countObj.needNoSupplementCount }}</span>条。</span>
<el-button type="primary"
@click="batchUpdateYqMerchant">
批量修改所属园区店
</el-button>
<el-button type="primary"
@click="batchMarkAsNoUse">
批量标记为无需补录
</el-button>
<el-button type="primary" <el-button type="primary"
@click="handleExport"> @click="handleExport">
导出 导出
...@@ -45,7 +56,8 @@ ...@@ -45,7 +56,8 @@
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
:selectableFn="selectableFn">
<template slot="auth-button" <template slot="auth-button"
slot-scope="scope"> slot-scope="scope">
<el-button type="text" <el-button type="text"
...@@ -57,8 +69,12 @@ ...@@ -57,8 +69,12 @@
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<!-- 批量修改所属园区店 -->
<update-yqMerchant-dialog :merchantVisible="merchantDialogVisible"
:idList="ids"
v-if="merchantDialogVisible"
@dialogClose="dialogClose" />
</div> </div>
<!-- </div> -->
</template> </template>
<script> <script>
...@@ -68,12 +84,16 @@ import { mapActions, mapState } from 'vuex' ...@@ -68,12 +84,16 @@ import { mapActions, mapState } from 'vuex'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
// waitinputorderExport // waitinputorderExport
import { payTypeList } from '@/common/constants.js' import { payTypeList } from '@/common/constants.js'
import { waitinputorderCount, waitinputorderPage, getList } from '@api/order' import { waitinputorderCount, waitinputorderPage, getList, markAsNoUse } from '@api/order'
// import { asyncExportExcel } from '@api/sys.base' // import { asyncExportExcel } from '@api/sys.base'
import updateYqMerchantDialog from './updateYqMerchantDialog'
const clonePayTypeList = _.cloneDeep(payTypeList) const clonePayTypeList = _.cloneDeep(payTypeList)
clonePayTypeList.splice(1, 1) clonePayTypeList.splice(1, 1)
export default { export default {
name: 'OrderSupplement', name: 'OrderSupplement',
components: {
updateYqMerchantDialog
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -125,7 +145,7 @@ export default { ...@@ -125,7 +145,7 @@ export default {
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'notifyStatusList' optionsName: 'notifyStatusList'
}, { }, {
label: '补录状态', label: '状态',
name: 'inputStatus', name: 'inputStatus',
type: 'select', type: 'select',
optionList: [], optionList: [],
...@@ -160,6 +180,8 @@ export default { ...@@ -160,6 +180,8 @@ export default {
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'orderSupplement',
tableOption: true, tableOption: true,
tableColumns: [{ tableColumns: [{
label: '交易参考号', label: '交易参考号',
...@@ -209,7 +231,7 @@ export default { ...@@ -209,7 +231,7 @@ export default {
} }
}, },
{ {
label: '补录状态', label: '状态',
prop: 'inputStatus', prop: 'inputStatus',
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.inputStatusList.find(item => item.confId === cellValue.inputStatus?.toString())?.confLabel return this.baseData.inputStatusList.find(item => item.confId === cellValue.inputStatus?.toString())?.confLabel
...@@ -241,10 +263,21 @@ export default { ...@@ -241,10 +263,21 @@ export default {
{ {
confId: '0', confId: '0',
confLabel: '未补录' confLabel: '未补录'
},
{
confId: '2',
confLabel: '未关联'
},
{
confId: '3',
confLabel: '无需补录'
} }
], ],
payTypeList: clonePayTypeList payTypeList: clonePayTypeList
} },
merchantDialogVisible: false,
ids: []
} }
}, },
computed: { computed: {
...@@ -374,6 +407,72 @@ export default { ...@@ -374,6 +407,72 @@ export default {
} }
}) })
}) })
},
selectableFn(row, index) {
var isSelect = true
if (row.inputStatus == '1') {//已补录流水不可勾选
isSelect = false
}
return isSelect
},
batchUpdateYqMerchant() {
var selectedData = []
console.log(this.$refs.recordTable.mutiSelectArr['orderSupplement']);
if (this.$refs.recordTable.mutiSelectArr['orderSupplement']) {
selectedData = this.$refs.recordTable.mutiSelectArr['orderSupplement']
}
if (!selectedData.length) {
this.$message({
message: "请选择需要修改的记录",
type: "warning",
showClose: true
})
return false
}
this.ids = selectedData.map((item) => {
return item.id
})
this.merchantDialogVisible = !this.merchantDialogVisible
},
dialogClose(flag) {
this.merchantDialogVisible = !this.merchantDialogVisible
if (flag) {
this.$refs.recordTable.refreshTable()
}
},
batchMarkAsNoUse() {
var selectedData = []
console.log(this.$refs.recordTable.mutiSelectArr['orderSupplement']);
if (this.$refs.recordTable.mutiSelectArr['orderSupplement']) {
selectedData = this.$refs.recordTable.mutiSelectArr['orderSupplement']
}
if (!selectedData.length) {
this.$message({
message: "请选择需要标记的记录",
type: "warning",
showClose: true
})
return false
}
var idList = selectedData.map((item) => {
return item.id
})
this.$confirm('标记为无需补录后,对应的流水不再需要进行补单操作,且不可恢复,是否确定修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
markAsNoUse({ idList: idList }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
} }
} }
} }
......
<!-- 设置用户隐私协议 -->
<template>
<d2-dialog title="批量修改所属园区店"
:is-visible="merchantVisible"
class="merchantDailog"
width="30%"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<el-form ref="merchantForm"
:model="infoForm"
:rules="formRules"
label-width="120px">
<el-form-item label="园区店:"
prop="yqMerchantId">
<el-select v-model="infoForm.yqMerchantId"
filterable
clearable
style="width:400px">
<el-option v-for="item in baseData.merchantList"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo" />
</el-select>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { getParkStore } from '@api/editCustomer'
import { updateYqMerchant } from '@api/order'
export default {
name: 'updateYqMerchantDialog',
data() {
return {
// userInfo: this.$store.state.d2admin.user.info,
infoForm: {
yqMerchantId: '',
idList: [],
},
formRules: {
yqMerchantId: [
{ required: true, message: '请选择商户', trigger: 'change' }
]
},
// 基本数据
baseData: {
merchantList: []
}
}
},
props: {
merchantVisible: {
type: Boolean,
default: false
},
idList: {
type: Array,
default: () => { }
},
},
watch: {
},
created() {
},
components: {},
computed: {
},
mounted() {
this.getMerchantList()
},
methods: {
getMerchantList() {
getParkStore({}).then(res => {
this.baseData.merchantList = res
})
},
handleAddConfirm() {
this.$refs.merchantForm.validate(valid => {
if (valid) {
this.infoForm.idList = this.idList
var params = _.cloneDeep(this.infoForm)
updateYqMerchant(params).then(res => {
this.notice.okTips()
this.handleClose(true)
})
}
})
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style>
.merchantDailog .el-dialog {
min-width: 700px;
}
</style>
...@@ -78,11 +78,13 @@ export default { ...@@ -78,11 +78,13 @@ export default {
merchantRow: {}, merchantRow: {},
nameToOption: { nameToOption: {
1: 'dj', 1: 'dj',
2: 'gh' 2: 'gh',
8: 'zy'
}, },
merchantLevelOptions: { merchantLevelOptions: {
dj: [], dj: [],
gh: [] gh: [],
zy: []
}, },
// 搜索 // 搜索
merchantLevelVal: [], merchantLevelVal: [],
...@@ -174,7 +176,8 @@ export default { ...@@ -174,7 +176,8 @@ export default {
label: '渠道', label: '渠道',
prop: '', prop: '',
formatter: cellValue => { formatter: cellValue => {
return cellValue.channelType === 1 ? '嘀加' : '广汇' // return cellValue.channelType === 1 ? '嘀加' : '广汇'
return this.baseData.channelTypeShow[cellValue.channelType]
} }
}, { }, {
label: '账户状态', label: '账户状态',
...@@ -205,6 +208,11 @@ export default { ...@@ -205,6 +208,11 @@ export default {
confId: 4, confId: 4,
confLabel: '失败' confLabel: '失败'
}], }],
channelTypeShow: {
1: '嘀加',
2: '广汇',
8: '直营'
},
merchantStoreServiceList: merchantStoreServiceList merchantStoreServiceList: merchantStoreServiceList
}, },
dialogConfig: { dialogConfig: {
...@@ -231,9 +239,10 @@ export default { ...@@ -231,9 +239,10 @@ export default {
mounted() { mounted() {
this.getBaseData() this.getBaseData()
// 1-嘀加;2-广汇 // 1-嘀加;2-广汇; 8-直营
this.getMerchantLevel(1) this.getMerchantLevel(1)
this.getMerchantLevel(2) this.getMerchantLevel(2)
this.getMerchantLevel(8)
// console.log(this.merchantLevelOptions) // console.log(this.merchantLevelOptions)
}, },
...@@ -265,7 +274,7 @@ export default { ...@@ -265,7 +274,7 @@ export default {
}, },
getMerchantLevel(channelType) { getMerchantLevel(channelType) {
// channelType:1-嘀加;2-广汇 // channelType:1-嘀加;2-广汇;8-直营
getMerchantLevelApi({ channelType: channelType }).then(res => { getMerchantLevelApi({ channelType: channelType }).then(res => {
// this.merchantLevelOptions[this.nameToOption[channelType]] = JSON.parse(res) // this.merchantLevelOptions[this.nameToOption[channelType]] = JSON.parse(res)
this.merchantLevelOptions[this.nameToOption[channelType]] = res this.merchantLevelOptions[this.nameToOption[channelType]] = res
......
...@@ -62,19 +62,24 @@ ...@@ -62,19 +62,24 @@
:label="x.merchantName" /> :label="x.merchantName" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- !relateMerchantObj.partnerMerchantName -->
<p class="relate-service"> <p class="relate-service">
<span v-if=" <span v-if="
storeSearchForm.yqMerchantId && storeSearchForm.yqMerchantId && !relateMerchantObjShow
!relateMerchantObj.partnerMerchantName
">该园区店暂未关联服务商<a href="#/serviceManage" ">该园区店暂未关联服务商<a href="#/serviceManage"
target="_blank" target="_blank"
rel="opener" rel="opener"
style="margin-left: 20px">关联服务商></a></span> style="margin-left: 20px">关联服务商></a></span>
<span v-else>该园区店关联的服务商为:{{ <!-- <span v-else>该园区店关联的服务商为:{{
relateMerchantObj.partnerMerchantName relateMerchantObjShow
}}(服务商编号:{{ }}</span> -->
relateMerchantObj.partnerMerchantId <span v-else>
}})</span> <el-tooltip :content="relateMerchantObjShow"
popper-class="merchantTooltip"
placement="right-start">
<el-button type="info">显示该园区店关联的服务商</el-button>
</el-tooltip>
</span>
</p> </p>
</el-col> </el-col>
<el-form-item label="选择渠道:"> <el-form-item label="选择渠道:">
...@@ -137,7 +142,8 @@ ...@@ -137,7 +142,8 @@
btn-ok-label="确定" btn-ok-label="确定"
@confirmDialog="brandOkButton" @confirmDialog="brandOkButton"
@closeDialog="brandSettingsButton"> @closeDialog="brandSettingsButton">
<span slot="sub-title" class="second_title">{{`${rowData.merchantName}${rowData.merchantId}`}}</span> <span slot="sub-title"
class="second_title">{{`${rowData.merchantName}${rowData.merchantId}`}}</span>
<div class="brandBox"> <div class="brandBox">
<div class="leftBox"> <div class="leftBox">
<div class="brand-top"> <div class="brand-top">
...@@ -333,7 +339,8 @@ export default { ...@@ -333,7 +339,8 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return { return {
1: "嘀加", 1: "嘀加",
2: "广汇" 2: "广汇",
8: "直营"
}[cellValue.channelType] }[cellValue.channelType]
} }
}, },
...@@ -428,6 +435,8 @@ export default { ...@@ -428,6 +435,8 @@ export default {
partnerMerchantId: "", partnerMerchantId: "",
partnerMerchantName: "" partnerMerchantName: ""
}, },
relateMerchantObjArr: [],
relateMerchantObjShow: '',
relateStoreVisible: false, relateStoreVisible: false,
storeApi: serviceGetMerchantList, storeApi: serviceGetMerchantList,
sourcePage: "serviceStore", sourcePage: "serviceStore",
...@@ -635,9 +644,17 @@ export default { ...@@ -635,9 +644,17 @@ export default {
// 关联导流方 // 关联导流方
handleMerchantChange(value) { handleMerchantChange(value) {
getPartnerByYq({ yqMerchantId: value }).then((res) => { getPartnerByYq({ yqMerchantId: value }).then((res) => {
this.relateMerchantObj = { // this.relateMerchantObj = {
partnerMerchantId: res ? res.merchantId : "", // partnerMerchantId: res ? res.merchantId : "",
partnerMerchantName: res ? res.merchantName : "" // partnerMerchantName: res ? res.merchantName : ""
// }
this.relateMerchantObjShow = ''
this.relateMerchantObjArr = res
if (this.relateMerchantObjArr.length > 0) {
var merchantArr = this.relateMerchantObjArr.map(item => {
return item.merchantName + '/' + item.merchantId
})
this.relateMerchantObjShow = merchantArr.join(',')
} }
}) })
}, },
...@@ -886,6 +903,9 @@ export default { ...@@ -886,6 +903,9 @@ export default {
line-height: 36px; line-height: 36px;
margin: 0; margin: 0;
} }
.merchantTooltip {
max-width: 600px;
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.brandBox { .brandBox {
...@@ -1009,7 +1029,7 @@ export default { ...@@ -1009,7 +1029,7 @@ export default {
.brandStyle ::v-deep .el-input--medium .el-input__inner { .brandStyle ::v-deep .el-input--medium .el-input__inner {
height: 32px !important; height: 32px !important;
} }
.second_title{ .second_title {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
margin-left: 10px; margin-left: 10px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!