Commit 7daeff2c by 前端

Merge branch 'saas+v4.15.0_0112' of http://192.168.3.233:8090/saas/scrm-micro-ma…

…rketing into xuyl_dev_v3.3.1.1

 Conflicts:
	src/views/material/addMaterial.vue
	src/views/seckillActivity/crowdFundList.vue
2 parents ae80296f 944cd28f
......@@ -2083,6 +2083,17 @@
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
......@@ -2124,6 +2135,13 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
......@@ -2165,6 +2183,28 @@
"ansi-regex": "^5.0.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
......@@ -13657,75 +13697,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
......@@ -182,6 +182,17 @@ const getPayListApi = params => {
})
}
/**支付商户管理-下拉列表 */
const getPayMerchatListApi = params => {
params.method = 'entmicro.api.payment.pageListPayment'
return http({
url: 'rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
/**数据看板员工排名 */
const getRankListApi = params => {
params.method = 'scrm.api.shopmall.activity.ranking.page'
......@@ -267,4 +278,4 @@ const liveroomOverview = params => {
sign: true
})
}
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getPayMerchatListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
......@@ -551,9 +551,10 @@ export default {
},
handleSelect(val) {
this.isUpdate = true
this.tagging = val
this.tagging = val || []
let arr = []
this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
groupId: item.labelGroup.id,
......@@ -578,6 +579,7 @@ export default {
}
let arr = []
this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
groupId: item.labelGroup.id,
......
......@@ -358,10 +358,10 @@ export default {
if (res.code == '0') {
if (type == 1) {
this.time = res.data.createdTime
this.$refs.customer.refreshTable()
this.$refs.customer && this.$refs.customer.refreshTable()
} else if (type == 2) {
this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable()
this.$refs.customerGroup && this.$refs.customerGroup.refreshTable()
}
}
})
......@@ -412,9 +412,9 @@ export default {
message: '操作成功!'
})
if (type == 1) {
this.$refs.customer.refreshTable()
this.$refs.customer && this.$refs.customer.refreshTable()
} else {
this.$refs.customerGroup.refreshTable()
this.$refs.customerGroup && this.$refs.customerGroup.refreshTable()
}
})
// } else {
......
......@@ -44,6 +44,7 @@
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'materialGroup',
props: {eventBus: Object, groupHeight: Number},
......@@ -186,13 +187,16 @@ export default {
.status-words {
margin-left: 5px;
}
.material-group {
/deep/ .el-popover {
min-width: 50px;
&:hover {
cursor: pointer;
}
}
.all-group {
font-size: 16px;
height: 44px;
......@@ -201,17 +205,21 @@ export default {
display: flex;
justify-content: space-between;
cursor: pointer;
img {
width: 24px;
height: 24px;
vertical-align: middle;
}
i {
color: #999999;
}
}
ul {
overflow: auto;
.group-list {
cursor: pointer;
text-align: left;
......@@ -219,38 +227,46 @@ export default {
margin: 0 10px;
display: flex;
justify-content: space-between;
&.active {
background-color: #ebeaff;
}
.more-icon {
vertical-align: middle;
padding-top: 3px;
}
&:hover {
background-color: #ebeaff;
}
}
}
}
.add_btn {
color: #5850ff;
border-color: #5850ff;
margin: 20px 0 12px 16px;
}
.group-name {
display: inline-flex;
margin-left: 8px;
}
.group-btn {
color: #333333;
display: block;
padding: 8px 0px;
text-align: left;
width: 100%;
&:hover {
background-color: #ebeaff;
}
}
.el-button + .el-button {
margin-left: 0;
}
......
......@@ -119,6 +119,7 @@ import AddMaterialGroupDia from '@/views/material/components/addMaterialGroupDia
import MaterialGroup from '@/views/material/components/materialGroup'
import FunctionIntroduc from '@/views/material/components/functionIntroduc'
import VideoShowDia from './components/videoDia.vue'
export default {
name: 'materialList',
components: {
......@@ -633,35 +634,43 @@ export default {
right: 0;
width: 100%;
height: 100%;
img {
position: relative;
align-self: center;
margin: auto;
}
span {
position: absolute;
top: 12px;
right: 15px;
}
}
.urlContent {
margin-right: 8px;
position: relative;
width: 36px;
height: 36px;
}
.search-form,
.left,
.right {
background-color: #fff;
}
.el-popover {
min-width: 100px;
}
.main-container {
height: 100%;
.top {
display: inline-flex;
span {
margin-left: 16px;
font-size: 16px;
......@@ -669,44 +678,55 @@ export default {
}
}
}
ul {
text-align: center;
li {
list-style: none;
&:first-child {
padding-bottom: 10px;
}
}
}
.container {
margin-top: 10px;
height: 100%;
.search-form {
padding: 20px 0 0 20px;
}
.tabelList {
margin-top: 10px;
height: 100%;
.left {
height: 100%;
position: relative;
border-right: 1px solid #e8e8ea;
}
.right {
// overflow: auto;
.groupTitle {
padding: 20px 0 16px 19px;
font-weight: 600;
}
.glsx-table {
margin: 0 20px;
}
}
}
}
.btn-more {
margin-left: 10px;
}
.material-content {
display: flex;
align-items: center;
......@@ -720,39 +740,49 @@ ul {
overflow: hidden;
white-space: nowrap;
}
img {
width: 36px;
height: 36px;
}
}
.img-plus {
width: 200px;
height: 200px;
}
.introduc-word {
font-size: 14px;
margin-left: 16px;
color: #5850ff;
}
.pdf-title {
text-align: right !important;
}
/deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff;
}
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
.select-pro {
display: inline-block;
padding-bottom: 20px;
}
/deep/ .el-switch__core {
width: 32px !important;
}
/deep/ .el-table::before {
background-color: transparent;
}
/deep/ .el-table__fixed-right::before {
background-color: transparent;
}
......
......@@ -2,7 +2,10 @@
<template>
<div class="marketing order-manage">
<div class="list-tips m-b-10">
<img class="tips-img" src="@/assets/icon-info.png" />
<img
class="tips-img"
src="@/assets/icon-info.png"
/>
<span class="table-tips">
已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
......@@ -15,62 +18,156 @@
</div>
<div class="container">
<div class="sticky">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex">
<div class="flex-default tabs">
<el-tabs v-model="searchForm.requestSource" @tab-click="handleTabClick">
<el-tab-pane label="全部订单" name="0"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat" label="已付款" name="1"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat" label="未付款" name="2"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat" label="已退款" name="3"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat" label="售后订单" name="4"></el-tab-pane>
<el-tabs
v-model="searchForm.requestSource"
@tab-click="handleTabClick"
>
<el-tab-pane
label="全部订单"
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>
</div>
<el-button class="default-blue-btn" :size="size" type="default" @click="handleExport">导出</el-button>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table">
<GLTable ref="allOrderRef" :getListApi="getListApi" :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" />
<GLTable
ref="allOrderRef"
:getListApi="getListApi"
: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 v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</div>
<template slot="vinNo" slot-scope="scope">
<template
slot="vinNo"
slot-scope="scope"
>
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover popper-class="order-table-popover" placement="right-start" 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
popper-class="order-table-popover"
placement="right-start"
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>
</template>
<div slot="orderStatus" slot-scope="scope">
<div
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>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div>
<div slot="shareStaffName" class="table-image" slot-scope="scope">
<div
slot="shareStaffName"
class="table-image"
slot-scope="scope"
>
<div>
<img v-if="scope.scope.shareStaffImageUrl" class="img-36 pointer img-circle" style="vertical-align: middle" slot="reference" :src="scope.scope.shareStaffImageUrl" />
<img
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>{{ scope.scope.shareStaffName }}</span>
<span class="txt-green" v-if="scope.scope.shareStaffSource == 1">@微信</span>
<span class="txt-orange" v-if="scope.scope.shareStaffSource == 2">@企微</span>
<span class="txt-blue" v-if="scope.scope.shareStaffSource == 3">@员工</span>
<span
class="txt-green"
v-if="scope.scope.shareStaffSource == 1"
>@微信</span>
<span
class="txt-orange"
v-if="scope.scope.shareStaffSource == 2"
>@企微</span>
<span
class="txt-blue"
v-if="scope.scope.shareStaffSource == 3"
>@员工</span>
</span>
</div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
</div>
<div slot="assignName" slot-scope="scope">
<div
slot="assignName"
slot-scope="scope"
>
<div>
<template v-if="scope.scope.assignStaffName">
<img class="img-36 pointer img-circle" v-if="scope.scope.assignStaffImageUrl" :src="scope.scope.assignStaffImageUrl" />
<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" />
<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>
......@@ -82,23 +179,75 @@
class="assignLabel">指派</span> -->
</div>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div>
</GLTable>
</div>
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
<GLDialog v-if="isExpressVisible" 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
v-if="isExpressVisible"
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 v-if="isWriteOffVisible" 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
v-if="isWriteOffVisible"
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 v-if="isExamineVisible" bigTitle="退款审核" mode="big" :visible.sync="isExamineVisible" @onOk="handleExamineConfirm" @onCancel="handleExamineClose">
<GLDialog
v-if="isExamineVisible"
bigTitle="退款审核"
mode="big"
:visible.sync="isExamineVisible"
@onOk="handleExamineConfirm"
@onCancel="handleExamineClose"
>
<el-form label-width="144px">
<el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span>
......@@ -113,8 +262,15 @@
<span>{{ orderInfo.remark || '-' }}</span>
</el-form-item>
<el-form-item v-if="orderInfo.imgUrls">
<span v-for="(item, index) in orderInfo.imgUrls" :key="index">
<el-image class="img-60" :src="item" :preview-src-list="[item]"></el-image>
<span
v-for="(item, index) in orderInfo.imgUrls"
:key="index"
>
<el-image
class="img-60"
:src="item"
:preview-src-list="[item]"
></el-image>
</span>
</el-form-item>
<el-form-item label="审核是否通过">
......@@ -124,12 +280,28 @@
</el-radio-group>
</el-form-item>
<template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'">
<glsx-combi-form ref="examineRef" :isEdit="isEdit" defaultWidth="284px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules"></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>
</template>
</el-form>
</GLDialog>
<!-- 确认收货 -->
<GLDialog v-if="isReceivingVisible" bigTitle="确认收货" mode="big" :visible.sync="isReceivingVisible" @onOk="handleReceivingConfirm" @onCancel="handleReceivingClose">
<GLDialog
v-if="isReceivingVisible"
bigTitle="确认收货"
mode="big"
:visible.sync="isReceivingVisible"
@onOk="handleReceivingConfirm"
@onCancel="handleReceivingClose"
>
<el-form label-width="140px">
<el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span>
......@@ -161,10 +333,9 @@ import { utils } from 'glsx-common'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
data() {
data () {
return {
size: 'small',
isSpecialMerchat: true,
url: url,
isEdit: true,
orderCode: '',
......@@ -311,29 +482,29 @@ export default {
type: 'input',
maxlength: 50
},
{
label: '车架号',
name: 'vin',
labelWidth: 56,
type: 'input',
maxlength: 50
},
{
label: '推荐人',
name: 'shareStaffName',
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '推荐人类型',
name: 'shareStaffSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'shareStaffSourceList'
},
// {
// label: '车架号',
// name: 'vin',
// labelWidth: 56,
// type: 'input',
// maxlength: 50
// },
// {
// label: '推荐人',
// name: 'shareStaffName',
// labelWidth: 56,
// type: 'input',
// maxlength: 100
// },
// {
// label: '推荐人类型',
// name: 'shareStaffSource',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'shareStaffSourceList'
// },
{
label: '活动名称',
name: 'activityName',
......@@ -348,20 +519,20 @@ export default {
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'customerPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
{
label: '推荐人手机号',
name: 'shareStaffPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
// {
// label: '手机号',
// name: 'customerPhone',
// labelWidth: 56,
// type: 'input',
// maxlength: 11
// },
// {
// label: '推荐人手机号',
// name: 'shareStaffPhone',
// labelWidth: 56,
// type: 'input',
// maxlength: 11
// },
{
label: '测试单',
name: 'orderType',
......@@ -488,11 +659,11 @@ export default {
fn: '退款'
},
condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus)&&row.isOffline!=0
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) && row.isOffline != 0
},
listeners: {
click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }, () => {}, this.searchForm.requestSource != 0)
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
}
}
},
......@@ -519,7 +690,7 @@ export default {
fn: '商品发货'
},
condition: row => {
return !this.isSpecialMerchat && row.deliveryType == 2 && row.orderStatus == 6
return row.deliveryType == 2 && row.orderStatus == 6
},
listeners: {
click: this.handleExpressInfo
......@@ -546,7 +717,7 @@ export default {
type: 'text'
},
condition: row => {
return !this.isSpecialMerchat && row.afterSaleStatus == 4
return row.afterSaleStatus == 4
},
listeners: {
click: this.handleReceiving
......@@ -567,45 +738,45 @@ export default {
return cellValue.customerName || '-'
}
},
{
label: '手机号',
prop: 'customerPhone',
width: 160,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '其他',
prop: 'otherInformation',
width: 210
},
// {
// label: '手机号',
// prop: 'customerPhone',
// width: 160,
// formatter: cellValue => {
// return cellValue.customerPhone || '-'
// }
// },
// {
// label: '其他',
// prop: 'otherInformation',
// width: 210
// },
{
label: '微信名称',
prop: 'weChatName',
addHtml: 'weChatName',
width: 210
},
{
label: '推荐人',
prop: 'shareStaffName',
width: 210,
addHtml: 'shareStaffName'
},
{
label: '指派人',
prop: 'assignName',
width: 210,
addHtml: 'assignName'
},
{
label: '推荐人手机号',
prop: 'shareStaffPhone',
width: 160,
formatter: cellValue => {
return cellValue.shareStaffPhone || '-'
}
},
// {
// label: '推荐人',
// prop: 'shareStaffName',
// width: 210,
// addHtml: 'shareStaffName'
// },
// {
// label: '指派人',
// prop: 'assignName',
// width: 210,
// addHtml: 'assignName'
// },
// {
// label: '推荐人手机号',
// prop: 'shareStaffPhone',
// width: 160,
// formatter: cellValue => {
// return cellValue.shareStaffPhone || '-'
// }
// },
{
label: '订单时间',
prop: 'createdDate',
......@@ -622,20 +793,20 @@ export default {
return cellValue.payDate ? dayjs(cellValue.payDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '核销时间',
prop: 'verificationDate',
width: '180',
formatter: cellValue => {
return cellValue.verificationDate ? dayjs(cellValue.verificationDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '车架号',
prop: 'vinNo',
width: 130,
addHtml: 'vinNo'
},
// {
// label: '核销时间',
// prop: 'verificationDate',
// width: '180',
// formatter: cellValue => {
// return cellValue.verificationDate ? dayjs(cellValue.verificationDate).format('YYYY-MM-DD HH:mm:ss') : '-'
// }
// },
// {
// label: '车架号',
// prop: 'vinNo',
// width: 130,
// addHtml: 'vinNo'
// },
{
label: '订单状态',
prop: 'orderStatus',
......@@ -701,6 +872,14 @@ export default {
}
},
{
label: '退款类型',
prop: 'afterSaleType',
width: 100,
formatter: cellValue => {
return { 1: '退订单', 2: '退定金' }[cellValue.afterSaleType] || '-'
}
},
{
label: '售后状态',
prop: 'afterSaleStatus',
width: '100',
......@@ -762,8 +941,8 @@ export default {
}
}
},
created() {
this.checkMerchant()
created () {
// this.checkMerchant()
if (window.__POWERED_BY_QIANKUN__) {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
......@@ -773,13 +952,13 @@ export default {
}
},
mounted() {
mounted () {
// this.getCount()
this.getOptionsList('searchFormData')
},
methods: {
initParams() {
initParams () {
const cell = {
label: '线下订单',
prop: 'isOffline',
......@@ -800,7 +979,7 @@ export default {
this.tableParams.tableColumns.splice(12, 0, cell)
this.searchFormData.splice(17, 0, searchCell)
},
getParams() {
getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
......@@ -811,7 +990,7 @@ export default {
return params
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
......@@ -819,7 +998,7 @@ export default {
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
getOptionsList (formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
......@@ -845,12 +1024,12 @@ export default {
}
},
showOrHideAttr(formName, label, isHide) {
showOrHideAttr (formName, label, isHide) {
let idx = this[formName].findIndex(item => item.label == label)
this[formName][idx].isHide = isHide
},
deleteAttr(labelList) {
deleteAttr (labelList) {
labelList.forEach(i => {
console.log(i)
let idx = this.tableParams.tableColumns.findIndex(item => item.label == i)
......@@ -858,20 +1037,20 @@ export default {
})
},
checkMerchant() {
this.$apis.orderManage.checkMerchartApi({}).then(res => {
this.isSpecialMerchat = res
var hideList = ['售后状态', '订单类型', '结算方式', '商户订单号', '车架号', '推荐人', '推荐人类型', '手机号', '推荐人手机号']
if (this.isSpecialMerchat) {
hideList.forEach(item => {
this.showOrHideAttr('searchFormData', item, true)
})
this.deleteAttr(['手机号', '其他', '微信名称', '推荐人', '推荐人手机号', '车架号', '商户订单号'])
}
})
},
// checkMerchant () {
// this.$apis.orderManage.checkMerchartApi({}).then(res => {
// this.isSpecialMerchat = res
// var hideList = ['售后状态', '订单类型', '结算方式', '商户订单号', '车架号', '推荐人', '推荐人类型', '手机号', '推荐人手机号']
// if (this.isSpecialMerchat) {
// hideList.forEach(item => {
// this.showOrHideAttr('searchFormData', item, true)
// })
// this.deleteAttr(['手机号', '其他', '微信名称', '推荐人', '推荐人手机号', '车架号', '商户订单号'])
// }
// })
// },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
secondConfirm (title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -893,7 +1072,7 @@ export default {
})
},
getCount() {
getCount () {
var params = this.getParams()
delete params.createDate
// if(params.orderStatuses.includes('3')) return
......@@ -902,7 +1081,7 @@ export default {
})
},
handleDetail(row) {
handleDetail (row) {
this.$router.push({
path: '/orderManage/orderDetail',
query: {
......@@ -912,7 +1091,7 @@ export default {
},
// 输入快递信息 - start
handleExpressClose() {
handleExpressClose () {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = ''
this.expressForm = {
......@@ -921,7 +1100,7 @@ export default {
}
},
handleExpressConfirm() {
handleExpressConfirm () {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.expressForm)
......@@ -941,14 +1120,14 @@ export default {
})
},
handleExpressInfo(row) {
handleExpressInfo (row) {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode
},
// 输入快递信息 - end
// 订单核销 - start
handleWriteOffClose() {
handleWriteOffClose () {
this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = ''
this.writeOffForm = {
......@@ -956,7 +1135,7 @@ export default {
}
},
handleWriteOffConfirm() {
handleWriteOffConfirm () {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.writeOffForm)
......@@ -976,9 +1155,9 @@ export default {
})
},
handleWriteOff(row) {
handleWriteOff (row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => {}, this.searchForm.requestSource != 0)
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
return true
}
this.isWriteOffVisible = !this.isWriteOffVisible
......@@ -987,7 +1166,7 @@ export default {
// 订单核销 - end
// 退款审核 - start
handleExamineClose() {
handleExamineClose () {
this.isExamineVisible = !this.isExamineVisible
this.orderCode = ''
this.orderInfo = {}
......@@ -999,7 +1178,7 @@ export default {
}
},
submitExamine(params) {
submitExamine (params) {
this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
......@@ -1013,7 +1192,7 @@ export default {
})
},
handleExamineConfirm() {
handleExamineConfirm () {
var params = {
id: this.orderInfo.id
}
......@@ -1032,7 +1211,7 @@ export default {
}
},
handleExamine(row) {
handleExamine (row) {
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
......@@ -1044,13 +1223,13 @@ export default {
// 退款审核 - end
// 确认收货 - start
handleReceivingClose() {
handleReceivingClose () {
this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = ''
this.orderInfo = {}
},
handleReceivingConfirm() {
handleReceivingConfirm () {
var params = {
id: this.orderInfo.id
}
......@@ -1067,7 +1246,7 @@ export default {
})
},
handleReceiving(row) {
handleReceiving (row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(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 : '-'
......@@ -1077,7 +1256,7 @@ export default {
},
// 确认收货 - end
setTableFinishFun() {
setTableFinishFun () {
this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
})
......@@ -1086,25 +1265,25 @@ export default {
this.getCount()
},
handleSearch() {
handleSearch () {
this.$refs.allOrderRef.refreshTable()
},
handleTabClick() {
if (this.isSpecialMerchat) {
return true
}
handleTabClick () {
// if (this.isSpecialMerchat) {
// return true
// }
this.handleSearch()
},
handleExport(row) {
handleExport (row) {
var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res)
})
},
handleReset() {
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
}
......
......@@ -16,7 +16,7 @@
:title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
<el-form-item label="其他信息">{{ detailForm.formDescribe }}</el-form-item>
<!-- <el-form-item label="其他信息">{{ detailForm.formDescribe }}</el-form-item> -->
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
......@@ -121,22 +121,22 @@ export default {
label: '订单时间',
name: 'createdDateStr'
},
{
label: '手机号码',
name: 'customerPhone'
},
{
label: '推荐人',
name: 'shareStaffName'
},
{
label: '推荐人类型',
name: 'shareStaffTypeName'
},
{
label: '车架号',
name: 'vin'
},
// {
// label: '手机号码',
// name: 'customerPhone'
// },
// {
// label: '推荐人',
// name: 'shareStaffName'
// },
// {
// label: '推荐人类型',
// name: 'shareStaffTypeName'
// },
// {
// label: '车架号',
// name: 'vin'
// },
{
label: '门店信息',
name: 'merchantName'
......@@ -166,10 +166,10 @@ export default {
label: '尾款',
name: 'crowdFundingPrice'
},
{
label: '发货地址',
name: 'shipAddress'
},
// {
// label: '发货地址',
// name: 'shipAddress'
// },
{
label: '微信名称',
name: 'weChatName'
......@@ -288,22 +288,22 @@ export default {
this.detailFormData.splice(idx, 1)
}
// 其他信息
var formDescribeObj = {
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second']
}
this.detailForm[formDescribeObj.name] = ''
this.detailForm[formDescribeObj.name] = this.detailForm.plateNo ? '车牌号:' + this.detailForm.plateNo + ' ' : ''
this.detailForm[formDescribeObj.name] += this.detailForm.vehicleType ? '品牌车型:' + this.detailForm.vehicleType + ' ' : ''
formDescribeObj.attrList.forEach(item => {
let label = this.detailForm[formDescribeObj.name + item]
let value = this.detailForm[formDescribeObj.contentName + item]
if (label) {
this.detailForm[formDescribeObj.name] += label + ':' + value + ' '
}
})
// var formDescribeObj = {
// label: '其他信息',
// name: 'formDescribe',
// contentName: 'formContent',
// attrList: ['First', 'Second']
// }
// this.detailForm[formDescribeObj.name] = ''
// this.detailForm[formDescribeObj.name] = this.detailForm.plateNo ? '车牌号:' + this.detailForm.plateNo + ' ' : ''
// this.detailForm[formDescribeObj.name] += this.detailForm.vehicleType ? '品牌车型:' + this.detailForm.vehicleType + ' ' : ''
// formDescribeObj.attrList.forEach(item => {
// let label = this.detailForm[formDescribeObj.name + item]
// let value = this.detailForm[formDescribeObj.contentName + item]
// if (label) {
// this.detailForm[formDescribeObj.name] += label + ':' + value + ' '
// }
// })
// 商品名称
this.detailForm.goodsName = this.detailForm.orderGoods.length ? this.detailForm.orderGoods.map(item => item.goodsName).join(',') : '-'
this.formToRow('detailFormData')
......
<template>
<div class="glsx-table">
<el-table id="initTable"
class="hightline"
:key="componentKey"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data="getListApi ? data : tableData"
:row-class-name="tableParams.rowClassName"
:row-style="tableParams.rowStyle"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
:height="tableHeightValues"
:border="border"
:tableId="tableId"
@sort-change="sortChange"
@selection-change="handleSelect"
:size="size"
:header-cell-style="headerStyle"
:show-summary="tableParams.showSummary"
:summary-method="tableParams.summaryMethod"
v-bind="$attrs"
v-on="$listeners">
<!-- //实现高亮竖线 -->
<el-table-column fixed="left"
width="5">
<template slot-scope="scope">
<span :scope="scope"></span>
</template>
</el-table-column>
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
class-name="select-column"
type="selection"
width="48"
:selectable="checkSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum"
:fixed="numHasFixed"
align="left"
width="74"
label="序号"
class-name="select-index"
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"
:fixed="item.fixed"
:align="item.align || 'left'"
:sortable="item.sortable"
:render-header="item.renderHeader"
v-bind="item.columnattrs ? item.columnattrs : {}"
v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="item.formatter(scope.row)">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.row[item.prop]">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 宽度160px -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="tableData[scope.$index][item.prop]">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children"
:data="item.children"
:tableData="tableData"
:getListApi="getListApi"></sub-el-table-column>
</el-table-column>
<el-table-column class-name="gl-btns"
v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align || 'left'"
:width="tableParams.tableOption.width || '200'"
fixed="right">
<template slot-scope="scope">
<slot name="auth-button"
:scope="scope.row"></slot>
</template>
</el-table-column>
<template slot="empty">
<div class="emptyBg">
<img class="noDataImg"
:src="noDataImg"
v-if="noDataImg"
alt="" />
<div class="noDataText">{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</div>
</template>
</el-table>
<!-- hasPageComputed -->
<el-pagination v-if="hasPageComputed"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page[this.pageConf.pageNum]"
:page-sizes="pageSizes"
:page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal"
:layout="layout"
v-bind="paginationattrs"
v-on="paginationlisteners"></el-pagination>
</div>
</template>
<script>
import noDataImgUrl from '@/assets/empty.png'
import SubElTableColumn from './sub-el-table-column.vue'
// import GlSubTableColumn from '../../GlSubTableColumn'
// import GlSubTable from '../../GlSubTable'
export default {
name: 'GLTable',
components: {
SubElTableColumn
// GlSubTableColumn,
// GlSubTable
},
props: {
// `medium` / `small` / `mini`
size: {
type: String,
default: 'medium'
},
// height: {
// type: String,
// default: ''
// },
// maxHeight:{
// type:String,
// default:'3000'
// },
noDataImg: {
type: String,
default: noDataImgUrl
},
noDataText: {
type: String,
default: '暂无数据'
},
border: {
type: Boolean,
default: false
},
headerStyle: {
type: Object,
default: () => { }
},
//表格需要多传入一个id的情况
tableId: {
type: String,
default: ''
},
// 搜索条件
searchForm: {
type: Object,
default: () => { }
},
// 是否定制表头
isCustomHead: {
type: Boolean,
default: false
},
// 表头展示
customHeadShowList: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
// 默认值是:Function
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
}
},
pageSizes: {
type: Array,
default: () => [10, 20, 30, 40]
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
pageConf: {
type: Object,
default: () => ({
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'totalCount'
})
},
// 分页组件配置
layout: {
type: String,
default: 'total,sizes,prev,pager,next,jumper'
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true
},
// table的配置项参数
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识-行数据的key
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 设置禁止选中的行数据
checkSelectKey: {
type: String,
default: ''
},
// 设置禁止选中的值
checkSelectVal: {
type: Array,
default: () => []
},
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
},
// 表格项属性穿透
columnattrs: {
type: Object,
default: () => ({})
},
// 表格项事件穿透
columnlisteners: {
type: Object,
default: () => ({})
}
}
}
},
// el分页组件属性透传
paginationattrs: {
type: Object,
default: () => ({})
},
// el分页组件事件透传
paginationlisteners: {
type: Object,
default: () => ({})
}
},
data() {
return {
loading: false,
data: [],
// 页码
page: {},
total: 10,
// 多选数组
mutiSelectArr: {},
tableColumns: [],
showClass: false,
tableHeightValues: null,
bAntiShike: false, //防抖
componentKey: Date.now(), //用于更新组件
hightCell: ''
}
},
watch: {
customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol()
},
'tableParams.tableColumns'(newVal, oldVal) {
// console.log('newVal',newVal)
this.tableColumns = newVal
}
// data: {
// immediate: true,
// handler(val) {
// this.showClass = val.length > 0 ? true : false
// },
// deep: true
// }
},
computed: {
// 分页计算属性
hasPageComputed() {
if (!this.hasPage) {
return false
}
// 没有数据的时候隐藏分页 api
if (this.getListApi) {
if (this.data.length == 0) {
return false
}
} else {
// 直接传数据的情况
if (this.tableData.length == 0) {
return false
}
}
// //直接传数据的情况
// if (this.tableTotal && this.tableTotal > this.page[this.pageConf.pageSize]) {
// return true
// }
// //传list api的情况 总数 一页多少条
// if(this.total <= this.page[this.pageConf.pageSize]){
// return false
// }
// if (this.page[this.pageConf.pageNum] <= 1) {
// return false
// }
return true
},
numHasFixed() {
return this.tableParams.tableColumns.some(item => {
return item.fixed == 'left'
})
}
},
methods: {
findShowHeadCol() {
// findShowHeadCol事件
this.tableColumns = []
this.tableParams.tableColumns.forEach(item => {
let isCustomCol = item.hasOwnProperty('isCustomCol')
if (!isCustomCol || (isCustomCol && this.customHeadShowList.includes(item.label))) {
this.tableColumns.push(item)
}
})
},
// @vuese
// 设置表格禁用
// @arg row 每一行表格内容
checkSelectable(row) {
// 设置禁止选中的行数据
if (this.tableParams.checkSelectKey && this.tableParams.checkSelectVal.length > 0) {
return this.tableParams.checkSelectVal.indexOf(row[this.tableParams.checkSelectKey]) == -1
} else {
return true
}
},
sortChange({ column, prop, order }) {
// 排序
// @arg column \ prop \ order
this.$emit('sortChange', { column, prop, order })
},
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
// 多选
this.$emit('selectionTable', val)
},
clearMutiSelect() {
// 清空多选
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.clearSelection()
},
// @vuese
// 设置表格高度
// @arg 1.navHeight,这个减值,2.addHeight是增值, 默认都为0
setTableHeightFun(navHeight = 0, addHeight = 0) {
// 设置表格高度
//navHeight 传值底部高度
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = baseNavEle ? baseNavEle.clientHeight : 0
var baseSubNavEleHeight = baseSubNavEle ? baseSubNavEle.clientHeight : 0
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
} else {
paginationHeight = 0
}
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
// let tableHeight = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - 10 - 30 - 20
let tableHeight = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - navHeight + 10 + addHeight
// console.log('tableHeight: ', tableHeight, clientHeight, offsettop, paginationHeight, baseNavEleHeight, baseSubNavEleHeight, navHeight)
if (tableHeight < 240) {
tableHeight = 240
}
this.tableHeightValues = tableHeight
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
// 刷新table
this.beforeSearchFn().then(res => {
// 清空多选
isClearMuti && this.clearMutiSelect()
this.loading = true
isResetPageNum && (this.page[this.pageConf.pageNum] = 1)
var params = {
...this.page,
...this.searchForm
}
if (this.tableId) {
params.id = this.tableId
}
this.getListApi(params)
.then(res => {
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
this.$nextTick(() => {
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
})
// 表格请求到数据
// console.log('表格请求到数据this.data',this.data)
this.$emit('setTableFinishFun', this.data)
})
.catch(() => {
this.loading = false
})
})
},
findVal(res, rankStr) {
// 找返回值
var rankList = rankStr.split('.')
if (!rankStr) {
return res
}
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'))
},
handleSizeChange(value) {
// 每页条数
let offsettop = document.getElementById('initTable').offsetTop
this.page[this.pageConf.pageSize] = value
// 刷新表格
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
handleCurrentChange(value) {
// 页码
this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
//原table mounted要做的要做的事情
tableInit() {
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {}
this.page[this.pageConf.pageSize] = this.pageSizes[0]
this.page[this.pageConf.pageNum] = 1
this.getListApi && this.refreshTable()
setTimeout(() => {
// console.log('123456doLayout')
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
}, 100)
}
},
mounted() {
this.tableInit()
// 注册事件 -- 防抖
window.onresize = () => {
if (!this.bAntiShike) {
this.bAntiShike = true
setTimeout(() => {
// console.log('组件跟新时间')
this.bAntiShike = false
this.componentKey = Date.now()
}, 300)
}
}
},
beforeDestroy() {
// 事件注销
window.onresize = null
}
}
</script>
<style lang="scss">
// @import '@/theme/global.scss';
.a-click {
cursor: pointer;
}
.el-table .cell {
line-height: 1.2;
}
.gl-btns .el-button + .el-button {
margin-left: 10px;
}
.glsx-table p {
margin: 10px 0;
}
// .glsx-table .line-ellipsis {
// display: -webkit-box;
// width: 100%;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// }
.el-table-column--selection .cell {
padding-left: 14px !important;
padding-right: 14px !important;
}
.glsx-table {
// .select-column{
// .cell{
// }
// }
// .select-index{
// .cell{
// }
// }
.el-table__empty-text {
line-height: 1;
}
.emptyBg {
padding-top: 4px;
padding-bottom: 4px;
.noDataImg {
margin-bottom: 12px;
width: 64px;
height: 40px;
}
}
// .emptyBg {
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: center;
// height: 100%;
// }
}
.el-table__body-wrapper::-webkit-scrollbar {
width: 8px;
height: 8px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 8px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: rgba(144, 147, 153, 0.3);
border-radius: 8px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 8px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
/* .hasTableContent .el-table__body-wrapper{
height: 100%;
} */
/* 样式新增光亮tr */
/* .el-table */
//处理闪的问题
.el-table--enable-row-transition .el-table__body td.el-table__cell {
transition: background-color 0s ease !important;
}
.el-table--enable-row-transition .el-table__body td {
transition: background-color 0s ease !important;
}
.el-table .el-table__body tr.hover-row {
transform: translate3d(0, 0, 0);
box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table__body tr.hover-row > td {
background-color: #f4f4fc !important;
// box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table .el-table__body tr.hover-row > td.el-table__cell {
background-color: #f4f4fc !important;
// box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table tbody tr:hover {
transform: translate3d(0, 0, 0);
box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
// 去掉滚动条的上边框
.el-table tbody tr:last-child td {
border-bottom: 1px solid #fff;
}
//添加高亮行的竖线
.el-table.hightline .el-table__body tr.hover-row {
// background-color: #f4f4fc !important;
td:first-child {
position: relative;
// // background-color: #5850ff !important;
// background-color: #f4f4fc !important;
&:after {
position: absolute;
top: 0;
left: 0;
display: block;
content: '';
width: 5px;
height: 100%;
// background-color: $color-primary;
background-color: #5850ff;
}
}
}
.el-table.hightline tbody tr:hover {
// background-color: #f4f4fc !important;
td:first-child {
position: relative;
// // background-color: #5850ff !important;
// background-color: #f4f4fc !important;
&:after {
position: absolute;
top: 0;
left: 0;
display: block;
content: '';
width: 5px;
height: 100%;
// background-color: $color-primary;
background-color: #5850ff;
}
}
}
//除去左边fixed的阴影,添加竖线的时候
.el-table.hightline .el-table__fixed {
box-shadow: none !important;
}
//切换table后 el_table 固定列下方多了一条线
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
// 滚动条上边头部栏的背景色
.el-table__fixed-right-patch {
background: #f4f6fc;
border-bottom: 1px solid #ebeef5;
}
}
/* 样式新增光亮tr */
/* 多级表头的样式调整 */
.el-table.hightline .el-table__fixed .el-table__row td:first-child {
border-right: none;
}
.el-table.hightline .el-table__fixed th.is-leaf:first-child {
border: none;
}
</style>
<template>
<div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index + 'child'" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="scope.row[item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" width="200" trigger="hover" :content="tableData[scope.$index][item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<!-- <span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span> -->
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</template>
<script>
// import GlSubTableColumn from '../../GlSubTableColumn'
export default {
name: 'sub-el-table-column',
props: {
data: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
// 获取列表接口
getListApi: {
type: Function,
default: null
}
},
computed: {
reverseData() {
let arr = [...this.data]
let temp = arr.pop()
arr.unshift(temp)
return arr
}
},
// components: {
// GlSubTableColumn
// }
// created(){
// // console.log('data',this.data)
// }
}
</script>
<style lang="scss">
// .sub-el-table-column {
// }
</style>
......@@ -10,102 +10,81 @@
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton> -->
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
<el-button :size="size"
type="default"
class="default-blue-btn"
@click="handleJump">订单管理</el-button>
</div>
<div class="container">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
<el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable
ref="activity"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="activityImg"
class="table-image"
slot-scope="scope"
>
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.activityImg"
/>
<img
class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg"
/>
<single-gltable ref="activity"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="activityImg"
class="table-image"
slot-scope="scope">
<el-popover placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.activityImg" />
<img class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg" />
</el-popover>
</div>
<div
slot="linkText"
slot-scope="scope"
>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{scope.scope[scope.prop] || 0}}</p>
<div slot="linkText"
slot-scope="scope">
<p class="cursor-pointer"
@click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div>
</GLTable>
</single-gltable>
<!-- 表格区域 end -->
</div>
<!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare>
<crowdFundingShare :isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"></crowdFundingShare>
</div>
</template>
<script>
import crowdFundingShare from '../productGroup/components/crowdFundingShareDialog.vue'
import GLTable from './components/table/index'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'crowdFundList',
data () {
data() {
return {
size: 'small',
url: url,
......@@ -273,34 +252,40 @@ export default {
{
label: '活动名称',
prop: 'activityName',
width: 220
width: 220,
fixed: 'left'
},
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
label: '门店',
prop: 'merchantName',
width: 220,
fixed: 'left'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
label: '缩略图',
prop: 'activityImg',
addHtml: 'activityImg'
},
{
label: '销量',
prop: 'saleAmount'
label: '收款模式',
prop: 'payMentModel',
width: 220,
formatter: cellValue => {
const model = {
1: '广联收定金和尾款',
2: '广联收定金门店收尾款',
3: '广联收定金门店收全款退定金',
4: '门店收定金和尾款'
}
return model[cellValue.paymentModel] || '--'
}
},
{
label: '缩略图',
prop: 'activityImg',
addHtml: 'activityImg'
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '进账',
prop: 'income',
......@@ -323,6 +308,20 @@ export default {
}
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '秒杀价(元)',
name: 'activityPrice',
width: 140,
......@@ -374,19 +373,20 @@ export default {
},
components: {
crowdFundingShare
crowdFundingShare,
singleGltable: GLTable
},
mounted () {
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams () {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn () {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate
......@@ -394,13 +394,13 @@ export default {
})
},
handleJump (path, row = {}) {
handleJump(path, row = {}) {
this.$router.push({
path: '/orderManage/index'
})
},
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -426,16 +426,16 @@ export default {
},
//开始
start (item) {
start(item) {
this.startOrEndConfirm('开始', item)
},
//结束
end (item) {
end(item) {
this.startOrEndConfirm('结束', item)
},
startOrEndConfirm (txt, row) {
startOrEndConfirm(txt, row) {
var title = txt
var params = {}
params.id = row.id
......@@ -448,21 +448,21 @@ export default {
},
//置顶
topping (row) {
topping(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
},
//删除
del (row) {
del(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
},
// 1-新增;2-编辑
handleEdit (addOrEdit, row) {
handleEdit(addOrEdit, row) {
var txtObj = {
add: '新建',
edit: '编辑',
......@@ -486,7 +486,7 @@ export default {
// console.log(JSON.parse(JSON.stringify(option)))
// },
// 明细
handleDetail ({ prop, scope }) {
handleDetail({ prop, scope }) {
let data = {
viewAmount: {
type: 1,
......@@ -507,30 +507,30 @@ export default {
id: scope.id,
activityName: scope.activityName,
type: data.type,
count: data.count,
count: data.count
}
})
},
handleExport () {
handleExport() {
var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res)
})
},
handleShare (row) {
handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose () {
handleShareClose() {
this.isShareVisible = !this.isShareVisible
},
getOptionsList (formName, hasAll = true, refreshSigle) {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
......@@ -556,11 +556,11 @@ export default {
}
},
handleSearch () {
handleSearch() {
this.$refs.activity.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = {
activityName: '',
activityStatus: ''
......@@ -568,7 +568,7 @@ export default {
this.handleSearch()
},
setTableFinishFun () {
setTableFinishFun() {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
}
......
......@@ -46,7 +46,8 @@
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"></GLCombiForm>
@handleOk="handleSearchRank"
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size"
......@@ -358,10 +359,10 @@ export default {
this.getLiveData()
},
mounted() {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'),
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default')
// [rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none'
if (rankResetBtn) rankResetBtn.style.display = 'none'
// if (rankResetBtn) rankResetBtn.style.display = 'none'
},
methods: {
......@@ -386,6 +387,11 @@ export default {
// 直播间数据统计
// this.getLiveBroadcastRoomDataStatistics()
},
handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm
// this.$refs.rankRef.refreshTable()
// this.handleSearch()
},
getDailyOrderQuantityStatistics() {
this.$apis.seckillActivity
.getDailyOrderQuantityStatistics({ id: this.activityId })
......
......@@ -468,7 +468,9 @@ export default {
reservationInstallContactsName: '',
reservationInstallContactsPhone: '',
targetStock: '',
paymentAccountSource: '1',
paymentAccountId: '',
payMannerId: '',
// 战报内容配置
activityActionReport: {
produceReportSummary: '',
......@@ -1100,6 +1102,28 @@ export default {
addHtml: 'live'
},
{
label: '账户类型',
name: 'paymentAccountSource',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '广联'
},
{
confId: '2',
confName: '服务商'
}
],
isDisabled: false,
handleRadioChange: (value, targetItem) => {
this.editForm.paymentAccountId = ''
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = value == '1' ? this.baseData.payList : this.baseData.payMerchatList
}
},
{
label: '定金收款账户',
name: 'paymentAccountId',
type: 'select',
......@@ -1218,7 +1242,11 @@ export default {
COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif',
COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif'
}),
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif'
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif',
baseData: {
payList: [],
payMerchatList: []
}
}
},
......@@ -1256,7 +1284,7 @@ export default {
true
)
})
this.changeFormAttr('configEditFormData', 'isDisabled', ['定金收款账户'], true)
this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true)
}
}
},
......@@ -1807,6 +1835,8 @@ export default {
this.handleMusicChange(this.musicList.length - 1)
}
}
// 定金收款账户
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource ? this.editForm.paymentAccountSource + '' : '1'
// 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
......@@ -2191,15 +2221,27 @@ export default {
this.liveEditFormData.find(item => item.name == 'liveBroadcastRoomId').optionList = staff
})
},
// 定金收款账户
getPayList() {
this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = res
this.editForm.paymentAccountId = this.editForm.paymentAccountId || res.find(item => item.isDefault == 'Y').id
getPayMerchatList() {
this.$apis.seckillActivity.getPayMerchatListApi({ pageNum: 1, pageSize: 9999 }).then(res => {
res.list.forEach(item => {
item.id = item.payMannerId
item.accountName = item.mchName
})
this.baseData.payMerchatList = res.list
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = this.editForm.paymentAccountSource == 1 ? this.baseData.payList : this.baseData.payMerchatList
this.$nextTick(() => {
this.editStatus = false
})
})
},
// 定金收款账户
getPayList() {
this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.baseData.payList = res
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource || '1'
this.editForm.paymentAccountId = this.editForm.paymentAccountId || this.editForm.payMannerId || res.find(item => item.isDefault == 'Y')?.id
this.getPayMerchatList()
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!