|
|
|
@ -10,7 +10,7 @@
|
|
|
|
:options="workOrderStatus"
|
|
|
|
:options="workOrderStatus"
|
|
|
|
></n-select>
|
|
|
|
></n-select>
|
|
|
|
</n-form-item>
|
|
|
|
</n-form-item>
|
|
|
|
<n-form-item label="机台">
|
|
|
|
<!-- <n-form-item label="机台">
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
v-model:value="searchForm.deviceId"
|
|
|
|
v-model:value="searchForm.deviceId"
|
|
|
|
placeholder="请选择机台"
|
|
|
|
placeholder="请选择机台"
|
|
|
|
@ -21,15 +21,15 @@
|
|
|
|
searchForm.equipmentCode = item.label;
|
|
|
|
searchForm.equipmentCode = item.label;
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
></n-select>
|
|
|
|
></n-select>
|
|
|
|
</n-form-item>
|
|
|
|
</n-form-item> -->
|
|
|
|
<n-form-item label="位置">
|
|
|
|
<!-- <n-form-item label="位置">
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
v-model:value="searchForm.axleNumber"
|
|
|
|
v-model:value="searchForm.axleNumber"
|
|
|
|
placeholder="请选择位置"
|
|
|
|
placeholder="请选择位置"
|
|
|
|
:options="localList"
|
|
|
|
:options="localList"
|
|
|
|
class="w-160px"
|
|
|
|
class="w-160px"
|
|
|
|
></n-select>
|
|
|
|
></n-select>
|
|
|
|
</n-form-item>
|
|
|
|
</n-form-item> -->
|
|
|
|
<n-form-item label="订单类型">
|
|
|
|
<n-form-item label="订单类型">
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
v-model:value="searchForm.orderType"
|
|
|
|
v-model:value="searchForm.orderType"
|
|
|
|
@ -475,11 +475,10 @@ const orderTypeList = ref<{ label: string; value: number }[]>([
|
|
|
|
{ label: '客户订单', value: 0 },
|
|
|
|
{ label: '客户订单', value: 0 },
|
|
|
|
{ label: '备库订单', value: 1 }
|
|
|
|
{ label: '备库订单', value: 1 }
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
const localList = ref<{ label: string; value: string }[]>([
|
|
|
|
// const localList = ref<{ label: string; value: string }[]>([
|
|
|
|
{ label: '左', value: '左' },
|
|
|
|
// { label: '左', value: '左' },
|
|
|
|
{ label: '右', value: '右' }
|
|
|
|
// { label: '右', value: '右' }
|
|
|
|
]);
|
|
|
|
// ]);
|
|
|
|
const plantIds = ref<Array<number>>([]);
|
|
|
|
|
|
|
|
const data = ref<paintJobOrder.tabelList[]>([]);
|
|
|
|
const data = ref<paintJobOrder.tabelList[]>([]);
|
|
|
|
|
|
|
|
|
|
|
|
const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
|
|
|
|
const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
|
|
|
|
@ -490,12 +489,12 @@ const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
render: (_row, index) => (searchForm.value.pageNum - 1) * searchForm.value.pageSize + index + 1
|
|
|
|
render: (_row, index) => (searchForm.value.pageNum - 1) * searchForm.value.pageSize + index + 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
title: '结束机台',
|
|
|
|
// title: '结束机台',
|
|
|
|
width: 100,
|
|
|
|
// width: 100,
|
|
|
|
align: 'center',
|
|
|
|
// align: 'center',
|
|
|
|
key: 'equipmentCode'
|
|
|
|
// key: 'equipmentCode'
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// title: '位置',
|
|
|
|
// title: '位置',
|
|
|
|
// width: 160,
|
|
|
|
// width: 160,
|
|
|
|
@ -629,38 +628,22 @@ const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
|
|
|
|
title: '操作',
|
|
|
|
title: '操作',
|
|
|
|
key: 'action',
|
|
|
|
key: 'action',
|
|
|
|
fixed: 'right',
|
|
|
|
fixed: 'right',
|
|
|
|
width: 280,
|
|
|
|
width: 180,
|
|
|
|
render: row => {
|
|
|
|
render: row => {
|
|
|
|
|
|
|
|
if (row.status === '2') {
|
|
|
|
|
|
|
|
return '已完工不可操作';
|
|
|
|
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<n-button
|
|
|
|
|
|
|
|
type="info"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
class="mr-10px"
|
|
|
|
|
|
|
|
onClick={() => drawbenchScheduling(row)}
|
|
|
|
|
|
|
|
v-show={row.attr1 !== 'Y' && row.status === '0'}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
金属排产
|
|
|
|
|
|
|
|
</n-button>
|
|
|
|
|
|
|
|
<n-button
|
|
|
|
<n-button
|
|
|
|
type="error"
|
|
|
|
type="error"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
class="mr-10px"
|
|
|
|
class="mr-10px"
|
|
|
|
onClick={() => completeWorkOrder(row.id)}
|
|
|
|
|
|
|
|
v-show={row.status === '1' || (row.attr1 === 'Y' && row.status === '0')}
|
|
|
|
v-show={row.status === '1' || (row.attr1 === 'Y' && row.status === '0')}
|
|
|
|
|
|
|
|
onClick={() => completeWorkOrder(row.id)}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
工单完工
|
|
|
|
工单完工
|
|
|
|
</n-button>
|
|
|
|
</n-button>
|
|
|
|
<n-button
|
|
|
|
|
|
|
|
class="mr-10px"
|
|
|
|
|
|
|
|
type="warning"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
onClick={() => edit(row)}
|
|
|
|
|
|
|
|
v-show={row}
|
|
|
|
|
|
|
|
v-show={row.status === '0'}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
编辑
|
|
|
|
|
|
|
|
</n-button>
|
|
|
|
|
|
|
|
<n-button
|
|
|
|
<n-button
|
|
|
|
type="error"
|
|
|
|
type="error"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
@ -751,42 +734,6 @@ const detailColumns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
function edit(row: paintJobOrder.tabelList) {
|
|
|
|
|
|
|
|
console.time('运行时长');
|
|
|
|
|
|
|
|
editData.value = row;
|
|
|
|
|
|
|
|
editShow.value = true;
|
|
|
|
|
|
|
|
plantIds.value = [];
|
|
|
|
|
|
|
|
const plantNameList = row.plantName.split(',');
|
|
|
|
|
|
|
|
plantNameList.forEach(item => {
|
|
|
|
|
|
|
|
const plant = plantListOptions.value.find(ele => item === ele.label);
|
|
|
|
|
|
|
|
if (plant) {
|
|
|
|
|
|
|
|
plantIds.value.push(plant.value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
const index = machineList.value.findIndex(item => item.id === row.equipmentId);
|
|
|
|
|
|
|
|
if (index === -1) return;
|
|
|
|
|
|
|
|
const axleNumberList = machineList.value[index].axleNumber.split(/[,,]/g);
|
|
|
|
|
|
|
|
locationOptions.value = [];
|
|
|
|
|
|
|
|
for (let i = 0; i < axleNumberList.length; i += 1) {
|
|
|
|
|
|
|
|
locationOptions.value.push({
|
|
|
|
|
|
|
|
value: i,
|
|
|
|
|
|
|
|
label: axleNumberList[i]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const axleNumberIds = row.axleNumber.split(',');
|
|
|
|
|
|
|
|
axleNumberId.value = [];
|
|
|
|
|
|
|
|
axleNumberIds.forEach(item => {
|
|
|
|
|
|
|
|
const axleNumberItem = locationOptions.value.find(ele => item === ele.label);
|
|
|
|
|
|
|
|
if (axleNumberItem && axleNumberId.value !== null) {
|
|
|
|
|
|
|
|
axleNumberId.value.push(axleNumberItem.value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (axleNumberId.value && axleNumberId.value.length > 0) {
|
|
|
|
|
|
|
|
detailData.value = [];
|
|
|
|
|
|
|
|
getDetailData();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function completeWorkOrder(id: number) {
|
|
|
|
function completeWorkOrder(id: number) {
|
|
|
|
const d = dialog.warning({
|
|
|
|
const d = dialog.warning({
|
|
|
|
title: '提示',
|
|
|
|
title: '提示',
|
|
|
|
@ -829,41 +776,6 @@ function handleDeleteItemTypeLs(id: number) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function drawbenchScheduling(row: paintJobOrder.tabelList) {
|
|
|
|
|
|
|
|
showDialog.value = true;
|
|
|
|
|
|
|
|
for (const key in drawBenchData.value) {
|
|
|
|
|
|
|
|
if (drawBenchData.value !== null) {
|
|
|
|
|
|
|
|
drawBenchData.value[key] = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const key in formModel.value) {
|
|
|
|
|
|
|
|
if (row[key] !== null) {
|
|
|
|
|
|
|
|
formModel.value[key] = row[key];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
formModel.value.onlyReadWeight = row.weight;
|
|
|
|
|
|
|
|
formModel.value.qbEquipmentCode = row.equipmentCode;
|
|
|
|
|
|
|
|
drawBenchData.value.enamellingEquipmentCode = row.equipmentCode;
|
|
|
|
|
|
|
|
drawBenchData.value.enamellingEquipmentId = row.equipmentId;
|
|
|
|
|
|
|
|
drawBenchData.value.weight = row.weight;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const spec = Number(row.specification);
|
|
|
|
|
|
|
|
drawBenchOptions.value = [];
|
|
|
|
|
|
|
|
drawBenchOptionsData.value.forEach(item => {
|
|
|
|
|
|
|
|
const upper = item.productionUpperLimit;
|
|
|
|
|
|
|
|
const lower = item.productionLowerLimit;
|
|
|
|
|
|
|
|
if (spec) {
|
|
|
|
|
|
|
|
if ((spec < upper || spec === upper) && (spec > lower || spec === lower)) {
|
|
|
|
|
|
|
|
drawBenchOptions.value.push({
|
|
|
|
|
|
|
|
label: item.equipmentCode,
|
|
|
|
|
|
|
|
value: item.id
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleUpdateValue(value: number, option: planWorkOrder.SelectMixedOption) {
|
|
|
|
function handleUpdateValue(value: number, option: planWorkOrder.SelectMixedOption) {
|
|
|
|
editData.value.equipmentCode = option.label;
|
|
|
|
editData.value.equipmentCode = option.label;
|
|
|
|
const index: number = machineList.value.findIndex(item => item.id === value);
|
|
|
|
const index: number = machineList.value.findIndex(item => item.id === value);
|
|
|
|
@ -1065,8 +977,8 @@ function init() {
|
|
|
|
searchForm.value.total = res.total;
|
|
|
|
searchForm.value.total = res.total;
|
|
|
|
data.value = res.rows;
|
|
|
|
data.value = res.rows;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
endLoading();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
endLoading();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
init();
|
|
|
|
init();
|
|
|
|
|