Commit f0b1bbc4 by 胡悦
2 parents 1182e0f1 809e196c
......@@ -22,4 +22,59 @@ const getCountApi = params => {
})
}
export default { getListApi, getCountApi }
\ No newline at end of file
const getOrderDetailApi = params => {
params.method = `${defaultPath}order.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const orderExportApi = params => {
params.method = `${defaultPath}order.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 订单核销
const writeOffApi = params => {
params.method = `${defaultPath}order.verfication`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 快递信息
const addDeliveryApi = params => {
params.method = `${defaultPath}order.addDelivery`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 退款审核 - 详情
const examineDetailApi = params => {
params.method = `${defaultPath}orderRefund.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi }
\ No newline at end of file
......@@ -9,7 +9,6 @@ html {
}
.marketing .container {
padding: 0px 20px 20px 40px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
......
......@@ -27,52 +27,32 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
}
}
const liveStatusList = [{
confId: '101',
confName: '直播中'
},
{
confId: '102',
confName: '未开始'
},
{
confId: '103',
confName: '已结束'
},
{
confId: '104',
confName: '禁播'
},
{
confId: '105',
confName: '暂停'
},
{
confId: '106',
confName: '异常'
},
{
confId: '107',
confName: '已过期'
}
const orderManageStatusList = [
{ confId: '1', confName: '未支付' },
// { id: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' },
{ confId: '5', confName: '已收货' },
{ confId: '6', confName: '待审核' },
{ confId: '7', confName: '审核成功' },
{ confId: '8', confName: '审核失败' },
{ confId: '9', confName: '待确认' },
{ confId: '10', confName: '退款中' },
{ confId: '11', confName: '已退款' },
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '已安装' }
]
const auditStatusList = [{
confId: 0,
confName: '未审核'
},
{
confId: 1,
confName: '审核中'
},
{
confId: 2,
confName: '审核通过'
},
{
confId: 3,
confName: '审核失败'
}
const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' }
]
const deliveryTypeList = [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
//会员中心得状态list
......@@ -166,8 +146,9 @@ const stateList = [{
export {
limitPrice,
liveStatusList,
auditStatusList,
orderManageStatusList,
orderSourceList,
deliveryTypeList,
statusList,
serviceStatusList,
memberTypeList,
......
const staticRoutes = Object.freeze([
{
const staticRoutes = Object.freeze([{
name: 'default',
path: '/',
redirect: { name: 'home' }
......@@ -131,6 +130,18 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'orderComment',
path: '/orderComment/index',
component: resolve => require([`@/views/orderManage/index.vue`], resolve),
meta: {}
},
{
name: 'commentDetail',
path: '/orderComment/commentDetail',
component: resolve => require([`@/views/orderComment/commentDetail.vue`], resolve),
meta: {}
},
{
name: 'detailCustomer',
path: '/customerTransform/detailCustomer/:id',
component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve),
......@@ -197,4 +208,4 @@ const staticRoutes = Object.freeze([
meta: {}
},
])
export default staticRoutes
export default staticRoutes
\ No newline at end of file
<!-- 评论详情 -->
<template>
<div class="edit-share marketing">
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
title: '评论详情',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
id: ''
},
editForm: {
// 专区类型(1发现频道,2商城专区)
zoneType: '2',
zoneName: '',
zoneImg: '',
merchantList: []
},
editRule: {
zoneName: [{ required: true, message: '请输入专区名称', trigger: 'change' }],
zoneImg: [{ required: true, message: '请选择专区图片', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
editFormData: [
{
label: '专区名称',
name: 'zoneName',
width: '320px',
type: 'input',
maxlength: 20
},
{
label: '专区图片',
name: 'zoneImg',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
}
]
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.getInfo()
},
methods: {
getInfo() {
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
// this.editForm.zoneName = res.zoneName
// this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
// })
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
}
})
},
handleCancel() {
this.$router.push({
path: '/orderComment/index'
})
}
}
}
</script>
<style scoped></style>
<!-- 评价管理-->
<template>
<div class="marketing">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'orderComment',
data() {
return {
size: 'small',
searchForm: {
commentStatus: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '评价日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '评价状态',
name: 'commentStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'commentStatusList'
}
],
// 表格
getListApi: this.$apis.orderShare.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '评价日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '评价状态',
prop: 'shareSource'
// formatter: cellValue => {
// return this.baseData.sourceList.find(item => item.confId == cellValue.shareSource).confName
// }
},
{
label: '评论人',
prop: 'shareStatus'
// formatter: cellValue => {
// return this.baseData.statusList.find(item => item.confId == cellValue.shareStatus).confName
// }
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
}
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.createStartDate = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createEndDate = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// fn && fn()
// this.handleSearch()
// }
// })
}
}
})
},
// 1-新增;2-编辑
// handleEdit(addOrEdit, row) {
// addOrEdit == 1 ? this.$router.push('/orderShare/editShare/' + addOrEdit) : this.$router.push('/orderShare/editShare/' + addOrEdit + '/' + row.id)
// },
// 查看
handleDetail(row) {
this.$router.push('/orderComment/commentDetail/' + row.id)
},
// 发布/撤回
handleRevoke(row) {
this.secondConfirm('撤回', '是否确认撤回该评论?', 'orderShare', 'revokeShareRecordApi', { id: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该评论?', 'orderShare', 'deleteShareRecordApi', { id: row.id })
},
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)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleSearch() {
this.$refs.commentRef.refreshTable()
},
handleReset() {
this.searchForm = {
commentStatus: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
<!-- 订单管理 -->
<template>
<div class="marketing">
<!-- <div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增分类</el-button>
</div>-->
<div class="container">
<div class="list-tips">
<img class="tips-img" src="@/assets/icon-info.png" />
......@@ -23,13 +20,19 @@
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="全部订单" name="allOrder"></el-tab-pane>
<el-tab-pane label="售后订单" name="afterOrder"></el-tab-pane>
</el-tabs>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable
ref="classifyRef"
ref="allOrderRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
......@@ -37,23 +40,48 @@
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 13" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<!-- <el-button v-if="scope.scope.orderStatus == 6" type="text" @click="handleExamine(scope.scope)">退款审核</el-button> -->
<el-button v-if="scope.scope.orderStatus == 9" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
<glsx-dialog v-if="isExpressVisible" title="输入快递信息" :isVisible.sync="isExpressVisible" @confirmDialog="handleExpressConfirm" @closeDialog="handleExpressClose">
<glsx-combi-form ref="expressRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="expressForm" :formData="expressFormData" :formRules="expressRules">
</glsx-combi-form>
</glsx-dialog>
<!-- 订单核销 -->
<glsx-dialog v-if="isWriteOffVisible" title="订单核销(请确保用户到店后核销,避免引起不必要问题)" :isVisible.sync="isWriteOffVisible" @confirmDialog="handleWriteOffConfirm" @closeDialog="handleWriteOffClose">
<glsx-combi-form ref="writeOffRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="writeOffForm" :formData="writeOffFormData" :formRules="writeOffRules">
</glsx-combi-form>
</glsx-dialog>
<!-- 退款审核 -->
<!-- <glsx-dialog v-if="isExamineVisible" title="退款审核" :isVisible.sync="isExamineVisible" @confirmDialog="handleExamineConfirm" @closeDialog="handleExamineClose">
<glsx-combi-form ref="examineRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules">
</glsx-combi-form>
</glsx-dialog> -->
<!-- 确认收获 -->
<!-- <glsx-dialog v-if="isReceivingVisible" title="确认收货" :isVisible.sync="isReceivingVisible" @confirmDialog="handleReceivingConfirm" @closeDialog="handleReceivingClose">
<glsx-combi-form ref="receivingRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="receivingForm" :formData="receivingFormData" :formRules="receivingRules">
</glsx-combi-form>
</glsx-dialog> -->
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderManage',
data() {
return {
size: 'small',
activeName: 'allOrder',
orderCode: '',
oldVal: {
orderStatuses: []
},
......@@ -67,14 +95,16 @@ export default {
deliveryType: ''
},
tableSearchForm: {},
statisticsInfo: {},
statisticsInfo: {
orderCount: '',
payPriceTotal: ''
},
// 搜索
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input',
maxlength: 20
type: 'input'
},
{
label: '订单状态',
......@@ -144,6 +174,79 @@ export default {
optionsName: 'deliveryTypeList'
}
],
// 快递信息
isExpressVisible: false,
editChildRef: 'editChildRef',
expressForm: {
deliveryCompany: '',
deliveryNumber: ''
},
expressRules: {
deliveryCompany: [{ required: true, message: '快递公司是必填项', trigger: 'change' }],
deliveryNumber: [{ required: true, message: '快递单号是必填项', trigger: 'change' }]
},
expressFormData: [
{
label: '快递公司',
name: 'deliveryCompany',
type: 'input',
maxlength: 20
},
{
label: '快递单号',
name: 'deliveryNumber',
type: 'input',
maxlength: 20
}
],
// 订单核销
isWriteOffVisible: false,
writeOffForm: {
writeOffCode: ''
},
writeOffRules: {
writeOffCode: [{ required: true, message: '核销码是必填项', trigger: 'change' }]
},
writeOffFormData: [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 32
}
],
// 退款审核
isExamineVisible: false,
examineForm: {
examineCode: ''
},
examineRules: {
examineCode: [{ required: true, message: '核销码是必填项', trigger: 'change' }]
},
examineFormData: [
{
label: '核销码',
name: 'examineCode',
type: 'input',
maxlength: 32
}
],
// 确认收获
isReceivingVisible: false,
receivingForm: {
receivingCode: ''
},
receivingRules: {
receivingCode: [{ required: true, message: '核销码是必填项', trigger: 'change' }]
},
receivingFormData: [
{
label: '核销码',
name: 'receivingCode',
type: 'input',
maxlength: 32
}
],
// 表格
getListApi: this.$apis.orderManage.getListApi,
tableParams: {
......@@ -152,53 +255,65 @@ export default {
tableColumns: [
{
label: '订单编号',
prop: 'orderCode'
prop: 'orderCode',
width: '160'
},
{
label: '订单时间',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '客户信息',
prop: 'customerName'
prop: 'customerName',
line: 2
},
{
label: '订单状态',
prop: 'orderStatus'
}
prop: 'orderStatus',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
}
},
{
label: '支付总价',
prop: 'payPrice',
formatter: cellValue => {
return '¥' + cellValue.payPrice
}
},
{
label: '门店信息',
prop: 'merchantName',
line: 2
},
{
label: '订单类型',
prop: 'orderSource',
width: '80',
formatter: cellValue => {
return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-'
}
},
{
label: '结算方式',
prop: 'deliveryType',
width: '80',
formatter: cellValue => {
return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-'
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
orderStatusList: [
{ confId: '1', confName: '未支付' },
// { id: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' },
{ confId: '5', confName: '已收货' },
{ confId: '6', confName: '待审核' },
{ confId: '7', confName: '审核成功' },
{ confId: '8', confName: '审核失败' },
{ confId: '9', confName: '待确认' },
{ confId: '10', confName: '退款中' },
{ confId: '11', confName: '已退款' },
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '已安装' }
],
orderSourceList: [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' }
],
deliveryTypeList: [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList
}
}
},
......@@ -215,6 +330,10 @@ export default {
params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdEndDateStr = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
// 售后订单
if (this.activeName == 'afterOrder') {
params.orderStatusPart = 1
}
delete params.createDate
return params
},
......@@ -279,25 +398,172 @@ export default {
var params = this.getParams()
delete params.createDate
this.$apis.orderManage.getCountApi(params).then(res => {
this.statisticsInfo = res || {}
this.statisticsInfo = res || { orderCount: '', payPriceTotal: ''}
})
},
handleDetail(row) {
this.$router.push('/orderManage/orderDetail/' + row.orderCode)
},
// 输入快递信息 - start
handleExpressClose() {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = ''
this.expressForm = {
deliveryCompany: '',
deliveryNumber: ''
}
},
handleExpressConfirm() {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.expressForm)
params.orderCode = this.orderCode
this.$apis.orderManage.addDeliveryApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleExpressClose()
this.handleSearch()
}
})
}
})
},
handleExpressInfo(row) {
this.handleExpressClose()
this.orderCode = row.orderCode
},
// 输入快递信息 - end
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
// 订单核销 - start
handleWriteOffClose() {
this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = ''
this.writeOffForm = {
writeOffCode: ''
}
},
handleDelete(row) {
this.secondConfirm('删除', '此功能只删除小程序对应分类区,不会删除分类下的商品,确定删除此分类?', 'classifyList', 'deleteClassifyApi', { id: row.id })
handleWriteOffConfirm() {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.writeOffForm)
params.orderCode = this.orderCode
this.$apis.orderManage.writeOffApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleWriteOffClose()
this.handleSearch()
}
})
}
})
},
handleTop(row) {
this.secondConfirm('置顶', '确定置顶此分类?', 'classifyList', 'topClassifyApi', { id: row.id })
handleWriteOff(row) {
this.handleWriteOffClose()
this.orderCode = row.orderCode
},
// 订单核销 - end
// 退款审核 - start
handleExamineClose() {
this.isExamineVisible = !this.isExamineVisible
this.orderCode = ''
this.examineForm = {
examineCode: ''
}
},
handleExamineConfirm() {
this.$refs.examineRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.examineForm)
params.orderCode = this.orderCode
this.$apis.orderManage.examineApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleExamineClose()
this.handleSearch()
}
})
}
})
},
handleExamine(row) {
// this.handleExamineClose()
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode, id: row.id }).then(res => {
this.examineForm = res || {}
})
},
// 退款审核 - end
// 确认收货 - start
handleReceivingClose() {
this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = ''
this.receivingForm = {
receivingCode: ''
}
},
handleReceivingConfirm() {
this.$refs.receivingRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.receivingForm)
params.orderCode = this.orderCode
this.$apis.orderManage.receivingApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleReceivingClose()
this.handleSearch()
}
})
}
})
},
handleReceiving(row) {
this.handleReceivingClose()
this.orderCode = row.orderCode
},
// 确认收货 - end
handleSearch() {
this.$refs.classifyRef.refreshTable()
this.$refs.allOrderRef.refreshTable()
},
handleTabClick() {
this.handleSearch()
this.getCount()
},
handleExport(row) {
var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => {
window.open(res)
})
},
handleReset() {
......@@ -316,4 +582,12 @@ export default {
}
</script>
<style scoped></style>
<style>
.marketing .el-tabs__nav-wrap:after {
opacity: 0;
}
.marketing .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
</style>
<!-- 订单详情 -->
<template>
<div>订单详情</div>
<div class="order-detail marketing">
<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">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{detailForm[subItem.name]}}</span>
</el-form-item>
</el-row>
</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-item label="物流信息">
<span>{{detailForm.deliveryCompany}}&nbsp;&nbsp;&nbsp;{{detailForm.deliveryNumber}}</span>
</el-form-item>
</el-form>
<div v-if="orderGoods.length">
<table class="show-table">
<tbody>
<tr v-for="(item, index) in orderGoods" :key="index">
<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>
</tbody>
</table>
</div>
</div>
<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-item>
</el-row>
</el-form>
<div class="flex">
<img v-for="(item, index) in orderRefund.imgUrls" :key="index" class="img-60" :src="item"/>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data() {
return { }
return {
size: 'small',
title: '查看订单',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
orderCode: ''
},
detailForm: {},
orderRefund: null,
orderGoods: [],
// 订单信息
detailFormDataRow: [],
detailFormData: [
{
label: '订单编号',
name: 'orderCode'
},
{
label: '订单时间',
name: 'createdDate'
},
{
label: '客户信息',
name: 'customerName'
},
{
label: '订单类型',
name: 'orderSourceName'
},
{
label: '门店信息',
name: 'merchantName'
},
{
label: '订单状态',
name: 'orderStatusName'
},
{
label: '支付总价',
name: 'payPrice'
},
{
label: '发货地址',
name: 'shipAddress'
}
],
// 售后信息
afterInfoDataRow: [],
afterInfoData: [
{
label: '售后类型',
name: 'refundTypeName'
},
{
label: '申请金额',
name: 'refundPrice'
},
{
label: '申请时间',
name: 'createdDateStr'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
},
{
label: '申请描述',
name: 'remark'
}
],
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' }
]
}
}
},
mounted() {},
created() {
this.formToRow('detailFormData')
this.formToRow('afterInfoData')
},
methods: {}
}
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.getInfo()
},
methods: {
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++) {
if(j == 0) {
this[formName + 'Row'][i] = {
rowList: []
}
}
if((i * numOfRow + j) < this[formName].length) {
this[formName + 'Row'][i].rowList.push(this[formName][i * numOfRow + j])
}
}
}
},
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
if(this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
this.orderGoods = res.orderGoods || []
this.detailForm.payPrice = res.payPrice ? (res.payPrice + '元') : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
})
},
handleCancel() {
this.$router.push({
path: '/orderManage/index'
})
}
}
}
</script>
<style scoped>
<style>
.marketing.order-detail .el-form--inline .el-form-item {
margin: 0;
}
.marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px;
}
.detail-txt {
display: inline-block;
width: 220px;
}
.marketing.order-detail .show-table>tbody>tr>td {
text-align: center;
vertical-align: middle;
}
.marketing.order-detail .show-table td {
padding-right: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!