Commit 93942934 by chenwq

ui改版-分类管理,订单管理,专区管理

1 parent 30018e85
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建分类</el-button> -->
<GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton> <GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton>
</div> </div>
<div class="container"> <div class="container">
...@@ -13,10 +12,7 @@ ...@@ -13,10 +12,7 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -54,6 +50,40 @@ export default { ...@@ -54,6 +50,40 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
}
],
// 表格 // 表格
getListApi: this.$apis.classifyList.getListApi, getListApi: this.$apis.classifyList.getListApi,
tableParams: { tableParams: {
...@@ -78,7 +108,7 @@ export default { ...@@ -78,7 +108,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
getParams() { getParams() {
......
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<template> <template>
<div class="marketing p-t-20 order-manage"> <div class="marketing p-t-20 order-manage">
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData4">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<div class="flex"> <div class="flex">
<div class="flex-default"> <div class="flex-default">
...@@ -48,12 +38,12 @@ ...@@ -48,12 +38,12 @@
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> --> <!-- <GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 21" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button> <el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 21" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button> <el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 1" type="text" @click="handleExamine(scope.scope)">退款审核</el-button> <el-button v-if="scope.scope.afterSaleStatus == 1" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 4" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button> <el-button v-if="scope.scope.afterSaleStatus == 4" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
...@@ -159,7 +149,7 @@ export default { ...@@ -159,7 +149,7 @@ export default {
refundTotal: '' refundTotal: ''
}, },
// 搜索 // 搜索
searchFormData1: [ searchFormData: [
{ {
label: '订单编号', label: '订单编号',
name: 'orderCode', name: 'orderCode',
...@@ -177,6 +167,7 @@ export default { ...@@ -177,6 +167,7 @@ export default {
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1] var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '订单状态')
if (!isAdd) { if (!isAdd) {
for (var i = 0; i < this.oldVal.orderStatuses.length; i++) { for (var i = 0; i < this.oldVal.orderStatuses.length; i++) {
if (!value.includes(this.oldVal.orderStatuses[i])) { if (!value.includes(this.oldVal.orderStatuses[i])) {
...@@ -185,12 +176,12 @@ export default { ...@@ -185,12 +176,12 @@ export default {
} }
} }
} }
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData1[1].optionList.map(item => item.confId) : []) !targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) { if (targetVal) {
var idx = value.findIndex(item => item == '') var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData1[1].optionList.length) { if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.orderStatuses.splice(idx, 1) this.searchForm.orderStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData1[1].optionList.length - 1) { } else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.orderStatuses.push('') this.searchForm.orderStatuses.push('')
} }
} }
...@@ -210,6 +201,7 @@ export default { ...@@ -210,6 +201,7 @@ export default {
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1] var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '售后状态')
if (!isAdd) { if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) { for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) { if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
...@@ -218,20 +210,18 @@ export default { ...@@ -218,20 +210,18 @@ export default {
} }
} }
} }
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData1[2].optionList.map(item => item.confId) : []) !targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) { if (targetVal) {
var idx = value.findIndex(item => item == '') var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData1[2].optionList.length) { if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1) this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData1[2].optionList.length - 1) { } else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('') this.searchForm.afterSaleStatuses.push('')
} }
} }
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses) this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
} }
} },
],
searchFormData2: [
{ {
label: '门店', label: '门店',
name: 'merchantName', name: 'merchantName',
...@@ -250,9 +240,7 @@ export default { ...@@ -250,9 +240,7 @@ export default {
labelWidth: 72, labelWidth: 72,
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} },
],
searchFormData3: [
{ {
label: '订单类型', label: '订单类型',
name: 'orderSource', name: 'orderSource',
...@@ -276,9 +264,7 @@ export default { ...@@ -276,9 +264,7 @@ export default {
name: 'outTradeNo', name: 'outTradeNo',
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
} },
],
searchFormData4: [
{ {
label: '车架号', label: '车架号',
name: 'vin', name: 'vin',
...@@ -380,6 +366,72 @@ export default { ...@@ -380,6 +366,72 @@ export default {
], ],
// 确认收获 // 确认收获
isReceivingVisible: false, isReceivingVisible: false,
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '查看订单',
attrs: {
type: 'text',
fn: '查看订单'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'el-button',
name: '订单核销',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21
},
listeners: {
click: this.handleWriteOff
}
},
{
type: 'el-button',
name: '输入快递信息',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 2 && row.orderStatus == 6
},
listeners: {
click: this.handleExpressInfo
}
},
{
type: 'el-button',
name: '退款审核',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 1
},
listeners: {
click: this.handleExamine
}
},
{
type: 'el-button',
name: '确认收货',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 4
},
listeners: {
click: this.handleReceiving
}
}
],
// 表格 // 表格
getListApi: this.$apis.orderManage.getListApi, getListApi: this.$apis.orderManage.getListApi,
tableParams: { tableParams: {
...@@ -446,13 +498,13 @@ export default { ...@@ -446,13 +498,13 @@ export default {
{ {
label: '门店信息', label: '门店信息',
prop: 'merchantName', prop: 'merchantName',
line: 2, line: 1,
width: 180 width: 280
}, },
{ {
label: '订单类型', label: '订单类型',
prop: 'orderSource', prop: 'orderSource',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-' return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-'
} }
...@@ -460,7 +512,7 @@ export default { ...@@ -460,7 +512,7 @@ export default {
{ {
label: '售后状态', label: '售后状态',
prop: 'afterSaleStatus', prop: 'afterSaleStatus',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-' return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-'
} }
...@@ -468,7 +520,7 @@ export default { ...@@ -468,7 +520,7 @@ export default {
{ {
label: '结算方式', label: '结算方式',
prop: 'deliveryType', prop: 'deliveryType',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-' return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-'
} }
...@@ -494,9 +546,7 @@ export default { ...@@ -494,9 +546,7 @@ export default {
mounted() { mounted() {
// this.getCount() // this.getCount()
this.getOptionsList('searchFormData1') this.getOptionsList('searchFormData')
this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3')
}, },
methods: { methods: {
......
...@@ -2,19 +2,15 @@ ...@@ -2,19 +2,15 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建专区</el-button> -->
<GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton> <GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <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>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -52,6 +48,30 @@ export default { ...@@ -52,6 +48,30 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
}
],
// 表格 // 表格
getListApi: this.$apis.zoneList.getZoneListApi, getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: { tableParams: {
...@@ -76,7 +96,7 @@ export default { ...@@ -76,7 +96,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
getParams() { getParams() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!