Commit 14b16fa4 by 李伟康

Merge branch 'SAAS+V5.7.4' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.7.4
2 parents 0d4372ad 1703721b
......@@ -729,10 +729,11 @@ export const afterSaleStatusList = [
export const invouceType = [
{ confId: 0, confName: "待签收" },
{ confId: 1, confName: "未入库" },
{ confId: 1, confName: "已签收(未入库)" },
{ confId: 2, confName: "已入库" },
{ confId: 3, confName: "部分入库" },
];
// 服务商管理 采购模式
export const procureModeList = [
{ confId: 1, confName: "直营" },
......@@ -936,7 +937,7 @@ export const downloadReportManage_reportType = [
{
confId: "BIAnalysisReport",
confValue: "BI数据分析表",
}
},
];
// 下载报表 业务类型
......
......@@ -147,6 +147,7 @@
? pickerOption[item.pickerOptions]
: undefined
"
:placeholder="item.placeholder"
range-separator="至"
start-placeholder="开始日期"
:style="{ width: item.width || '100%' }"
......@@ -170,6 +171,7 @@ import {
rangePickerOptions_oneYearNoFuture,
rangePickertwoMonthOptions,
rangePickertwoMonthOptionsWithCurrentLimit,
stockQueryDatePickerOptions,
todayEndPickerOptions,
yesterdayPicker,
} from "@/common/format";
......@@ -219,6 +221,7 @@ export default {
rangePickertwoMonthOptionsWithCurrentLimit,
rangePickerOptions_lastOneYear,
rangePickerOptions_oneYearNoFuture,
stockQueryDatePickerOptions,
},
};
},
......
// 订单状态
export const defaultStatusOptions = [
{
id: 1,
label: "运营审核"
},
{
id: 8,
label: "商务审核"
},
{
id: 2,
label: "总监审核"
},
{
id: 3,
label: "已取消"
},
{
id: 4,
label: "已驳回"
},
{
id: 5,
label: "已审核"
}
// {
// id: 6,
// label: "已审核"
// },
// {
// id: 7,
// label: "已驳回"
// }
]
{
id: 1,
label: "运营审核",
},
{
id: 8,
label: "商务审核",
},
{
id: 2,
label: "总监审核",
},
{
id: 3,
label: "已取消",
},
{
id: 4,
label: "已驳回",
},
{
id: 5,
label: "已审核",
},
// {
// id: 6,
// label: "已审核"
// },
// {
// id: 7,
// label: "已驳回"
// }
];
export const defaultStatusOptionsForTable = [
{
id: 1,
label: "运营审核"
},
{
id: 8,
label: "商务审核"
},
{
id: 2,
label: "总监审核"
},
{
id: 3,
label: "已取消"
},
{
id: 4,
label: "已驳回"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
},
{
id: 7,
label: "已驳回"
},
{
id: 9,
label: "已驳回"
}
]
{
id: 1,
label: "运营审核",
},
{
id: 8,
label: "商务审核",
},
{
id: 2,
label: "总监审核",
},
{
id: 3,
label: "已取消",
},
{
id: 4,
label: "已驳回",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
{
id: 7,
label: "已驳回",
},
{
id: 9,
label: "已驳回",
},
];
// 运营审核筛选条件
export const operate_statusOptions = [
{
id: 1,
label: "待审核"
},
{
id: 2,
label: "已审核"
},
{
id: 4,
label: "已驳回"
}
]
{
id: 1,
label: "待审核",
},
{
id: 2,
label: "已审核",
},
{
id: 4,
label: "已驳回",
},
];
// 运营审核列表展示
export const operate_statusOptions_table = [
{
id: 1,
label: "待审核"
},
{
id: 2,
label: "已审核"
},
{
id: 4,
label: "已驳回"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
},
{
id: 7,
label: "已驳回"
},
{
id: 8,
label: "已审核"
},
{
id: 9,
label: "已驳回"
}
]
{
id: 1,
label: "待审核",
},
{
id: 2,
label: "已审核",
},
{
id: 4,
label: "已驳回",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
{
id: 7,
label: "已驳回",
},
{
id: 8,
label: "已审核",
},
{
id: 9,
label: "已驳回",
},
];
// 商务审核筛选条件
export const business_statusOptions = [
{
id: 8,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
}
]
{
id: 8,
label: "待审核",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
];
// 商务审核列表展示
export const business_statusOptions_table = [
{
id: 8,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
},
{
id: 7,
label: "已驳回"
}
]
{
id: 8,
label: "待审核",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
{
id: 7,
label: "已驳回",
},
];
// 总监审核筛选条件
export const director_statusOptions = [
{
id: 2,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
}
]
{
id: 2,
label: "待审核",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
];
// 总监审核列表展示
export const director_statusOptions_table = [
{
id: 2,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
},
{
id: 7,
label: "已驳回"
},
{
id: 8,
label: "已审核"
},
{
id: 9,
label: "已驳回"
}
]
{
id: 2,
label: "待审核",
},
{
id: 5,
label: "已审核",
},
{
id: 6,
label: "已驳回",
},
{
id: 7,
label: "已驳回",
},
{
id: 8,
label: "已审核",
},
{
id: 9,
label: "已驳回",
},
];
// 发货状态
export const defaultDeliveryStatusOptions = [
{
id: 1,
label: "未发货"
},
{
id: 2,
label: "全部发货"
},
{
id: 3,
label: "部分发货"
},
{
id: 4,
label: "结束发货"
}
]
{
id: 1,
label: "未发货",
},
{
id: 2,
label: "全部发货",
},
{
id: 3,
label: "部分发货",
},
{
id: 4,
label: "结束发货",
},
];
// 入库状态
export const defaultPutStatusOptions = [
{
id: 1,
label: "未入库"
},
{
id: 2,
label: "全部入库"
},
{
id: 3,
label: "部分入库"
}
]
{
id: 1,
label: "未入库",
},
{
id: 2,
label: "全部入库",
},
{
id: 3,
label: "部分入库",
},
];
// 发货模式
export const purchasingPatternOptions = [
{
id: 1,
label: "直营"
},
{
id: 2,
label: "批发"
},
{
id: 3,
label: "代销"
}
]
{
id: 1,
label: "直营",
},
{
id: 2,
label: "批发",
},
{
id: 3,
label: "代销",
},
];
// export const severSelectOptionsLabel = {
// 1: "下单时间倒序排序",
// 2: "按收入比例",
......@@ -264,41 +264,45 @@ export const purchasingPatternOptions = [
// 采购类型
export const purchaseTypeList = [
{
id: 1,
label: "商城采购"
},
{
id: 2,
label: "自采入库"
}
]
{
id: 1,
label: "商城采购",
},
{
id: 2,
label: "自采入库",
},
];
// 分配状态
export const distributionStatusOptions = [
{
id: 0,
label: "未分配"
},
{
id: 1,
label: "已分配"
}
]
{
id: 0,
label: "未分配",
},
{
id: 1,
label: "已分配",
},
];
// 驳回节点选项
export const rejectNodeOptions = [
{
id: 3,
label: "商务审核"
},
{
id: 2,
label: "运营审核"
},
{
id: 1,
label: "采购商户"
}
]
{
id: 3,
label: "商务审核",
},
{
id: 2,
label: "运营审核",
},
{
id: 1,
label: "采购商户",
},
];
export const signStatusType = [
{ confId: 0, confName: "待签收" },
{ confId: 2, confName: "已签收" },
{ confId: 1, confName: "部分签收" },
];
......@@ -126,7 +126,7 @@ export default {
deliveryDate: "",
orderCode: this.$route.params.orderCode || "",
merchantName: "",
putStatus: "",
putStatusList: [],
},
searchFormSearch: {},
showFormData: [
......@@ -167,8 +167,9 @@ export default {
},
{
label: "状态",
name: "putStatus",
name: "putStatusList",
type: "select",
multiple: true,
optionList: [],
optionId: "confId",
optionLabel: "confName",
......@@ -309,7 +310,8 @@ export default {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
async getBaseData() {
this.getOptionsList();
this.getOptionsList(this, "showFormData", true, "shippingWarehouseName");
this.getOptionsList(this, "showFormData", false, "putStatusList");
},
getShippingWarehouseList() {
getShipWarehousePage({ currentPage: 1, pageSize: 999 })
......@@ -343,27 +345,54 @@ export default {
});
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
let item = that[formName].find(k => k.name == refreshSigle);
let index = that[formName].findIndex(k => k.name == refreshSigle);
console.log(item, index);
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
} else {
that[formName].forEach((item, index) => {
if (
this.baseData[item.optionsName].length
&& this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
item.type === "select"
&& that.baseData[item.optionsName]?.length
) {
const temp = {};
temp[this.showFormData[index].optionId] = "";
temp[this.showFormData[index].optionLabel] = "全部";
this.baseData[item.optionsName].unshift(temp);
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName]),
);
if (
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
temp[that[formName][index].optionId] = "";
temp[that[formName][index].optionLabel] = "全部";
that[formName][index].optionList.unshift(temp);
}
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName],
);
}
});
});
}
},
handleSearch() {
......@@ -376,7 +405,7 @@ export default {
deliveryDate: "",
orderCode: "",
merchantName: "",
putStatus: "",
putStatusList: [],
shippingWarehouseName: "全部",
};
this.$refs.recordTable.refreshTable();
......
......@@ -23,6 +23,7 @@
</template>
<div class="d2-container-content">
<d2-table-header>
<span style="margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9090407']" />
</span>
......@@ -42,6 +43,18 @@
@searchChange="searchChange"
@selectionTable="handleSelectionTable"
@setTableFinishFun="setTableFinishFun">
<template #uploadFileUrls="scope">
<div v-if="scope.scope.uploadFileUrl">
<el-image fit="fill"
:preview-src-list="scope.scope.uploadFileUrls.split(',')"
:src="scope.scope.uploadFileUrls.split(',')[0]"
style="width: 36px; height: 36px;">
</el-image>
</div>
<div v-else>
--
</div>
</template>
<template #upgradeGoodsName="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'"
......@@ -364,6 +377,7 @@ import {
distributionStatusOptions,
purchasingPatternOptions,
rejectNodeOptions,
signStatusType,
} from "./constant";
// import { limitPrice } from '@/common/format'
export default {
......@@ -375,6 +389,11 @@ export default {
},
data() {
return {
picOptions: {
width: "138px",
height: "54px",
isClose: false,
},
editVisible: false,
editTableList: [],
allocateVisible: false,
......@@ -537,6 +556,7 @@ export default {
reviewedTimeStr: "",
shipper: "",
deliveryDateStr: "",
signStatusList: [],
},
tableSearchForm: {},
tableData: [],
......@@ -647,6 +667,16 @@ export default {
isClear: true,
// pickerOptions: "rangePickerOptions"
},
{
label: "签收状态",
name: "signStatusList",
type: "select",
multiple: true,
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "signStatusType",
},
],
selectedList: [],
getListApi: getPurchaseOrderShipmentList,
......@@ -796,6 +826,25 @@ export default {
},
},
{
label: "签收状态",
prop: "deliveryStatus",
formatter: (cellValue) => {
// 1:未发货,2全部发货,3部分发货,4结束发货
return (
signStatusType.find(
item => item.confId == cellValue.signStatus,
)?.confName || "-"
);
},
className: (cellValue) => {
return {
2: "greenSpot",
1: "yellowSpot",
0: "redSpot",
}[cellValue.signStatus];
},
},
{
label: "订单状态",
prop: "status",
formatter: (cellValue) => {
......@@ -819,6 +868,12 @@ export default {
},
},
{
label: "凭证",
prop: "uploadFileUrls",
width: "138px",
addHtml: "uploadFileUrls",
},
{
label: "审核人",
prop: "reviewedBy",
formatter: (cellValue) => {
......@@ -869,6 +924,7 @@ export default {
distributionStatusOptions: deepClone(distributionStatusOptions),
rejectNodeOptions: deepClone(rejectNodeOptions),
goodsTypeList: [],
signStatusType: deepClone(signStatusType),
},
paramsObj: {},
dialogData: {
......@@ -907,7 +963,10 @@ export default {
mounted() {
this.getCategory();
this.getOptionsList("showFormData");
this.getOptionsList("showFormData", true, "deliveryStatus");
this.getOptionsList("showFormData", true, "distributionStatus");
this.getOptionsList("showFormData", false, "signStatusList");
},
methods: {
......@@ -941,7 +1000,8 @@ export default {
// 获取全部类目 屏蔽服务商自建类目
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then((res) => {
this.baseData.goodsTypeList = res?.list || [];
this.getOptionsList("showFormData");
// this.getOptionsList("showFormData");
this.getOptionsList("showFormData", true, "goodsType");
});
},
deliveryNumberInput(event, index) {
......@@ -1453,4 +1513,14 @@ export default {
display: flex;
justify-content: flex-end;
}
.uploadFileUrl-preview {
width: 138px;
height: 54px;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
}
</style>
......@@ -137,7 +137,7 @@ export default {
tableColumns: [
{
label: "出入库时间",
prop: "flowTime",
prop: "operateTime",
width: 150,
},
{
......@@ -234,6 +234,11 @@ export default {
label: "操作人",
prop: "operator",
},
{
label: "操作时间",
prop: "flowTime",
width: 150,
},
],
},
// 基本数据
......
......@@ -216,10 +216,10 @@ export default {
tableOption: true,
tableColumns: [{
label: "出库时间",
prop: "reduceDate",
prop: "createdDate",
width: "150px",
formatter: (cellValue) => {
return cellValue.reduceDate ? Util.dateFormate(cellValue.reduceDate, "YYYY-MM-DD HH:mm:ss") : "";
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss") : "";
},
}, {
label: "商品名称",
......@@ -309,6 +309,13 @@ export default {
prop: "updatedUserName",
width: "100px",
}, {
label: "操作时间",
prop: "reduceDate",
width: 150,
formatter: (cellValue) => {
return cellValue.reduceDate ? Util.dateFormate(cellValue.reduceDate, "YYYY-MM-DD HH:mm:ss") : "";
},
}, {
label: "最后操作时间",
prop: "updatedDate",
width: "150px",
......
<!-- 库存明细弹窗 -->
<template>
<d2-dialog title="库存明细" :is-visible="dialogVisible" class="stockMonthDailog" width="40%" :no-cancel="true"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div>
<div class="d2-container-content">
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams">
</d2-table>
</div>
</div>
</d2-dialog>
<d2-dialog btn-ok-label="关闭"
class="stockMonthDailog"
:is-visible="dialogVisible"
:no-cancel="true"
title="库存明细"
width="40%"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams">
</d2-table>
</div>
</div>
</d2-dialog>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { merchantShopGoodsStockPage } from '@api/stockManage'
import { baseConfig } from '@/main'
import { merchantShopGoodsStockPage } from "@api/stockManage";
import { mapActions, mapState } from "vuex";
import { baseConfig } from "@/main";
export default {
name: 'StockDetailDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
upgradeGoodsId: '',
yqMerchantId: ''
},
getListApi: merchantShopGoodsStockPage,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: false,
tableColumns: [
{
label: '门店',
prop: 'merchantName',
width: '200px'
},
{
label: '当前库存',
prop: 'stock',
// width: ''
formatter: (cellValue) => {
return (cellValue.stock || cellValue.stock == 0) ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}
},
{
label: '膜卷号',
prop: 'filmRollNo',
formatter: (cellValue) => {
return cellValue?.filmRollNo || '-'
}
}
]
}
}
},
name: "StockDetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
props: {
visible: {
type: Boolean,
default: false,
},
recordInfo: {
type: Object,
default: () => { },
},
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
upgradeGoodsId: "",
yqMerchantId: "",
},
getListApi: merchantShopGoodsStockPage,
tableData: [],
tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list",
// tableOption: false,
tableColumns: [
{
label: "门店",
prop: "merchantName",
width: "200px",
},
{
label: "当前库存",
prop: "stock",
// width: ''
formatter: (cellValue) => {
return (cellValue.stock || cellValue.stock == 0) ? Number.parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件") : "-";
},
},
{
label: "膜卷号",
prop: "filmRollNo",
formatter: (cellValue) => {
return cellValue?.filmRollNo || "-";
},
},
],
},
};
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
mounted() {
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId
}
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:visible", val);
},
},
},
mounted() {
if (this.recordInfo) {
this.searchForm.yqMerchantId = this.recordInfo.yqMerchantId;
this.searchForm.upgradeGoodsId = this.recordInfo.upgradeGoodsId;
this.searchForm.queryDate = this.recordInfo.queryDate ? this.recordInfo.queryDate : "";
}
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchFormSearch = deepClone(this.searchForm)
// resolve()
// })
// },
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchFormSearch = deepClone(this.searchForm)
// resolve()
// })
// },
chooseYear() {
this.getList()
},
chooseYear() {
this.getList();
},
// getList() {
// var params = deepClone(this.searchForm)
// getReportByGoods(params).then(res => {
// this.tableData = res
// })
// },
// getList() {
// var params = deepClone(this.searchForm)
// getReportByGoods(params).then(res => {
// this.tableData = res
// })
// },
handleClose() {
// this.$emit('dialogClose')
this.dialogVisible = false
}
}
}
handleClose() {
// this.$emit('dialogClose')
this.dialogVisible = false;
},
},
};
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
}
.show-search {
margin-left: -65px;
margin-left: -65px;
}
</style>
......@@ -88,6 +88,7 @@ export default {
yqMerchantId: "",
goodsType: "",
goodsSeries: "",
queryDate: "",
},
searchFormSearch: {},
searchSelectObj: {
......@@ -136,6 +137,14 @@ export default {
type: "input",
maxlength: "20",
isClear: true,
}, {
label: "选择日期",
name: "queryDate",
type: "datePicker",
dateType: "date",
isClear: true,
placeholder: "请选择",
pickerOptions: "stockQueryDatePickerOptions",
}],
getListApi: getMerchantGoodsStockMonthReport,
tableParams: {
......@@ -252,6 +261,9 @@ export default {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm);
if (this.searchFormSearch.queryDate) {
this.searchFormSearch.queryDate = Util.dateFormate(this.searchFormSearch.queryDate, "YYYY-MM-DD") + " 23:59:59";
}
this.searchFormSearch.dataMonth = Util.dateFormate(new Date(), "YYYY-MM");
resolve();
......@@ -282,6 +294,7 @@ export default {
yqMerchantId: "",
goodsType: "",
goodsSeries: "",
queryDate: "",
};
this.$refs.recordTable.refreshTable();
this.stockMonthReportCount();
......@@ -328,7 +341,10 @@ export default {
},
handleDetail(row) {
this.recordInfo = row;
console.log(row, "row");
this.recordInfo = {
...this.recordInfo,
queryDate: this.searchForm.queryDate ? Util.dateFormate(this.searchForm.queryDate, "YYYY-MM-DD") + " 23:59:59" : "",
};
this.stockDetailDialogVisible = true;
},
dialogClose(flag) {
......
<!-- 运营管理 -->
<template>
<div class="list-wrap">
<div class="header" slot="header">
<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" :scene-type="activeName"></components>
<div class="list-wrap">
<div slot="header" class="header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList"
:key="index"
:label="item.label"
:name="item.name">
</el-tab-pane>
</el-tabs>
<components :is="tabName" :scene-type="activeName"></components>
</div>
</div>
</div>
</template>
<script>
import contract from "./components/contract/index.vue"
import sunshine from "./components/sunshine/index.vue"
import contract from "./components/contract/index.vue";
import sunshine from "./components/sunshine/index.vue";
export default {
components: {
contract,
sunshine
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "合同管理",
name: "0"
},
{
label: "阳光激励",
name: "1"
}
],
tabName: "contract"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "contract",
1: "sunshine"
}
this.tabName = arr[+this.activeName]
}
}
}
components: {
Contract: contract,
Sunshine: sunshine,
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "合同管理",
name: "0",
},
{
label: "阳光激励",
name: "1",
},
],
tabName: "contract",
};
},
watch: {},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane;
this.tabName = this.$route.params.tabLabel;
}
},
methods: {
handleClick() {
const arr = {
0: "contract",
1: "sunshine",
};
this.tabName = arr[+this.activeName];
},
},
};
</script>
<style scoped lang="scss">
.list-wrap {
padding: 0 26px 0 20px;
padding: 0 26px 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
.el-tabs__nav-wrap {
padding: 0 20px;
}
.el-tabs__nav-wrap {
height: 54px;
line-height: 54px;
font-size: 16px;
}
}
}
.header {
::v-deep .el-tabs__header {
margin: 0;
.el-tabs__nav-wrap {
padding: 0 20px;
}
.el-tabs__nav-wrap {
height: 54px;
line-height: 54px;
font-size: 16px;
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!