|
@@ -8,10 +8,12 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
|
|
<!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
|
|
|
<el-button type="primary" class="bt" icon="edit" @click="onout">月度费用结构建立</el-button>
|
|
<el-button type="primary" class="bt" icon="edit" @click="onout">月度费用结构建立</el-button>
|
|
|
- <el-button type="primary" class="bt" icon="edit" @click="onout">月度费用处理</el-button>
|
|
|
|
|
- <el-button type="primary" class="bt" icon="edit" @click="onout">创建</el-button> -->
|
|
|
|
|
|
|
+ <el-button type="primary" class="bt" icon="edit" @click="onout">月度费用处理</el-button>-->
|
|
|
|
|
+ <el-button type="primary" class="bt" icon="edit" @click="oncbcreate">成本数据创建</el-button>
|
|
|
|
|
+ <!-- <el-button type="primary" class="bt" icon="edit" @click="onsdqcreate">创建</el-button> -->
|
|
|
<el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showrgdownTable === false" @click="onartificial">月度人工维护</el-button>
|
|
<el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showrgdownTable === false" @click="onartificial">月度人工维护</el-button>
|
|
|
<el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdqftupTable === false" @click="onsdqft">水电气分摊批量维护</el-button>
|
|
<el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdqftupTable === false" @click="onsdqft">水电气分摊批量维护</el-button>
|
|
|
|
|
+ <!-- <el-button type="primary" class="bt" icon="edit" @click="onout">分摊清单设置</el-button> -->
|
|
|
<el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
|
|
<el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
|
|
|
<el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
|
|
<el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
|
|
|
<!-- <el-button type="primary" class="bt" icon="edit" @click="onforms">能耗报表</el-button> -->
|
|
<!-- <el-button type="primary" class="bt" icon="edit" @click="onforms">能耗报表</el-button> -->
|
|
@@ -171,7 +173,7 @@
|
|
|
<el-table-column sortable align="center" label="设备编号" prop="设备编号" width="120" />
|
|
<el-table-column sortable align="center" label="设备编号" prop="设备编号" width="120" />
|
|
|
<el-table-column sortable align="center" label="设备名称" prop="设备名称" width="120" />
|
|
<el-table-column sortable align="center" label="设备名称" prop="设备名称" width="120" />
|
|
|
<el-table-column sortable align="center" label="通电工时_全部" prop="通电工时_全部" width="200" />
|
|
<el-table-column sortable align="center" label="通电工时_全部" prop="通电工时_全部" width="200" />
|
|
|
- <el-table-column sortable align="center" label="通电工时_成本" prop="通电工时_成本" width="200" />
|
|
|
|
|
|
|
+ <el-table-column sortable align="center" label="通电工时_成本" prop="通电工时_成本" width="200" />
|
|
|
<el-table-column sortable align="center" label="年月" prop="年月" width="100" />
|
|
<el-table-column sortable align="center" label="年月" prop="年月" width="100" />
|
|
|
<el-table-column sortable align="center" label="科目名称" prop="科目名称" width="100" />
|
|
<el-table-column sortable align="center" label="科目名称" prop="科目名称" width="100" />
|
|
|
<el-table-column sortable align="center" label="使用部门" prop="使用部门" width="100" />
|
|
<el-table-column sortable align="center" label="使用部门" prop="使用部门" width="100" />
|
|
@@ -246,6 +248,58 @@
|
|
|
<el-table-column sortable align="center" label="创建时间" prop="Sys_Rq" width="110" />
|
|
<el-table-column sortable align="center" label="创建时间" prop="Sys_Rq" width="110" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
+ <!-- 创建成本数据 -->
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog v-model="cbcreate" title="成本数据创建" destroy-on-close style="height: 20%;width: 20%;">
|
|
|
|
|
+ <el-form-item label="创建年月份" label-width="100px">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="cbMonth"
|
|
|
|
|
+ type="month"
|
|
|
|
|
+ placeholder="选择年月"
|
|
|
|
|
+ :default-value="new Date()"
|
|
|
|
|
+ style="width: 200px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer" style="text-align: right;">
|
|
|
|
|
+ <el-button @click="cbcreatecloseDialog">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="cbcreateonDialog">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 数据处理 -->
|
|
|
|
|
+ <el-dialog v-model="sdqcopy" title="成本月度水电气基础资料复制" destroy-on-close style="height: 30%;width: 20%;">
|
|
|
|
|
+ <el-form-item label="参考年月份" label-width="100px">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="formMonth"
|
|
|
|
|
+ type="month"
|
|
|
|
|
+ placeholder="选择年月"
|
|
|
|
|
+ :default-value="new Date()"
|
|
|
|
|
+ style="width: 200px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="创建年份" label-width="100px">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="toMonth"
|
|
|
|
|
+ type="month"
|
|
|
|
|
+ placeholder="选择年月"
|
|
|
|
|
+ :default-value="new Date()"
|
|
|
|
|
+ style="width: 200px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer" style="text-align: right;">
|
|
|
|
|
+ <el-button @click="sdqcopycloseDialog">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="sdqcopyonDialog">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
<el-dialog v-model="rgsjlist" title="月度车间人工维护" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
<el-dialog v-model="rgsjlist" title="月度车间人工维护" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
<el-button type="primary" @click="rgsjConfirm":class="{ 'confirm-btn': true, 'is-new': isNewData }">{{ isNewData ? '新增' : '更新' }}</el-button>
|
|
<el-button type="primary" @click="rgsjConfirm":class="{ 'confirm-btn': true, 'is-new': isNewData }">{{ isNewData ? '新增' : '更新' }}</el-button>
|
|
@@ -336,6 +390,7 @@
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
import { exportExcelFile } from '@/utils/excel'
|
|
import { exportExcelFile } from '@/utils/excel'
|
|
|
import * as XLSX from 'xlsx'
|
|
import * as XLSX from 'xlsx'
|
|
|
|
|
+ import dayjs, { Dayjs } from 'dayjs';
|
|
|
import {GetZzTab,ArtificialAdd,ArtificialAddList,ArtificialEdit,ArtificialList,ArtificialDetailList,shuidianqiList,shuidianqiDetailList,
|
|
import {GetZzTab,ArtificialAdd,ArtificialAddList,ArtificialEdit,ArtificialList,ArtificialDetailList,shuidianqiList,shuidianqiDetailList,
|
|
|
shuidianqifentanList,ChromaticityAdd,ChromaticityDetailAdd,ChromaticityDetailList,MonochromaticDetailList,UtilitiesList,UtilitiesAdd,shuidianqiMachineDetailList
|
|
shuidianqifentanList,ChromaticityAdd,ChromaticityDetailAdd,ChromaticityDetailList,MonochromaticDetailList,UtilitiesList,UtilitiesAdd,shuidianqiMachineDetailList
|
|
|
} from '@/api/jixiaoguanli/caiwubaobiao'
|
|
} from '@/api/jixiaoguanli/caiwubaobiao'
|
|
@@ -363,7 +418,7 @@ const getDepartmentData = async () => {
|
|
|
label: `${year}${month}`,
|
|
label: `${year}${month}`,
|
|
|
value: yearMonth,
|
|
value: yearMonth,
|
|
|
children: Object.entries(yearData).map(([category, value]) => ({
|
|
children: Object.entries(yearData).map(([category, value]) => ({
|
|
|
- label: category, // 移除"1、"前缀
|
|
|
|
|
|
|
+ label: category,
|
|
|
value: `${yearMonth}-${category}`,
|
|
value: `${yearMonth}-${category}`,
|
|
|
children: Array.isArray(value)
|
|
children: Array.isArray(value)
|
|
|
? value.map(item => ({
|
|
? value.map(item => ({
|
|
@@ -551,6 +606,33 @@ const sdsuptableRowClick = async (row) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const cbcreate = ref(false)
|
|
|
|
|
+const cbMonth = ref('')
|
|
|
|
|
+
|
|
|
|
|
+const oncbcreate = () => {
|
|
|
|
|
+ cbcreate.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+ const cbcreateonDialog = async () => {
|
|
|
|
|
+ cbMonth.value = dayjs(cbMonth.value).format('YYYYMM');
|
|
|
|
|
+ console.log(cbMonth.value)
|
|
|
|
|
+ const res = await ChromaticityAdd({month:cbMonth.value,sys_id:userStore.userInfo.nickName});
|
|
|
|
|
+ if(res.code === 0){
|
|
|
|
|
+ ElMessage({type: 'success',message: '创建成功'});
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ElMessage({type: 'error',message: '创建失败'});
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cbcreatecloseDialog()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const cbcreatecloseDialog = () => {
|
|
|
|
|
+ cbcreate.value = false
|
|
|
|
|
+ cbMonth.value = ''
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const isNewData = ref(false);//新增or修改
|
|
const isNewData = ref(false);//新增or修改
|
|
|
const rgsjlist = ref(false)
|
|
const rgsjlist = ref(false)
|
|
|
const rgsjtableData = ref([]);
|
|
const rgsjtableData = ref([]);
|
|
@@ -635,7 +717,7 @@ const handleUpdateData = async () => {
|
|
|
const formattedData = rawValueArray.map(item => {
|
|
const formattedData = rawValueArray.map(item => {
|
|
|
return {
|
|
return {
|
|
|
UniqID: item.UniqID,
|
|
UniqID: item.UniqID,
|
|
|
- number: item.一线工资总额 !== null ? item.一线工资总额 : "",
|
|
|
|
|
|
|
+ number: item.一线工资总额 !== undefined ? item.一线工资总额 : "",
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
console.log(formattedData)
|
|
console.log(formattedData)
|
|
@@ -652,12 +734,16 @@ const handleUpdateData = async () => {
|
|
|
//月度人工数据【退出】
|
|
//月度人工数据【退出】
|
|
|
const rgsjCancel = () => {
|
|
const rgsjCancel = () => {
|
|
|
rgsjlist.value = false;
|
|
rgsjlist.value = false;
|
|
|
|
|
+ rgsjtableData.value = [];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
//水电气分摊
|
|
//水电气分摊
|
|
|
|
|
|
|
|
const sdqftlist = ref(false)
|
|
const sdqftlist = ref(false)
|
|
|
|
|
+const sdqcopy = ref(false)
|
|
|
|
|
+const formMonth = ref('')
|
|
|
|
|
+const toMonth = ref('')
|
|
|
const sdqfttableData = ref([]);
|
|
const sdqfttableData = ref([]);
|
|
|
const sdqft_tableColumns = ref(
|
|
const sdqft_tableColumns = ref(
|
|
|
[
|
|
[
|
|
@@ -673,10 +759,22 @@ const sdqft_tableColumns = ref(
|
|
|
const SDQFT_WORKSHOPS = ['胶印车间', '凹丝印车间', '印后车间', '检验车间','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心'];
|
|
const SDQFT_WORKSHOPS = ['胶印车间', '凹丝印车间', '印后车间', '检验车间','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心'];
|
|
|
const SDQFT_kmmc = ['待分摊总额','待分摊总额','待分摊总额','待分摊总额','废气处理(RTO)','锅炉','空压机A','空压机B','热水锅炉','真空鼓风机A','真空鼓风机B','中央空调A(6号楼)','中央空调B(5号楼)'];
|
|
const SDQFT_kmmc = ['待分摊总额','待分摊总额','待分摊总额','待分摊总额','废气处理(RTO)','锅炉','空压机A','空压机B','热水锅炉','真空鼓风机A','真空鼓风机B','中央空调A(6号楼)','中央空调B(5号楼)'];
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+const onsdqcreate = () => {
|
|
|
|
|
+ sdqcopy.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const onsdqft = () => {
|
|
const onsdqft = () => {
|
|
|
sdqftlist.value = true
|
|
sdqftlist.value = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const sdqcopyonDialog = () => {
|
|
|
|
|
+ formMonth.value = dayjs(formMonth.value).format('YYYYMM');
|
|
|
|
|
+ toMonth.value = dayjs(toMonth.value).format('YYYYMM');
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const sdqftgetProductValue = () => {
|
|
const sdqftgetProductValue = () => {
|
|
|
if(_noderq.value === ''){
|
|
if(_noderq.value === ''){
|
|
|
sdqfttableData.value = [];
|
|
sdqfttableData.value = [];
|
|
@@ -685,12 +783,13 @@ const sdqftgetProductValue = () => {
|
|
|
}
|
|
}
|
|
|
UtilitiesListdata();
|
|
UtilitiesListdata();
|
|
|
};
|
|
};
|
|
|
-//月度人工数据->数据获取
|
|
|
|
|
|
|
+//水电气分摊->数据获取
|
|
|
const UtilitiesListdata = async ()=>{
|
|
const UtilitiesListdata = async ()=>{
|
|
|
let Sys_ny = _noderq.value;
|
|
let Sys_ny = _noderq.value;
|
|
|
try {
|
|
try {
|
|
|
const UtilitiesListdata = await UtilitiesList({month:Sys_ny});
|
|
const UtilitiesListdata = await UtilitiesList({month:Sys_ny});
|
|
|
- if(UtilitiesListdata.data.length === 0){
|
|
|
|
|
|
|
+ console.log(UtilitiesListdata.data[0])
|
|
|
|
|
+ if(UtilitiesListdata.data.耗电量 === undefined){
|
|
|
sdqfttableData.value = SDQFT_WORKSHOPS.map(workshop => ({
|
|
sdqfttableData.value = SDQFT_WORKSHOPS.map(workshop => ({
|
|
|
年月: _noderq.value,
|
|
年月: _noderq.value,
|
|
|
部门名称: workshop,
|
|
部门名称: workshop,
|
|
@@ -698,7 +797,7 @@ const UtilitiesListdata = async ()=>{
|
|
|
耗电量: '',
|
|
耗电量: '',
|
|
|
单位电价: 0.690,
|
|
单位电价: 0.690,
|
|
|
耗气量: '',
|
|
耗气量: '',
|
|
|
- 单位气价: ''
|
|
|
|
|
|
|
+ 单位气价: 3.037
|
|
|
}));
|
|
}));
|
|
|
}else{
|
|
}else{
|
|
|
sdqfttableData.value = UtilitiesListdata.data;
|
|
sdqfttableData.value = UtilitiesListdata.data;
|
|
@@ -709,7 +808,8 @@ const UtilitiesListdata = async ()=>{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//月度人工数据【更新】
|
|
|
|
|
|
|
+//水电气分摊【更新】
|
|
|
|
|
+
|
|
|
const sdqftConfirm = async () => {
|
|
const sdqftConfirm = async () => {
|
|
|
await sdqft_handleUpdateData(); // 新增数据逻辑
|
|
await sdqft_handleUpdateData(); // 新增数据逻辑
|
|
|
};
|
|
};
|
|
@@ -720,12 +820,12 @@ const sdqft_handleUpdateData = async () => {
|
|
|
return {
|
|
return {
|
|
|
sys_ny: _noderq.value,
|
|
sys_ny: _noderq.value,
|
|
|
sys_id: userStore.userInfo.nickName,
|
|
sys_id: userStore.userInfo.nickName,
|
|
|
- sist: item.部门名称 !== null ? item.部门名称 : "",
|
|
|
|
|
- 耗电量: item.耗电量 !== null ? item.耗电量 : "",
|
|
|
|
|
- 科目名称: item.科目名称 !== null ? item.科目名称 : "",
|
|
|
|
|
- 单位电价: item.单位电价 !== null ? item.单位电价 : "",
|
|
|
|
|
- 耗气量: item.耗气量 !== null ? item.耗气量 : "",
|
|
|
|
|
- 单位气价: item.单位气价 !== null ? item.单位气价 : "",
|
|
|
|
|
|
|
+ sist: item.部门名称 !== undefined ? item.部门名称 : "",
|
|
|
|
|
+ 耗电量: item.耗电量 !== undefined ? item.耗电量 : "",
|
|
|
|
|
+ 科目名称: item.科目名称 !== undefined ? item.科目名称 : "",
|
|
|
|
|
+ 单位电价: item.单位电价 !== undefined ? item.单位电价 : "",
|
|
|
|
|
+ 耗气量: item.耗气量 !== undefined ? item.耗气量 : "",
|
|
|
|
|
+ 单位气价: item.单位气价 !== undefined ? item.单位气价 : "",
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -785,9 +885,11 @@ const sdqft_handleUpdateData = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-//水电气分推【退出】
|
|
|
|
|
|
|
+//水电气分摊【退出】
|
|
|
const sdqftCancel = () => {
|
|
const sdqftCancel = () => {
|
|
|
sdqftlist.value = false;
|
|
sdqftlist.value = false;
|
|
|
|
|
+ sdqfttableData.value = [];
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|