瀏覽代碼

批次详情-第2版

wangxin 1 年之前
父節點
當前提交
16c275ac6d

+ 7 - 0
src/api/business/technologicalAmend.js

@@ -18,4 +18,11 @@ export function addAmend(lotId,data) {
     method: 'post',
     data: data
   })
+}
+
+export function lotParticulars(lotCode) { 
+  return request({
+    url: baseUrl + '/business/amend/lotParticulars/'+lotCode,
+    method: 'get',
+  })
 }

+ 1 - 1
src/router/index.js

@@ -187,7 +187,7 @@ export const dynamicRoutes = [
     permissions: ['business:productionPlan:query'],
     children: [
       {
-        path: 'lotFormParticulars',
+        path: 'lotFormParticulars/:lotCode(.*)',
         component: () => import('@/views/business/reviseBath/lotFormParticulars'),
         name: 'LotProductionPlan',
         meta: {

+ 0 - 7
src/views/business/reviseBath/empty.vue

@@ -1,7 +0,0 @@
-<template></template>
-
-<script setup name="empty">
-</script>
-
-<style>
-</style>

+ 52 - 44
src/views/business/reviseBath/lotFormParticulars.vue

@@ -1,16 +1,17 @@
 <template>
-  <div class="page-container column-container">
+  <!-- v-if="!loading" -->
+  <div class="page-container column-container" v-loading="loading">
     <el-form
       class="list-search"
       style=""
-      :model="queryParams"
+      :model="lot"
       ref="queryRef"
       :inline="true"
     >
       <el-row style="margin-top: 10px">
         <el-form-item class="bold-large">
           <span>{{ "批次号:" }}</span>
-          <span>{{ queryParams.productionPlanNo }}</span>
+          <span>{{ lot.lotCode }}</span>
         </el-form-item>
         <el-form-item>
           <el-tag class="spacing" type="success">{{ "进行中" }}</el-tag>
@@ -25,50 +26,54 @@
       <el-row :gutter="24" style="margin-top: 10px">
         <el-col :span="6">
           <el-form-item label="客户简称" class="custom-label">
-            <span>{{ queryParams.nickName }}</span>
+            <span>{{ lot.productionPlanDetail.companyAlias }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="6">
           <el-form-item label="生产计划单" class="custom-label">
-            <span>{{ queryParams.productionPlan }}</span>
+            <span>{{ lot.productionPlanDetail.productionPlanNo }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="6">
           <el-form-item label="序号" class="custom-label">
-            <span style="margin-left: 28px">{{ queryParams.num }}</span>
+            <span style="margin-left: 28px">{{
+              lot.productionPlanDetail.lineNumber
+            }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="产品描述" class="custom-label">
-            <span>{{ queryParams.productDescription }}</span>
+            <span>{{ lot.productionPlanDetail.productDescription }}</span>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row :gutter="24" style="margin-top: 10px">
         <el-col :span="6">
           <el-form-item label="图纸版本" class="custom-label">
-            <span>{{ queryParams.technologyVersion }}</span>
+            <span>{{ lot.technologyVersion }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="6">
           <el-form-item label="单批量" class="custom-label">
-            <span style="margin-left: 23px">{{
-              queryParams.productionQuantity
+            <span style="margin-left: 28px">{{
+              lot.productionPlanDetail.productionQuantity
             }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="6">
           <el-form-item label="领料部门" class="custom-label">
-            <span>{{ queryParams.requisitionDepartmentCode }}</span>
+            <span>{{
+              lot.productionPlanDetail.requisitionDepartmentName
+            }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="下达日期" class="custom-label">
-            <span>{{ queryParams.createTime }}</span>
+            <span>{{ lot.productionPlanDetail.issueDate }}</span>
           </el-form-item>
         </el-col>
       </el-row>
@@ -76,7 +81,7 @@
       <el-row :gutter="24" style="margin-top: 10px">
         <el-col :span="6">
           <el-form-item label="当前箱号" class="custom-label">
-            <span>{{ queryParams.technologyVersion }}</span>
+            <span>{{}}</span>
           </el-form-item>
         </el-col>
 
@@ -92,60 +97,62 @@
       <el-row :gutter="30" style="margin-top: 10px">
         <el-col :span="4">
           <el-form-item label="炉号" class="custom-label">
-            <span>{{ queryParams.furnaceNumber }}</span>
+            <span>{{ lot.furnaceNoInfo.furnaceNumber }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="厂家" class="custom-label">
-            <span>{{ queryParams.manufacturers }}</span>
+            <span>{{ lot.furnaceNoInfo.factory }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="牌号" class="custom-label">
-            <span style="margin-left: 28px">{{ queryParams.plateNum }}</span>
+            <span style="margin-left: 28px">{{
+              lot.furnaceNoInfo.brandNumber
+            }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="规格" class="custom-label">
-            <span>{{ queryParams.specification }}</span>
+            <span>{{ lot.furnaceNoInfo.spec }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="形状" class="custom-label">
-            <span>{{ queryParams.shape }}</span>
+            <span>{{ lot.furnaceNoInfo.shape }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="材料直径" class="custom-label">
-            <span>{{ queryParams.specification }}</span>
+            <span>{{ lot.furnaceNoInfo.diameter }}</span>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row :gutter="30" style="margin-top: 10px">
         <el-col :span="4">
           <el-form-item label="原料编码" class="custom-label">
-            <span>{{ queryParams.specification }}</span>
+            <span>{{ lot.furnaceNoInfo.rawMaterialCode }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="来料日期" class="custom-label">
-            <span>{{ queryParams.createTime }}</span>
+            <span>{{ lot.furnaceNoInfo.incomingDate }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="材质1" class="custom-label">
             <span style="margin-left: 28px">{{
-              queryParams.materialCode
+              lot.furnaceNoInfo.firstTechnicalRequirement
             }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="材质2" class="custom-label">
-            <span>{{ "-" }}</span>
+            <span>{{ lot.furnaceNoInfo.secondTechnicalRequirement }}</span>
           </el-form-item>
         </el-col>
       </el-row>
@@ -202,39 +209,40 @@
       </div>
     </div>
   </div>
+  <!-- <div v-else class="loading-indicator">Loading...</div> -->
 </template>
 
 <script setup name="LotProductionPlan">
 import { ref } from "vue";
+import { lotParticulars } from "@/api/business/technologicalAmend.js";
 const { proxy } = getCurrentInstance();
 
 /** 查询 对象 */
 const productionPlanList = ref([]);
-const loading = ref(false);
+const loading = ref(true);
+const route = useRoute();
+const lot = ref({
+  productionPlanDetail: {
+    companyAlias: "",
+  },
+  furnaceNoInfo: {},
+}); //批次信息
 
 /** 查询对象 */
-const queryParams = ref({
-  productionPlanNo: "D24407250040",
-  nickName: "万都博泽",
-  productionPlan: "D243087",
-  num: 2,
-  productDescription: "博世_0395614149_15*110.1",
-  technologyVersion: "A",
-  productionQuantity: 800,
-  requisitionDepartmentCode: "NCZ",
-  createTime: "2023-10-15",
-  vehicle: "X12552,B1452,T4123,W2585",
-  furnaceNumber: "E22304418",
-  manufacturers: "MINGFAJI明发金属",
-  plateNum: "40Cr-T",
-  specification: "15*110.1",
-  shape: "直条",
-  diameter: "15.00",
-  productCode: "1463242226",
-  materialCode: "详见技术标准",
-});
 
 /****************************  方法区  ****************************/
+(() => {
+  const lotCode = route.params && route.params.lotCode;
+  if (lotCode) {
+    lotParticulars(lotCode).then((res) => {
+      if (res.code == 200) {
+        console.log("res", res);
+        lot.value = res.data;
+        loading.value = false;
+      }
+    });
+  }
+})();
 </script>
 
 <style lang="scss" scoped>

+ 38 - 36
src/views/business/reviseBath/producedLotForm.vue

@@ -60,11 +60,11 @@
         </el-form-item>
         <el-form-item label="工序:">
           <el-select-v2
-              v-model="processAlias"
-              :options="processList"
-              placeholder="请选择工序"
-              style="width: 140px"
-              @change="handleProcessChange"
+            v-model="processAlias"
+            :options="processList"
+            placeholder="请选择工序"
+            style="width: 140px"
+            @change="handleProcessChange"
           />
         </el-form-item>
       </el-form>
@@ -184,12 +184,12 @@ const { yes_no } = proxy.useDict("yes_no");
 /** 表单抽屉 页变量 */
 const currentProductionPlan = ref({});
 const loading = ref(false);
-const lotList = ref([])
-const lotInfo = ref([])
+const lotList = ref([]);
+const lotInfo = ref([]);
 const visible = ref(false);
-const processList = ref([])
-const processAlias = ref(null)
-const deptList = ref([])
+const processList = ref([]);
+const processAlias = ref(null);
+const deptList = ref([]);
 /** 查询对象 */
 const queryParams = ref({
   pageNum: 1,
@@ -223,42 +223,44 @@ const open = (row) => {
 };
 /** 打开批次详情页 */
 function handleColumnClick(row) {
-  // proxy.$refs.lotFormParticularsRef.open(row);
-  // router.push({ path: "/reviseBath/lotFormParticulars/" + row.id });
-  router.push({ path: "/reviseBath/lotFormParticulars" });
+  router.push({ path: "/reviseBath/lotFormParticulars/" + row.lotCode });
 }
 /**获取生产计划列表 */
 function getProducedLotList() {
   loading.value = true;
-  processAlias.value = null
-  getProducedLot(queryParams.value).then(res => {
-    if(res.code == 200) {
-      lotList.value = res.rows
-      lotInfo.value = res.rows
-        res.rows.forEach(item => {
-  // 如果 processList 中不存在当前 processAlias,则添加到 processList 中
-  if (!processList.value.find(process => process.label === item.processAlias)) {
-    // 计算当前 processAlias 的唯一递增值
-    const count = processList.value.length;
-    processList.value.push({
-      label: item.processAlias,
-      value: count
-    });
-  }
-});
-    console.log(processList.value)
-      loading.value = false
+  processAlias.value = null;
+  getProducedLot(queryParams.value).then((res) => {
+    if (res.code == 200) {
+      lotList.value = res.rows;
+      lotInfo.value = res.rows;
+      res.rows.forEach((item) => {
+        // 如果 processList 中不存在当前 processAlias,则添加到 processList 中
+        if (
+          !processList.value.find(
+            (process) => process.label === item.processAlias
+          )
+        ) {
+          // 计算当前 processAlias 的唯一递增值
+          const count = processList.value.length;
+          processList.value.push({
+            label: item.processAlias,
+            value: count,
+          });
+        }
+      });
+      console.log(processList.value);
+      loading.value = false;
     }
   });
 }
 /**工序切换 */
 function handleProcessChange() {
-  console.log(processList.value[processAlias.value].label)
+  console.log(processList.value[processAlias.value].label);
   // 使用 some 方法检查是否存在于 processList 中
-  lotList.value = lotInfo.value.filter(item => {
-  // 检查当前对象的 processAlias 是否等于目标值
-  return item.processAlias == processList.value[processAlias.value].label;
-});
+  lotList.value = lotInfo.value.filter((item) => {
+    // 检查当前对象的 processAlias 是否等于目标值
+    return item.processAlias == processList.value[processAlias.value].label;
+  });
 }
 /**搜索 */
 function handleQuerydaywork() {