Kaynağa Gözat

计划列表

wangxin 1 yıl önce
ebeveyn
işleme
a666a2aa58
1 değiştirilmiş dosya ile 280 ekleme ve 0 silme
  1. 280 0
      src/views/business/reviseBath/index.vue

+ 280 - 0
src/views/business/reviseBath/index.vue

@@ -0,0 +1,280 @@
+<template>
+  <div class="page-container column-container">
+    <!-- 搜索区 -->
+    <el-form
+      class="list-search-container"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+    >
+      <el-form-item label="计划单号:">
+        <el-input
+          placeholder="请输入计划单号"
+          @keydown.enter.prevent
+          @keyup.enter="handleQuery"
+          clearable
+          v-model.trim="queryParams.productionPlanNo"
+          style="width: 160px"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="info" icon="Search" @click="handleQuery"
+          >搜索</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <!-- 列表区 -->
+    <div class="el-table-container">
+      <div class="el-table-inner-container">
+        <el-table v-loading="loading" :data="productionPlanList" height="100%">
+          <el-table-column
+            type="index"
+            label="行号"
+            width="50"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            label="客户简称"
+            prop="companyAlias"
+            width="150"
+            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="80"
+            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"
+              />
+            </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"
+            align="center"
+            fixed="right"
+          >
+            <template #default="scope">
+              <span>{{ scope.row.requisitionDepartmentName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="下达日期"
+            prop="issueDate"
+            width="120"
+            align="center"
+          />
+          <el-table-column label="操作" width="80" fixed="right" align="center">
+            <template #default="scope">
+              <el-button
+                link
+                size="small"
+                type="primary"
+                icon="View"
+                v-hasPermi="['business:productionPlan:query']"
+                @click="handleView(scope.row)"
+                >查看</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script setup name="ProductionPlan">
+import { getP2Plan } from "@/api/business/p2.js";
+import { listProductionPlanDetail } from "@/api/business/productionPlanDetail.js";
+import totalIcon2 from "@/assets/images/dashboard-total-icon-2.png";
+import totalIcon3 from "@/assets/images/dashboard-total-icon-3.png";
+import { ref } from "vue";
+const { proxy } = getCurrentInstance();
+/** 字典数组区 */
+/** 查询 对象 */
+const productionPlanList = ref([]);
+const loading = ref(true);
+const total = ref(2);
+const { plan_status } = proxy.useDict("plan_status");
+const { lot_code_status_code } = proxy.useDict("lot_code_status_code");
+
+/** 查询对象 */
+const queryParams = ref({
+  productionPlanNo: "",
+  planStatus: "",
+  pullP2PlanDetails: false,
+  pageNum: 1,
+  pageSize: 10,
+});
+
+onMounted(() => {
+  getList();
+});
+
+/****************************  方法区  ****************************/
+
+/** 查询生产计划列表 */
+function getList() {
+  loading.value = true;
+  getP2Plan(queryParams.value).then((res) => {
+    productionPlanList.value = res.rows;
+    total.value = res.total;
+    loading.value = false;
+    queryParams.value.pullP2PlanDetails = false;
+  });
+}
+
+/** 查看按钮操作 */
+function handleView(row) {}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/**
+ * 同步P2生产计划
+ */
+const handleSyncP2Plan = () => {
+  queryParams.value.pullP2PlanDetails = true;
+  getList();
+};
+</script>
+
+<style lang="scss" scoped>
+.dashboard-total-item {
+  display: flex;
+  align-items: center;
+  font-size: 16px;
+  height: 120px;
+  background-color: #f2f2f2;
+  border-radius: 10px;
+
+  > div:first-child {
+    display: flex;
+    flex: 2;
+    justify-content: center;
+    align-items: center;
+  }
+  > div.dashboard-total-item-label {
+    display: flex;
+    flex: 3;
+    flex-direction: column;
+    justify-content: center;
+
+    > span {
+      display: block;
+      width: 60%;
+      text-align: center;
+
+      &:first-child {
+        font-size: 16px;
+        margin-bottom: 4px;
+        letter-spacing: 2px;
+      }
+      &:last-child {
+        font-weight: bold;
+        font-size: 24px;
+      }
+    }
+  }
+}
+.dashboard-total-item > .dashboard-total-item-label > span:last-child {
+  color: #444444;
+}
+.dashboard-total-item
+  > .dashboard-total-item-label
+  > span:last-child
+  > span:first-child {
+  margin-right: 8px;
+}
+.dashboard-total-item
+  > .dashboard-total-item-label
+  > span:last-child
+  > span:last-child {
+  color: #4367df;
+}
+.dashboard-total-item > .number-label {
+  font-size: 40px;
+  margin-left: 16px;
+  font-weight: bold;
+  color: #5a6ac3;
+}
+</style>