Compare commits

...

14 Commits

Author SHA1 Message Date
zwq
35bd7ab57e 更新成本bug 2024-03-22 16:23:08 +08:00
a1262bd640 Merge pull request 'projects/mesxc-zhp' (#266) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #266
2024-03-22 14:24:24 +08:00
‘937886381’
974ebc53df 解决冲突 2024-03-22 14:18:47 +08:00
‘937886381’
f8829ec3b7 修改bug 2024-03-22 14:17:57 +08:00
083c9ef59a Merge pull request 'projects/mesxc-dy' (#265) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #265
2024-03-22 14:15:25 +08:00
helloDy
6a558cbab5 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-22 14:13:20 +08:00
helloDy
b303dbda0c pie 2024-03-22 14:12:52 +08:00
2a07a7de2f Merge pull request 'projects/mesxc-dy' (#264) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #264
2024-03-22 10:30:49 +08:00
helloDy
f1fd854567 merge 2024-03-22 10:29:41 +08:00
helloDy
99fd016703 bug 3 2024-03-22 10:27:57 +08:00
3951623f7e Merge pull request 'projects/mesxc-zhp' (#263) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #263
2024-03-22 10:21:53 +08:00
‘937886381’
ab6ea3f404 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-22 10:20:40 +08:00
‘937886381’
60b3695a37 修改bug 2024-03-22 10:20:08 +08:00
2ead8c733f Merge pull request '更新成本bug' (#262) from projects/mesxc-zwq into projects/mesxc-test
Reviewed-on: #262
2024-03-22 10:18:25 +08:00
33 changed files with 620 additions and 341 deletions

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-03-21 14:45:52
# @LastEditTime: 2024-03-22 14:18:33
# @LastEditors: zhp
# @Description:
###

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-10-21 11:50:46
* @LastEditTime: 2023-11-15 17:19:19
* @LastEditTime: 2024-03-21 10:49:24
* @LastEditors: DY
* @Description:
*/
@ -118,6 +118,24 @@ export function getCoreWOMaPage(query) {
})
}
// 获得工单预使用原料分页----根据产品id
export function getlistByProductId(query) {
return request({
url: '/base/material-product-bom-det/listByProductId',
method: 'get',
params: query
})
}
// 获得工单预使用原料分页----根据工艺流程
export function getlistByFlowId(query) {
return request({
url: '/extend/process-equ-material-bom-det/listByFlowId',
method: 'get',
params: query
})
}
// 获得预计用料信息分页
export function getMaterialBomPage(query) {
return request({
@ -162,3 +180,12 @@ export function updateConCoreWOr(data) {
data: data
})
}
// 修改分配产量----批量
export function updateBatchConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/updateBatch',
method: 'put',
data: data
})
}

View File

@ -94,7 +94,7 @@
:show-file-list="false"
icon="el-icon-upload2"
:disabled="disabled"
:before-upload="beforeUpload"
:before-upload="col.uploadTips ? beforeUploadPic : beforeUpload"
:on-success="
(response, file, fileList) => {
handleUploadSuccess(response, file, col.prop);
@ -110,7 +110,7 @@
上传文件
</el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
{{ '只能上传jpg/png文件, 大小不超过2MB' }}
</div>
</el-upload>
@ -416,6 +416,26 @@ export default {
//
beforeUpload(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$modal.msgError('上传文件大小不能超过 2MB!');
}
return isLt2M;
};
// const checkFileType = () => {
// const isJPG =
// file.type === 'image/jpeg' ||
// file.type === 'image/png' ||
// file.type === 'image/jpg';
// return isJPG;
// };
// return checkFileSize() && checkFileType();
return checkFileSize();
},
// ----
beforeUploadPic(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
@ -428,6 +448,9 @@ export default {
file.type === 'image/jpeg' ||
file.type === 'image/png' ||
file.type === 'image/jpg';
if (!isJPG) {
this.$modal.msgError('只能上传jpg/png文件!');
}
return isJPG;
};
return checkFileSize() && checkFileType();

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-12-12 16:04:44
* @LastEditTime: 2024-03-20 16:20:39
* @Description:
-->
<template>
@ -130,6 +130,11 @@ export default {
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
const tempPic = []
this.dataForm.files?.forEach(item => {
tempPic.push(item.fileUrl)
})
this.files = tempPic.join(',')
if (this.setData) {
this.setDataForm()
}
@ -150,8 +155,8 @@ export default {
}
this.dataForm.files = []
if (this.files.length > 0) {
this.files.forEach(item => {
if (this.files.split(',').length > 0) {
this.files.split(',').forEach(item => {
const temp = {
fileType: 1,
fileUrl: item

View File

@ -387,6 +387,7 @@ export default {
label: '设备图片',
prop: 'files2',
fileType: 1,
uploadTips: true
},
],
[{ input: true, label: '备注', prop: 'remark' }],

View File

@ -161,7 +161,7 @@ export default {
{
upload: true,
label: '上传资料',
prop: 'files',
prop: 'files'
},
],
[{ input: true, label: '备注', prop: 'remark' }],

View File

@ -186,8 +186,8 @@ export default {
code: '',
planProductId: '',
specifications: '',
planStartTime: '',
planFinishTime: '',
planStartTime: undefined,
planFinishTime: undefined,
planAssignQuantity: 0,
planQuantity: 0,
processFlowId: '',
@ -248,7 +248,31 @@ export default {
this.dataForm.materialMethod = 1
}
},
reset() {
this.dataForm = {
id: undefined,
workOrderId: '',
name: '',
code: '',
planProductId: '',
specifications: '',
planStartTime: undefined,
planFinishTime: undefined,
planAssignQuantity: 0,
planQuantity: 0,
processFlowId: '',
materialMethod: 1,
triggerOrigin: 1,
priority: '',
productLineIds: [],
type: '',
workers: '',
roomNameDict: '',
status: 1
}
},
init(id) {
this.reset();
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
@ -256,6 +280,7 @@ export default {
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
console.log('222', this.dataForm)
this.planStartTime = ''
this.planFinishTime = ''
if (this.dataForm.id) {
@ -264,6 +289,12 @@ export default {
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
if (this.dataForm.planStartTime === 0) {
this.dataForm.planStartTime = undefined
}
if (this.dataForm.planFinishTime === 0) {
this.dataForm.planFinishTime = undefined
}
if (this.dataForm.roomNameDict !== undefined) {
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
}

View File

@ -2,16 +2,19 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-15 15:34:58
* @LastEditTime: 2024-03-22 08:53:20
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
:wrapper-closable="true"
class="drawer"
size="55%">
size="55%"
:before-close="beforeClose"
@closed="$emit('destroy')"
>
<small-title slot="title" :no-padding="true">
{{ '分配产量' }}
</small-title>
@ -52,60 +55,47 @@
<el-date-picker
v-model="dataForm.finishProduceTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间" />
value-format="timestamp"
placeholder="选择实际生产完成时间" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="attr-list">
<div v-show="!isdetail" class="attr-list">
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
<el-table
:data="tableData"
style="width: 100%">
<el-table-column type="index" label="序号" />
<el-table-column prop="orderName" label="订单名称" />
<el-table-column prop="orderCode" label="订单编码" />
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope">
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
<el-button
type="text"
:style="{color:'#0B58FF'}"
size="mini"
@click="edit(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
</el-button>
</el-tooltip> -->
<!-- <el-tooltip placement="top" content="删除">
<el-button
type="text"
:style="{color:'#FF5454'}"
size="mini"
@click="deleteDetail(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
</el-button>
</el-tooltip> -->
</template>
</el-table-column>
</el-table>
<el-form ref="tableForm" :model="form" style="padding: 0">
<el-table
ref="table"
:data="form.tableData"
row-key="id"
style="width: 100%">
<el-table-column type="index" label="序号" />
<el-table-column prop="orderName" label="订单名称" />
<el-table-column prop="orderCode" label="订单编码" />
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-form-item prop="planAssignmentQuantity">
<el-input v-model.number="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="*实际分配数量">
<template slot-scope="scope">
<el-form-item :prop="`tableData.${scope.$index}.actualAssignmentQuantity`" :rules="[{ required: true, message: '实际分配数量不能为空', trigger: 'blur' }]">
<el-input v-model.number="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</el-form-item>
</template>
</el-table-column>
<!-- <el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
</template>
</el-table-column> -->
</el-table>
</el-form>
<pagination
v-show="listQuery.total > 0"
:total="listQuery.total"
@ -134,7 +124,7 @@
<script>
import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
import { getConOrderList, updateConCoreWOr, updateBatchConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add';
@ -158,6 +148,10 @@ export default {
code: undefined,
productId: '',
remark: undefined,
},
form: {
tableData: []
},
productList: [],
materialAttrList: [],
@ -174,26 +168,77 @@ export default {
},
mounted() {},
methods: {
beforeClose(done) {
// if (this.mode.includes('edit')) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
//
dataFormSubmit() {
// console.log('', this.$refs['table'])
console.log('nihc ', this.form.tableData)
// this.$refs['tableForm'].validate((valid) => {
// if (valid) {
// alert('!');
// } else {
// alert('!');
// return false;
// }
// });
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$refs['tableForm'].validate((valid) => {
if (!valid) {
return false;
}
//
console.log('aaaaaaa', this.form.tableData)
//
let num = 0
const tempList = this.form.tableData.map((item) => {
item.workOrderId = this.dataForm.id
num += item.actualAssignmentQuantity
return item
})
if (num <= this.dataForm.actualQuantity) {
if (this.dataForm.id) {
statusChange({
id: this.dataForm.id,
status: 4,
finishProduceTime: this.dataForm.finishProduceTime,
actualQuantity: this.dataForm.actualQuantity
}).then(response => {
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
this.saveData(tempList)
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
} else {
this.$message.error('实际分配数量超过实际生产数量!')
}
console.log('2111', num, tempList)
});
//
if (this.dataForm.id) {
statusChange({
id: this.dataForm.id,
status: 4,
finishProduceTime: this.dataForm.finishProduceTime,
actualQuantity: this.dataForm.actualQuantity
}).then(response => {
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
// if (this.dataForm.id) {
// statusChange({
// id: this.dataForm.id,
// status: 4,
// finishProduceTime: this.dataForm.finishProduceTime,
// actualQuantity: this.dataForm.actualQuantity
// }).then(response => {
// this.$modal.msgSuccess("");
// this.visible = false;
// this.$emit("refreshDataList");
// });
// return;
// }
//
// this.urlOptions.createURL(this.dataForm).then(response => {
// this.$modal.msgSuccess("");
@ -209,30 +254,14 @@ export default {
edit(row) {
row.isEdit = true
},
saveData(row) {
if (row.actualAssignmentQuantity) {
if (row.id) {
// updateMaterialPBDet({
// ...row
// }).then((response) => {
// this.$modal.msgSuccess('');
// // this.visible = false;
// this.getList();
// });
// return;
}
//
updateConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
this.$modal.msgSuccess('分配成功');
// this.visible = false;
this.getList();
});
} else {
this.$message.warning('请填写实际分配数量');
}
saveData(list) {
console.log('你好', list)
//
updateBatchConCoreWOr(list).then((response) => {
this.$modal.msgSuccess('分配成功');
// this.visible = false;
this.getList();
});
},
getList() {
//
@ -245,6 +274,7 @@ export default {
item.isallocation = item.actualAssignmentQuantity ? true : false
return item
});
this.$set(this.form, 'tableData', this.tableData)
this.listQuery.total = response.data.length;
});
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-15 15:40:24
* @LastEditTime: 2024-03-21 16:52:46
* @Description:
-->
<template>
@ -16,7 +16,13 @@
<!-- <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> -->
<div v-show="workOrderButton.length" class="buttonDiv">
<div v-show="workOrderButton.length" style="position: relative;padding-right: 90px;">
<topTabVue :orderIdList='workOrderButton' :orderId="workorderId" @emitFun='toggleName' />
<el-button type="primary" plain size="small"
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="goback"><svg-icon
icon-class="return" /> 返回</el-button>
</div>
<!-- <div v-show="workOrderButton.length" class="buttonDiv">
<div style="display: flex; width: 100%;">
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
<div ref="content" class="scrollDiv">
@ -27,7 +33,7 @@
<svg-icon icon-class="return"/>返回
</el-button>
</div>
</div>
</div> -->
<div class="content">
<div class="card">
<div class="boxTitle">
@ -157,7 +163,7 @@
</el-col>
<el-col :span="3">
<div class="blodTip">废片数量</div>
<div class="lightTip">{{ dataForm.nokQuantity }}</div>
<div class="lightTip">{{ dataForm.nokNum }}</div>
</el-col>
<el-col :span="3">
<div class="blodTip">检测瑕疵数</div>
@ -222,12 +228,13 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { getCoreWO, getCoreWOMaPage, getlistByProductId, getlistByFlowId, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
import { publicFormatter } from "@/utils/dict";
import { parseTime } from '@/utils/ruoyi'
import topTabVue from '../../order/base/orderManage/components/topTab.vue';
const tableBtn = [
{
@ -265,9 +272,9 @@ const tableProps = [
const tableProps1 = [
{
prop: 'material',
label: '物料名称',
filter: publicFormatter('material')
prop: 'materialName',
label: '物料名称'
// filter: publicFormatter('material')
},
{
prop: 'unit',
@ -285,7 +292,7 @@ const tableProps1 = [
];
export default {
components: { SmallTitle },
components: { SmallTitle, topTabVue },
data() {
return {
tableBtn,
@ -308,6 +315,7 @@ export default {
dataForm: {},
orderList: [],
materialList: [],
workorderId: '',
// orderArray: [],
visible: false,
isdetail: false,
@ -331,13 +339,15 @@ export default {
name: work.name
}
})
const contentRef = this.$refs.content
if (contentRef.scrollWidth > contentRef.clientWidth) {
this.showScroll = true
} else {
this.showScroll = false
}
console.log(contentRef.scrollWidth, contentRef.clientWidth)
this.workorderId = this.workOrderButton[0].id
console.log('wawa ew', this.workorderId, this.workOrderButton)
// const contentRef = this.$refs.content
// if (contentRef.scrollWidth > contentRef.clientWidth) {
// this.showScroll = true
// } else {
// this.showScroll = false
// }
// console.log(contentRef.scrollWidth, contentRef.clientWidth)
this.init(this.workOrderButton[0].id, true)
})
} else {
@ -345,6 +355,11 @@ export default {
}
},
methods: {
// tab
toggleName(val) {
this.workorderId = val
this.init(val, true)
},
scrolRight() {
// let contentRef = this.$refs.content
// console.log('', contentRef.scrollWidth, contentRef.clientWidth)
@ -442,17 +457,38 @@ export default {
// 使
console.log()
if (this.dataForm.id) {
getCoreWOMaPage({
workOrderId: this.dataForm.id,
pageNo: 1,
pageSize: 100
}).then((response) => {
this.materialList = response.data.records.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
if (this.dataForm.materialMethod === 1) {
//
getlistByProductId({
id: this.dataForm.planProductId
}).then((response) => {
this.materialList = response.data.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
});
// this.listQuery.total = response.data.length;
});
} else {
//
getlistByFlowId({
id: this.dataForm.processFlowId
}).then((response) => {
this.materialList = response.data.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
});
}
// getCoreWOMaPage({
// workOrderId: this.dataForm.id,
// pageNo: 1,
// pageSize: 100
// }).then((response) => {
// this.materialList = response.data.records.map((item) => {
// item.remaining = item?.num * this.dataForm.remainingQuantity || 0
// return item
// });
// // this.listQuery.total = response.data.length;
// });
}
//
// orderList({

View File

@ -43,7 +43,8 @@
<allocation
v-if="allocationVisible"
ref="allocation"
@refreshDataList="getDataList" />
@refreshDataList="searchStatus"
@destroy="allocationVisible = false" />
</div>
</template>
@ -353,6 +354,11 @@ export default {
this.getDataList()
},
methods: {
searchStatus() {
setTimeout(() => {
this.getDataList()
}, 20000)
},
getWorkOrder() {
getCoreWOList().then(res => {
this.formConfig[0].selectOptions = res.data.map(item => {
@ -444,7 +450,7 @@ export default {
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
this.searchStatus();
//
// if (param.status === 4) {
// this.allocationOrder(param);
@ -478,7 +484,7 @@ export default {
// id
this.$refs.allocation.init(val.id);
} else {
this.$refs.allocation.init();
this.$refs.allocation.init(val.id, true);
}
});
})

View File

@ -2,14 +2,15 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 09:41:39
* @LastEditTime: 2024-03-21 15:21:32
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="isdetail"
:wrapper-closable="true"
:before-close="beforeClose"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
@ -256,6 +257,17 @@ export default {
this.getDict()
},
methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
async getDict() {
//
// const res = await listData({

View File

@ -2,14 +2,15 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-27 19:50:36
* @LastEditTime: 2024-03-21 14:39:52
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="isdetail"
:wrapper-closable="true"
:before-close="beforeClose"
class="drawer"
size="70%">
<small-title slot="title" :no-padding="true">
@ -196,6 +197,17 @@ export default {
this.getDict()
},
methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
handleClick(raw) {
if (raw.type === 'delete') {
this.deleteDetail(raw.data);
@ -246,7 +258,7 @@ export default {
});
},
initData() {
// this.materialAttrList.splice(0);
this.tableData.splice(0);
this.listQuery.total = 0;
},
deleteDetail(raw) {
@ -284,18 +296,18 @@ export default {
});
},
//
addRow() {
const row = {
bomId: this.dataForm.id,
materialId: '',
num: 0,
materialCode: undefined,
unit: undefined,
remark: '',
isEdit: true
}
this.tableData.push(row)
},
// addRow() {
// const row = {
// bomId: this.dataForm.id,
// materialId: '',
// num: 0,
// materialCode: undefined,
// unit: undefined,
// remark: '',
// isEdit: true
// }
// this.tableData.push(row)
// },
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;

View File

@ -17,6 +17,7 @@
:table-props="tableProps"
:table-data="tableData"
@emitFun="handleEmitFun"
:max-height="tableH"
/>
</div>
</div>
@ -45,6 +46,7 @@ export default {
arr: [],
spanArr: [],
timeList: [],
tableH: this.tableHeight(240),
tableData: [],
tableProps: [],
spanInfo: {},
@ -54,6 +56,9 @@ export default {
},
computed: {},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(240)
})
this.getList();
},
methods: {
@ -148,6 +153,9 @@ export default {
lineData['spec'] = Array.from(new Set(specs)).join(',')
this.tableData.push(lineData)
})
this.tableData.forEach((item, index) => {
item._index = index + 1
})
console.log('打印', this.tableData)
// this.setRowSpan(sectionArr)
// console.log('', sectionArr)
@ -176,22 +184,26 @@ export default {
console.log('看看数据', res)
this.ResData = res.data
this.arr = [
{
prop: '_index',
label: '序号'
},
{
prop: 'proLineName',
label: '生产线',
fixed: 'left',
// fixed: 'left',
'show-overflow-tooltip': true
},
{
prop: 'workOrderName',
label: '当前工单',
fixed: 'left',
// fixed: 'left',
'show-overflow-tooltip': true
},
{
prop: 'spec',
label: '产品规格',
fixed: 'left',
// fixed: 'left',
'show-overflow-tooltip': true
}
]

View File

@ -79,10 +79,9 @@ const tableProps = [
align: 'right',
},
{
prop: 'enabledTime',
prop: 'time',
label: '生效时间',
filter: parseTime,
width: 150,
width: 235,
},
{
prop: 'remark',

View File

@ -104,24 +104,24 @@ export default {
{ name: '故障时长', value: 580 },
],
},
{
//
name: '',
type: 'pie',
center: ['50%', '48%'],
radius: ['60%', '75%'],
itemStyle: {
borderRadius: 10,
},
label: {
show: false,
},
data: [
//<=========
{ name: '总', value: 3000 },
{ name: '', value: 1400 },
],
},
// {
// //
// name: '',
// type: 'pie',
// center: ['50%', '48%'],
// radius: ['60%', '75%'],
// itemStyle: {
// borderRadius: 10,
// },
// label: {
// show: false,
// },
// data: [
// //<=========
// { name: '', value: 3000 },
// { name: '', value: 1400 },
// ],
// },
// {
// name: this.value.equipmentName || 'Default',
// type: 'pie',
@ -195,22 +195,22 @@ export default {
this.config.title.text = lineName;
this.config.title.subtext = equipmentName;
this.config.series[0].data = [
{ name: '工作时长', value: workTime },
{ name: '停机时长', value: stopTime },
{ name: '故障时长', value: downTime },
];
this.config.series[1].data = [
{ name: '速度开动率', value: peEfficiency },
{ name: '', value: 100 },
// { name: '', value: peEfficiency },
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
{ name: '有效时长', value: workTime },
{ name: '关机时长', value: stopTime },
{ name: '中断时长', value: downTime }
];
// this.config.series[1].data = [
// { name: '', value: peEfficiency },
// // { name: '', value: 100 },
// // { name: '', value: peEfficiency },
// // { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
// ];
//
this.textData = {
workTime: +workTime.toFixed(2),
stopTime: +stopTime.toFixed(2),
downTime: +downTime.toFixed(2),
peEfficiency: +peEfficiency.toFixed(2),
workTime: +workTime?.toFixed(2),
stopTime: +stopTime?.toFixed(2),
downTime: +downTime?.toFixed(2),
// peEfficiency: +peEfficiency?.toFixed(2),
};
},
},

View File

@ -26,7 +26,8 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun"></base-table>
@emitFun="handleEmitFun"
:max-height="tableH"></base-table>
</el-tab-pane>
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
<div
@ -57,6 +58,7 @@ export default {
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return {
dialogVisible: false,
tableH: this.tableHeight(260),
urls: {
page: '/analysis/equipment-analysis/quality',
},
@ -155,12 +157,12 @@ export default {
},
{
// width: 160,
prop: 'inQuantity',
prop: 'totalQuantity',
label: '加工数量',
},
{
// width: 160,
prop: 'outQuantity',
prop: 'okQuantity',
label: '合格数量',
},
{
@ -252,6 +254,9 @@ export default {
this.fillProductOptions();
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.$refs['search-bar'].headBtnClick('search');
},
methods: {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-18 15:47:20
* @LastEditTime: 2024-03-20 17:58:29
* @Description:
-->
<template>
@ -36,7 +36,8 @@
<el-select
v-model="dataForm.departmentId"
:disabled="isdetail"
:placeholder="`请选择部门`">
:placeholder="`请选择部门`"
style="width: 100%">
<el-option
v-for="opt in departmentOptions"
:key="opt.id"
@ -90,33 +91,32 @@
type="datetime"
:disabled="isdetail"
placeholder="请选择巡检时间"
value-format="timestamp"></el-date-picker>
value-format="timestamp"
style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="attr-list" v-if="idAttrShow">
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
<div v-if="idAttrShow">
<small-title>
巡检内容
</small-title>
<div v-if="!isdetail">
<div>
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<!-- <template>
<span style="display: inline-block;" @click="addNew()">
<div v-if="!isdetail" style="display: flex">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- <div class="action_btn"> -->
<el-button type="text" class="action_btn" @click="addNew()">
<span style="display: inline-block;">
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
<span class="add">添加</span>
<span class="add">添加内容</span>
</span>
</template> -->
</el-button>
<!-- </div> -->
</div>
<base-table
:table-props="tableProps"
@ -229,14 +229,14 @@ export default {
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
}
// {
// type: 'button',
// btnName: '',
// name: 'add',
// color: 'success',
// plain: true
// }
],
listQuery: {
pageSize: 10,
@ -519,10 +519,6 @@ export default {
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
@ -551,11 +547,6 @@ export default {
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
@ -563,7 +554,7 @@ export default {
}
.action_btn {
float: right;
margin: -32px 15px 0;
/* margin: 0 15px 0; */
font-size: 14px;
}
.add {

View File

@ -120,7 +120,7 @@ export default {
tableProps: [
{ prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' },
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'planCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'groupClass', label: '班次' },
// { prop: 'opt', label: '', name: '', subcomponent: btn },
{ prop: 'remark', label: '备注' }

View File

@ -66,7 +66,7 @@ import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/bas
import AddContent from './addContent.vue';
import { parseTime } from '../../../../core/mixins/code-filter';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = {
name: 'tableBtn',
@ -129,20 +129,22 @@ export default {
// width: 180,
// filter: timeFilter,
// },
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
{ prop: 'planName', label: '保养计划名称' },
{ prop: 'departmentName', label: '部门' },
{ prop: 'lineName', label: '产线名' },
{ prop: 'planStartTime', label: '计划开始时间', filter: timeFilter },
{ prop: 'planEndTime', label: '计划结束时间', filter: timeFilter },
{ prop: 'startTime', label: '实际开始时间', filter: timeFilter },
{ prop: 'endTime', label: '实际结束时间', filter: timeFilter },
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true },
{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true },
{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true },
{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true },
{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true },
{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true },
// { prop: 'equipmentName', label: '' },
// { prop: 'maintainWorker', label: '' },
{
prop: 'relatePlan',
label: '保养计划类型',
filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''),
width: 170,
showOverflowtooltip: true
},
{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn }
// { prop: 'maintainDuration', label: '(h)' },

View File

@ -393,7 +393,7 @@
:file="file"
:key="file.fileUrl"
:disabled="disabled"
@delete="!disabled && handleDeleteFile(file, col.prop)" />
@delete="!disabled && handleDeleteFile(file)" />
</div>
</el-form-item>
</el-col>
@ -678,10 +678,12 @@ export default {
file.type === 'image/jpeg' ||
file.type === 'image/png' ||
file.type === 'image/jpg';
if (!isJPG) {
this.$modal.msgError('只能上传jpg/png文件!');
}
return isJPG;
};
return checkFileSize();
// return checkFileSize() && checkFileType();
return checkFileSize() && checkFileType();
},
// handlers
@ -737,7 +739,6 @@ export default {
fileType: prop == 'files' ? 2 : 1,
});
this.$modal.msgSuccess('上传成功');
console.log('为我', this.form.files)
this.$emit('update', this.form);
},

View File

@ -92,23 +92,34 @@ export default {
});
if (code == 0) {
this.listLine = data;
return;
} else {
this.listLine.splice(0);
}
this.listLine.splice(0);
},
async getEquipmentByLineId(id) {
const { data, code } = await this.$axios({
url: '/base/core-equipment/listByLine',
params: {
id,
},
//
const res = await this.$axios({
url: '/base/core-equipment/listAll',
});
if (code == 0) {
this.listEq = data;
if (res.code == 0) {
this.listEq = res.data;
return;
}
this.listEq.splice(0);
},
async getEquipmentByLineId(id) {
if (id) {
const { data, code } = await this.$axios({
url: '/base/core-equipment/listByLine',
params: {
id,
},
});
if (code == 0) {
this.listEq = data;
return;
}
this.listEq.splice(0);
}
},
handleSearch() {
this.$emit('action', {
action: 'search',

View File

@ -2,11 +2,11 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zhp
* @LastEditTime: 2024-03-20 09:17:11
* @LastEditTime: 2024-03-22 09:01:30
* @Description:
-->
<template>
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>

View File

@ -109,15 +109,15 @@ export default {
param: 'workOrderId',
filterable: true
},
{
type: 'select',
label: '班组',
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'teamId',
filterable: true
},
// {
// type: 'select',
// label: '',
// selectOptions: [],
// labelField: 'name',
// valueField: 'id',
// param: 'teamId',
// filterable: true
// },
{
type: 'button',
btnName: '查询',
@ -216,7 +216,7 @@ export default {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined;
this.listQuery.teamId = val.teamId ? val.teamId : undefined;
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
this.getDataList();
break;
case 'reset':

View File

@ -244,7 +244,7 @@ export default {
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timerange',
param: 'recordTime',
},
// {
// parent: 'dateFilterType',
@ -270,6 +270,7 @@ export default {
btnName: '导出',
name: 'export',
color: 'warning',
},
// {
// type: 'separate',
@ -381,7 +382,7 @@ export default {
},
/** 查询列表 */
async getList() {
this.loading = true;
this.loading = true
const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/efficiency',
method: 'get',
@ -402,14 +403,14 @@ export default {
if (btnName == 'search') {
this.queryParams.workOrderId = payload.workOrderId || null;
// this.queryParams.lineId = payload.lineId || null;
if (0 == payload.dateFilterType) {
this.queryParams.recordTime = payload.timerange;
} else if (1 == payload.dateFilterType) {
// if (0 == payload.dateFilterType) {
this.queryParams.recordTime = payload.recordTime;
// } else if (1 == payload.dateFilterType) {
this.queryParams.recordTime = [
`${payload.timeday} 00:00:00`,
`${payload.timeday} 23:59:59`,
payload.recordTime[0],
payload.recordTime[1],
];
}
// }
} else {
this.handleExport()
this.queryParams.recordTime = null;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-24 15:15:24
* @LastEditTime: 2024-03-18 16:00:41
* @LastEditTime: 2024-03-22 10:14:23
* @LastEditors: zhp
* @Description:
-->
@ -82,8 +82,9 @@ export default {
},
//
multipliedByHundred(str) {
console.log(str);
// console.log(str)
if (str != 0) {
if ( str != 0) {
let floatVal = parseFloat(str);
if (isNaN(floatVal)) {
return 0;
@ -116,10 +117,10 @@ export default {
if (ele.det === false) {
res.data[index].lineName = '合计'
this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
}
})
res.data.forEach(item => {
@ -127,10 +128,16 @@ export default {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
console.log(item.originalGlassStatisticsTrend);
// if (!item.dailyOutputTrend) {
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
// } else {
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
}
})
})
@ -175,11 +182,11 @@ export default {
// console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0))
this.startTimeStamp = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.endTimeStamp = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
this.endTimeStamp = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.startTimeStamp = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
// console.log(this.listQuery.reportTime);
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
console.log(this.listQuery.reportTime);
} else {
this.listQuery.reportTime = []

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2023-12-13 14:10:04
* @LastEditTime: 2024-03-18 09:57:30
* @LastEditTime: 2024-03-22 09:45:23
* @LastEditors: zhp
* @Description:
-->
@ -198,6 +198,8 @@ const cols = [
this.cols[0].children[2].children[1].label = text2
this.cols[0].children[3].children[0].label = text1
this.cols[0].children[3].children[1].label = text2
this.cols[0].children[4].children[0].label = text1
this.cols[0].children[4].children[1].label = text2
this.cols[0].children[2].label = text3
}
}

View File

@ -91,6 +91,8 @@ export default {
strVal += '0';
}
return parseFloat(strVal);
} else {
return null
}
},
@ -109,10 +111,10 @@ export default {
if (ele.det === false) {
res.data[index].lineName = '合计'
this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
}
})
res.data.forEach(item => {
@ -120,15 +122,36 @@ export default {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
console.log(item.originalGlassStatisticsTrend);
// if (!item.dailyOutputTrend) {
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
// } else {
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
}
})
})
this.tableData = res.data
this.listQuery.total = response.data.length;
// this.tableData = response.data.filter(item => {
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false;
});
},

View File

@ -200,10 +200,10 @@ export default {
if (ele.det === false) {
res.data[index].lineName = '合计'
this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
}
})
res.data.forEach(item => {
@ -211,15 +211,36 @@ export default {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
console.log(item.originalGlassStatisticsTrend);
// if (!item.dailyOutputTrend) {
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
// } else {
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
}
})
})
this.tableData = res.data
this.listQuery.total = response.data.length;
// this.tableData = response.data.filter(item => {
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false;
});
},

View File

@ -111,10 +111,10 @@ export default {
if (ele.det === false) {
res.data[index].lineName = '合计'
this.remark = res.data[index].remark
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend && res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : null
res.data[index].originalGlassStatisticsTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : null
res.data[index].actualProductTrend = res.data[index].dailyOutputTrend && res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : null
res.data[index].originalGlassPassTrend = res.data[index].dailyOutputTrend && res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : null
}
})
res.data.forEach(item => {
@ -122,15 +122,36 @@ export default {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
console.log(item.originalGlassStatisticsTrend);
// if (!item.dailyOutputTrend) {
// item.dailyOutputTrend = this.multipliedByHundred(item.dailyOutputTrend) + '%'
// } else {
// item.dailyOutputTrend = null
// }
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
}
})
})
this.tableData = res.data
this.listQuery.total = response.data.length;
// this.tableData = response.data.filter(item => {
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// item.lineName = it.name
// }
// })
// if (item.det === false) {
// this.all = {
// id: item.id,
// remark: item.remark
// }
// }
// return item.det === true
// });
this.listQuery.total = res.data.length;
this.dataListLoading = false;
});
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-18 15:24:10
* @LastEditTime: 2024-03-22 09:36:12
* @LastEditors: zhp
* @Description:
-->
@ -49,7 +49,7 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
undefined}} </span>
null}} </span>
</template>
</el-table-column>
</el-table-column>
@ -73,7 +73,7 @@
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
</el-input>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
'%' : undefined }} </span>
'%' : null }} </span>
</template>
</el-table-column>
</el-table-column>
@ -82,8 +82,8 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -91,8 +91,8 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -101,8 +101,8 @@
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
</el-input>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -113,8 +113,8 @@
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -123,8 +123,8 @@
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -133,8 +133,8 @@
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
100).toFixed(2)) +
'%' : undefined }}
100).toFixed(2)) +
'%' : null }}
</span>
</template>
</el-table-column>
@ -146,7 +146,7 @@
<span v-else>{{ remark ? remark : '请输入备注' }} </span>
</div> -->
</el-table>
<div style="height: 50px;" class="remark" >
<div style="height: 50px;" class="remark">
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
</el-input>
</div>
@ -480,8 +480,8 @@ export default {
// console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0))
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1]
// console.log(this.listQuery.reportTime);
} else {
@ -510,7 +510,7 @@ export default {
// Blob
new Blob([wbout], { type: "application/octet-stream" }),
//
"许昌安彩成品生产汇总.xlsx"
"许昌安彩成品生产汇总.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-18 15:27:53
* @LastEditTime: 2024-03-22 09:56:14
* @LastEditors: zhp
* @Description:
-->
@ -78,7 +78,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="今日" align="center">
<el-table-column prop="missCheckNow" label="本月" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -87,7 +87,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="missCheckHis" label="昨日" align="center">
<el-table-column prop="missCheckHis" label="上月" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -108,7 +108,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="今日" align="center">
<el-table-column prop="goodProductPassNow" label="本月" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input>
@ -118,7 +118,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
<el-table-column prop="goodProductPassHis" label="上月" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-18 15:25:48
* @LastEditTime: 2024-03-22 09:47:20
* @LastEditors: zhp
* @Description:
-->
@ -81,7 +81,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="今日" align="center">
<el-table-column prop="missCheckNow" label="本周" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -90,7 +90,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="missCheckHis" label="昨日" align="center">
<el-table-column prop="missCheckHis" label="上周" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -111,7 +111,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="今日" align="center">
<el-table-column prop="goodProductPassNow" label="本周" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input>
@ -121,7 +121,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
<el-table-column prop="goodProductPassHis" label="上周" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-18 15:25:54
* @LastEditTime: 2024-03-22 09:47:09
* @LastEditors: zhp
* @Description:
-->
@ -83,7 +83,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="原片漏检率" align="center">
<el-table-column prop="missCheckNow" label="今" align="center">
<el-table-column prop="missCheckNow" label="今" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
@ -92,7 +92,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="missCheckHis" label="昨日" align="center">
<el-table-column prop="missCheckHis" label="去年" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
@ -113,7 +113,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="综合良品率" align="center">
<el-table-column prop="goodProductPassNow" label="今" align="center">
<el-table-column prop="goodProductPassNow" label="今" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
</el-input>
@ -123,7 +123,7 @@
</span>
</template>
</el-table-column>
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
<el-table-column prop="goodProductPassHis" label="去年" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
</el-input>