Commit 3ca30ba4 by 李伟康

紧急版本

1 parent 1f045200
......@@ -2,62 +2,62 @@
<template>
<div class="marketing order-manage">
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<template v-if="showTable">
<div class="sticky">
<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"
>
<template v-for="(i,index) in requestSourceList">
<el-tab-pane
:label="i"
:name="index"
:key="index"
></el-tab-pane>
</template>
</el-tabs>
<div class="flex">
<div class="flex-default tabs">
<el-tabs
v-model="searchForm.requestSource"
@tab-click="handleTabClick"
>
<template v-for="(i,index) in requestSourceList">
<el-tab-pane
:label="i"
:name="index"
:key="index"
></el-tab-pane>
</template>
</el-tabs>
</div>
<div class="btn-group">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="visibleImportDialog(true)"
>导入</el-button>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
<div class="btn-group">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="visibleImportDialog(true)"
>导入</el-button>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table">
<div class="table-tips">
<div class="table-tips-text">
已生成有效订单{{ statisticsInfo.orderCount || 0 }}项 累计订单总额:{{ statisticsInfo.payPriceTotal || 0 }}元 累计退款总额:{{ statisticsInfo.refundTotal || 0 }} 元
</div>
<el-button
class="default-blue-btn"
class="default-blue-btn refund-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
@click="batchRefundVisible = true"
:disabled="selectList.length == 0"
>批量退款</el-button>
</div>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table">
<div class="table-tips">
<div class="table-tips-text">
已生成有效订单{{ statisticsInfo.orderCount || 0 }}项 累计订单总额:{{ statisticsInfo.payPriceTotal || 0 }}元 累计退款总额:{{ statisticsInfo.refundTotal || 0 }} 元
</div>
<el-button
class="default-blue-btn refund-btn"
:size="size"
type="default"
@click="batchRefundVisible = true"
:disabled="selectList.length == 0"
>批量退款</el-button>
</div>
<template v-if="showTable">
<GLTable
ref="allOrderRef"
:getListApi="getListApi"
......@@ -194,7 +194,12 @@
<template v-if="scope.scope.marketingStatus">
<span :class="['table-circle', 'm-r-8', [1, 2].includes(scope.scope.marketingStatus) ? 'back-green' : 'back-grey']"></span>
</template>
<span>{{ baseData.marketingStatusList.map(item => item.confId).includes(scope.scope.marketingStatus + '') ? baseData.marketingStatusList.find(item => item.confId == scope.scope.marketingStatus).confName : '-' }}</span>
<span>{{ scope.scope.marketingStatus ?{
1:'已完结',
2:'已完结',
3:'未完结',
4:'已取消'
}[scope.scope.marketingStatus]: '-' }}</span>
</div>
<div
class="table-btns"
......@@ -208,8 +213,8 @@
></GLTableButton>
</div>
</GLTable>
</template>
</div>
</div>
</template>
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
......@@ -580,246 +585,7 @@ export default {
refundTotal: ''
},
// 搜索
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input'
},
{
label: '订单状态',
name: 'orderStatuses',
type: 'select',
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchOrderStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '订单状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.orderStatuses.length; i++) {
if (!value.includes(this.oldVal.orderStatuses[i])) {
targetVal = this.oldVal.orderStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.orderStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.orderStatuses.push('')
}
}
this.oldVal.orderStatuses = this.$common.utils.deepClone(this.searchForm.orderStatuses)
}
},
{
label: '售后状态',
name: 'afterSaleStatuses',
type: 'select',
labelWidth: 72,
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchAfterSaleStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '售后状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
targetVal = this.oldVal.afterSaleStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('')
}
}
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
},
{
label: '门店',
name: 'merchantNames',
type: 'select',
labelWidth: 56,
multiple: true,
attrs: {
multipleLimit: 10,
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
},
{
label: '客户姓名',
name: 'customerName',
type: 'input'
},
{
label: '订单日期',
name: 'createDate',
type: 'datePicker',
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
// {
// label: '订单类型',
// name: 'orderSource',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'orderSourceList'
// },
{
label: '结算方式',
name: 'deliveryType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'deliveryTypeList'
},
{
label: '商户订单号',
name: 'outTradeNo',
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: 'activityNames',
labelWidth: 56,
type: 'select',
multiple: true,
attrs: {
multipleLimit: 10,
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '商品名称',
name: 'goodsName',
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'customerPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
{
label: '推荐人手机号',
name: 'shareStaffPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
{
label: '测试单',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'testSheetTypeList'
},
{
label: '退款类型',
name: 'afterSaleType',
type: 'select',
optionList: [
{
confId: null,
confName: '全部'
},
{
confId: '2',
confName: '退定金'
},
{
confId: '1',
confName: '退订单'
}
],
optionId: 'confId',
optionLabel: 'confName',
},
{
label: '线下订单',
name: 'isOffline',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'isOffSheetTypeList'
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'businessTypeList'
},
{
label: '营销状态',
name: 'marketingStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'marketingStatusList'
}
],
searchFormData: [],
// 快递信息
isExpressVisible: false,
writeOffApprovalVisible: false,
......@@ -1076,8 +842,7 @@ export default {
],
businessTypeList: utils.deepClone(businessType),
marketingStatusList: [
{ confId: '1', confName: '已完结(自动)' },
{ confId: '2', confName: '已完结(手动)' },
{ confId: '1', confName: '已完结' },
{ confId: '3', confName: '未完结' },
{ confId: '4', confName: '已取消' }
]
......@@ -1138,7 +903,6 @@ export default {
this.getCrowdfundingOrderConfig()
this.getCrowdfundingParams()
// this.getCount()
this.getOptionsList('searchFormData')
},
methods: {
......@@ -1340,23 +1104,263 @@ export default {
return cellValue.outTradeNo || '-'
}
}
]
],
searchFormData = [
{
label: '订单编号',
name: 'orderCode',
type: 'input'
},
{
label: '订单状态',
name: 'orderStatuses',
type: 'select',
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchOrderStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '订单状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.orderStatuses.length; i++) {
if (!value.includes(this.oldVal.orderStatuses[i])) {
targetVal = this.oldVal.orderStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.orderStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.orderStatuses.push('')
}
}
this.oldVal.orderStatuses = this.$common.utils.deepClone(this.searchForm.orderStatuses)
}
},
{
label: '售后状态',
name: 'afterSaleStatuses',
type: 'select',
labelWidth: 72,
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchAfterSaleStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '售后状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
targetVal = this.oldVal.afterSaleStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('')
}
}
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
},
{
label: '门店',
name: 'merchantNames',
type: 'select',
labelWidth: 56,
multiple: true,
attrs: {
multipleLimit: 10,
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
},
{
label: '客户姓名',
name: 'customerName',
type: 'input'
},
{
label: '订单日期',
name: 'createDate',
type: 'datePicker',
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '结算方式',
name: 'deliveryType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'deliveryTypeList'
},
{
label: '商户订单号',
name: 'outTradeNo',
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: 'activityNames',
labelWidth: 56,
type: 'select',
multiple: true,
attrs: {
multipleLimit: 10,
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '商品名称',
name: 'goodsName',
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'customerPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
{
label: '推荐人手机号',
name: 'shareStaffPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
},
{
label: '测试单',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'testSheetTypeList'
},
{
label: '退款类型',
name: 'afterSaleType',
type: 'select',
optionList: [
{
confId: null,
confName: '全部'
},
{
confId: '2',
confName: '退定金'
},
{
confId: '1',
confName: '退订单'
}
],
optionId: 'confId',
optionLabel: 'confName',
},
{
label: '线下订单',
name: 'isOffline',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'isOffSheetTypeList'
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'businessTypeList'
},
{
label: '营销状态',
name: 'marketingStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'marketingStatusList'
}
]
try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus']
filterTableList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffName', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
if (res == 1) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterList.includes(tableColumns[i].prop)) {
if (filterTableList.includes(tableColumns[i].prop)) {
tableColumns.splice(i, 1)
i--
}
}
for (let i = 0; i < searchFormData.length; i++) {
if (filterFormList.includes(searchFormData[i].name)) {
searchFormData.splice(i, 1)
i--
}
}
}
} catch (error) {
console.log(error)
}
this.tableParams.tableColumns = tableColumns
this.searchFormData = searchFormData
this.showTable = true
this.getOptionsList('searchFormData')
},
getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm))
......
......@@ -4,78 +4,116 @@
<div class="edit-box">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
<el-form label-width="100px"
:inline="true">
<el-row v-for="(item, index) in detailFormDataRow"
:key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
class="row-item">
<span class="detail-txt ellipsis-1"
:title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<el-form
label-width="100px"
:inline="true"
>
<el-row
v-for="(item, index) in detailFormDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
class="row-item"
>
<span
class="detail-txt ellipsis-1"
: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>
<template v-if="detailForm.formDescribe">
<el-form-item label="其他信息">{{ detailForm.formDescribe }}</el-form-item>
</template>
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p>
<el-form label-width="100px"
:inline="true">
<el-form
label-width="100px"
:inline="true"
>
<el-form-item label="物流信息">
<span>{{ detailForm.deliveryCompany }}&nbsp;&nbsp;&nbsp;{{ detailForm.deliveryNumber }}</span>
</el-form-item>
</el-form>
<div v-if="orderGoods.length"
class="p-l-40">
<div
v-if="orderGoods.length"
class="p-l-40"
>
<table class="show-table">
<tbody>
<tr v-for="(item, index) in orderGoods"
:key="index"
style="height: 70px;">
<td><img :src="item.goodsImage"
class="img-60" /></td>
<tr
v-for="(item, index) in orderGoods"
:key="index"
style="height: 70px;"
>
<td><img
:src="item.goodsImage"
class="img-60"
/></td>
<td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 *
{{ item.goodsNumber }}</td>
</tr>
<tr v-if="detailForm.subOrderCoupon"
style="height: 40px;">
<td style="text-align: left;"
colspan="3">优惠券</td>
<tr
v-if="detailForm.subOrderCoupon"
style="height: 40px;"
>
<td
style="text-align: left;"
colspan="3"
>优惠券</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container edit-container"
v-if="orderRefund">
<div
class="container edit-container"
v-if="orderRefund"
>
<p class="edit-title">售后信息</p>
<el-form label-width="100px"
:inline="true">
<el-row v-for="(item, index) in afterInfoDataRow"
:key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label">
<span class="detail-txt ellipsis-1"
:title="orderRefund[subItem.name]">{{ orderRefund[subItem.name] || '-' }}</span>
<el-form
label-width="100px"
:inline="true"
>
<el-row
v-for="(item, index) in afterInfoDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
>
<span
class="detail-txt ellipsis-1"
:title="orderRefund[subItem.name]"
>{{ orderRefund[subItem.name] || '-' }}</span>
</el-form-item>
</el-row>
</el-form>
<div class="form-img">
<el-form label-width="100px"
:inline="true">
<el-form
label-width="100px"
:inline="true"
>
<el-form-item label="售后凭证">
<div class="flex">
<span v-for="(item, index) in orderRefund.imgUrls"
:key="index">
<el-image class="img-60 comment-img"
:src="item"
:preview-src-list="[item]"></el-image>
<span
v-for="(item, index) in orderRefund.imgUrls"
:key="index"
>
<el-image
class="img-60 comment-img"
:src="item"
:preview-src-list="[item]"
></el-image>
</span>
</div>
</el-form-item>
......@@ -84,8 +122,10 @@
</div>
</div>
<GLFooter>
<el-button @click="handleCancel"
size="medium">取消</el-button>
<el-button
@click="handleCancel"
size="medium"
>取消</el-button>
</GLFooter>
</div>
</template>
......@@ -95,7 +135,7 @@ import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data() {
data () {
return {
size: 'small',
title: '查看订单',
......@@ -108,7 +148,70 @@ export default {
orderGoods: [],
// 订单信息
detailFormDataRow: [],
detailFormData: [
detailFormData: [],
// 售后信息
afterInfoDataRow: [],
afterInfoData: [
{
label: '售后类型',
name: 'refundTypeName'
},
{
label: '申请金额',
name: 'refundPrice'
},
{
label: '申请时间',
name: 'createdDateStr'
},
{
label: '申请描述',
name: 'remark'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
}
// {
// label: '售后凭证',
// name: ''
// }
],
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' },
{ confId: '3', confName: '众筹订单退款' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
]
},
hideStatus: false
}
},
created () {
},
mounted () {
this.getCrowdfundingOrderConfig()
},
methods: {
async getCrowdfundingOrderConfig () {
let detailFormData = [
{
label: '订单编号',
name: 'orderCode'
......@@ -182,69 +285,26 @@ export default {
label: '商品名称',
name: 'goodsName'
}
],
// 售后信息
afterInfoDataRow: [],
afterInfoData: [
{
label: '售后类型',
name: 'refundTypeName'
},
{
label: '申请金额',
name: 'refundPrice'
},
{
label: '申请时间',
name: 'createdDateStr'
},
{
label: '申请描述',
name: 'remark'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
]
const res = await this.$apis.common.getCrowdfundingOrderConfig()
let hideStatus = res == 1
if (hideStatus) {
const filterFormList = ['customerPhone', 'shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1)
i--
}
}
// {
// label: '售后凭证',
// name: ''
// }
],
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' },
{ confId: '3', confName: '众筹订单退款' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
]
}
}
},
created() {
this.formToRow('afterInfoData')
},
mounted() {
this.setMinHeight('.edit-box')
this.routeInfo = this.$route.query
this.getInfo()
},
methods: {
formToRow(formName, numOfRow = 3) {
this.hideStatus = hideStatus
this.detailFormData = detailFormData
this.setMinHeight('.edit-box')
this.routeInfo = this.$route.query
this.getInfo()
this.formToRow('afterInfoData')
},
formToRow (formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
for (var j = 0; j < numOfRow; j++) {
......@@ -259,7 +319,7 @@ export default {
}
}
},
getInfo() {
getInfo () {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
......@@ -288,28 +348,30 @@ export default {
this.detailFormData.splice(takeFeeIdx, 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 + ' '
if (!this.hideStatus) {
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')
})
},
handleCancel() {
handleCancel () {
this.$router.push({
path: '/orderManage/index'
})
......
......@@ -2,41 +2,108 @@
<template>
<div class="marketing">
<div class="m-b-20">
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="handleEdit('add')" fn="新增众筹" mode="el-button">新建众筹</GLButton>
<el-button :size="size" type="default" class="default-blue-btn" @click="handleJump">订单管理</el-button>
<GLButton
:size="size"
class="default-blue-btn el-icon-plus"
type="default"
@click="handleEdit('add')"
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton>
<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>
<!-- 表格区域 开始 -->
<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" />
<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">
<template v-if="scope.scope.incrementFlag == 'Y'">
<div
slot="linkText"
slot-scope="scope"
>
<template v-if="scope.scope.incrementFlag == 'Y' || hideStatus">
{{scope.scope[scope.prop] || 0 }}
</template>
<template v-else>
<p class="cursor-pointer" @click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{ scope.scope[scope.prop] || 0 }}</p>
</template>
</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>
</single-gltable>
<!-- 表格区域 end -->
</div>
<!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare>
<crowdFundingShare
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
></crowdFundingShare>
</div>
</template>
......@@ -48,7 +115,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'crowdFundList',
data() {
data () {
return {
size: 'small',
url: url,
......@@ -374,7 +441,8 @@ export default {
confName: '已结束'
}
]
}
},
hideStatus: false
}
},
......@@ -383,7 +451,8 @@ export default {
singleGltable: GLTable
},
mounted() {
mounted () {
this.getCrowdfundingOrderConfig()
this.getCrowdfundingParams()
this.getOptionsList('searchFormData')
......@@ -399,17 +468,21 @@ export default {
},
methods: {
__getRoutes(ctx) {
async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
this.hideStatus = res == 1
},
__getRoutes (ctx) {
const {
$GLBUTTION_PERMISSIONS: { routes = [], routerBase }
} = ctx
return routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`)
},
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
......@@ -417,13 +490,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: '取消',
......@@ -449,16 +522,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
......@@ -471,21 +544,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: '编辑',
......@@ -504,11 +577,11 @@ export default {
query: params
})
},
test(option) {
test (option) {
console.log(JSON.parse(JSON.stringify(option)))
},
// 明细
handleDetail({ prop, scope }) {
handleDetail ({ prop, scope }) {
let data = {
viewAmount: {
type: 1,
......@@ -534,25 +607,25 @@ export default {
})
},
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)
......@@ -578,11 +651,11 @@ export default {
}
},
handleSearch() {
handleSearch () {
this.$refs.activity.refreshTable()
},
handleReset() {
handleReset () {
this.searchForm = {
activityNames: [],
activityStatus: '',
......@@ -591,12 +664,12 @@ export default {
this.handleSearch()
},
setTableFinishFun() {
setTableFinishFun () {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
},
async getCrowdfundingParams() {
async getCrowdfundingParams () {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
......
......@@ -966,6 +966,10 @@
:disabled="isDisabled"
:label="4"
>门店收定金和尾款</el-radio>
<el-radio
:disabled="isDisabled"
:label="5"
>服务商收定金门店收尾款</el-radio>
</el-radio-group>
</div>
</glsx-combi-form>
......@@ -1160,7 +1164,7 @@ export default {
selectVehicleTypeFlag: 2,
selectPhoneNumberFlag: 2,
businessType: 2, //业务场景
orderEndDays: 30, //订单完结时间天数
orderEndDays: 60, //订单完结时间天数
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [],
activityCommoditys: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!