master
吴普建 11 months ago
parent 01a8842e1e
commit d493601e04

@ -3,3 +3,7 @@ import { request } from '~/src/service/request';
export const getOutputLog = (params: any) => {
return request.get(`/mes/mesOutputLog/list`, { params });
};
export const getOutputLog2 = (params: any) => {
return request.get(`/mes/mesOutputLog/list2`, { params });
};

@ -8,7 +8,7 @@ import * as echarts from 'echarts';
import { defineComponent } from 'vue';
import resize from './dashboard/mixins/resize';
import {option} from './options/mid_bot_options';
import { getOutputLog } from '~/src/service/api/produre/workRecords/index';
import { getOutputLog2 } from '~/src/service/api/produre/workRecords/index';
export default defineComponent({
mixins: [resize],
props: {
@ -84,9 +84,9 @@ export default defineComponent({
async getTypeData () {
let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"]
let res = await getOutputLog({
let res = await getOutputLog2({
pageNum : 1,
pageSize : 10
pageSize : 20
})
this.config.data = res && res.rows && res.rows.length && res.rows.map(item => {
return [item.taskType == '0'?'金属':'板材', item.workstationName == '' || !item.workstationName ? workstationNames[Math.floor(Math.random(0, 2))] : item.workstationName, item.orderSn, item.outputWeight, item.createTime, item.createBy]

@ -317,7 +317,7 @@
<div class="image image1"></div>
<div class="text">
<div class="weight">
{{ wmsData.finishedProductWeight }}
{{ Math.floor(wmsData.finishedProductWeight / 10) }}
<span style="font-size: 18px"></span>
</div>
<div class="product">成品总箱数</div>
@ -330,7 +330,7 @@
<div class="text">
<div class="weight">
{{ wmsData.finishedProductNum }}
{{ wmsData.finishedProductNum / 10 }}
<span style="font-size: 18px"></span>
</div>
<div class="product">成品</div>
@ -602,19 +602,19 @@ export default defineComponent({
mounted() {
this.detectionDayNum = localStorage.getItem('zjCount');
if(this.detectionDayNum === null){
this.detectionDayNum = 28;
localStorage.setItem('zjCount', this.detectionDayNum);
}
setInterval(() => {
this.detectionDayNum = Number(this.detectionDayNum) + 3;
if(this.detectionDayNum > 90){
this.detectionDayNum = 28;
}
localStorage.setItem('zjCount', this.detectionDayNum);
}, 1000000)
// if(this.detectionDayNum === null){
// this.detectionDayNum = 28;
// localStorage.setItem('zjCount', this.detectionDayNum);
// }
// setInterval(() => {
// this.detectionDayNum = Number(this.detectionDayNum) + 3;
// if(this.detectionDayNum > 90){
// this.detectionDayNum = 28;
// }
// localStorage.setItem('zjCount', this.detectionDayNum);
// }, 1000000)
const app = useAppStore();
app.setContentFull(true);
app.setContentFull(false);
this.initData();
this.handleScreenAuto();
// ---
@ -664,7 +664,7 @@ export default defineComponent({
if (res.code === 200) {
for (const key in this.wmsData) {
if (res.data[key] && key !== 'finishedProductNum') {
res.data[key] = Number(res.data[key]).toFixed(2);
res.data[key] = Math.floor(Number(res.data[key]));
}
this.wmsData[key] = res.data[key];
}
@ -749,7 +749,7 @@ export default defineComponent({
});
</script>
<style>
<style scoped>
.screen-wrapper {
width: 100vw;
height: 100vh;

@ -250,18 +250,18 @@ const columns: Ref<DataTableColumns<drawingWorkOrder.tabelList>> = ref([
align: 'center',
key: 'weight'
},
{
title: '完成度',
width: 200,
align: 'center',
key: 'degreeOfCompletion',
render: row => {
const percentage = row.degreeOfCompletion
? `${(row.degreeOfCompletion * 100 > 100 ? 100 : row.degreeOfCompletion * 100).toFixed(0)}`
: 0;
return <n-progress type="line" percentage={percentage} processing indicator-placement="inside" />;
}
},
// {
// title: '',
// width: 200,
// align: 'center',
// key: 'degreeOfCompletion',
// render: row => {
// const percentage = row.degreeOfCompletion
// ? `${(row.degreeOfCompletion * 100 > 100 ? 100 : row.degreeOfCompletion * 100).toFixed(0)}`
// : 0;
// return <n-progress type="line" percentage={percentage} processing indicator-placement="inside" />;
// }
// },
{
title: '已完成数量',
width: 100,

@ -572,18 +572,18 @@ const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
// }
// },
{
title: '完成度',
width: 200,
align: 'center',
key: 'degreeOfCompletion',
render: row => {
const percentage = row.degreeOfCompletion
? `${(row.degreeOfCompletion * 100 > 100 ? 100 : row.degreeOfCompletion * 100).toFixed(0)}`
: 0;
return <n-progress type="line" percentage={percentage} processing indicator-placement="inside" />;
}
},
// {
// title: '',
// width: 200,
// align: 'center',
// key: 'degreeOfCompletion',
// render: row => {
// const percentage = row.degreeOfCompletion
// ? `${(row.degreeOfCompletion * 100 > 100 ? 100 : row.degreeOfCompletion * 100).toFixed(0)}`
// : 0;
// return <n-progress type="line" percentage={percentage} processing indicator-placement="inside" />;
// }
// },
{
title: '已完成数量',
width: 100,

@ -301,18 +301,18 @@ const columns: DataTableColumns<ApiMaterialStockManagement.materialStock> = [
width: 120
},
{
title: '库存数量',
key: 'afterWeight',
align: 'center',
width: 120,
render(row) {
if (row.afterWeight > 0) {
return <span style="color: green;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
}
return <span style="color: red;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
}
},
// {
// title: '',
// key: 'afterWeight',
// align: 'center',
// width: 120,
// render(row) {
// if (row.afterWeight > 0) {
// return <span style="color: green;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
// }
// return <span style="color: red;font-weight: bold;font-size: 16px;">{row.afterWeight}</span>;
// }
// },
{
title: '库存数量',
key: 'afterQuantity',

Loading…
Cancel
Save