中航光电热表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.

301 lines
7.7 KiB

<template>
6 months ago
<basic-container>
<!-- 成本统计 -->
<el-form :inline="true" :model="searchForm">
<el-form-item label="月份">
5 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">
<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">
6 months ago
5 months ago
<template #menu-left>
<el-button type="primary">成本计算</el-button>
<!-- <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">
<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>
</el-col>
</el-row>
6 months ago
</basic-container>
</template>
<script>
export default {
6 months ago
data() {
return {
searchForm: {},
loading: false,
data: [],
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
height: 'auto',
calcHeight: 32,
tip: false,
size: 'medium',
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: '详情',
labelWidth: 120,
searchLabelWidth: 120,
5 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,
5 months ago
searchLabelPosition: 'left',
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
5 months ago
align: 'center',
6 months ago
column: [
{
label: '作业中心',
prop: 'wcName',
search: false,
sortable: true,
overHidden: true,
5 months ago
6 months ago
},
{
label: '月份',
prop: 'month',
search: false,
sortable: true,
overHidden: true,
5 months ago
6 months ago
},
{
label: '制造费用(元)',
prop: 'drainCosts',
search: false,
sortable: true,
overHidden: true,
5 months ago
width: 130,
6 months ago
},
{
label: '作业中心材料费用(元)',
prop: 'materialCosts',
search: false,
sortable: true,
overHidden: true,
width: 200,
5 months ago
6 months ago
},
{
label: '辅助人员材料费用(元)',
prop: 'materialCosts1',
search: false,
width: 200,
sortable: true,
overHidden: true,
5 months ago
6 months ago
},
{
label: '单位成本(元)',
prop: 'unitCost',
search: false,
sortable: true,
overHidden: true,
5 months ago
width: 130,
6 months ago
},
{
label: '月度产出(dm²)',
prop: 'monthlyOutput',
search: false,
width: 150,
sortable: true,
overHidden: true,
5 months ago
6 months ago
},
{
label: '月度产出(v)',
5 months ago
prop: 'volumeOutput2',
6 months ago
search: false,
sortable: true,
overHidden: true,
5 months ago
6 months ago
},
]
5 months ago
},
detailsOption: {
height: 'auto',
calcHeight: 32,
tip: false,
size: 'medium',
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: '详情',
labelWidth: 120,
searchLabelWidth: 120,
menu: false,
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',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
align: 'center',
menu: false,
header: false,
column: [
{
label: '类型',
prop: 'wcCode',
search: false,
sortable: true,
overHidden: true,
},
{
label: '金额',
prop: 'wcCode1',
search: false,
sortable: true,
overHidden: true,
},
]
},
6 months ago
}
},
mounted() {
6 months ago
},
methods: {
selectionChange(val) {
this.selectionList = val
},
isLockClick() {
if (this.selectionList.length == 0) {
this.$message.error('请先选择数据')
return
}
},
handleDelete() {
if (this.selectionList.length == 0) {
this.$message.error('请先选择数据')
return
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).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'
}
]
6 months ago
}
}
}
</script>
6 months ago
<style></style>