From 74f21d10c2f29e4631ff1c17d07e3bd6b73ca0b8 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 20 三月 2026 17:54:14 +0800
Subject: [PATCH] 造粒报工

---
 src/views/productionManagement/productionReporting/index.vue            |   12 ++
 src/views/productionManagement/workOrder/index.vue                      |   12 +++
 src/views/productionManagement/workOrder/components/GranulationForm.vue |  194 +++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 211 insertions(+), 7 deletions(-)

diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index e802f24..c0b5157 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -148,6 +148,12 @@
         :isEdit="false"
         :row="currentReportRowData"
         @refreshData="getList"/>
+    <GranulationForm
+        v-if="granulationFormVisible"
+        v-model:isShow="granulationFormVisible"
+        :isEdit="false"
+        :row="currentReportRowData"
+        @refreshData="getList"/>
     <Detail
         v-if="showDetail"
         v-model:isShow="showDetail"
@@ -167,9 +173,10 @@
 import {productionProductMainListPage} from "@/api/productionManagement/productionProductMain.js";
 import {userListNoPageByTenantId} from "@/api/system/user.js";
 import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
-import VoltageSortingForm from "@/views/productionManagement/workOrder/components/VoltageSortingForm.vue";
 
+const VoltageSortingForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/VoltageSortingForm.vue"));
 const CopperPrintingForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/CopperPrintingForm.vue"));
+const GranulationForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/GranulationForm.vue"));
 const Detail = defineAsyncComponent(() => import("@/views/productionManagement/productionReporting/components/Detail.vue"));
 
 
@@ -430,6 +437,7 @@
 const isShowInput = ref(false);
 const copperPrintingFormVisible = ref(false);
 const voltageSortingFormVisible = ref(false);
+const granulationFormVisible = ref(false);
 const showDetail = ref(false);
 const isShowingId = ref(0);
 const showInput = row => {
@@ -457,6 +465,8 @@
     copperPrintingFormVisible.value = true;
   } else if (row.process === '鐢靛帇鍒嗛��') {
     voltageSortingFormVisible.value = true;
+  } else if (row.process === '閫犵矑') {
+    granulationFormVisible.value = true;
   } else {
     showDetail.value = true;
   }
diff --git a/src/views/productionManagement/workOrder/components/GranulationForm.vue b/src/views/productionManagement/workOrder/components/GranulationForm.vue
index ce7a8b8..8fed003 100644
--- a/src/views/productionManagement/workOrder/components/GranulationForm.vue
+++ b/src/views/productionManagement/workOrder/components/GranulationForm.vue
@@ -102,7 +102,7 @@
       startTime: undefined,
       endTime: undefined,
       weightRatio: undefined, // 閲嶉噺姣旓紙姘�/鏂欙級
-      pva: undefined, // PVAn绮樺悎鍓傞噸閲�
+      pva: undefined, // PVA绮樺悎鍓傞噸閲�
       dispersantWeight: undefined, // 鍒嗘暎鍓傞噸閲�
       releaseAgentWeight: undefined, // 鑴辨ā鍓傞噸閲�
     },
@@ -160,6 +160,12 @@
       case 'stirredMillConfirmId':
         formData.otherData.stirredMill.confirmName = selectedUser.userName;
         break;
+      case 'granulationBUserId':
+        formData.otherData.granulationB.userName = selectedUser.userName;
+        break;
+      case 'granulationBConfirmId':
+        formData.otherData.granulationB.confirmName = selectedUser.userName;
+        break;
     }
   } else {
     switch (reportType) {
@@ -181,12 +187,18 @@
       case 'stirredMillConfirmId':
         formData.otherData.stirredMill.confirmName = "";
         break;
+      case 'granulationBUserId':
+        formData.otherData.granulationB.userName = "";
+        break;
+      case 'granulationBConfirmId':
+        formData.otherData.granulationB.confirmName = "";
+        break;
     }
   }
 };
-// todo 淇敼浣滀笟鍛橈紝鍦ㄦ墍鏈変綔涓氬憳涓幏鍙栧~鍏ョ殑鍊硷紝濡傛灉娌℃湁鍒欐彁绀轰笉鎻愪氦
+
 const handleReport = () => {
-  if (!formData.otherData.userId && !formData.otherData.surfaceCopperPasteUserId && !formData.otherData.underlyingCopperPasteUserId) {
+  if (!formData.otherData.stirredMillIncludesMixing.userId && !formData.otherData.stirredMill.userId && !formData.otherData.burningMaterial.userId && !formData.otherData.granulationB.userId) {
     ElMessage.error('璇烽�夋嫨浣滀笟鍛�')
     return;
   }
@@ -194,7 +206,7 @@
     ElMessage.error('璇疯緭鍏ョ敓浜ф暟閲�')
     return;
   }
-  formData.userId = formData.otherData.surfaceCopperPasteUserId || formData.otherData.underlyingCopperPasteUserId;
+  formData.userId = formData.otherData.stirredMillIncludesMixing.userId || formData.otherData.stirredMill.userId || formData.otherData.burningMaterial.userId || formData.otherData.granulationB.userId;
 
   const otherData = JSON.stringify(formData.otherData);
   const submitData = {
@@ -535,7 +547,7 @@
             <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.calcinationWeight) }}</span>
             <span>KG</span>
           </td>
-          <td class="label"  colspan="2" rowspan="3">
+          <td class="label"  colspan="2" rowspan="2">
             <span>纭浜�:</span>
             <el-select v-model="formData.otherData.burningMaterial.confirmId"
                        v-if="props.isEdit"
@@ -707,7 +719,177 @@
             <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.confirmName || formData.otherData.stirredMill.confirmId) }}</span>
           </td>
         </tr>
-        <!-- todo鎼呮媽琛屽紑濮嬶紝纭浜鸿鐣欑┖锛屽凡鍦ㄤ笂闈㈣〃鏍奸鐣� -->
+        <tr>
+          <td class="label"  colspan="2" rowspan="2">鎼呮媽</td>
+          <td class="label"  colspan="4">
+            <span>寮�濮嬫椂闂达細</span>
+            <el-date-picker
+                v-if="props.isEdit"
+                v-model="formData.otherData.stir.startTime"
+                type="datetime"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                format="YYYY-MM-DD HH:mm:ss"
+                placeholder="璇烽�夋嫨"
+                style="width: 100%"
+            />
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.startTime) }}</span>
+          </td>
+          <td class="label"  colspan="4">
+            <span>缁撴潫鏃堕棿锛�</span>
+            <el-date-picker
+                v-if="props.isEdit"
+                v-model="formData.otherData.stir.endTime"
+                type="datetime"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                format="YYYY-MM-DD HH:mm:ss"
+                placeholder="璇烽�夋嫨"
+                style="width: 100%"
+            />
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.endTime) }}</span>
+          </td>
+          <td class="label" colspan="4">
+            <span>閲嶉噺姣旓紙姘�/鏂欙級锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.weightRatio" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.weightRatio) }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td class="label" colspan="4">
+            <span>PVA绮樺悎鍓傞噸閲� 锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.pva" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.pva) }}</span>
+          </td>
+          <td class="label" colspan="4">
+            <span>鍒嗘暎鍓傞噸閲� 锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.dispersantWeight" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.dispersantWeight) }}</span>
+          </td>
+          <td class="label" colspan="4">
+            <span>鑴辨ā鍓傞噸閲� 锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.releaseAgentWeight" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.releaseAgentWeight) }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td class="label"  colspan="2" rowspan="4">閫犵矑</td>
+          <td class="label"  colspan="6">
+            <span>寮�濮嬫椂闂达細</span>
+            <el-date-picker
+                v-if="props.isEdit"
+                v-model="formData.otherData.granulationB.startTime"
+                type="datetime"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                format="YYYY-MM-DD HH:mm:ss"
+                placeholder="璇烽�夋嫨"
+                style="width: 100%"
+            />
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.startTime) }}</span>
+          </td>
+          <td class="label"  colspan="6">
+            <span>缁撴潫鏃堕棿锛�</span>
+            <el-date-picker
+                v-if="props.isEdit"
+                v-model="formData.otherData.granulationB.endTime"
+                type="datetime"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                format="YYYY-MM-DD HH:mm:ss"
+                placeholder="璇烽�夋嫨"
+                style="width: 100%"
+            />
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.endTime) }}</span>
+          </td>
+          <td class="label"  colspan="2" rowspan="2">
+            <span>浣滀笟鍛�:</span>
+            <el-select v-model="formData.otherData.granulationB.userId"
+                       v-if="props.isEdit"
+                       style="width: 100%"
+                       placeholder="璇烽�夋嫨浣滀笟鍛�"
+                       clearable
+                       filterable
+                       @change="handleUserChange($event, 'granulationBUserId')">
+              <el-option v-for="user in userOptions"
+                         :key="user.userId"
+                         :label="user.userName"
+                         :value="user.userId"/>
+            </el-select>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.userName || formData.otherData.granulationB.userId) }}</span>
+          </td>
+        </tr>
+
+        <tr>
+          <td class="label" colspan="4">
+            <span>闆惧寲鍣ㄨ浆閫� 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.atomizerRotationalSpeed" placeholder="璇疯緭鍏�">
+              <template #append>r/min</template>
+            </el-input>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.atomizerRotationalSpeed) }}</span>
+          </td>
+          <td class="label" colspan="4">
+            <span>杩涘彛閫熷害 锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.granulationB.importSpeed" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.importSpeed) }}</span>
+          </td>
+          <td class="label" colspan="4">
+            <span>鍑哄彛閫熷害 锛�</span>
+            <el-input v-if="props.isEdit" v-model="formData.otherData.granulationB.outSpeed" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.outSpeed) }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td class="label" colspan="6">
+            <span>浜у嚭鎬绘暟 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.quantity" placeholder="璇疯緭鍏�">
+              <template #append>KG</template>
+            </el-input>
+            <span v-else class="view-value">{{ displayValue(formData.quantity) }}</span>
+          </td>
+          <td class="label" colspan="6">
+            <span>鍚堟牸閲嶉噺 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.qualifiedWeight" placeholder="璇疯緭鍏�">
+              <template #append>KG</template>
+            </el-input>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.qualifiedWeight) }}</span>
+          </td>
+          <td class="label"  colspan="2" rowspan="2">
+            <span>纭浜�:</span>
+            <el-select v-model="formData.otherData.granulationB.confirmId"
+                       v-if="props.isEdit"
+                       style="width: 100%"
+                       placeholder="璇烽�夋嫨纭浜�"
+                       clearable
+                       filterable
+                       @change="handleUserChange($event, 'stirredMillConfirmId')">
+              <el-option v-for="user in userOptions"
+                         :key="user.userId"
+                         :label="user.userName"
+                         :value="user.userId"/>
+            </el-select>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.confirmName || formData.otherData.granulationB.confirmId) }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td class="label" colspan="6">
+            <span>灏炬枡 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.wasteMaterials" placeholder="璇疯緭鍏�">
+              <template #append>KG</template>
+            </el-input>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.wasteMaterials) }}</span>
+          </td>
+          <td class="label" colspan="6">
+            <span>澹佹枡 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.wallMaterial" placeholder="璇疯緭鍏�">
+              <template #append>KG</template>
+            </el-input>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.wallMaterial) }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td class="label" colspan="16">
+            <span>澶囨敞 锛�</span>
+            <el-input  v-if="props.isEdit" v-model="formData.otherData.remark" placeholder="璇疯緭鍏�"/>
+            <span v-else class="view-value">{{ displayValue(formData.otherData.remark) }}</span>
+          </td>
+        </tr>
         </tbody>
       </table>
     </el-form>
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 901a7dc..3b193f8 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -234,6 +234,12 @@
         :isEdit="true"
         :row="currentReportRowData"
         @refreshData="getList"/>
+    <GranulationForm
+        v-if="granulationFormVisible"
+        v-model:isShow="granulationFormVisible"
+        :isEdit="true"
+        :row="currentReportRowData"
+        @refreshData="getList"/>
   </div>
 </template>
 
@@ -261,6 +267,7 @@
 const CopperPrintingForm = defineAsyncComponent(() => import("./components/CopperPrintingForm.vue"));
 const VoltageSortingForm = defineAsyncComponent(() => import("./components/VoltageSortingForm.vue"));
 const ProductionRecordForm = defineAsyncComponent(() => import("./components/ProductionRecordForm.vue"));
+const GranulationForm = defineAsyncComponent(() => import("./components/GranulationForm.vue"));
 const tableColumn = ref([
   {
     label: "浼樺厛绾�",
@@ -388,6 +395,7 @@
 const editDialogVisible = ref(false);
 const copperPrintingFormVisible = ref(false);
 const voltageSortingFormVisible = ref(false);
+const granulationFormVisible = ref(false);
 const transferCardVisible = ref(false);
 const transferCardData = ref([]);
 const transferCardQrUrl = ref("");
@@ -665,6 +673,10 @@
     voltageSortingFormVisible.value = true
     return;
   }
+  if (row.processName === '閫犵矑') {
+    granulationFormVisible.value = true
+    return;
+  }
   processParamList.value = await getProcessParamList(row)
   reportForm.planQuantity = row.planQuantity;
   reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null;

--
Gitblit v1.9.3