From 840e04c3878e27d0bc9784bb79e3559a8cbfbf32 Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期二, 13 五月 2025 15:41:00 +0800
Subject: [PATCH] 提交钣金计划工单修改
---
src/views/mainPlan/sheetMetalOrderManage/index.vue | 33 ++--
src/utils/i18n/locales/plan/index.js | 4
src/views/basicData/calendar/index.vue | 270 +++++++++++++++++++++++++++++++--------------
src/api/basicData/plant.js | 8 +
4 files changed, 214 insertions(+), 101 deletions(-)
diff --git a/src/api/basicData/plant.js b/src/api/basicData/plant.js
index 361687e..b20f59f 100644
--- a/src/api/basicData/plant.js
+++ b/src/api/basicData/plant.js
@@ -51,4 +51,12 @@
method: 'get',
params: query
})
+}
+
+export function listByWorkShop(query) {
+ return request({
+ url: '/aps/standardProcess/listByWorkShop',
+ method: 'get',
+ params: query
+ })
}
\ No newline at end of file
diff --git a/src/utils/i18n/locales/plan/index.js b/src/utils/i18n/locales/plan/index.js
index 802bf02..3568d42 100644
--- a/src/utils/i18n/locales/plan/index.js
+++ b/src/utils/i18n/locales/plan/index.js
@@ -5,7 +5,8 @@
viewAssociatedRequirements:"鏌ョ湅鍏宠仈闇�姹�",
setMode:"璁剧疆妯″紡",
CustomizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩",
- tipsBugSheetMetal:"灏嗙敓鎴愮殑閽i噾闇�姹傜殑璁″垝寮�宸ユ棩鍜岃鍒掑畬宸ユ棩璧嬪�肩粰宸ュ崟",
+ tipsBugSheetMetal:"灏嗚嚜瀹氫箟鐨勬棩鏈熻祴鍊肩粰宸ュ崟鐨勮鍒掑畬宸ユ棩",
+ tipsBugSheetMetal2:"灏嗚嚜瀹氫箟鐨勬棩鏈熻祴鍊肩粰宸ュ崟鐨勮鍒掑畬宸ユ棩",
metalWeldWork:"鐒婄紳宸ュ崟鏁版嵁",
parseUpload:"宸叉垚鍔熶笂浼犲拰瑙f瀽",
weld:"鐒婄紳"
@@ -218,6 +219,7 @@
setMode:"Set Mode",
CustomizePlannedCompletionDate:"Customize the planned completion date",
tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order",
+ tipsBugSheetMetal2:"Assign custom dates to the planned completion date of the work order",
weld:"weld seam",
},
options: {
diff --git a/src/views/basicData/calendar/index.vue b/src/views/basicData/calendar/index.vue
index 6b2d26d..8868a93 100644
--- a/src/views/basicData/calendar/index.vue
+++ b/src/views/basicData/calendar/index.vue
@@ -20,7 +20,24 @@
/>
</el-form-item>
</el-col>
- <el-col :span="18" style="text-align: right">
+ <el-col :span="6">
+ <el-form-item label="閫傜敤宸ュ巶" prop="plant">
+ <el-select
+ style="width: 140px"
+ clearable
+ v-model="queryParams.plant"
+ placeholder="閫傜敤宸ュ巶"
+ >
+ <el-option
+ v-for="item in aps_factory"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12" style="text-align: right">
<el-form-item class="column-with-margin">
<el-button type="primary" icon="Search" @click="handleQuery"
>鏌ヨ</el-button
@@ -139,7 +156,7 @@
</HxlhTable>
<!-- 娣诲姞鎴栦慨鏀规棩鍘嗙鐞嗗璇濇 -->
- <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+ <el-dialog :title="title" v-model="open" width="80%" append-to-body>
<el-form
ref="calendarRef"
:model="form"
@@ -150,10 +167,11 @@
<el-input v-model="form.description" placeholder="璇疯緭鍏ユ弿杩�" />
</el-form-item>
<el-form-item label="鏃ュ巻绫诲瀷" prop="type">
- <el-radio-group v-model="form.type" @change="handleSwitchType">
+ <!-- <el-radio-group v-model="form.type" @change="handleSwitchType">
<el-radio :label="'1'">鍛ㄥ伐浣�</el-radio>
<el-radio :label="'2'">鑺傚亣鏃�</el-radio>
- </el-radio-group>
+ </el-radio-group> -->
+ <el-tag type="primary">鍛ㄥ伐浣�</el-tag>
</el-form-item>
<el-form-item label="鐢熸晥鏃堕棿" prop="effectiveDate">
<el-date-picker
@@ -228,37 +246,44 @@
</div>
</div>
</div>
- <el-form-item
+ <!-- <el-form-item
label="閫傜敤宸ュ巶"
prop="applicableFactory"
class="factory_use_item"
+ > -->
+ <div class="select_factory">閫傜敤宸ュ巶/杞﹂棿/宸ュ簭</div>
+ <!-- <el-row :gutter="20" class="select_factory"> -->
+ <div
+ class="select_factory"
+ v-for="(item, index) in applicableSettingList"
+ :key="index"
>
+ <!-- <el-col :span="7"> -->
<el-select
+ class="select_content"
clearable
- v-model="form.applicableFactory"
+ v-model="item.factory"
style="width: 160px"
placeholder="璇疯緭鍏ラ�傜敤宸ュ巶"
@change="changePlant($event)"
>
<el-option
- v-for="plant in plantList"
- :key="plant.id"
- :label="plant.plantName"
- :value="plant.plantCode"
+ v-for="plant in aps_factory"
+ :key="plant.value"
+ :label="plant.label"
+ :value="plant.value"
>
</el-option>
</el-select>
- </el-form-item>
- <el-form-item
- label="閫傜敤杞﹂棿"
- prop="applicableWorkshop"
- class="factory_use_item"
- >
+ <!-- </el-col>
+ <el-col :span="7"> -->
<el-select
+ class="select_content"
clearable
- v-model="form.applicableWorkshop"
+ v-model="item.workshop"
style="width: 160px"
placeholder="璇疯緭鍏ラ�傜敤杞﹂棿"
+ @change="changeWorkshop($event)"
>
<el-option
v-for="shop in shopList"
@@ -268,15 +293,12 @@
>
</el-option>
</el-select>
- </el-form-item>
- <el-form-item
- label="閫傜敤宸ュ簭"
- prop="applicableProcess"
- class="factory_use_item"
- >
+ <!-- </el-col>
+ <el-col :span="7"> -->
<el-select
+ class="select_content"
clearable
- v-model="form.applicableProcess"
+ v-model="item.process"
style="width: 160px"
placeholder="璇疯緭鍏ラ�傜敤宸ュ簭"
>
@@ -288,7 +310,32 @@
>
</el-option>
</el-select>
+ <!-- </el-col>
+ <el-col :span="3"> -->
+ <el-button
+ class="select_content"
+ type="primary"
+ :icon="Plus"
+ @click="handleAddFactory(item)"
+ circle
+ size="small"
+ />
+ <!-- </el-col> -->
+ </div>
+ <!-- </el-row> -->
+ <!-- </el-form-item> -->
+ <!-- <el-form-item
+ label="閫傜敤杞﹂棿"
+ prop="applicableWorkshop"
+ class="factory_use_item"
+ >
</el-form-item>
+ <el-form-item
+ label="閫傜敤宸ュ簭"
+ prop="applicableProcess"
+ class="factory_use_item"
+ >
+ </el-form-item> -->
</el-form>
<template #footer>
<div class="dialog-footer">
@@ -301,6 +348,7 @@
</template>
<script setup name="Calendar">
+import { Plus } from "@element-plus/icons-vue";
import HxlhTable from "@/components/HxlhTable";
import {
listCalendar,
@@ -310,10 +358,11 @@
updateCalendar,
} from "@/api/basicData/calendar";
import axios from "axios";
-import { listAll_plant } from "@/api/basicData/plant";
+import { listAll_plant, listByWorkShop } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
const { proxy } = getCurrentInstance();
+const { aps_factory } = proxy.useDict("aps_factory");
const tableRef = ref();
const calendarList = ref([]);
const open = ref(false);
@@ -327,11 +376,19 @@
const data = reactive({
form: {
type: "1",
+ applicable: [
+ {
+ factory: "",
+ workshop: "",
+ process: "",
+ },
+ ],
},
queryParams: {
pageNum: 1,
pageSize: 10,
description: null,
+ plant: null,
type: null,
effectiveDate: null,
expiringDate: null,
@@ -348,13 +405,13 @@
trigger: "blur",
},
],
- type: [
- {
- required: true,
- message: "璇烽�夋嫨鏃ュ巻绫诲瀷",
- trigger: "blur",
- },
- ],
+ // type: [
+ // {
+ // required: true,
+ // message: "璇烽�夋嫨鏃ュ巻绫诲瀷",
+ // trigger: "blur",
+ // },
+ // ],
effectiveDate: [
{
required: true,
@@ -391,6 +448,9 @@
},
]);
const typeRadioNumber = ref(1);
+const applicableSettingList = ref([
+ { factory: "", workshop: "", process: "" },
+]);
const weekDaysSettingList = ref([
{
day: "Monday",
@@ -585,6 +645,13 @@
createTime: null,
updateBy: null,
updateTime: null,
+ applicable: [
+ {
+ factory: "",
+ workshop: "",
+ process: "",
+ },
+ ],
};
proxy.resetForm("calendarRef");
}
@@ -612,16 +679,35 @@
async function handleAdd() {
reset();
open.value = true;
+ form.value = {
+ applicable: [
+ {
+ factory: "",
+ workshop: "",
+ process: "",
+ },
+ ],
+ };
title.value = "娣诲姞鏃ュ巻绠$悊";
}
/** 閫夋嫨宸ュ巶鍚庝簨浠� 鍔犺浇杞﹂棿 鍜� 宸ュ簭 **/
function changePlant(plant) {
+ console.log(plant);
listAps_shop({ plantCode: plant }).then((response) => {
shopList.value = response.rows;
});
- selectProcessNameList({ orgCode: plant }).then((response) => {
- processList.value = response.rows;
+ // selectProcessNameList({ orgCode: plant }).then((response) => {
+ // processList.value = response.rows;
+ // });
+}
+function changeWorkshop(workShop) {
+ listByWorkShop({ workShop: "姘旀煖" }).then((res) => {
+ console.log(res, "workShop");
+ processList.value = res.rows;
});
+}
+function handleAddFactory(row) {
+ applicableSettingList.value.push(row);
}
/** 淇敼鎸夐挳鎿嶄綔 */
function handleUpdate(row) {
@@ -648,57 +734,60 @@
proxy.$refs["calendarRef"].validate((valid) => {
if (valid) {
if (form.value.id != null) {
- if (form.value.type === "1") {
- updateCalendar({
- ...form.value,
- content: {
- weekdays: weekDaysSettingList.value,
- },
- applicableWorkshop: form.value.applicableWorkshop,
- applicableProcess: form.value.applicableProcess,
- }).then((response) => {
- proxy.$modal.msgSuccess("淇敼鎴愬姛");
- open.value = false;
- getList();
- });
- } else if (form.value.type === "2") {
- updateCalendar({
- ...form.value,
- content: {
- holidays: holidays.value,
- },
- applicableWorkshop: form.value.applicableWorkshop,
- applicableProcess: form.value.applicableProcess,
- }).then((response) => {
- proxy.$modal.msgSuccess("淇敼鎴愬姛");
- open.value = false;
- getList();
- });
- }
+ // if (form.value.type === "1") {
+ // updateCalendar({
+ // ...form.value,
+ // content: {
+ // weekdays: weekDaysSettingList.value,
+ // },
+ // applicableWorkshop: form.value.applicableWorkshop,
+ // applicableProcess: form.value.applicableProcess,
+ // }).then((response) => {
+ // proxy.$modal.msgSuccess("淇敼鎴愬姛");
+ // open.value = false;
+ // getList();
+ // });
+ // } else if (form.value.type === "2") {
+ updateCalendar({
+ ...form.value,
+ content: {
+ holidays: holidays.value,
+ },
+ applicableWorkshop: form.value.applicableWorkshop,
+ applicableProcess: form.value.applicableProcess,
+ }).then((response) => {
+ proxy.$modal.msgSuccess("淇敼鎴愬姛");
+ open.value = false;
+ getList();
+ });
+ // }
} else {
- if (form.value.type === "1") {
- addCalendar({
- ...form.value,
- content: {
- weekdays: weekDaysSettingList.value,
- },
- }).then((response) => {
- proxy.$modal.msgSuccess("鏂板鎴愬姛");
- open.value = false;
- getList();
- });
- } else if (form.value.type === "2") {
- addCalendar({
- ...form.value,
- content: {
- holidays: holidays.value,
- },
- }).then((response) => {
- proxy.$modal.msgSuccess("鏂板鎴愬姛");
- open.value = false;
- getList();
- });
- }
+ // if (form.value.type === "1") {
+ // addCalendar({
+ // ...form.value,
+ // content: {
+ // weekdays: weekDaysSettingList.value,
+ // },
+ // }).then((response) => {
+ // proxy.$modal.msgSuccess("鏂板鎴愬姛");
+ // open.value = false;
+ // getList();
+ // });
+ // } else if (form.value.type === "2") {
+ addCalendar({
+ ...form.value,
+ content: {
+ weekdays: weekDaysSettingList.value,
+ },
+ holidays: holidays.value,
+ applicable: applicableSettingList.value,
+ //},
+ }).then((response) => {
+ proxy.$modal.msgSuccess("鏂板鎴愬姛");
+ open.value = false;
+ getList();
+ });
+ // }
}
}
});
@@ -806,6 +895,19 @@
.factory_use_item {
margin-top: 10px;
}
+.select_factory {
+ margin-left: 34px;
+ font-weight: 800;
+ font-size: 14px;
+ color: #606266;
+}
+.select_content {
+ margin-right: 10px;
+ margin-top: 20px;
+ // &:nth-child(1) {
+ // margin-left:34px;
+ // }
+}
.mart5 {
margin-top: 5px;
}
diff --git a/src/views/mainPlan/sheetMetalOrderManage/index.vue b/src/views/mainPlan/sheetMetalOrderManage/index.vue
index 63584eb..2ae876b 100644
--- a/src/views/mainPlan/sheetMetalOrderManage/index.vue
+++ b/src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -119,7 +119,7 @@
<el-button
type="primary"
plain
- icon="Plus"
+ icon="Refresh"
:disabled="multiple"
@click="handleBatchUpdatePlanDate"
v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
@@ -200,12 +200,13 @@
<el-radio :label="1">{{
$t("plan.btns.batchUpdateOrderDate")
}}</el-radio>
- <el-radio :label="2">{{
+ <!-- <el-radio :label="2">{{
$t("plan.title.CustomizePlannedCompletionDate")
- }}</el-radio>
+ }}</el-radio> -->
</el-radio-group>
</div>
- <div class="red_color">{{ $t("plan.title.tipsBugSheetMetal") }}</div>
+ <div class="red_color" v-if="radio === 1">{{ $t("plan.title.tipsBugSheetMetal") }}</div>
+ <div class="red_color" v-if="radio === 2">{{ $t("plan.title.tipsBugSheetMetal2") }}</div>
<div class="mode_box" v-if="radio === 2">
<span>{{ $t("plan.title.CustomizePlannedCompletionDate") }}</span>
<!-- <el-date-picker
@@ -504,18 +505,18 @@
width: 200,
align: "center",
},
- {
- title: t("basic.table.processRouteID"),
- field: "processRouteId",
- width: 200,
- align: "center",
- },
- {
- title: t("plan.table.processRouteWorkingHours"),
- field: "processRouteHours",
- width: 100,
- align: "center",
- },
+ // {
+ // title: t("basic.table.processRouteID"),
+ // field: "processRouteId",
+ // width: 200,
+ // align: "center",
+ // },
+ // {
+ // title: t("plan.table.processRouteWorkingHours"),
+ // field: "processRouteHours",
+ // width: 100,
+ // align: "center",
+ // },
{
title: t("plan.table.demandQuantity"),
field: "requireAmount",
--
Gitblit v1.9.3