中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

344 lines
8.8 KiB

<template>
6 months ago
<basic-container>
<!-- 成本统计 -->
<el-form :inline="true" :model="searchForm">
<el-form-item label="月份">
4 months ago
<el-date-picker
v-model="searchForm.monthDate"
type="month"
placeholder="选择月"
required
>
6 months ago
</el-date-picker>
</el-form-item>
<el-form-item>
5 months ago
<el-button type="primary">查询</el-button>
<!-- <el-button type="primary">分派</el-button>
<el-button type="primary">保存</el-button> -->
6 months ago
</el-form-item>
</el-form>
5 months ago
<el-row>
<el-col :span="20">
4 months ago
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
5 months ago
<template #menu-left>
4 months ago
<el-button type="primary" @click="openCostCalcDialog">成本计算</el-button>
5 months ago
<!-- <el-button type="primary" @click="isLockClick">锁定/解锁</el-button> -->
<el-button type="danger" @click="handleDelete">删除</el-button>
<el-button type="success">导出</el-button>
</template>
<!-- <template #wcCode="{ row }">{{ row.saCostConfig.bsWorkCenter.wcCode }}</template>
<template #wcName="{ row }">{{ row.saCostConfig.bsWorkCenter.wcName }}</template> -->
</avue-crud>
</el-col>
<el-col :span="4">
4 months ago
<avue-crud
:option="detailsOption"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
style="margin-top: 46px; margin-left: 12px"
></avue-crud>
5 months ago
</el-col>
</el-row>
4 months ago
<el-dialog
:modelValue="openShow"
title="提示"
width="400px"
:close-on-click-modal="false"
class="cost-confirm-dialog"
>
<div class="dialog-content">
<i class="el-icon-warning"></i>
<p><span class="month-highlight">{{ selectMonth }}</span>月已计算成本是否重新计算</p>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleRecalculate">重新计算</el-button>
<el-button @click="CloseDialog">取消</el-button>
</div>
</template>
</el-dialog>
6 months ago
</basic-container>
</template>
<script>
export default {
6 months ago
data() {
return {
4 months ago
openShow: false,
6 months ago
searchForm: {},
loading: false,
data: [],
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
height: "auto",
6 months ago
calcHeight: 32,
tip: false,
size: "medium",
6 months ago
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
editBtnText: "修改",
viewBtnText: "详情",
6 months ago
labelWidth: 120,
searchLabelWidth: 120,
4 months ago
menu: false,
6 months ago
menuWidth: 220,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
searchLabelPosition: "left",
searchLabelPosition: "left",
5 months ago
searchGutter: 24,
searchSpan: 6,
menuAlign: "left",
5 months ago
gridBtn: false,
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
align: "center",
6 months ago
column: [
{
label: "作业中心",
prop: "wcName",
6 months ago
search: false,
sortable: true,
overHidden: true,
},
{
label: "月份",
prop: "month",
6 months ago
search: false,
sortable: true,
overHidden: true,
},
{
label: "制造费用(元)",
prop: "drainCosts",
6 months ago
search: false,
sortable: true,
overHidden: true,
5 months ago
width: 130,
6 months ago
},
{
label: "作业中心材料费用(元)",
prop: "materialCosts",
6 months ago
search: false,
sortable: true,
overHidden: true,
width: 200,
},
{
label: "辅助人员材料费用(元)",
prop: "materialCosts1",
6 months ago
search: false,
width: 200,
sortable: true,
overHidden: true,
},
{
label: "单位成本(元)",
prop: "unitCost",
6 months ago
search: false,
sortable: true,
overHidden: true,
5 months ago
width: 130,
6 months ago
},
{
label: "月度产出(dm²)",
prop: "monthlyOutput",
6 months ago
search: false,
width: 150,
sortable: true,
overHidden: true,
},
{
label: "月度产出(v)",
prop: "volumeOutput2",
6 months ago
search: false,
sortable: true,
overHidden: true,
},
],
5 months ago
},
detailsOption: {
height: "auto",
5 months ago
calcHeight: 32,
tip: false,
size: "medium",
5 months ago
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
editBtnText: "修改",
viewBtnText: "详情",
5 months ago
labelWidth: 120,
searchLabelWidth: 120,
4 months ago
menu: false,
5 months ago
menuWidth: 220,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
searchLabelPosition: "left",
searchLabelPosition: "left",
5 months ago
searchGutter: 24,
searchSpan: 6,
menuAlign: "left",
5 months ago
gridBtn: false,
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
align: "center",
4 months ago
menu: false,
5 months ago
header: false,
column: [
{
label: "类型",
prop: "wcCode",
5 months ago
search: false,
sortable: true,
overHidden: true,
},
{
label: "金额",
prop: "wcCode1",
5 months ago
search: false,
sortable: true,
overHidden: true,
},
],
5 months ago
},
};
6 months ago
},
4 months ago
mounted() {},
6 months ago
methods: {
4 months ago
openCostCalcDialog() {
this.openShow = true
},
CloseDialog() {
this.openShow = false
},
handleRecalculate() {
this.$message.success("重新计算成功")
this.openShow = false
},
6 months ago
selectionChange(val) {
this.selectionList = val;
6 months ago
},
isLockClick() {
if (this.selectionList.length == 0) {
this.$message.error("请先选择数据");
return;
6 months ago
}
},
handleDelete() {
if (this.selectionList.length == 0) {
this.$message.error("请先选择数据");
return;
6 months ago
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
4 months ago
}).then(() => {});
5 months ago
},
onLoad() {
this.data = [
{
id: 1,
wcName: "作业中心1",
month: "2025-3",
materialCosts: 99,
materialCosts1: 0,
unitCost: "89",
monthlyOutput: 0,
volumeOutput: "9",
drainCosts: "99",
volumeOutput2: "90",
wcCode: "类型1",
wcCode1: "4",
},
];
},
},
};
</script>
4 months ago
<style></style>