Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

guoyujia 1 tahun lalu
induk
melakukan
9e9a5502c2

+ 12 - 3
src/views/business/lot/InBatchesDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog :title="'批次号:' + baseLot.lotCode" v-model="visible" width="1200px" append-to-body draggable @close="close">
-    <div class="form-container">
+    <div class="form-container in-batches-dialog">
 
       <el-form ref="lotFormRef" v-loading="loading" class="master-container" :model="baseLot" label-width="130px"
         @submit.native.prevent>
@@ -67,8 +67,11 @@
           <el-col :span="24">
             <div style="display: flex; flex-direction: row;">
               <div style="line-height: 32px;">分批信息</div>
-              <el-form-item label="分批数量" style="margin-bottom: 0px;">
-                <el-input-number v-model="baseLot.sparateNum" :controls="false" @blur="handleNumBlur" :max="10" />
+              <el-form-item label="分批数量">
+                <el-input-number v-model="baseLot.sparateNum" :controls="false" :max="10" />
+              </el-form-item>
+              <el-form-item label-width="20px">
+                <el-button type="primary" @click="handleNumBlur">计算</el-button>
               </el-form-item>
             </div>
             <el-divider />
@@ -322,3 +325,9 @@ defineExpose({
   open,
 });
 </script>
+<style>
+.in-batches-dialog .el-form-item--default .el-form-item__content {
+  line-height: 32px;
+  display: inline-block;
+}
+</style>

+ 57 - 154
src/views/business/reviseBath/lotFormParticulars.vue

@@ -1,33 +1,16 @@
 <template>
   <div v-if="!loading" class="page-container column-container">
-    <el-form
-      class="list-search"
-      style=""
-      :model="lot"
-      ref="queryRef"
-      :inline="true"
-    >
+    <el-form class="list-search" style="" :model="lot" ref="queryRef" :inline="true">
       <el-row style="margin-top: 10px">
         <el-form-item class="bold-large">
           <span>{{ "批次号:" }}</span>
           <span>{{ lot.lotCode }}</span>
         </el-form-item>
         <el-form-item>
-          <el-tag class="spacing" :type="status(lot)">{{
-            statusText(lot)
-          }}</el-tag>
-          <el-tag v-if="lot.isWaste == 1" class="spacing" type="danger">{{
-            "报废"
-          }}</el-tag>
-          <el-tag v-if="lot.isAmend == 1" class="spacing" type="danger">{{
-            "工艺修改"
-          }}</el-tag>
-          <el-tag
-            v-if="lot.isWasteRecycling == 1"
-            class="spacing"
-            type="primary"
-            >{{ "废品回用" }}</el-tag
-          >
+          <el-tag class="spacing" :type="status(lot)">{{ statusText(lot) }}</el-tag>
+          <el-tag v-if="lot.isWaste == 1" class="spacing" type="danger">{{ "报废" }}</el-tag>
+          <el-tag v-if="lot.isAmend == 1" class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
+          <el-tag v-if="lot.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
         </el-form-item>
       </el-row>
 
@@ -46,9 +29,9 @@
 
         <el-col :span="6">
           <el-form-item label="序号" class="custom-label">
-            <span style="margin-left: 28px">{{
-              lot.productionPlanDetail.lineNumber
-            }}</span>
+            <span style="margin-left: 28px">
+              {{ lot.productionPlanDetail.lineNumber }}
+            </span>
           </el-form-item>
         </el-col>
         <el-col :span="6">
@@ -66,17 +49,14 @@
 
         <el-col :span="6">
           <el-form-item label="单批量" class="custom-label">
-            <span style="margin-left: 28px">{{
-              lot.productionPlanDetail.oneLotQuantity
-            }}</span>
+            <span style="margin-left: 28px">
+              {{ lot.productionPlanDetail.oneLotQuantity }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="6">
           <el-form-item label="领料部门" class="custom-label">
-            <span>{{
-              lot.productionPlanDetail.requisitionDepartmentName
-            }}</span>
+            <span>{{ lot.productionPlanDetail.requisitionDepartmentName }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="6">
@@ -105,201 +85,114 @@
       <el-row :gutter="30" style="margin-top: 10px">
         <el-col :span="4">
           <el-form-item label="炉号" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.furnaceNumber
-                ? lot.furnaceNoInfo.furnaceNumber
-                : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.furnaceNumber ? lot.furnaceNoInfo.furnaceNumber : "-" }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="厂家" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.factory ? lot.furnaceNoInfo.factory : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.factory ? 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">{{
-              lot.furnaceNoInfo.brandNumber
-                ? lot.furnaceNoInfo.brandNumber
-                : "-"
-            }}</span>
+            <span style="margin-left: 28px">{{ lot.furnaceNoInfo.brandNumber ? lot.furnaceNoInfo.brandNumber : "-"
+              }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="规格" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.spec ? lot.furnaceNoInfo.spec : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.spec ? lot.furnaceNoInfo.spec : "-" }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="形状" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.shape ? lot.furnaceNoInfo.shape : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.shape ? lot.furnaceNoInfo.shape : "-" }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="材料直径" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.diameter ? lot.furnaceNoInfo.diameter : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.diameter ? 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>{{
-              lot.furnaceNoInfo.rawMaterialCode
-                ? lot.furnaceNoInfo.rawMaterialCode
-                : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.rawMaterialCode ? lot.furnaceNoInfo.rawMaterialCode : "-" }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="来料日期" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.incomingDate
-                ? lot.furnaceNoInfo.incomingDate
-                : "-"
-            }}</span>
+            <span>{{ lot.furnaceNoInfo.incomingDate ? 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">{{
-              lot.furnaceNoInfo.firstTechnicalRequirement
-                ? lot.furnaceNoInfo.firstTechnicalRequirement
-                : "-"
-            }}</span>
+            <span style="margin-left: 28px">
+              {{ lot.furnaceNoInfo.firstTechnicalRequirement ? lot.furnaceNoInfo.firstTechnicalRequirement : "-" }}
+            </span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="材质2" class="custom-label">
-            <span>{{
-              lot.furnaceNoInfo.secondTechnicalRequirement
-                ? lot.furnaceNoInfo.secondTechnicalRequirement
-                : "-"
-            }}</span>
+            <span>
+              {{ lot.furnaceNoInfo.secondTechnicalRequirement ? lot.furnaceNoInfo.secondTechnicalRequirement : "-" }}
+            </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"
-        @click="handleOnceSingleChange"
-      >
+      <el-button type="primary" style="float: right; margin-left: 10px" @click="handleOnceSingleChange">
         单批单改
       </el-button>
-      <el-button type="primary" style="float: right; margin-left: 10px">
+      <el-button type="primary" style="float: right; margin-left: 10px" @click="handleSplit()">
         分批
       </el-button>
-      <el-button
-        :disabled="lot.isWaste == 1"
-        type="danger"
-        style="float: right; margin-left: 10px"
-        @click="handlelotWaste(route.params.lotCode)"
-      >
+      <el-button :disabled="lot.isWaste == 1" type="danger" style="float: right; margin-left: 10px"
+        @click="handlelotWaste(route.params.lotCode)">
         批废
       </el-button>
-      <el-button
-        v-if="lot.isAmend == 1"
-        type="primary"
-        style="float: right; margin-left: 10px"
-        @click="handleStandardProcess(lot.technologicalProcessId)"
-      >
+      <el-button v-if="lot.isAmend == 1" type="primary" style="float: right; margin-left: 10px"
+        @click="handleStandardProcess(lot.technologicalProcessId)">
         查看标准工艺
       </el-button>
     </div>
     <div class="el-table-container">
       <div class="el-table-inner-container">
         <el-table height="95%" :data="processDetails">
-          <el-table-column
-            type="index"
-            label="行号"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="工序名称"
-            prop="processAlias"
-            align="center"
-          ></el-table-column>
+          <el-table-column type="index" label="行号" align="center"></el-table-column>
+          <el-table-column label="工序名称" prop="processAlias" align="center"></el-table-column>
           <el-table-column label="状态" prop="status" align="center">
             <template #default="scope">
               <span>{{ getStatusText(scope.row.status) }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            label="投产量"
-            prop="investNum"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="合格量"
-            prop="qualifiedNum"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="废品量"
-            prop="abandonNum"
-            align="center"
-          ></el-table-column>
+          <el-table-column label="投产量" prop="investNum" align="center"></el-table-column>
+          <el-table-column label="合格量" prop="qualifiedNum" align="center"></el-table-column>
+          <el-table-column label="废品量" prop="abandonNum" align="center"></el-table-column>
         </el-table>
       </div>
     </div>
     <once-change ref="onceChangeRef" @handleSaveSuccess="init" />
     <lot-waste-dialog ref="lotWasteDialogRef" @handleSaveSuccess="init" />
-    <el-dialog
-      title="标准工序"
-      v-model="visible"
-      width="680px"
-      append-to-body
-      draggable
-    >
+    <el-dialog title="标准工序" v-model="visible" width="680px" append-to-body draggable>
       <div class="el-table-inner-container">
-        <el-table
-          style="height: 600px"
-          @selection-change="handleSelectionChange"
-          :data="processList"
-        >
-          <el-table-column
-            type="selection"
-            :selectable="checkSelectable"
-            width="50"
-            align="center"
-          />
-          <el-table-column
-            type="index"
-            label="序号"
-            width="50"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="工序名称"
-            prop="processAlias"
-            align="center"
-          />
+        <el-table style="height: 600px" @selection-change="handleSelectionChange" :data="processList">
+          <el-table-column type="selection" :selectable="checkSelectable" width="50" align="center" />
+          <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
+          <el-table-column label="工序名称" prop="processAlias" align="center" />
 
-          <el-table-column
-            label="工序编号"
-            prop="processStepNumber"
-            width="200"
-            align="center"
-          />
+          <el-table-column label="工序编号" prop="processStepNumber" width="200" align="center" />
         </el-table>
       </div>
     </el-dialog>
+    <InBatchesDialog ref="inBatchesDialogRef" :getList="init" />
   </div>
   <div v-else v-loading="loading" class="page-container column-container"></div>
 </template>
@@ -307,6 +200,7 @@
 <script setup name="LotProductionPlan">
 import { ref } from "vue";
 import onceChange from "./onceSingleChangeDialog";
+import InBatchesDialog from "@/views/business/lot/InBatchesDialog.vue";
 import {
   lotParticulars,
   selectStandardProcess,
@@ -320,7 +214,7 @@ const loading = ref(true);
 const visible = ref(false);
 const processList = ref([]); //工序列表
 const route = useRoute();
-
+const inBatchesDialogRef = ref(null)
 const statusMap = {
   0: { type: "info", text: "未开始" },
   1: { type: "primary", text: "进行中" },
@@ -421,14 +315,21 @@ function handlelotWaste(lotCode) {
  
 }
 
+function handleSplit() {
+  inBatchesDialogRef.value.open({ ...lot.value, companyAlias: lot.value.productionPlanDetail.companyAlias, productionPlanNo: lot.value.productionPlanDetail.productionPlanNo, productDescription: lot.value.productionPlanDetail.productDescription });
+}
+
 init();
 </script>
 
 <style lang="scss" scoped>
 .bold-large span {
-  font-weight: bold; /* 设置内容加粗 */
-  font-size: 22px; /* 设置内容字体大小 */
+  font-weight: bold;
+  /* 设置内容加粗 */
+  font-size: 22px;
+  /* 设置内容字体大小 */
 }
+
 .spacing {
   margin-left: 10px;
 }
@@ -437,12 +338,14 @@ init();
   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;