|
|
|
@ -5,10 +5,6 @@
|
|
|
|
|
<div v-show='showSearch' class='mb-[10px]'>
|
|
|
|
|
<el-card shadow='hover'>
|
|
|
|
|
<el-form ref='queryFormRef' :model='queryParams' :inline='true'>
|
|
|
|
|
<el-form-item label='主键标识' prop='productOrderId'>
|
|
|
|
|
<el-input v-model='queryParams.productOrderId' placeholder='请输入主键标识' clearable
|
|
|
|
|
@keyup.enter='handleQuery' />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label='订单编号' prop='orderCode'>
|
|
|
|
|
<el-input v-model='queryParams.orderCode' placeholder='请输入订单编号' clearable @keyup.enter='handleQuery' />
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -41,8 +37,8 @@
|
|
|
|
|
<!-- <el-option v-for='dict in mes_finish_flag' :key='dict.value' :label='dict.label' :value='dict.value' />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label='是否已下达工单' prop='releaseFlag'>-->
|
|
|
|
|
<!-- <el-select v-model='queryParams.releaseFlag' placeholder='请选择是否已下达工单' clearable>-->
|
|
|
|
|
<!-- <el-form-item label='下达工单' prop='releaseFlag'>-->
|
|
|
|
|
<!-- <el-select v-model='queryParams.releaseFlag' placeholder='请选择下达工单' clearable>-->
|
|
|
|
|
<!-- <el-option v-for='dict in mes_release_flag' :key='dict.value' :label='dict.label' :value='dict.value' />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
@ -93,25 +89,22 @@
|
|
|
|
|
<dict-tag :options='mes_order_type' :value='scope.row.orderType' />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='成品名称' align='center' prop='materialId' v-if='columns[6].visible' />
|
|
|
|
|
<el-table-column label='物料BOM' align='center' prop='materialBomId'
|
|
|
|
|
v-if='columns[7].visible' />
|
|
|
|
|
<el-table-column label='成品名称' align='center' prop='materialName' v-if='columns[6].visible' width='160' />
|
|
|
|
|
<el-table-column label='物料BOM' align='center' prop='materialBomId' v-if='columns[7].visible' width='100' />
|
|
|
|
|
<el-table-column label='派工类型' align='center' prop='dispatchType' v-if='columns[8].visible'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<dict-tag :options='mes_dispatch_type' :value='scope.row.dispatchType' />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='派工ID' align='center' prop='dispatchId' v-if='columns[9].visible' />
|
|
|
|
|
<el-table-column label='销售数量' align='center' prop='saleAmount'
|
|
|
|
|
v-if='columns[10].visible' />
|
|
|
|
|
<el-table-column :label='dispatchTypeName' align='center' prop='dispatchId' v-if='columns[9].visible' />
|
|
|
|
|
<el-table-column label='销售数量' align='center' prop='saleAmount' v-if='columns[10].visible' />
|
|
|
|
|
<el-table-column label='计划交货日期' align='center' prop='planDeliveryDate' width='180' v-if='columns[11].visible'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<span>{{ parseTime(scope.row.planDeliveryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='计划数量' align='center' prop='planAmount' v-if='columns[12].visible' />
|
|
|
|
|
<el-table-column label='已派工数量' align='center' prop='dispatchAmount'
|
|
|
|
|
v-if='columns[13].visible' />
|
|
|
|
|
<el-table-column label='已派工数量' align='center' prop='dispatchAmount' v-if='columns[13].visible' />
|
|
|
|
|
<el-table-column label='完成数量' align='center' prop='completeAmount' v-if='columns[14].visible' />
|
|
|
|
|
<el-table-column label='发布时间' align='center' prop='releaseTime' width='180' v-if='columns[15].visible'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
@ -128,12 +121,12 @@
|
|
|
|
|
<span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='开始时间' align='center' prop='realBeginTime' width='180' v-if='columns[18].visible'>
|
|
|
|
|
<el-table-column label='实际开始时间' align='center' prop='realBeginTime' width='180' v-if='columns[18].visible'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<span>{{ parseTime(scope.row.realBeginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='完成时间' align='center' prop='realEndTime' width='180' v-if='columns[19].visible'>
|
|
|
|
|
<el-table-column label='实际完成时间' align='center' prop='realEndTime' width='180' v-if='columns[19].visible'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
@ -155,7 +148,7 @@
|
|
|
|
|
<dict-tag :options='mes_finish_flag' :value='scope.row.finishFlag' />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label='是否已下达工单' align='center' prop='releaseFlag' v-if='columns[25].visible'>
|
|
|
|
|
<el-table-column label='下达工单' align='center' prop='releaseFlag' v-if='columns[25].visible' width='80'>
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<dict-tag :options='mes_release_flag' :value='scope.row.releaseFlag' />
|
|
|
|
|
</template>
|
|
|
|
@ -163,16 +156,21 @@
|
|
|
|
|
<el-table-column label='订单版本' align='center' prop='orderVersion' v-if='columns[26].visible' />
|
|
|
|
|
<el-table-column label='工厂ID' align='center' prop='factoryId' v-if='columns[27].visible' />
|
|
|
|
|
<el-table-column label='备注' align='center' prop='remark' v-if='columns[28].visible' />
|
|
|
|
|
<el-table-column label='操作' align='center' class-name='small-padding fixed-width'>
|
|
|
|
|
<el-table-column label='操作' align='center' class-name="small-padding fixed-width" fixed="right">
|
|
|
|
|
<template #default='scope'>
|
|
|
|
|
<el-tooltip content='修改' placement='top'>
|
|
|
|
|
<el-button link type='primary' icon='Edit' @click='handleUpdate(scope.row)'
|
|
|
|
|
v-hasPermi="['mes:orderInfo:edit']"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content='删除' placement='top'>
|
|
|
|
|
<el-button link type='primary' icon='Delete' @click='handleDelete(scope.row)'
|
|
|
|
|
v-hasPermi="['mes:orderInfo:remove']"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-user-solid"
|
|
|
|
|
@click="handleDispatch(scope.row)"
|
|
|
|
|
v-if="1===1"
|
|
|
|
|
v-hasPermi="['mes:orderInfo:edit']"
|
|
|
|
|
>生产派工
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-tooltip content='删除' placement='top'>-->
|
|
|
|
|
<!-- <el-button link type='primary' icon='Delete' @click='handleDelete(scope.row)'-->
|
|
|
|
|
<!-- v-hasPermi="['mes:orderInfo:remove']"></el-button>-->
|
|
|
|
|
<!-- </el-tooltip>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -212,7 +210,7 @@
|
|
|
|
|
<el-input v-model='form.materialBomId' placeholder='请输入物料BOM' />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label='派工类型' prop='dispatchType'>
|
|
|
|
|
<el-radio-group v-model='form.dispatchType'>
|
|
|
|
|
<el-radio-group v-model='form.dispatchType' :disabled="true">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for='dict in mes_dispatch_type'
|
|
|
|
|
:key='dict.value'
|
|
|
|
@ -221,8 +219,15 @@
|
|
|
|
|
</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label='派工ID' prop='dispatchId'>
|
|
|
|
|
<el-input v-model='form.dispatchId' placeholder='请输入派工ID' />
|
|
|
|
|
<el-form-item :label='dispatchTypeName' prop='dispatchId'>
|
|
|
|
|
<el-select v-model="form.dispatchId" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in dispatchTypeList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label='销售数量' prop='saleAmount'>-->
|
|
|
|
|
<!-- <el-input v-model='form.saleAmount' placeholder='请输入销售数量' />-->
|
|
|
|
@ -284,6 +289,9 @@
|
|
|
|
|
<script setup name='OrderInfo' lang='ts'>
|
|
|
|
|
import { listOrderInfo, getOrderInfo, delOrderInfo, addOrderInfo, updateOrderInfo } from '@/api/mes/orderInfo';
|
|
|
|
|
import { OrderInfoVO, OrderInfoQuery, OrderInfoForm } from '@/api/mes/orderInfo/types';
|
|
|
|
|
import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
|
|
|
|
|
import { getBaseRouteList } from '@/api/mes/baseRoute';
|
|
|
|
|
import { getProdLineList } from '@/api/mes/baseProdLineInfo';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const {
|
|
|
|
@ -306,6 +314,9 @@ const total = ref(0);
|
|
|
|
|
|
|
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
|
|
const orderInfoFormRef = ref<ElFormInstance>();
|
|
|
|
|
/** 下拉框查询派工类型信息列表 */
|
|
|
|
|
const dispatchTypeList = ref([])
|
|
|
|
|
const dispatchTypeName = ref("");
|
|
|
|
|
|
|
|
|
|
const dialog = reactive<DialogOption>({
|
|
|
|
|
visible: false,
|
|
|
|
@ -324,24 +335,24 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 7, label: `物料BOM`, visible: true },
|
|
|
|
|
{ key: 8, label: `派工类型`, visible: true },
|
|
|
|
|
{ key: 9, label: `派工ID`, visible: true },
|
|
|
|
|
{ key: 10, label: `销售数量`, visible: true },
|
|
|
|
|
{ key: 10, label: `销售数量`, visible: false },
|
|
|
|
|
{ key: 11, label: `计划交货日期`, visible: true },
|
|
|
|
|
{ key: 12, label: `计划数量`, visible: true },
|
|
|
|
|
{ key: 13, label: `已派工数量`, visible: false },
|
|
|
|
|
{ key: 14, label: `完成数量`, visible: true },
|
|
|
|
|
{ key: 15, label: `发布时间`, visible: true },
|
|
|
|
|
{ key: 15, label: `发布时间`, visible: false },
|
|
|
|
|
{ key: 16, label: `计划开始时间`, visible: true },
|
|
|
|
|
{ key: 17, label: `计划结束时间`, visible: true },
|
|
|
|
|
{ key: 18, label: `开始时间`, visible: true },
|
|
|
|
|
{ key: 19, label: `完成时间`, visible: true },
|
|
|
|
|
{ key: 18, label: `实际开始时间`, visible: true },
|
|
|
|
|
{ key: 19, label: `实际完成时间`, visible: true },
|
|
|
|
|
{ key: 20, label: `订单状态`, visible: true },
|
|
|
|
|
{ key: 21, label: `库存锁定标识`, visible: false },
|
|
|
|
|
{ key: 22, label: `前置生产订单ID`, visible: false },
|
|
|
|
|
{ key: 23, label: `前置订单编号`, visible: false },
|
|
|
|
|
{ key: 24, label: `完成标识`, visible: true },
|
|
|
|
|
{ key: 25, label: `是否已下达工单`, visible: true },
|
|
|
|
|
{ key: 26, label: `订单版本`, visible: true },
|
|
|
|
|
{ key: 27, label: `工厂ID`, visible: true },
|
|
|
|
|
{ key: 25, label: `下达工单`, visible: true },
|
|
|
|
|
{ key: 26, label: `订单版本`, visible: false },
|
|
|
|
|
{ key: 27, label: `工厂ID`, visible: false },
|
|
|
|
|
{ key: 28, label: `备注`, visible: false },
|
|
|
|
|
{ key: 29, label: `创建部门`, visible: false },
|
|
|
|
|
{ key: 30, label: `创建人`, visible: false },
|
|
|
|
@ -358,7 +369,7 @@ const initFormData: OrderInfoForm = {
|
|
|
|
|
orderType: '1',
|
|
|
|
|
materialId: undefined,
|
|
|
|
|
materialBomId: undefined,
|
|
|
|
|
dispatchType: '2',
|
|
|
|
|
dispatchType: undefined,
|
|
|
|
|
dispatchId: undefined,
|
|
|
|
|
saleAmount: undefined,
|
|
|
|
|
planDeliveryDate: undefined,
|
|
|
|
@ -518,5 +529,42 @@ const handleExport = () => {
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList();
|
|
|
|
|
dispatchTypeFunction(); //派工类型(1产线 2工艺路线 3工序)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const dispatchTypeFunction = async () => {
|
|
|
|
|
const dispatchTypeRes = await proxy?.getConfigKey('sys.orderInfo.dispatchType');
|
|
|
|
|
initFormData.dispatchType = dispatchTypeRes.data;
|
|
|
|
|
if (dispatchTypeRes.data === '1'){
|
|
|
|
|
dispatchTypeName.value = "产线";
|
|
|
|
|
const res = await getProdLineList(null);
|
|
|
|
|
dispatchTypeList.value = res.data.map(item => ({
|
|
|
|
|
id: item.prodLineId,
|
|
|
|
|
name: item.prodLineName
|
|
|
|
|
}));
|
|
|
|
|
} else if (dispatchTypeRes.data === '2'){
|
|
|
|
|
dispatchTypeName.value = "工艺路线";
|
|
|
|
|
const res = await getBaseRouteList(null);
|
|
|
|
|
dispatchTypeList.value = res.data.map(item => ({
|
|
|
|
|
id: item.routeId,
|
|
|
|
|
name: item.routeName
|
|
|
|
|
}));
|
|
|
|
|
} else if (dispatchTypeRes.data === '3'){
|
|
|
|
|
dispatchTypeName.value = "工序";
|
|
|
|
|
const res = await getProcessInfoList(null);
|
|
|
|
|
dispatchTypeList.value = res.data.map(item => ({
|
|
|
|
|
id: item.processId,
|
|
|
|
|
name: item.processName
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleDispatch = (row) => {
|
|
|
|
|
const productOrderId = row.productOrderId || this.ids[0];
|
|
|
|
|
const orderCode = row.orderCode;
|
|
|
|
|
const params = {queryParams: queryParams};
|
|
|
|
|
// this.$tab.closeOpenPage(router.currentRoute);
|
|
|
|
|
proxy?.$tab.openPage( '/mes/product-plan/index/' + productOrderId,"任务[" + orderCode + "]生产派工", params);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|