ezhizao_zx 11 месяцев назад
Родитель
Сommit
104976da4e

+ 1 - 1
src/views/business/firstOutsource/DialogFurnaceNoInfo.vue

@@ -64,7 +64,7 @@ const props = defineProps({
   },
 });
 
-const { multipleSelected, supplierId } = toRefs(props);
+const { multipleSelected, supplierId, singleSelected } = toRefs(props);
 const productList = ref([]);
 const visible = ref(false);
 const lotId = ref({});

+ 56 - 256
src/views/business/productionBatch/index.vue

@@ -2,190 +2,63 @@
   <div class="page-container column-container">
     <section class="list-part-container column-container" style="flex: 1">
       <!-- 搜索区 -->
-      <el-form
-        class="list-search-container"
-        :model="queryParams"
-        ref="queryRef"
-        :inline="true"
-      >
+      <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
         <el-form-item class="section-title" label="生产计划" />
         <el-form-item label="生产计划单号:">
-          <el-input
-            placeholder="请输入生产计划单号"
-            v-model.trim="queryParams.productionPlanNo"
-            @keyup.enter="handleQueryProductionPlanDetail"
-            @keydown.enter.prevent
-            clearable
-            style="width: 200px"
-          />
+          <el-input placeholder="请输入生产计划单号" v-model.trim="queryParams.productionPlanNo"
+            @keyup.enter="handleQueryProductionPlanDetail" @keydown.enter.prevent clearable style="width: 200px" />
         </el-form-item>
         <el-form-item label="产品描述:">
-          <el-input
-            placeholder="请输入产品描述"
-            v-model.trim="queryParams.keywords"
-            @keyup.enter="handleQueryProductionPlanDetail"
-            @keydown.enter.prevent
-            clearable
-            style="width: 200px"
-          />
+          <el-input placeholder="请输入产品描述" v-model.trim="queryParams.keywords"
+            @keyup.enter="handleQueryProductionPlanDetail" @keydown.enter.prevent clearable style="width: 200px" />
         </el-form-item>
 
         <el-form-item>
-          <el-button
-            type="info"
-            icon="Search"
-            @click="handleQueryProductionPlanDetail"
-          >
+          <el-button type="info" icon="Search" @click="handleQueryProductionPlanDetail">
             搜索
           </el-button>
         </el-form-item>
         <el-form-item class="section-title" label="请选择当前工段:">
-          <el-select-v2
-            v-model="queryParams.deptId"
-            filterable
-            :options="deptList"
-            placeholder="请选择工段"
-            style="width: 100%"
-            @change="handleDeptChange"
-          />
+          <el-select-v2 v-model="queryParams.deptId" filterable :options="deptList" placeholder="请选择工段"
+            style="width: 100%" @change="handleDeptChange" />
         </el-form-item>
       </el-form>
       <div class="el-table-container">
         <div class="el-table-inner-container">
-          <el-table
-            ref="planDetailTable"
-            :data="detailPlanList"
-            v-loading="detailLoading"
-            highlight-current-row
-            height="100%"
-            @current-change="handlePlanDetailCurrentChange"
-          >
-            <el-table-column
-              label="客户简称"
-              prop="companyAlias"
-              width="120"
-              align="center"
-            />
-            <el-table-column
-              label="生产计划单号"
-              prop="productionPlanNo"
-              width="110"
-              align="center"
-            />
-            <el-table-column
-              label="序号"
-              width="60"
-              prop="lineNumber"
-              align="center"
-            />
-            <el-table-column
-              label="产品描述"
-              prop="productDescription"
-              align="center"
-            />
-            <el-table-column
-              label="图纸版本"
-              prop="technologyVersion"
-              width="70"
-              align="center"
-            />
-            <el-table-column
-              label="总投产量"
-              prop="productionQuantity"
-              width="80"
-              align="center"
-            />
-            <el-table-column
-              label="总批数"
-              prop="totalLotNumber"
-              width="70"
-              align="center"
-            />
-            <el-table-column
-              label="单批量"
-              prop="oneLotQuantity"
-              width="80"
-              align="center"
-            />
-            <el-table-column
-              label="尾批量"
-              prop="lastLotQuantity"
-              width="80"
-              align="center"
-            />
-            <el-table-column
-              label="批号状态"
-              prop="lotCodeStatusCode"
-              width="100"
-              align="center"
-            >
+          <el-table ref="planDetailTable" :data="detailPlanList" v-loading="detailLoading" highlight-current-row
+            height="100%" @current-change="handlePlanDetailCurrentChange">
+            <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
+            <el-table-column label="生产计划单号" prop="productionPlanNo" width="110" align="center" />
+            <el-table-column label="序号" width="60" prop="lineNumber" align="center" />
+            <el-table-column label="产品描述" prop="productDescription" align="center" />
+            <el-table-column label="图纸版本" prop="technologyVersion" width="70" align="center" />
+            <el-table-column label="总投产量" prop="productionQuantity" width="80" align="center" />
+            <el-table-column label="总批数" prop="totalLotNumber" width="70" align="center" />
+            <el-table-column label="单批量" prop="oneLotQuantity" width="80" align="center" />
+            <el-table-column label="尾批量" prop="lastLotQuantity" width="80" align="center" />
+            <el-table-column label="批号状态" prop="lotCodeStatusCode" width="100" align="center">
               <template #default="scope">
-                <dict-tag
-                  :options="lot_code_status_code"
-                  :value="scope.row.lotCodeStatusCode"
-                />
+                <dict-tag :options="lot_code_status_code" :value="scope.row.lotCodeStatusCode" />
               </template>
             </el-table-column>
-            <el-table-column
-              label="累计投产量"
-              prop="pickUpQuantity"
-              width="80"
-              align="center"
-            />
-            <el-table-column
-              label="累计投产批数"
-              prop="lotTotalNumber"
-              width="90"
-              align="center"
-            />
-            <el-table-column
-              label="库位"
-              prop="storageLocation"
-              width="80"
-              align="center"
-            />
-            <el-table-column
-              label="领料部门"
-              prop="requisitionDepartmentName"
-              width="100"
-              align="center"
-            >
+            <el-table-column label="累计投产量" prop="pickUpQuantity" width="80" align="center" />
+            <el-table-column label="累计投产批数" prop="lotTotalNumber" width="90" align="center" />
+            <el-table-column label="库位" prop="storageLocation" width="80" align="center" />
+            <el-table-column label="领料部门" prop="requisitionDepartmentName" width="100" align="center">
               <template #default="scope">
                 <span>{{ scope.row.requisitionDepartmentName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              label="下达日期"
-              prop="issueDate"
-              width="100"
-              align="center"
-            />
-            <el-table-column
-              label="操作"
-              width="240"
-              align="center"
-              fixed="right"
-            >
+            <el-table-column label="下达日期" prop="issueDate" width="100" align="center" />
+            <el-table-column label="操作" width="240" align="center" fixed="right">
               <template #default="scope">
-                <el-button
-                  link
-                  type="success"
-                  icon="View"
-                  @click="handleCheckMarterialInfo(scope.row)"
-                  >领料信息
+                <el-button link type="success" icon="View" @click="handleCheckMarterialInfo(scope.row)">领料信息
                 </el-button>
-                <el-button
-                  :disabled="
-                    !(
-                      queryParams.deptId == scope.row.requisitionDepartmentId
-                    ) || scope.row.totalLotNumber == scope.row.lotTotalNumber
-                  "
-                  link
-                  type="primary"
-                  icon="Postcard"
-                  @click="handleAddSubDetail(scope.row)"
-                  v-hasPermi="['business:productionBatch:add']"
-                  >投产
+                <el-button :disabled="!(
+          queryParams.deptId == scope.row.requisitionDepartmentId
+        ) || scope.row.totalLotNumber == scope.row.lotTotalNumber
+        " link type="primary" icon="Postcard" @click="handleAddSubDetail(scope.row)"
+                  v-hasPermi="['business:productionBatch:add']">投产
                 </el-button>
                 <!-- <el-button
                   icon="edit"
@@ -201,13 +74,8 @@
       </div>
     </section>
     <!-- 分页 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize"
-      @pagination="getProductionPlanDetail"
-    />
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getProductionPlanDetail" />
 
     <section class="list-part-container row-container" style="flex: 1">
       <section class="list-part-container" style="flex: 4">
@@ -218,98 +86,33 @@
         </el-form>
         <div class="el-table-container">
           <div class="el-table-inner-container">
-            <el-table
-              ref="subDetailsTable"
-              v-loading="subDetailsLoading"
-              :data="subList"
-              highlight-current-row
-              height="100%"
-            >
-              <el-table-column
-                type="index"
-                label="行号"
-                width="50"
-                align="center"
-              />
-              <el-table-column
-                label="生产计划单号"
-                prop="productionPlanNo"
-                width="110"
-                align="center"
-              />
-              <el-table-column
-                label="产品描述"
-                prop="productDescription"
-                align="center"
-              />
-              <el-table-column
-                label="首序投产量"
-                prop="productionQuantity"
-                width="80"
-                align="center"
-              />
-              <el-table-column
-                label="首序投产批数"
-                prop="lotNumber"
-                width="100"
-                align="center"
-              >
+            <el-table ref="subDetailsTable" v-loading="subDetailsLoading" :data="subList" highlight-current-row
+              height="100%">
+              <el-table-column type="index" label="行号" width="50" align="center" />
+              <el-table-column label="生产计划单号" prop="productionPlanNo" width="110" align="center" />
+              <el-table-column label="产品描述" prop="productDescription" align="center" />
+              <el-table-column label="首序投产量" prop="productionQuantity" width="80" align="center" />
+              <el-table-column label="首序投产批数" prop="lotNumber" width="100" align="center">
                 <template #default="scope">
-                  <el-input-number
-                    v-if="scope.row.editStatus"
-                    v-model="scope.row.lotNumber"
-                    placeholder="当前投产批数"
-                    :controls="false"
-                    :precision="0"
-                    :min="0"
-                    :max="scope.row.totalLotNumber"
-                    align="center"
-                  />
+                  <el-input-number v-if="scope.row.editStatus" v-model="scope.row.lotNumber" placeholder="当前投产批数"
+                    :controls="false" :precision="0" :min="0" :max="scope.row.totalLotNumber" align="center" />
                   <span v-else>{{ scope.row.lotNumber }}</span>
                 </template>
               </el-table-column>
-              <el-table-column
-                label="下达日期"
-                prop="issuanceDate"
-                width="120"
-                align="center"
-              >
+              <el-table-column label="下达日期" prop="issuanceDate" width="120" align="center">
                 <template #default="scope">
-                  <el-date-picker
-                    v-if="scope.row.editStatus"
-                    clearable
-                    v-model="scope.row.issuanceDate"
-                    type="date"
-                    value-format="YYYY-MM-DD"
-                    placeholder="请选择实际开始 时间"
-                  />
+                  <el-date-picker v-if="scope.row.editStatus" clearable v-model="scope.row.issuanceDate" type="date"
+                    value-format="YYYY-MM-DD" placeholder="请选择实际开始 时间" />
                   <span v-else>{{ scope.row.issuanceDate }}</span>
                 </template>
               </el-table-column>
-              <el-table-column
-                label="操作"
-                width="150"
-                align="center"
-                v-if="flag"
-              >
+              <el-table-column label="操作" width="150" align="center" v-if="flag">
                 <template #default="scope">
-                  <el-button
-                    v-if="!scope.row.editStatus"
-                    icon="edit"
-                    link
-                    type="warning"
-                    @click="handleShowSubDetailDialog(scope.row)"
-                    v-hasPermi="['business:productionBatch:edit']"
-                    >编辑
+                  <el-button v-if="!scope.row.editStatus" icon="edit" link type="warning"
+                    @click="handleShowSubDetailDialog(scope.row)" v-hasPermi="['business:productionBatch:edit']">编辑
                   </el-button>
-                  <el-button
-                    v-if="!scope.row.editStatus"
-                    icon="delete"
-                    link
-                    type="danger"
-                    @click="handleDelSubDetail(scope.row)"
-                    v-hasPermi="['business:productionBatch:remove']"
-                    >删除
+                  <el-button v-if="!scope.row.editStatus" icon="delete" link type="danger"
+                    @click="handleDelSubDetail(scope.row)" v-hasPermi="['business:productionBatch:remove']">删除
                   </el-button>
                 </template>
               </el-table-column>
@@ -319,10 +122,7 @@
       </section>
     </section>
     <!-- 投产表单 -->
-    <production-lot-form
-      ref="productionRef"
-      @handleSaveSuccess="handleFresh()"
-    />
+    <production-lot-form ref="productionRef" @handleSaveSuccess="handleFresh()" />
     <!-- 领料信息弹窗 -->
     <check-material ref="checkMaterialRef" />
     <!-- 工艺版本变更弹窗
@@ -544,15 +344,15 @@ function handleDelSubDetail(row) {
         updateLotCodeStatus({
           id: currentPlanDetail.value.id,
           lotCodeStatusCode: "NA",
-        }).then((res) => {});
+        }).then((res) => { });
       }
       handleFresh();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => {});
+    .catch(() => { });
 }
 onMounted(() => {
-  getProductionPlanDetail();
+  // getProductionPlanDetail();
   getList();
 });
 </script>