diff --git a/src/api/mes/productPlanDetail/types.ts b/src/api/mes/productPlanDetail/types.ts
index f959660..0c119e6 100644
--- a/src/api/mes/productPlanDetail/types.ts
+++ b/src/api/mes/productPlanDetail/types.ts
@@ -139,6 +139,13 @@ export interface ProductPlanDetailVO {
*/
remark: string;
+ toolingName: string;
+
+ shiftName: string;
+
+ teamName: string;
+
+
}
export interface ProductPlanDetailForm extends BaseEntity {
@@ -284,6 +291,12 @@ export interface ProductPlanDetailForm extends BaseEntity {
workshopId?: string | number;
+ toolingName?: string;
+
+ shiftName?: string;
+
+ teamName?: string;
+
}
export interface ProductPlanDetailQuery extends PageQuery {
@@ -427,6 +440,13 @@ export interface ProductPlanDetailQuery extends PageQuery {
* 日期范围参数
*/
params?: any;
+
+
+ toolingName?: string;
+
+ shiftName?: string;
+
+ teamName?: string;
}
diff --git a/src/views/mes/baseMeasurementUnitInfo/index.vue b/src/views/mes/baseMeasurementUnitInfo/index.vue
index b1d97c8..bf48293 100644
--- a/src/views/mes/baseMeasurementUnitInfo/index.vue
+++ b/src/views/mes/baseMeasurementUnitInfo/index.vue
@@ -10,7 +10,7 @@
-->
-
+
@@ -99,10 +99,10 @@
-
+
-
-
+
+
@@ -120,12 +120,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -164,39 +164,78 @@
+
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
-
+
+
+
+
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
@@ -267,6 +313,12 @@ import {
updateProductPlanDetail
} from '@/api/mes/productPlanDetail';
import { ProductPlanDetailVO, ProductPlanDetailQuery, ProductPlanDetailForm } from '@/api/mes/productPlanDetail/types';
+import {getUserList} from "@/api/system/user";
+import {getBaseShiftInfoList} from "@/api/mes/baseShiftInfo";
+import {getBaseClassTeamInfoList} from "@/api/mes/baseClassTeamInfo";
+import {getBaseToolingInfoList} from "@/api/mes/baseToolingInfo";
+import {getBaseMeasurementUnitInfoList} from "@/api/mes/baseMeasurementUnitInfo";
+import {getPlanInfoList} from "@/api/mes/planInfo";
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { mes_plan_detail_status, active_flag } = toRefs(proxy?.useDict('mes_plan_detail_status', 'active_flag'));
@@ -300,14 +352,14 @@ const columns = ref([
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `租户编号`, visible: false },
{ key: 2, label: `明细编号`, visible: true },
- { key: 3, label: `生产计划ID`, visible: false },
+ { key: 3, label: `生产计划`, visible: false },
{ key: 4, label: `计划编号`, visible: true },
- { key: 5, label: `操作人员ID`, visible: false },
+ { key: 5, label: `操作人员`, visible: false },
{ key: 6, label: `操作人员名称`, visible: true },
{ key: 7, label: `班次名称`, visible: true },
{ key: 8, label: `班组名称`, visible: true },
{ key: 9, label: `完成数量`, visible: true },
- { key: 10, label: `单位ID`, visible: false },
+ { key: 10, label: `单位`, visible: false },
{ key: 11, label: `单位名称`, visible: true },
{ key: 12, label: `实际开始时间`, visible: true },
{ key: 13, label: `实际完成时间`, visible: true },
@@ -316,11 +368,11 @@ const columns = ref([
{ key: 16, label: `流转条码`, visible: true },
{ key: 17, label: `车次`, visible: true },
{ key: 18, label: `工装名称`, visible: true },
- { key: 19, label: `胶囊ID`, visible: false },
- { key: 20, label: `接班ID`, visible: false },
- { key: 21, label: `半制品明细ID`, visible: false },
- { key: 22, label: `成型明细ID`, visible: false },
- { key: 23, label: `硫化明细ID`, visible: false },
+ { key: 19, label: `胶囊`, visible: false },
+ { key: 20, label: `接班`, visible: false },
+ { key: 21, label: `半制品明细`, visible: false },
+ { key: 22, label: `成型明细`, visible: false },
+ { key: 23, label: `硫化明细`, visible: false },
{ key: 24, label: `明细状态`, visible: true },
{ key: 25, label: `首件标识`, visible: true },
{ key: 26, label: `报警胎标识`, visible: false },
@@ -363,7 +415,10 @@ const initFormData: ProductPlanDetailForm = {
alarmFlag: '0',
suppleFlag: '1',
remark: undefined,
- workshopId: undefined
+ workshopId: undefined,
+ toolingName: undefined,
+ shiftName: undefined,
+ teamName: undefined,
};
const data = reactive>({
form: { ...initFormData },
@@ -398,6 +453,9 @@ const data = reactive>({
alarmFlag: undefined,
suppleFlag: undefined,
workshopId: undefined,
+ toolingName: undefined,
+ shiftName: undefined,
+ teamName: undefined,
params: {}
},
rules: {
@@ -407,7 +465,7 @@ const data = reactive>({
planId: [
{ required: true, message: '生产计划ID不能为空', trigger: 'blur' }
],
- planDetailCode: [
+/* planDetailCode: [
{ required: true, message: '明细编号不能为空', trigger: 'blur' }
],
planCode: [
@@ -421,7 +479,7 @@ const data = reactive>({
],
completeAmount: [
{ required: true, message: '完成数量不能为空', trigger: 'blur' }
- ]
+ ]*/
}
});
@@ -471,6 +529,12 @@ const handleSelectionChange = (selection: ProductPlanDetailVO[]) => {
/** 新增按钮操作 */
const handleAdd = () => {
reset();
+ getPlanCodeSelect();
+ getUnitSelect();
+ getToolingSelect();
+ getClassTeamSelect();
+ getShiftSelect();
+ getUserSelect();
dialog.visible = true;
dialog.title = '添加生产信息';
};
@@ -478,6 +542,12 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ProductPlanDetailVO) => {
reset();
+ getPlanCodeSelect();
+ getUnitSelect();
+ getToolingSelect();
+ getClassTeamSelect();
+ getShiftSelect();
+ getUserSelect();
const _planDetailId = row?.planDetailId || ids.value[0];
const res = await getProductPlanDetail(_planDetailId, form.value.workshopId);
Object.assign(form.value, res.data);
@@ -518,6 +588,68 @@ const handleExport = () => {
}, `productPlanDetail_${new Date().getTime()}.xlsx`);
};
+let userOptions = ref([]);
+const getUserSelect = async () => {
+ let res = await getUserList(null);
+ userOptions.value = res.data;
+};
+
+let shiftOptions = ref([]);
+const getShiftSelect = async () => {
+ let res = await getBaseShiftInfoList(null);
+ shiftOptions.value = res.data;
+};
+
+let classTeamOptions = ref([]);
+const getClassTeamSelect = async () => {
+ let res = await getBaseClassTeamInfoList(null);
+ classTeamOptions.value = res.data;
+};
+
+let toolingOptions = ref([]);
+const getToolingSelect = async () => {
+ let res = await getBaseToolingInfoList(null);
+ toolingOptions.value = res.data;
+};
+
+let unitOptions = ref([]);
+const getUnitSelect = async () => {
+ let res = await getBaseMeasurementUnitInfoList(null);
+ unitOptions.value = res.data;
+};
+
+let planCodeOptions = ref([]);
+const getPlanCodeSelect = async () => {
+ let res = await getPlanInfoList(null);
+ planCodeOptions.value = res.data;
+};
+
+
+/** 用户选择变化时更新用户名 */
+const handleUserChange = (userId: string | number) => {
+ const selectedUser = userOptions.value.find(user => user.userId === userId);
+ if (selectedUser) {
+ form.value.userName = selectedUser.userName;
+ }
+};
+
+/** 单位选择变化时更新单位名 */
+const handleUnitChange = (unitId: string | number) => {
+ const selectedUnit = unitOptions.value.find(unit => unit.unitId === unitId);
+ if (selectedUnit) {
+ form.value.unitName = selectedUnit.unitName;
+ }
+};
+
+/** 计划选择变化时更新计划名 */
+const handlePlanChange = (planId: string | number) => {
+ const selectedPlan = planCodeOptions.value.find(plan => plan.planId === planId);
+ if (selectedPlan) {
+ form.value.planCode = selectedPlan.planCode;
+ }
+};
+
+
onMounted(() => {
getWorkshopId();
getList();