|
|
|
|
@ -111,16 +111,39 @@
|
|
|
|
|
</n-form>
|
|
|
|
|
</template>
|
|
|
|
|
</my-dialog>
|
|
|
|
|
|
|
|
|
|
<my-dialog
|
|
|
|
|
v-model:show="detail"
|
|
|
|
|
sub-text="关闭"
|
|
|
|
|
width="800px"
|
|
|
|
|
title="工单明细"
|
|
|
|
|
:show-cancel="false"
|
|
|
|
|
@cancel="closeDetail"
|
|
|
|
|
@submit="closeDetail"
|
|
|
|
|
>
|
|
|
|
|
<template #content>
|
|
|
|
|
<div>
|
|
|
|
|
<n-data-table
|
|
|
|
|
class="w-760px"
|
|
|
|
|
:loading="detailLoading"
|
|
|
|
|
:columns="columns2"
|
|
|
|
|
:data="rowsData2"
|
|
|
|
|
></n-data-table>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</my-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="tsx">
|
|
|
|
|
import {getWorkgroupAll} from "@/service/api/md/workgroup";
|
|
|
|
|
|
|
|
|
|
defineOptions({
|
|
|
|
|
name: 'DrawingWorkOrder'
|
|
|
|
|
});
|
|
|
|
|
import type { Ref } from 'vue';
|
|
|
|
|
import {h, Ref} from 'vue';
|
|
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
|
|
import type { DataTableColumns, FormInst } from 'naive-ui';
|
|
|
|
|
import {DataTableColumns, FormInst, NDatePicker, NSelect} from 'naive-ui';
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui';
|
|
|
|
|
import { createRequiredFormRule } from '@/utils';
|
|
|
|
|
import { getWorkbenchWiredrawingList } from '@/service/api/md/workbench/wiredrawing';
|
|
|
|
|
@ -326,6 +349,10 @@ const columns: Ref<DataTableColumns<drawingWorkOrder.tabelList>> = ref([
|
|
|
|
|
<n-button size="small" type="error" v-show={row.status === '1'} onClick={() => completeWorkOrder(row.id)}>
|
|
|
|
|
工单完工
|
|
|
|
|
</n-button>
|
|
|
|
|
<n-button size={'tiny'} type="info" onClick={() => handleView(row)}>
|
|
|
|
|
<icon-tdesign-send class="mr-2px text-15px " />
|
|
|
|
|
查看明细
|
|
|
|
|
</n-button>
|
|
|
|
|
</n-space>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
@ -384,7 +411,12 @@ function submitUpdate() {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const options = [
|
|
|
|
|
{ label: '未开始', value: '0' },
|
|
|
|
|
{ label: '排产中', value: '1' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const groupOptions = ref<any[]>([]);
|
|
|
|
|
function submitUpdateInit(msg: string) {
|
|
|
|
|
message.success(msg);
|
|
|
|
|
showDialog.value = false;
|
|
|
|
|
@ -393,58 +425,74 @@ function submitUpdateInit(msg: string) {
|
|
|
|
|
formModelData.value.equipmentList = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// function updateEquipmentCode(row: drawingWorkOrder.tabelList, type: number) {
|
|
|
|
|
// actionType.value = type;
|
|
|
|
|
// machineList.value = [];
|
|
|
|
|
// showDialog.value = true;
|
|
|
|
|
// rowDetail.value = JSON.parse(JSON.stringify(row));
|
|
|
|
|
// const equipmentList = rowDetail.value.equipmentId.split(',');
|
|
|
|
|
// formModelData.value.equipmentList = [];
|
|
|
|
|
// equipmentList.forEach(item => {
|
|
|
|
|
// formModelData.value.equipmentList.push(Number(item));
|
|
|
|
|
// });
|
|
|
|
|
// if (type === 0) {
|
|
|
|
|
// machineListAll.value.forEach(item => {
|
|
|
|
|
// machineList.value.push({
|
|
|
|
|
// label: item.label,
|
|
|
|
|
// value: item.value
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// const equipmentCodeList = rowDetail.value.equipmentCode.split(',');
|
|
|
|
|
// equipmentCodeList.forEach((item, index) => {
|
|
|
|
|
// machineList.value.push({
|
|
|
|
|
// label: item,
|
|
|
|
|
// value: Number(equipmentList[index])
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
const rowsData2 = ref<any>([]);
|
|
|
|
|
const detailLoading = ref<boolean>(false);
|
|
|
|
|
const detail = ref<boolean>(false);
|
|
|
|
|
const showPasModal = ref<boolean>(false);
|
|
|
|
|
function closeDetail() {
|
|
|
|
|
detail.value = false;
|
|
|
|
|
}
|
|
|
|
|
function handleView(row: any) {
|
|
|
|
|
detail.value = true;
|
|
|
|
|
if (row.attr3) {
|
|
|
|
|
rowsData2.value = JSON.parse(row.attr3)
|
|
|
|
|
}else{
|
|
|
|
|
rowsData2.value = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const sleep = row =>
|
|
|
|
|
// new Promise(resolve => {
|
|
|
|
|
// const formValue = {
|
|
|
|
|
// model: row.model,
|
|
|
|
|
// spec: row.specification,
|
|
|
|
|
// quantity: row.discNumber,
|
|
|
|
|
// lsDeviceId: null,
|
|
|
|
|
// qbDeviceId: row.enamellingEquipmentId,
|
|
|
|
|
// moldAfterSpec: row.specification,
|
|
|
|
|
// startTime: row.startTime,
|
|
|
|
|
// endTime: row.endTime,
|
|
|
|
|
// remark: row.remark,
|
|
|
|
|
// orderDate: formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
|
|
|
|
// moldId: null,
|
|
|
|
|
// moldBeforSpec: ''
|
|
|
|
|
// // moldAfterSpec: row.specification
|
|
|
|
|
// };
|
|
|
|
|
// console.log('formValue ==> ', formValue);
|
|
|
|
|
detailLoading.value = false;
|
|
|
|
|
}
|
|
|
|
|
const columns2: Ref<DataTableColumns<planWorkOrder.planWorkOrderList>> = ref([
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
key: 'index',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '工序名称',
|
|
|
|
|
key: 'routeName',
|
|
|
|
|
width: 100,
|
|
|
|
|
ellipsis: {
|
|
|
|
|
tooltip: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '任务状态',
|
|
|
|
|
key: 'taskStatus',
|
|
|
|
|
width: 130,
|
|
|
|
|
render: row => {
|
|
|
|
|
return '未开始';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '班组信息',
|
|
|
|
|
key: 'workgroupId',
|
|
|
|
|
width: 180,
|
|
|
|
|
render: row => {
|
|
|
|
|
let group = groupOptions.value.find(item => item.value == row.workgroupId)
|
|
|
|
|
if (group) {
|
|
|
|
|
return group.label
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '计划开始日期',
|
|
|
|
|
key: 'startDate',
|
|
|
|
|
width: 180,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '计划结束日期',
|
|
|
|
|
key: 'endDate',
|
|
|
|
|
width: 180,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '交付时间',
|
|
|
|
|
key: 'payTime',
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
// addMoldGaugeList(formValue).then(res => {
|
|
|
|
|
// resolve(res);
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
function sleep2(id: number): any {
|
|
|
|
|
return new Promise(resolve => {
|
|
|
|
|
@ -552,6 +600,17 @@ function getList() {
|
|
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
|
startLoading();
|
|
|
|
|
getWorkgroupAll().then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
groupOptions.value = [];
|
|
|
|
|
res.data.forEach((item: any) => {
|
|
|
|
|
groupOptions.value.push({
|
|
|
|
|
label: item.workgroupName,
|
|
|
|
|
value: item.id
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
getWiredrawingWorkorder({ ...searchForm.value }).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
searchForm.value.total = res.total;
|
|
|
|
|
|