chengxiangling
2025-05-14 4842a9a9a3394099188819499f8b68aafcff6e21
src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -158,6 +158,13 @@
        <el-button
          type="primary"
          link
          @click="handleCheckLevels(row)"
          v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
          >{{ $t("plan.btns.viewUpperLowerLevels") }}</el-button
        >
        <el-button
          type="primary"
          link
          @click="handleCheckView(row)"
          v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
          >{{ $t("plan.btns.viewRequirement") }}({{row.requireNum}})</el-button
@@ -255,6 +262,30 @@
        </span>
      </template>
    </el-dialog>
    <!-- 查看上下阶 -->
    <el-dialog
      :title="$t('plan.title.viewUpperLowerLevels')"
      v-model="openUpperLowerDialog"
      width="85%"
      style="height:90vh; overflow: hidden"
      append-to-body
    >
      <HxlhTable
        style="width: 100%"
        :columns="subUpAndDownGridOptions"
        :data="subUpAndDownList"
        :loading="loadingSubUpAndDown"
        :height="heightSub"
      >
      </HxlhTable>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="openUpperLowerDialog = false">{{
            $t("common.common.close")
          }}</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
@@ -266,6 +297,7 @@
import {
  metalOrderManageList,
  metalOrderManageSubList,
  metalOrderManageUpAndDownList,
  generatorPlanList,
  planDateList,
} from "@/api/mainPlan/metalOrderManage.js";
@@ -281,10 +313,13 @@
const radio = ref(1);
const customicDate = ref("");
const openDialog = ref(false);
const openUpperLowerDialog = ref(false);
const openBatchDialog = ref(false);
const subGridOptions = ref([]);
const subUpAndDownGridOptions = ref([]);
const subUpdateGridOptions = ref([]);
const subUpdateCustomGridOptions = ref([]);
const subUpAndDownList = ref([]);
const subList = ref([]);
const subUpdateList = ref([]);
// const tableRef = ref();
@@ -292,6 +327,7 @@
const loading = ref(false);
const loadingUpdateDate = ref(false);
const loadingGenerateList = ref(false);
const loadingSubUpAndDown = ref(false);
const loadingSub = ref(false);
const showSearch = ref(true);
const ids = ref([]);
@@ -468,7 +504,7 @@
      },
      {
        title: t("common.common.require"),
        width: 150,
        width: "auto",
        fixed: "right",
        slots: { default: "buttons" },
        align: "center",
@@ -608,6 +644,38 @@
        },
      },
    ];
    subUpAndDownGridOptions.value = [
      {
        title: t("plan.table.documentNumber"),
        field: "documentNumber",
        align: "center",
      },
      {
        title: t("plan.table.level"),
        field: "requiremenType",
        align: "center",
      },
      {
        title: t("plan.table.itemNumber"),
        field: "itemNumber",
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        align: "center",
      },
      {
        title: t("plan.table.planEndDay"),
        field: "planEndDay",
        align: "center",
      },
      {
        title: t("plan.table.productionQuantity"),
        field: "productionQuantity",
        align: "center",
      },
    ]
    subUpdateGridOptions.value = [
      // {
      //   title: t("basic.table.requirementID"),
@@ -779,6 +847,17 @@
      loadingSub.value = false;
    });
}
function handleCheckLevels(row) {
  openUpperLowerDialog.value = true;
  loadingSubUpAndDown.value = true;
  metalOrderManageUpAndDownList({requireId: row.requireId}).then((res) => {
    console.log(res,"metalOrderManageUpAndDownList");
    subUpAndDownList.value = res;
    loadingSubUpAndDown.value = false;
  }).catch(() => {
    loadingSubUpAndDown.value = false;
  });
}
async function hanleBatchUpdateDate() {
  loadingUpdateDate.value = true;
  let planIds = subUpdateList.value.map((item) => {