Commit 7d3d9b7c by 前端

Merge branch 'v3.2' of http://192.168.3.233:8090/saas/scrm-micro-battles into v3.2

2 parents 06466d83 b2df02b0
......@@ -2,7 +2,8 @@ import { http, http_common, http2, http_merchant } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
params.method = 'scrm.api.shopmall.goods.page.curMerchant'
// params.method = 'scrm.api.shopmall.goods.page.curMerchant'
params.method = 'scrm.api.shopmall.goods.page.allMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......
......@@ -133,7 +133,7 @@ const updateOrderType = params => {
method: 'POST',
data: params,
sign: true,
returnAll: false
returnAll: true
})
}
......
......@@ -15,7 +15,7 @@ const getActivityPageApi = params => {
//分页众筹活动
const getCrowdfundListApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
params.method = 'scrm.api.shopmall.all.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......@@ -26,7 +26,7 @@ const getCrowdfundListApi = params => {
// 众筹-导出
const exportCrowdfundApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.export'
params.method = 'scrm.api.shopmall.all.crowdfunding.activity.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......
......@@ -84,7 +84,8 @@ const orderManageStatusList = [
// { confId: '7', confName: '待核销' },
// { confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' }
{ confId: '10', confName: '售后完成' },
{ confId: '11', confName: '待审批' }
]
const orderSourceList = [
......@@ -202,6 +203,21 @@ const stateList = [
}
]
const businessType = [
{
optionId: 1,
optionLabel: '1.2'
},
{
optionId: 2,
optionLabel: '1.3'
},
{
optionId: 3,
optionLabel: '2.0'
}
]
function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
......@@ -244,4 +260,4 @@ function setMinHeight(calssName = '.edit-container') {
document.querySelector(calssName).style.minHeight = minHeight
}
export { limitPrice, aToExport, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, afterSaleStatusList, exportFn, setMinHeight, downLoadFile }
export { limitPrice, aToExport, businessType, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, afterSaleStatusList, exportFn, setMinHeight, downLoadFile }
......@@ -3,7 +3,7 @@
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock },{'textBox':item.type=='textBox'}]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
......@@ -157,17 +157,13 @@ export default {
// 默认是四个字符长度
default: '154px'
},
// labelPaddingRight: {
// type: Number,
// default: 15
// },
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
default: () => { }
},
hasTitle: {
type: Boolean,
......@@ -175,12 +171,12 @@ export default {
},
formRules: {
type: Object,
default: () => {}
default: () => { }
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
default: () => { }
}
},
......@@ -190,7 +186,7 @@ export default {
mapView
},
mounted() {},
mounted() { },
methods: {
// 选择框-添加其他属性
......@@ -449,6 +445,7 @@ export default {
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
margin-top: 10px;
}
.glsx-combi-form .activity-Input {
......
......@@ -77,7 +77,7 @@ export default {
map.addControl(new AMap.ToolBar())
this.geocoder = new AMap.Geocoder()
map.setDefaultCursor('pointer')
AMap.plugin(['AMap.PlaceSearch'], function() {
AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
......@@ -99,7 +99,7 @@ export default {
return true
}
let _this = this
placeSearch.search(query, function(status, result) {
placeSearch.search(query, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
_this.adrList = result.poiList.pois
}
......@@ -206,4 +206,4 @@ export default {
margin-right: 6px;
}
}
</style>
</style>
\ No newline at end of file
<template>
<div class="glsx-table">
<el-scrollbar :native="false" wrapStyle="" wrapClass="" viewClass="" viewStyle="" noresize="false" tag="section">
<el-table id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" type="selection" width="55" :selectable="checkSelectable" :reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum" align="center" width="60px" label="序号" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align || 'center'" :sortable="item.sortable">
<el-scrollbar :native="false"
wrapStyle=""
wrapClass=""
viewClass=""
viewStyle=""
noresize="false"
tag="section">
<el-table id="initTable"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
:height="tableHeightValues"
:border="border"
:tableId="tableId"
:highlight-current-row="true"
:stripe="true"
@sort-change="sortChange"
@selection-change="handleSelect"
:size="size"
:header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
width="55"
:selectable="checkSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum"
align="center"
width="60px"
label="序号"
type="index"
:index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1">
</el-table-column>
<el-table-column v-for="(item, index) in 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-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.formatter">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="item.formatter(scope.row)" v-text="item.formatter(scope.row)"></span>
<span class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="item.formatter(scope.row)"
v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="scope.row[item.prop]" v-text="scope.row[item.prop]"></span>
<span class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="scope.row[item.prop]"
v-text="scope.row[item.prop]"></span>
</template>
<template v-else>
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="tableData[scope.$index][item.prop]" v-text="tableData[scope.$index][item.prop]"></span>
<span class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="tableData[scope.$index][item.prop]"
v-text="tableData[scope.$index][item.prop]"></span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
</el-table-column>
<el-table-column v-if="tableParams.tableOption" label="操作" :align="tableParams.tableOption.align || 'center'" :width="tableParams.tableOption.width || '200'" fixed="right">
<el-table-column v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || '200'"
fixed="right">
<template slot-scope="scope">
<slot name="auth-button" :scope="scope.row"></slot>
<slot name="auth-button"
:scope="scope.row"></slot>
</template>
</el-table-column>
<template slot="empty" class="emptyBg">
<img class="noDataImg" :src="noDataImg" v-if="noDataImg" alt="" />
<template slot="empty"
class="emptyBg">
<img class="noDataImg"
:src="noDataImg"
v-if="noDataImg"
alt="" />
<div>{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</template>
</el-table>
</el-scrollbar>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
<el-pagination v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page[this.pageConf.pageNum]"
:page-sizes="[10, 20, 30, 40]"
:page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal"
:layout="layout"></el-pagination>
</div>
</template>
......@@ -76,7 +142,7 @@ export default {
},
headerStyle: {
type: Object,
default: () => {}
default: () => { }
},
//表格需要多传入一个id的情况
tableId: {
......@@ -86,7 +152,7 @@ export default {
// 搜索条件
searchForm: {
type: Object,
default: () => {}
default: () => { }
},
// 是否定制表头
isCustomHead: {
......
......@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
// return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -11,7 +11,7 @@ let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, merchantId } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId
......@@ -28,8 +28,8 @@ export async function bootstrap({ history, common, messenger, globalState }) {
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
// Vue.use(GLButton, { routes, routerBase })
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
Vue.use(GLButton, { routes, routerBase })
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
......
......@@ -167,7 +167,8 @@ export default {
},
handleClose() {
this.$emit('handleStoreClose')
// console.log('handleStoreClose')
this.$emit('handleStaffClose')
},
handleConfirm() {
if (!this.staffUuid)
......
......@@ -109,16 +109,32 @@
<div slot="assignName"
slot-scope="scope">
<div>
<img class="img-36 pointer img-circle"
:src="scope.scope.assignStaffImageUrl || scope.scope.shareStaffImageUrl" />
<span>{{ scope.scope.assignStaffName || scope.scope.shareStaffName }}</span>
<template v-if="scope.scope.assignStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.assignStaffImageUrl"
:src="scope.scope.assignStaffImageUrl" />
<span class="m-l-10">
<span>{{ scope.scope.assignStaffName }}</span>
</span>
</template>
<template v-else-if="scope.scope.shareStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.shareStaffImageUrl"
:src="scope.scope.shareStaffImageUrl" />
<span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span>
</span>
</template>
<template v-else>
<span>{{ scope.scope.assignStaffName || scope.scope.shareStaffName || '-' }}</span>
</template>
<span @click="handlerAssign(scope.scope)"
class="assignLabel">指派</span>
</div>
</div>
<div slot="orderType"
slot-scope="scope">
<el-switch v-model="scope.scope.orderType"
<el-switch :value="scope.scope.orderType == 1 ? true : false"
class="switchStyle"
@change="changeOrderType(scope.scope)"
active-text="是"
......@@ -287,8 +303,9 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
import selectStaff from './components/selectStaff.vue'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
components: {
......@@ -507,6 +524,15 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'testSheetTypeList'
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'businessTypeList'
}
],
// 快递信息
......@@ -621,7 +647,7 @@ export default {
},
listeners: {
click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode })
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
}
}
},
......@@ -689,7 +715,7 @@ export default {
},
condition: row => {
// return true
return row.afterSaleStatus == 11
return row.orderStatus == 11
},
listeners: {
click: this.handleWriteOffApproval
......@@ -786,6 +812,20 @@ export default {
width: 160
},
{
label: '业务场景',
prop: 'businessType',
width: 120,
formatter: cellValue => {
let type = cellValue.businessType
if (type) {
return businessType.find(item => item.optionId == type).optionLabel
} else {
return '-'
}
}
},
{
label: '商品名称',
prop: '',
width: '120',
......@@ -879,7 +919,8 @@ export default {
testSheetTypeList: [
{ confId: '0', confName: '否' },
{ confId: '1', confName: '是' }
]
],
businessTypeList: utils.deepClone(businessType)
}
}
},
......@@ -968,21 +1009,23 @@ export default {
// 改变订单类型
changeOrderType(item) {
console.log(item)
// return
let params = {
orderCode: item.orderCode,
subOrderCode: item.orderCode,
orderType: item.orderType ? 0 : 1
}
this.$apis.orderManage
.updateOrderType(params)
.then(result => {
this.handleSearch()
})
.catch(err => {
console.log(err)
})
this.secondConfirm('测试单', '测试单数据不纳入对应战报和喜报的排名展示', 'orderManage', 'updateOrderType', params, false)
// return
// this.$apis.orderManage
// .updateOrderType(params)
// .then(result => {
// this.handleSearch()
// })
// .catch(err => {
// console.log(err)
// })
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -996,7 +1039,8 @@ export default {
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
// this.handleSearch()
isResetPage ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
}
})
}
......@@ -1080,7 +1124,7 @@ export default {
})
if (res.code == '0') {
this.handleWriteOffClose()
this.handleSearch()
this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
}
})
}
......@@ -1088,6 +1132,7 @@ export default {
},
handleStaffClose() {
console.log('dialogVisible')
this.isStaffVisible = !this.isStaffVisible
},
handleDialogConfirm() {
......@@ -1096,7 +1141,7 @@ export default {
},
handleWriteOff(row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode })
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
return true
}
this.isWriteOffVisible = !this.isWriteOffVisible
......@@ -1126,7 +1171,7 @@ export default {
})
if (res.code == '0') {
this.handleExamineClose()
this.handleSearch()
this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
}
})
},
......
......@@ -15,11 +15,13 @@
<span slot="footer">
<el-button :size="size"
type="primary"
@click="getList">查询</el-button>
@click="resetTable">查询</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
:hasNum="false" :tableData="storeList" -->
:getListApi="getListApi"
:tableData="storeList" -->
<GLTable ref="storeRef"
:noDataImg="url"
:tableTotal="total"
......@@ -27,7 +29,8 @@
:tableParams="tableParams"
:pageConf="pageConf"
@refreshTable="getList"
:getListApi="getListApi"
:tableData="storeList"
:hasNum="false"
:setTableFinishFun="setTableFinishFun">
<div slot="radioHtml"
class="store-table"
......@@ -58,7 +61,7 @@ export default {
},
getListApi: this.$apis.common.getMerchantList,
total: 0,
// storeList: [],
storeList: [],
heightBox: 200,
merchantId: '',
merchantName: '',
......@@ -81,10 +84,15 @@ export default {
labelWidth: '10px'
}
],
pageConfig: {
pageSize: 10,
currentPage: 1
},
// 表格
// getListApi: this.$apis.common.getstaffTreeListApi,
tableParams: {
listName: 'list',
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
......@@ -99,17 +107,24 @@ export default {
width: 80,
addHtml: 'radioHtml'
},
// {
// label: '序号',
// prop: 'idx',
// width: 80
// },
{
label: '序号',
prop: 'idx',
width: 80
},
{
label: '商户名称',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '商户id',
prop: 'merchantNo',
formatter: cellValue => {
return cellValue.merchantNo || '-'
}
}
]
},
......@@ -144,30 +159,44 @@ export default {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.merchantId = this.merchantInfo
// this.getList()
this.getList()
},
methods: {
getList() {
getList(pageCon) {
console.log(pageCon, 'pageCon')
pageCon && (this.pageConfig = pageCon)
var params = {
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
// merchantId: '44209390',
...this.searchForm
}
// this.$apis.common.getSimpleMerchantList(params).then(res => {
// console.log(res)
// this.storeList = res
// // this.storeList = res.staffUnitList
// // this.total = res.total
// // var page = this.$refs.staffRef.page
// // // 添加序号
// this.storeList.forEach((item, index) => {
// item.idx = index + 1
// })
// this.$refs.staffRef.tableHeightValues = '460px'
// })
},
console.log(params)
this.$apis.common.getMerchantList(params).then(res => {
console.log(res)
this.storeList = res.list
this.total = res.total
// // this.storeList = res.staffUnitList
// // var page = this.$refs.staffRef.page
// // // 添加序号
// pageConfig
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.currentPage - 1)
console.log(nowIndex)
this.storeList.forEach((item, index) => {
item.idx = index + 1 + nowIndex
})
console.log(this.storeList)
// this.$refs.staffRef.tableHeightValues = '460px'
// })
})
},
resetTable() {
this.$refs.storeRef && this.$refs.storeRef.refreshTable()
this.getList()
},
setTableFinishFun() {
// console.log(this.$refs.staffRef.data)
// this.storeList = this.$refs.staffRef.data
......
......@@ -161,7 +161,9 @@ export default {
fn: '编辑众筹'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2' || row.activityStatus == '3'
// 结束的直播不能再开
return ['1', '2'].includes(row.activityStatus)
// return ['1','2','3'].includes(row.activityStatus )
},
listeners: {
click: row => {
......@@ -389,7 +391,7 @@ export default {
},
mounted() {
// this.getOptionsList('searchFormData')
this.getOptionsList('searchFormData')
// const {
// $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
// } = this
......
......@@ -94,21 +94,28 @@
type="default"
@click="handleExport('dailyOrders')">导出</el-button>
</div>
<el-table :data="DailyOrderQuantityListFormat"
<el-table v-if="DailyOrderQuantityList.length"
:data="DailyOrderQuantityListFormat"
style="width: 100%">
<el-table-column :formatter="formatterHeader"
label=""></el-table-column>
<!-- width="140px" -->
<el-table-column v-for="(item, index) in DailyOrderQuantityList"
:key="index"
:prop="item"
width="140px"
:label="item.day">
<template slot-scope="scope">
<span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span>
</template>
</el-table-column>
<el-table-column :formatter="formatterEnd"
fixed="right"
label="总计"></el-table-column>
</el-table>
<div v-else>
<img src="url"
alt="" />
</div>
</div>
</div>
<div class="data-board-box">
......@@ -139,14 +146,13 @@
@click="handleExport('liveData')">导出</el-button>
</div>
<!-- :searchForm="tableSearchForm" -->
<GLTable ref="dataTableRef"
<GLTable ref="dataTableRefDetailPage"
:getListApi="getLiveDetailPage"
:noDataImg="url"
:tableParams="liveTableParams"
:searchForm="LiveTableSearchForm"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
:beforeSearchFn="beforeSearchFn">
<div slot="weChatName"
class="flex-align"
slot-scope="scope">
......@@ -195,6 +201,7 @@ export default {
return {
url,
dataList,
totalCount: 0,
searchForm: {
statDate: dayjs().format('YYYY-MM-DD')
},
......@@ -202,6 +209,7 @@ export default {
baseData: {
searchOrderStatusList: orderManageStatusList.filter(item => ['1', '3', '21', '22', '6', '9'].includes(item.confId))
},
DailyOrderQuantityList: [],
DailyOrderQuantityListFormat: [{}, {}],
searchFormData: [
{
......@@ -213,7 +221,8 @@ export default {
}
],
searchRankForm: {
statDimension: '1'
statDimension: '1',
shareName: ''
},
searchFormRankData: [
{
......@@ -225,6 +234,12 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
},
{
label: '员工名称',
name: 'shareName',
type: 'input',
maxlength: 100
}
],
getListApi: this.$apis.seckillActivity.getRankListApi,
......@@ -376,11 +391,17 @@ export default {
.getDailyOrderQuantityStatistics({ id: this.activityId })
.then(result => {
console.log(result)
// let totalCount = {
// currentOrderQuantity: 0,
// specificDate: '',
// day: '总计'
// }
if (result.length) {
this.DailyOrderQuantityList = result.reduce((arr, item, index) => {
return arr
}, [])
this.totalCount = result.reduce((total, item, index, arr) => {
return (total += item.currentOrderQuantity)
}, 0)
}
// result.push(totalCount)
this.DailyOrderQuantityList = result || []
})
.catch(err => {
......@@ -390,6 +411,7 @@ export default {
getParams() {
let { activityId } = this.$route.query,
params = JSON.parse(JSON.stringify(this.searchRankForm))
console.log(params)
params.activityId = activityId
return params
},
......@@ -428,12 +450,11 @@ export default {
//接收到的数据为空
this.$refs.dataTableRef.data.length ? (this.$refs.dataTableRef.tableHeightValues = '') : this.$refs.dataTableRef.setTableHeightFun()
},
formatterHeader(row, column) {
if (row == 0) {
return '活动日期'
} else {
return '订单量'
}
formatterHeader(row, column, cellValue, index) {
return index == 0 ? '活动日期' : '订单量'
},
formatterEnd(row, column, cellValue, index) {
return index == 1 ? this.totalCount : ''
}
}
}
......
......@@ -9,7 +9,7 @@ const cdn = {
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
}
module.exports = {
outputDir: `dist`,
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!