Commit b9a7865d by chenwq

订单管理,数据看板

1 parent 67fa86e6
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<template> <template>
<div class="marketing order-manage"> <div class="marketing order-manage">
<div class="list-tips m-b-10"> <div class="list-tips m-b-10">
<img <img class="tips-img" src="@/assets/icon-info.png" />
class="tips-img"
src="@/assets/icon-info.png"
/>
<span class="table-tips"> <span class="table-tips">
已生成有效订单 已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span> <span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
...@@ -18,204 +15,69 @@ ...@@ -18,204 +15,69 @@
</div> </div>
<div class="container"> <div class="container">
<div class="sticky"> <div class="sticky">
<GLCombiForm <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex"> <div class="flex">
<div class="flex-default tabs"> <div class="flex-default tabs">
<el-tabs <el-tabs v-model="searchForm.requestSource" @tab-click="handleTabClick">
v-model="searchForm.requestSource" <el-tab-pane label="全部订单" name="0"></el-tab-pane>
@tab-click="handleTabClick" <el-tab-pane label="已付款" name="1"></el-tab-pane>
> <el-tab-pane label="未付款" name="2"></el-tab-pane>
<el-tab-pane <el-tab-pane label="已退款" name="3"></el-tab-pane>
label="全部订单" <el-tab-pane label="售后订单" name="4"></el-tab-pane>
name="0"
></el-tab-pane>
<el-tab-pane
label="已付款"
name="1"
></el-tab-pane>
<el-tab-pane
label="未付款"
name="2"
></el-tab-pane>
<el-tab-pane
label="已退款"
name="3"
></el-tab-pane>
<el-tab-pane
label="售后订单"
name="4"
></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<el-button <el-button class="default-blue-btn" :size="size" type="default" @click="handleExport">导出</el-button>
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table"> <div class="order-manage-table">
<GLTable <GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
ref="allOrderRef" <div slot="weChatName" class="flex-align" slot-scope="scope">
:getListApi="getListApi" <img v-if="scope.scope.weChatImageUrl" class="img-36 pointer img-circle" :src="scope.scope.weChatImageUrl" />
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="weChatName"
class="flex-align"
slot-scope="scope"
>
<img
v-if="scope.scope.weChatImageUrl"
class="img-36 pointer img-circle"
:src="scope.scope.weChatImageUrl"
/>
<span class="m-l-10">{{ scope.scope.weChatName }}</span> <span class="m-l-10">{{ scope.scope.weChatName }}</span>
<span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span> <span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</div> </div>
<template <template slot="vinNo" slot-scope="scope">
slot="vinNo"
slot-scope="scope"
>
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }} {{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover <el-popover popper-class="order-table-popover" placement="right-start" trigger="click">
popper-class="order-table-popover" <p v-for="(item, index) in scope.scope.vinNo" :key="index">{{ item }}</p>
placement="right-start" <span class="car-no" slot="reference" v-show="Array.isArray(scope.scope.vinNo)">...({{ scope.scope.vinNo.length - 1 }})</span>
trigger="click"
>
<p
v-for="(item, index) in scope.scope.vinNo"
:key="index"
>{{ item }}</p>
<span
class="car-no"
slot="reference"
v-show="Array.isArray(scope.scope.vinNo)"
>...({{ scope.scope.vinNo.length - 1 }})</span>
</el-popover> </el-popover>
</template> </template>
<div <div slot="orderStatus" slot-scope="scope">
slot="orderStatus"
slot-scope="scope"
>
<span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span> <span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </div>
<div <div slot="shareStaffName" class="table-image" slot-scope="scope">
slot="shareStaffName"
class="table-image"
slot-scope="scope"
>
<div> <div>
<img <img v-if="scope.scope.shareStaffImageUrl" class="img-36 pointer img-circle" style="vertical-align: middle" slot="reference" :src="scope.scope.shareStaffImageUrl" />
v-if="scope.scope.shareStaffImageUrl"
class="img-36 pointer img-circle"
style="vertical-align: middle"
slot="reference"
:src="scope.scope.shareStaffImageUrl"
/>
<span class="m-l-10"> <span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span> <span>{{ scope.scope.shareStaffName }}</span>
<span <span class="txt-green" v-if="scope.scope.shareStaffSource == 1">@微信</span>
class="txt-green" <span class="txt-orange" v-if="scope.scope.shareStaffSource == 2">@企微</span>
v-if="scope.scope.shareStaffType == 1" <span class="txt-blue" v-if="scope.scope.shareStaffSource == 3">@员工</span>
>@微信</span>
<span
class="txt-orange"
v-if="scope.scope.shareStaffType == 2"
>@企微</span>
<span
class="txt-blue"
v-if="scope.scope.shareStaffType == 3"
>@小程序</span>
</span> </span>
</div> </div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span> <span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
</div> </div>
<div <div class="table-btns" slot="auth-button" slot-scope="scope">
class="table-btns" <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
</div> </div>
<!-- 快递信息 --> <!-- 快递信息 -->
<GLDialog <GLDialog v-if="isExpressVisible" title="输入快递信息" mode="mid" okText="确定" cancelText="取消" :visible.sync="isExpressVisible" @onOk="handleExpressConfirm" @onCancel="handleExpressClose">
v-if="isExpressVisible" <glsx-combi-form class="small-content m-t-20" ref="expressRef" :isBlock="true" defaultWidth="284px" :isEdit="isEdit" :formRef="editChildRef" :formObj="expressForm" :formData="expressFormData" :formRules="expressRules"></glsx-combi-form>
title="输入快递信息"
mode="mid"
okText="确定"
cancelText="取消"
:visible.sync="isExpressVisible"
@onOk="handleExpressConfirm"
@onCancel="handleExpressClose"
>
<glsx-combi-form
class="small-content m-t-20"
ref="expressRef"
:isBlock="true"
defaultWidth="284px"
:isEdit="isEdit"
:formRef="editChildRef"
:formObj="expressForm"
:formData="expressFormData"
:formRules="expressRules"
></glsx-combi-form>
</GLDialog> </GLDialog>
<!-- 订单核销 --> <!-- 订单核销 -->
<GLDialog <GLDialog v-if="isWriteOffVisible" title="订单核销(请确保用户到店后核销,避免引起不必要问题)" mode="mid" okText="确定" cancelText="取消" :visible.sync="isWriteOffVisible" @onOk="handleWriteOffConfirm" @onCancel="handleWriteOffClose">
v-if="isWriteOffVisible" <glsx-combi-form class="small-content m-t-20" ref="writeOffRef" :isBlock="true" defaultWidth="284px" :formRef="editChildRef" :formObj="writeOffForm" :formData="writeOffFormData" :formRules="writeOffRules"></glsx-combi-form>
title="订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode="mid"
okText="确定"
cancelText="取消"
:visible.sync="isWriteOffVisible"
@onOk="handleWriteOffConfirm"
@onCancel="handleWriteOffClose"
>
<glsx-combi-form
class="small-content m-t-20"
ref="writeOffRef"
:isBlock="true"
defaultWidth="284px"
:formRef="editChildRef"
:formObj="writeOffForm"
:formData="writeOffFormData"
:formRules="writeOffRules"
></glsx-combi-form>
</GLDialog> </GLDialog>
<!-- 退款审核 --> <!-- 退款审核 -->
<GLDialog <GLDialog v-if="isExamineVisible" bigTitle="退款审核" mode="big" :visible.sync="isExamineVisible" @onOk="handleExamineConfirm" @onCancel="handleExamineClose">
v-if="isExamineVisible"
bigTitle="退款审核"
mode="big"
:visible.sync="isExamineVisible"
@onOk="handleExamineConfirm"
@onCancel="handleExamineClose"
>
<el-form label-width="144px"> <el-form label-width="144px">
<el-form-item label="售后类型"> <el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span> <span>{{ orderInfo.refundTypeName }}</span>
...@@ -230,15 +92,8 @@ ...@@ -230,15 +92,8 @@
<span>{{ orderInfo.remark || '-' }}</span> <span>{{ orderInfo.remark || '-' }}</span>
</el-form-item> </el-form-item>
<el-form-item v-if="orderInfo.imgUrls"> <el-form-item v-if="orderInfo.imgUrls">
<span <span v-for="(item, index) in orderInfo.imgUrls" :key="index">
v-for="(item, index) in orderInfo.imgUrls" <el-image class="img-60" :src="item" :preview-src-list="[item]"></el-image>
:key="index"
>
<el-image
class="img-60"
:src="item"
:preview-src-list="[item]"
></el-image>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="审核是否通过"> <el-form-item label="审核是否通过">
...@@ -248,28 +103,12 @@ ...@@ -248,28 +103,12 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'"> <template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'">
<glsx-combi-form <glsx-combi-form ref="examineRef" :isEdit="isEdit" defaultWidth="284px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules"></glsx-combi-form>
ref="examineRef"
:isEdit="isEdit"
defaultWidth="284px"
:isBlock="true"
:formRef="editChildRef"
:formObj="examineForm"
:formData="examineFormData"
:formRules="examineRules"
></glsx-combi-form>
</template> </template>
</el-form> </el-form>
</GLDialog> </GLDialog>
<!-- 确认收货 --> <!-- 确认收货 -->
<GLDialog <GLDialog v-if="isReceivingVisible" bigTitle="确认收货" mode="big" :visible.sync="isReceivingVisible" @onOk="handleReceivingConfirm" @onCancel="handleReceivingClose">
v-if="isReceivingVisible"
bigTitle="确认收货"
mode="big"
:visible.sync="isReceivingVisible"
@onOk="handleReceivingConfirm"
@onCancel="handleReceivingClose"
>
<el-form label-width="140px"> <el-form label-width="140px">
<el-form-item label="售后类型"> <el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span> <span>{{ orderInfo.refundTypeName }}</span>
...@@ -300,7 +139,7 @@ import url from '@/assets/empty.png' ...@@ -300,7 +139,7 @@ import url from '@/assets/empty.png'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant' import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default { export default {
name: 'orderManage', name: 'orderManage',
data () { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -321,7 +160,7 @@ export default { ...@@ -321,7 +160,7 @@ export default {
deliveryType: '', deliveryType: '',
vin: '', vin: '',
shareStaffName: '', shareStaffName: '',
shareStaffType: '', shareStaffSource: '',
activityName: '', activityName: '',
goodsName: '', goodsName: '',
requestSource: '0' requestSource: '0'
...@@ -465,12 +304,12 @@ export default { ...@@ -465,12 +304,12 @@ export default {
}, },
{ {
label: '推荐人类型', label: '推荐人类型',
name: 'shareStaffType', name: 'shareStaffSource',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'shareStaffTypeList' optionsName: 'shareStaffSourceList'
}, },
{ {
label: '活动名称', label: '活动名称',
...@@ -612,7 +451,7 @@ export default { ...@@ -612,7 +451,7 @@ export default {
}, },
listeners: { listeners: {
click: row => { click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }) this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }, () => {}, this.searchForm.requestSource != 0)
} }
} }
}, },
...@@ -836,21 +675,22 @@ export default { ...@@ -836,21 +675,22 @@ export default {
{ confId: '2', confName: '我要退款(无需退货)' }, { confId: '2', confName: '我要退款(无需退货)' },
{ confId: '3', confName: '众筹订单退款' } { confId: '3', confName: '众筹订单退款' }
], ],
shareStaffTypeList: [ shareStaffSourceList: [
{ confId: '1', confName: '个微' }, { confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' } { confId: '2', confName: '企微' },
{ confId: '3', confName: '员工' }
] ]
} }
} }
}, },
mounted () { mounted() {
// this.getCount() // this.getCount()
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
getParams () { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) { if (this.searchForm.createDate.length) {
params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
...@@ -861,7 +701,7 @@ export default { ...@@ -861,7 +701,7 @@ export default {
return params return params
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate delete this.tableSearchForm.createDate
...@@ -869,7 +709,7 @@ export default { ...@@ -869,7 +709,7 @@ export default {
}) })
}, },
getOptionsList (formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -895,7 +735,7 @@ export default { ...@@ -895,7 +735,7 @@ export default {
} }
}, },
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -909,7 +749,7 @@ export default { ...@@ -909,7 +749,7 @@ export default {
}) })
if (res.code == '0') { if (res.code == '0') {
fn && fn() fn && fn()
this.handleSearch() isResetPage ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
} }
}) })
} }
...@@ -917,7 +757,7 @@ export default { ...@@ -917,7 +757,7 @@ export default {
}) })
}, },
getCount () { getCount() {
var params = this.getParams() var params = this.getParams()
delete params.createDate delete params.createDate
// if(params.orderStatuses.includes('3')) return // if(params.orderStatuses.includes('3')) return
...@@ -926,7 +766,7 @@ export default { ...@@ -926,7 +766,7 @@ export default {
}) })
}, },
handleDetail (row) { handleDetail(row) {
this.$router.push({ this.$router.push({
path: '/orderManage/orderDetail', path: '/orderManage/orderDetail',
query: { query: {
...@@ -936,7 +776,7 @@ export default { ...@@ -936,7 +776,7 @@ export default {
}, },
// 输入快递信息 - start // 输入快递信息 - start
handleExpressClose () { handleExpressClose() {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
this.orderCode = '' this.orderCode = ''
this.expressForm = { this.expressForm = {
...@@ -945,7 +785,7 @@ export default { ...@@ -945,7 +785,7 @@ export default {
} }
}, },
handleExpressConfirm () { handleExpressConfirm() {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => { this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.expressForm) var params = this.$common.utils.deepClone(this.expressForm)
...@@ -965,14 +805,14 @@ export default { ...@@ -965,14 +805,14 @@ export default {
}) })
}, },
handleExpressInfo (row) { handleExpressInfo(row) {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode this.orderCode = row.orderCode
}, },
// 输入快递信息 - end // 输入快递信息 - end
// 订单核销 - start // 订单核销 - start
handleWriteOffClose () { handleWriteOffClose() {
this.isWriteOffVisible = !this.isWriteOffVisible this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = '' this.orderCode = ''
this.writeOffForm = { this.writeOffForm = {
...@@ -980,7 +820,7 @@ export default { ...@@ -980,7 +820,7 @@ export default {
} }
}, },
handleWriteOffConfirm () { handleWriteOffConfirm() {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => { this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.writeOffForm) var params = this.$common.utils.deepClone(this.writeOffForm)
...@@ -993,16 +833,16 @@ export default { ...@@ -993,16 +833,16 @@ export default {
}) })
if (res.code == '0') { if (res.code == '0') {
this.handleWriteOffClose() this.handleWriteOffClose()
this.handleSearch() this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
} }
}) })
} }
}) })
}, },
handleWriteOff (row) { handleWriteOff(row) {
if (row.orderSource == 4) { if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }) this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => {}, this.searchForm.requestSource != 0)
return true return true
} }
this.isWriteOffVisible = !this.isWriteOffVisible this.isWriteOffVisible = !this.isWriteOffVisible
...@@ -1011,7 +851,7 @@ export default { ...@@ -1011,7 +851,7 @@ export default {
// 订单核销 - end // 订单核销 - end
// 退款审核 - start // 退款审核 - start
handleExamineClose () { handleExamineClose() {
this.isExamineVisible = !this.isExamineVisible this.isExamineVisible = !this.isExamineVisible
this.orderCode = '' this.orderCode = ''
this.orderInfo = {} this.orderInfo = {}
...@@ -1023,7 +863,7 @@ export default { ...@@ -1023,7 +863,7 @@ export default {
} }
}, },
submitExamine (params) { submitExamine(params) {
this.$apis.orderManage.examineAllowApi(params).then(res => { this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -1032,12 +872,12 @@ export default { ...@@ -1032,12 +872,12 @@ export default {
}) })
if (res.code == '0') { if (res.code == '0') {
this.handleExamineClose() this.handleExamineClose()
this.handleSearch() this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
} }
}) })
}, },
handleExamineConfirm () { handleExamineConfirm() {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
} }
...@@ -1056,7 +896,7 @@ export default { ...@@ -1056,7 +896,7 @@ export default {
} }
}, },
handleExamine (row) { handleExamine(row) {
this.orderCode = row.orderCode this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
...@@ -1068,13 +908,13 @@ export default { ...@@ -1068,13 +908,13 @@ export default {
// 退款审核 - end // 退款审核 - end
// 确认收货 - start // 确认收货 - start
handleReceivingClose () { handleReceivingClose() {
this.isReceivingVisible = !this.isReceivingVisible this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = '' this.orderCode = ''
this.orderInfo = {} this.orderInfo = {}
}, },
handleReceivingConfirm () { handleReceivingConfirm() {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
} }
...@@ -1091,7 +931,7 @@ export default { ...@@ -1091,7 +931,7 @@ export default {
}) })
}, },
handleReceiving (row) { handleReceiving(row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-' this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
...@@ -1101,7 +941,7 @@ export default { ...@@ -1101,7 +941,7 @@ export default {
}, },
// 确认收货 - end // 确认收货 - end
setTableFinishFun () { setTableFinishFun() {
this.$refs.allOrderRef.data.forEach(item => { this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-' item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
}) })
...@@ -1110,22 +950,22 @@ export default { ...@@ -1110,22 +950,22 @@ export default {
this.getCount() this.getCount()
}, },
handleSearch () { handleSearch() {
this.$refs.allOrderRef.refreshTable() this.$refs.allOrderRef.refreshTable()
}, },
handleTabClick () { handleTabClick() {
this.handleSearch() this.handleSearch()
}, },
handleExport (row) { handleExport(row) {
var params = this.getParams() var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => { this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleReset () { handleReset() {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch() this.handleSearch()
} }
......
...@@ -3,33 +3,14 @@ ...@@ -3,33 +3,14 @@
<div class="data-board-box"> <div class="data-board-box">
<p class="edit-title">数据看板</p> <p class="edit-title">数据看板</p>
<div class="p-20"> <div class="p-20">
<GLCombiForm <GLCombiForm ref="dataRef" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch"></GLCombiForm>
ref="dataRef"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
></GLCombiForm>
<div class="data-view"> <div class="data-view">
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<div <div :key="index" class="item">
:key="index"
class="item"
>
<div class="name"> <div class="name">
{{item.name}} {{item.name}}
<el-popover <el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips">
class="tips" <img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" />
placement="top"
width="260"
trigger="hover"
:content="item.tips"
>
<img
slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png"
/>
</el-popover> </el-popover>
</div> </div>
<div class="value">{{dataBoard[item.key] || 0}}</div> <div class="value">{{dataBoard[item.key] || 0}}</div>
...@@ -51,54 +32,17 @@ ...@@ -51,54 +32,17 @@
<div class="data-board-box"> <div class="data-board-box">
<p class="edit-title">员工排行榜</p> <p class="edit-title">员工排行榜</p>
<div class="p-20"> <div class="p-20">
<GLCombiForm <GLCombiForm ref="rankRef" :rowNumber="1" :formObj="searchRankForm" :formData="searchFormRankData" @handleOk="handleSearchRank"></GLCombiForm>
ref="rankRef"
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"
></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
<GLTable <GLTable ref="dataTableRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :hasNum="false">
ref="dataTableRef" <div slot="shareName" class="flex-align" slot-scope="scope">
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:hasNum="false"
>
<div
slot="shareName"
class="flex-align"
slot-scope="scope"
>
<template v-if="scope.scope.shareAvatar"> <template v-if="scope.scope.shareAvatar">
<el-popover <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
placement="top" <img class="table-popover-img" :src="scope.scope.shareAvatar" />
width="160" <img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" />
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.shareAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar"
/>
</el-popover> </el-popover>
</template> </template>
...@@ -133,12 +77,13 @@ const dataList = [ ...@@ -133,12 +77,13 @@ const dataList = [
export default { export default {
name: 'ScrmMicroMarketingDataBoard', name: 'ScrmMicroMarketingDataBoard',
data () { data() {
return { return {
url, url,
dataList, dataList,
searchForm: { searchForm: {
statDate: dayjs().format('YYYY-MM-DD') statDate: dayjs().format('YYYY-MM-DD'),
shareName: ''
}, },
searchFormData: [ searchFormData: [
{ {
...@@ -162,6 +107,12 @@ export default { ...@@ -162,6 +107,12 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'statusList' optionsName: 'statusList'
},
{
label: '员工名称',
name: 'shareName',
type: 'input',
maxlength: 100
} }
], ],
getListApi: this.$apis.seckillActivity.getRankListApi, getListApi: this.$apis.seckillActivity.getRankListApi,
...@@ -209,11 +160,11 @@ export default { ...@@ -209,11 +160,11 @@ export default {
dataBoard: {} dataBoard: {}
} }
}, },
created () { created() {
this.getDataBoardApi() this.getDataBoardApi()
}, },
mounted () { mounted() {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'), let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'),
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default') [rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none' if (dataResetBtn) dataResetBtn.style.display = 'none'
...@@ -221,38 +172,38 @@ export default { ...@@ -221,38 +172,38 @@ export default {
}, },
methods: { methods: {
getDataBoardApi () { getDataBoardApi() {
let { activityId } = this.$route.query, let { activityId } = this.$route.query,
{ statDate } = this.searchForm { statDate } = this.searchForm
this.$apis.seckillActivity.getDataBoardApi({ activityId, statDimension: dayjs(statDate).format('YYYY-MM-DD') }).then(res => { this.$apis.seckillActivity.getDataBoardApi({ activityId, statDimension: dayjs(statDate).format('YYYY-MM-DD') }).then(res => {
this.dataBoard = res || {} this.dataBoard = res || {}
}) })
}, },
getParams () { getParams() {
let { activityId } = this.$route.query, let { activityId } = this.$route.query,
params = JSON.parse(JSON.stringify(this.searchRankForm)) params = JSON.parse(JSON.stringify(this.searchRankForm))
params.activityId = activityId params.activityId = activityId
return params return params
}, },
handleSearch () { handleSearch() {
this.getDataBoardApi() this.getDataBoardApi()
}, },
handleSearchRank () { handleSearchRank() {
this.$refs.dataTableRef.refreshTable() this.$refs.dataTableRef.refreshTable()
}, },
handleExport () { handleExport() {
let params = this.getParams() let params = this.getParams()
this.$apis.seckillActivity.exportRankListApi(params).then(res => { this.$apis.seckillActivity.exportRankListApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
resolve() resolve()
}) })
}, },
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.dataTableRef.data.length ? (this.$refs.dataTableRef.tableHeightValues = '') : this.$refs.dataTableRef.setTableHeightFun() this.$refs.dataTableRef.data.length ? (this.$refs.dataTableRef.tableHeightValues = '') : this.$refs.dataTableRef.setTableHeightFun()
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!