+
-
+
+
+
+
+ 添加参数
+
+
+
取消
-
- 编辑
+
+ 保存
- 确定
-
-
@@ -96,10 +169,10 @@
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
+
@@ -136,7 +209,7 @@ const SmallTitle = {
export default {
components: { SmallTitle, DialogForm: BaseInfoForm, BaseInfoForm },
- props: ['sections', 'defaultMode', 'infoData'],
+ props: ['sections', 'defaultMode', 'infoData', 'size'],
data() {
return {
mode: '',
@@ -145,6 +218,8 @@ export default {
total: 0,
form: {},
list: [],
+ eqList: [],
+ plcList: [],
attrTitle: '',
attrForm: {
id: null,
@@ -166,13 +241,17 @@ export default {
input: true,
label: '参数列名',
prop: 'plcParamName',
- rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
+ rules: [
+ { required: true, message: '参数列名不能为空', trigger: 'blur' },
+ ],
},
{
input: true,
label: '参数名称',
prop: 'name',
- rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
+ rules: [
+ { required: true, message: '参数名称不能为空', trigger: 'blur' },
+ ],
},
],
[
@@ -181,7 +260,6 @@ export default {
label: '单位',
prop: 'unit',
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
- // rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
switch: true,
@@ -193,6 +271,47 @@ export default {
},
},
],
+ [
+ {
+ select: true,
+ label: '设备参数类型',
+ prop: 'equipmentParamType',
+ options: [
+ { label: '一般参数', value: 1 },
+ { label: '工艺参数', value: 2 },
+ { label: '报警参数', value: 3 },
+ ],
+ rules: [
+ {
+ required: true,
+ message: '设备参数类型不能为空',
+ trigger: 'blur',
+ },
+ ],
+ },
+ {
+ select: true,
+ label: '生产参数类型',
+ prop: 'productionParamType',
+ options: [
+ // { label: '进片数量', value: 1 },
+ // { label: '出片数量', value: 2 },
+ // { label: '破损数量', value: 3 },
+ // { label: '无类型', value: 4 },
+ { label: '进口计数', value: 1 },
+ { label: '出口计数', value: 2 },
+ { label: '损耗计数', value: 3 },
+ { label: '无类型', value: 4 },
+ ],
+ rules: [
+ {
+ required: true,
+ message: '生产参数类型不能为空',
+ trigger: 'blur',
+ },
+ ],
+ },
+ ],
[
{
input: true,
@@ -222,7 +341,6 @@ export default {
transform: (val) => Number(val),
},
],
- // rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
@@ -230,13 +348,11 @@ export default {
input: true,
label: '标准值',
prop: 'defaultValue',
- // rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
input: true,
label: '描述',
prop: 'description',
- // rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
@@ -244,7 +360,6 @@ export default {
input: true,
label: '备注',
prop: 'remark',
- // rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
],
@@ -257,6 +372,7 @@ export default {
infoQuery: null, // 基本信息的请求
attrFormSubmitting: false,
attrListLoading: false,
+ shouldRefreshPageView: false,
};
},
computed: {
@@ -275,11 +391,24 @@ export default {
});
},
tableBtn() {
- return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
+ return this.sections[1].tableBtn;
+ // return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
},
},
mounted() {
+ this.shouldRefreshPageView = false;
this.mode = this.defaultMode || 'detail';
+
+ if (this.mode != 'detail') {
+ this.$axios('/base/equipment/listAll').then(({ code, data }) => {
+ this.eqList = data;
+ });
+ this.$axios({
+ url: '/base/equipment-plc/listAll',
+ }).then(({ code, data }) => {
+ this.plcList = data;
+ });
+ }
for (const section of this.sections) {
// 请求具体信息
if ('url' in section) {
@@ -341,7 +470,7 @@ export default {
handleSave() {
this.$refs['form'][0].validate(async (valid) => {
if (valid) {
- const isEdit = this.mode == 'edit';
+ const isEdit = !this.mode.includes('detail');
await this.$axios({
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: isEdit ? 'put' : 'post',
@@ -355,6 +484,9 @@ export default {
},
handleCancel() {
+ if (this.shouldRefreshPageView) {
+ this.$emit('refreshDataList');
+ }
this.visible = false;
},
@@ -376,9 +508,11 @@ export default {
defaultValue: '',
description: '',
remark: '',
+ equipmentParamType: '',
+ productionParamType: '',
alarmContent: '',
};
- this.attrTitle = '添加设备绑定信息';
+ this.attrTitle = '添加参数绑定信息';
this.attrFormVisible = true;
},
@@ -391,14 +525,14 @@ export default {
});
if (res.code == 0) {
this.attrForm = res.data;
- this.attrTitle = '编辑设备绑定信息';
+ this.attrTitle = '编辑参数绑定信息';
this.attrFormVisible = true;
}
},
// 删除属性
handleDeleteAttr(attrId) {
- this.$confirm('确定删除该分组报警?', '提示', {
+ this.$confirm('确定删除该参数?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@@ -410,6 +544,7 @@ export default {
params: { id: attrId },
});
if (res.code == 0) {
+ this.shouldRefreshPageView = true;
this.$message({
message: '删除成功',
type: 'success',
@@ -424,35 +559,37 @@ export default {
},
// 提交属性表
- async submitAttrForm() {
- this.$refs['attrForm'].validate((valid) => {
+ submitAttrForm() {
+ this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
- });
- const isEdit = this.attrForm.id != null;
- this.attrFormSubmitting = true;
- const res = await this.$axios({
- url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
- method: isEdit ? 'put' : 'post',
- data: {
- ...this.attrForm,
- connectId: this.infoData.id
- },
- });
- if (res.code == 0) {
- this.closeAttrForm();
- this.$message({
- message: `${isEdit ? '更新' : '创建'}成功`,
- type: 'success',
- duration: 1500,
- onClose: () => {
- this.getAttrList();
+ const isEdit = this.attrForm.id != null;
+ this.attrFormSubmitting = true;
+ const res = await this.$axios({
+ url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
+ method: isEdit ? 'put' : 'post',
+ data: {
+ ...this.attrForm,
+ connectId: this.infoData.id,
},
});
- }
- this.attrFormSubmitting = false;
+
+ if (res.code == 0) {
+ this.closeAttrForm();
+ this.$message({
+ message: `${isEdit ? '更新' : '创建'}成功`,
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ this.getAttrList();
+ this.shouldRefreshPageView = true;
+ },
+ });
+ }
+ this.attrFormSubmitting = false;
+ });
},
closeAttrForm() {
@@ -461,7 +598,7 @@ export default {
handleClick(raw) {
if (raw.type === 'delete') {
- this.$confirm(`确定删除该报警?`, '提示', {
+ this.$confirm(`确定删除该参数?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
diff --git a/src/views/base/equipmentPlcConnect/components/basic-add.js b/src/views/base/equipmentPlcConnect/components/basic-add.js
new file mode 100644
index 00000000..2f725af8
--- /dev/null
+++ b/src/views/base/equipmentPlcConnect/components/basic-add.js
@@ -0,0 +1,100 @@
+/*
+ * @Author: zwq
+ * @Date: 2022-08-24 11:19:43
+ * @LastEditors: zhp
+ * @LastEditTime: 2023-12-13 15:52:53
+ * @Description:
+ */
+export default {
+ data() {
+ /* eslint-disable */
+ return {
+ urlOptions: {
+ createURL: '',
+ updateURL: '',
+ infoURL: '',
+ codeURL: '',
+ getOption: false,
+ isGetCode: false,
+ optionArrUrl: [],
+ optionArr: {}
+ },
+ visible: false,
+ setData: false
+ }
+ },
+ created() {
+ },
+ activated() {
+ },
+ methods: {
+ init(id) {
+ this.dataForm.id = id || "";
+ this.visible = true;
+ if (this.urlOptions.getOption) {
+ this.getArr()
+ }
+ this.$nextTick(() => {
+ this.$refs["dataForm"].resetFields();
+ if (this.dataForm.id) {
+ this.urlOptions.infoURL(id).then(response => {
+ this.dataForm = response.data
+ if (this.setData) {
+ this.setDataForm()
+ }
+ });
+ } else {
+ if (this.urlOptions.isGetCode) {
+ this.getCode()
+ }
+ }
+ });
+ },
+ getCode() {
+ this.urlOptions.codeURL()
+ .then(({ data: res }) => {
+ this.dataForm.code = res;
+ })
+ .catch(() => {});
+ },
+ getArr() {
+ const params = {
+ pageSize: 100,
+ pageNo: 1,
+ }
+ this.urlOptions.optionArrUrl.forEach((item, index) => {
+ item(params).then(({ data: res }) => {
+ this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
+ })
+ .catch(() => {
+ });
+ });
+ },
+ // 表单提交
+ dataFormSubmit() {
+ this.$refs["dataForm"].validate((valid) => {
+ if (!valid) {
+ return false;
+ }
+ // 修改的提交
+ if (this.dataForm.id) {
+ this.urlOptions.updateURL(this.dataForm).then(response => {
+ this.$modal.msgSuccess("修改成功");
+ this.visible = false;
+ this.$emit("refreshDataList");
+ });
+ return;
+ }
+ // 添加的提交
+ this.urlOptions.createURL(this.dataForm).then(response => {
+ this.$modal.msgSuccess("新增成功");
+ this.visible = false;
+ this.$emit("refreshDataList");
+ });
+ });
+ },
+ formClear() {
+ this.$refs.dataForm.resetFields()
+ }
+ }
+}
diff --git a/src/views/base/equipmentPlcConnect/index-old.vue b/src/views/base/equipmentPlcConnect/index-old.vue
new file mode 100644
index 00000000..d8ba38b5
--- /dev/null
+++ b/src/views/base/equipmentPlcConnect/index-old.vue
@@ -0,0 +1,535 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue
index 62122364..1005a221 100644
--- a/src/views/base/equipmentPlcConnect/index.vue
+++ b/src/views/base/equipmentPlcConnect/index.vue
@@ -1,3 +1,10 @@
+
+
@@ -12,7 +19,8 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
- @emitFun="handleEmitFun">
+ @emitFun="handleEmitFun"
+ :max-height="tableH">
-
+
+
@@ -197,8 +197,7 @@ export default {
type: 'button',
btnName: '导出',
name: 'export',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
};
@@ -257,7 +256,7 @@ export default {
this.dialogVisible = false
this.showData = this.tableData
}, 600)
-
+
},
exportXlsx() {
this.exportECL()
diff --git a/src/views/core/monitoring/data/index.vue b/src/views/core/monitoring/data/index.vue
index c96036cc..888e2401 100644
--- a/src/views/core/monitoring/data/index.vue
+++ b/src/views/core/monitoring/data/index.vue
@@ -3,7 +3,7 @@
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-10-16 15:18:23
* @LastEditors: DY
- * @Description:
+ * @Description:
-->
@@ -147,8 +147,7 @@ export default {
type: 'button',
btnName: '导出',
name: 'export',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
};
@@ -237,7 +236,7 @@ export default {
this.dialogVisible = false
this.showData = this.tableData
}, 600)
-
+
},
exportXlsx() {
this.exportECL()
diff --git a/src/views/core/monitoring/sectionStatistics/index.vue b/src/views/core/monitoring/sectionStatistics/index.vue
index a3b1640d..9587ebf7 100644
--- a/src/views/core/monitoring/sectionStatistics/index.vue
+++ b/src/views/core/monitoring/sectionStatistics/index.vue
@@ -3,7 +3,7 @@
* @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-10-16 15:19:04
* @LastEditors: DY
- * @Description:
+ * @Description:
-->
@@ -190,8 +190,7 @@ export default {
type: 'button',
btnName: '导出',
name: 'export',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
};
@@ -275,7 +274,7 @@ export default {
this.dialogVisible = false
this.showData = this.tableData
}, 600)
-
+
},
exportXlsx() {
this.exportECL()
diff --git a/src/views/core/monitoring/sectionStatisticsSearch/index.vue b/src/views/core/monitoring/sectionStatisticsSearch/index.vue
index 9ba315de..1fa010ee 100644
--- a/src/views/core/monitoring/sectionStatisticsSearch/index.vue
+++ b/src/views/core/monitoring/sectionStatisticsSearch/index.vue
@@ -142,8 +142,7 @@ export default {
type: 'button',
btnName: '导出',
name: 'export',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
};
@@ -258,7 +257,7 @@ export default {
this.dialogVisible = false
this.showData = this.tableData
}, 600)
-
+
},
exportXlsx() {
this.exportECL()
diff --git a/src/views/cost/costAnalysis/index.vue b/src/views/cost/costAnalysis/index.vue
new file mode 100644
index 00000000..e69de29b
diff --git a/src/views/cost/costStatistics/add-or-updata.vue b/src/views/cost/costStatistics/add-or-updata.vue
new file mode 100644
index 00000000..598fc544
--- /dev/null
+++ b/src/views/cost/costStatistics/add-or-updata.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ (元/吨)
+
+
+
+
+
+ (元)
+
+
+
+
+
+ (吨)
+
+
+
+
+
+
+
diff --git a/src/views/cost/costStatistics/index.vue b/src/views/cost/costStatistics/index.vue
new file mode 100644
index 00000000..661ea4a2
--- /dev/null
+++ b/src/views/cost/costStatistics/index.vue
@@ -0,0 +1,346 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/cost/costStatistics/typeRule.vue b/src/views/cost/costStatistics/typeRule.vue
new file mode 100644
index 00000000..046a1261
--- /dev/null
+++ b/src/views/cost/costStatistics/typeRule.vue
@@ -0,0 +1,23 @@
+
+
+
+ {{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}
+
+
+
diff --git a/src/views/cost/deep/24hourCostMonitor/index.vue b/src/views/cost/deep/24hourCostMonitor/index.vue
new file mode 100644
index 00000000..5210f68b
--- /dev/null
+++ b/src/views/cost/deep/24hourCostMonitor/index.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
diff --git a/src/views/cost/deep/costDeepEnergy/add-or-updata.vue b/src/views/cost/deep/costDeepEnergy/add-or-updata.vue
index 3d9e7f31..32575909 100644
--- a/src/views/cost/deep/costDeepEnergy/add-or-updata.vue
+++ b/src/views/cost/deep/costDeepEnergy/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-22 14:51:30
+ * @LastEditTime: 2024-09-05 15:34:49
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
diff --git a/src/views/cost/deep/costDeepEnergy/index.vue b/src/views/cost/deep/costDeepEnergy/index.vue
index 96f4569a..a9e8842c 100644
--- a/src/views/cost/deep/costDeepEnergy/index.vue
+++ b/src/views/cost/deep/costDeepEnergy/index.vue
@@ -1,64 +1,72 @@
-
-
-
-
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -66,9 +74,16 @@
import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import { getEnergyTypePage } from '@/api/base/energyType';
-import { getEnergyHisPage, getEnergyRealtimePage } from '@/api/cost/costEnergyDeep';
+import {
+ getEnergyHisPage,
+ getEnergyRealtimePage,
+ exportEnergyRealtimeExcel,
+ exportEnergyHisExcel,
+} from '@/api/cost/costEnergyDeep';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
+import ButtonNav from '@/components/ButtonNav';
+
const tableProps = [
{
prop: 'recTime',
@@ -170,6 +185,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
formConfig2: [
{
@@ -197,6 +221,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
listQuery: {
statisticType: 1,
@@ -218,6 +251,7 @@ export default {
},
components: {
AddOrUpdate,
+ ButtonNav,
},
created() {
const params = {
@@ -231,6 +265,8 @@ export default {
},
methods: {
buttonClick(val) {
+ this.formConfig2[1].startPlaceholder = '开始时间';
+ this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
@@ -253,7 +289,8 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.energyTypeId = val.name;
+ this.listQuery.energyTypeId = val.name || null;
+ this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
@@ -264,7 +301,8 @@ export default {
console.log(val);
}
},
- toggleTab() {
+ currentMenu(val) {
+ this.activeName = val === '历史成本' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.name = null;
@@ -275,9 +313,14 @@ export default {
this.getDataList();
} else {
this.$refs.searchBarForm2.resetForm();
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
+ this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
+ this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
+ this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.name = null;
- this.listQuery.startTime = null;
- this.listQuery.endTime = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
@@ -305,6 +348,30 @@ export default {
this.otherMethods(val);
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let exportURL, title;
+ if (this.activeName === 'his') {
+ exportURL = exportEnergyHisExcel;
+ title = '深加工能源成本-历史成本';
+ } else {
+ exportURL = exportEnergyRealtimeExcel;
+ title = '深加工能源成本-成本查询';
+ }
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/deep/costDeepOthercostHis/add-or-updata.vue b/src/views/cost/deep/costDeepOthercostHis/add-or-updata.vue
index c60a85f1..f382e873 100644
--- a/src/views/cost/deep/costDeepOthercostHis/add-or-updata.vue
+++ b/src/views/cost/deep/costDeepOthercostHis/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-19 16:29:30
+ * @LastEditTime: 2024-09-05 15:36:49
* @Description:
-->
@@ -46,7 +46,7 @@
type="date"
value-format="timestamp"
:style="{ width: '100%' }"
- readonly
+ disabled
placeholder="选择所属日期">
diff --git a/src/views/cost/deep/costDeepOthercostHis/index.vue b/src/views/cost/deep/costDeepOthercostHis/index.vue
index dcbea69c..02d06cda 100644
--- a/src/views/cost/deep/costDeepOthercostHis/index.vue
+++ b/src/views/cost/deep/costDeepOthercostHis/index.vue
@@ -1,65 +1,73 @@
-
-
-
-
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -70,9 +78,13 @@ import { getRawOthercostRulePage } from '@/api/cost/deepOthercostRule';
import {
getRawOthercostHisPage,
getRawOthercostSunPage,
+ exportRawOthercostSunExcel,
+ exportRawOthercostHisExcel
} from '@/api/cost/costOthercostHisDeep';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
+import ButtonNav from '@/components/ButtonNav';
+
const tableProps = [
{
prop: 'recTime',
@@ -147,6 +159,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
formConfig2: [
{
@@ -175,6 +196,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
listQuery: {
statisticType: 1,
@@ -196,6 +226,7 @@ export default {
},
components: {
AddOrUpdate,
+ ButtonNav,
},
created() {
const params = {
@@ -209,6 +240,8 @@ export default {
},
methods: {
buttonClick(val) {
+ this.formConfig2[1].startPlaceholder = '开始时间';
+ this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
@@ -231,7 +264,8 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.name = val.name;
+ this.listQuery.name = val.name || null;
+ this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
@@ -242,7 +276,8 @@ export default {
console.log(val);
}
},
- toggleTab() {
+ currentMenu(val) {
+ this.activeName = val === '历史成本' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.name = null;
@@ -253,9 +288,14 @@ export default {
this.getDataList();
} else {
this.$refs.searchBarForm2.resetForm();
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
+ this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
+ this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
+ this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.name = null;
- this.listQuery.startTime = null;
- this.listQuery.endTime = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
@@ -279,6 +319,30 @@ export default {
this.otherMethods(val);
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let exportURL, title;
+ if (this.activeName === 'his') {
+ exportURL = exportRawOthercostHisExcel;
+ title = '深加工其它成本-历史成本';
+ } else {
+ exportURL = exportRawOthercostSunExcel;
+ title = '深加工其它成本-成本查询';
+ }
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/deep/costDeepOthercostLog/add-or-updata.vue b/src/views/cost/deep/costDeepOthercostLog/add-or-updata.vue
index 39587f79..d1c89f3a 100644
--- a/src/views/cost/deep/costDeepOthercostLog/add-or-updata.vue
+++ b/src/views/cost/deep/costDeepOthercostLog/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-22 14:59:49
+ * @LastEditTime: 2024-09-05 15:35:07
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
diff --git a/src/views/cost/deep/costDeepOthercostLog/index.vue b/src/views/cost/deep/costDeepOthercostLog/index.vue
index d3a939b9..18c1cfe2 100644
--- a/src/views/cost/deep/costDeepOthercostLog/index.vue
+++ b/src/views/cost/deep/costDeepOthercostLog/index.vue
@@ -141,12 +141,12 @@ export default {
// {
// type: this.$auth.hasPermi('monitoring:cost-othercost-log:create') ? 'separate' : '',
// },
- // {
- // type: this.$auth.hasPermi('monitoring:cost-othercost-log:export') ? 'button' : '',
- // btnName: '导出',
- // name: 'export',
- // color: 'warning',
- // },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
};
},
@@ -181,8 +181,11 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.name = val.name;
- this.listQuery.recTime = val.searchTime;
+ this.listQuery.name = val.name||null;
+ this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
+ this.listQuery.endTime = val.searchTime
+ ? val.searchTime[1].substr(0, 10) + ' 23:59:59'
+ : null;
this.handleExport();
break;
default:
@@ -203,6 +206,24 @@ export default {
this.otherMethods(val)
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let title;
+ title = '深加工其它成本-成本记录';
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return this.urlOptions.exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/deep/costDeepOthercostRule/add-or-updata.vue b/src/views/cost/deep/costDeepOthercostRule/add-or-updata.vue
index 49d6590b..edd1e05e 100644
--- a/src/views/cost/deep/costDeepOthercostRule/add-or-updata.vue
+++ b/src/views/cost/deep/costDeepOthercostRule/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
- * @LastEditTime: 2024-04-22 14:56:17
+ * @LastEditTime: 2024-09-03 14:52:51
* @Description:
-->
@@ -17,7 +17,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (%)
+
+
+
+
+
+
+
diff --git a/src/views/cost/deep/costDeepRatioHis/index.vue b/src/views/cost/deep/costDeepRatioHis/index.vue
new file mode 100644
index 00000000..9b04c7f9
--- /dev/null
+++ b/src/views/cost/deep/costDeepRatioHis/index.vue
@@ -0,0 +1,376 @@
+
+
+
+
+
+ 产线良品率
+
+
+ 工段良品率
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/cost/deep/costStatistics/add-or-updata.vue b/src/views/cost/deep/costStatistics/add-or-updata.vue
new file mode 100644
index 00000000..05ef932b
--- /dev/null
+++ b/src/views/cost/deep/costStatistics/add-or-updata.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (%)
+
+
+
+
+
+ (元)
+
+
+
+
+
+ (元)
+
+
+
+
+
+ (元)
+
+
+
+
+
+
+
diff --git a/src/views/cost/deep/costStatistics/index.vue b/src/views/cost/deep/costStatistics/index.vue
new file mode 100644
index 00000000..08d0f1c4
--- /dev/null
+++ b/src/views/cost/deep/costStatistics/index.vue
@@ -0,0 +1,440 @@
+
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/cost/deep/costStatistics/typeRule.vue b/src/views/cost/deep/costStatistics/typeRule.vue
new file mode 100644
index 00000000..046a1261
--- /dev/null
+++ b/src/views/cost/deep/costStatistics/typeRule.vue
@@ -0,0 +1,23 @@
+
+
+
+ {{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}
+
+
+
diff --git a/src/views/cost/raw/24hourCostMonitor/index.vue b/src/views/cost/raw/24hourCostMonitor/index.vue
new file mode 100644
index 00000000..5210f68b
--- /dev/null
+++ b/src/views/cost/raw/24hourCostMonitor/index.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
diff --git a/src/views/cost/raw/costEnergy/add-or-updata.vue b/src/views/cost/raw/costEnergy/add-or-updata.vue
index d7cf03cd..00367fd1 100644
--- a/src/views/cost/raw/costEnergy/add-or-updata.vue
+++ b/src/views/cost/raw/costEnergy/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-19 16:45:32
+ * @LastEditTime: 2024-09-05 15:34:14
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
@@ -28,10 +29,30 @@
type="date"
value-format="timestamp"
:style="{ width: '100%' }"
- readonly
+ disabled
placeholder="选择日期">
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
@@ -74,6 +85,7 @@ export default {
quantity: undefined,
energyTypeName: undefined,
recTime: undefined,
+ showName: undefined
},
dataRule: {
price: [{ required: true, message: '总价不能为空', trigger: 'blur' }],
@@ -90,6 +102,11 @@ export default {
this.$refs['dataForm'].resetFields();
this.dataForm = JSON.parse(JSON.stringify(val));
this.dataForm.statisticType = statisticType;
+ if(this.dataForm.bindObjectName){
+ this.dataForm.showName = this.dataForm.bindObjectName
+ }else{
+ this.dataForm.showName = this.dataForm.meterName
+ }
});
},
// 表单提交
diff --git a/src/views/cost/raw/costEnergy/index.vue b/src/views/cost/raw/costEnergy/index.vue
index 094149e2..5edfbd67 100644
--- a/src/views/cost/raw/costEnergy/index.vue
+++ b/src/views/cost/raw/costEnergy/index.vue
@@ -1,64 +1,72 @@
-
-
-
-
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -66,9 +74,16 @@
import AddOrUpdate from './add-or-updata';
import basicPage from '@/mixins/basic-page';
import { getEnergyTypePage } from '@/api/base/energyType';
-import { getEnergyHisPage, getEnergyRealtimePage } from '@/api/cost/costEnergy';
+import {
+ getEnergyHisPage,
+ getEnergyRealtimePage,
+ exportEnergyRealtimeExcel,
+ exportEnergyHisExcel,
+} from '@/api/cost/costEnergy';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
+import ButtonNav from '@/components/ButtonNav';
+
const tableProps = [
{
prop: 'recTime',
@@ -170,6 +185,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
formConfig2: [
{
@@ -197,6 +221,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
listQuery: {
statisticType: 1,
@@ -218,6 +251,7 @@ export default {
},
components: {
AddOrUpdate,
+ ButtonNav,
},
created() {
const params = {
@@ -231,6 +265,8 @@ export default {
},
methods: {
buttonClick(val) {
+ this.formConfig2[1].startPlaceholder = '开始时间';
+ this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
@@ -253,7 +289,8 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.energyTypeId = val.name;
+ this.listQuery.energyTypeId = val.name || null;
+ this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
@@ -264,7 +301,8 @@ export default {
console.log(val);
}
},
- toggleTab() {
+ currentMenu(val) {
+ this.activeName = val === '历史成本' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.name = null;
@@ -275,9 +313,14 @@ export default {
this.getDataList();
} else {
this.$refs.searchBarForm2.resetForm();
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
+ this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
+ this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
+ this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.name = null;
- this.listQuery.startTime = null;
- this.listQuery.endTime = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
@@ -305,6 +348,30 @@ export default {
this.otherMethods(val);
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let exportURL, title;
+ if (this.activeName === 'his') {
+ exportURL = exportEnergyHisExcel;
+ title = '能源成本-历史成本';
+ } else {
+ exportURL = exportEnergyRealtimeExcel;
+ title = '能源成本-成本查询';
+ }
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/raw/costMaterial/add-or-updata.vue b/src/views/cost/raw/costMaterial/add-or-updata.vue
index 598fc544..f9e04897 100644
--- a/src/views/cost/raw/costMaterial/add-or-updata.vue
+++ b/src/views/cost/raw/costMaterial/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-19 16:59:45
+ * @LastEditTime: 2024-09-05 15:34:28
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
@@ -31,17 +32,6 @@
(元/吨)
-
-
-
- (元)
-
-
+
+
+
+ (元)
+
+
diff --git a/src/views/cost/raw/costMaterial/index.vue b/src/views/cost/raw/costMaterial/index.vue
index 661ea4a2..d47474bd 100644
--- a/src/views/cost/raw/costMaterial/index.vue
+++ b/src/views/cost/raw/costMaterial/index.vue
@@ -1,64 +1,72 @@
-
-
-
-
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -69,10 +77,14 @@ import { getMaterialPage } from '@/api/base/material';
import {
getMaterialHisPage,
getMaterialRealtimePage,
+ exportMaterialRealtimeExcel,
+ exportMaterialHisExcel,
} from '@/api/cost/costMaterial';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import typeRule from './typeRule';
+import ButtonNav from '@/components/ButtonNav';
+
const tableProps = [
{
prop: 'recTime',
@@ -83,15 +95,15 @@ const tableProps = [
prop: 'materialName',
label: '原料名称',
},
+ {
+ prop: 'quantity',
+ label: '累计使用量(吨)',
+ },
{
prop: 'matPrice',
label: '单价(元/吨)',
align: 'right',
},
- {
- prop: 'quantity',
- label: '累计使用量(吨)',
- },
{
prop: 'price',
label: '总价(元)',
@@ -103,20 +115,21 @@ const tableProps2 = [
prop: 'materialName',
label: '原料名称',
},
- {
- prop: 'matPrice',
- label: '单价(元/吨)',
- align: 'right',
- },
{
prop: 'time',
label: '单价生效时间',
subcomponent: typeRule,
+ width: 300,
},
{
prop: 'quantity',
label: '累计使用量(吨)',
},
+ {
+ prop: 'materialPrice',
+ label: '单价(元/吨)',
+ align: 'right',
+ },
{
prop: 'price',
label: '总价(元)',
@@ -169,6 +182,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
formConfig2: [
{
@@ -196,6 +218,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
listQuery: {
statisticType: 1,
@@ -217,6 +248,7 @@ export default {
},
components: {
AddOrUpdate,
+ ButtonNav,
},
created() {
const params = {
@@ -230,6 +262,8 @@ export default {
},
methods: {
buttonClick(val) {
+ this.formConfig2[1].startPlaceholder = '开始时间';
+ this.formConfig2[1].endPlaceholder = '结束时间';
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
@@ -252,7 +286,8 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.name = val.name;
+ this.listQuery.materialId = val.name || null;
+ this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
@@ -263,7 +298,8 @@ export default {
console.log(val);
}
},
- toggleTab() {
+ currentMenu(val) {
+ this.activeName = val === '历史成本' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.name = null;
@@ -274,9 +310,14 @@ export default {
this.getDataList();
} else {
this.$refs.searchBarForm2.resetForm();
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
+ this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
+ this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
+ this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
this.listQuery.name = null;
- this.listQuery.startTime = null;
- this.listQuery.endTime = null;
this.listQuery.pageNo = 1;
this.getDataList2();
}
@@ -304,6 +345,30 @@ export default {
this.otherMethods(val);
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let exportURL, title;
+ if (this.activeName === 'his') {
+ exportURL = exportMaterialHisExcel;
+ title = '原料成本-历史成本';
+ } else {
+ exportURL = exportMaterialRealtimeExcel;
+ title = '原料成本-成本查询';
+ }
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/raw/costOriginRatioHis/add-or-updata.vue b/src/views/cost/raw/costOriginRatioHis/add-or-updata.vue
index 3d34fffa..325cdad5 100644
--- a/src/views/cost/raw/costOriginRatioHis/add-or-updata.vue
+++ b/src/views/cost/raw/costOriginRatioHis/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-22 11:12:58
+ * @LastEditTime: 2024-09-05 15:33:16
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
@@ -18,70 +19,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (/m²)
-
-
-
-
-
- (/m²)
-
-
-
-
-
- (%)
+ disabled />
@@ -91,10 +29,73 @@
type="date"
value-format="timestamp"
:style="{ width: '100%' }"
- readonly
+ disabled
placeholder="选择所属日期">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (m²)
+
+
+
+
+
+ (m²)
+
+
+
+
+
+ (%)
+
+
diff --git a/src/views/cost/raw/costOriginRatioHis/index.vue b/src/views/cost/raw/costOriginRatioHis/index.vue
index 0dee7d35..8dff6fee 100644
--- a/src/views/cost/raw/costOriginRatioHis/index.vue
+++ b/src/views/cost/raw/costOriginRatioHis/index.vue
@@ -43,8 +43,8 @@
diff --git a/src/views/cost/raw/costOthercostHis/add-or-updata.vue b/src/views/cost/raw/costOthercostHis/add-or-updata.vue
index dcc665ec..5d4d7859 100644
--- a/src/views/cost/raw/costOthercostHis/add-or-updata.vue
+++ b/src/views/cost/raw/costOthercostHis/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-19 16:29:30
+ * @LastEditTime: 2024-09-05 15:36:45
* @Description:
-->
@@ -46,7 +46,7 @@
type="date"
value-format="timestamp"
:style="{ width: '100%' }"
- readonly
+ disabled
placeholder="选择所属日期">
diff --git a/src/views/cost/raw/costOthercostHis/index.vue b/src/views/cost/raw/costOthercostHis/index.vue
index 65d1ae80..a8697122 100644
--- a/src/views/cost/raw/costOthercostHis/index.vue
+++ b/src/views/cost/raw/costOthercostHis/index.vue
@@ -1,65 +1,73 @@
-
-
-
-
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -70,9 +78,13 @@ import { getRawOthercostRulePage } from '@/api/cost/rawOthercostRule';
import {
getRawOthercostHisPage,
getRawOthercostSunPage,
+ exportRawOthercostSunExcel,
+ exportRawOthercostHisExcel
} from '@/api/cost/costOthercostHis';
import { parseTime } from '@/filter/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
+import ButtonNav from '@/components/ButtonNav';
+
const tableProps = [
{
prop: 'recTime',
@@ -147,6 +159,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
formConfig2: [
{
@@ -175,6 +196,15 @@ export default {
name: 'search',
color: 'primary',
},
+ {
+ type: 'separate',
+ },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
listQuery: {
statisticType: 1,
@@ -196,6 +226,7 @@ export default {
},
components: {
AddOrUpdate,
+ ButtonNav,
},
created() {
const params = {
@@ -231,7 +262,8 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.name = val.name;
+ this.listQuery.name = val.name || null;
+ this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
@@ -242,7 +274,8 @@ export default {
console.log(val);
}
},
- toggleTab() {
+ currentMenu(val) {
+ this.activeName = val === '历史成本' ? 'his' : 'now';
if (this.activeName === 'his') {
this.$refs.searchBarForm.resetForm();
this.listQuery.name = null;
@@ -279,6 +312,30 @@ export default {
this.otherMethods(val);
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let exportURL, title;
+ if (this.activeName === 'his') {
+ exportURL = exportRawOthercostHisExcel;
+ title = '原片其它成本-历史成本';
+ } else {
+ exportURL = exportRawOthercostSunExcel;
+ title = '原片其它成本-成本查询';
+ }
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/raw/costOthercostLog/add-or-updata.vue b/src/views/cost/raw/costOthercostLog/add-or-updata.vue
index 4df7580f..18308789 100644
--- a/src/views/cost/raw/costOthercostLog/add-or-updata.vue
+++ b/src/views/cost/raw/costOthercostLog/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2024-04-18 16:32:56
+ * @LastEditTime: 2024-09-05 15:33:48
* @Description:
-->
@@ -11,6 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
+ label-position="top"
label-width="80px">
diff --git a/src/views/cost/raw/costOthercostLog/index.vue b/src/views/cost/raw/costOthercostLog/index.vue
index de9794c8..48fe684f 100644
--- a/src/views/cost/raw/costOthercostLog/index.vue
+++ b/src/views/cost/raw/costOthercostLog/index.vue
@@ -141,12 +141,12 @@ export default {
// {
// type: this.$auth.hasPermi('monitoring:cost-othercost-log:create') ? 'separate' : '',
// },
- // {
- // type: this.$auth.hasPermi('monitoring:cost-othercost-log:export') ? 'button' : '',
- // btnName: '导出',
- // name: 'export',
- // color: 'warning',
- // },
+ {
+ type: 'button',
+ btnName: '导出',
+ name: 'export',
+ color: 'warning',
+ },
],
};
},
@@ -181,8 +181,11 @@ export default {
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
- this.listQuery.name = val.name;
- this.listQuery.recTime = val.searchTime;
+ this.listQuery.name = val.name||null;
+ this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
+ this.listQuery.endTime = val.searchTime
+ ? val.searchTime[1].substr(0, 10) + ' 23:59:59'
+ : null;
this.handleExport();
break;
default:
@@ -203,6 +206,24 @@ export default {
this.otherMethods(val)
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ let title;
+ title = '原片其它成本-成本记录';
+ // 处理查询参数
+ let params = { ...this.listQuery };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal
+ .confirm('是否确认导出所有数据项?')
+ .then(() => {
+ return this.urlOptions.exportURL(params);
+ })
+ .then((response) => {
+ this.$download.excel(response, title + '报表.xls');
+ })
+ .catch(() => {});
+ },
},
};
diff --git a/src/views/cost/raw/costOthercostRule/add-or-updata.vue b/src/views/cost/raw/costOthercostRule/add-or-updata.vue
index e81f94a3..b64a4803 100644
--- a/src/views/cost/raw/costOthercostRule/add-or-updata.vue
+++ b/src/views/cost/raw/costOthercostRule/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
- * @LastEditTime: 2024-04-17 16:59:58
+ * @LastEditTime: 2024-09-03 14:53:54
* @Description:
-->
@@ -17,7 +17,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+ (m²)
+
+
+
+
+
+ (m²)
+
+
+
+
+
+ (%)
+
+
+
+
+
+ (元)
+
+
+
+
+
+ (元)
+
+
+
+
+
+
+
diff --git a/src/views/cost/raw/costStatistics/index.vue b/src/views/cost/raw/costStatistics/index.vue
new file mode 100644
index 00000000..b7f528df
--- /dev/null
+++ b/src/views/cost/raw/costStatistics/index.vue
@@ -0,0 +1,439 @@
+
+
+
+
+
+ 历史成本
+
+
+ 成本查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/cost/raw/costStatistics/typeRule.vue b/src/views/cost/raw/costStatistics/typeRule.vue
new file mode 100644
index 00000000..046a1261
--- /dev/null
+++ b/src/views/cost/raw/costStatistics/typeRule.vue
@@ -0,0 +1,23 @@
+
+
+
+ {{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}
+
+
+
diff --git a/src/views/energy/base/energyQuantityRealtime/index.vue b/src/views/energy/base/energyQuantityRealtime/index.vue
index 09c00fdb..96642075 100644
--- a/src/views/energy/base/energyQuantityRealtime/index.vue
+++ b/src/views/energy/base/energyQuantityRealtime/index.vue
@@ -99,8 +99,7 @@ export default {
type: this.$auth.hasPermi('base:energy-quantity-realtime:export') ? 'button' : '',
btnName: '导出',
name: 'export',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
tableProps,
diff --git a/src/views/energy/monitoring/energyReport/index.vue b/src/views/energy/monitoring/energyReport/index.vue
index 6e2e4c6f..c1e9b178 100644
--- a/src/views/energy/monitoring/energyReport/index.vue
+++ b/src/views/energy/monitoring/energyReport/index.vue
@@ -116,8 +116,7 @@ export default {
type: this.$auth.hasPermi('monitoring:energy-report:export') ? 'button' : '',
btnName: '导出',
name: 'add',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
tableProps,
diff --git a/src/views/energy/monitoring/energyReportSearch/index.vue b/src/views/energy/monitoring/energyReportSearch/index.vue
index 86498ff6..026bd469 100644
--- a/src/views/energy/monitoring/energyReportSearch/index.vue
+++ b/src/views/energy/monitoring/energyReportSearch/index.vue
@@ -95,8 +95,7 @@ export default {
type: this.$auth.hasPermi('monitoring:energy-report-search:export') ? 'button' : '',
btnName: '导出',
name: 'add',
- color: 'primary',
- plain: true
+ color: 'warning',
}
],
tableProps,
diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue
index d1a495ae..00a87973 100644
--- a/src/views/equipment/timing-diagram/output/index.vue
+++ b/src/views/equipment/timing-diagram/output/index.vue
@@ -1,4 +1,4 @@
-