Commit f188122e by 张立顺

feat 批量导入功能开发

1 parent a26961c6
import request from "./request" import request from "./request"
const path = "dj.api.quotation.smartcarlife." const path = "dj.api.quotation.smartcarlife."
const path2 = "dj.api.smartcarlife.vd.orders."
// 分页列表 // 分页列表
export function getList(data) { export function getList(data) {
data.method = `${path}quotation.page` data.method = `${path}quotation.page`
...@@ -43,3 +43,47 @@ export function quotationFindById(data) { ...@@ -43,3 +43,47 @@ export function quotationFindById(data) {
data.method = `dj.api.quotation.smartcarlife.quotation.detail` data.method = `dj.api.quotation.smartcarlife.quotation.detail`
return request(data) return request(data)
} }
// 车损报价单导入任务错误订单异步导出
export function ordersExportAsync(data) {
data.method = `${path2}import.error.orders.export.async`
return request(data)
}
// 导入任务列表分页查询
export function importTaskPage(data) {
data.method = `${path2}import.task.page`
return request(data)
}
// 任务订单详情列表分页查询
export function importTaskOrderDetailPage(data) {
data.method = `${path2}import.task.order.detail.page`
return request(data)
}
// 门店列表查询
export function importMerchantList(data) {
data.method = `${path2}import.merchant.list`
return request(data)
}
// 车损报价单导入(错误数据重新导入)
export function reimportData(data) {
data.method = `${path2}reimport.data`
return request(data, "post", ["file"])
// return request(data)
}
// 车损报价单导入模板异步导出
export function importTemplateExportAsync(data) {
data.method = `${path2}import.template.export.async`
return request(data)
}
// 车损报价单导入
export function importData(data) {
data.method = `${path2}import.data`
return request(data, "post", ["file"])
// return request(data)
}
export const taskStatusList = [
// 1-失败,0-待执行,1-部分成功,2-全部成功
{
id: "-1",
label: "失败"
},
{
id: "0",
label: "执行中"
},
{
id: "1",
label: "部分成功"
},
{
id: "2",
label: "全部成功"
}
]
export const checkStatusList = [
// -1-失败,0-待执行,1-部分上架,2-全部上架
{
id: "-1",
label: "失败"
},
{
id: "0",
label: "执行中"
},
{
id: "1",
label: "部分上架"
},
{
id: "2",
label: "全部上架"
}
]
export const taskOrderStatusList = [
// -1-导入失败,0-待导入,1-导入失败,2-导入成功
{
id: "-1",
label: "导入失败"
},
{
id: "0",
label: "待导入"
},
{
id: "1",
label: "导入失败"
},
{
id: "2",
label: "导入成功"
}
]
...@@ -12,17 +12,20 @@ ...@@ -12,17 +12,20 @@
@selection-change="handleSelect" @selection-change="handleSelect"
:tree-props="{ children: 'upgradeGoodsList' }" :tree-props="{ children: 'upgradeGoodsList' }"
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
v-bind="$attrs"> v-bind="$attrs"
>
<el-table-column <el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
align="center" align="center"
:selectable="selectableFn" :selectable="selectableFn"
width="55" /> width="55"
/>
<el-table-column <el-table-column
v-if="tableParams.singleSelectUniqueKey" v-if="tableParams.singleSelectUniqueKey"
align="center" align="center"
width="55"> width="55"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="single-button" :scope="scope.row" /> <slot name="single-button" :scope="scope.row" />
</template> </template>
...@@ -40,9 +43,10 @@ ...@@ -40,9 +43,10 @@
? pagination.currentPage ? pagination.currentPage
: page.currentPage) - : page.currentPage) -
1) * 1) *
(pagination.pageSize ? pagination.pageSize : page.pageSize) + (pagination.pageSize ? pagination.pageSize : page.pageSize) +
1 1
" /> "
/>
<el-table-column <el-table-column
v-for="(item, index) in tableParams.tableColumns" v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
...@@ -53,7 +57,8 @@ ...@@ -53,7 +57,8 @@
:align="item.align || 'center'" :align="item.align || 'center'"
:sortable="item.sortable" :sortable="item.sortable"
:render-header="item.renderHeader" :render-header="item.renderHeader"
:show-overflow-tooltip="item.showOverFlow"> :show-overflow-tooltip="item.showOverFlow"
>
<template slot="header"> <template slot="header">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<table-head-search <table-head-search
...@@ -61,7 +66,8 @@ ...@@ -61,7 +66,8 @@
:search-form="headSearchForm" :search-form="headSearchForm"
:option-config="item.optionConfig" :option-config="item.optionConfig"
:base-data="baseData" :base-data="baseData"
@handleTableHeadChange="handleTableHeadChange" /> @handleTableHeadChange="handleTableHeadChange"
/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot
...@@ -70,7 +76,8 @@ ...@@ -70,7 +76,8 @@
:scope="scope.row" :scope="scope.row"
:index="scope.$index" :index="scope.$index"
:prop="item.prop" :prop="item.prop"
:width="item.width" /> :width="item.width"
/>
<template v-else-if="item.type == 'ownSerialNum'"> <template v-else-if="item.type == 'ownSerialNum'">
<span>{{ <span>{{
scope.row[item.prop] >= 0 scope.row[item.prop] >= 0
...@@ -79,9 +86,9 @@ ...@@ -79,9 +86,9 @@
? pagination.currentPage ? pagination.currentPage
: page.currentPage) - : page.currentPage) -
1) * 1) *
(pagination.pageSize (pagination.pageSize
? pagination.pageSize ? pagination.pageSize
: page.pageSize) + : page.pageSize) +
1 1
: "" : ""
}}</span> }}</span>
...@@ -90,11 +97,13 @@ ...@@ -90,11 +97,13 @@
<el-tag <el-tag
v-if="!item.tagName" v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" /> v-text="tableParams.tag.label[scope.row[item.prop]]"
/>
<el-tag <el-tag
v-else v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" /> v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
/>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-if="item.html" v-html="item.formatter(scope.row)" /> <span v-if="item.html" v-html="item.formatter(scope.row)" />
...@@ -125,13 +134,15 @@ ...@@ -125,13 +134,15 @@
label="操作" label="操作"
fixed="right" fixed="right"
:align="tableParams.tableOption.align || 'center'" :align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || 'auto'"> :width="tableParams.tableOption.width || 'auto'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="auth-button" :scope="scope.row" :index="scope.$index" /> <slot name="auth-button" :scope="scope.row" :index="scope.$index" />
<slot <slot
name="auth-button-other" name="auth-button-other"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" /> :index="scope.$index"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -144,7 +155,8 @@ ...@@ -144,7 +155,8 @@
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" /> :layout="layout"
/>
</div> </div>
</template> </template>
...@@ -508,4 +520,8 @@ export default { ...@@ -508,4 +520,8 @@ export default {
@include spotBase(); @include spotBase();
background: #5850ff; background: #5850ff;
} }
.deepBlueSpot {
@include spotBase();
background: #185efe;
}
</style> </style>
...@@ -205,8 +205,10 @@ export const routerName = { ...@@ -205,8 +205,10 @@ export const routerName = {
component: _import("orderManage/carDamageDetail") component: _import("orderManage/carDamageDetail")
}, },
90406: { 90406: {
path: "/vehicleDamageList", path: "/vehicleDamageTabList",
name: "vehicleDamageList", name: "vehicleDamageTabList",
// path: "/vehicleDamageList",
// name: "vehicleDamageList",
meta: { meta: {
title: "车损报价单", title: "车损报价单",
authId: "90406", authId: "90406",
...@@ -252,9 +254,51 @@ export const routerName = { ...@@ -252,9 +254,51 @@ export const routerName = {
parentId: "90406", parentId: "90406",
label: "打印合同", label: "打印合同",
handle: "handlePrintContract" handle: "handlePrintContract"
},
{
authId: "9040606",
parentId: "90406",
label: "新建任务",
category: "Button",
type: "primary",
handle: "newTask"
},
{
authId: "9040607",
parentId: "90406",
label: "下载模板",
category: "Button",
type: "primary",
handle: "downloadTemplate"
},
{
authId: "9040608",
parentId: "90406",
label: "详情",
addRoutePath: [
{
authId: "9040611",
name: "vehicleDamageOderImportDetail",
parentId: "90406"
}
],
handle: "viewDetail"
},
{
authId: "9040609",
parentId: "90406",
label: "导入",
// handle: "importCurrentData"
handle: "handleImportRest"
},
{
authId: "90406010",
parentId: "90406",
label: "下载错误数据",
handle: "downloadIncorrectData"
} }
], ],
component: _import("vehicleDamage/vehicleDamageList") component: _import("vehicleDamage/vehicleDamageTabList")
}, },
9040604: { 9040604: {
path: "/vehicleDamageDetail", path: "/vehicleDamageDetail",
...@@ -268,6 +312,18 @@ export const routerName = { ...@@ -268,6 +312,18 @@ export const routerName = {
}, },
component: _import("vehicleDamage/vehicleDamageDetail") component: _import("vehicleDamage/vehicleDamageDetail")
}, },
9040611: {
path: "/vehicleDamageOderImportDetail",
name: "vehicleDamageOderImportDetail",
meta: {
title: "详情",
authId: "9040611",
parentId: "90406",
cache: false,
activePath: "/vehicleDamageOderImportDetail"
},
component: _import("vehicleDamage/vehicleDamageOderImportDetail")
},
90407: { 90407: {
path: "/configUpgradationDetail", path: "/configUpgradationDetail",
name: "configUpgradationDetail", name: "configUpgradationDetail",
......
...@@ -11,8 +11,10 @@ export const routerName = { ...@@ -11,8 +11,10 @@ export const routerName = {
} }
}, },
91101: { 91101: {
path: "/vehicleDamageList", path: "/vehicleDamageTabList",
name: "vehicleDamageList", // path: "/vehicleDamageList",
// name: "vehicleDamageList",
name: "vehicleDamageTabList",
meta: { meta: {
title: "车损报价单", title: "车损报价单",
authId: "91101", authId: "91101",
......
<!-- 车损报价单 --> <!-- 车损报价单 -->
<template> <template>
<div> <div>
<d2-container> <d2-container class="m-t-40">
<div class="header" <div class="header" slot="header" style="padding: 10px 20px">
slot="header" <d2-search
style="padding: 10px 20px"> ref="showSearch"
<d2-search ref="showSearch" class="show-search"
class="show-search" :search-form="searchForm"
:search-form="searchForm" :form-data="showFormData"
:form-data="showFormData" /> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset"> 重置 </el-button>
@click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<el-button class="default-blue-btn" <el-button
plain class="default-blue-btn"
@click="handleExport" plain
size="small">导出</el-button> @click="handleExport"
size="small"
>导出</el-button
>
</d2-table-header> </d2-table-header>
<d2-table ref="damageTable" <d2-table
:get-list-api="getListApi" ref="damageTable"
:search-form="searchFormSearch" :get-list-api="getListApi"
:table-params="tableParams" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams"
<div slot-scope="scope" :before-search-fn="beforeSearchFn"
slot="auth-button" >
class="btnClass"> <div slot-scope="scope" slot="auth-button" class="btnClass">
<!-- 查看 --> <!-- 查看 -->
<!-- <auth-button <!-- <auth-button
v-if="[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)" v-if="[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)"
:show-btn-ids="['9040601']" :data="scope.scope" /> --> :show-btn-ids="['9040601']" :data="scope.scope" /> -->
<!-- 打印报价单 --> <!-- 打印报价单 -->
<auth-button v-if="[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)" <auth-button
:show-btn-ids="['9040603']" v-if="
:data="scope.scope" /> [1, 2, 3, -1, 5].includes(scope.scope.orderStatus) ||
[2].includes(scope.scope.equityOrderStatus)
"
:show-btn-ids="['9040603']"
:data="scope.scope"
/>
<!-- 打印合同 --> <!-- 打印合同 -->
<auth-button v-if="[2].includes(scope.scope.equityOrderStatus) && [3, 5].includes(scope.scope.orderStatus)" <auth-button
:show-btn-ids="['9040605']" v-if="
:data="scope.scope" /> [2].includes(scope.scope.equityOrderStatus) &&
<auth-button :show-btn-ids="['9040602']" [3, 5].includes(scope.scope.orderStatus)
:data="scope.scope" /> "
:show-btn-ids="['9040605']"
:data="scope.scope"
/>
<auth-button :show-btn-ids="['9040602']" :data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<baseDialog :is-show.sync="previewVisible" <baseDialog
:dialog-config="dialogConfig.config" :is-show.sync="previewVisible"
:config="dialogConfig.setting"> :dialog-config="dialogConfig.config"
<div class="previewItem" :config="dialogConfig.setting"
v-for="(item, index) in previewList" >
:key="index"> <div
class="previewItem"
v-for="(item, index) in previewList"
:key="index"
>
<span v-if="!item.goodName">合同{{ index + 1 }}</span> <span v-if="!item.goodName">合同{{ index + 1 }}</span>
<span class="goodName one-line-ellipsis" <span class="goodName one-line-ellipsis" v-else
v-else>合同名称: {{ item.goodName }}</span> >合同名称: {{ item.goodName }}</span
<i class="el-icon-download downloadIcon" >
@click="exportFile({ contractNo: item.contractNo })"></i> <i
class="el-icon-download downloadIcon"
@click="exportFile({ contractNo: item.contractNo })"
></i>
</div> </div>
</baseDialog> </baseDialog>
<!-- 查看 --> <!-- 查看 -->
...@@ -79,7 +94,13 @@ ...@@ -79,7 +94,13 @@
<script> <script>
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { getList, quotationPrint, quotationExport, contractExport, listContracts } from "@api/vehicleDamage" import {
getList,
quotationPrint,
quotationExport,
contractExport,
listContracts
} from "@api/vehicleDamage"
export default { export default {
name: "VehicleDamageList", name: "VehicleDamageList",
data() { data() {
...@@ -138,7 +159,7 @@ export default { ...@@ -138,7 +159,7 @@ export default {
getListApi: getList, getListApi: getList,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
...@@ -155,8 +176,8 @@ export default { ...@@ -155,8 +176,8 @@ export default {
label: "客户来源", label: "客户来源",
prop: "salesType", prop: "salesType",
width: "100px", width: "100px",
formatter:(cellValue)=>{ formatter: (cellValue) => {
return cellValue.salesType==1?'售后':'售前' return cellValue.salesType == 1 ? "售后" : "售前"
} }
}, },
{ {
...@@ -180,8 +201,8 @@ export default { ...@@ -180,8 +201,8 @@ export default {
.map((item) => item.severType) .map((item) => item.severType)
.includes(cellValue.orderStatus) .includes(cellValue.orderStatus)
? this.baseData.severTypeList.find( ? this.baseData.severTypeList.find(
(item) => item.severType === cellValue.orderStatus (item) => item.severType === cellValue.orderStatus
).severName ).severName
: "-" : "-"
} }
} }
...@@ -202,7 +223,11 @@ export default { ...@@ -202,7 +223,11 @@ export default {
if (cellValue.vdQuotationGoodsList) { if (cellValue.vdQuotationGoodsList) {
return cellValue.vdQuotationGoodsList.reduce( return cellValue.vdQuotationGoodsList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + (item.packageName ? `<p>${item.packageName}</p>` : `<p>-</p>`) merchString =
merchString +
(item.packageName
? `<p>${item.packageName}</p>`
: `<p>-</p>`)
return merchString return merchString
}, },
"" ""
...@@ -225,7 +250,11 @@ export default { ...@@ -225,7 +250,11 @@ export default {
if (cellValue.vdQuotationGoodsList) { if (cellValue.vdQuotationGoodsList) {
return cellValue.vdQuotationGoodsList.reduce( return cellValue.vdQuotationGoodsList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + (item.goodsName ? `<p>${item.goodsName}</p>` : `<p>-</p>`) merchString =
merchString +
(item.goodsName
? `<p>${item.goodsName}</p>`
: `<p>-</p>`)
return merchString return merchString
}, },
"" ""
...@@ -248,7 +277,11 @@ export default { ...@@ -248,7 +277,11 @@ export default {
if (cellValue.vdQuotationGoodsList) { if (cellValue.vdQuotationGoodsList) {
return cellValue.vdQuotationGoodsList.reduce( return cellValue.vdQuotationGoodsList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + (item.goodsNameAlias ? `<p>${item.goodsNameAlias}</p>` : `<p>-</p>`) merchString =
merchString +
(item.goodsNameAlias
? `<p>${item.goodsNameAlias}</p>`
: `<p>-</p>`)
return merchString return merchString
}, },
"" ""
...@@ -264,7 +297,9 @@ export default { ...@@ -264,7 +297,9 @@ export default {
prop: "quotedPrice", prop: "quotedPrice",
width: "200px", width: "200px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.quotedPrice ? (cellValue.quotedPrice / 100).toFixed(2) : "-" return cellValue.quotedPrice
? (cellValue.quotedPrice / 100).toFixed(2)
: "-"
} }
}, },
{ {
...@@ -272,7 +307,9 @@ export default { ...@@ -272,7 +307,9 @@ export default {
prop: "estEquityPrice", prop: "estEquityPrice",
width: "250px", width: "250px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.estEquityPrice ? (cellValue.estEquityPrice / 100).toFixed(2) : "-" return cellValue.estEquityPrice
? (cellValue.estEquityPrice / 100).toFixed(2)
: "-"
} }
}, },
{ {
...@@ -281,7 +318,9 @@ export default { ...@@ -281,7 +318,9 @@ export default {
prop: "quotedPriceUpdate", prop: "quotedPriceUpdate",
width: "250px", width: "250px",
formatter: (cellValue) => { formatter: (cellValue) => {
return !isNaN(cellValue.quotedPriceUpdate) ? (cellValue.quotedPriceUpdate / 100).toFixed(2) : "-" return !isNaN(cellValue.quotedPriceUpdate)
? (cellValue.quotedPriceUpdate / 100).toFixed(2)
: "-"
} }
}, },
{ {
...@@ -312,8 +351,8 @@ export default { ...@@ -312,8 +351,8 @@ export default {
// appendToBody: true, // appendToBody: true,
}, },
config: { config: {
title: '打印合同', title: "打印合同",
width: '480px' width: "480px"
} }
}, },
previewList: [], previewList: [],
...@@ -364,7 +403,7 @@ export default { ...@@ -364,7 +403,7 @@ export default {
// 打印权益合同 // 打印权益合同
async handlePrintContract(row) { async handlePrintContract(row) {
const res = await listContracts({ orderId: row.orderId }) const res = await listContracts({ orderId: row.orderId })
console.log(res, 'res') console.log(res, "res")
if (res.length == 1) { if (res.length == 1) {
// 获取权益合同PDF 用订单号 // 获取权益合同PDF 用订单号
// this.exportFile({ orderId: row.orderId }) // this.exportFile({ orderId: row.orderId })
...@@ -409,7 +448,7 @@ export default { ...@@ -409,7 +448,7 @@ export default {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -463,7 +502,7 @@ export default { ...@@ -463,7 +502,7 @@ export default {
handleView(row) { handleView(row) {
this.close({ tagName: "/vehicleDamageDetail" }) this.close({ tagName: "/vehicleDamageDetail" })
this.$router.push({ this.$router.push({
name: 'vehicleDamageDetail', name: "vehicleDamageDetail",
params: { params: {
detail: row detail: row
} }
...@@ -513,4 +552,8 @@ export default { ...@@ -513,4 +552,8 @@ export default {
margin-left: 10px; margin-left: 10px;
color: #185efe; color: #185efe;
} }
.m-t-40 {
margin-top: 40px;
}
</style> </style>
<!-- 车损报价单 -->
<template>
<d2-container class="m-t-40 d2-con">
<div class="header" slot="header"></div>
<div class="d2-container-content">
<d2-table
ref="damageTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { taskOrderStatusList } from "@/common/constant/vehicle"
import { Util, deepClone } from "@/common/util"
import { importTaskOrderDetailPage } from "@api/vehicleDamage"
export default {
name: "VehicleDamageList",
data() {
return {
getListApi: importTaskOrderDetailPage,
searchFormSearch: {
taskId: ""
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "门店名称",
prop: "merchantName4s"
// width: "160px"
},
{
label: "客户姓名",
prop: "customerName"
// width: "250px"
},
{
label: "支付时间",
prop: "payTime",
// width: "100px",
formatter: (cellValue) => {
return Util.dateFormate(cellValue.payTime, "YYYY-MM-DD HH:mm:ss")
}
},
{
label: "交易参考号",
prop: "transactionNo",
width: "250px"
},
{
label: "单价",
prop: "goodsPrice"
},
{
label: "总价",
prop: "goodsTotalPrice"
},
{
label: "任务状态",
prop: "taskOrderStatus",
formatter: (cellValue) => {
return (
taskOrderStatusList.find(
(item) => item.id == cellValue.taskOrderStatus
)?.label || "-"
)
},
className: (cellValue) => {
return (
{
"-1": "redSpot",
0: "yellowSpot",
1: "deepBlueSpot",
2: "greenSpot"
}[cellValue.taskOrderStatus] || "ashSpot"
)
}
},
{
label: "任务状态描述",
prop: "errorMsg"
}
]
}
}
},
computed: {
taskId() {
return this.$route.query.taskId
}
},
mounted() {
this.searchFormSearch.taskId = this.taskId
// this.
},
methods: {
handleDetail(row) {
quotationPrint({ id: row.id }).then((res) => {
window.open(res)
})
}
}
}
</script>
<style scoped lang="scss">
.d2-con {
.d2-header-switch {
display: none;
}
}
</style>
<template>
<div class="order-list-wrap">
<div class="header" slot="header" style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane>
</el-tabs>
<components :is="tabName"></components>
</div>
</div>
</template>
<script>
import vehicleDamageList from "./vehicleDamageList.vue"
import vehicleDamageOderImport from "./vehicleDamageOderImport.vue"
// import carDamage from "./carDamage.vue"
// import configUpgradation from "./configUpgradation.vue"
// import integralShopping from "./integralShopping.vue"
export default {
name: "OrderList",
components: {
vehicleDamageList,
vehicleDamageOderImport
// carDamage,
// configUpgradation,
// integralShopping
},
data() {
return {
activeName: "2",
tabPaneList: [
{
label: "车损报价单",
name: "1"
},
{
label: "导入订单",
name: "2"
}
],
// tabName: "vehicleDamageList"
tabName: "vehicleDamageOderImport"
}
},
mounted() {},
watch: {},
methods: {
handleClick() {
const arr = {
1: "vehicleDamageList",
2: "vehicleDamageOderImport"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style lang="scss" scoped>
.order-list-wrap {
padding: 0 24px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!