From 9d68ec6e7019e8b3bf5ee20db27efe95a91b41fd Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期三, 07 五月 2025 13:50:25 +0800
Subject: [PATCH] 提交标准工艺路线静态页与联调
---
src/utils/i18n/locales/plan/index.js | 1
src/views/basicData/processRouteDataPreparate/index.vue | 260 ++++++++++++++++++++++++++-----------------
src/utils/i18n/locales/basic/index.js | 16 ++
src/api/basicData/processRoute.js | 18 +++
src/views/basicData/bom/index.vue | 14 +-
5 files changed, 194 insertions(+), 115 deletions(-)
diff --git a/src/api/basicData/processRoute.js b/src/api/basicData/processRoute.js
index ef13cba..afa5cf7 100644
--- a/src/api/basicData/processRoute.js
+++ b/src/api/basicData/processRoute.js
@@ -1,5 +1,23 @@
import request from '@/utils/request'
+// /ApsStandardProcessRouteLine/list
+
+// /ApsStandardProcessRouteHeader/list
+export function apsStandardProcessRouteHeaderList(query) {
+ return request({
+ url: '/aps/ApsStandardProcessRouteHeader/list',
+ method: 'get',
+ params: query
+ })
+}
+export function apsStandardProcessRouteLineList(query) {
+ return request({
+ url: '/aps/ApsStandardProcessRouteLine/list',
+ method: 'get',
+ params: query
+ })
+}
+
// 鏌ヨ宸ヨ壓璺嚎鍒楄〃
export function listProcessRoute(query) {
return request({
diff --git a/src/utils/i18n/locales/basic/index.js b/src/utils/i18n/locales/basic/index.js
index 06640e5..8c4e7d7 100644
--- a/src/utils/i18n/locales/basic/index.js
+++ b/src/utils/i18n/locales/basic/index.js
@@ -11,7 +11,11 @@
parentPartNumber:"鐖剁骇鏂欏彿",
parentMaterialDescription:"鐖剁骇鐗╂枡鎻忚堪",
materialDescription:"鐗╂枡鎻忚堪",
- usage:"鐢ㄩ噺"
+ usage:"鐢ㄩ噺",
+ operationSequence: "宸ュ簭搴忓彿",
+ applicableWorkshop:"閫傜敤杞﹂棿",
+ productivityModel: "浜ц兘妯″瀷",
+ designCapacity:"璁捐浜ц兘"
}
};
@@ -21,13 +25,17 @@
table: {
processRouteID:"Process route ID",
processRouteVersion:"Process route version",
- effectiveDate:"effective date",
- expiringDate:"expiring date",
+ effectiveDate:"Effective date",
+ expiringDate:"Expiring date",
integrationDate:"Integration date",
applicableFactories:"Applicable factories",
parentPartNumber:"Parent part number",
parentMaterialDescription:"Parent material description",
materialDescription:"Material Description",
- usage:"usage"
+ usage:"Usage",
+ operationSequence: "Operation sequence ",
+ applicableWorkshop:"Applicable workshop",
+ productivityModel:"Productivity model",
+ designCapacity:"Design capacity"
}
};
diff --git a/src/utils/i18n/locales/plan/index.js b/src/utils/i18n/locales/plan/index.js
index 71ff675..06a20fe 100644
--- a/src/utils/i18n/locales/plan/index.js
+++ b/src/utils/i18n/locales/plan/index.js
@@ -45,6 +45,7 @@
selectDateRange: "閫夋嫨鍖洪棿",
requireTraceID: "闇�姹傝拷婧疘D",
itemNumber: "鏂欏彿",
+
},
upload: {
prevText: "灏嗘枃浠舵嫋鍒版澶勶紝鎴�",
diff --git a/src/views/basicData/bom/index.vue b/src/views/basicData/bom/index.vue
index 1f8c94e..1ece0d6 100644
--- a/src/views/basicData/bom/index.vue
+++ b/src/views/basicData/bom/index.vue
@@ -7,13 +7,13 @@
:rules="rules"
:inline="true"
v-show="showSearch"
- :label-width="locale === 'zh' ? '90px' : '120px'"
+ :label-width="locale === 'zh' ? '90px' : '160px'"
>
<el-row :gutter="20">
- <el-col :span="10">
+ <el-col :span="9">
<el-form-item :label="$t('plan.query.itemNumber')" prop="itemCode">
<el-input
- style="width: 240px"
+ style="width: 210px"
v-model="queryParams.itemCode"
:placeholder="`${$t('common.common.placeholder')}${$t(
'plan.query.itemNumber'
@@ -23,16 +23,16 @@
/>
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="9">
<el-form-item
- label="閫傜敤宸ュ巶"
+ :label="$t('plan.table.applicableFactories')"
prop="orgCode"
>
<el-select
clearable
v-model="queryParams.orgCode"
- style="width: 160px"
- placeholder="璇疯緭鍏ラ�傜敤宸ュ巶"
+ :style="{width: locale=='zh'?'160px':'250px'}"
+ :placeholder="`${$t('common.common.placeholder')}${$t('plan.table.applicableFactories')}`"
>
<el-option
v-for="plant in plantList"
diff --git a/src/views/basicData/processRouteDataPreparate/index.vue b/src/views/basicData/processRouteDataPreparate/index.vue
index f30c099..213e5c7 100644
--- a/src/views/basicData/processRouteDataPreparate/index.vue
+++ b/src/views/basicData/processRouteDataPreparate/index.vue
@@ -7,10 +7,10 @@
:rules="rules"
:inline="true"
v-show="showSearch"
- :label-width="locale === 'zh' ? '90px' : '120px'"
+ :label-width="locale === 'zh' ? '90px' : '160px'"
>
<el-row :gutter="20">
- <el-col :span="6">
+ <el-col :span="9">
<el-form-item :label="$t('plan.query.itemNumber')" prop="itemCode">
<el-input
style="width: 240px"
@@ -23,7 +23,30 @@
/>
</el-form-item>
</el-col>
- <el-col :span="18" style="text-align: right">
+ <el-col :span="9">
+ <el-form-item
+ :label="$t('plan.table.applicableFactories')"
+ prop="orgCode"
+ >
+ <el-select
+ clearable
+ v-model="queryParams.orgCode"
+ :style="{ width: locale == 'zh' ? '160px' : '250px' }"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.table.applicableFactories'
+ )}`"
+ >
+ <el-option
+ v-for="plant in plantList"
+ :key="plant.id"
+ :label="plant.plantName"
+ :value="plant.plantCode"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6" style="text-align: right">
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">{{
$t("common.common.query")
@@ -56,7 +79,7 @@
<HxlhTable
style="width: 100%"
:columns="columns"
- :data="planList"
+ :data="processRouteList"
:loading="loading"
:height="height"
@on-checkbox="handleCheckboxChange"
@@ -94,12 +117,12 @@
</template>
<script setup name="ApsPlatePlan">
+import { listAll_plant } from "@/api/basicData/plant";
import {
- listPlan,
- examplePlan,
- confirmPart,
-} from "@/api/mainPlan/apsPlatePlan.js";
-import { listProcessRoute } from "@/api/basicData/processRoute.js";
+ apsStandardProcessRouteHeaderList,
+ apsStandardProcessRouteLineList,
+} from "@/api/basicData/processRoute.js";
+import { listAll_shop } from "@/api/basicData/shop";
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
@@ -113,21 +136,12 @@
current: 1,
size: 10,
});
-const {
- aps_is_suspended,
- aps_document_status,
- aps_account,
- aps_business_type,
-} = proxy.useDict(
- "aps_is_suspended",
- "aps_document_status",
- "aps_account",
- "aps_business_type"
-);
-
-const planList = ref([]);
+const plantList = ref([]);
+const shopList = ref([]);
+const processRouteList = ref([]);
+const subGridOptions = ref([]);
const subList = ref([]);
-const loading = ref(true);
+const loading = ref(false);
const showSearch = ref(true);
const single = ref(true);
const total = ref(0);
@@ -142,8 +156,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- customer: null,
- documentNumber: null,
itemCode: null,
},
rules: {
@@ -173,38 +185,128 @@
// },
// { type: "checkbox", width: 60, align: "center" },
{
- title: t("basic.table.processRouteVersion"),
- field: "mainPartNumber",
+ title: t("basic.table.processRouteID"),
+ field: "routeId",
},
{
title: t("basic.table.processRouteVersion"),
- field: "businessType",
+ field: "version",
},
{
title: t("plan.table.itemNumber"),
- field: "documentNumber",
+ field: "itemCode",
},
{
title: t("basic.table.effectiveDate"),
- field: "requirementType",
+ field: "startDate",
},
{
title: t("basic.table.expiringDate"),
- field: "documentStatus",
+ field: "endDate",
},
{
title: t("basic.table.integrationDate"),
- field: "itemNumber",
+ field: "createTime",
},
{
title: t("basic.table.applicableFactories"),
- field: "drawingNo",
+ field: "orgCode",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < plantList.value.length; i++) {
+ if (cellValue === plantList.value[i].plantCode) {
+ return plantList.value[i].plantName;
+ }
+ }
+ }
+ },
},
{
title: "鎿嶄綔",
width: 100,
fixed: "right",
slots: { default: "buttons" },
+ align: "center",
+ },
+ ];
+ subGridOptions.value = [
+ {
+ title: t("basic.table.processRouteID"),
+ field: "routeId",
+ width: 150,
+ align: "center",
+ },
+ {
+ title: t("basic.table.operationSequence"),
+ field: "routeNum",
+ width: 150,
+ align: "center",
+ },
+ {
+ title: t("plan.table.processName"),
+ field: "routeName",
+ width: 150,
+ align: "center",
+ },
+ {
+ title: t("basic.table.effectiveDate"),
+ field: "startDate",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("basic.table.expiringDate"),
+ field: "endDate",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("basic.table.integrationDate"),
+ field: "createTime",
+ width: 200,
+ align: "center",
+ },
+ {
+ title: t("basic.table.applicableFactories"),
+ field: "orgCode",
+ width: 90,
+ align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < plantList.value.length; i++) {
+ if (cellValue === plantList.value[i].plantCode) {
+ return plantList.value[i].plantName;
+ }
+ }
+ }
+ },
+ },
+ {
+ title: t("basic.table.applicableWorkshop"),
+ field: "shopCode",
+ width: 90,
+ align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < shopList.value.length; i++) {
+ if (cellValue === shopList.value[i].id) {
+ return shopList.value[i].shopName;
+ }
+ }
+ }
+ return "";
+ },
+ },
+ {
+ title: t("basic.table.productivityModel"),
+ field: "productivityModel",
+ width: 160,
+ align: "center",
+ },
+ {
+ title: t("basic.table.designCapacity"),
+ field: "designCapacity",
+ width: 160,
align: "center",
},
];
@@ -227,8 +329,10 @@
function getList() {
loading.value = true;
queryParams.value.params = {};
- listPlan(queryParams.value).then((response) => {
- planList.value = response.rows;
+ apsStandardProcessRouteHeaderList(queryParams.value).then((response) => {
+ processRouteList.value = response.rows;
+ loading.value = false;
+ }).catch(()=>{
loading.value = false;
});
}
@@ -244,82 +348,24 @@
/** 閲嶇疆鎸夐挳鎿嶄綔 */
function resetQuery() {
+ page.value.current = 1;
+ page.value.total = 0;
+ queryParams.value.pageNum = 1;
proxy.resetForm("queryRef");
- handleQuery();
+ processRouteList.value = [];
+ subList.value = [];
}
function handleCheckView(row) {
openDialog.value = true;
- listProcessRoute({ workOrderNo: row.documentNumber }).then(
- (data) => {
- subList.value = data.rows;
- })
+ apsStandardProcessRouteLineList({
+ routeId: row.routeId,
+ }).then((data) => {
+ subList.value = data.rows;
+ });
}
// /*瀹氫箟涓嬫媺浜岀骇琛�*/
-
-const subGridOptions = ref([
- {
- title: "宸ヨ壓璺嚎ID",
- field: "itemNo",
- width: 150,
- align: "center",
- },
- {
- title: "宸ュ簭搴忓彿",
- field: "workOrderNo",
- width: 150,
- align: "center",
- },
- {
- title: "宸ュ簭鍚嶇О",
- field: "processNumber",
- width: 100,
- align: "center",
- },
- {
- title: "鐢熸晥鏃ユ湡",
- field: "processName",
- width: 150,
- align: "center",
- },
- {
- title: "澶辨晥鏃ユ湡",
- field: "processPlanStartDay",
- width: 200,
- align: "center",
- },
- {
- title: "闆嗘垚鏃ユ湡",
- field: "processPlanEndDay",
- width: 200,
- align: "center",
- },
- {
- title: "閫傜敤宸ュ巶",
- field: "standardTime",
- width: 90,
- align: "center",
- },
- {
- title: "閫傜敤杞﹂棿",
- field: "processOrder",
- width: 90,
- align: "center",
- },
- {
- title: "浜ц兘妯″瀷",
- field: "integrationDay",
- width: 160,
- align: "center",
- },
- {
- title: "璁捐浜ц兘",
- field: "integrationDay",
- width: 160,
- align: "center",
- },
- ])
// const expandConfig = ref({
// lazy: true,
// loadMethod({ row }) {
@@ -332,7 +378,13 @@
// },
// });
-getList();
+// getList();
+onMounted(async () => {
+ const res = await listAll_plant({});
+ plantList.value = res.data;
+ const shopres = await listAll_shop({});
+ shopList.value = shopres.data;
+});
</script>
<style lang="css" scoped>
h4 {
--
Gitblit v1.9.3