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

@ -3,3 +3,7 @@ import { request } from '~/src/service/request';
export const getOutputLog = (params: any) => { export const getOutputLog = (params: any) => {
return request.get(`/mes/mesOutputLog/list`, { params }); 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 { defineComponent } from 'vue';
import resize from './dashboard/mixins/resize'; import resize from './dashboard/mixins/resize';
import {option} from './options/mid_bot_options'; 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({ export default defineComponent({
mixins: [resize], mixins: [resize],
props: { props: {
@ -84,9 +84,9 @@ export default defineComponent({
async getTypeData () { async getTypeData () {
let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"] let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"]
let res = await getOutputLog({ let res = await getOutputLog2({
pageNum : 1, pageNum : 1,
pageSize : 10 pageSize : 20
}) })
this.config.data = res && res.rows && res.rows.length && res.rows.map(item => { 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] 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="image image1"></div>
<div class="text"> <div class="text">
<div class="weight"> <div class="weight">
{{ wmsData.finishedProductWeight }} {{ Math.floor(wmsData.finishedProductWeight / 10) }}
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
<div class="product">成品总箱数</div> <div class="product">成品总箱数</div>
@ -330,7 +330,7 @@
<div class="text"> <div class="text">
<div class="weight"> <div class="weight">
{{ wmsData.finishedProductNum }} {{ wmsData.finishedProductNum / 10 }}
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
<div class="product">成品</div> <div class="product">成品</div>
@ -602,19 +602,19 @@ export default defineComponent({
mounted() { mounted() {
this.detectionDayNum = localStorage.getItem('zjCount'); this.detectionDayNum = localStorage.getItem('zjCount');
if(this.detectionDayNum === null){ // if(this.detectionDayNum === null){
this.detectionDayNum = 28; // this.detectionDayNum = 28;
localStorage.setItem('zjCount', this.detectionDayNum); // localStorage.setItem('zjCount', this.detectionDayNum);
} // }
setInterval(() => { // setInterval(() => {
this.detectionDayNum = Number(this.detectionDayNum) + 3; // this.detectionDayNum = Number(this.detectionDayNum) + 3;
if(this.detectionDayNum > 90){ // if(this.detectionDayNum > 90){
this.detectionDayNum = 28; // this.detectionDayNum = 28;
} // }
localStorage.setItem('zjCount', this.detectionDayNum); // localStorage.setItem('zjCount', this.detectionDayNum);
}, 1000000) // }, 1000000)
const app = useAppStore(); const app = useAppStore();
app.setContentFull(true); app.setContentFull(false);
this.initData(); this.initData();
this.handleScreenAuto(); this.handleScreenAuto();
// --- // ---
@ -664,7 +664,7 @@ export default defineComponent({
if (res.code === 200) { if (res.code === 200) {
for (const key in this.wmsData) { for (const key in this.wmsData) {
if (res.data[key] && key !== 'finishedProductNum') { 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]; this.wmsData[key] = res.data[key];
} }
@ -749,7 +749,7 @@ export default defineComponent({
}); });
</script> </script>
<style> <style scoped>
.screen-wrapper { .screen-wrapper {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;

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

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

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

Loading…
Cancel
Save