浏览代码

批次详情页-第一版

wangxin 1 年之前
父节点
当前提交
1f03831d00

+ 1 - 1
src/api/business/technologicalAmend.js

@@ -11,7 +11,7 @@ export function getProcessList(query) {
   })
 }
 
-
+//新增修改后工艺信息
 export function addAmend(lotId,data) {
   return request({
     url: baseUrl + '/business/amend/addAmend/'+lotId,

+ 16 - 0
src/router/index.js

@@ -179,6 +179,22 @@ export const dynamicRoutes = [
         }
       }
     ]
+  },
+  {
+    path: '/reviseBath',
+    component: Layout,
+    hidden: true,
+    permissions: ['business:productionPlan:query'],
+    children: [
+      {
+        path: 'lotFormParticulars',
+        component: () => import('@/views/business/reviseBath/lotFormParticulars'),
+        name: 'LotProductionPlan',
+        meta: {
+          title: '批次详情'
+        }
+      }
+    ]
   }
 ]
 

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

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

+ 263 - 0
src/views/business/reviseBath/lotFormParticulars.vue

@@ -0,0 +1,263 @@
+<template>
+  <div class="page-container column-container">
+    <el-form
+      class="list-search"
+      style=""
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+    >
+      <el-row style="margin-top: 10px">
+        <el-form-item class="bold-large">
+          <span>{{ "批次号:" }}</span>
+          <span>{{ queryParams.productionPlanNo }}</span>
+        </el-form-item>
+        <el-form-item>
+          <el-tag class="spacing" type="success">{{ "进行中" }}</el-tag>
+          <el-tag class="spacing" type="primary">{{ "已完成" }}</el-tag>
+          <el-tag class="spacing" type="info">{{ "未开始" }}</el-tag>
+          <el-tag class="spacing" type="danger">{{ "报废" }}</el-tag>
+          <el-tag class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
+          <el-tag class="spacing" type="primary">{{ "废品回用" }}</el-tag>
+        </el-form-item>
+      </el-row>
+
+      <el-row :gutter="24" style="margin-top: 10px">
+        <el-col :span="6">
+          <el-form-item label="客户简称" class="custom-label">
+            <span>{{ queryParams.nickName }}</span>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="生产计划单" class="custom-label">
+            <span>{{ queryParams.productionPlan }}</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>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="产品描述" class="custom-label">
+            <span>{{ queryParams.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>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="单批量" class="custom-label">
+            <span style="margin-left: 23px">{{
+              queryParams.productionQuantity
+            }}</span>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="领料部门" class="custom-label">
+            <span>{{ queryParams.requisitionDepartmentCode }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="下达日期" class="custom-label">
+            <span>{{ queryParams.createTime }}</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>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="母批号" class="custom-label">
+            <span style="margin-left: 23px">{{}}</span>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row style="margin-top: 10px">
+        <span style="font-weight: bold; font-size: 18px">基础信息</span>
+      </el-row>
+      <el-row :gutter="30" style="margin-top: 10px">
+        <el-col :span="4">
+          <el-form-item label="炉号" class="custom-label">
+            <span>{{ queryParams.furnaceNumber }}</span>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="4">
+          <el-form-item label="厂家" class="custom-label">
+            <span>{{ queryParams.manufacturers }}</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>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="规格" class="custom-label">
+            <span>{{ queryParams.specification }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="形状" class="custom-label">
+            <span>{{ queryParams.shape }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="材料直径" class="custom-label">
+            <span>{{ queryParams.specification }}</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>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="4">
+          <el-form-item label="来料日期" class="custom-label">
+            <span>{{ queryParams.createTime }}</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
+            }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="材质2" class="custom-label">
+            <span>{{ "-" }}</span>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div style="padding: 16px">
+      <span style="font-weight: bold; font-size: 18px">工序</span>
+      <el-button type="primary" style="float: right; margin-left: 10px">
+        单批单改
+      </el-button>
+      <el-button type="primary" style="float: right; margin-left: 10px">
+        分批
+      </el-button>
+      <el-button type="primary" style="float: right; margin-left: 10px">
+        批废
+      </el-button>
+      <el-button type="primary" style="float: right; margin-left: 10px">
+        查看标准工艺
+      </el-button>
+    </div>
+    <div class="el-table-container">
+      <div class="el-table-inner-container">
+        <el-table v-loading="loading" height="95%" :data="productionPlanList">
+          <el-table-column
+            type="index"
+            label="行号"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="工序名称"
+            prop="processName"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="状态"
+            prop="status"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="合格量"
+            prop="qualifiedQuantity"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="合废量"
+            prop="wasteQuantity"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="标注"
+            prop="annotation"
+            align="center"
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup name="LotProductionPlan">
+import { ref } from "vue";
+const { proxy } = getCurrentInstance();
+
+/** 查询 对象 */
+const productionPlanList = ref([]);
+const loading = ref(false);
+
+/** 查询对象 */
+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: "详见技术标准",
+});
+
+/****************************  方法区  ****************************/
+</script>
+
+<style lang="scss" scoped>
+.bold-large span {
+  font-weight: bold; /* 设置内容加粗 */
+  font-size: 22px; /* 设置内容字体大小 */
+}
+.spacing {
+  margin-left: 10px;
+}
+
+.list-search {
+  padding: 16px;
+  border-bottom: 8px solid #eef0f5;
+}
+.list-search .el-form-item {
+  margin-top: 0px;
+  margin-right: 15px;
+  margin-bottom: 0px;
+  margin-left: 0;
+}
+.list-search .el-form-item .el-form-item__label {
+  font-size: 16px;
+  padding-right: 0;
+}
+</style>

+ 133 - 84
src/views/business/reviseBath/producedLotForm.vue

@@ -1,16 +1,19 @@
 <template>
   <!-- 添加或修改项目信息对话框 -->
   <el-drawer
-      v-model="visible"
-      size="90%"
-      direction="rtl"
-      :close-on-press-escape="false"
+    v-model="visible"
+    size="90%"
+    direction="rtl"
+    :close-on-press-escape="false"
   >
     <div class="page-container form-container">
-      <div class="form-btns-container" style="display: flex; align-items: center;">
-        <span class="title-label" 
-        ><el-icon>
-            <Document/>
+      <div
+        class="form-btns-container"
+        style="display: flex; align-items: center"
+      >
+        <span class="title-label"
+          ><el-icon>
+            <Document />
           </el-icon>
           计划详情</span
         >
@@ -44,10 +47,10 @@
         </el-form-item>
         <el-form-item label="工段:">
           <el-select-v2
-              v-model="queryParams.deptId"
-              :options="deptList"
-              placeholder="请选择工段"
-              style="width: 140px"
+            v-model="queryParams.deptId"
+            :options="deptList"
+            placeholder="请选择工段"
+            style="width: 140px"
           />
         </el-form-item>
         <el-form-item>
@@ -59,58 +62,103 @@
       <!-- 列表区 -->
       <div class="el-table-container">
         <el-table
-            ref="dayworkTable"
-            v-loading="loading"
-            row-key="id"
-            height="100%"
-            :data="lotList"
+          ref="dayworkTable"
+          v-loading="loading"
+          row-key="id"
+          height="100%"
+          :data="lotList"
         >
-        <el-table-column
-              type="index"
-              label="行号"
-              width="50"
-              align="center"
-            />
-          <el-table-column label="客户简称" prop="companyAlias" align="center"/>
-          <el-table-column label="生产计划单号" width="100" prop="productionPlanNo" align="center"/>
+          <el-table-column
+            type="index"
+            label="行号"
+            width="50"
+            align="center"
+          />
+          <el-table-column
+            label="客户简称"
+            prop="companyAlias"
+            align="center"
+          />
+          <el-table-column
+            label="生产计划单号"
+            width="100"
+            prop="productionPlanNo"
+            align="center"
+          />
           <el-table-column label="批次号" prop="lotCode" align="center">
-            <template #default="{ row }">
-          <a href="#" class="hyperlink" @click="handleColumnClick(row)">
-            {{ row.lotCode }}
-          </a>
-        </template>
+            <template #default="scope">
+              <el-button
+                link
+                type="primary"
+                v-hasPermi="['business:productionPlan:query']"
+                @click="handleColumnClick(scope.row)"
+                ><span>{{ scope.row.lotCode }}</span></el-button
+              >
+
+              <!-- // <a href="#" class="hyperlink" (row)">
+                
+              // </a> -->
+            </template>
           </el-table-column>
-          <el-table-column label="产品描述" prop="productDescription" align="center"/>
-          <el-table-column label="图纸版本" width="80" prop="technologyVersion" align="center"/>
-          <el-table-column label="投产量" width="100" prop="productionQuantity" align="center"/>
           <el-table-column
-                label="下达日期"
-                prop="createTime"
-                width="100"
-                align="center"
-            >
-              <template #default="scope">
-                <span>{{
-                    proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
-                  }}</span>
-              </template>
-            </el-table-column>
-          <el-table-column label="当前工段" width="100" prop="deptName" align="center"/>
-          <el-table-column label="当前工序" width="120" prop="processAlias" align="center"/>
-          <el-table-column label="废品回用" width="70" prop="isWasteRecycling" align="center">
+            label="产品描述"
+            prop="productDescription"
+            align="center"
+          />
+          <el-table-column
+            label="图纸版本"
+            width="80"
+            prop="technologyVersion"
+            align="center"
+          />
+          <el-table-column
+            label="投产量"
+            width="100"
+            prop="productionQuantity"
+            align="center"
+          />
+          <el-table-column
+            label="下达日期"
+            prop="createTime"
+            width="100"
+            align="center"
+          >
             <template #default="scope">
-              <dict-tag
-                  :options="yes_no"
-                  :value="scope.row.isWasteRecycling"
-              />
+              <span>{{
+                proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
+              }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="批废" width="70" prop="isWaste" align="center">
+          <el-table-column
+            label="当前工段"
+            width="100"
+            prop="deptName"
+            align="center"
+          />
+          <el-table-column
+            label="当前工序"
+            width="120"
+            prop="processAlias"
+            align="center"
+          />
+          <el-table-column
+            label="废品回用"
+            width="70"
+            prop="isWasteRecycling"
+            align="center"
+          >
             <template #default="scope">
-              <dict-tag
-                  :options="yes_no"
-                  :value="scope.row.isWaste"
-              />
+              <dict-tag :options="yes_no" :value="scope.row.isWasteRecycling" />
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="批废"
+            width="70"
+            prop="isWaste"
+            align="center"
+          >
+            <template #default="scope">
+              <dict-tag :options="yes_no" :value="scope.row.isWaste" />
             </template>
           </el-table-column>
         </el-table>
@@ -119,18 +167,17 @@
   </el-drawer>
 </template>
 <script setup>
-import {
-  getProducedLot,getDeptList
-} from "@/api/business/daywork.js";
-const {proxy} = getCurrentInstance();
+import { getProducedLot, getDeptList } from "@/api/business/daywork.js";
+import router from "@/router";
+const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { yes_no } = proxy.useDict("yes_no");
 /** 表单抽屉 页变量 */
 const currentProductionPlan = ref({});
 const loading = ref(false);
-const lotList = ref([])
+const lotList = ref([]);
 const visible = ref(false);
-const deptList = ref([])
+const deptList = ref([]);
 /** 查询对象 */
 const queryParams = ref({
   pageNum: 1,
@@ -139,49 +186,51 @@ const queryParams = ref({
   deptId: null,
 });
 const queryDeptParams = ref({
-  lineNumber:'',
-  productionPlanNo:''
-})
+  lineNumber: "",
+  productionPlanNo: "",
+});
 
 /***********************  方法区  ****************************/
 /** 打开抽屉 */
 const open = (row) => {
-  reset()
+  reset();
   currentProductionPlan.value = row;
-  queryParams.value.lineNumber = row.lineNumber
-  queryParams.value.productionPlanNo = row.productionPlanNo
-  queryDeptParams.value.lineNumber = row.lineNumber
-  queryDeptParams.value.productionPlanNo = row.productionPlanNo
-  getDeptList(queryDeptParams.value).then(res => {
-    if(res.code == 200) {
-        deptList.value = res.data
+  queryParams.value.lineNumber = row.lineNumber;
+  queryParams.value.productionPlanNo = row.productionPlanNo;
+  queryDeptParams.value.lineNumber = row.lineNumber;
+  queryDeptParams.value.productionPlanNo = row.productionPlanNo;
+  getDeptList(queryDeptParams.value).then((res) => {
+    if (res.code == 200) {
+      deptList.value = res.data;
+      console.log("deptList", deptList);
     }
-  })
+  });
   //获取工段信息
-  getProducedLotList()
+  getProducedLotList();
   visible.value = true;
 };
 /** 打开批次详情页 */
 function handleColumnClick(row) {
-
+  // proxy.$refs.lotFormParticularsRef.open(row);
+  // router.push({ path: "/reviseBath/lotFormParticulars/" + row.id });
+  router.push({ path: "/reviseBath/lotFormParticulars" });
 }
 /**获取生产计划列表 */
 function getProducedLotList() {
   loading.value = true;
-  getProducedLot(queryParams.value).then(res => {
-    if(res.code == 200) {
-      lotList.value = res.rows
-      loading.value = false
+  getProducedLot(queryParams.value).then((res) => {
+    if (res.code == 200) {
+      lotList.value = res.rows;
+      loading.value = false;
     }
-  })
+  });
 }
 /**搜索 */
 function handleQuerydaywork() {
-  getProducedLotList()
+  getProducedLotList();
 }
 /**查看 */
-function handleChecklot(row) {
-}
+function handleChecklot(row) {}
 /**
  * 对话框关闭 事件
  */