Commit 93942934 by chenwq

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

1 parent 30018e85
......@@ -2,7 +2,6 @@
<template>
<div class="marketing p-t-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>
</div>
<div class="container">
......@@ -13,10 +12,7 @@
<!-- 表格区域 开始 -->
<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">
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<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>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -54,6 +50,40 @@ export default {
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,
tableParams: {
......@@ -78,7 +108,7 @@ export default {
}
},
mounted() {},
mounted() { },
methods: {
getParams() {
......
......@@ -2,17 +2,7 @@
<template>
<div class="marketing p-t-20 order-manage">
<div class="container">
<div>
<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>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex">
<div class="flex-default">
......@@ -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>
</div>
<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 == 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 == 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>
</GLTable>
<!-- 表格区域 - 全部订单/售后订单 - end -->
......@@ -159,7 +149,7 @@ export default {
refundTotal: ''
},
// 搜索
searchFormData1: [
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
......@@ -177,6 +167,7 @@ export default {
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])) {
......@@ -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) {
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)
} 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('')
}
}
......@@ -210,6 +201,7 @@ export default {
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])) {
......@@ -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) {
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)
} 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.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
}
],
searchFormData2: [
},
{
label: '门店',
name: 'merchantName',
......@@ -250,9 +240,7 @@ export default {
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
searchFormData3: [
},
{
label: '订单类型',
name: 'orderSource',
......@@ -276,9 +264,7 @@ export default {
name: 'outTradeNo',
type: 'input',
maxlength: 50
}
],
searchFormData4: [
},
{
label: '车架号',
name: 'vin',
......@@ -380,6 +366,72 @@ export default {
],
// 确认收获
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,
tableParams: {
......@@ -446,13 +498,13 @@ export default {
{
label: '门店信息',
prop: 'merchantName',
line: 2,
width: 180
line: 1,
width: 280
},
{
label: '订单类型',
prop: 'orderSource',
width: '80',
width: '100',
formatter: cellValue => {
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 {
{
label: '售后状态',
prop: 'afterSaleStatus',
width: '80',
width: '100',
formatter: cellValue => {
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 {
{
label: '结算方式',
prop: 'deliveryType',
width: '80',
width: '100',
formatter: cellValue => {
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 {
mounted() {
// this.getCount()
this.getOptionsList('searchFormData1')
this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3')
this.getOptionsList('searchFormData')
},
methods: {
......
......@@ -2,19 +2,15 @@
<template>
<div class="marketing p-t-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>
</div>
<div class="container">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<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">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -52,6 +48,30 @@ export default {
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,
tableParams: {
......@@ -76,7 +96,7 @@ export default {
}
},
mounted() {},
mounted() { },
methods: {
getParams() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!