排产管理接口联调

dev-scheduling
zhangdi 2 months ago
parent fda4c7eb28
commit b3365f20bb
  1. 48
      src/api/productionSchedulingPlan/scheduling.js
  2. 416
      src/views/processManagement/components/indateDailog.vue
  3. 2
      src/views/processManagement/components/processMainte/dsPartIndex.vue
  4. 1
      src/views/processManagement/components/processMainte/partDetails.vue
  5. 45
      src/views/processManagement/components/processMainte/processPlanning.vue
  6. 3
      src/views/processManagement/taskProcessing.vue
  7. 6
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue
  8. 131
      src/views/productionSchedulingPlan/statisticalAnalysis/production/executionProcess.vue
  9. 119
      src/views/productionSchedulingPlan/statisticalAnalysis/production/executionWorkorder.vue
  10. 128
      src/views/productionSchedulingPlan/statisticalAnalysis/production/processDeatils.vue
  11. 123
      src/views/productionSchedulingPlan/statisticalAnalysis/production/workorderDetails.vue
  12. 14
      src/views/productionSchedulingPlan/statisticalAnalysis/productionAnalysis.vue
  13. 71
      src/views/productionSchedulingPlan/statisticalAnalysis/qualificationAnalysis.vue

@ -72,3 +72,51 @@ export const getQualificationExecuteAnalysis = (current, size, params) => {
}, },
}); });
}; };
// 生产执行(作业中心)workOrder/selectCenterExecuteList
export const getCenterExecuteList = params => {
return request({
url: '/blade-scheduling/workOrder/selectCenterExecuteList',
method: 'get',
params: params
});
};
// 订单执行明细/workOrder/selectOrderExecuteDetailPage
export const getOrderExecuteDetailPage = (current, size, params) => {
return request({
url: '/blade-scheduling/workOrder/selectOrderExecuteDetailPage',
method: 'get',
params: {
...params,
current,
size,
},
});
};
//执行分析 工序
export const getProcessExecutePage = (current, size, params) => {
return request({
url: '/blade-scheduling/workOrder/selectProcessExecutePage',
method: 'get',
params: {
...params,
current,
size,
},
});
};
// 执行分析 工序执行明细 workOrder/selectProcessExecuteDetailPage
export const getProcessExecuteDetailPage = (current, size, params) => {
return request({
url: '/blade-scheduling/workOrder/selectProcessExecuteDetailPage',
method: 'get',
params: {
...params,
current,
size,
},
});
};

@ -1,214 +1,228 @@
<template> <template>
<el-dialog v-model="setCrewShow" :before-close="cancel" :title="title" width="1040px"> <el-dialog v-model="setCrewShow" :before-close="setIndateCancel" :title="title" width="1040px">
<avue-form :option="optionForm" ref="ruleForm"></avue-form> <avue-form :option="optionForm" ref="ruleForm"></avue-form>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" <avue-crud
@search-change="searchChange" @search-reset="searchReset" :option="option"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" :table-loading="loading"
@refresh-change="refreshChange" @on-load="onLoad"> :data="data"
v-model="form"
v-model:page="page"
ref="crud"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
</avue-crud>
</avue-crud> <template #footer>
<span class="dialog-footer">
<template #footer> <el-button @click="setIndateCancel"> </el-button>
<span class="dialog-footer"> <el-button type="primary" @click="submit"> </el-button>
<el-button @click="setIndateCancel"> </el-button> </span>
<el-button type="primary" @click="submit"> </el-button> </template>
</span> </el-dialog>
</template>
</el-dialog>
</template> </template>
<script> <script>
import { periodOfValidity } from "@/api/processManagement/procepssPlanning"; import { periodOfValidity } from '@/api/processManagement/procepssPlanning';
export default { export default {
name: 'SetPersonnel', name: 'SetPersonnel',
props: { props: {
setCrewOpen: { setCrewOpen: {
type: Boolean, type: Boolean,
default: false default: false,
},
id: {
type: Number,
default: null
},
type: {
type: String,
default: ''
},
title: {
type: String,
default: '分派'
},
expireData:{
type:Array,
default:[]
}
}, },
data() { id: {
return { type: Number,
url: '', default: null,
setCrewShow: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
optionForm: {
submitBtn: false,
emptyBtn: false,
menuPosition: 'right',
menuSpan: 16,
column: [
{
label: '到期日期',
prop: "nextDue",
type: "date",
span: 8,
format: "YYYY-MM-DD",
valueFormat: "YYYY-MM-DD",
shortcuts: [
{
text: '今天',
value: new Date(),
},
{
text: '昨天',
value: () => {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
return date;
},
},
{
text: '一周前',
value: () => {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
return date;
},
},
],
rules: [
{
required: true,
message: '请选择',
trigger: 'blur'
}
]
},
]
},
option: {
columnSort: true,
tip: false,
// height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: '60%',
border: true,
selection: false,
viewBtn: true,
menuWidth: 240,
dialogClickModal: false,
addBtn: false,
excelBtn: false,
viewBtn: false,
columnBtn: false,
editBtnText: '编辑',
refreshBtn: false,
searchShowBtn: false,
gridBtn: false,
searchIndex: 3,
searchIcon: true,
header: false,
menu: false,
searchLabelPosition:'left',
searchGutter:24,
searchSpan:6,
menuAlign: 'left',
gridBtn:false,
searchMenuPosition:'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
align: 'center',
column: [
{
label: '零件号',
prop: 'partCode',
search: false,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
},
{
label: '零件名称',
prop: 'partName',
sortable: true,
search: false,
headerAlign: 'center',
align: 'left',
},
{
label: '零件类型',
prop: 'sinTerType',
sortable: true,
search: false,
headerAlign: 'center',
align: 'center',
},
{
label: '工艺路线',
prop: 'craftWay',
sortable: true,
search: false,
headerAlign: 'center',
align: 'center',
},
],
},
data: [],
};
}, },
mounted() { type: {
this.setCrewShow = this.setCrewOpen type: String,
this.data = this.expireData default: '',
}, },
methods: { title: {
type: String,
submit() { default: '分派',
this.$refs.ruleForm.validate((valid) => { },
if (valid) { expireData: {
let arr=[] type: Array,
this.data.forEach((item,index) => { default: [],
arr.push(item.id) },
}); },
let query ={ data() {
nextDue:this.$refs.ruleForm.form.nextDue, return {
ids:arr.join(',') url: '',
} setCrewShow: false,
periodOfValidity(query).then(res=>{ page: {
this.setIndateCancel() pageSize: 10,
}) currentPage: 1,
console.log(9999,query) total: 0,
},
} optionForm: {
}) submitBtn: false,
}, emptyBtn: false,
menuPosition: 'right',
setIndateCancel(refresh) { menuSpan: 16,
this.setCrewShow = false column: [
this.$emit('setIndateCancel', typeof refresh === 'boolean' && refresh); {
label: '到期日期',
prop: 'nextDue',
type: 'date',
span: 8,
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
shortcuts: [
{
text: '今天',
value: new Date(),
},
{
text: '昨天',
value: () => {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
return date;
},
},
{
text: '一周前',
value: () => {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
return date;
},
},
],
rules: [
{
required: true,
message: '请选择',
trigger: 'blur',
},
],
},
],
},
option: {
columnSort: true,
tip: false,
// height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: '60%',
border: true,
selection: false,
viewBtn: true,
menuWidth: 240,
dialogClickModal: false,
addBtn: false,
excelBtn: false,
viewBtn: false,
columnBtn: false,
editBtnText: '编辑',
refreshBtn: false,
searchShowBtn: false,
gridBtn: false,
searchIndex: 3,
searchIcon: true,
header: false,
menu: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
align: 'center',
column: [
{
label: '零件号',
prop: 'partCode',
search: false,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
},
{
label: '零件名称',
prop: 'partName',
sortable: true,
search: false,
headerAlign: 'center',
align: 'left',
},
{
label: '零件类型',
prop: 'sinTerType',
sortable: true,
search: false,
headerAlign: 'center',
align: 'center',
type: 'select',
dicData: [
{
label: '烧结零件',
value: '1',
},
{
label: '热表零件',
value: '2',
},
],
},
{
label: '工艺路线',
prop: 'craftWay',
sortable: true,
search: false,
headerAlign: 'center',
align: 'center',
},
],
},
data: [],
};
},
mounted() {
this.setCrewShow = this.setCrewOpen;
this.data = this.expireData;
},
methods: {
submit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let arr = [];
this.data.forEach((item, index) => {
arr.push(item.id);
});
let query = {
nextDue: this.$refs.ruleForm.form.nextDue,
ids: arr.join(','),
};
periodOfValidity(query).then(res => {
this.setIndateCancel();
});
console.log(9999, query);
} }
} });
},
setIndateCancel(refresh) {
this.setCrewShow = false;
this.$emit('setIndateCancel', typeof refresh === 'boolean' && refresh);
},
},
}; };
</script> </script>

@ -14,7 +14,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="content-right"> <div class="content-right">
<p>工艺版本{{partVersion}}</p> <p>工艺版本{{partVersion}}5555</p>
</div> </div>
</div> </div>

@ -11,7 +11,6 @@
工艺版本<el-select 工艺版本<el-select
v-model="version" v-model="version"
placeholder="请输入" placeholder="请输入"
clearable
filterable filterable
@change="versionChange()" @change="versionChange()"
> >

@ -22,8 +22,10 @@
</div> </div>
<!-- style="width: 240px" --> <!-- style="width: 240px" -->
<el-tree <el-tree
ref="tree"
:data="data" :data="data"
:props="defaultProps" :props="defaultProps"
node-key="id"
@node-click="handleNodeClick" @node-click="handleNodeClick"
@node-contextmenu="handleNodeRightClick" @node-contextmenu="handleNodeRightClick"
:default-expand-all="true" :default-expand-all="true"
@ -836,6 +838,9 @@ export default {
}).then(res => { }).then(res => {
this.data = this.transformCraftTree(res.data.data); this.data = this.transformCraftTree(res.data.data);
this.partInfoData = res.data.data.partInfo; this.partInfoData = res.data.data.partInfo;
this.$nextTick(() => {
this.autoSelectFirstProcess();
});
if (this.partInfoData.partName == '石墨模') { if (this.partInfoData.partName == '石墨模') {
let graphite = this.modelOption.find(item => item.name == '石墨模'); let graphite = this.modelOption.find(item => item.name == '石墨模');
this.modelLevel = graphite.id; this.modelLevel = graphite.id;
@ -843,6 +848,21 @@ export default {
} }
}); });
}, },
autoSelectFirstProcess() {
if (!this.data?.[0]?.children?.length) return;
//
const firstCraft = this.data[0].children[0];
//
this.handleNodeClick(firstCraft, {
level: 2,
parent: {
data: this.data[0],
isRoot: false,
},
});
},
// //
transformCraftTree(responseData) { transformCraftTree(responseData) {
const { partInfo, craftList } = responseData; const { partInfo, craftList } = responseData;
@ -861,29 +881,22 @@ export default {
return { return {
...craftInfo, ...craftInfo,
id: craftInfo.id || `craft_${craftInfo.craftNo}`, // 👈 id
label: craftLabel, label: craftLabel,
processList: processList.map(process => { processList: processList.map(process => process.processInfo),
return process.processInfo; rawData: craftInfo,
}),
rawData: craftInfo, //
children: processList.map(process => { children: processList.map(process => {
const { processInfo, projectList, measuringToolList, moldToolList } = process; const { processInfo, projectList, measuringToolList, moldToolList } = process;
//
const processLabel = processInfo.processName;
return { return {
...processInfo, ...processInfo,
label: processLabel, id: processInfo.id || `process_${processInfo.processNo}`, // 👈 id
rawData: { label: processInfo.processName,
processInfo, rawData: { processInfo, projectList, measuringToolList, moldToolList },
projectList,
measuringToolList,
moldToolList,
}, //
children: projectList.map(project => ({ children: projectList.map(project => ({
label: project.projectName, // label: project.projectName,
rawData: project, // rawData: project,
disabled: true, disabled: true,
id: project.id || `project_${project.projectCode}`, // 👈 id
})), })),
}; };
}), }),

@ -48,7 +48,8 @@
v-if="scope.row.taskStatus == 2" v-if="scope.row.taskStatus == 2"
>完成</el-button >完成</el-button
> >
<el-button type="primary" link @click="setBathCrew(scope.row)" v-if="!scope.row.completed" <el-button type="primary" link @click="setBathCrew(scope.row)" v-if="(scope.row.taskStatus == 1)&&
(!scope.row.completed )"
>转派</el-button >转派</el-button
> >
</template> </template>

@ -515,7 +515,7 @@ export default {
currentViewEndTime: null, // currentViewEndTime: null, //
legendStatus: { legendStatus: {
completed: false, completed: true,
processing: true, processing: true,
pending: true, pending: true,
}, },
@ -951,7 +951,7 @@ export default {
} }
// //
if (type === 'reset') { if (type === 'reset') {
this.legendStatus.completed = false; this.legendStatus.completed = true;
this.legendStatus.processing = true; this.legendStatus.processing = true;
this.legendStatus.pending = true; this.legendStatus.pending = true;
this.handleLegendChange('reset'); this.handleLegendChange('reset');
@ -1305,7 +1305,7 @@ export default {
batchNo: '', // batchNo: '', //
planStatusList: ['1', '2', '3'], planStatusList: ['1', '2', '3'],
}; };
this.legendStatus.completed = false; this.legendStatus.completed = true;
this.legendStatus.processing = true; this.legendStatus.processing = true;
this.legendStatus.pending = true; this.legendStatus.pending = true;

@ -15,41 +15,59 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> </template> <template #menu="{ row }"> </template>
<template #tiqiankaigong="scope"> <template #earlyStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'提前开工')">{{ scope.row.tiqiankaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '提前开工')"
>{{ scope.row.earlyStartCount }}{{
scope.row.earlyStartCountRate == '0' ? '0%' : scope.row.earlyStartCountRate
}}</el-button
>
</template> </template>
<template #zhunshikaigong="scope"> <template #onTimeStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'准时开工')">{{ scope.row.zhunshikaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '准时开工')"
>{{ scope.row.onTimeStartCount }}{{
scope.row.onTimeStartCountRate == '0' ? '0%' : scope.row.onTimeStartCountRate
}}</el-button
>
</template> </template>
<template #yanchikaigong="scope"> <template #delayStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'延迟开工')">{{ scope.row.yanchikaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '延迟开工')"
>{{ scope.row.delayStartCount }}{{
scope.row.delayStartCountRate == '0' ? '0%' : scope.row.delayStartCountRate
}}</el-button
>
</template> </template>
<template #tiqianwangong="scope"> <template #earlyFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'提前完工')">{{ scope.row.tiqianwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '提前完工')"
>{{ scope.row.earlyFinishCount }}{{
scope.row.earlyFinishCountRate == '0' ? '0%' : scope.row.earlyFinishCountRate
}}</el-button
>
</template> </template>
<template #zhunshiwangong="scope"> <template #onTimeFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'准时完工')">{{ scope.row.zhunshiwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '准时完工')"
>{{ scope.row.onTimeFinishCount }}{{
scope.row.onTimeFinishCountRate == '0' ? '0%' : scope.row.onTimeFinishCountRate
}}</el-button
>
</template> </template>
<template #yanchiwangong="scope"> <template #delayFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'延迟完工')">{{ scope.row.yanchiwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '延迟完工')"
>{{ scope.row.delayFinishCount }}{{
scope.row.delayFinishCountRate == '0' ? '0%' : scope.row.delayFinishCountRate
}}</el-button
>
</template> </template>
</avue-crud> </avue-crud>
</div> </div>
</template> </template>
<script> <script>
// import { import { getProcessExecutePage } from '@/api/productionSchedulingPlan/scheduling';
// getListPersonAbility,
// removePersonAbility,
// addPersonAbility,
// updatePersonAbility,
// } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
components: {}, components: {},
data() { data() {
@ -146,13 +164,12 @@ export default {
prop: 'craftName', prop: 'craftName',
search: false, search: false,
sortable: true, sortable: true,
width: 150,
span: 12, span: 12,
searchOrder: 17, searchOrder: 17,
}, },
{ {
label: '工艺能力', label: '工艺能力',
prop: 'craftId', prop: 'caId',
hide: true, hide: true,
search: true, search: true,
sortable: true, sortable: true,
@ -182,13 +199,12 @@ export default {
prop: 'processName', prop: 'processName',
search: false, search: false,
sortable: true, sortable: true,
width: 150,
span: 12, span: 12,
searchOrder: 16, searchOrder: 16,
}, },
{ {
label: '工序', label: '工序',
prop: 'processId', prop: 'ppsId',
search: true, search: true,
sortable: true, sortable: true,
hide: true, hide: true,
@ -213,16 +229,16 @@ export default {
}, },
}, },
{ {
label: '车间订单数量', label: '工序执行次数',
prop: 'partName', prop: 'totalCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
searchLabelWidth: 'auto', width: 150,
}, },
{ {
label: '准时偏差(±分钟)', label: '准时偏差(±分钟)',
prop: 'zhunshipiancha', prop: 'interval',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -233,42 +249,42 @@ export default {
{ {
label: '提前开工', label: '提前开工',
prop: 'tiqiankaigong', prop: 'earlyStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '准时开工', label: '准时开工',
prop: 'zhunshikaigong', prop: 'onTimeStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '延迟开工', label: '延迟开工',
prop: 'yanchikaigong', prop: 'delayStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '提前完工', label: '提前完工',
prop: 'tiqianwangong', prop: 'earlyFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '准时完工', label: '准时完工',
prop: 'zhunshiwangong', prop: 'onTimeFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '延迟完工', label: '延迟完工',
prop: 'yanchiwangong', prop: 'delayFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -302,11 +318,13 @@ export default {
threeDaysAgo.setDate(today.getDate() - 7); threeDaysAgo.setDate(today.getDate() - 7);
this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)]; this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)];
this.onLoad(this.page, this.query);
}, },
methods: { methods: {
onChangeData() {}, onChangeData() {},
toDetail(row,type){ toDetail(row, type) {
this.$emit('toDetail',row,type,'工序') this.$emit('toDetail', row, type, '工序');
}, },
formatDate(date) { formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
@ -384,9 +402,11 @@ export default {
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
@ -402,28 +422,29 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = false; this.loading = true;
let query_ = {};
if (!!params.cycledate) { if (!!params.cycledate) {
this.query.startTime = params.cycledate[0]; query_.startTime = params.cycledate[0];
this.query.endTime = params.cycledate[1]; query_.endTime = params.cycledate[1];
} }
this.data = [ if (!!params.interval) {
{ query_.interval = params.interval;
id: '1', }
zhunshikaigong: '20%', if (!!params.workCenterId) {
zhunshiwangong: '30%', query_.workCenterId = params.workCenterId;
tiqianwangong: '40%', }
tiqiankaigong: '50%', if (!!params.caId) {
yanchikaigong: '60%', query_.caId = params.caId;
yanchiwangong: '80%', }
}, if (!!params.ppsId) {
]; query_.ppsId = params.ppsId;
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { }
// this.data = res.data.data.records; getProcessExecutePage(page.currentPage, page.pageSize, query_).then(res => {
// this.loading = false; this.data = res.data.data.records;
// this.page.total = res.data.data.total; this.loading = false;
// this.selectionClear(); this.page.total = res.data.data.total;
// }); });
}, },
}, },
}; };

@ -20,35 +20,54 @@
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> </template> <template #menu="{ row }"> </template>
<template #tiqiankaigong="scope"> <template #earlyStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'提前开工')">{{ scope.row.tiqiankaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '提前开工')"
>{{ scope.row.earlyStartCount }}{{
scope.row.earlyStartCountRate == '0' ? '0%' : scope.row.earlyStartCountRate
}}</el-button
>
</template> </template>
<template #zhunshikaigong="scope"> <template #onTimeStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'准时开工')">{{ scope.row.zhunshikaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '准时开工')"
>{{ scope.row.onTimeStartCount }}{{
scope.row.onTimeStartCountRate == '0' ? '0%' : scope.row.onTimeStartCountRate
}}</el-button
>
</template> </template>
<template #yanchikaigong="scope"> <template #delayStartCount="scope">
<el-button type="text" @click="toDetail(scope.row,'延迟开工')">{{ scope.row.yanchikaigong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '延迟开工')"
>{{ scope.row.delayStartCount }}{{
scope.row.delayStartCountRate == '0' ? '0%' : scope.row.delayStartCountRate
}}</el-button
>
</template> </template>
<template #tiqianwangong="scope"> <template #earlyFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'提前完工')">{{ scope.row.tiqianwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '提前完工')"
>{{ scope.row.earlyFinishCount }}{{
scope.row.earlyFinishCountRate == '0' ? '0%' : scope.row.earlyFinishCountRate
}}</el-button
>
</template> </template>
<template #zhunshiwangong="scope"> <template #onTimeFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'准时完工')">{{ scope.row.zhunshiwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '准时完工')"
>{{ scope.row.onTimeFinishCount }}{{
scope.row.onTimeFinishCountRate == '0' ? '0%' : scope.row.onTimeFinishCountRate
}}</el-button
>
</template> </template>
<template #yanchiwangong="scope"> <template #delayFinishCount="scope">
<el-button type="text" @click="toDetail(scope.row,'延迟完工')">{{ scope.row.yanchiwangong }}</el-button> <el-button type="text" @click="toDetail(scope.row, '延迟完工')"
>{{ scope.row.delayFinishCount }}{{
scope.row.delayFinishCountRate == '0' ? '0%' : scope.row.delayFinishCountRate
}}</el-button
>
</template> </template>
</avue-crud> </avue-crud>
</div> </div>
</template> </template>
<script> <script>
// import { import { getCenterExecuteList } from '@/api/productionSchedulingPlan/scheduling';
// getListPersonAbility,
// removePersonAbility,
// addPersonAbility,
// updatePersonAbility,
// } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
components: {}, components: {},
data() { data() {
@ -142,7 +161,7 @@ export default {
}, },
{ {
label: '准时偏差(±分钟)', label: '准时偏差(±分钟)',
prop: 'zhunshipiancha', prop: 'interval',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -153,7 +172,7 @@ export default {
{ {
label: '车间订单数量', label: '车间订单数量',
prop: 'partName', prop: 'totalCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -161,42 +180,42 @@ export default {
}, },
{ {
label: '提前开工', label: '提前开工',
prop: 'tiqiankaigong', prop: 'earlyStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '准时开工', label: '准时开工',
prop: 'zhunshikaigong', prop: 'onTimeStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '延迟开工', label: '延迟开工',
prop: 'yanchikaigong', prop: 'delayStartCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '提前完工', label: '提前完工',
prop: 'tiqianwangong', prop: 'earlyFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '准时完工', label: '准时完工',
prop: 'zhunshiwangong', prop: 'onTimeFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
}, },
{ {
label: '延迟完工', label: '延迟完工',
prop: 'yanchiwangong', prop: 'delayFinishCount',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -230,11 +249,16 @@ export default {
threeDaysAgo.setDate(today.getDate() - 7); threeDaysAgo.setDate(today.getDate() - 7);
this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)]; this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)];
this.query.interval = 30
this.onLoad(this.page, this.query);
// this.$refs.crud.refreshTable();
}, },
methods: { methods: {
onChangeData() {}, onChangeData() {},
toDetail(row,type){ toDetail(row, type) {
this.$emit('toDetail',row,type,'作业中心') console.log(909090,row, type);
row.interval = this.query.interval
this.$emit('toDetail', row, type, '作业中心');
}, },
formatDate(date) { formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
@ -299,7 +323,7 @@ export default {
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page, params); this.onLoad(this.page, this.query);
done(); done();
}, },
selectionChange(list) { selectionChange(list) {
@ -312,9 +336,11 @@ export default {
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
@ -330,28 +356,23 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = false; this.loading = true;
let query_ = {};
if (!!params.cycledate) { if (!!params.cycledate) {
this.query.startTime = params.cycledate[0]; query_.startTime = params.cycledate[0];
this.query.endTime = params.cycledate[1]; query_.endTime = params.cycledate[1];
} }
this.data = [ if (!!this.query.interval) {
{ query_.interval = this.query.interval;
id: '1', }
zhunshikaigong: '20%', if (!!this.query.workCenterId) {
zhunshiwangong: '30%', query_.workCenterId = this.query.workCenterId;
tiqianwangong: '40%', }
tiqiankaigong: '50%',
yanchikaigong: '60%', getCenterExecuteList(query_).then(res => {
yanchiwangong: '80%', this.data = res.data.data;
}, this.loading = false;
]; });
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// this.data = res.data.data.records;
// this.loading = false;
// this.page.total = res.data.data.total;
// this.selectionClear();
// });
}, },
}, },
}; };

@ -27,12 +27,7 @@
</template> </template>
<script> <script>
// import { import { getProcessExecuteDetailPage } from '@/api/productionSchedulingPlan/scheduling';
// getListPersonAbility,
// removePersonAbility,
// addPersonAbility,
// updatePersonAbility,
// } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
components: {}, components: {},
props: { props: {
@ -131,7 +126,7 @@ export default {
{ {
label: '车间订单号', label: '车间订单号',
prop: 'partName', prop: 'woCode',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -141,7 +136,7 @@ export default {
}, },
{ {
label: '零件号', label: '零件号',
prop: 'partName', prop: 'partCode',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -160,7 +155,7 @@ export default {
}, },
{ {
label: '批次号', label: '批次号',
prop: 'partName', prop: 'batchNo',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -170,7 +165,7 @@ export default {
}, },
{ {
label: '流程卡号', label: '流程卡号',
prop: 'partName', prop: 'cardNo',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -188,7 +183,7 @@ export default {
}, },
{ {
label: '工艺能力', label: '工艺能力',
prop: 'craftId', prop: 'caId',
hide: true, hide: true,
search: true, search: true,
sortable: true, sortable: true,
@ -223,7 +218,7 @@ export default {
}, },
{ {
label: '工序', label: '工序',
prop: 'processId', prop: 'ppsId',
search: true, search: true,
sortable: true, sortable: true,
hide: true, hide: true,
@ -250,7 +245,7 @@ export default {
}, },
{ {
label: '加工班组', label: '加工班组',
prop: 'partName', prop: 'teamName',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -260,7 +255,7 @@ export default {
}, },
{ {
label: '班组', label: '班组',
prop: 'jiagongbanzuId', prop: 'teamId',
search: true, search: true,
sortable: true, sortable: true,
hide: true, hide: true,
@ -270,16 +265,15 @@ export default {
searchOrder: 14, searchOrder: 14,
filterable: true, filterable: true,
type: 'select', type: 'select',
dicUrl:'blade-scheduling/teamSet/findList', dicUrl: 'blade-scheduling/teamSet/findList',
props: { props: {
label: 'tsName', label: 'tsName',
value: 'tsName', value: 'tsName',
}, },
}, },
{ {
label: '计划开始时间', label: '计划开始时间',
prop: 'partName', prop: 'planStartTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -288,7 +282,7 @@ export default {
}, },
{ {
label: '实际开始时间', label: '实际开始时间',
prop: 'partName', prop: 'factStartTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -297,7 +291,7 @@ export default {
}, },
{ {
label: '开工类型', label: '开工类型',
prop: 'partName', prop: 'startType',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -308,21 +302,21 @@ export default {
dicData: [ dicData: [
{ {
label: '提前', label: '提前',
value: '1', value: '提前',
}, },
{ {
label: '准时', label: '准时',
value: '2', value: '准时',
}, },
{ {
label: '延迟', label: '延迟',
value: '2', value: '延迟',
}, },
], ],
}, },
{ {
label: '计划完成时间', label: '计划完成时间',
prop: 'partName', prop: 'planEndTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -331,7 +325,7 @@ export default {
}, },
{ {
label: '实际完成时间', label: '实际完成时间',
prop: 'partName', prop: 'factEndTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -340,7 +334,7 @@ export default {
}, },
{ {
label: '完工类型', label: '完工类型',
prop: 'partName', prop: 'endType',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -351,21 +345,21 @@ export default {
dicData: [ dicData: [
{ {
label: '提前', label: '提前',
value: '1', value: '提前',
}, },
{ {
label: '准时', label: '准时',
value: '2', value: '准时',
}, },
{ {
label: '延迟', label: '延迟',
value: '2', value: '延迟',
}, },
], ],
}, },
{ {
label: '计划时长(分钟)', label: '计划时长(分钟)',
prop: 'partName', prop: 'planDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -374,7 +368,7 @@ export default {
}, },
{ {
label: '实际时长(分钟)', label: '实际时长(分钟)',
prop: 'partName', prop: 'factDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -383,7 +377,7 @@ export default {
}, },
{ {
label: '偏差时长(分钟)', label: '偏差时长(分钟)',
prop: 'partName', prop: 'biasDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -409,7 +403,7 @@ export default {
}, },
{ {
label: '准时偏差(±分钟)', label: '准时偏差(±分钟)',
prop: 'zhunshipiancha', prop: 'interval',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -431,6 +425,37 @@ export default {
threeDaysAgo.setDate(today.getDate() - 7); threeDaysAgo.setDate(today.getDate() - 7);
this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)]; this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)];
console.log(this.processItem, 'processItem');
if (this.processItem.workCenterId) {
this.query.workCenterId = this.processItem.workCenterId + '';
}
if (this.processItem.caId) {
this.query.caId = this.processItem.caId + '';
}
if (this.processItem.ppsId) {
this.query.ppsId = this.processItem.ppsId + '';
}
if (this.processItem.type) {
if (this.processItem.type == '提前开工') {
this.query.startType = '提前';
}
if (this.processItem.type == '准时开工') {
this.query.startType = '准时';
}
if (this.processItem.type == '延迟开工') {
this.query.startType = '延迟';
}
if (this.processItem.type == '提前完工') {
this.query.endType = '提前';
}
if (this.processItem.type == '准时完工') {
this.query.endType = '准时';
}
if (this.processItem.type == '延迟完工') {
this.query.endType = '延迟';
}
}
}, },
methods: { methods: {
onChangeData() {}, onChangeData() {},
@ -510,9 +535,11 @@ export default {
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
@ -529,16 +556,37 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = false; this.loading = false;
let query_ = {}
if (!!params.cycledate) { if (!!params.cycledate) {
this.query.startTime = params.cycledate[0]; query_.startTime = params.cycledate[0];
this.query.endTime = params.cycledate[1]; query_.endTime = params.cycledate[1];
} }
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { if (!!params.interval) {
// this.data = res.data.data.records; query_.interval = params.interval;
// this.loading = false; }
// this.page.total = res.data.data.total; if (!!params.workCenterId) {
// this.selectionClear(); query_.workCenterId = params.workCenterId;
// }); }
if (!!params.cardNo) {
query_.cardNo = params.cardNo;
}
if (!!params.batchNo) {
query_.batchNo = params.batchNo;
}
if (!!params.woCode) {
query_.woCode = params.woCode;
}
if (!!params.startType) {
query_.startType = params.startType;
}
if (!!params.endType) {
query_.endType = params.endType;
}
getProcessExecuteDetailPage(page.currentPage, page.pageSize, query_).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
});
}, },
}, },
}; };

@ -15,7 +15,6 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -27,12 +26,7 @@
</template> </template>
<script> <script>
// import { import { getOrderExecuteDetailPage } from '@/api/productionSchedulingPlan/scheduling';
// getListPersonAbility,
// removePersonAbility,
// addPersonAbility,
// updatePersonAbility,
// } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
components: {}, components: {},
props: { props: {
@ -112,7 +106,7 @@ export default {
searchOrder: 17, searchOrder: 17,
type: 'select', type: 'select',
filterable: true, filterable: true,
searchOrder: 19,
dicUrl: '/blade-scheduling/workCenter/findList', dicUrl: '/blade-scheduling/workCenter/findList',
rules: [ rules: [
{ {
@ -132,7 +126,7 @@ export default {
{ {
label: '车间订单号', label: '车间订单号',
prop: 'partName', prop: 'woCode',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -142,13 +136,14 @@ export default {
}, },
{ {
label: '零件号', label: '零件号',
prop: 'partName', prop: 'partCode',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
searchLabelWidth: 'auto', searchLabelWidth: 'auto',
width: 150, width: 150,
searchOrder: 19,
searchOrder: 17,
}, },
{ {
label: '零件名称', label: '零件名称',
@ -161,7 +156,7 @@ export default {
}, },
{ {
label: '批次号', label: '批次号',
prop: 'partName', prop: 'batchNo',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -171,7 +166,7 @@ export default {
}, },
{ {
label: '流程卡号', label: '流程卡号',
prop: 'partName', prop: 'cardNo',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -181,7 +176,7 @@ export default {
}, },
{ {
label: '接收时间', label: '接收时间',
prop: 'partName', prop: 'receiveTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -190,7 +185,7 @@ export default {
}, },
{ {
label: '计划开始时间', label: '计划开始时间',
prop: 'partName', prop: 'planStartTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -199,7 +194,7 @@ export default {
}, },
{ {
label: '实际开始时间', label: '实际开始时间',
prop: 'partName', prop: 'factStartTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -208,7 +203,7 @@ export default {
}, },
{ {
label: '开工类型', label: '开工类型',
prop: 'partName', prop: 'startType',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -219,21 +214,21 @@ export default {
dicData: [ dicData: [
{ {
label: '提前', label: '提前',
value: '1', value: '提前',
}, },
{ {
label: '准时', label: '准时',
value: '2', value: '准时',
}, },
{ {
label: '延迟', label: '延迟',
value: '2', value: '延迟',
}, },
], ],
}, },
{ {
label: '计划完成时间', label: '计划完成时间',
prop: 'partName', prop: 'planEndTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -242,7 +237,7 @@ export default {
}, },
{ {
label: '实际完成时间', label: '实际完成时间',
prop: 'partName', prop: 'factEndTime',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -251,7 +246,7 @@ export default {
}, },
{ {
label: '完工类型', label: '完工类型',
prop: 'partName', prop: 'endType',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -262,21 +257,21 @@ export default {
dicData: [ dicData: [
{ {
label: '提前', label: '提前',
value: '1', value: '提前',
}, },
{ {
label: '准时', label: '准时',
value: '2', value: '准时',
}, },
{ {
label: '延迟', label: '延迟',
value: '2', value: '延迟',
}, },
], ],
}, },
{ {
label: '计划时长(分钟)', label: '计划时长(分钟)',
prop: 'partName', prop: 'planDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -285,7 +280,7 @@ export default {
}, },
{ {
label: '实际时长(分钟)', label: '实际时长(分钟)',
prop: 'partName', prop: 'factDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -294,7 +289,7 @@ export default {
}, },
{ {
label: '偏差时长(分钟)', label: '偏差时长(分钟)',
prop: 'partName', prop: 'biasDurationMinute',
search: false, search: false,
sortable: true, sortable: true,
span: 12, span: 12,
@ -320,7 +315,7 @@ export default {
}, },
{ {
label: '准时偏差(±分钟)', label: '准时偏差(±分钟)',
prop: 'zhunshipiancha', prop: 'interval',
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
@ -341,7 +336,34 @@ export default {
threeDaysAgo.setDate(today.getDate() - 7); threeDaysAgo.setDate(today.getDate() - 7);
this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)]; this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)];
console.log(this.workorderItem,'workorderItem'); console.log(this.workorderItem, 'workorderItem');
if(this.workorderItem.interval){
this.query.interval = this.workorderItem.interval;
}
if (this.workorderItem.workCenterId) {
this.query.workCenterId = this.workorderItem.workCenterId + '';
}
if (this.workorderItem.type) {
if (this.workorderItem.type == '提前开工') {
this.query.startType = '提前';
}
if (this.workorderItem.type == '准时开工') {
this.query.startType = '准时';
}
if (this.workorderItem.type == '延迟开工') {
this.query.startType = '延迟';
}
if (this.workorderItem.type == '提前完工') {
this.query.endType = '提前';
}
if (this.workorderItem.type == '准时完工') {
this.query.endType = '准时';
}
if (this.workorderItem.type == '延迟完工') {
this.query.endType = '延迟';
}
}
this.onLoad(this.page, this.query);
}, },
methods: { methods: {
onChangeData() {}, onChangeData() {},
@ -421,9 +443,11 @@ export default {
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
@ -439,17 +463,36 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = false; this.loading = true;
let query_ = {};
if (!!params.cycledate) { if (!!params.cycledate) {
this.query.startTime = params.cycledate[0]; query_.startTime = params.cycledate[0];
this.query.endTime = params.cycledate[1]; query_.endTime = params.cycledate[1];
} }
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { if (!!params.cardNo) {
// this.data = res.data.data.records; query_.cardNo = params.cardNo;
// this.loading = false; }
// this.page.total = res.data.data.total; if (!!params.batchNo) {
// this.selectionClear(); query_.batchNo = params.batchNo;
// }); }
if (!!params.workCenterId) {
query_.workCenterId = params.workCenterId;
}
if (!!params.woCode) {
query_.woCode = params.woCode;
}
if (!!params.startType) {
query_.startType = params.startType;
}
if (!!params.endType) {
query_.endType = params.endType;
}
getOrderExecuteDetailPage(page.currentPage, page.pageSize, query_).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
});
}, },
}, },
}; };

@ -7,12 +7,12 @@
<el-tab-pane label="工序执行明细" name="fourth"></el-tab-pane> <el-tab-pane label="工序执行明细" name="fourth"></el-tab-pane>
</el-tabs> </el-tabs>
<executionWorkorder v-if="activeName == 'first'" @toDetail="toDetail"></executionWorkorder> <executionWorkorder v-show="activeName == 'first'" @toDetail="toDetail"></executionWorkorder>
<workorderDetails <workorderDetails
v-if="activeName == 'second'" v-if="activeName == 'second'"
:workorderItem="workorderItem" :workorderItem="workorderItem"
></workorderDetails> ></workorderDetails>
<executionProcess v-if="activeName == 'third'" @toDetail="toDetail"></executionProcess> <executionProcess v-show="activeName == 'third'" @toDetail="toDetail"></executionProcess>
<processDeatils v-if="activeName == 'fourth'" :processItem="processItem"></processDeatils> <processDeatils v-if="activeName == 'fourth'" :processItem="processItem"></processDeatils>
</basic-container> </basic-container>
</template> </template>
@ -41,10 +41,16 @@ export default {
toDetail(row, type, tabName) { toDetail(row, type, tabName) {
if (tabName == '作业中心') { if (tabName == '作业中心') {
this.activeName = 'second'; this.activeName = 'second';
this.workorderItem = JSON.parse(JSON.stringify(row)); this.workorderItem = {
...JSON.parse(JSON.stringify(row)),
type: type,
};
} else { } else {
this.activeName = 'fourth'; this.activeName = 'fourth';
this.processItem = JSON.parse(JSON.stringify(row)); this.processItem = {
...JSON.parse(JSON.stringify(row)),
type: type,
};
} }
}, },
}, },

@ -1,5 +1,6 @@
<template> <template>
<basic-container> <basic-container>
<!-- @on-load="onLoad" -->
<avue-crud <avue-crud
:option="option" :option="option"
:table-loading="loading" :table-loading="loading"
@ -15,13 +16,15 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> </template> <template #menu="{ row }"> </template>
<template #heatTreat="scope"> </template> <template #factEndTime="scope">
{{ scope.row.factEndTime ? scope.row.factEndTime.substring(0, 10) : '' }}
</template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
@ -89,7 +92,7 @@ export default {
prop: 'woCode', prop: 'woCode',
search: true, search: true,
sortable: true, sortable: true,
width: 150, width: 180,
span: 12, span: 12,
searchOrder: 18, searchOrder: 18,
searchLabelWidth: 'auto', searchLabelWidth: 'auto',
@ -294,6 +297,15 @@ export default {
{ {
label: '工序完成时间', label: '工序完成时间',
prop: 'factEndTime', prop: 'factEndTime',
search: false,
sortable: true,
width: 150,
span: 12,
},
{
label: '工序完成时间',
prop: 'cycledate',
hide: true,
search: true, search: true,
sortable: true, sortable: true,
width: 150, width: 150,
@ -319,7 +331,8 @@ export default {
const threeDaysAgo = new Date(today); const threeDaysAgo = new Date(today);
threeDaysAgo.setDate(today.getDate() - 7); threeDaysAgo.setDate(today.getDate() - 7);
this.query.factEndTime = [this.formatDate(threeDaysAgo), this.formatDate(today)]; this.query.cycledate = [this.formatDate(threeDaysAgo), this.formatDate(today)];
this.onLoad(this.page, this.query);
}, },
methods: { methods: {
onChangeData(val, type) { onChangeData(val, type) {
@ -406,9 +419,11 @@ export default {
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
@ -424,18 +439,44 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
if (!!params.factEndTime) { let query_ = {};
this.query.startTime = params.factEndTime[0]; if (!!params.cycledate) {
this.query.endTime = params.factEndTime[1]; query_.startTime = params.cycledate[0];
query_.endTime = params.cycledate[1];
} else {
query_.startTime = null;
query_.endTime = null;
} }
console.log(params, this.query); if(!!this.query.partCode){
// this.loading = true; query_.partCode = this.query.partCode;
// getQualificationExecuteAnalysis(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { }
// this.data = res.data.data.records; if(!!this.query.woCode){
// this.loading = false; query_.woCode = this.query.woCode;
// this.page.total = res.data.data.total; }
// this.selectionClear(); if(!!this.query.craftName){
// }); query_.craftName = this.query.craftName;
}
if(!!this.query.processName){
query_.processName = this.query.processName;
}
if(!!this.query.certificateName){
query_.certificateName = this.query.certificateName;
}
if(!!this.query.productIdent){
query_.productIdent = this.query.productIdent;
}
this.loading = true;
getQualificationExecuteAnalysis(
page.currentPage,
page.pageSize,
query_
).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
// this.selectionClear();
});
}, },
}, },
}; };

Loading…
Cancel
Save